summaryrefslogtreecommitdiff
path: root/src/models/repositories/federation-instance.ts
blob: c6b08dc101eaec8f051a2fd9cce6670d2dd0d61d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import config from '../../config';

export const packedFederationInstanceSchema = {
	type: 'object' as const,
	optional: false as const, nullable: false as const,
	properties: {
		id: {
			type: 'string' as const,
			optional: false as const, nullable: false as const,
			format: 'id'
		},
		caughtAt: {
			type: 'string' as const,
			optional: false as const, nullable: false as const,
			format: 'date-time'
		},
		host: {
			type: 'string' as const,
			optional: false as const, nullable: false as const,
			example: 'misskey.example.com'
		},
		usersCount: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		notesCount: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		followingCount: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		followersCount: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		driveUsage: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		driveFiles: {
			type: 'number' as const,
			optional: false as const, nullable: false as const
		},
		latestRequestSentAt: {
			type: 'string' as const,
			optional: false as const, nullable: true as const,
			format: 'date-time'
		},
		lastCommunicatedAt: {
			type: 'string' as const,
			optional: false as const, nullable: false as const,
			format: 'date-time'
		},
		isNotResponding: {
			type: 'boolean' as const,
			optional: false as const, nullable: false as const
		},
		isSuspended: {
			type: 'boolean' as const,
			optional: false as const, nullable: false as const
		},
		softwareName: {
			type: 'string' as const,
			optional: false as const, nullable: true as const,
			example: 'misskey'
		},
		softwareVersion: {
			type: 'string' as const,
			optional: false as const, nullable: true as const,
			example: config.version
		},
		openRegistrations: {
			type: 'boolean' as const,
			optional: false as const, nullable: true as const,
			example: true
		},
		name: {
			type: 'string' as const,
			optional: false as const, nullable: true as const
		},
		description: {
			type: 'string' as const,
			optional: false as const, nullable: true as const
		},
		maintainerName: {
			type: 'string' as const,
			optional: false as const, nullable: true as const
		},
		maintainerEmail: {
			type: 'string' as const,
			optional: false as const, nullable: true as const
		},
		iconUrl: {
			type: 'string' as const,
			optional: false as const, nullable: true as const,
			format: 'url'
		},
		infoUpdatedAt: {
			type: 'string' as const,
			optional: false as const, nullable: true as const,
			format: 'date-time'
		}
	}
};