From c06438ff0b031f593ad00d76583742f7371dbd86 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 29 Sep 2023 11:44:30 +1000 Subject: [PATCH] lets try that again --- package.json | 2 +- src/model-interfaces/actors/application.interface.ts | 5 ++++- src/model-interfaces/actors/group.interface.ts | 3 ++- src/model-interfaces/actors/organization.interface.ts | 5 +++-- src/model-interfaces/actors/person.interface.ts | 3 ++- src/model-interfaces/actors/service.interface.ts | 3 ++- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 586bf1a..3fb9e73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "activitypub-types", - "version": "1.1.0", + "version": "1.1.1", "description": "ActivityPub Typescript types", "main": "./dist/index.js", "scripts": { diff --git a/src/model-interfaces/actors/application.interface.ts b/src/model-interfaces/actors/application.interface.ts index a7a0ad2..20e3bb6 100644 --- a/src/model-interfaces/actors/application.interface.ts +++ b/src/model-interfaces/actors/application.interface.ts @@ -1,7 +1,10 @@ +import { APObject } from "../common/object.interface"; import { APActor } from "./actor.interface"; export type APApplication = APActor & { type: "Application" }; -export const ActorIsApplication = (actor: APActor): actor is APApplication => { +export const ObjectIsApplication = ( + actor: APObject, +): actor is APApplication => { return actor.type == "Application"; }; diff --git a/src/model-interfaces/actors/group.interface.ts b/src/model-interfaces/actors/group.interface.ts index d9ece01..97fbe4d 100644 --- a/src/model-interfaces/actors/group.interface.ts +++ b/src/model-interfaces/actors/group.interface.ts @@ -1,7 +1,8 @@ +import { APObject } from "../common/object.interface"; import { APActor } from "./actor.interface"; export type APGroup = APActor & { type: "Group" }; -export const ActorIsGroup = (actor: APActor): actor is APGroup => { +export const ObjectIsGroup = (actor: APObject): actor is APGroup => { return actor.type == "Group"; }; diff --git a/src/model-interfaces/actors/organization.interface.ts b/src/model-interfaces/actors/organization.interface.ts index 3a39a3a..14fb346 100644 --- a/src/model-interfaces/actors/organization.interface.ts +++ b/src/model-interfaces/actors/organization.interface.ts @@ -1,9 +1,10 @@ +import { APObject } from "../common/object.interface"; import { APActor } from "./actor.interface"; export type APOrganization = APActor & { type: "Organization" }; -export const ActorIsOrganization = ( - actor: APActor, +export const ObjectIsOrganization = ( + actor: APObject, ): actor is APOrganization => { return actor.type == "Organization"; }; diff --git a/src/model-interfaces/actors/person.interface.ts b/src/model-interfaces/actors/person.interface.ts index 01660cc..68742f9 100644 --- a/src/model-interfaces/actors/person.interface.ts +++ b/src/model-interfaces/actors/person.interface.ts @@ -1,7 +1,8 @@ +import { APObject } from "../common/object.interface"; import { APActor } from "./actor.interface"; export type APPerson = APActor & { type: "Person" }; -export const ActorIsPerson = (actor: APActor): actor is APPerson => { +export const ObjectIsPerson = (actor: APObject): actor is APPerson => { return actor.type == "Person"; }; diff --git a/src/model-interfaces/actors/service.interface.ts b/src/model-interfaces/actors/service.interface.ts index bb436b3..0728260 100644 --- a/src/model-interfaces/actors/service.interface.ts +++ b/src/model-interfaces/actors/service.interface.ts @@ -1,7 +1,8 @@ +import { APObject } from "../common/object.interface"; import { APActor } from "./actor.interface"; export type APService = APActor & { type: "Service" }; -export const ActorIsService = (actor: APActor): actor is APService => { +export const ObjectIsService = (actor: APObject): actor is APService => { return actor.type == "Service"; };