activitypub Configuration
File: src/config/activitypub.ts
Overview
Exports
- ACTIVITYPUB_CONFIG - const export
- ActivityPubActor - interface export
- WebFingerResponse - interface export
- NodeInfoResponse - interface export
- getActorUrl - function export
- getWebfingerResource - function export
- isLocalActor - function export
- generateActorJson - function export
- generateWebFingerJson - function export
- generateNodeInfoJson - function export
- wantsActivityPub - function export
- wantsWebFinger - function export
Functions
getActorUrl(username: string)
No description available.
Parameters:
username: string
Returns: string
export function getActorUrl(username: string): stringgetWebfingerResource(username: string)
No description available.
Parameters:
username: string
Returns: string
export function getWebfingerResource(username: string): stringisLocalActor(actorUrl: string)
No description available.
Parameters:
actorUrl: string
Returns: boolean
export function isLocalActor(actorUrl: string): booleangenerateActorJson(user: FederatedUser)
No description available.
Parameters:
user: FederatedUser
Returns: ActivityPubActor
export function generateActorJson(user: FederatedUser): ActivityPubActorgenerateWebFingerJson(username: string)
No description available.
Parameters:
username: string
Returns: WebFingerResponse
export function generateWebFingerJson(username: string): WebFingerResponse`generateNodeInfoJson(stats?: {
userCount?: number; postCount?: number; activeMonth?: number; activeHalfyear?: number; })`
No description available.
Parameters:
stats?: { userCount?: number; postCount?: number; activeMonth?: number; activeHalfyear?: number; }
Returns: NodeInfoResponse
export function generateNodeInfoJson(stats?: {
userCount?: number;
postCount?: number;
activeMonth?: number;
activeHalfyear?: number;
}): NodeInfoResponsewantsActivityPub(acceptHeader: string)
No description available.
Parameters:
acceptHeader: string
Returns: boolean
export function wantsActivityPub(acceptHeader: string): booleanwantsWebFinger(acceptHeader: string)
No description available.
Parameters:
acceptHeader: string
Returns: boolean
export function wantsWebFinger(acceptHeader: string): booleanInterfaces
ActivityPubActor
No description available.
interface ActivityPubActor {
'@context': string | string[];
id: string;
type: 'Person' | 'Service' | 'Group';
preferredUsername: string;
name?: string;
summary?: string;
icon?: {
type: 'Image';
mediaType: string;
url: string;
};
inbox: string;
outbox: string;
following: string;
followers: string;
featured?: string;
publicKey: {
id: string;
owner: string;
publicKeyPem: string;
};
endpoints?: {
sharedInbox?: string;
};
url?: string;
}WebFingerResponse
No description available.
interface WebFingerResponse {
subject: string;
links: Array<{
rel: string;
type?: string;
href: string;
}>;
}NodeInfoResponse
No description available.
interface NodeInfoResponse {
version: string;
software: {
name: string;
version: string;
repository?: string;
};
protocols: string[];
services: {
outbound: string[];
inbound: string[];
};
usage: {
users: {
total: number;
activeMonth: number;
activeHalfyear: number;
};
localPosts: number;
localComments: number;
};
openRegistrations: boolean;
metadata: {
nodeName: string;
nodeDescription: string;
maintainer?: {
name: string;
ema
// ...
}Constants
INSTANCE_DOMAIN
No description available.
const INSTANCE_DOMAIN = import.meta.env.VITE_DOMAIN as stringACTIVITYPUB_CONFIG
No description available.
export const ACTIVITYPUB_CONFIG = {Source Code Insights
File Size: 6194 characters Lines of Code: 245 Imports: 1
Usage Example
import { ACTIVITYPUB_CONFIG, ActivityPubActor, WebFingerResponse, NodeInfoResponse, getActorUrl, getWebfingerResource, isLocalActor, generateActorJson, generateWebFingerJson, generateNodeInfoJson, wantsActivityPub, wantsWebFinger } from '@/config/activitypub'
// Example usage
getActorUrl()This documentation was automatically generated from the source code.
