forked from siranweb/activitypub-types
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71a6450
commit c06438f
Showing
6 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; |