mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 22:38:19 +01:00
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
export const metadata = {
|
|
title: 'Delete',
|
|
description: 'Deletes are used to remove entities from the system',
|
|
}
|
|
|
|
# Delete
|
|
|
|
Signals the deletion of an entity. {{ className: 'lead' }}
|
|
|
|
## Authorization
|
|
|
|
Implementations **must** ensure that the author of the `Delete` entity has the authorization to delete the target entity.
|
|
|
|
Having the authorization is defined as:
|
|
- The author is the creator of the target entity (including [delegation](/extensions/delegation)).
|
|
- The author is the instance.
|
|
|
|
## Entity Definition
|
|
|
|
<Warning>
|
|
This entity is a [**Transient Entity**](/entities#transient-entities).
|
|
</Warning>
|
|
|
|
<Row>
|
|
<Col>
|
|
<Properties name="Delete">
|
|
<Property name="author" type="Reference" required={true} typeLink="/types#reference">
|
|
[Reference](/types#reference) to the `User` who is deleting the entity.
|
|
</Property>
|
|
<Property name="deleted_type" type="string" required={true}>
|
|
Type of the entity being deleted.
|
|
</Property>
|
|
<Property name="deleted" type="Reference" required={true} typeLink="/types#reference">
|
|
[Reference](/types#reference) to the entity being deleted.
|
|
</Property>
|
|
</Properties>
|
|
</Col>
|
|
|
|
<Col sticky>
|
|
|
|
```jsonc {{ title: 'Example Delete' }}
|
|
{
|
|
"type": "Delete",
|
|
"created_at": "2021-01-01T00:00:00.000Z",
|
|
"author": "6e0204a2-746c-4972-8602-c4f37fc63bbe",
|
|
"deleted_type": "Note",
|
|
"deleted": "02e1e3b2-cb1f-4e4a-b82e-98866bee5de7"
|
|
}
|
|
```
|
|
|
|
</Col>
|
|
</Row> |