From 8de6686a9a1ed05a3d2ef0b05ea7c6b9fe315c39 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 14 Aug 2024 16:12:49 +0200 Subject: [PATCH] feat: :memo: Document ServerMetadata --- app/entities/server-metadata/page.mdx | 131 ++++++++++++++++++++++++++ app/entities/user/page.mdx | 2 +- app/federation/discovery/page.mdx | 8 +- components/Navigation.tsx | 1 + 4 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 app/entities/server-metadata/page.mdx diff --git a/app/entities/server-metadata/page.mdx b/app/entities/server-metadata/page.mdx new file mode 100644 index 0000000..189a689 --- /dev/null +++ b/app/entities/server-metadata/page.mdx @@ -0,0 +1,131 @@ +export const metadata = { + title: 'Server Metadata', + description: 'Metadata about a Versia instance, such as capabilities and endpoints.', +} + +# Server Metadata + +Contains metadata about a Versia instance, such as capabilities and endpoints. {{ className: 'lead' }} + +Not to be confused with [Server Actor](/entities/server-actor), which is a User representing an instance in the federation. + + + This entity is only used as part of [Server Discovery](/federation/discovery#server-discovery), and not as part of federation. + + +## Entity Definition + + + + + + This entity does not have an ID. + + + This entity does not have a URI. + + + Friendly name of the instance, for humans. + + + Information about the software running the instance. + + ```typescript + type Software = { + name: string; + version: string; + } + ``` + + - `name`: Name of the software. + - `version`: Version of the software. Should use [SemVer](https://semver.org/). + + + Information about the compatibility of the instance. + + ```typescript + type Compatibility = { + versions: string[]; + extensions: string[]; + } + ``` + + - `versions`: Supported Versia Protocol versions. + - Versions marked as "Working Draft X" are represented as `0.X`. + - `extensions`: Supported extensions. + + + Long description of the instance, for humans. Should be around 100-200 words. + + + Hostname of the instance. Includes the port if it is not the default (i.e. `443` for HTTPS). + + + URI to the instance's shared inbox, if supported. + + + URI to [Collection](/structures/collection) of instance moderators. + + + This is for human consumption (such as moderator contact), not for any kind of protocol authorization. + + + + URI to [Collection](/structures/collection) of instance administrators. + + + This is for human consumption (such as admin contact), not for any kind of protocol authorization. + + + + Logo of the instance. Must be an image format (`image/*`). + + + Banner of the instance. Must be an image format (`image/*`). + + + + + + + ```jsonc {{ 'title': 'ServerMetadata' }} + { + "type": "ServerMetadata", + "name": "Jim's Jolly Jimjams", + "software": { + "name": "Versia Server", + "version": "1.2.0-beta.3" + }, + "compatibility": { + "versions": [ + "0.3.0", + "0.4.0" + ], + "extensions": [ + "pub.versia:reactions", + "pub.versia:polls", + "pub.versia:reports" + ] + }, + "description": "Server for Jim's Jolly Jimjams, a social network for fans of Jimjams.", + "host": "social.jimjams.com", + "shared_inbox": "https://social.jimjams.com/inbox", + "moderators": "https://social.jimjams.com/moderators", + "admins": "https://social.jimjams.com/admins", + "logo": { + "image/png": { + "content": "https://social.jimjams.com/files/logo.png" + }, + "image/webp": { + "content": "https://social.jimjams.com/files/logo.webp" + } + }, + "banner": null, + "extensions": { + "example.extension:monthly_active_users": 1000 + } + } + ``` + + + \ No newline at end of file diff --git a/app/entities/user/page.mdx b/app/entities/user/page.mdx index ca7c319..a7bc18d 100644 --- a/app/entities/user/page.mdx +++ b/app/entities/user/page.mdx @@ -91,7 +91,7 @@ Instance **must** be the host of the instance the user is on (hostname with opti The user's federation inbox. Refer to the [federation documentation](/federation). - Some instances may have a shared inbox, in which case that should be used instead. Refer to [Server Metadata](/entities/server-metadata) for more information. + Some instances may also have a shared inbox. Refer to [Server Metadata](/entities/server-metadata) for more information. Collections related to the user. Must contain at least `outbox`, `followers`, `following`, and `featured`. diff --git a/app/federation/discovery/page.mdx b/app/federation/discovery/page.mdx index 051278f..79aabb5 100644 --- a/app/federation/discovery/page.mdx +++ b/app/federation/discovery/page.mdx @@ -69,10 +69,10 @@ Accept: application/json "uri": "https://versia.social", "version": "3.2.0", "supported_extensions": [ - "org.lysand:reactions", - "org.lysand:polls", - "org.lysand:custom_emojis", - "org.lysand:is_cat" + "pub.versia:reactions", + "pub.versia:polls", + "pub.versia:custom_emojis", + "pub.versia:is_cat" ] } ``` \ No newline at end of file diff --git a/components/Navigation.tsx b/components/Navigation.tsx index f095e88..dd8e860 100644 --- a/components/Navigation.tsx +++ b/components/Navigation.tsx @@ -277,6 +277,7 @@ export const navigation: NavGroup[] = [ { title: "FollowAccept", href: "/entities/follow-accept" }, { title: "FollowReject", href: "/entities/follow-reject" }, { title: "Notes", href: "/entities/note" }, + { title: "ServerMetadata", href: "/entities/server-metadata" }, { title: "Unfollow", href: "/entities/unfollow" }, { title: "Users", href: "/entities/user" }, ],