enigma-bbs/core/activitypub/const.js

47 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-01-25 01:11:28 +00:00
exports.ActivityStreamsContext = 'https://www.w3.org/ns/activitystreams';
exports.PublicCollectionId = 'https://www.w3.org/ns/activitystreams#Public';
exports.ActivityStreamMediaType = 'application/activity+json';
2023-01-25 01:11:28 +00:00
exports.ActorCollectionId = exports.PublicCollectionId + 'Actors';
2023-01-25 01:11:28 +00:00
const WellKnownActivity = {
Create: 'Create',
Update: 'Update',
Delete: 'Delete',
Follow: 'Follow',
Accept: 'Accept',
Reject: 'Reject',
Add: 'Add',
Remove: 'Remove',
Like: 'Like',
Announce: 'Announce',
Undo: 'Undo',
Tombstone: 'Tombstone',
2023-01-25 01:11:28 +00:00
};
exports.WellKnownActivity = WellKnownActivity;
const WellKnownActivityTypes = Object.values(WellKnownActivity);
exports.WellKnownActivityTypes = WellKnownActivityTypes;
exports.WellKnownRecipientFields = ['audience', 'bcc', 'bto', 'cc', 'to'];
// Signatures utilized in HTTP signature generation
exports.HttpSignatureSignHeaders = [
'(request-target)',
'host',
'date',
'digest',
'content-type',
];
const Collections = {
Following: 'following',
Followers: 'followers',
FollowRequests: 'followRequests',
Outbox: 'outbox',
Inbox: 'inbox',
SharedInbox: 'sharedInbox',
Actors: 'actors',
};
exports.Collections = Collections;