refactor: 📝 Update all extension to remove now-useless fields

This commit is contained in:
Jesse Wierzbinski 2025-05-05 14:08:20 +02:00
parent 51c53824ad
commit d886b83e62
No known key found for this signature in database
27 changed files with 166 additions and 410 deletions

View file

@ -7,8 +7,6 @@ export const metadata = {
Collections are a way to represent paginated groups of entities. They are used everywhere lists of entities can be found, such as a user's outbox. {{ className: 'lead' }}
Pages should be limited to a reasonable number of entities, such as 20 or 80.
<Note>
As Collections are independent and not part of a larger entity (like [ContentFormat](/structures/content-format)), they should have a valid [Signature](/signatures).
</Note>
@ -21,28 +19,9 @@ Pages should be limited to a reasonable number of entities, such as 20 or 80.
<Property name="author" type="URI | null" required={true} typeLink="/types#uri">
Author of the collection. Usually the user who owns the collection. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author).
</Property>
<Property name="first" type="URI" required={true} typeLink="/types#uri">
URI to the first page of the collection. Query parameters are allowed.
</Property>
<Property name="last" type="URI" required={true} typeLink="/types#uri">
URI to the last page of the collection. Query parameters are allowed.
If the collection only has one page, this should be the same as `first`.
</Property>
<Property name="total" type="number" required={true} numberType="u64">
Total number of entities in the collection, across all pages.
</Property>
<Property name="next" type="URI" required={false} typeLink="/types#uri">
URI to the next page of the collection. Query parameters are allowed.
If there is no next page, this should be `null`.
</Property>
<Property name="previous" type="URI" required={false} typeLink="/types#uri">
URI to the previous page of the collection. Query parameters are allowed.
If there is no previous page, this should be `null`.
</Property>
<Property name="items" type="Entity[]" required={true}>
Collection contents. Must be an array of entities.
</Property>
@ -54,11 +33,7 @@ Pages should be limited to a reasonable number of entities, such as 20 or 80.
```jsonc {{ 'title': 'Example Collection' }}
{
"author": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771",
"first": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771/outbox?page=1",
"last": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771/outbox?page=3",
"total": 46,
"next": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771/outbox?page=2",
"previous": null,
"items": [
{
"id": "456df8ed-daf1-4062-abab-491071c7b8dd",
@ -92,27 +67,9 @@ URI Collections are identical to regular collections, but they contain only URIs
<Property name="author" type="URI | null" required={true} typeLink="/types#uri">
Author of the collection. Usually the user who owns the collection. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author).
</Property>
<Property name="first" type="URI" required={true} typeLink="/types#uri">
URI to the first page of the collection. Query parameters are allowed.
</Property>
<Property name="last" type="URI" required={true} typeLink="/types#uri">
URI to the last page of the collection. Query parameters are allowed.
If the collection only has one page, this should be the same as `first`.
</Property>
<Property name="total" type="number" required={true} numberType="u64">
Total number of entities in the collection, across all pages.
</Property>
<Property name="next" type="URI" required={false} typeLink="/types#uri">
URI to the next page of the collection. Query parameters are allowed.
If there is no next page, this should be `null`.
</Property>
<Property name="previous" type="URI" required={false} typeLink="/types#uri">
URI to the previous page of the collection. Query parameters are allowed.
If there is no previous page, this should be `null`.
</Property>
<Property name="items" type="URI[]" required={true}>
Collection contents. Must be an array of URIs.
</Property>