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:
parent
7f915215f3
commit
d592b1e9c9
1 changed files with 28 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue