shadowfacts.net/lib/activitypub/activity.ts

59 lines
965 B
TypeScript

export interface Activity {
actor: string;
type: string;
id: string;
}
export interface Object {
type: string;
id: string;
}
export interface ArticleObject extends Object {
to: string[];
cc: string[];
}
export interface CreateActivity extends Activity {
to: string[];
cc: string[];
object: Object;
}
export interface FollowActivity extends Activity {
object: string;
}
export interface AcceptActivity extends Activity {
object: FollowActivity;
}
export interface UndoActivity extends Activity {
object: Activity;
}
export interface NoteObject extends Object {
attributedTo: string;
content: string;
published: string;
inReplyTo: string;
conversation: string;
}
export interface DeleteActivity extends Activity {
object: string;
}
export interface ActorObject {
id: string;
name: string;
inbox: string;
endpoints?: {
sharedInbox?: string;
}
publicKey: {
publicKeyPem: string;
};
icon: string | object | (string | object)[];
}