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

@ -70,64 +70,12 @@ Instance **must** be the host of the instance the user is on (hostname with opti
<Property name="header" type="ContentFormat" required={false} typeLink="/structures/content-format">
A header image for the user's profile. Also known as a cover photo or a banner. Must be an image format (`image/*`).
</Property>
<Property name="public_key" type="PublicKey" required={true}>
The user's public key. Must follow the [Versia Public Key](/signatures) format. `actor` may be a URI to another user's profile, in which case this key may allow the other user act on behalf of this user (see [delegation](/federation/delegation)).
- `algorithm`: Must be `ed25519` for now.
- `key`: The public key in [SPKI-encoded base64](/signatures#exporting-the-public-key). Must be the key associated with the `actor` URI.
- `actor`: URI to a user's profile, most often the user's own profile.
```typescript
type URI = string;
type PublicKey = {
actor: URI;
algorithm: string;
key: string;
}
```
</Property>
<Property name="manually_approves_followers" type="boolean" required={false}>
If `true`, the user must approve any new followers manually. If `false`, followers are automatically approved. This does not affect federation, and is meant to be used for clients to display correct UI. Defaults to `false`.
</Property>
<Property name="indexable" type="boolean" required={false}>
User consent to be indexed by search engines. If `false`, the user's profile should not be indexed. Defaults to `true`.
</Property>
<Property name="inbox" type="URI" required={true} typeLink="/types#uri">
The user's federation inbox. Refer to the [federation documentation](/federation).
Some instances may also have a shared inbox. Refer to [Instance Metadata](/entities/instance-metadata) for more information.
</Property>
<Property name="collections" type="UserCollections" required={true}>
Collections related to the user. Must contain at least `outbox`, `followers`, `following`, and `featured`.
```typescript
type URI = string;
type UserCollections = {
outbox: URI;
followers: URI;
following: URI;
featured: URI;
// Same format as type on Extensions
[key: ExtensionsKey]: URI;
}
```
All URIs must resolve to either a [Collection](/structures/collection) or a [URI Collection](/structures/collection#uri-collection) of the appropriate entities. Extensions may add additional collections.
### Outbox
The user's federation outbox. Refer to the [federation documentation](/federation). [Collection](/structures/collection) of [Note](/entities/note) entities.
### Followers
User's followers. [URI Collection](/structures/collection#uri-collection) of [User](/entities/user) entities.
### Following
Users that the user follows. [URI Collection](/structures/collection#uri-collection) of [User](/entities/user) entities.
### Featured
[Notes](/entities/note) that the user wants to feature (also known as "pin") on their profile. [Collection](/structures/collection) of [Note](/entities/note) entities. Only notes authored by the user can be featured.
</Property>
</Properties>
</Col>
@ -174,14 +122,20 @@ Instance **must** be the host of the instance the user is on (hostname with opti
"header": null,
"indexable": false,
"manually_approves_followers": false,
"public_key": {
"actor": "018ec082-0ae1-761c-b2c5-22275a611771",
"algorithm": "ed25519",
"key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"username": "aprl"
}
```
</Col>
</Row>
### Collections
The following [Collections](/structures/collection) are available:
- `outbox`: [Collection](/structures/collection) of notes authored by the user.
- `followers`: [URI Collection](/structures/collection#uri-collection) of users that follow the user.
- `following`: [URI Collection](/structures/collection#uri-collection) of users that the user follows.
- `featured`: [Collection](/structures/collection) of notes that the user wants to feature on their profile ("pinned" notes).
These can be fetched using the [Federation API](/api/endpoints#entity-collections)