From 8452c4caa95f51acd639922c65ac65cc58742ac3 Mon Sep 17 00:00:00 2001 From: SiRanWeb Date: Sat, 29 Oct 2022 21:43:08 +0300 Subject: [PATCH] add Application types --- src/common/common.types.ts | 3 ++- src/models/application/Application.model.ts | 14 ++++++++++++++ src/models/application/Application.types.ts | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/models/application/Application.model.ts create mode 100644 src/models/application/Application.types.ts diff --git a/src/common/common.types.ts b/src/common/common.types.ts index 2c6ae49..2c40312 100644 --- a/src/common/common.types.ts +++ b/src/common/common.types.ts @@ -3,7 +3,8 @@ import {ASObject} from "../models/asObject/ASObject.model"; export enum ModelType { Object = 'Object', - Activity = 'Activity' + Activity = 'Activity', + Application = 'Application', } // TODO: implement diff --git a/src/models/application/Application.model.ts b/src/models/application/Application.model.ts new file mode 100644 index 0000000..3fa17d8 --- /dev/null +++ b/src/models/application/Application.model.ts @@ -0,0 +1,14 @@ +import {ASBase} from "../ASBase.model"; +import {ModelType} from "../../common/common.types"; +import {ApplicationFields} from "./Application.types"; + +/** + * Describes a software application + * + * {@link https://www.w3.org/ns/activitystreams#Application Docs} + */ +export class Application extends ASBase{ + constructor(fields: ApplicationFields) { + super(ModelType.Application, fields); + } +} \ No newline at end of file diff --git a/src/models/application/Application.types.ts b/src/models/application/Application.types.ts new file mode 100644 index 0000000..90b1e83 --- /dev/null +++ b/src/models/application/Application.types.ts @@ -0,0 +1,3 @@ +import {ASObjectFields} from "../asObject/ASObject.types"; + +export interface ApplicationFields extends ASObjectFields {}