diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-11 11:27:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-11 11:32:31 +0200 |
commit | 2b02c520e66ea452687cab39401b371711caa9ed (patch) | |
tree | ecc216ee5a7453384ee1aad6e3a825b1c058f001 /shared/models/nodeinfo/nodeinfo.model.ts | |
parent | 7d9ba5c08999c6482f0bc5e0c09c6f55b7724090 (diff) | |
download | PeerTube-2b02c520e66ea452687cab39401b371711caa9ed.tar.gz PeerTube-2b02c520e66ea452687cab39401b371711caa9ed.tar.zst PeerTube-2b02c520e66ea452687cab39401b371711caa9ed.zip |
Cleanup shared models
Diffstat (limited to 'shared/models/nodeinfo/nodeinfo.model.ts')
-rw-r--r-- | shared/models/nodeinfo/nodeinfo.model.ts | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/shared/models/nodeinfo/nodeinfo.model.ts b/shared/models/nodeinfo/nodeinfo.model.ts new file mode 100644 index 000000000..336cb66d2 --- /dev/null +++ b/shared/models/nodeinfo/nodeinfo.model.ts | |||
@@ -0,0 +1,117 @@ | |||
1 | /** | ||
2 | * NodeInfo schema version 2.0. | ||
3 | */ | ||
4 | export interface HttpNodeinfoDiasporaSoftwareNsSchema20 { | ||
5 | /** | ||
6 | * The schema version, must be 2.0. | ||
7 | */ | ||
8 | version: '2.0' | ||
9 | /** | ||
10 | * Metadata about server software in use. | ||
11 | */ | ||
12 | software: { | ||
13 | /** | ||
14 | * The canonical name of this server software. | ||
15 | */ | ||
16 | name: string | ||
17 | /** | ||
18 | * The version of this server software. | ||
19 | */ | ||
20 | version: string | ||
21 | } | ||
22 | /** | ||
23 | * The protocols supported on this server. | ||
24 | */ | ||
25 | protocols: ( | ||
26 | | 'activitypub' | ||
27 | | 'buddycloud' | ||
28 | | 'dfrn' | ||
29 | | 'diaspora' | ||
30 | | 'libertree' | ||
31 | | 'ostatus' | ||
32 | | 'pumpio' | ||
33 | | 'tent' | ||
34 | | 'xmpp' | ||
35 | | 'zot')[] | ||
36 | /** | ||
37 | * The third party sites this server can connect to via their application API. | ||
38 | */ | ||
39 | services: { | ||
40 | /** | ||
41 | * The third party sites this server can retrieve messages from for combined display with regular traffic. | ||
42 | */ | ||
43 | inbound: ('atom1.0' | 'gnusocial' | 'imap' | 'pnut' | 'pop3' | 'pumpio' | 'rss2.0' | 'twitter')[] | ||
44 | /** | ||
45 | * The third party sites this server can publish messages to on the behalf of a user. | ||
46 | */ | ||
47 | outbound: ( | ||
48 | | 'atom1.0' | ||
49 | | 'blogger' | ||
50 | | 'buddycloud' | ||
51 | | 'diaspora' | ||
52 | | 'dreamwidth' | ||
53 | | 'drupal' | ||
54 | | 'facebook' | ||
55 | | 'friendica' | ||
56 | | 'gnusocial' | ||
57 | | 'google' | ||
58 | | 'insanejournal' | ||
59 | | 'libertree' | ||
60 | | 'linkedin' | ||
61 | | 'livejournal' | ||
62 | | 'mediagoblin' | ||
63 | | 'myspace' | ||
64 | | 'pinterest' | ||
65 | | 'pnut' | ||
66 | | 'posterous' | ||
67 | | 'pumpio' | ||
68 | | 'redmatrix' | ||
69 | | 'rss2.0' | ||
70 | | 'smtp' | ||
71 | | 'tent' | ||
72 | | 'tumblr' | ||
73 | | 'twitter' | ||
74 | | 'wordpress' | ||
75 | | 'xmpp')[] | ||
76 | } | ||
77 | /** | ||
78 | * Whether this server allows open self-registration. | ||
79 | */ | ||
80 | openRegistrations: boolean | ||
81 | /** | ||
82 | * Usage statistics for this server. | ||
83 | */ | ||
84 | usage: { | ||
85 | /** | ||
86 | * statistics about the users of this server. | ||
87 | */ | ||
88 | users: { | ||
89 | /** | ||
90 | * The total amount of on this server registered users. | ||
91 | */ | ||
92 | total?: number | ||
93 | /** | ||
94 | * The amount of users that signed in at least once in the last 180 days. | ||
95 | */ | ||
96 | activeHalfyear?: number | ||
97 | /** | ||
98 | * The amount of users that signed in at least once in the last 30 days. | ||
99 | */ | ||
100 | activeMonth?: number | ||
101 | } | ||
102 | /** | ||
103 | * The amount of posts that were made by users that are registered on this server. | ||
104 | */ | ||
105 | localPosts?: number | ||
106 | /** | ||
107 | * The amount of comments that were made by users that are registered on this server. | ||
108 | */ | ||
109 | localComments?: number | ||
110 | } | ||
111 | /** | ||
112 | * Free form key value pairs for software specific values. Clients should not rely on any specific key present. | ||
113 | */ | ||
114 | metadata: { | ||
115 | [k: string]: any | ||
116 | } | ||
117 | } | ||