fix: 📝 Add more information on what a transient entity is

This commit is contained in:
Jesse Wierzbinski 2024-12-10 17:44:51 +01:00
parent 29f7ccba99
commit 46297d538c
No known key found for this signature in database
10 changed files with 21 additions and 15 deletions

View file

@ -5,7 +5,7 @@ export const metadata = {
# Delete # Delete
Signals the deletion of an entity. It is a **transient entity**. {{ className: 'lead' }} Signals the deletion of an entity. It is a [**Transient Entity**](/entities#transient-entities). {{ className: 'lead' }}
## Authorization ## Authorization
@ -21,7 +21,7 @@ Having the authorization is defined as:
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="author" type="URI | null" required={true} typeLink="/types#uri"> <Property name="author" type="URI | null" required={true} typeLink="/types#uri">
URI of the `User` who is deleting the entity. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author). URI of the `User` who is deleting the entity. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author).

View file

@ -15,7 +15,7 @@ export const metadata = {
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="author" type="URI" required={true} typeLink="/types#uri"> <Property name="author" type="URI" required={true} typeLink="/types#uri">
URI of the `User` considered the 'followee', i.e. the user who is being followed. URI of the `User` considered the 'followee', i.e. the user who is being followed.

View file

@ -25,7 +25,7 @@ But it can also be used when Bob is already following Alice, in the case that:
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="author" type="URI" required={true} typeLink="/types#uri"> <Property name="author" type="URI" required={true} typeLink="/types#uri">
URI of the `User` considered the 'followee', i.e. the user who is being followed. URI of the `User` considered the 'followee', i.e. the user who is being followed.

View file

@ -57,7 +57,7 @@ Once a follow relationship is established, the **followee**'s instance should se
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="author" type="URI" required={true} typeLink="/types#uri"> <Property name="author" type="URI" required={true} typeLink="/types#uri">
URI of the `User` considered the 'follower'. URI of the `User` considered the 'follower'.

View file

@ -83,7 +83,7 @@ Indicates that a [User](/entities/user) wishes to subscribe to a group.
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="subscriber" type="URI" required={true} typeLink="/types#uri"> <Property name="subscriber" type="URI" required={true} typeLink="/types#uri">
URI of the [User](/entities/user) subscribing to the group. URI of the [User](/entities/user) subscribing to the group.
@ -117,7 +117,7 @@ Indicates that a [User](/entities/user) wishes to unsubscribe from a group.
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="subscriber" type="URI" required={true} typeLink="/types#uri"> <Property name="subscriber" type="URI" required={true} typeLink="/types#uri">
URI of the [User](/entities/user) unsubscribing from the group. URI of the [User](/entities/user) unsubscribing from the group.
@ -151,7 +151,7 @@ Indicates that a [Group](#entity-definition) has accepted a [User](/entities/use
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="subscriber" type="URI" required={true} typeLink="/types#uri"> <Property name="subscriber" type="URI" required={true} typeLink="/types#uri">
URI of the [User](/entities/user) subscribing to the group. URI of the [User](/entities/user) subscribing to the group.
@ -185,7 +185,7 @@ Indicates that a [Group](#entity-definition) has rejected a [User](/entities/use
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="subscriber" type="URI" required={true} typeLink="/types#uri"> <Property name="subscriber" type="URI" required={true} typeLink="/types#uri">
URI of the [User](/entities/user) subscribing to the group. URI of the [User](/entities/user) subscribing to the group.
@ -227,7 +227,7 @@ The `GroupFederate` entity allows a group to federate a note to all of its membe
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="note" type="URI" required={true} typeLink="/types#uri"> <Property name="note" type="URI" required={true} typeLink="/types#uri">
URI of the note to federate. URI of the note to federate.

View file

@ -35,7 +35,7 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
URI of the entity. Should be unique and resolve to the entity. Must be an absolute URI. URI of the entity. Should be unique and resolve to the entity. Must be an absolute URI.
<Note> <Note>
**Transient Entities** do not require a URI. [**Transient Entities**](/entities#transient-entities) do not require a URI.
</Note> </Note>
</Property> </Property>
<Property name="$schema" type="string" required={false}> <Property name="$schema" type="string" required={false}>
@ -86,6 +86,12 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
</Col> </Col>
</Row> </Row>
## Transient Entities
Some entities are transient, meaning they do not have a URI. These entities are used for actions that do not require a permanent record, such as deletions or migrations.
Implementations **must not** rely on other implementations to store transient entities in their database.
## Serialization ## Serialization
When serialized to a string, the JSON representation of an entity must follow the following rules: When serialized to a string, the JSON representation of an entity must follow the following rules:

View file

@ -30,7 +30,7 @@ Sometimes, [Users](/entities/user) want to unsubscribe from each other to stop s
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="author" type="URI" required={true} typeLink="/types#uri"> <Property name="author" type="URI" required={true} typeLink="/types#uri">
URI of the `User` considered the 'follower', i.e. the user who is unsubscribing from the followee. URI of the `User` considered the 'follower', i.e. the user who is unsubscribing from the followee.

View file

@ -34,7 +34,7 @@ Migration happens in three steps:
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="type" type="string" required={true}> <Property name="type" type="string" required={true}>
Must be `pub.versia:migration/Migration`. Must be `pub.versia:migration/Migration`.

View file

@ -15,7 +15,7 @@ When an instance receives a report, it *should* be reviewed by a moderator or ad
<Col> <Col>
<Properties> <Properties>
<Property name="uri" type="null" required={false}> <Property name="uri" type="null" required={false}>
This is a **Transient Entity** and does not have a URI. This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
</Property> </Property>
<Property name="type" type="string" required={true}> <Property name="type" type="string" required={true}>
Must be `pub.versia:reports/Report`. Must be `pub.versia:reports/Report`.

View file

@ -35,7 +35,7 @@ The words **MUST**, **MUST NOT**, **SHOULD**, **SHOULD NOT**, and **MAY** are us
The Versia Protocol uses the following terms: The Versia Protocol uses the following terms:
- **Entity**: A generic term for any JSON object in the protocol, such as a [User](./entities/user), a [Note](./entities/note), or a [Like](./extensions/likes). Entities are uniquely identified by their `id` property. - **Entity**: A generic term for any JSON object in the protocol, such as a [User](./entities/user), a [Note](./entities/note), or a [Like](./extensions/likes). Entities are uniquely identified by their `id` property.
- **Transient Entity**: A type of **Entity** that is not meant to be stored permanently or referenced by other entities. - [**Transient Entity**](/entities#transient-entities): A type of **Entity** that is not meant to be stored permanently or referenced by other entities.
- **Implementation**: A software application that implements the Versia Protocol. - **Implementation**: A software application that implements the Versia Protocol.
- **Instance**: An application deploying an **Implementation**. - **Instance**: An application deploying an **Implementation**.
- Using the same nomenclature, an ActivityPub Implementation would be `Mastodon`, and an Instance would be `mastodon.social`. - Using the same nomenclature, an ActivityPub Implementation would be `Mastodon`, and an Instance would be `mastodon.social`.