shadowfacts.net/lib/activitypub/activity.ts

64 lines
1.0 KiB
TypeScript
Raw Normal View History

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 {
2019-08-18 22:09:28 +00:00
to: string[];
cc: string[];
directMessage?: boolean;
attributedTo: string;
2019-02-22 00:17:59 +00:00
content: string;
published: string;
inReplyTo: string;
conversation: string;
}
export interface DeleteActivity extends Activity {
object: string;
}
export interface ActorObject {
id: string;
2019-08-18 22:09:28 +00:00
url: string;
2019-02-24 15:21:14 +00:00
name: string;
2019-08-18 22:09:28 +00:00
preferredUsername: string;
inbox: string;
2019-02-24 15:21:14 +00:00
endpoints?: {
sharedInbox?: string;
}
2019-02-20 23:07:29 +00:00
publicKey: {
publicKeyPem: string;
};
2019-02-24 15:21:14 +00:00
icon: string | object | (string | object)[];
}