JSON Schemas
-
Generated NPM package to import the types
Download
Activity
{
"$defs": {
"Object": {
"additionalProperties": false,
"properties": {
"updated": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Moment of this object being updated",
"title": ""
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The summary of the object",
"title": ""
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the object",
"title": ""
},
"inReplyTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The object being replied to. Currently a string. Not sure if this is what I want.",
"title": ""
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The context of the object",
"title": ""
},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"https://www.w3.org/ns/activitystreams",
[
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
]
],
"title": ""
},
"id": {
"description": "id of the activity or object, can be assumed to be globally unique. Some activities such as a Follow request will require an id to be valid. Servers may assume an id to be required. As assigning an id is 'trivial', one should assign one.",
"examples": [
"https://actor.example/some_id"
],
"title": "",
"type": "string"
},
"to": {
"description": "Array of actors this activity or object is addressed to. It is sane to assume that an activity is addressed to at least one person.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"minItems": 1,
"title": "",
"type": "array"
},
"cc": {
"default": [],
"description": "Array of actors this activity or object is carbon copied to.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"title": "",
"type": "array"
},
"published": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Moment of this activity or object being published",
"title": ""
},
"type": {
"description": "Type of the activity or activity. Side effects of this activity are determine by this type.",
"examples": [
"Follow",
"Accept",
"Create",
"Undo",
"Like",
"Note"
],
"title": "",
"type": "string"
},
"attributedTo": {
"description": "id of the actor that authored this object",
"examples": [
"https://actor.example/"
],
"title": "",
"type": "string"
},
"content": {
"description": "The content of the object",
"title": "",
"type": "string"
},
"attachment": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of objects that are attached to the original object",
"title": ""
},
"tag": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of objects that expand on the content of the object",
"title": ""
},
"url": {
"default": [],
"description": "A list of urls that expand on the content of the object",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "",
"type": "array"
},
"sensitive": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "\n Marks the object as sensitive. Currently, used by everyone, a better way would be an element of the tag list that labels the object as sensitive due a reason\n ",
"title": ""
}
},
"required": [
"id",
"to",
"type",
"attributedTo",
"content"
],
"title": "Object",
"type": "object"
}
},
"additionalProperties": false,
"description": "This represents a first draft of a json-schema that every activities exchanged between servers MUST satisfy and be able to parse. Here 'being able to parse' means making it to the point, where depending on the type, you decide what side effects to perform.\n\nGenerally, the fields actor, to, and cc (and maybe bcc --- not transported) represent how the message is being delivered. The fields actor, type, object, target, content represent how the message is processed by the server.",
"properties": {
"@context": {
"anyOf": [
{
"type": "string"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"https://www.w3.org/ns/activitystreams",
[
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
]
],
"title": ""
},
"id": {
"description": "id of the activity or object, can be assumed to be globally unique. Some activities such as a Follow request will require an id to be valid. Servers may assume an id to be required. As assigning an id is 'trivial', one should assign one.",
"examples": [
"https://actor.example/some_id"
],
"title": "",
"type": "string"
},
"to": {
"description": "Array of actors this activity or object is addressed to. It is sane to assume that an activity is addressed to at least one person.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"minItems": 1,
"title": "",
"type": "array"
},
"cc": {
"default": [],
"description": "Array of actors this activity or object is carbon copied to.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"title": "",
"type": "array"
},
"published": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Moment of this activity or object being published",
"title": ""
},
"type": {
"description": "Type of the activity or activity. Side effects of this activity are determine by this type.",
"examples": [
"Follow",
"Accept",
"Create",
"Undo",
"Like",
"Note"
],
"title": "",
"type": "string"
},
"actor": {
"description": "\n id of the actor performing this activity. One can assume that the activity is signed by this actor (in some form).\n ",
"examples": [
"https://actor.example/"
],
"title": "",
"type": "string"
},
"object": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/Object"
},
{
"type": "null"
}
],
"default": null,
"title": ""
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "\n The target, not sure if needed, included for completeness\n ",
"examples": [
"https://other.example/target_id",
{
"content": "meow",
"type": "Note"
}
],
"title": ""
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The content used for example to represent the Emote for a like",
"examples": [
"\ud83d\udc2e",
"\u2764\ufe0f"
],
"title": ""
}
},
"required": [
"id",
"to",
"type",
"actor"
],
"title": "Activity",
"type": "object"
}
Actor
{
"$defs": {
"PropertyValue": {
"description": "Key value pairs in the attachment of an actor\nas used by Mastodon",
"properties": {
"type": {
"default": "PropertyValue",
"description": "Fixed type for serialization",
"title": "Type",
"type": "string"
},
"name": {
"description": "Key of the value",
"examples": [
"Pronouns"
],
"title": "Name",
"type": "string"
},
"value": {
"description": "Value",
"examples": [
"They/them"
],
"title": "Value",
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "PropertyValue",
"type": "object"
}
},
"additionalProperties": false,
"description": "Describes an ActivityPub actor",
"properties": {
"inbox": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The inbox of the actor",
"examples": [
"https://actor.example/inbox"
],
"title": ""
},
"outbox": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The outbox of the actor",
"examples": [
"https://actor.example/outbox"
],
"title": ""
},
"followers": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The followers collection of the actor",
"examples": [
"https://actor.example/followers"
],
"title": ""
},
"following": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The following collection of the actor",
"examples": [
"https://actor.example/following"
],
"title": ""
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of the actor",
"examples": [
"My Fediverse account"
],
"title": ""
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name of the actor",
"examples": [
"Alice"
],
"title": ""
},
"url": {
"default": [],
"description": "A list of urls that expand on the content of the object",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "",
"type": "array"
},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"https://www.w3.org/ns/activitystreams",
[
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
]
],
"title": ""
},
"id": {
"description": "id of the activity or object, can be assumed to be globally unique. Some activities such as a Follow request will require an id to be valid. Servers may assume an id to be required. As assigning an id is 'trivial', one should assign one.",
"examples": [
"https://actor.example/some_id"
],
"title": "",
"type": "string"
},
"type": {
"description": "The type of Actor",
"examples": [
"Person",
"Service",
"Application"
],
"title": "",
"type": "string"
},
"icon": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The avatar of the actor",
"examples": [
{
"type": "Image",
"url": "https://actor.example/icon.png"
}
],
"title": ""
},
"alsoKnownAs": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Other uris associated with the actor",
"examples": [
[
"https://alice.example",
"https://alice.example/profile"
]
],
"title": ""
},
"attachments": {
"anyOf": [
{
"items": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/PropertyValue"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "attachments ... currently used for property values",
"title": ""
},
"preferredUsername": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"john"
],
"title": ""
},
"identifiers": {
"default": [],
"description": "An ordered list of identifiers",
"items": {
"type": "string"
},
"title": "",
"type": "array"
}
},
"required": [
"id",
"type"
],
"title": "Actor",
"type": "object"
}
Collection
{
"additionalProperties": false,
"description": "Abstracts all the ActivityPub collection concepts",
"properties": {
"@context": {
"anyOf": [
{
"type": "string"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"https://www.w3.org/ns/activitystreams",
[
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
]
],
"title": ""
},
"id": {
"description": "id of the activity or object, can be assumed to be globally unique. Some activities such as a Follow request will require an id to be valid. Servers may assume an id to be required. As assigning an id is 'trivial', one should assign one.",
"examples": [
"https://actor.example/some_id"
],
"title": "",
"type": "string"
},
"type": {
"description": "Type of object",
"examples": [
"Collection",
"OrderedCollection",
"CollectionPage",
"OrdererCollectionPage"
],
"title": "",
"type": "string"
},
"items": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The items",
"title": ""
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": ""
},
"prev": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": ""
},
"first": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": ""
},
"last": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": ""
},
"totalItems": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": ""
}
},
"required": [
"id",
"type"
],
"title": "Collection",
"type": "object"
}
Object
{
"additionalProperties": false,
"properties": {
"updated": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Moment of this object being updated",
"title": ""
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The summary of the object",
"title": ""
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the object",
"title": ""
},
"inReplyTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The object being replied to. Currently a string. Not sure if this is what I want.",
"title": ""
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The context of the object",
"title": ""
},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"https://www.w3.org/ns/activitystreams",
[
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
]
],
"title": ""
},
"id": {
"description": "id of the activity or object, can be assumed to be globally unique. Some activities such as a Follow request will require an id to be valid. Servers may assume an id to be required. As assigning an id is 'trivial', one should assign one.",
"examples": [
"https://actor.example/some_id"
],
"title": "",
"type": "string"
},
"to": {
"description": "Array of actors this activity or object is addressed to. It is sane to assume that an activity is addressed to at least one person.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"minItems": 1,
"title": "",
"type": "array"
},
"cc": {
"default": [],
"description": "Array of actors this activity or object is carbon copied to.",
"examples": [
[
"https://bob.example"
],
[
"https://alice.example",
"https://bob.example"
]
],
"items": {
"type": "string"
},
"title": "",
"type": "array"
},
"published": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Moment of this activity or object being published",
"title": ""
},
"type": {
"description": "Type of the activity or activity. Side effects of this activity are determine by this type.",
"examples": [
"Follow",
"Accept",
"Create",
"Undo",
"Like",
"Note"
],
"title": "",
"type": "string"
},
"attributedTo": {
"description": "id of the actor that authored this object",
"examples": [
"https://actor.example/"
],
"title": "",
"type": "string"
},
"content": {
"description": "The content of the object",
"title": "",
"type": "string"
},
"attachment": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of objects that are attached to the original object",
"title": ""
},
"tag": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of objects that expand on the content of the object",
"title": ""
},
"url": {
"default": [],
"description": "A list of urls that expand on the content of the object",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "",
"type": "array"
},
"sensitive": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "\n Marks the object as sensitive. Currently, used by everyone, a better way would be an element of the tag list that labels the object as sensitive due a reason\n ",
"title": ""
}
},
"required": [
"id",
"to",
"type",
"attributedTo",
"content"
],
"title": "Object",
"type": "object"
}