Start VERY basic ActivityPub implementation - user endpoint and webfinger acct: support
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
2023-11-06 22:44:06 -06:00
parent 41cd00a413
commit 258abeb13a
6 changed files with 237 additions and 1 deletions

39
src/pub/types/index.ts Normal file
View File

@@ -0,0 +1,39 @@
export namespace Pub {
const ACCEPT_TYPE = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
export interface Config {
uri: string,
}
export interface Object {
id: string,
type: string, // FIXME
}
export interface Actor extends Object {
["@context"]: [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
type: 'Person',
preferredUsername: string,
inbox: string,
publicKey: {
id: string,
owner: string,
publicKeyPem: string,
},
}
export interface Link {
rel: string,
type: string,
href: string,
}
export interface Webfinger {
subject: string,
links: Link[],
}
}