activitypub-models/src/models/actor/Actor.model.ts

22 wiersze
892 B
TypeScript

import {APBase} from "../apBase/APBase.model";
import {ASModelType} from "../../common/types";
import {ActorFields} from "./Actor.types";
/**
* ActivityPub actors are generally one of the ActivityStreams Actor Types, but
* they don't have to be. For example, a Profile object might be used as an actor,
* or a type from an ActivityStreams extension. Actors are retrieved like any other
* Object in ActivityPub. Like other ActivityStreams objects, actors have an id,
* which is a URI. When entered directly into a user interface (for example on a
* login form), it is desirable to support simplified naming.
*
* {@link https://www.w3.org/TR/activitypub/#actors Docs}
*/
export class Actor extends APBase<ActorFields>{
static create(fields: ActorFields) {
return APBase._create<ActorFields>({
type: ASModelType.Actor,
...fields,
});
}
}