feat: Make Deletes also contain a deleted_type attribute

This commit is contained in:
Jesse Wierzbinski 2024-08-22 21:58:16 +02:00
parent b2ce198d43
commit 2845fd01fc
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View file

@ -26,6 +26,9 @@ Having the authorization is defined as:
<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).
</Property> </Property>
<Property name="deleted_type" type="string" required={true}>
Type of the entity being deleted. In case of extensions, use the entity's `extension_type`.
</Property>
<Property name="target" type="URI" required={true} typeLink="/types#uri"> <Property name="target" type="URI" required={true} typeLink="/types#uri">
URI of the entity being deleted. URI of the entity being deleted.
</Property> </Property>
@ -40,6 +43,7 @@ Having the authorization is defined as:
"id": "9b3212b8-529c-435a-8798-09ebbc17ca74", "id": "9b3212b8-529c-435a-8798-09ebbc17ca74",
"created_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z",
"author": "https://example.com/users/6e0204a2-746c-4972-8602-c4f37fc63bbe", "author": "https://example.com/users/6e0204a2-746c-4972-8602-c4f37fc63bbe",
"deleted_type": "Note",
"deleted": "https://example.com/notes/02e1e3b2-cb1f-4e4a-b82e-98866bee5de7" "deleted": "https://example.com/notes/02e1e3b2-cb1f-4e4a-b82e-98866bee5de7"
} }
``` ```

View file

@ -51,6 +51,7 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
"type": "Delete", "type": "Delete",
"created_at": "2022-01-01T12:00:00Z", "created_at": "2022-01-01T12:00:00Z",
"author": "https://bongo.social/users/63a00ab3-39b1-49eb-b88e-ed65d2361f3e", "author": "https://bongo.social/users/63a00ab3-39b1-49eb-b88e-ed65d2361f3e",
"deleted_type": "Note",
"deleted": "https://bongo.social/notes/54059ce2-9332-46fa-bf6a-598b5493b81b", "deleted": "https://bongo.social/notes/54059ce2-9332-46fa-bf6a-598b5493b81b",
} }
``` ```