kopia lustrzana https://github.com/activitypub-js/activitypub-models
add Organization, Person and Service types
rodzic
5ab5081956
commit
591d8634c4
|
@ -10,6 +10,9 @@ export enum ASModelType {
|
|||
Event = 'Event',
|
||||
Group = 'Group',
|
||||
Note = 'Note',
|
||||
Organization = 'Organization',
|
||||
Person = 'Person',
|
||||
Service = 'Service',
|
||||
}
|
||||
|
||||
// TODO: implement
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import {ASBase} from "../ASBase.model";
|
||||
import {ASModelType} from "../../common/common.types";
|
||||
import {OrganizationFields} from "./Organization.types";
|
||||
|
||||
/**
|
||||
* Represents an organization
|
||||
*
|
||||
* {@link https://www.w3.org/ns/activitystreams#Organization Docs}
|
||||
*/
|
||||
export class Organization extends ASBase<OrganizationFields>{
|
||||
constructor(fields: OrganizationFields) {
|
||||
super(ASModelType.Organization, fields);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import {ASObjectFields} from "../asObject/ASObject.types";
|
||||
|
||||
export interface OrganizationFields extends ASObjectFields {}
|
|
@ -0,0 +1,14 @@
|
|||
import {ASBase} from "../ASBase.model";
|
||||
import {ASModelType} from "../../common/common.types";
|
||||
import {PersonFields} from "./Person.types";
|
||||
|
||||
/**
|
||||
* Represents an individual person
|
||||
*
|
||||
* {@link https://www.w3.org/ns/activitystreams#Person Docs}
|
||||
*/
|
||||
export class Person extends ASBase<PersonFields>{
|
||||
constructor(fields: PersonFields) {
|
||||
super(ASModelType.Person, fields);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import {ASObjectFields} from "../asObject/ASObject.types";
|
||||
|
||||
export interface PersonFields extends ASObjectFields {}
|
|
@ -0,0 +1,14 @@
|
|||
import {ASBase} from "../ASBase.model";
|
||||
import {ASModelType} from "../../common/common.types";
|
||||
import {ServiceFields} from "./Service.types";
|
||||
|
||||
/**
|
||||
* Represents a service of any kind
|
||||
*
|
||||
* {@link https://www.w3.org/ns/activitystreams#Service Docs}
|
||||
*/
|
||||
export class Service extends ASBase<ServiceFields>{
|
||||
constructor(fields: ServiceFields) {
|
||||
super(ASModelType.Article, fields);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import {ASObjectFields} from "../asObject/ASObject.types";
|
||||
|
||||
export interface ServiceFields extends ASObjectFields {}
|
Ładowanie…
Reference in New Issue