summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/federation
diff options
context:
space:
mode:
authorGrapeApple0 <84321396+GrapeApple0@users.noreply.github.com>2023-12-21 16:57:05 +0900
committerGitHub <noreply@github.com>2023-12-21 16:57:05 +0900
commit79ca93cefb8c892556b49fe4055d397e2a56adcf (patch)
tree001d98fcbc5d17c33c02724f9618303fc14acbc3 /packages/backend/src/server/api/endpoints/federation
parentUpdate CHANGELOG.md (diff)
downloadsharkey-79ca93cefb8c892556b49fe4055d397e2a56adcf.tar.gz
sharkey-79ca93cefb8c892556b49fe4055d397e2a56adcf.tar.bz2
sharkey-79ca93cefb8c892556b49fe4055d397e2a56adcf.zip
enhance: api.jsonのレスポンスの内容を実際の内容に合わせる (#12723)
* Create packedAdSchema * admin/emoji/add * admin/get-user-ips * admin/roles/users * admin/get-index-stats * admin/accounts/find-by-email * fix type of admin/ad/list * federation/stats * endpoints * get-online-users-count * i/2fa/register-key * i/2fa/key-done * i/2fa/register * i/apps * i/authorized-apps * i/registry/get-all * i/registry/get * i/registry/get-detail * i/registry/key-with-type * i/registry/scopes-with-domain * i/update-email * i/move * i/webhooks/create * fix miss type * i/webhooks/show * i/webhooks/list * flash/create * roles/users * server-info * test * users/lists/get-memberships * users/achievements * fetch-rss * fetch-external-resources
Diffstat (limited to 'packages/backend/src/server/api/endpoints/federation')
-rw-r--r--packages/backend/src/server/api/endpoints/federation/stats.ts86
1 files changed, 86 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts
index e3ffea7b7e..6548142d41 100644
--- a/packages/backend/src/server/api/endpoints/federation/stats.ts
+++ b/packages/backend/src/server/api/endpoints/federation/stats.ts
@@ -18,6 +18,92 @@ export const meta = {
allowGet: true,
cacheSec: 60 * 60,
+
+ res: {
+ type: 'object',
+ optional: false,
+ nullable: false,
+ properties: {
+ topSubInstances: {
+ type: 'array',
+ optional: false,
+ nullable: false,
+ items: {
+ properties: {
+ id: { type: 'string' },
+ firstRetrievedAt: { type: 'string' },
+ host: { type: 'string' },
+ usersCount: { type: 'number' },
+ notesCount: { type: 'number' },
+ followingCount: { type: 'number' },
+ followersCount: { type: 'number' },
+ isNotResponding: { type: 'boolean' },
+ isSuspended: { type: 'boolean' },
+ isBlocked: { type: 'boolean' },
+ softwareName: { type: 'string' },
+ softwareVersion: { type: 'string' },
+ openRegistrations: { type: 'boolean' },
+ name: { type: 'string' },
+ description: { type: 'string' },
+ maintainerName: { type: 'string' },
+ maintainerEmail: { type: 'string' },
+ isSilenced: { type: 'boolean' },
+ iconUrl: { type: 'string' },
+ faviconUrl: { type: 'string' },
+ themeColor: { type: 'string' },
+ infoUpdatedAt: {
+ type: 'string',
+ nullable: true,
+ },
+ latestRequestReceivedAt: {
+ type: 'string',
+ nullable: true,
+ },
+ }
+ },
+ },
+ otherFollowersCount: { type: 'number' },
+ topPubInstances: {
+ type: 'array',
+ optional: false,
+ nullable: false,
+ items: {
+ properties: {
+ id: { type: 'string' },
+ firstRetrievedAt: { type: 'string' },
+ host: { type: 'string' },
+ usersCount: { type: 'number' },
+ notesCount: { type: 'number' },
+ followingCount: { type: 'number' },
+ followersCount: { type: 'number' },
+ isNotResponding: { type: 'boolean' },
+ isSuspended: { type: 'boolean' },
+ isBlocked: { type: 'boolean' },
+ softwareName: { type: 'string' },
+ softwareVersion: { type: 'string' },
+ openRegistrations: { type: 'boolean' },
+ name: { type: 'string' },
+ description: { type: 'string' },
+ maintainerName: { type: 'string' },
+ maintainerEmail: { type: 'string' },
+ isSilenced: { type: 'boolean' },
+ iconUrl: { type: 'string' },
+ faviconUrl: { type: 'string' },
+ themeColor: { type: 'string' },
+ infoUpdatedAt: {
+ type: 'string',
+ nullable: true,
+ },
+ latestRequestReceivedAt: {
+ type: 'string',
+ nullable: true,
+ },
+ }
+ },
+ },
+ otherFollowingCount: { type: 'number' },
+ },
+ }
} as const;
export const paramDef = {