0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Expanded ActivityPub type definitions

ref https://linear.app/tryghost/issue/MOM-25

All these intersection types are getting a bit out of hand - but we can clean
up all of this once we're past prototyping phase.
This commit is contained in:
Fabien O'Carroll 2024-04-23 11:50:39 +07:00 committed by Fabien 'egg' O'Carroll
parent 7f915215f3
commit d592b1e9c9

View file

@ -37,4 +37,32 @@ export namespace ActivityPub {
publicKeyPem: string
}
};
export type Article = ActivityPub.Object & {
type: 'Article';
name: string;
content: string;
url: string;
attributedTo: string | object[];
};
export type Link = string | {
type: 'Link'
href: string
id?: string
hreflang?: string
mediaType?: string
rel?: string
height?: number
width?: number
};
export type ActivityType = 'Create' | 'Update' | 'Delete';
export type Activity = ActivityPub.Object & {
type: ActivityType;
summary: string;
actor: Link | Actor;
object: Link | ActivityPub.Object;
}
}