docs: 📝 Complete more User info

This commit is contained in:
Jesse Wierzbinski 2024-07-22 19:03:27 +02:00
parent 654ad3345d
commit cf4f4ee727
No known key found for this signature in database

View file

@ -5,6 +5,8 @@ export const metadata = {
# Users
The `User` entity represents an account on a Lysand instance. Users can post [Notes](/entities/notes), follow other users, and interact with content. Users are identified by their `id` property, which is unique within the instance. {{ className: 'lead' }}
## Entity Definition
<Row>
@ -12,16 +14,16 @@ export const metadata = {
<Properties>
<Property name="avatar" type="ContentFormat" required={true}>
The user's avatar.
The user's avatar. Must be an image format (`image/*`).
</Property>
<Property name="bio" type="ContentFormat" required={true}>
Short description of the user.
Short description of the user. Must be text format (`text/*`).
</Property>
<Property name="display_name" type="string" required={false}>
Display name, as shown to other users. May contain emojis and any Unicode character.
</Property>
<Property name="fields" type="Field[]" required={false}>
Custom key/value pairs. For example, metadata like socials or pronouns.
Custom key/value pairs. For example, metadata like socials or pronouns. Must be text format (`text/*`).
```typescript
type Field = {
@ -31,12 +33,12 @@ export const metadata = {
```
</Property>
<Property name="username" type="string" required={true}>
Alpha-numeric username. Must be unique within the instance.
Alpha-numeric username. Must be unique within the instance. **Must** be treated as changeable by the user.
Can only contain the following characters: `a-z` (lowercase), `0-9`, `_` and `-`. Should be limited to reasonable lengths.
</Property>
<Property name="header" type="ContentFormat" required={false}>
A header image for the user's profile. Also known as a cover photo or a banner.
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 [Lysand Public Key](/signatures) format. `actor` may be a URI to another user's profile, in which case this key may allow the user to act on behalf of the other user (see [delegation](/delegation)).