Skip to content

Commit 3de6d40

Browse files
chore: update protocol
1 parent c6a500c commit 3de6d40

File tree

5 files changed

+321
-4
lines changed

5 files changed

+321
-4
lines changed

content/docs/protocol.auth.v1.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,18 @@ Begins an authentication session
111111
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>BeginAuthRequest
112112
Used in `BeginAuth` endpoint.
113113

114-
This item has no fields.
114+
<span class="h5" aria-level="5">Fields</span>
115+
###### <span class="codicon codicon-symbol-field symbol-field"></span>for_guest_token
116+
Type: optional `string`
117+
118+
If provided, this is the guest token
119+
for the account being upgraded from
120+
a guest account to a full account
121+
during the auth flow.
122+
123+
This token is provided by the server
124+
at the end of the auth flow that
125+
created the guest account.
115126

116127

117128
<br/>
@@ -246,6 +257,24 @@ user_id: the ID of the user you logged in as
246257
Type: optional `string`
247258

248259
session_token: the session token to use in authorization
260+
### <span class="codicon codicon-symbol-field symbol-field"></span>guest_token
261+
Type: optional `string`
262+
263+
A token allowing for this account to be upgraded to a
264+
"full" account by beginning an auth session and providing
265+
this token.
266+
267+
The guest token only exists to upgrade a guest account to a full
268+
account, and does not permit logging in with a guest account
269+
on more than one session.
270+
271+
A "guest token" MAY be provided to BeginAuth to begin
272+
an authorization process that will upgrade the guest account
273+
to a full account if completed successfully.
274+
This MUST only affect now being able to log
275+
into the account with more than one session, and MUST not
276+
change other information about the account, such as username
277+
and password.
249278

250279
------
251280
## <span class="codicon codicon-symbol-structure symbol-structure"></span>AuthStep

content/docs/protocol.bots.v1.md

Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
---
2+
title: "Reference: protocol.bots.v1"
3+
---
4+
## Bot Invite Codes
5+
6+
Bot invite codes work similarly to HMC URLs.
7+
They can either be server+code or just code,
8+
to refer to a bot on the current homeserver.
9+
10+
The format for an invite code is:
11+
> [url[:port]/]code
12+
13+
where `code` is a purely alphanumeric code.
14+
15+
# Services
16+
17+
## <span class="codicon codicon-symbol-class symbol-class"></span>BotsService
18+
19+
The Bots service allows the management of bot accounts
20+
<span class="h3" aria-level="3">Fields</span>
21+
#### <span class="codicon codicon-symbol-method symbol-method"></span>MyBots
22+
[protocol.bots.v1.MyBotsRequest](#mybotsrequest) -> [protocol.bots.v1.MyBotsResponse](#mybotsresponse)
23+
24+
Gets the list of bots that you own
25+
26+
<br/>
27+
28+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>MyBotsRequest
29+
Request type for MyBots
30+
31+
This item has no fields.
32+
33+
34+
<br/>
35+
36+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>MyBotsResponse
37+
Response type for MyBots
38+
39+
<span class="h5" aria-level="5">Fields</span>
40+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bots
41+
Type: repeated [protocol.bots.v1.Bot](#bot)
42+
43+
The list of owned bots
44+
45+
------
46+
#### <span class="codicon codicon-symbol-method symbol-method"></span>GetBot
47+
[protocol.bots.v1.GetBotRequest](#getbotrequest) -> [protocol.bots.v1.GetBotResponse](#getbotresponse)
48+
49+
Gets information on a given bot
50+
51+
<br/>
52+
53+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>GetBotRequest
54+
Request type for GetBot
55+
56+
<span class="h5" aria-level="5">Fields</span>
57+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id
58+
Type: optional `uint64`
59+
60+
The bot to get the information of
61+
62+
63+
<br/>
64+
65+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>GetBotResponse
66+
Response type for GetBot
67+
68+
<span class="h5" aria-level="5">Fields</span>
69+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bot
70+
Type: optional [protocol.bots.v1.Bot](#bot)
71+
72+
The requested bot
73+
74+
------
75+
#### <span class="codicon codicon-symbol-method symbol-method"></span>CreateBot
76+
[protocol.bots.v1.CreateBotRequest](#createbotrequest) -> [protocol.bots.v1.CreateBotResponse](#createbotresponse)
77+
78+
Creates a new bot account
79+
80+
<br/>
81+
82+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>CreateBotRequest
83+
Request type for CreateBot
84+
85+
<span class="h5" aria-level="5">Fields</span>
86+
###### <span class="codicon codicon-symbol-field symbol-field"></span>display_name
87+
Type: optional `string`
88+
89+
The bot's display name
90+
###### <span class="codicon codicon-symbol-field symbol-field"></span>avatar_url
91+
Type: optional `string`
92+
93+
The bot's avatar URL
94+
###### <span class="codicon codicon-symbol-field symbol-field"></span>invite
95+
Type: optional `string`
96+
97+
The bot's invite code, if it has one
98+
99+
100+
<br/>
101+
102+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>CreateBotResponse
103+
Response type for CreateBot
104+
105+
<span class="h5" aria-level="5">Fields</span>
106+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id
107+
Type: optional `uint64`
108+
109+
The newly minted ID of the bot
110+
111+
------
112+
#### <span class="codicon codicon-symbol-method symbol-method"></span>EditBot
113+
[protocol.bots.v1.EditBotRequest](#editbotrequest) -> [protocol.bots.v1.EditBotResponse](#editbotresponse)
114+
115+
Modifies a bot account that you own
116+
117+
<br/>
118+
119+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>EditBotRequest
120+
Request type for EditBot
121+
122+
<span class="h5" aria-level="5">Fields</span>
123+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id
124+
Type: optional `uint64`
125+
126+
The ID of the bot to edit
127+
###### <span class="codicon codicon-symbol-field symbol-field"></span>new_display_name
128+
Type: optional `string`
129+
130+
The bot's new display name
131+
###### <span class="codicon codicon-symbol-field symbol-field"></span>new_avatar_url
132+
Type: optional `string`
133+
134+
The bot's new avatar URL
135+
###### <span class="codicon codicon-symbol-field symbol-field"></span>invite
136+
Type: optional `string`
137+
138+
The bot's new invite code
139+
140+
141+
<br/>
142+
143+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>EditBotResponse
144+
Response type for EditBot
145+
146+
This item has no fields.
147+
148+
------
149+
#### <span class="codicon codicon-symbol-method symbol-method"></span>DeleteBot
150+
[protocol.bots.v1.DeleteBotRequest](#deletebotrequest) -> [protocol.bots.v1.DeleteBotResponse](#deletebotresponse)
151+
152+
Deletes a bot account that you own
153+
154+
<br/>
155+
156+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>DeleteBotRequest
157+
Request type for DeleteBot
158+
159+
<span class="h5" aria-level="5">Fields</span>
160+
###### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id
161+
Type: optional `uint64`
162+
163+
The bot to delete
164+
165+
166+
<br/>
167+
168+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>DeleteBotResponse
169+
Response type for DeleteBot
170+
171+
This item has no fields.
172+
173+
------
174+
#### <span class="codicon codicon-symbol-method symbol-method"></span>Policies
175+
[protocol.bots.v1.PoliciesRequest](#policiesrequest) -> [protocol.bots.v1.PoliciesResponse](#policiesresponse)
176+
177+
Server policies for bot accounts that the client
178+
may display in its UI or restrict actions to prevent
179+
request errors
180+
181+
<br/>
182+
183+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>PoliciesRequest
184+
Request type for Policies
185+
186+
This item has no fields.
187+
188+
189+
<br/>
190+
191+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>PoliciesResponse
192+
Response type for Policies
193+
194+
<span class="h5" aria-level="5">Fields</span>
195+
###### <span class="codicon codicon-symbol-field symbol-field"></span>max_bots
196+
Type: optional `uint32`
197+
198+
How many bots an individual account is allowed to own
199+
200+
------
201+
#### <span class="codicon codicon-symbol-method symbol-method"></span>AddBot
202+
[protocol.bots.v1.AddBotRequest](#addbotrequest) -> [protocol.bots.v1.AddBotResponse](#addbotresponse)
203+
204+
Requests a bot to add itself to the guild.
205+
206+
For cross-server bots, this dispatches a UserInvited
207+
request across sync, inviting the bot to the guild.
208+
209+
<br/>
210+
211+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>AddBotRequest
212+
Request type for AddBot
213+
214+
<span class="h5" aria-level="5">Fields</span>
215+
###### <span class="codicon codicon-symbol-field symbol-field"></span>guild_id
216+
Type: optional `uint64`
217+
218+
The guild to add the bot to
219+
###### <span class="codicon codicon-symbol-field symbol-field"></span>invite_code
220+
Type: optional `string`
221+
222+
The bot's invite code.
223+
224+
225+
<br/>
226+
227+
##### <span class="codicon codicon-symbol-structure symbol-structure"></span>AddBotResponse
228+
Response type for AddBot
229+
230+
This item has no fields.
231+
232+
# Standalone Message Types
233+
234+
## <span class="codicon codicon-symbol-structure symbol-structure"></span>Bot
235+
A description of a bot account
236+
237+
<span class="h3" aria-level="3">Fields</span>
238+
### <span class="codicon codicon-symbol-field symbol-field"></span>bot_id
239+
Type: optional `uint64`
240+
241+
The ID of the bot
242+
### <span class="codicon codicon-symbol-field symbol-field"></span>display_name
243+
Type: optional `string`
244+
245+
The bot's display name
246+
### <span class="codicon codicon-symbol-field symbol-field"></span>avatar_url
247+
Type: optional `string`
248+
249+
The bot's avatar URL
250+
### <span class="codicon codicon-symbol-field symbol-field"></span>invite
251+
Type: optional `string`
252+
253+
The bot's invite code, if it has one
254+
255+
------

content/docs/protocol.mediaproxy.v1.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,13 @@ Mimetype of the media.
149149
Type: optional `string`
150150

151151
Filename of the media.
152+
### <span class="codicon codicon-symbol-field symbol-field"></span>size
153+
Type: optional `uint32`
154+
155+
Sıze of the media.
156+
157+
This should (usually) be the size taken from the `Content-Length` header
158+
(for HTTP requests).
159+
If this is not included, then it means the size could not be determined.
152160

153161
------

content/docs/protocol.profile.v1.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ new status of the user.
6262
###### <span class="codicon codicon-symbol-field symbol-field"></span>new_is_bot
6363
Type: optional `bool`
6464

65-
new whether the user is a bot or not.
65+
new whether the user is a bot or not
66+
67+
Deprecated; see bot service and guest handling
68+
in auth.
6669

6770

6871
<br/>
@@ -208,7 +211,11 @@ the status of the user.
208211
### <span class="codicon codicon-symbol-field symbol-field"></span>is_bot
209212
Type: optional `bool`
210213

211-
whether the user is a bot or not.
214+
whether the user is a bot or not
215+
### <span class="codicon codicon-symbol-field symbol-field"></span>account_kind
216+
Type: UNHANDLED | TYPE
217+
218+
what kind of account the user is, e.g. full, guest, bot
212219

213220
------
214221
## <span class="codicon codicon-symbol-structure symbol-structure"></span>ProfileUpdated
@@ -238,6 +245,11 @@ New status for this user.
238245
Type: optional `bool`
239246

240247
New is bot or not for this user.
248+
Deprecated, prefer new_account_kind if set.
249+
### <span class="codicon codicon-symbol-field symbol-field"></span>new_account_kind
250+
Type: UNHANDLED | TYPE
251+
252+
The new account kind for this account
241253

242254
------
243255
## <span class="codicon codicon-symbol-structure symbol-structure"></span>StreamEvent
@@ -272,3 +284,16 @@ User is on mobile.
272284
### <span class="codicon codicon-symbol-enum-member symbol-enum-member"></span>USER_STATUS_STREAMING
273285
User is streaming
274286

287+
------
288+
## <span class="codicon codicon-symbol-enum symbol-enum"></span>AccountKind
289+
290+
The possible kinds of an account
291+
### <span class="codicon codicon-symbol-enum-member symbol-enum-member"></span>ACCOUNT_KIND_FULL_UNSPECIFIED
292+
The account is a full-fledged account controlled by a human
293+
294+
### <span class="codicon codicon-symbol-enum-member symbol-enum-member"></span>ACCOUNT_KIND_BOT
295+
The account is an account controlled by a bot
296+
297+
### <span class="codicon codicon-symbol-enum-member symbol-enum-member"></span>ACCOUNT_KIND_GUEST
298+
The account is a guest account controlled by a human
299+

0 commit comments

Comments
 (0)