@myronsi/messenger-api 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +58 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/openapi.yaml +2334 -0
- package/dist/schema.d.ts +3889 -0
- package/dist/ws-docs.json +428 -0
- package/dist/ws-events.d.ts +526 -0
- package/dist/ws-events.schema.json +2739 -0
- package/package.json +54 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,3889 @@
|
|
|
1
|
+
/* Generated from api/openapi.yaml 2.0.0-alpha.1. Do not edit. */
|
|
2
|
+
export interface paths {
|
|
3
|
+
"/meta": {
|
|
4
|
+
parameters: {
|
|
5
|
+
query?: never;
|
|
6
|
+
header?: never;
|
|
7
|
+
path?: never;
|
|
8
|
+
cookie?: never;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Backend and contract versions
|
|
12
|
+
* @description No authentication. Cacheable for 60 seconds.
|
|
13
|
+
*/
|
|
14
|
+
get: operations["getMeta"];
|
|
15
|
+
put?: never;
|
|
16
|
+
post?: never;
|
|
17
|
+
delete?: never;
|
|
18
|
+
options?: never;
|
|
19
|
+
head?: never;
|
|
20
|
+
patch?: never;
|
|
21
|
+
trace?: never;
|
|
22
|
+
};
|
|
23
|
+
"/auth/register": {
|
|
24
|
+
parameters: {
|
|
25
|
+
query?: never;
|
|
26
|
+
header?: {
|
|
27
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
28
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
29
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
30
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
31
|
+
};
|
|
32
|
+
path?: never;
|
|
33
|
+
cookie?: never;
|
|
34
|
+
};
|
|
35
|
+
get?: never;
|
|
36
|
+
put?: never;
|
|
37
|
+
/** Create an account */
|
|
38
|
+
post: operations["register"];
|
|
39
|
+
delete?: never;
|
|
40
|
+
options?: never;
|
|
41
|
+
head?: never;
|
|
42
|
+
patch?: never;
|
|
43
|
+
trace?: never;
|
|
44
|
+
};
|
|
45
|
+
"/auth/login": {
|
|
46
|
+
parameters: {
|
|
47
|
+
query?: never;
|
|
48
|
+
header?: {
|
|
49
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
50
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
51
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
52
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
53
|
+
};
|
|
54
|
+
path?: never;
|
|
55
|
+
cookie?: never;
|
|
56
|
+
};
|
|
57
|
+
get?: never;
|
|
58
|
+
put?: never;
|
|
59
|
+
/**
|
|
60
|
+
* Sign in with username and password
|
|
61
|
+
* @description Answers with a login challenge instead of tokens when two-factor authentication is enabled.
|
|
62
|
+
*/
|
|
63
|
+
post: operations["login"];
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
patch?: never;
|
|
68
|
+
trace?: never;
|
|
69
|
+
};
|
|
70
|
+
"/auth/login/2fa": {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: {
|
|
74
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
75
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
76
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
77
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
78
|
+
};
|
|
79
|
+
path?: never;
|
|
80
|
+
cookie?: never;
|
|
81
|
+
};
|
|
82
|
+
get?: never;
|
|
83
|
+
put?: never;
|
|
84
|
+
/** Finish a login with a two-factor code */
|
|
85
|
+
post: operations["loginTwoFactor"];
|
|
86
|
+
delete?: never;
|
|
87
|
+
options?: never;
|
|
88
|
+
head?: never;
|
|
89
|
+
patch?: never;
|
|
90
|
+
trace?: never;
|
|
91
|
+
};
|
|
92
|
+
"/auth/refresh": {
|
|
93
|
+
parameters: {
|
|
94
|
+
query?: never;
|
|
95
|
+
header?: {
|
|
96
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
97
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
98
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
99
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
100
|
+
};
|
|
101
|
+
path?: never;
|
|
102
|
+
cookie?: never;
|
|
103
|
+
};
|
|
104
|
+
get?: never;
|
|
105
|
+
put?: never;
|
|
106
|
+
/**
|
|
107
|
+
* Get a new access token
|
|
108
|
+
* @description Uses the HttpOnly refresh cookie and rotates it.
|
|
109
|
+
*/
|
|
110
|
+
post: operations["refreshToken"];
|
|
111
|
+
delete?: never;
|
|
112
|
+
options?: never;
|
|
113
|
+
head?: never;
|
|
114
|
+
patch?: never;
|
|
115
|
+
trace?: never;
|
|
116
|
+
};
|
|
117
|
+
"/auth/logout": {
|
|
118
|
+
parameters: {
|
|
119
|
+
query?: never;
|
|
120
|
+
header?: {
|
|
121
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
122
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
123
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
124
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
125
|
+
};
|
|
126
|
+
path?: never;
|
|
127
|
+
cookie?: never;
|
|
128
|
+
};
|
|
129
|
+
get?: never;
|
|
130
|
+
put?: never;
|
|
131
|
+
/** End the current session */
|
|
132
|
+
post: operations["logout"];
|
|
133
|
+
delete?: never;
|
|
134
|
+
options?: never;
|
|
135
|
+
head?: never;
|
|
136
|
+
patch?: never;
|
|
137
|
+
trace?: never;
|
|
138
|
+
};
|
|
139
|
+
"/auth/recover": {
|
|
140
|
+
parameters: {
|
|
141
|
+
query?: never;
|
|
142
|
+
header?: {
|
|
143
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
144
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
145
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
146
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
147
|
+
};
|
|
148
|
+
path?: never;
|
|
149
|
+
cookie?: never;
|
|
150
|
+
};
|
|
151
|
+
get?: never;
|
|
152
|
+
put?: never;
|
|
153
|
+
/**
|
|
154
|
+
* Start account recovery (temporary)
|
|
155
|
+
* @description Temporary port of the Python recovery flow; it is redesigned in release 1.1.
|
|
156
|
+
*/
|
|
157
|
+
post: operations["startRecovery"];
|
|
158
|
+
delete?: never;
|
|
159
|
+
options?: never;
|
|
160
|
+
head?: never;
|
|
161
|
+
patch?: never;
|
|
162
|
+
trace?: never;
|
|
163
|
+
};
|
|
164
|
+
"/auth/reset-password": {
|
|
165
|
+
parameters: {
|
|
166
|
+
query?: never;
|
|
167
|
+
header?: {
|
|
168
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
169
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
170
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
171
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
172
|
+
};
|
|
173
|
+
path?: never;
|
|
174
|
+
cookie?: never;
|
|
175
|
+
};
|
|
176
|
+
get?: never;
|
|
177
|
+
put?: never;
|
|
178
|
+
/** Set a new password with a recovery token (temporary) */
|
|
179
|
+
post: operations["resetPassword"];
|
|
180
|
+
delete?: never;
|
|
181
|
+
options?: never;
|
|
182
|
+
head?: never;
|
|
183
|
+
patch?: never;
|
|
184
|
+
trace?: never;
|
|
185
|
+
};
|
|
186
|
+
"/ws/ticket": {
|
|
187
|
+
parameters: {
|
|
188
|
+
query?: never;
|
|
189
|
+
header?: {
|
|
190
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
191
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
192
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
193
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
194
|
+
};
|
|
195
|
+
path?: never;
|
|
196
|
+
cookie?: never;
|
|
197
|
+
};
|
|
198
|
+
get?: never;
|
|
199
|
+
put?: never;
|
|
200
|
+
/**
|
|
201
|
+
* Get a one-time ticket for the WebSocket
|
|
202
|
+
* @description The ticket is valid for a few seconds and can be used once at
|
|
203
|
+
* `/api/v2/ws?ticket=…`; it replaces tokens in the URL.
|
|
204
|
+
*/
|
|
205
|
+
post: operations["createWebSocketTicket"];
|
|
206
|
+
delete?: never;
|
|
207
|
+
options?: never;
|
|
208
|
+
head?: never;
|
|
209
|
+
patch?: never;
|
|
210
|
+
trace?: never;
|
|
211
|
+
};
|
|
212
|
+
"/me": {
|
|
213
|
+
parameters: {
|
|
214
|
+
query?: never;
|
|
215
|
+
header?: {
|
|
216
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
217
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
218
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
219
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
220
|
+
};
|
|
221
|
+
path?: never;
|
|
222
|
+
cookie?: never;
|
|
223
|
+
};
|
|
224
|
+
/** Current user */
|
|
225
|
+
get: operations["getMe"];
|
|
226
|
+
put?: never;
|
|
227
|
+
post?: never;
|
|
228
|
+
/** Delete the account */
|
|
229
|
+
delete: operations["deleteMe"];
|
|
230
|
+
options?: never;
|
|
231
|
+
head?: never;
|
|
232
|
+
/**
|
|
233
|
+
* Update the profile
|
|
234
|
+
* @description Replaces `PUT /me` and `POST /me/bio` of v1. Only the sent fields change.
|
|
235
|
+
*/
|
|
236
|
+
patch: operations["updateMe"];
|
|
237
|
+
trace?: never;
|
|
238
|
+
};
|
|
239
|
+
"/me/avatar": {
|
|
240
|
+
parameters: {
|
|
241
|
+
query?: never;
|
|
242
|
+
header?: {
|
|
243
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
244
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
245
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
246
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
247
|
+
};
|
|
248
|
+
path?: never;
|
|
249
|
+
cookie?: never;
|
|
250
|
+
};
|
|
251
|
+
get?: never;
|
|
252
|
+
/**
|
|
253
|
+
* Set the avatar from an uploaded attachment
|
|
254
|
+
* @description Replaces both avatar routes of v1. Upload the image with `POST /attachments` (`purpose: avatar`) first.
|
|
255
|
+
*/
|
|
256
|
+
put: operations["setMyAvatar"];
|
|
257
|
+
post?: never;
|
|
258
|
+
delete?: never;
|
|
259
|
+
options?: never;
|
|
260
|
+
head?: never;
|
|
261
|
+
patch?: never;
|
|
262
|
+
trace?: never;
|
|
263
|
+
};
|
|
264
|
+
"/me/password": {
|
|
265
|
+
parameters: {
|
|
266
|
+
query?: never;
|
|
267
|
+
header?: {
|
|
268
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
269
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
270
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
271
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
272
|
+
};
|
|
273
|
+
path?: never;
|
|
274
|
+
cookie?: never;
|
|
275
|
+
};
|
|
276
|
+
get?: never;
|
|
277
|
+
/**
|
|
278
|
+
* Change the password
|
|
279
|
+
* @description Revokes all other sessions.
|
|
280
|
+
*/
|
|
281
|
+
put: operations["changePassword"];
|
|
282
|
+
post?: never;
|
|
283
|
+
delete?: never;
|
|
284
|
+
options?: never;
|
|
285
|
+
head?: never;
|
|
286
|
+
patch?: never;
|
|
287
|
+
trace?: never;
|
|
288
|
+
};
|
|
289
|
+
"/me/security": {
|
|
290
|
+
parameters: {
|
|
291
|
+
query?: never;
|
|
292
|
+
header?: {
|
|
293
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
294
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
295
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
296
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
297
|
+
};
|
|
298
|
+
path?: never;
|
|
299
|
+
cookie?: never;
|
|
300
|
+
};
|
|
301
|
+
/** Security settings */
|
|
302
|
+
get: operations["getSecuritySettings"];
|
|
303
|
+
put?: never;
|
|
304
|
+
post?: never;
|
|
305
|
+
delete?: never;
|
|
306
|
+
options?: never;
|
|
307
|
+
head?: never;
|
|
308
|
+
/** Change the session duration */
|
|
309
|
+
patch: operations["updateSecuritySettings"];
|
|
310
|
+
trace?: never;
|
|
311
|
+
};
|
|
312
|
+
"/me/sessions": {
|
|
313
|
+
parameters: {
|
|
314
|
+
query?: never;
|
|
315
|
+
header?: {
|
|
316
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
317
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
318
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
319
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
320
|
+
};
|
|
321
|
+
path?: never;
|
|
322
|
+
cookie?: never;
|
|
323
|
+
};
|
|
324
|
+
/** Signed-in devices */
|
|
325
|
+
get: operations["listSessions"];
|
|
326
|
+
put?: never;
|
|
327
|
+
post?: never;
|
|
328
|
+
/** Sign out everywhere except this device */
|
|
329
|
+
delete: operations["revokeOtherSessions"];
|
|
330
|
+
options?: never;
|
|
331
|
+
head?: never;
|
|
332
|
+
patch?: never;
|
|
333
|
+
trace?: never;
|
|
334
|
+
};
|
|
335
|
+
"/me/sessions/{session_id}": {
|
|
336
|
+
parameters: {
|
|
337
|
+
query?: never;
|
|
338
|
+
header?: {
|
|
339
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
340
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
341
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
342
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
343
|
+
};
|
|
344
|
+
path: {
|
|
345
|
+
session_id: components["parameters"]["SessionId"];
|
|
346
|
+
};
|
|
347
|
+
cookie?: never;
|
|
348
|
+
};
|
|
349
|
+
get?: never;
|
|
350
|
+
put?: never;
|
|
351
|
+
post?: never;
|
|
352
|
+
/** Sign out one device */
|
|
353
|
+
delete: operations["revokeSession"];
|
|
354
|
+
options?: never;
|
|
355
|
+
head?: never;
|
|
356
|
+
patch?: never;
|
|
357
|
+
trace?: never;
|
|
358
|
+
};
|
|
359
|
+
"/me/2fa/setup": {
|
|
360
|
+
parameters: {
|
|
361
|
+
query?: never;
|
|
362
|
+
header?: {
|
|
363
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
364
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
365
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
366
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
367
|
+
};
|
|
368
|
+
path?: never;
|
|
369
|
+
cookie?: never;
|
|
370
|
+
};
|
|
371
|
+
get?: never;
|
|
372
|
+
put?: never;
|
|
373
|
+
/**
|
|
374
|
+
* Start two-factor setup
|
|
375
|
+
* @description Returns the secret and an `otpauth://` URI; two-factor stays off until confirmed.
|
|
376
|
+
*/
|
|
377
|
+
post: operations["setupTwoFactor"];
|
|
378
|
+
delete?: never;
|
|
379
|
+
options?: never;
|
|
380
|
+
head?: never;
|
|
381
|
+
patch?: never;
|
|
382
|
+
trace?: never;
|
|
383
|
+
};
|
|
384
|
+
"/me/2fa/confirm": {
|
|
385
|
+
parameters: {
|
|
386
|
+
query?: never;
|
|
387
|
+
header?: {
|
|
388
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
389
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
390
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
391
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
392
|
+
};
|
|
393
|
+
path?: never;
|
|
394
|
+
cookie?: never;
|
|
395
|
+
};
|
|
396
|
+
get?: never;
|
|
397
|
+
put?: never;
|
|
398
|
+
/** Turn two-factor on with a code */
|
|
399
|
+
post: operations["confirmTwoFactor"];
|
|
400
|
+
delete?: never;
|
|
401
|
+
options?: never;
|
|
402
|
+
head?: never;
|
|
403
|
+
patch?: never;
|
|
404
|
+
trace?: never;
|
|
405
|
+
};
|
|
406
|
+
"/me/2fa/disable": {
|
|
407
|
+
parameters: {
|
|
408
|
+
query?: never;
|
|
409
|
+
header?: {
|
|
410
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
411
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
412
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
413
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
414
|
+
};
|
|
415
|
+
path?: never;
|
|
416
|
+
cookie?: never;
|
|
417
|
+
};
|
|
418
|
+
get?: never;
|
|
419
|
+
put?: never;
|
|
420
|
+
/** Turn two-factor off */
|
|
421
|
+
post: operations["disableTwoFactor"];
|
|
422
|
+
delete?: never;
|
|
423
|
+
options?: never;
|
|
424
|
+
head?: never;
|
|
425
|
+
patch?: never;
|
|
426
|
+
trace?: never;
|
|
427
|
+
};
|
|
428
|
+
"/me/privacy": {
|
|
429
|
+
parameters: {
|
|
430
|
+
query?: never;
|
|
431
|
+
header?: {
|
|
432
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
433
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
434
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
435
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
436
|
+
};
|
|
437
|
+
path?: never;
|
|
438
|
+
cookie?: never;
|
|
439
|
+
};
|
|
440
|
+
/** Privacy settings and exceptions */
|
|
441
|
+
get: operations["getPrivacySettings"];
|
|
442
|
+
put?: never;
|
|
443
|
+
post?: never;
|
|
444
|
+
delete?: never;
|
|
445
|
+
options?: never;
|
|
446
|
+
head?: never;
|
|
447
|
+
/** Update privacy settings */
|
|
448
|
+
patch: operations["updatePrivacySettings"];
|
|
449
|
+
trace?: never;
|
|
450
|
+
};
|
|
451
|
+
"/me/privacy/exceptions/{setting_key}/{effect}": {
|
|
452
|
+
parameters: {
|
|
453
|
+
query?: never;
|
|
454
|
+
header?: {
|
|
455
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
456
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
457
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
458
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
459
|
+
};
|
|
460
|
+
path: {
|
|
461
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites";
|
|
462
|
+
effect: "allow" | "deny";
|
|
463
|
+
};
|
|
464
|
+
cookie?: never;
|
|
465
|
+
};
|
|
466
|
+
get?: never;
|
|
467
|
+
/** Replace the exception list of one setting */
|
|
468
|
+
put: operations["replacePrivacyExceptions"];
|
|
469
|
+
post?: never;
|
|
470
|
+
delete?: never;
|
|
471
|
+
options?: never;
|
|
472
|
+
head?: never;
|
|
473
|
+
patch?: never;
|
|
474
|
+
trace?: never;
|
|
475
|
+
};
|
|
476
|
+
"/me/blocked-users": {
|
|
477
|
+
parameters: {
|
|
478
|
+
query?: never;
|
|
479
|
+
header?: {
|
|
480
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
481
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
482
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
483
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
484
|
+
};
|
|
485
|
+
path?: never;
|
|
486
|
+
cookie?: never;
|
|
487
|
+
};
|
|
488
|
+
/** Blocked users */
|
|
489
|
+
get: operations["listBlockedUsers"];
|
|
490
|
+
put?: never;
|
|
491
|
+
post?: never;
|
|
492
|
+
delete?: never;
|
|
493
|
+
options?: never;
|
|
494
|
+
head?: never;
|
|
495
|
+
patch?: never;
|
|
496
|
+
trace?: never;
|
|
497
|
+
};
|
|
498
|
+
"/me/blocked-users/{user_id}": {
|
|
499
|
+
parameters: {
|
|
500
|
+
query?: never;
|
|
501
|
+
header?: {
|
|
502
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
503
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
504
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
505
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
506
|
+
};
|
|
507
|
+
path: {
|
|
508
|
+
user_id: components["parameters"]["UserId"];
|
|
509
|
+
};
|
|
510
|
+
cookie?: never;
|
|
511
|
+
};
|
|
512
|
+
get?: never;
|
|
513
|
+
/** Block a user */
|
|
514
|
+
put: operations["blockUser"];
|
|
515
|
+
post?: never;
|
|
516
|
+
/** Unblock a user */
|
|
517
|
+
delete: operations["unblockUser"];
|
|
518
|
+
options?: never;
|
|
519
|
+
head?: never;
|
|
520
|
+
patch?: never;
|
|
521
|
+
trace?: never;
|
|
522
|
+
};
|
|
523
|
+
"/users": {
|
|
524
|
+
parameters: {
|
|
525
|
+
query?: never;
|
|
526
|
+
header?: {
|
|
527
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
528
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
529
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
530
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
531
|
+
};
|
|
532
|
+
path?: never;
|
|
533
|
+
cookie?: never;
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Search users by username or display name
|
|
537
|
+
* @description Users whose `search_visibility` is `nobody` are not returned.
|
|
538
|
+
*/
|
|
539
|
+
get: operations["searchUsers"];
|
|
540
|
+
put?: never;
|
|
541
|
+
post?: never;
|
|
542
|
+
delete?: never;
|
|
543
|
+
options?: never;
|
|
544
|
+
head?: never;
|
|
545
|
+
patch?: never;
|
|
546
|
+
trace?: never;
|
|
547
|
+
};
|
|
548
|
+
"/usernames/{username}": {
|
|
549
|
+
parameters: {
|
|
550
|
+
query?: never;
|
|
551
|
+
header?: {
|
|
552
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
553
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
554
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
555
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
556
|
+
};
|
|
557
|
+
path?: never;
|
|
558
|
+
cookie?: never;
|
|
559
|
+
};
|
|
560
|
+
/** Profile by username */
|
|
561
|
+
get: operations["getUserByUsername"];
|
|
562
|
+
put?: never;
|
|
563
|
+
post?: never;
|
|
564
|
+
delete?: never;
|
|
565
|
+
options?: never;
|
|
566
|
+
head?: never;
|
|
567
|
+
patch?: never;
|
|
568
|
+
trace?: never;
|
|
569
|
+
};
|
|
570
|
+
"/users/{user_id}": {
|
|
571
|
+
parameters: {
|
|
572
|
+
query?: never;
|
|
573
|
+
header?: {
|
|
574
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
575
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
576
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
577
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
578
|
+
};
|
|
579
|
+
path: {
|
|
580
|
+
user_id: components["parameters"]["UserId"];
|
|
581
|
+
};
|
|
582
|
+
cookie?: never;
|
|
583
|
+
};
|
|
584
|
+
/** Profile by ID */
|
|
585
|
+
get: operations["getUser"];
|
|
586
|
+
put?: never;
|
|
587
|
+
post?: never;
|
|
588
|
+
delete?: never;
|
|
589
|
+
options?: never;
|
|
590
|
+
head?: never;
|
|
591
|
+
patch?: never;
|
|
592
|
+
trace?: never;
|
|
593
|
+
};
|
|
594
|
+
"/users/{user_id}/avatar": {
|
|
595
|
+
parameters: {
|
|
596
|
+
query?: never;
|
|
597
|
+
header?: {
|
|
598
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
599
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
600
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
601
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
602
|
+
};
|
|
603
|
+
path: {
|
|
604
|
+
user_id: components["parameters"]["UserId"];
|
|
605
|
+
};
|
|
606
|
+
cookie?: never;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Current avatar image
|
|
610
|
+
* @description Respects the avatar visibility of the user; falls back to the default avatar.
|
|
611
|
+
*/
|
|
612
|
+
get: operations["getUserAvatar"];
|
|
613
|
+
put?: never;
|
|
614
|
+
post?: never;
|
|
615
|
+
delete?: never;
|
|
616
|
+
options?: never;
|
|
617
|
+
head?: never;
|
|
618
|
+
patch?: never;
|
|
619
|
+
trace?: never;
|
|
620
|
+
};
|
|
621
|
+
"/users/{user_id}/avatars": {
|
|
622
|
+
parameters: {
|
|
623
|
+
query?: never;
|
|
624
|
+
header?: {
|
|
625
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
626
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
627
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
628
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
629
|
+
};
|
|
630
|
+
path: {
|
|
631
|
+
user_id: components["parameters"]["UserId"];
|
|
632
|
+
};
|
|
633
|
+
cookie?: never;
|
|
634
|
+
};
|
|
635
|
+
/** Avatar history */
|
|
636
|
+
get: operations["listUserAvatars"];
|
|
637
|
+
put?: never;
|
|
638
|
+
post?: never;
|
|
639
|
+
delete?: never;
|
|
640
|
+
options?: never;
|
|
641
|
+
head?: never;
|
|
642
|
+
patch?: never;
|
|
643
|
+
trace?: never;
|
|
644
|
+
};
|
|
645
|
+
"/users/{user_id}/contact-name": {
|
|
646
|
+
parameters: {
|
|
647
|
+
query?: never;
|
|
648
|
+
header?: {
|
|
649
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
650
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
651
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
652
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
653
|
+
};
|
|
654
|
+
path: {
|
|
655
|
+
user_id: components["parameters"]["UserId"];
|
|
656
|
+
};
|
|
657
|
+
cookie?: never;
|
|
658
|
+
};
|
|
659
|
+
get?: never;
|
|
660
|
+
/** Set your own display name for a user */
|
|
661
|
+
put: operations["setContactName"];
|
|
662
|
+
post?: never;
|
|
663
|
+
/** Remove your display name for a user */
|
|
664
|
+
delete: operations["removeContactName"];
|
|
665
|
+
options?: never;
|
|
666
|
+
head?: never;
|
|
667
|
+
patch?: never;
|
|
668
|
+
trace?: never;
|
|
669
|
+
};
|
|
670
|
+
"/attachments": {
|
|
671
|
+
parameters: {
|
|
672
|
+
query?: never;
|
|
673
|
+
header?: {
|
|
674
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
675
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
676
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
677
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
678
|
+
};
|
|
679
|
+
path?: never;
|
|
680
|
+
cookie?: never;
|
|
681
|
+
};
|
|
682
|
+
get?: never;
|
|
683
|
+
put?: never;
|
|
684
|
+
/**
|
|
685
|
+
* Upload a file, image, audio or voice message
|
|
686
|
+
* @description The server checks the content, not the file name or the client's content type. The
|
|
687
|
+
* returned `attachment_id` is used in messages (`type: file` or `voice`) or for
|
|
688
|
+
* avatars. Attachments that are not used within 24 hours are deleted.
|
|
689
|
+
*/
|
|
690
|
+
post: operations["uploadAttachment"];
|
|
691
|
+
delete?: never;
|
|
692
|
+
options?: never;
|
|
693
|
+
head?: never;
|
|
694
|
+
patch?: never;
|
|
695
|
+
trace?: never;
|
|
696
|
+
};
|
|
697
|
+
"/attachments/{attachment_id}/content": {
|
|
698
|
+
parameters: {
|
|
699
|
+
query?: never;
|
|
700
|
+
header?: {
|
|
701
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
702
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
703
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
704
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
705
|
+
};
|
|
706
|
+
path: {
|
|
707
|
+
attachment_id: components["parameters"]["AttachmentId"];
|
|
708
|
+
};
|
|
709
|
+
cookie?: never;
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* Download an attachment
|
|
713
|
+
* @description Only participants of the chat the attachment was sent to (and its uploader) can download it.
|
|
714
|
+
*/
|
|
715
|
+
get: operations["getAttachmentContent"];
|
|
716
|
+
put?: never;
|
|
717
|
+
post?: never;
|
|
718
|
+
delete?: never;
|
|
719
|
+
options?: never;
|
|
720
|
+
head?: never;
|
|
721
|
+
patch?: never;
|
|
722
|
+
trace?: never;
|
|
723
|
+
};
|
|
724
|
+
"/chats": {
|
|
725
|
+
parameters: {
|
|
726
|
+
query?: never;
|
|
727
|
+
header?: {
|
|
728
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
729
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
730
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
731
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
732
|
+
};
|
|
733
|
+
path?: never;
|
|
734
|
+
cookie?: never;
|
|
735
|
+
};
|
|
736
|
+
/**
|
|
737
|
+
* My chats with last message and unread count
|
|
738
|
+
* @description One request replaces `GET /chats/list/{username}` and `GET /groups/list/{username}`; pinned chats come first.
|
|
739
|
+
*/
|
|
740
|
+
get: operations["listChats"];
|
|
741
|
+
put?: never;
|
|
742
|
+
/**
|
|
743
|
+
* Start a direct chat
|
|
744
|
+
* @description Respects the other user's `direct_messages` privacy setting. When approval is needed
|
|
745
|
+
* the answer is `202` with the pending request instead of a chat. Returns the existing
|
|
746
|
+
* chat (`200`) if there already is one.
|
|
747
|
+
*/
|
|
748
|
+
post: operations["createChat"];
|
|
749
|
+
delete?: never;
|
|
750
|
+
options?: never;
|
|
751
|
+
head?: never;
|
|
752
|
+
patch?: never;
|
|
753
|
+
trace?: never;
|
|
754
|
+
};
|
|
755
|
+
"/chats/{chat_id}": {
|
|
756
|
+
parameters: {
|
|
757
|
+
query?: never;
|
|
758
|
+
header?: {
|
|
759
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
760
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
761
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
762
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
763
|
+
};
|
|
764
|
+
path: {
|
|
765
|
+
chat_id: components["parameters"]["ChatId"];
|
|
766
|
+
};
|
|
767
|
+
cookie?: never;
|
|
768
|
+
};
|
|
769
|
+
/** One chat */
|
|
770
|
+
get: operations["getChat"];
|
|
771
|
+
put?: never;
|
|
772
|
+
post?: never;
|
|
773
|
+
/**
|
|
774
|
+
* Delete a direct chat for yourself
|
|
775
|
+
* @description For groups use `DELETE /groups/{chat_id}` (owner) or `POST /groups/{chat_id}/leave`.
|
|
776
|
+
*/
|
|
777
|
+
delete: operations["deleteChat"];
|
|
778
|
+
options?: never;
|
|
779
|
+
head?: never;
|
|
780
|
+
patch?: never;
|
|
781
|
+
trace?: never;
|
|
782
|
+
};
|
|
783
|
+
"/chats/{chat_id}/pin": {
|
|
784
|
+
parameters: {
|
|
785
|
+
query?: never;
|
|
786
|
+
header?: {
|
|
787
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
788
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
789
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
790
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
791
|
+
};
|
|
792
|
+
path: {
|
|
793
|
+
chat_id: components["parameters"]["ChatId"];
|
|
794
|
+
};
|
|
795
|
+
cookie?: never;
|
|
796
|
+
};
|
|
797
|
+
get?: never;
|
|
798
|
+
/** Pin a chat */
|
|
799
|
+
put: operations["pinChat"];
|
|
800
|
+
post?: never;
|
|
801
|
+
/** Unpin a chat */
|
|
802
|
+
delete: operations["unpinChat"];
|
|
803
|
+
options?: never;
|
|
804
|
+
head?: never;
|
|
805
|
+
patch?: never;
|
|
806
|
+
trace?: never;
|
|
807
|
+
};
|
|
808
|
+
"/chats/{chat_id}/read": {
|
|
809
|
+
parameters: {
|
|
810
|
+
query?: never;
|
|
811
|
+
header?: {
|
|
812
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
813
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
814
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
815
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
816
|
+
};
|
|
817
|
+
path: {
|
|
818
|
+
chat_id: components["parameters"]["ChatId"];
|
|
819
|
+
};
|
|
820
|
+
cookie?: never;
|
|
821
|
+
};
|
|
822
|
+
get?: never;
|
|
823
|
+
put?: never;
|
|
824
|
+
/**
|
|
825
|
+
* Mark messages as read up to a message
|
|
826
|
+
* @description Replaces the duplicate `/read` and `/read/` routes of v1.
|
|
827
|
+
*/
|
|
828
|
+
post: operations["markChatRead"];
|
|
829
|
+
delete?: never;
|
|
830
|
+
options?: never;
|
|
831
|
+
head?: never;
|
|
832
|
+
patch?: never;
|
|
833
|
+
trace?: never;
|
|
834
|
+
};
|
|
835
|
+
"/chats/{chat_id}/messages": {
|
|
836
|
+
parameters: {
|
|
837
|
+
query?: never;
|
|
838
|
+
header?: {
|
|
839
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
840
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
841
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
842
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
843
|
+
};
|
|
844
|
+
path: {
|
|
845
|
+
chat_id: components["parameters"]["ChatId"];
|
|
846
|
+
};
|
|
847
|
+
cookie?: never;
|
|
848
|
+
};
|
|
849
|
+
/**
|
|
850
|
+
* Message history
|
|
851
|
+
* @description Replaces `GET /messages/history/{chat_id}`. Without a cursor the newest messages are
|
|
852
|
+
* returned. Items are always ordered oldest to newest. Send at most one of `before`,
|
|
853
|
+
* `after` and `around` (message IDs).
|
|
854
|
+
*/
|
|
855
|
+
get: operations["listMessages"];
|
|
856
|
+
put?: never;
|
|
857
|
+
/**
|
|
858
|
+
* Send a message over HTTP
|
|
859
|
+
* @description Same as the WebSocket `message` event, for clients without a connection. Sending the
|
|
860
|
+
* same `client_temp_id` again returns the existing message instead of creating a copy.
|
|
861
|
+
*/
|
|
862
|
+
post: operations["sendMessage"];
|
|
863
|
+
delete?: never;
|
|
864
|
+
options?: never;
|
|
865
|
+
head?: never;
|
|
866
|
+
patch?: never;
|
|
867
|
+
trace?: never;
|
|
868
|
+
};
|
|
869
|
+
"/chats/{chat_id}/messages/search": {
|
|
870
|
+
parameters: {
|
|
871
|
+
query?: never;
|
|
872
|
+
header?: {
|
|
873
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
874
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
875
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
876
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
877
|
+
};
|
|
878
|
+
path: {
|
|
879
|
+
chat_id: components["parameters"]["ChatId"];
|
|
880
|
+
};
|
|
881
|
+
cookie?: never;
|
|
882
|
+
};
|
|
883
|
+
/** Search messages in a chat */
|
|
884
|
+
get: operations["searchMessages"];
|
|
885
|
+
put?: never;
|
|
886
|
+
post?: never;
|
|
887
|
+
delete?: never;
|
|
888
|
+
options?: never;
|
|
889
|
+
head?: never;
|
|
890
|
+
patch?: never;
|
|
891
|
+
trace?: never;
|
|
892
|
+
};
|
|
893
|
+
"/chats/{chat_id}/media": {
|
|
894
|
+
parameters: {
|
|
895
|
+
query?: never;
|
|
896
|
+
header?: {
|
|
897
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
898
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
899
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
900
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
901
|
+
};
|
|
902
|
+
path: {
|
|
903
|
+
chat_id: components["parameters"]["ChatId"];
|
|
904
|
+
};
|
|
905
|
+
cookie?: never;
|
|
906
|
+
};
|
|
907
|
+
/**
|
|
908
|
+
* Photos or audio of a chat
|
|
909
|
+
* @description Replaces `GET /messages/photos/{chat_id}` and `GET /messages/audios/{chat_id}`.
|
|
910
|
+
*/
|
|
911
|
+
get: operations["listChatMedia"];
|
|
912
|
+
put?: never;
|
|
913
|
+
post?: never;
|
|
914
|
+
delete?: never;
|
|
915
|
+
options?: never;
|
|
916
|
+
head?: never;
|
|
917
|
+
patch?: never;
|
|
918
|
+
trace?: never;
|
|
919
|
+
};
|
|
920
|
+
"/messages/{message_id}": {
|
|
921
|
+
parameters: {
|
|
922
|
+
query?: never;
|
|
923
|
+
header?: {
|
|
924
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
925
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
926
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
927
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
928
|
+
};
|
|
929
|
+
path: {
|
|
930
|
+
message_id: components["parameters"]["MessageId"];
|
|
931
|
+
};
|
|
932
|
+
cookie?: never;
|
|
933
|
+
};
|
|
934
|
+
get?: never;
|
|
935
|
+
put?: never;
|
|
936
|
+
post?: never;
|
|
937
|
+
/**
|
|
938
|
+
* Delete a message
|
|
939
|
+
* @description `scope=me` hides it for the current user only (any message). `scope=everyone` removes
|
|
940
|
+
* it for all participants (own messages, and any message for group admins).
|
|
941
|
+
*/
|
|
942
|
+
delete: operations["deleteMessage"];
|
|
943
|
+
options?: never;
|
|
944
|
+
head?: never;
|
|
945
|
+
/** Edit your text message */
|
|
946
|
+
patch: operations["editMessage"];
|
|
947
|
+
trace?: never;
|
|
948
|
+
};
|
|
949
|
+
"/messages/{message_id}/forward": {
|
|
950
|
+
parameters: {
|
|
951
|
+
query?: never;
|
|
952
|
+
header?: {
|
|
953
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
954
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
955
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
956
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
957
|
+
};
|
|
958
|
+
path: {
|
|
959
|
+
message_id: components["parameters"]["MessageId"];
|
|
960
|
+
};
|
|
961
|
+
cookie?: never;
|
|
962
|
+
};
|
|
963
|
+
get?: never;
|
|
964
|
+
put?: never;
|
|
965
|
+
/** Forward a message to other chats */
|
|
966
|
+
post: operations["forwardMessage"];
|
|
967
|
+
delete?: never;
|
|
968
|
+
options?: never;
|
|
969
|
+
head?: never;
|
|
970
|
+
patch?: never;
|
|
971
|
+
trace?: never;
|
|
972
|
+
};
|
|
973
|
+
"/requests": {
|
|
974
|
+
parameters: {
|
|
975
|
+
query?: never;
|
|
976
|
+
header?: {
|
|
977
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
978
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
979
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
980
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
981
|
+
};
|
|
982
|
+
path?: never;
|
|
983
|
+
cookie?: never;
|
|
984
|
+
};
|
|
985
|
+
/** Inbox of approval requests */
|
|
986
|
+
get: operations["listApprovalRequests"];
|
|
987
|
+
put?: never;
|
|
988
|
+
post?: never;
|
|
989
|
+
delete?: never;
|
|
990
|
+
options?: never;
|
|
991
|
+
head?: never;
|
|
992
|
+
patch?: never;
|
|
993
|
+
trace?: never;
|
|
994
|
+
};
|
|
995
|
+
"/requests/{request_id}/approve": {
|
|
996
|
+
parameters: {
|
|
997
|
+
query?: never;
|
|
998
|
+
header?: {
|
|
999
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1000
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1001
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1002
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1003
|
+
};
|
|
1004
|
+
path: {
|
|
1005
|
+
request_id: components["parameters"]["RequestId"];
|
|
1006
|
+
};
|
|
1007
|
+
cookie?: never;
|
|
1008
|
+
};
|
|
1009
|
+
get?: never;
|
|
1010
|
+
put?: never;
|
|
1011
|
+
/** Approve a request */
|
|
1012
|
+
post: operations["approveRequest"];
|
|
1013
|
+
delete?: never;
|
|
1014
|
+
options?: never;
|
|
1015
|
+
head?: never;
|
|
1016
|
+
patch?: never;
|
|
1017
|
+
trace?: never;
|
|
1018
|
+
};
|
|
1019
|
+
"/requests/{request_id}/reject": {
|
|
1020
|
+
parameters: {
|
|
1021
|
+
query?: never;
|
|
1022
|
+
header?: {
|
|
1023
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1024
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1025
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1026
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1027
|
+
};
|
|
1028
|
+
path: {
|
|
1029
|
+
request_id: components["parameters"]["RequestId"];
|
|
1030
|
+
};
|
|
1031
|
+
cookie?: never;
|
|
1032
|
+
};
|
|
1033
|
+
get?: never;
|
|
1034
|
+
put?: never;
|
|
1035
|
+
/** Reject a request */
|
|
1036
|
+
post: operations["rejectRequest"];
|
|
1037
|
+
delete?: never;
|
|
1038
|
+
options?: never;
|
|
1039
|
+
head?: never;
|
|
1040
|
+
patch?: never;
|
|
1041
|
+
trace?: never;
|
|
1042
|
+
};
|
|
1043
|
+
"/groups": {
|
|
1044
|
+
parameters: {
|
|
1045
|
+
query?: never;
|
|
1046
|
+
header?: {
|
|
1047
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1048
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1049
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1050
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1051
|
+
};
|
|
1052
|
+
path?: never;
|
|
1053
|
+
cookie?: never;
|
|
1054
|
+
};
|
|
1055
|
+
/** My groups */
|
|
1056
|
+
get: operations["listGroups"];
|
|
1057
|
+
put?: never;
|
|
1058
|
+
/**
|
|
1059
|
+
* Create a group
|
|
1060
|
+
* @description Members whose `group_invites` setting requires approval get an approval request instead of being added.
|
|
1061
|
+
*/
|
|
1062
|
+
post: operations["createGroup"];
|
|
1063
|
+
delete?: never;
|
|
1064
|
+
options?: never;
|
|
1065
|
+
head?: never;
|
|
1066
|
+
patch?: never;
|
|
1067
|
+
trace?: never;
|
|
1068
|
+
};
|
|
1069
|
+
"/groups/{chat_id}": {
|
|
1070
|
+
parameters: {
|
|
1071
|
+
query?: never;
|
|
1072
|
+
header?: {
|
|
1073
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1074
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1075
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1076
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1077
|
+
};
|
|
1078
|
+
path: {
|
|
1079
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1080
|
+
};
|
|
1081
|
+
cookie?: never;
|
|
1082
|
+
};
|
|
1083
|
+
/** Group details and members */
|
|
1084
|
+
get: operations["getGroup"];
|
|
1085
|
+
put?: never;
|
|
1086
|
+
post?: never;
|
|
1087
|
+
/** Delete the group (owner only) */
|
|
1088
|
+
delete: operations["deleteGroup"];
|
|
1089
|
+
options?: never;
|
|
1090
|
+
head?: never;
|
|
1091
|
+
/** Change name or description */
|
|
1092
|
+
patch: operations["updateGroup"];
|
|
1093
|
+
trace?: never;
|
|
1094
|
+
};
|
|
1095
|
+
"/groups/{chat_id}/avatar": {
|
|
1096
|
+
parameters: {
|
|
1097
|
+
query?: never;
|
|
1098
|
+
header?: {
|
|
1099
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1100
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1101
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1102
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1103
|
+
};
|
|
1104
|
+
path: {
|
|
1105
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1106
|
+
};
|
|
1107
|
+
cookie?: never;
|
|
1108
|
+
};
|
|
1109
|
+
get?: never;
|
|
1110
|
+
/** Set the group avatar from an uploaded attachment */
|
|
1111
|
+
put: operations["setGroupAvatar"];
|
|
1112
|
+
post?: never;
|
|
1113
|
+
delete?: never;
|
|
1114
|
+
options?: never;
|
|
1115
|
+
head?: never;
|
|
1116
|
+
patch?: never;
|
|
1117
|
+
trace?: never;
|
|
1118
|
+
};
|
|
1119
|
+
"/groups/{chat_id}/participants": {
|
|
1120
|
+
parameters: {
|
|
1121
|
+
query?: never;
|
|
1122
|
+
header?: {
|
|
1123
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1124
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1125
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1126
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1127
|
+
};
|
|
1128
|
+
path: {
|
|
1129
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1130
|
+
};
|
|
1131
|
+
cookie?: never;
|
|
1132
|
+
};
|
|
1133
|
+
get?: never;
|
|
1134
|
+
put?: never;
|
|
1135
|
+
/** Add a participant */
|
|
1136
|
+
post: operations["addGroupParticipant"];
|
|
1137
|
+
delete?: never;
|
|
1138
|
+
options?: never;
|
|
1139
|
+
head?: never;
|
|
1140
|
+
patch?: never;
|
|
1141
|
+
trace?: never;
|
|
1142
|
+
};
|
|
1143
|
+
"/groups/{chat_id}/participants/{user_id}": {
|
|
1144
|
+
parameters: {
|
|
1145
|
+
query?: never;
|
|
1146
|
+
header?: {
|
|
1147
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1148
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1149
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1150
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1151
|
+
};
|
|
1152
|
+
path: {
|
|
1153
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1154
|
+
user_id: components["parameters"]["UserId"];
|
|
1155
|
+
};
|
|
1156
|
+
cookie?: never;
|
|
1157
|
+
};
|
|
1158
|
+
get?: never;
|
|
1159
|
+
put?: never;
|
|
1160
|
+
post?: never;
|
|
1161
|
+
/** Remove a participant */
|
|
1162
|
+
delete: operations["removeGroupParticipant"];
|
|
1163
|
+
options?: never;
|
|
1164
|
+
head?: never;
|
|
1165
|
+
/** Change a participant's role */
|
|
1166
|
+
patch: operations["updateGroupParticipantRole"];
|
|
1167
|
+
trace?: never;
|
|
1168
|
+
};
|
|
1169
|
+
"/groups/{chat_id}/transfer-owner": {
|
|
1170
|
+
parameters: {
|
|
1171
|
+
query?: never;
|
|
1172
|
+
header?: {
|
|
1173
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1174
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1175
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1176
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1177
|
+
};
|
|
1178
|
+
path: {
|
|
1179
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1180
|
+
};
|
|
1181
|
+
cookie?: never;
|
|
1182
|
+
};
|
|
1183
|
+
get?: never;
|
|
1184
|
+
put?: never;
|
|
1185
|
+
/** Make another member the owner */
|
|
1186
|
+
post: operations["transferGroupOwnership"];
|
|
1187
|
+
delete?: never;
|
|
1188
|
+
options?: never;
|
|
1189
|
+
head?: never;
|
|
1190
|
+
patch?: never;
|
|
1191
|
+
trace?: never;
|
|
1192
|
+
};
|
|
1193
|
+
"/groups/{chat_id}/leave": {
|
|
1194
|
+
parameters: {
|
|
1195
|
+
query?: never;
|
|
1196
|
+
header?: {
|
|
1197
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1198
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1199
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1200
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1201
|
+
};
|
|
1202
|
+
path: {
|
|
1203
|
+
chat_id: components["parameters"]["ChatId"];
|
|
1204
|
+
};
|
|
1205
|
+
cookie?: never;
|
|
1206
|
+
};
|
|
1207
|
+
get?: never;
|
|
1208
|
+
put?: never;
|
|
1209
|
+
/**
|
|
1210
|
+
* Leave the group
|
|
1211
|
+
* @description The owner has to transfer ownership first.
|
|
1212
|
+
*/
|
|
1213
|
+
post: operations["leaveGroup"];
|
|
1214
|
+
delete?: never;
|
|
1215
|
+
options?: never;
|
|
1216
|
+
head?: never;
|
|
1217
|
+
patch?: never;
|
|
1218
|
+
trace?: never;
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
export type webhooks = Record<string, never>;
|
|
1222
|
+
export interface components {
|
|
1223
|
+
schemas: {
|
|
1224
|
+
/**
|
|
1225
|
+
* @description Decimal ID as a string (Snowflake IDs exceed 2^53).
|
|
1226
|
+
* @example 7217400317439950848
|
|
1227
|
+
*/
|
|
1228
|
+
Id: string;
|
|
1229
|
+
/** @description Opaque cursor; `null` when there are no more results. */
|
|
1230
|
+
Cursor: string | null;
|
|
1231
|
+
/** Format: date-time */
|
|
1232
|
+
Timestamp: string;
|
|
1233
|
+
Username: string;
|
|
1234
|
+
/** @description Client-generated ID that makes sending idempotent and ties acks and errors to the send. */
|
|
1235
|
+
ClientTempId: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* @description Stable machine-readable error code. New codes can appear in MINOR versions; unknown
|
|
1238
|
+
* codes must be treated like `internal_error`.
|
|
1239
|
+
* @enum {string}
|
|
1240
|
+
*/
|
|
1241
|
+
ErrorCode: "invalid_request" | "validation_failed" | "unauthenticated" | "invalid_credentials" | "two_factor_required" | "invalid_two_factor_code" | "token_expired" | "forbidden" | "not_found" | "conflict" | "already_exists" | "payload_too_large" | "unsupported_media_type" | "rate_limited" | "client_outdated" | "invalid_client_version" | "blocked_by_user" | "approval_required" | "internal_error";
|
|
1242
|
+
/** @description RFC 9457 problem details. `426 Upgrade Required` (`client_outdated`) uses the same format. */
|
|
1243
|
+
Problem: {
|
|
1244
|
+
/**
|
|
1245
|
+
* @description URI reference identifying the problem type (`about:blank` when `code` says it all).
|
|
1246
|
+
* @default about:blank
|
|
1247
|
+
*/
|
|
1248
|
+
type: string;
|
|
1249
|
+
title: string;
|
|
1250
|
+
status: number;
|
|
1251
|
+
detail?: string;
|
|
1252
|
+
instance?: string;
|
|
1253
|
+
code: components["schemas"]["ErrorCode"];
|
|
1254
|
+
/** @description Field errors for `validation_failed`. */
|
|
1255
|
+
errors?: {
|
|
1256
|
+
/** @description JSON pointer into the request body, or the parameter name. */
|
|
1257
|
+
field: string;
|
|
1258
|
+
message: string;
|
|
1259
|
+
}[];
|
|
1260
|
+
/** @description Present when `code` is `client_outdated`. */
|
|
1261
|
+
min_client_api_version?: string;
|
|
1262
|
+
/** @description Present when `code` is `client_outdated`. */
|
|
1263
|
+
api_version?: string;
|
|
1264
|
+
} & {
|
|
1265
|
+
[key: string]: unknown;
|
|
1266
|
+
};
|
|
1267
|
+
Meta: {
|
|
1268
|
+
/** @example 1.0.3 */
|
|
1269
|
+
backend_version: string;
|
|
1270
|
+
/** @example abc1234 */
|
|
1271
|
+
commit: string;
|
|
1272
|
+
/** @example 2.0.0 */
|
|
1273
|
+
api_version: string;
|
|
1274
|
+
/** @example 2.0.0 */
|
|
1275
|
+
min_client_api_version: string;
|
|
1276
|
+
};
|
|
1277
|
+
RegisterRequest: {
|
|
1278
|
+
username: components["schemas"]["Username"];
|
|
1279
|
+
display_name: string;
|
|
1280
|
+
password: string;
|
|
1281
|
+
bio?: string | null;
|
|
1282
|
+
};
|
|
1283
|
+
LoginRequest: {
|
|
1284
|
+
username: components["schemas"]["Username"];
|
|
1285
|
+
password: string;
|
|
1286
|
+
};
|
|
1287
|
+
TwoFactorLoginRequest: {
|
|
1288
|
+
login_challenge: string;
|
|
1289
|
+
code: string;
|
|
1290
|
+
};
|
|
1291
|
+
TokenResponse: {
|
|
1292
|
+
access_token: string;
|
|
1293
|
+
/** @constant */
|
|
1294
|
+
token_type: "Bearer";
|
|
1295
|
+
/** @description Seconds until the access token expires */
|
|
1296
|
+
expires_in: number;
|
|
1297
|
+
};
|
|
1298
|
+
RegisterResponse: components["schemas"]["TokenResponse"] & {
|
|
1299
|
+
device_part?: string;
|
|
1300
|
+
qr_part?: string;
|
|
1301
|
+
};
|
|
1302
|
+
TwoFactorChallenge: {
|
|
1303
|
+
/** @constant */
|
|
1304
|
+
two_factor_required: true;
|
|
1305
|
+
login_challenge: string;
|
|
1306
|
+
};
|
|
1307
|
+
LoginResponse: components["schemas"]["TokenResponse"] | components["schemas"]["TwoFactorChallenge"];
|
|
1308
|
+
RecoveryRequest: {
|
|
1309
|
+
username: components["schemas"]["Username"];
|
|
1310
|
+
device_part?: string;
|
|
1311
|
+
qr_part?: string;
|
|
1312
|
+
};
|
|
1313
|
+
RecoveryResponse: {
|
|
1314
|
+
recovery_token: string;
|
|
1315
|
+
};
|
|
1316
|
+
ResetPasswordRequest: {
|
|
1317
|
+
recovery_token: string;
|
|
1318
|
+
new_password: string;
|
|
1319
|
+
};
|
|
1320
|
+
WebSocketTicket: {
|
|
1321
|
+
ticket: string;
|
|
1322
|
+
/** @description Seconds the ticket stays valid */
|
|
1323
|
+
expires_in: number;
|
|
1324
|
+
};
|
|
1325
|
+
PasswordConfirmation: {
|
|
1326
|
+
password: string;
|
|
1327
|
+
};
|
|
1328
|
+
ChangePasswordRequest: {
|
|
1329
|
+
current_password: string;
|
|
1330
|
+
new_password: string;
|
|
1331
|
+
};
|
|
1332
|
+
UpdateMeRequest: {
|
|
1333
|
+
display_name?: string;
|
|
1334
|
+
bio?: string | null;
|
|
1335
|
+
};
|
|
1336
|
+
SetAvatarRequest: {
|
|
1337
|
+
attachment_id: components["schemas"]["Id"];
|
|
1338
|
+
};
|
|
1339
|
+
SecuritySettings: {
|
|
1340
|
+
session_duration_days: number;
|
|
1341
|
+
two_factor_enabled: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
UpdateSecuritySettingsRequest: {
|
|
1344
|
+
session_duration_days: number;
|
|
1345
|
+
};
|
|
1346
|
+
Session: {
|
|
1347
|
+
id: components["schemas"]["Id"];
|
|
1348
|
+
/** @description Sanitised user agent */
|
|
1349
|
+
device?: string | null;
|
|
1350
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1351
|
+
last_used_at: components["schemas"]["Timestamp"];
|
|
1352
|
+
expires_at?: components["schemas"]["Timestamp"];
|
|
1353
|
+
is_current: boolean;
|
|
1354
|
+
};
|
|
1355
|
+
TwoFactorSetup: {
|
|
1356
|
+
secret: string;
|
|
1357
|
+
otpauth_uri: string;
|
|
1358
|
+
};
|
|
1359
|
+
TwoFactorCode: {
|
|
1360
|
+
code: string;
|
|
1361
|
+
};
|
|
1362
|
+
DisableTwoFactorRequest: {
|
|
1363
|
+
password: string;
|
|
1364
|
+
code: string;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* @description Who may see the item. `*_except` scopes use the exception lists.
|
|
1368
|
+
* @enum {string}
|
|
1369
|
+
*/
|
|
1370
|
+
Visibility: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody";
|
|
1371
|
+
/** @enum {string} */
|
|
1372
|
+
DirectMessagePolicy: "everyone" | "shared_chats" | "wait_approval";
|
|
1373
|
+
/** @enum {string} */
|
|
1374
|
+
GroupInvitePolicy: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody" | "wait_approval";
|
|
1375
|
+
/** @enum {string} */
|
|
1376
|
+
SearchVisibility: "everyone" | "nobody";
|
|
1377
|
+
/** @description User IDs per setting; `allow` applies to `nobody_except`, `deny` to `everyone_except`. */
|
|
1378
|
+
PrivacyExceptions: {
|
|
1379
|
+
[key: string]: {
|
|
1380
|
+
allow: components["schemas"]["Id"][];
|
|
1381
|
+
deny: components["schemas"]["Id"][];
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
PrivacySettings: {
|
|
1385
|
+
avatar_visibility: components["schemas"]["Visibility"];
|
|
1386
|
+
profile_visibility: components["schemas"]["Visibility"];
|
|
1387
|
+
presence_visibility: components["schemas"]["Visibility"];
|
|
1388
|
+
read_receipts_enabled: boolean;
|
|
1389
|
+
direct_messages: components["schemas"]["DirectMessagePolicy"];
|
|
1390
|
+
group_invites: components["schemas"]["GroupInvitePolicy"];
|
|
1391
|
+
search_visibility: components["schemas"]["SearchVisibility"];
|
|
1392
|
+
exceptions: components["schemas"]["PrivacyExceptions"];
|
|
1393
|
+
};
|
|
1394
|
+
UpdatePrivacySettingsRequest: {
|
|
1395
|
+
avatar_visibility?: components["schemas"]["Visibility"];
|
|
1396
|
+
profile_visibility?: components["schemas"]["Visibility"];
|
|
1397
|
+
presence_visibility?: components["schemas"]["Visibility"];
|
|
1398
|
+
read_receipts_enabled?: boolean;
|
|
1399
|
+
direct_messages?: components["schemas"]["DirectMessagePolicy"];
|
|
1400
|
+
group_invites?: components["schemas"]["GroupInvitePolicy"];
|
|
1401
|
+
search_visibility?: components["schemas"]["SearchVisibility"];
|
|
1402
|
+
};
|
|
1403
|
+
PrivacyExceptionsRequest: {
|
|
1404
|
+
user_ids: components["schemas"]["Id"][];
|
|
1405
|
+
};
|
|
1406
|
+
/** @description A user as visible to the requesting user; hidden fields are `null`. */
|
|
1407
|
+
User: {
|
|
1408
|
+
id: components["schemas"]["Id"];
|
|
1409
|
+
username: components["schemas"]["Username"];
|
|
1410
|
+
display_name: string;
|
|
1411
|
+
/** @description The requesting user's own name for this user, if set. */
|
|
1412
|
+
contact_name?: string | null;
|
|
1413
|
+
/** @description Path of the avatar, always same-origin (`/api/v2/users/{id}/avatar`). */
|
|
1414
|
+
avatar_url: string | null;
|
|
1415
|
+
bio: string | null;
|
|
1416
|
+
is_online: boolean;
|
|
1417
|
+
last_seen: components["schemas"]["Timestamp"] | null;
|
|
1418
|
+
is_deleted: boolean;
|
|
1419
|
+
};
|
|
1420
|
+
Me: components["schemas"]["User"] & {
|
|
1421
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1422
|
+
};
|
|
1423
|
+
UserPage: {
|
|
1424
|
+
items: components["schemas"]["User"][];
|
|
1425
|
+
next_cursor: components["schemas"]["Cursor"];
|
|
1426
|
+
};
|
|
1427
|
+
AvatarVersion: {
|
|
1428
|
+
id: components["schemas"]["Id"];
|
|
1429
|
+
url: string;
|
|
1430
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1431
|
+
};
|
|
1432
|
+
ContactNameRequest: {
|
|
1433
|
+
contact_name: string;
|
|
1434
|
+
};
|
|
1435
|
+
/** @enum {string} */
|
|
1436
|
+
AttachmentKind: "image" | "audio" | "voice" | "video" | "file";
|
|
1437
|
+
/** @enum {string} */
|
|
1438
|
+
UploadPurpose: "message" | "avatar";
|
|
1439
|
+
UploadAttachmentRequest: {
|
|
1440
|
+
/** Format: binary */
|
|
1441
|
+
file: string;
|
|
1442
|
+
purpose: components["schemas"]["UploadPurpose"];
|
|
1443
|
+
kind?: components["schemas"]["AttachmentKind"];
|
|
1444
|
+
/** @description Length of a voice message */
|
|
1445
|
+
duration_ms?: number;
|
|
1446
|
+
/** @description Amplitude samples (0-255) of a voice message */
|
|
1447
|
+
waveform?: number[];
|
|
1448
|
+
};
|
|
1449
|
+
Attachment: {
|
|
1450
|
+
id: components["schemas"]["Id"];
|
|
1451
|
+
kind: components["schemas"]["AttachmentKind"];
|
|
1452
|
+
filename: string;
|
|
1453
|
+
/** @description Detected by the server */
|
|
1454
|
+
content_type: string;
|
|
1455
|
+
/** @description Bytes */
|
|
1456
|
+
size: number;
|
|
1457
|
+
/** @description Same-origin path (`/api/v2/attachments/{id}/content`) set by the server. */
|
|
1458
|
+
readonly url: string;
|
|
1459
|
+
width?: number | null;
|
|
1460
|
+
height?: number | null;
|
|
1461
|
+
readonly thumbnail_url?: string | null;
|
|
1462
|
+
duration_ms?: number | null;
|
|
1463
|
+
waveform?: number[] | null;
|
|
1464
|
+
};
|
|
1465
|
+
/** @enum {string} */
|
|
1466
|
+
MediaKind: "image" | "audio";
|
|
1467
|
+
/** @enum {string} */
|
|
1468
|
+
MessageType: "text" | "file" | "voice" | "system";
|
|
1469
|
+
Reaction: {
|
|
1470
|
+
emoji: string;
|
|
1471
|
+
user_id: components["schemas"]["Id"];
|
|
1472
|
+
};
|
|
1473
|
+
ReadReceipt: {
|
|
1474
|
+
user_id: components["schemas"]["Id"];
|
|
1475
|
+
read_at: components["schemas"]["Timestamp"];
|
|
1476
|
+
};
|
|
1477
|
+
ForwardedFrom: {
|
|
1478
|
+
message_id: components["schemas"]["Id"];
|
|
1479
|
+
sender_id: components["schemas"]["Id"] | null;
|
|
1480
|
+
sender_name: string;
|
|
1481
|
+
};
|
|
1482
|
+
Message: {
|
|
1483
|
+
id: components["schemas"]["Id"];
|
|
1484
|
+
chat_id: components["schemas"]["Id"];
|
|
1485
|
+
type: components["schemas"]["MessageType"];
|
|
1486
|
+
/** @description `null` for system messages. */
|
|
1487
|
+
sender: components["schemas"]["User"] | null;
|
|
1488
|
+
/** @description Text, or the caption of a file; `null` when deleted. */
|
|
1489
|
+
content: string | null;
|
|
1490
|
+
attachment: components["schemas"]["Attachment"] | null;
|
|
1491
|
+
reply_to: components["schemas"]["Id"] | null;
|
|
1492
|
+
forwarded_from: components["schemas"]["ForwardedFrom"] | null;
|
|
1493
|
+
reactions: components["schemas"]["Reaction"][];
|
|
1494
|
+
read_by: components["schemas"]["ReadReceipt"][];
|
|
1495
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1496
|
+
edited_at: components["schemas"]["Timestamp"] | null;
|
|
1497
|
+
is_deleted: boolean;
|
|
1498
|
+
client_temp_id?: components["schemas"]["ClientTempId"];
|
|
1499
|
+
};
|
|
1500
|
+
MessagePage: {
|
|
1501
|
+
/** @description Oldest to newest */
|
|
1502
|
+
items: components["schemas"]["Message"][];
|
|
1503
|
+
/**
|
|
1504
|
+
* @description Continues in the direction of the request: pass it as `before` (older) for the
|
|
1505
|
+
* default, `before` and `around` requests, or as `after` (newer) for `after` requests.
|
|
1506
|
+
*/
|
|
1507
|
+
next_cursor: components["schemas"]["Id"] | null;
|
|
1508
|
+
/** @description The opposite direction (`after` for the default request, `before` for an `after` request). */
|
|
1509
|
+
prev_cursor: components["schemas"]["Id"] | null;
|
|
1510
|
+
};
|
|
1511
|
+
SearchHit: {
|
|
1512
|
+
message: components["schemas"]["Message"];
|
|
1513
|
+
/** @description Plain-text excerpt; never HTML. */
|
|
1514
|
+
highlight?: string | null;
|
|
1515
|
+
};
|
|
1516
|
+
MessageSearchPage: {
|
|
1517
|
+
items: components["schemas"]["SearchHit"][];
|
|
1518
|
+
next_cursor: components["schemas"]["Cursor"];
|
|
1519
|
+
};
|
|
1520
|
+
SendMessageRequest: {
|
|
1521
|
+
client_temp_id: components["schemas"]["ClientTempId"];
|
|
1522
|
+
/** @enum {string} */
|
|
1523
|
+
type: "text" | "file" | "voice";
|
|
1524
|
+
content?: string | null;
|
|
1525
|
+
/** @description Required and not null for `file` and `voice`; never a URL. */
|
|
1526
|
+
attachment_id?: components["schemas"]["Id"] | null;
|
|
1527
|
+
reply_to?: components["schemas"]["Id"] | null;
|
|
1528
|
+
};
|
|
1529
|
+
EditMessageRequest: {
|
|
1530
|
+
content: string;
|
|
1531
|
+
};
|
|
1532
|
+
ForwardMessageRequest: {
|
|
1533
|
+
chat_ids: components["schemas"]["Id"][];
|
|
1534
|
+
};
|
|
1535
|
+
MarkReadRequest: {
|
|
1536
|
+
/** @description Everything up to and including this message is read. */
|
|
1537
|
+
message_id: components["schemas"]["Id"];
|
|
1538
|
+
};
|
|
1539
|
+
/** @enum {string} */
|
|
1540
|
+
ChatType: "direct" | "group";
|
|
1541
|
+
/** @enum {string} */
|
|
1542
|
+
GroupRole: "owner" | "admin" | "member";
|
|
1543
|
+
Chat: {
|
|
1544
|
+
id: components["schemas"]["Id"];
|
|
1545
|
+
type: components["schemas"]["ChatType"];
|
|
1546
|
+
/** @description Display name of the peer or the group */
|
|
1547
|
+
name: string;
|
|
1548
|
+
avatar_url: string | null;
|
|
1549
|
+
/** @description The other user of a direct chat; `null` for groups. */
|
|
1550
|
+
peer: components["schemas"]["User"] | null;
|
|
1551
|
+
is_pinned: boolean;
|
|
1552
|
+
unread_count: number;
|
|
1553
|
+
last_message: components["schemas"]["Message"] | null;
|
|
1554
|
+
/** @description Only for groups. */
|
|
1555
|
+
my_role?: components["schemas"]["GroupRole"] | null;
|
|
1556
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1557
|
+
};
|
|
1558
|
+
ChatPage: {
|
|
1559
|
+
items: components["schemas"]["Chat"][];
|
|
1560
|
+
next_cursor: components["schemas"]["Cursor"];
|
|
1561
|
+
};
|
|
1562
|
+
CreateChatRequest: {
|
|
1563
|
+
user_id: components["schemas"]["Id"];
|
|
1564
|
+
initial_message?: string | null;
|
|
1565
|
+
};
|
|
1566
|
+
GroupMember: {
|
|
1567
|
+
user: components["schemas"]["User"];
|
|
1568
|
+
role: components["schemas"]["GroupRole"];
|
|
1569
|
+
joined_at: components["schemas"]["Timestamp"];
|
|
1570
|
+
};
|
|
1571
|
+
Group: {
|
|
1572
|
+
id: components["schemas"]["Id"];
|
|
1573
|
+
name: string;
|
|
1574
|
+
description: string | null;
|
|
1575
|
+
avatar_url: string | null;
|
|
1576
|
+
owner_id: components["schemas"]["Id"];
|
|
1577
|
+
my_role: components["schemas"]["GroupRole"];
|
|
1578
|
+
members: components["schemas"]["GroupMember"][];
|
|
1579
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1580
|
+
};
|
|
1581
|
+
CreateGroupRequest: {
|
|
1582
|
+
name: string;
|
|
1583
|
+
description?: string | null;
|
|
1584
|
+
member_ids: components["schemas"]["Id"][];
|
|
1585
|
+
};
|
|
1586
|
+
UpdateGroupRequest: {
|
|
1587
|
+
name?: string;
|
|
1588
|
+
description?: string | null;
|
|
1589
|
+
};
|
|
1590
|
+
AddParticipantRequest: {
|
|
1591
|
+
user_id: components["schemas"]["Id"];
|
|
1592
|
+
};
|
|
1593
|
+
UpdateRoleRequest: {
|
|
1594
|
+
/** @enum {string} */
|
|
1595
|
+
role: "admin" | "member";
|
|
1596
|
+
};
|
|
1597
|
+
TransferOwnerRequest: {
|
|
1598
|
+
user_id: components["schemas"]["Id"];
|
|
1599
|
+
};
|
|
1600
|
+
/** @enum {string} */
|
|
1601
|
+
ApprovalRequestType: "direct_message" | "group_invite";
|
|
1602
|
+
/** @enum {string} */
|
|
1603
|
+
ApprovalRequestStatus: "pending" | "approved" | "rejected";
|
|
1604
|
+
ApprovalRequest: {
|
|
1605
|
+
id: components["schemas"]["Id"];
|
|
1606
|
+
type: components["schemas"]["ApprovalRequestType"];
|
|
1607
|
+
status: components["schemas"]["ApprovalRequestStatus"];
|
|
1608
|
+
requester: components["schemas"]["User"];
|
|
1609
|
+
/** @description Only for `group_invite` */
|
|
1610
|
+
group_name?: string | null;
|
|
1611
|
+
/** @description First message of a direct-message request */
|
|
1612
|
+
preview?: string | null;
|
|
1613
|
+
created_at: components["schemas"]["Timestamp"];
|
|
1614
|
+
};
|
|
1615
|
+
};
|
|
1616
|
+
responses: {
|
|
1617
|
+
/** @description The `X-Client-Api-Version` header has another MAJOR version than the server or is below `min_client_api_version` (`client_outdated`). Not returned by `/meta`, which clients use to find out the current versions. */
|
|
1618
|
+
ClientOutdated: {
|
|
1619
|
+
headers: {
|
|
1620
|
+
[name: string]: unknown;
|
|
1621
|
+
};
|
|
1622
|
+
content: {
|
|
1623
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
/** @description Malformed request, or a malformed `X-Client-Api-Version` header (`invalid_client_version`) */
|
|
1627
|
+
BadRequest: {
|
|
1628
|
+
headers: {
|
|
1629
|
+
[name: string]: unknown;
|
|
1630
|
+
};
|
|
1631
|
+
content: {
|
|
1632
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
/** @description Missing, invalid or expired credentials */
|
|
1636
|
+
Unauthorized: {
|
|
1637
|
+
headers: {
|
|
1638
|
+
[name: string]: unknown;
|
|
1639
|
+
};
|
|
1640
|
+
content: {
|
|
1641
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
/** @description Authenticated but not allowed */
|
|
1645
|
+
Forbidden: {
|
|
1646
|
+
headers: {
|
|
1647
|
+
[name: string]: unknown;
|
|
1648
|
+
};
|
|
1649
|
+
content: {
|
|
1650
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
/** @description Does not exist or is not visible to the current user */
|
|
1654
|
+
NotFound: {
|
|
1655
|
+
headers: {
|
|
1656
|
+
[name: string]: unknown;
|
|
1657
|
+
};
|
|
1658
|
+
content: {
|
|
1659
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
/** @description The state of the resource does not allow this */
|
|
1663
|
+
Conflict: {
|
|
1664
|
+
headers: {
|
|
1665
|
+
[name: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
content: {
|
|
1668
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
/** @description Upload exceeds the size limit */
|
|
1672
|
+
PayloadTooLarge: {
|
|
1673
|
+
headers: {
|
|
1674
|
+
[name: string]: unknown;
|
|
1675
|
+
};
|
|
1676
|
+
content: {
|
|
1677
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
/** @description The content type is not allowed */
|
|
1681
|
+
UnsupportedMediaType: {
|
|
1682
|
+
headers: {
|
|
1683
|
+
[name: string]: unknown;
|
|
1684
|
+
};
|
|
1685
|
+
content: {
|
|
1686
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
/** @description Syntactically valid but rejected values; `errors` lists the fields */
|
|
1690
|
+
ValidationFailed: {
|
|
1691
|
+
headers: {
|
|
1692
|
+
[name: string]: unknown;
|
|
1693
|
+
};
|
|
1694
|
+
content: {
|
|
1695
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
/** @description Rate limit exceeded */
|
|
1699
|
+
TooManyRequests: {
|
|
1700
|
+
headers: {
|
|
1701
|
+
/** @description Seconds until the next attempt is allowed */
|
|
1702
|
+
"Retry-After"?: number;
|
|
1703
|
+
[name: string]: unknown;
|
|
1704
|
+
};
|
|
1705
|
+
content: {
|
|
1706
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
1707
|
+
};
|
|
1708
|
+
};
|
|
1709
|
+
};
|
|
1710
|
+
parameters: {
|
|
1711
|
+
/** @description Page size */
|
|
1712
|
+
Limit: number;
|
|
1713
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
1714
|
+
After: components["schemas"]["Cursor"];
|
|
1715
|
+
ChatId: components["schemas"]["Id"];
|
|
1716
|
+
MessageId: components["schemas"]["Id"];
|
|
1717
|
+
UserId: components["schemas"]["Id"];
|
|
1718
|
+
RequestId: components["schemas"]["Id"];
|
|
1719
|
+
AttachmentId: components["schemas"]["Id"];
|
|
1720
|
+
SessionId: components["schemas"]["Id"];
|
|
1721
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1722
|
+
ClientVersion: string;
|
|
1723
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1724
|
+
ClientApiVersion: string;
|
|
1725
|
+
};
|
|
1726
|
+
requestBodies: never;
|
|
1727
|
+
headers: {
|
|
1728
|
+
/** @description HttpOnly, Secure, SameSite refresh cookie scoped to `/api/v2/auth`. Login and refresh set it; logout clears it (expired cookie). */
|
|
1729
|
+
RefreshCookie: string;
|
|
1730
|
+
};
|
|
1731
|
+
pathItems: never;
|
|
1732
|
+
}
|
|
1733
|
+
export type $defs = Record<string, never>;
|
|
1734
|
+
export interface operations {
|
|
1735
|
+
getMeta: {
|
|
1736
|
+
parameters: {
|
|
1737
|
+
query?: never;
|
|
1738
|
+
header?: never;
|
|
1739
|
+
path?: never;
|
|
1740
|
+
cookie?: never;
|
|
1741
|
+
};
|
|
1742
|
+
requestBody?: never;
|
|
1743
|
+
responses: {
|
|
1744
|
+
/** @description Versions */
|
|
1745
|
+
200: {
|
|
1746
|
+
headers: {
|
|
1747
|
+
/** @description `public, max-age=60` */
|
|
1748
|
+
"Cache-Control"?: string;
|
|
1749
|
+
[name: string]: unknown;
|
|
1750
|
+
};
|
|
1751
|
+
content: {
|
|
1752
|
+
"application/json": components["schemas"]["Meta"];
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
429: components["responses"]["TooManyRequests"];
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
register: {
|
|
1759
|
+
parameters: {
|
|
1760
|
+
query?: never;
|
|
1761
|
+
header?: {
|
|
1762
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1763
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1764
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1765
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1766
|
+
};
|
|
1767
|
+
path?: never;
|
|
1768
|
+
cookie?: never;
|
|
1769
|
+
};
|
|
1770
|
+
requestBody: {
|
|
1771
|
+
content: {
|
|
1772
|
+
"application/json": components["schemas"]["RegisterRequest"];
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
responses: {
|
|
1776
|
+
/** @description Account created and signed in */
|
|
1777
|
+
201: {
|
|
1778
|
+
headers: {
|
|
1779
|
+
"Set-Cookie": components["headers"]["RefreshCookie"];
|
|
1780
|
+
[name: string]: unknown;
|
|
1781
|
+
};
|
|
1782
|
+
content: {
|
|
1783
|
+
"application/json": components["schemas"]["RegisterResponse"];
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
400: components["responses"]["BadRequest"];
|
|
1787
|
+
409: components["responses"]["Conflict"];
|
|
1788
|
+
422: components["responses"]["ValidationFailed"];
|
|
1789
|
+
426: components["responses"]["ClientOutdated"];
|
|
1790
|
+
429: components["responses"]["TooManyRequests"];
|
|
1791
|
+
};
|
|
1792
|
+
};
|
|
1793
|
+
login: {
|
|
1794
|
+
parameters: {
|
|
1795
|
+
query?: never;
|
|
1796
|
+
header?: {
|
|
1797
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1798
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1799
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1800
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1801
|
+
};
|
|
1802
|
+
path?: never;
|
|
1803
|
+
cookie?: never;
|
|
1804
|
+
};
|
|
1805
|
+
requestBody: {
|
|
1806
|
+
content: {
|
|
1807
|
+
"application/json": components["schemas"]["LoginRequest"];
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
responses: {
|
|
1811
|
+
/** @description Signed in, or a two-factor challenge */
|
|
1812
|
+
200: {
|
|
1813
|
+
headers: {
|
|
1814
|
+
"Set-Cookie": components["headers"]["RefreshCookie"];
|
|
1815
|
+
[name: string]: unknown;
|
|
1816
|
+
};
|
|
1817
|
+
content: {
|
|
1818
|
+
"application/json": components["schemas"]["LoginResponse"];
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
400: components["responses"]["BadRequest"];
|
|
1822
|
+
401: components["responses"]["Unauthorized"];
|
|
1823
|
+
426: components["responses"]["ClientOutdated"];
|
|
1824
|
+
429: components["responses"]["TooManyRequests"];
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
1827
|
+
loginTwoFactor: {
|
|
1828
|
+
parameters: {
|
|
1829
|
+
query?: never;
|
|
1830
|
+
header?: {
|
|
1831
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1832
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1833
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1834
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1835
|
+
};
|
|
1836
|
+
path?: never;
|
|
1837
|
+
cookie?: never;
|
|
1838
|
+
};
|
|
1839
|
+
requestBody: {
|
|
1840
|
+
content: {
|
|
1841
|
+
"application/json": components["schemas"]["TwoFactorLoginRequest"];
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
responses: {
|
|
1845
|
+
/** @description Signed in */
|
|
1846
|
+
200: {
|
|
1847
|
+
headers: {
|
|
1848
|
+
"Set-Cookie": components["headers"]["RefreshCookie"];
|
|
1849
|
+
[name: string]: unknown;
|
|
1850
|
+
};
|
|
1851
|
+
content: {
|
|
1852
|
+
"application/json": components["schemas"]["TokenResponse"];
|
|
1853
|
+
};
|
|
1854
|
+
};
|
|
1855
|
+
400: components["responses"]["BadRequest"];
|
|
1856
|
+
401: components["responses"]["Unauthorized"];
|
|
1857
|
+
426: components["responses"]["ClientOutdated"];
|
|
1858
|
+
429: components["responses"]["TooManyRequests"];
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
refreshToken: {
|
|
1862
|
+
parameters: {
|
|
1863
|
+
query?: never;
|
|
1864
|
+
header?: {
|
|
1865
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1866
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1867
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1868
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1869
|
+
};
|
|
1870
|
+
path?: never;
|
|
1871
|
+
cookie?: never;
|
|
1872
|
+
};
|
|
1873
|
+
requestBody?: never;
|
|
1874
|
+
responses: {
|
|
1875
|
+
/** @description New access token */
|
|
1876
|
+
200: {
|
|
1877
|
+
headers: {
|
|
1878
|
+
"Set-Cookie": components["headers"]["RefreshCookie"];
|
|
1879
|
+
[name: string]: unknown;
|
|
1880
|
+
};
|
|
1881
|
+
content: {
|
|
1882
|
+
"application/json": components["schemas"]["TokenResponse"];
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
400: components["responses"]["BadRequest"];
|
|
1886
|
+
401: components["responses"]["Unauthorized"];
|
|
1887
|
+
426: components["responses"]["ClientOutdated"];
|
|
1888
|
+
429: components["responses"]["TooManyRequests"];
|
|
1889
|
+
};
|
|
1890
|
+
};
|
|
1891
|
+
logout: {
|
|
1892
|
+
parameters: {
|
|
1893
|
+
query?: never;
|
|
1894
|
+
header?: {
|
|
1895
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1896
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1897
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1898
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1899
|
+
};
|
|
1900
|
+
path?: never;
|
|
1901
|
+
cookie?: never;
|
|
1902
|
+
};
|
|
1903
|
+
requestBody?: never;
|
|
1904
|
+
responses: {
|
|
1905
|
+
/** @description Signed out; the refresh cookie is cleared */
|
|
1906
|
+
204: {
|
|
1907
|
+
headers: {
|
|
1908
|
+
"Set-Cookie": components["headers"]["RefreshCookie"];
|
|
1909
|
+
[name: string]: unknown;
|
|
1910
|
+
};
|
|
1911
|
+
content?: never;
|
|
1912
|
+
};
|
|
1913
|
+
400: components["responses"]["BadRequest"];
|
|
1914
|
+
401: components["responses"]["Unauthorized"];
|
|
1915
|
+
426: components["responses"]["ClientOutdated"];
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
startRecovery: {
|
|
1919
|
+
parameters: {
|
|
1920
|
+
query?: never;
|
|
1921
|
+
header?: {
|
|
1922
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1923
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1924
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1925
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1926
|
+
};
|
|
1927
|
+
path?: never;
|
|
1928
|
+
cookie?: never;
|
|
1929
|
+
};
|
|
1930
|
+
requestBody: {
|
|
1931
|
+
content: {
|
|
1932
|
+
"application/json": components["schemas"]["RecoveryRequest"];
|
|
1933
|
+
};
|
|
1934
|
+
};
|
|
1935
|
+
responses: {
|
|
1936
|
+
/** @description Recovery token */
|
|
1937
|
+
200: {
|
|
1938
|
+
headers: {
|
|
1939
|
+
[name: string]: unknown;
|
|
1940
|
+
};
|
|
1941
|
+
content: {
|
|
1942
|
+
"application/json": components["schemas"]["RecoveryResponse"];
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
400: components["responses"]["BadRequest"];
|
|
1946
|
+
404: components["responses"]["NotFound"];
|
|
1947
|
+
426: components["responses"]["ClientOutdated"];
|
|
1948
|
+
429: components["responses"]["TooManyRequests"];
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
resetPassword: {
|
|
1952
|
+
parameters: {
|
|
1953
|
+
query?: never;
|
|
1954
|
+
header?: {
|
|
1955
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1956
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1957
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1958
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1959
|
+
};
|
|
1960
|
+
path?: never;
|
|
1961
|
+
cookie?: never;
|
|
1962
|
+
};
|
|
1963
|
+
requestBody: {
|
|
1964
|
+
content: {
|
|
1965
|
+
"application/json": components["schemas"]["ResetPasswordRequest"];
|
|
1966
|
+
};
|
|
1967
|
+
};
|
|
1968
|
+
responses: {
|
|
1969
|
+
/** @description Password changed; all sessions are revoked */
|
|
1970
|
+
204: {
|
|
1971
|
+
headers: {
|
|
1972
|
+
[name: string]: unknown;
|
|
1973
|
+
};
|
|
1974
|
+
content?: never;
|
|
1975
|
+
};
|
|
1976
|
+
400: components["responses"]["BadRequest"];
|
|
1977
|
+
401: components["responses"]["Unauthorized"];
|
|
1978
|
+
422: components["responses"]["ValidationFailed"];
|
|
1979
|
+
426: components["responses"]["ClientOutdated"];
|
|
1980
|
+
429: components["responses"]["TooManyRequests"];
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
createWebSocketTicket: {
|
|
1984
|
+
parameters: {
|
|
1985
|
+
query?: never;
|
|
1986
|
+
header?: {
|
|
1987
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1988
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
1989
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
1990
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
1991
|
+
};
|
|
1992
|
+
path?: never;
|
|
1993
|
+
cookie?: never;
|
|
1994
|
+
};
|
|
1995
|
+
requestBody?: never;
|
|
1996
|
+
responses: {
|
|
1997
|
+
/** @description Ticket */
|
|
1998
|
+
201: {
|
|
1999
|
+
headers: {
|
|
2000
|
+
[name: string]: unknown;
|
|
2001
|
+
};
|
|
2002
|
+
content: {
|
|
2003
|
+
"application/json": components["schemas"]["WebSocketTicket"];
|
|
2004
|
+
};
|
|
2005
|
+
};
|
|
2006
|
+
400: components["responses"]["BadRequest"];
|
|
2007
|
+
401: components["responses"]["Unauthorized"];
|
|
2008
|
+
426: components["responses"]["ClientOutdated"];
|
|
2009
|
+
429: components["responses"]["TooManyRequests"];
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
getMe: {
|
|
2013
|
+
parameters: {
|
|
2014
|
+
query?: never;
|
|
2015
|
+
header?: {
|
|
2016
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2017
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2018
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2019
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2020
|
+
};
|
|
2021
|
+
path?: never;
|
|
2022
|
+
cookie?: never;
|
|
2023
|
+
};
|
|
2024
|
+
requestBody?: never;
|
|
2025
|
+
responses: {
|
|
2026
|
+
/** @description The current user */
|
|
2027
|
+
200: {
|
|
2028
|
+
headers: {
|
|
2029
|
+
[name: string]: unknown;
|
|
2030
|
+
};
|
|
2031
|
+
content: {
|
|
2032
|
+
"application/json": components["schemas"]["Me"];
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
400: components["responses"]["BadRequest"];
|
|
2036
|
+
401: components["responses"]["Unauthorized"];
|
|
2037
|
+
426: components["responses"]["ClientOutdated"];
|
|
2038
|
+
};
|
|
2039
|
+
};
|
|
2040
|
+
deleteMe: {
|
|
2041
|
+
parameters: {
|
|
2042
|
+
query?: never;
|
|
2043
|
+
header?: {
|
|
2044
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2045
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2046
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2047
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2048
|
+
};
|
|
2049
|
+
path?: never;
|
|
2050
|
+
cookie?: never;
|
|
2051
|
+
};
|
|
2052
|
+
requestBody: {
|
|
2053
|
+
content: {
|
|
2054
|
+
"application/json": components["schemas"]["PasswordConfirmation"];
|
|
2055
|
+
};
|
|
2056
|
+
};
|
|
2057
|
+
responses: {
|
|
2058
|
+
/** @description Account deleted */
|
|
2059
|
+
204: {
|
|
2060
|
+
headers: {
|
|
2061
|
+
[name: string]: unknown;
|
|
2062
|
+
};
|
|
2063
|
+
content?: never;
|
|
2064
|
+
};
|
|
2065
|
+
400: components["responses"]["BadRequest"];
|
|
2066
|
+
401: components["responses"]["Unauthorized"];
|
|
2067
|
+
403: components["responses"]["Forbidden"];
|
|
2068
|
+
426: components["responses"]["ClientOutdated"];
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
updateMe: {
|
|
2072
|
+
parameters: {
|
|
2073
|
+
query?: never;
|
|
2074
|
+
header?: {
|
|
2075
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2076
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2077
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2078
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2079
|
+
};
|
|
2080
|
+
path?: never;
|
|
2081
|
+
cookie?: never;
|
|
2082
|
+
};
|
|
2083
|
+
requestBody: {
|
|
2084
|
+
content: {
|
|
2085
|
+
"application/json": components["schemas"]["UpdateMeRequest"];
|
|
2086
|
+
};
|
|
2087
|
+
};
|
|
2088
|
+
responses: {
|
|
2089
|
+
/** @description Updated user */
|
|
2090
|
+
200: {
|
|
2091
|
+
headers: {
|
|
2092
|
+
[name: string]: unknown;
|
|
2093
|
+
};
|
|
2094
|
+
content: {
|
|
2095
|
+
"application/json": components["schemas"]["Me"];
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
400: components["responses"]["BadRequest"];
|
|
2099
|
+
401: components["responses"]["Unauthorized"];
|
|
2100
|
+
422: components["responses"]["ValidationFailed"];
|
|
2101
|
+
426: components["responses"]["ClientOutdated"];
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
setMyAvatar: {
|
|
2105
|
+
parameters: {
|
|
2106
|
+
query?: never;
|
|
2107
|
+
header?: {
|
|
2108
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2109
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2110
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2111
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2112
|
+
};
|
|
2113
|
+
path?: never;
|
|
2114
|
+
cookie?: never;
|
|
2115
|
+
};
|
|
2116
|
+
requestBody: {
|
|
2117
|
+
content: {
|
|
2118
|
+
"application/json": components["schemas"]["SetAvatarRequest"];
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
responses: {
|
|
2122
|
+
/** @description Updated user */
|
|
2123
|
+
200: {
|
|
2124
|
+
headers: {
|
|
2125
|
+
[name: string]: unknown;
|
|
2126
|
+
};
|
|
2127
|
+
content: {
|
|
2128
|
+
"application/json": components["schemas"]["Me"];
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
400: components["responses"]["BadRequest"];
|
|
2132
|
+
401: components["responses"]["Unauthorized"];
|
|
2133
|
+
404: components["responses"]["NotFound"];
|
|
2134
|
+
426: components["responses"]["ClientOutdated"];
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
changePassword: {
|
|
2138
|
+
parameters: {
|
|
2139
|
+
query?: never;
|
|
2140
|
+
header?: {
|
|
2141
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2142
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2143
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2144
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2145
|
+
};
|
|
2146
|
+
path?: never;
|
|
2147
|
+
cookie?: never;
|
|
2148
|
+
};
|
|
2149
|
+
requestBody: {
|
|
2150
|
+
content: {
|
|
2151
|
+
"application/json": components["schemas"]["ChangePasswordRequest"];
|
|
2152
|
+
};
|
|
2153
|
+
};
|
|
2154
|
+
responses: {
|
|
2155
|
+
/** @description Password changed */
|
|
2156
|
+
204: {
|
|
2157
|
+
headers: {
|
|
2158
|
+
[name: string]: unknown;
|
|
2159
|
+
};
|
|
2160
|
+
content?: never;
|
|
2161
|
+
};
|
|
2162
|
+
400: components["responses"]["BadRequest"];
|
|
2163
|
+
401: components["responses"]["Unauthorized"];
|
|
2164
|
+
422: components["responses"]["ValidationFailed"];
|
|
2165
|
+
426: components["responses"]["ClientOutdated"];
|
|
2166
|
+
429: components["responses"]["TooManyRequests"];
|
|
2167
|
+
};
|
|
2168
|
+
};
|
|
2169
|
+
getSecuritySettings: {
|
|
2170
|
+
parameters: {
|
|
2171
|
+
query?: never;
|
|
2172
|
+
header?: {
|
|
2173
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2174
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2175
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2176
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2177
|
+
};
|
|
2178
|
+
path?: never;
|
|
2179
|
+
cookie?: never;
|
|
2180
|
+
};
|
|
2181
|
+
requestBody?: never;
|
|
2182
|
+
responses: {
|
|
2183
|
+
/** @description Settings */
|
|
2184
|
+
200: {
|
|
2185
|
+
headers: {
|
|
2186
|
+
[name: string]: unknown;
|
|
2187
|
+
};
|
|
2188
|
+
content: {
|
|
2189
|
+
"application/json": components["schemas"]["SecuritySettings"];
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
400: components["responses"]["BadRequest"];
|
|
2193
|
+
401: components["responses"]["Unauthorized"];
|
|
2194
|
+
426: components["responses"]["ClientOutdated"];
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
updateSecuritySettings: {
|
|
2198
|
+
parameters: {
|
|
2199
|
+
query?: never;
|
|
2200
|
+
header?: {
|
|
2201
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2202
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2203
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2204
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2205
|
+
};
|
|
2206
|
+
path?: never;
|
|
2207
|
+
cookie?: never;
|
|
2208
|
+
};
|
|
2209
|
+
requestBody: {
|
|
2210
|
+
content: {
|
|
2211
|
+
"application/json": components["schemas"]["UpdateSecuritySettingsRequest"];
|
|
2212
|
+
};
|
|
2213
|
+
};
|
|
2214
|
+
responses: {
|
|
2215
|
+
/** @description Settings */
|
|
2216
|
+
200: {
|
|
2217
|
+
headers: {
|
|
2218
|
+
[name: string]: unknown;
|
|
2219
|
+
};
|
|
2220
|
+
content: {
|
|
2221
|
+
"application/json": components["schemas"]["SecuritySettings"];
|
|
2222
|
+
};
|
|
2223
|
+
};
|
|
2224
|
+
400: components["responses"]["BadRequest"];
|
|
2225
|
+
401: components["responses"]["Unauthorized"];
|
|
2226
|
+
422: components["responses"]["ValidationFailed"];
|
|
2227
|
+
426: components["responses"]["ClientOutdated"];
|
|
2228
|
+
};
|
|
2229
|
+
};
|
|
2230
|
+
listSessions: {
|
|
2231
|
+
parameters: {
|
|
2232
|
+
query?: never;
|
|
2233
|
+
header?: {
|
|
2234
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2235
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2236
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2237
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2238
|
+
};
|
|
2239
|
+
path?: never;
|
|
2240
|
+
cookie?: never;
|
|
2241
|
+
};
|
|
2242
|
+
requestBody?: never;
|
|
2243
|
+
responses: {
|
|
2244
|
+
/** @description Sessions of the current user */
|
|
2245
|
+
200: {
|
|
2246
|
+
headers: {
|
|
2247
|
+
[name: string]: unknown;
|
|
2248
|
+
};
|
|
2249
|
+
content: {
|
|
2250
|
+
"application/json": {
|
|
2251
|
+
items: components["schemas"]["Session"][];
|
|
2252
|
+
};
|
|
2253
|
+
};
|
|
2254
|
+
};
|
|
2255
|
+
400: components["responses"]["BadRequest"];
|
|
2256
|
+
401: components["responses"]["Unauthorized"];
|
|
2257
|
+
426: components["responses"]["ClientOutdated"];
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
2260
|
+
revokeOtherSessions: {
|
|
2261
|
+
parameters: {
|
|
2262
|
+
query?: never;
|
|
2263
|
+
header?: {
|
|
2264
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2265
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2266
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2267
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2268
|
+
};
|
|
2269
|
+
path?: never;
|
|
2270
|
+
cookie?: never;
|
|
2271
|
+
};
|
|
2272
|
+
requestBody?: never;
|
|
2273
|
+
responses: {
|
|
2274
|
+
/** @description Other sessions revoked */
|
|
2275
|
+
204: {
|
|
2276
|
+
headers: {
|
|
2277
|
+
[name: string]: unknown;
|
|
2278
|
+
};
|
|
2279
|
+
content?: never;
|
|
2280
|
+
};
|
|
2281
|
+
400: components["responses"]["BadRequest"];
|
|
2282
|
+
401: components["responses"]["Unauthorized"];
|
|
2283
|
+
426: components["responses"]["ClientOutdated"];
|
|
2284
|
+
};
|
|
2285
|
+
};
|
|
2286
|
+
revokeSession: {
|
|
2287
|
+
parameters: {
|
|
2288
|
+
query?: never;
|
|
2289
|
+
header?: {
|
|
2290
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2291
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2292
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2293
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2294
|
+
};
|
|
2295
|
+
path: {
|
|
2296
|
+
session_id: components["parameters"]["SessionId"];
|
|
2297
|
+
};
|
|
2298
|
+
cookie?: never;
|
|
2299
|
+
};
|
|
2300
|
+
requestBody?: never;
|
|
2301
|
+
responses: {
|
|
2302
|
+
/** @description Session revoked */
|
|
2303
|
+
204: {
|
|
2304
|
+
headers: {
|
|
2305
|
+
[name: string]: unknown;
|
|
2306
|
+
};
|
|
2307
|
+
content?: never;
|
|
2308
|
+
};
|
|
2309
|
+
400: components["responses"]["BadRequest"];
|
|
2310
|
+
401: components["responses"]["Unauthorized"];
|
|
2311
|
+
404: components["responses"]["NotFound"];
|
|
2312
|
+
426: components["responses"]["ClientOutdated"];
|
|
2313
|
+
};
|
|
2314
|
+
};
|
|
2315
|
+
setupTwoFactor: {
|
|
2316
|
+
parameters: {
|
|
2317
|
+
query?: never;
|
|
2318
|
+
header?: {
|
|
2319
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2320
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2321
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2322
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2323
|
+
};
|
|
2324
|
+
path?: never;
|
|
2325
|
+
cookie?: never;
|
|
2326
|
+
};
|
|
2327
|
+
requestBody: {
|
|
2328
|
+
content: {
|
|
2329
|
+
"application/json": components["schemas"]["PasswordConfirmation"];
|
|
2330
|
+
};
|
|
2331
|
+
};
|
|
2332
|
+
responses: {
|
|
2333
|
+
/** @description Secret to add to an authenticator app */
|
|
2334
|
+
200: {
|
|
2335
|
+
headers: {
|
|
2336
|
+
[name: string]: unknown;
|
|
2337
|
+
};
|
|
2338
|
+
content: {
|
|
2339
|
+
"application/json": components["schemas"]["TwoFactorSetup"];
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
400: components["responses"]["BadRequest"];
|
|
2343
|
+
401: components["responses"]["Unauthorized"];
|
|
2344
|
+
403: components["responses"]["Forbidden"];
|
|
2345
|
+
409: components["responses"]["Conflict"];
|
|
2346
|
+
426: components["responses"]["ClientOutdated"];
|
|
2347
|
+
};
|
|
2348
|
+
};
|
|
2349
|
+
confirmTwoFactor: {
|
|
2350
|
+
parameters: {
|
|
2351
|
+
query?: never;
|
|
2352
|
+
header?: {
|
|
2353
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2354
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2355
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2356
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2357
|
+
};
|
|
2358
|
+
path?: never;
|
|
2359
|
+
cookie?: never;
|
|
2360
|
+
};
|
|
2361
|
+
requestBody: {
|
|
2362
|
+
content: {
|
|
2363
|
+
"application/json": components["schemas"]["TwoFactorCode"];
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
responses: {
|
|
2367
|
+
/** @description Two-factor authentication enabled */
|
|
2368
|
+
204: {
|
|
2369
|
+
headers: {
|
|
2370
|
+
[name: string]: unknown;
|
|
2371
|
+
};
|
|
2372
|
+
content?: never;
|
|
2373
|
+
};
|
|
2374
|
+
400: components["responses"]["BadRequest"];
|
|
2375
|
+
401: components["responses"]["Unauthorized"];
|
|
2376
|
+
426: components["responses"]["ClientOutdated"];
|
|
2377
|
+
429: components["responses"]["TooManyRequests"];
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2380
|
+
disableTwoFactor: {
|
|
2381
|
+
parameters: {
|
|
2382
|
+
query?: never;
|
|
2383
|
+
header?: {
|
|
2384
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2385
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2386
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2387
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2388
|
+
};
|
|
2389
|
+
path?: never;
|
|
2390
|
+
cookie?: never;
|
|
2391
|
+
};
|
|
2392
|
+
requestBody: {
|
|
2393
|
+
content: {
|
|
2394
|
+
"application/json": components["schemas"]["DisableTwoFactorRequest"];
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
2397
|
+
responses: {
|
|
2398
|
+
/** @description Two-factor authentication disabled */
|
|
2399
|
+
204: {
|
|
2400
|
+
headers: {
|
|
2401
|
+
[name: string]: unknown;
|
|
2402
|
+
};
|
|
2403
|
+
content?: never;
|
|
2404
|
+
};
|
|
2405
|
+
400: components["responses"]["BadRequest"];
|
|
2406
|
+
401: components["responses"]["Unauthorized"];
|
|
2407
|
+
403: components["responses"]["Forbidden"];
|
|
2408
|
+
426: components["responses"]["ClientOutdated"];
|
|
2409
|
+
429: components["responses"]["TooManyRequests"];
|
|
2410
|
+
};
|
|
2411
|
+
};
|
|
2412
|
+
getPrivacySettings: {
|
|
2413
|
+
parameters: {
|
|
2414
|
+
query?: never;
|
|
2415
|
+
header?: {
|
|
2416
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2417
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2418
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2419
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2420
|
+
};
|
|
2421
|
+
path?: never;
|
|
2422
|
+
cookie?: never;
|
|
2423
|
+
};
|
|
2424
|
+
requestBody?: never;
|
|
2425
|
+
responses: {
|
|
2426
|
+
/** @description Settings */
|
|
2427
|
+
200: {
|
|
2428
|
+
headers: {
|
|
2429
|
+
[name: string]: unknown;
|
|
2430
|
+
};
|
|
2431
|
+
content: {
|
|
2432
|
+
"application/json": components["schemas"]["PrivacySettings"];
|
|
2433
|
+
};
|
|
2434
|
+
};
|
|
2435
|
+
400: components["responses"]["BadRequest"];
|
|
2436
|
+
401: components["responses"]["Unauthorized"];
|
|
2437
|
+
426: components["responses"]["ClientOutdated"];
|
|
2438
|
+
};
|
|
2439
|
+
};
|
|
2440
|
+
updatePrivacySettings: {
|
|
2441
|
+
parameters: {
|
|
2442
|
+
query?: never;
|
|
2443
|
+
header?: {
|
|
2444
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2445
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2446
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2447
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2448
|
+
};
|
|
2449
|
+
path?: never;
|
|
2450
|
+
cookie?: never;
|
|
2451
|
+
};
|
|
2452
|
+
requestBody: {
|
|
2453
|
+
content: {
|
|
2454
|
+
"application/json": components["schemas"]["UpdatePrivacySettingsRequest"];
|
|
2455
|
+
};
|
|
2456
|
+
};
|
|
2457
|
+
responses: {
|
|
2458
|
+
/** @description Settings */
|
|
2459
|
+
200: {
|
|
2460
|
+
headers: {
|
|
2461
|
+
[name: string]: unknown;
|
|
2462
|
+
};
|
|
2463
|
+
content: {
|
|
2464
|
+
"application/json": components["schemas"]["PrivacySettings"];
|
|
2465
|
+
};
|
|
2466
|
+
};
|
|
2467
|
+
400: components["responses"]["BadRequest"];
|
|
2468
|
+
401: components["responses"]["Unauthorized"];
|
|
2469
|
+
422: components["responses"]["ValidationFailed"];
|
|
2470
|
+
426: components["responses"]["ClientOutdated"];
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
replacePrivacyExceptions: {
|
|
2474
|
+
parameters: {
|
|
2475
|
+
query?: never;
|
|
2476
|
+
header?: {
|
|
2477
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2478
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2479
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2480
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2481
|
+
};
|
|
2482
|
+
path: {
|
|
2483
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites";
|
|
2484
|
+
effect: "allow" | "deny";
|
|
2485
|
+
};
|
|
2486
|
+
cookie?: never;
|
|
2487
|
+
};
|
|
2488
|
+
requestBody: {
|
|
2489
|
+
content: {
|
|
2490
|
+
"application/json": components["schemas"]["PrivacyExceptionsRequest"];
|
|
2491
|
+
};
|
|
2492
|
+
};
|
|
2493
|
+
responses: {
|
|
2494
|
+
/** @description Settings */
|
|
2495
|
+
200: {
|
|
2496
|
+
headers: {
|
|
2497
|
+
[name: string]: unknown;
|
|
2498
|
+
};
|
|
2499
|
+
content: {
|
|
2500
|
+
"application/json": components["schemas"]["PrivacySettings"];
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2503
|
+
400: components["responses"]["BadRequest"];
|
|
2504
|
+
401: components["responses"]["Unauthorized"];
|
|
2505
|
+
404: components["responses"]["NotFound"];
|
|
2506
|
+
422: components["responses"]["ValidationFailed"];
|
|
2507
|
+
426: components["responses"]["ClientOutdated"];
|
|
2508
|
+
};
|
|
2509
|
+
};
|
|
2510
|
+
listBlockedUsers: {
|
|
2511
|
+
parameters: {
|
|
2512
|
+
query?: {
|
|
2513
|
+
/** @description Page size */
|
|
2514
|
+
limit?: components["parameters"]["Limit"];
|
|
2515
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
2516
|
+
after?: components["parameters"]["After"];
|
|
2517
|
+
};
|
|
2518
|
+
header?: {
|
|
2519
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2520
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2521
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2522
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2523
|
+
};
|
|
2524
|
+
path?: never;
|
|
2525
|
+
cookie?: never;
|
|
2526
|
+
};
|
|
2527
|
+
requestBody?: never;
|
|
2528
|
+
responses: {
|
|
2529
|
+
/** @description A page of blocked users */
|
|
2530
|
+
200: {
|
|
2531
|
+
headers: {
|
|
2532
|
+
[name: string]: unknown;
|
|
2533
|
+
};
|
|
2534
|
+
content: {
|
|
2535
|
+
"application/json": components["schemas"]["UserPage"];
|
|
2536
|
+
};
|
|
2537
|
+
};
|
|
2538
|
+
400: components["responses"]["BadRequest"];
|
|
2539
|
+
401: components["responses"]["Unauthorized"];
|
|
2540
|
+
426: components["responses"]["ClientOutdated"];
|
|
2541
|
+
};
|
|
2542
|
+
};
|
|
2543
|
+
blockUser: {
|
|
2544
|
+
parameters: {
|
|
2545
|
+
query?: never;
|
|
2546
|
+
header?: {
|
|
2547
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2548
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2549
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2550
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2551
|
+
};
|
|
2552
|
+
path: {
|
|
2553
|
+
user_id: components["parameters"]["UserId"];
|
|
2554
|
+
};
|
|
2555
|
+
cookie?: never;
|
|
2556
|
+
};
|
|
2557
|
+
requestBody?: never;
|
|
2558
|
+
responses: {
|
|
2559
|
+
/** @description Blocked (also when already blocked) */
|
|
2560
|
+
204: {
|
|
2561
|
+
headers: {
|
|
2562
|
+
[name: string]: unknown;
|
|
2563
|
+
};
|
|
2564
|
+
content?: never;
|
|
2565
|
+
};
|
|
2566
|
+
400: components["responses"]["BadRequest"];
|
|
2567
|
+
401: components["responses"]["Unauthorized"];
|
|
2568
|
+
404: components["responses"]["NotFound"];
|
|
2569
|
+
426: components["responses"]["ClientOutdated"];
|
|
2570
|
+
};
|
|
2571
|
+
};
|
|
2572
|
+
unblockUser: {
|
|
2573
|
+
parameters: {
|
|
2574
|
+
query?: never;
|
|
2575
|
+
header?: {
|
|
2576
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2577
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2578
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2579
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2580
|
+
};
|
|
2581
|
+
path: {
|
|
2582
|
+
user_id: components["parameters"]["UserId"];
|
|
2583
|
+
};
|
|
2584
|
+
cookie?: never;
|
|
2585
|
+
};
|
|
2586
|
+
requestBody?: never;
|
|
2587
|
+
responses: {
|
|
2588
|
+
/** @description Unblocked (also when not blocked) */
|
|
2589
|
+
204: {
|
|
2590
|
+
headers: {
|
|
2591
|
+
[name: string]: unknown;
|
|
2592
|
+
};
|
|
2593
|
+
content?: never;
|
|
2594
|
+
};
|
|
2595
|
+
400: components["responses"]["BadRequest"];
|
|
2596
|
+
401: components["responses"]["Unauthorized"];
|
|
2597
|
+
404: components["responses"]["NotFound"];
|
|
2598
|
+
426: components["responses"]["ClientOutdated"];
|
|
2599
|
+
};
|
|
2600
|
+
};
|
|
2601
|
+
searchUsers: {
|
|
2602
|
+
parameters: {
|
|
2603
|
+
query: {
|
|
2604
|
+
q: string;
|
|
2605
|
+
/** @description Page size */
|
|
2606
|
+
limit?: components["parameters"]["Limit"];
|
|
2607
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
2608
|
+
after?: components["parameters"]["After"];
|
|
2609
|
+
};
|
|
2610
|
+
header?: {
|
|
2611
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2612
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2613
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2614
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2615
|
+
};
|
|
2616
|
+
path?: never;
|
|
2617
|
+
cookie?: never;
|
|
2618
|
+
};
|
|
2619
|
+
requestBody?: never;
|
|
2620
|
+
responses: {
|
|
2621
|
+
/** @description A page of users */
|
|
2622
|
+
200: {
|
|
2623
|
+
headers: {
|
|
2624
|
+
[name: string]: unknown;
|
|
2625
|
+
};
|
|
2626
|
+
content: {
|
|
2627
|
+
"application/json": components["schemas"]["UserPage"];
|
|
2628
|
+
};
|
|
2629
|
+
};
|
|
2630
|
+
400: components["responses"]["BadRequest"];
|
|
2631
|
+
401: components["responses"]["Unauthorized"];
|
|
2632
|
+
422: components["responses"]["ValidationFailed"];
|
|
2633
|
+
426: components["responses"]["ClientOutdated"];
|
|
2634
|
+
};
|
|
2635
|
+
};
|
|
2636
|
+
getUserByUsername: {
|
|
2637
|
+
parameters: {
|
|
2638
|
+
query?: never;
|
|
2639
|
+
header?: {
|
|
2640
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2641
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2642
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2643
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2644
|
+
};
|
|
2645
|
+
path: {
|
|
2646
|
+
username: components["schemas"]["Username"];
|
|
2647
|
+
};
|
|
2648
|
+
cookie?: never;
|
|
2649
|
+
};
|
|
2650
|
+
requestBody?: never;
|
|
2651
|
+
responses: {
|
|
2652
|
+
/** @description The user, as visible to the current user */
|
|
2653
|
+
200: {
|
|
2654
|
+
headers: {
|
|
2655
|
+
[name: string]: unknown;
|
|
2656
|
+
};
|
|
2657
|
+
content: {
|
|
2658
|
+
"application/json": components["schemas"]["User"];
|
|
2659
|
+
};
|
|
2660
|
+
};
|
|
2661
|
+
400: components["responses"]["BadRequest"];
|
|
2662
|
+
401: components["responses"]["Unauthorized"];
|
|
2663
|
+
404: components["responses"]["NotFound"];
|
|
2664
|
+
426: components["responses"]["ClientOutdated"];
|
|
2665
|
+
};
|
|
2666
|
+
};
|
|
2667
|
+
getUser: {
|
|
2668
|
+
parameters: {
|
|
2669
|
+
query?: never;
|
|
2670
|
+
header?: {
|
|
2671
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2672
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2673
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2674
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2675
|
+
};
|
|
2676
|
+
path: {
|
|
2677
|
+
user_id: components["parameters"]["UserId"];
|
|
2678
|
+
};
|
|
2679
|
+
cookie?: never;
|
|
2680
|
+
};
|
|
2681
|
+
requestBody?: never;
|
|
2682
|
+
responses: {
|
|
2683
|
+
/** @description The user, as visible to the current user */
|
|
2684
|
+
200: {
|
|
2685
|
+
headers: {
|
|
2686
|
+
[name: string]: unknown;
|
|
2687
|
+
};
|
|
2688
|
+
content: {
|
|
2689
|
+
"application/json": components["schemas"]["User"];
|
|
2690
|
+
};
|
|
2691
|
+
};
|
|
2692
|
+
400: components["responses"]["BadRequest"];
|
|
2693
|
+
401: components["responses"]["Unauthorized"];
|
|
2694
|
+
404: components["responses"]["NotFound"];
|
|
2695
|
+
426: components["responses"]["ClientOutdated"];
|
|
2696
|
+
};
|
|
2697
|
+
};
|
|
2698
|
+
getUserAvatar: {
|
|
2699
|
+
parameters: {
|
|
2700
|
+
query?: never;
|
|
2701
|
+
header?: {
|
|
2702
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2703
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2704
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2705
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2706
|
+
};
|
|
2707
|
+
path: {
|
|
2708
|
+
user_id: components["parameters"]["UserId"];
|
|
2709
|
+
};
|
|
2710
|
+
cookie?: never;
|
|
2711
|
+
};
|
|
2712
|
+
requestBody?: never;
|
|
2713
|
+
responses: {
|
|
2714
|
+
/** @description Image */
|
|
2715
|
+
200: {
|
|
2716
|
+
headers: {
|
|
2717
|
+
[name: string]: unknown;
|
|
2718
|
+
};
|
|
2719
|
+
content: {
|
|
2720
|
+
"image/*": string;
|
|
2721
|
+
};
|
|
2722
|
+
};
|
|
2723
|
+
400: components["responses"]["BadRequest"];
|
|
2724
|
+
401: components["responses"]["Unauthorized"];
|
|
2725
|
+
404: components["responses"]["NotFound"];
|
|
2726
|
+
426: components["responses"]["ClientOutdated"];
|
|
2727
|
+
};
|
|
2728
|
+
};
|
|
2729
|
+
listUserAvatars: {
|
|
2730
|
+
parameters: {
|
|
2731
|
+
query?: {
|
|
2732
|
+
/** @description Page size */
|
|
2733
|
+
limit?: components["parameters"]["Limit"];
|
|
2734
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
2735
|
+
after?: components["parameters"]["After"];
|
|
2736
|
+
};
|
|
2737
|
+
header?: {
|
|
2738
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2739
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2740
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2741
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2742
|
+
};
|
|
2743
|
+
path: {
|
|
2744
|
+
user_id: components["parameters"]["UserId"];
|
|
2745
|
+
};
|
|
2746
|
+
cookie?: never;
|
|
2747
|
+
};
|
|
2748
|
+
requestBody?: never;
|
|
2749
|
+
responses: {
|
|
2750
|
+
/** @description A page of previous avatars, newest first */
|
|
2751
|
+
200: {
|
|
2752
|
+
headers: {
|
|
2753
|
+
[name: string]: unknown;
|
|
2754
|
+
};
|
|
2755
|
+
content: {
|
|
2756
|
+
"application/json": {
|
|
2757
|
+
items: components["schemas"]["AvatarVersion"][];
|
|
2758
|
+
next_cursor: components["schemas"]["Cursor"];
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
400: components["responses"]["BadRequest"];
|
|
2763
|
+
401: components["responses"]["Unauthorized"];
|
|
2764
|
+
404: components["responses"]["NotFound"];
|
|
2765
|
+
426: components["responses"]["ClientOutdated"];
|
|
2766
|
+
};
|
|
2767
|
+
};
|
|
2768
|
+
setContactName: {
|
|
2769
|
+
parameters: {
|
|
2770
|
+
query?: never;
|
|
2771
|
+
header?: {
|
|
2772
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2773
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2774
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2775
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2776
|
+
};
|
|
2777
|
+
path: {
|
|
2778
|
+
user_id: components["parameters"]["UserId"];
|
|
2779
|
+
};
|
|
2780
|
+
cookie?: never;
|
|
2781
|
+
};
|
|
2782
|
+
requestBody: {
|
|
2783
|
+
content: {
|
|
2784
|
+
"application/json": components["schemas"]["ContactNameRequest"];
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
responses: {
|
|
2788
|
+
/** @description The user with the contact name applied */
|
|
2789
|
+
200: {
|
|
2790
|
+
headers: {
|
|
2791
|
+
[name: string]: unknown;
|
|
2792
|
+
};
|
|
2793
|
+
content: {
|
|
2794
|
+
"application/json": components["schemas"]["User"];
|
|
2795
|
+
};
|
|
2796
|
+
};
|
|
2797
|
+
400: components["responses"]["BadRequest"];
|
|
2798
|
+
401: components["responses"]["Unauthorized"];
|
|
2799
|
+
404: components["responses"]["NotFound"];
|
|
2800
|
+
422: components["responses"]["ValidationFailed"];
|
|
2801
|
+
426: components["responses"]["ClientOutdated"];
|
|
2802
|
+
};
|
|
2803
|
+
};
|
|
2804
|
+
removeContactName: {
|
|
2805
|
+
parameters: {
|
|
2806
|
+
query?: never;
|
|
2807
|
+
header?: {
|
|
2808
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2809
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2810
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2811
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2812
|
+
};
|
|
2813
|
+
path: {
|
|
2814
|
+
user_id: components["parameters"]["UserId"];
|
|
2815
|
+
};
|
|
2816
|
+
cookie?: never;
|
|
2817
|
+
};
|
|
2818
|
+
requestBody?: never;
|
|
2819
|
+
responses: {
|
|
2820
|
+
/** @description Removed */
|
|
2821
|
+
204: {
|
|
2822
|
+
headers: {
|
|
2823
|
+
[name: string]: unknown;
|
|
2824
|
+
};
|
|
2825
|
+
content?: never;
|
|
2826
|
+
};
|
|
2827
|
+
400: components["responses"]["BadRequest"];
|
|
2828
|
+
401: components["responses"]["Unauthorized"];
|
|
2829
|
+
404: components["responses"]["NotFound"];
|
|
2830
|
+
426: components["responses"]["ClientOutdated"];
|
|
2831
|
+
};
|
|
2832
|
+
};
|
|
2833
|
+
uploadAttachment: {
|
|
2834
|
+
parameters: {
|
|
2835
|
+
query?: never;
|
|
2836
|
+
header?: {
|
|
2837
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2838
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2839
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2840
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2841
|
+
};
|
|
2842
|
+
path?: never;
|
|
2843
|
+
cookie?: never;
|
|
2844
|
+
};
|
|
2845
|
+
requestBody: {
|
|
2846
|
+
content: {
|
|
2847
|
+
"multipart/form-data": components["schemas"]["UploadAttachmentRequest"];
|
|
2848
|
+
};
|
|
2849
|
+
};
|
|
2850
|
+
responses: {
|
|
2851
|
+
/** @description Uploaded */
|
|
2852
|
+
201: {
|
|
2853
|
+
headers: {
|
|
2854
|
+
[name: string]: unknown;
|
|
2855
|
+
};
|
|
2856
|
+
content: {
|
|
2857
|
+
"application/json": components["schemas"]["Attachment"];
|
|
2858
|
+
};
|
|
2859
|
+
};
|
|
2860
|
+
400: components["responses"]["BadRequest"];
|
|
2861
|
+
401: components["responses"]["Unauthorized"];
|
|
2862
|
+
413: components["responses"]["PayloadTooLarge"];
|
|
2863
|
+
415: components["responses"]["UnsupportedMediaType"];
|
|
2864
|
+
426: components["responses"]["ClientOutdated"];
|
|
2865
|
+
429: components["responses"]["TooManyRequests"];
|
|
2866
|
+
};
|
|
2867
|
+
};
|
|
2868
|
+
getAttachmentContent: {
|
|
2869
|
+
parameters: {
|
|
2870
|
+
query?: never;
|
|
2871
|
+
header?: {
|
|
2872
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2873
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2874
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2875
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2876
|
+
};
|
|
2877
|
+
path: {
|
|
2878
|
+
attachment_id: components["parameters"]["AttachmentId"];
|
|
2879
|
+
};
|
|
2880
|
+
cookie?: never;
|
|
2881
|
+
};
|
|
2882
|
+
requestBody?: never;
|
|
2883
|
+
responses: {
|
|
2884
|
+
/** @description File content */
|
|
2885
|
+
200: {
|
|
2886
|
+
headers: {
|
|
2887
|
+
[name: string]: unknown;
|
|
2888
|
+
};
|
|
2889
|
+
content: {
|
|
2890
|
+
"application/octet-stream": string;
|
|
2891
|
+
};
|
|
2892
|
+
};
|
|
2893
|
+
400: components["responses"]["BadRequest"];
|
|
2894
|
+
401: components["responses"]["Unauthorized"];
|
|
2895
|
+
403: components["responses"]["Forbidden"];
|
|
2896
|
+
404: components["responses"]["NotFound"];
|
|
2897
|
+
426: components["responses"]["ClientOutdated"];
|
|
2898
|
+
};
|
|
2899
|
+
};
|
|
2900
|
+
listChats: {
|
|
2901
|
+
parameters: {
|
|
2902
|
+
query?: {
|
|
2903
|
+
/** @description Page size */
|
|
2904
|
+
limit?: components["parameters"]["Limit"];
|
|
2905
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
2906
|
+
after?: components["parameters"]["After"];
|
|
2907
|
+
};
|
|
2908
|
+
header?: {
|
|
2909
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2910
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2911
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2912
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2913
|
+
};
|
|
2914
|
+
path?: never;
|
|
2915
|
+
cookie?: never;
|
|
2916
|
+
};
|
|
2917
|
+
requestBody?: never;
|
|
2918
|
+
responses: {
|
|
2919
|
+
/** @description A page of chats */
|
|
2920
|
+
200: {
|
|
2921
|
+
headers: {
|
|
2922
|
+
[name: string]: unknown;
|
|
2923
|
+
};
|
|
2924
|
+
content: {
|
|
2925
|
+
"application/json": components["schemas"]["ChatPage"];
|
|
2926
|
+
};
|
|
2927
|
+
};
|
|
2928
|
+
400: components["responses"]["BadRequest"];
|
|
2929
|
+
401: components["responses"]["Unauthorized"];
|
|
2930
|
+
426: components["responses"]["ClientOutdated"];
|
|
2931
|
+
};
|
|
2932
|
+
};
|
|
2933
|
+
createChat: {
|
|
2934
|
+
parameters: {
|
|
2935
|
+
query?: never;
|
|
2936
|
+
header?: {
|
|
2937
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2938
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2939
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2940
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2941
|
+
};
|
|
2942
|
+
path?: never;
|
|
2943
|
+
cookie?: never;
|
|
2944
|
+
};
|
|
2945
|
+
requestBody: {
|
|
2946
|
+
content: {
|
|
2947
|
+
"application/json": components["schemas"]["CreateChatRequest"];
|
|
2948
|
+
};
|
|
2949
|
+
};
|
|
2950
|
+
responses: {
|
|
2951
|
+
/** @description The chat already existed */
|
|
2952
|
+
200: {
|
|
2953
|
+
headers: {
|
|
2954
|
+
[name: string]: unknown;
|
|
2955
|
+
};
|
|
2956
|
+
content: {
|
|
2957
|
+
"application/json": components["schemas"]["Chat"];
|
|
2958
|
+
};
|
|
2959
|
+
};
|
|
2960
|
+
/** @description Chat created */
|
|
2961
|
+
201: {
|
|
2962
|
+
headers: {
|
|
2963
|
+
[name: string]: unknown;
|
|
2964
|
+
};
|
|
2965
|
+
content: {
|
|
2966
|
+
"application/json": components["schemas"]["Chat"];
|
|
2967
|
+
};
|
|
2968
|
+
};
|
|
2969
|
+
/** @description Waiting for the other user's approval */
|
|
2970
|
+
202: {
|
|
2971
|
+
headers: {
|
|
2972
|
+
[name: string]: unknown;
|
|
2973
|
+
};
|
|
2974
|
+
content: {
|
|
2975
|
+
"application/json": components["schemas"]["ApprovalRequest"];
|
|
2976
|
+
};
|
|
2977
|
+
};
|
|
2978
|
+
400: components["responses"]["BadRequest"];
|
|
2979
|
+
401: components["responses"]["Unauthorized"];
|
|
2980
|
+
403: components["responses"]["Forbidden"];
|
|
2981
|
+
404: components["responses"]["NotFound"];
|
|
2982
|
+
426: components["responses"]["ClientOutdated"];
|
|
2983
|
+
429: components["responses"]["TooManyRequests"];
|
|
2984
|
+
};
|
|
2985
|
+
};
|
|
2986
|
+
getChat: {
|
|
2987
|
+
parameters: {
|
|
2988
|
+
query?: never;
|
|
2989
|
+
header?: {
|
|
2990
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2991
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
2992
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
2993
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
2994
|
+
};
|
|
2995
|
+
path: {
|
|
2996
|
+
chat_id: components["parameters"]["ChatId"];
|
|
2997
|
+
};
|
|
2998
|
+
cookie?: never;
|
|
2999
|
+
};
|
|
3000
|
+
requestBody?: never;
|
|
3001
|
+
responses: {
|
|
3002
|
+
/** @description The chat */
|
|
3003
|
+
200: {
|
|
3004
|
+
headers: {
|
|
3005
|
+
[name: string]: unknown;
|
|
3006
|
+
};
|
|
3007
|
+
content: {
|
|
3008
|
+
"application/json": components["schemas"]["Chat"];
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
400: components["responses"]["BadRequest"];
|
|
3012
|
+
401: components["responses"]["Unauthorized"];
|
|
3013
|
+
404: components["responses"]["NotFound"];
|
|
3014
|
+
426: components["responses"]["ClientOutdated"];
|
|
3015
|
+
};
|
|
3016
|
+
};
|
|
3017
|
+
deleteChat: {
|
|
3018
|
+
parameters: {
|
|
3019
|
+
query?: never;
|
|
3020
|
+
header?: {
|
|
3021
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3022
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3023
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3024
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3025
|
+
};
|
|
3026
|
+
path: {
|
|
3027
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3028
|
+
};
|
|
3029
|
+
cookie?: never;
|
|
3030
|
+
};
|
|
3031
|
+
requestBody?: never;
|
|
3032
|
+
responses: {
|
|
3033
|
+
/** @description Deleted */
|
|
3034
|
+
204: {
|
|
3035
|
+
headers: {
|
|
3036
|
+
[name: string]: unknown;
|
|
3037
|
+
};
|
|
3038
|
+
content?: never;
|
|
3039
|
+
};
|
|
3040
|
+
400: components["responses"]["BadRequest"];
|
|
3041
|
+
401: components["responses"]["Unauthorized"];
|
|
3042
|
+
404: components["responses"]["NotFound"];
|
|
3043
|
+
426: components["responses"]["ClientOutdated"];
|
|
3044
|
+
};
|
|
3045
|
+
};
|
|
3046
|
+
pinChat: {
|
|
3047
|
+
parameters: {
|
|
3048
|
+
query?: never;
|
|
3049
|
+
header?: {
|
|
3050
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3051
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3052
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3053
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3054
|
+
};
|
|
3055
|
+
path: {
|
|
3056
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3057
|
+
};
|
|
3058
|
+
cookie?: never;
|
|
3059
|
+
};
|
|
3060
|
+
requestBody?: never;
|
|
3061
|
+
responses: {
|
|
3062
|
+
/** @description Pinned */
|
|
3063
|
+
204: {
|
|
3064
|
+
headers: {
|
|
3065
|
+
[name: string]: unknown;
|
|
3066
|
+
};
|
|
3067
|
+
content?: never;
|
|
3068
|
+
};
|
|
3069
|
+
400: components["responses"]["BadRequest"];
|
|
3070
|
+
401: components["responses"]["Unauthorized"];
|
|
3071
|
+
404: components["responses"]["NotFound"];
|
|
3072
|
+
409: components["responses"]["Conflict"];
|
|
3073
|
+
426: components["responses"]["ClientOutdated"];
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
unpinChat: {
|
|
3077
|
+
parameters: {
|
|
3078
|
+
query?: never;
|
|
3079
|
+
header?: {
|
|
3080
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3081
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3082
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3083
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3084
|
+
};
|
|
3085
|
+
path: {
|
|
3086
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3087
|
+
};
|
|
3088
|
+
cookie?: never;
|
|
3089
|
+
};
|
|
3090
|
+
requestBody?: never;
|
|
3091
|
+
responses: {
|
|
3092
|
+
/** @description Unpinned */
|
|
3093
|
+
204: {
|
|
3094
|
+
headers: {
|
|
3095
|
+
[name: string]: unknown;
|
|
3096
|
+
};
|
|
3097
|
+
content?: never;
|
|
3098
|
+
};
|
|
3099
|
+
400: components["responses"]["BadRequest"];
|
|
3100
|
+
401: components["responses"]["Unauthorized"];
|
|
3101
|
+
404: components["responses"]["NotFound"];
|
|
3102
|
+
426: components["responses"]["ClientOutdated"];
|
|
3103
|
+
};
|
|
3104
|
+
};
|
|
3105
|
+
markChatRead: {
|
|
3106
|
+
parameters: {
|
|
3107
|
+
query?: never;
|
|
3108
|
+
header?: {
|
|
3109
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3110
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3111
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3112
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3113
|
+
};
|
|
3114
|
+
path: {
|
|
3115
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3116
|
+
};
|
|
3117
|
+
cookie?: never;
|
|
3118
|
+
};
|
|
3119
|
+
requestBody: {
|
|
3120
|
+
content: {
|
|
3121
|
+
"application/json": components["schemas"]["MarkReadRequest"];
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
responses: {
|
|
3125
|
+
/** @description New unread count */
|
|
3126
|
+
200: {
|
|
3127
|
+
headers: {
|
|
3128
|
+
[name: string]: unknown;
|
|
3129
|
+
};
|
|
3130
|
+
content: {
|
|
3131
|
+
"application/json": {
|
|
3132
|
+
unread_count: number;
|
|
3133
|
+
};
|
|
3134
|
+
};
|
|
3135
|
+
};
|
|
3136
|
+
400: components["responses"]["BadRequest"];
|
|
3137
|
+
401: components["responses"]["Unauthorized"];
|
|
3138
|
+
404: components["responses"]["NotFound"];
|
|
3139
|
+
426: components["responses"]["ClientOutdated"];
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
listMessages: {
|
|
3143
|
+
parameters: {
|
|
3144
|
+
query?: {
|
|
3145
|
+
/** @description Page size */
|
|
3146
|
+
limit?: components["parameters"]["Limit"];
|
|
3147
|
+
/** @description Messages older than this message ID */
|
|
3148
|
+
before?: components["schemas"]["Id"];
|
|
3149
|
+
/** @description Messages newer than this message ID */
|
|
3150
|
+
after?: components["schemas"]["Id"];
|
|
3151
|
+
/** @description A window containing this message ID */
|
|
3152
|
+
around?: components["schemas"]["Id"];
|
|
3153
|
+
};
|
|
3154
|
+
header?: {
|
|
3155
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3156
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3157
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3158
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3159
|
+
};
|
|
3160
|
+
path: {
|
|
3161
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3162
|
+
};
|
|
3163
|
+
cookie?: never;
|
|
3164
|
+
};
|
|
3165
|
+
requestBody?: never;
|
|
3166
|
+
responses: {
|
|
3167
|
+
/** @description A page of messages */
|
|
3168
|
+
200: {
|
|
3169
|
+
headers: {
|
|
3170
|
+
[name: string]: unknown;
|
|
3171
|
+
};
|
|
3172
|
+
content: {
|
|
3173
|
+
"application/json": components["schemas"]["MessagePage"];
|
|
3174
|
+
};
|
|
3175
|
+
};
|
|
3176
|
+
400: components["responses"]["BadRequest"];
|
|
3177
|
+
401: components["responses"]["Unauthorized"];
|
|
3178
|
+
404: components["responses"]["NotFound"];
|
|
3179
|
+
422: components["responses"]["ValidationFailed"];
|
|
3180
|
+
426: components["responses"]["ClientOutdated"];
|
|
3181
|
+
};
|
|
3182
|
+
};
|
|
3183
|
+
sendMessage: {
|
|
3184
|
+
parameters: {
|
|
3185
|
+
query?: never;
|
|
3186
|
+
header?: {
|
|
3187
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3188
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3189
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3190
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3191
|
+
};
|
|
3192
|
+
path: {
|
|
3193
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3194
|
+
};
|
|
3195
|
+
cookie?: never;
|
|
3196
|
+
};
|
|
3197
|
+
requestBody: {
|
|
3198
|
+
content: {
|
|
3199
|
+
"application/json": components["schemas"]["SendMessageRequest"];
|
|
3200
|
+
};
|
|
3201
|
+
};
|
|
3202
|
+
responses: {
|
|
3203
|
+
/** @description Already created for this `client_temp_id` */
|
|
3204
|
+
200: {
|
|
3205
|
+
headers: {
|
|
3206
|
+
[name: string]: unknown;
|
|
3207
|
+
};
|
|
3208
|
+
content: {
|
|
3209
|
+
"application/json": components["schemas"]["Message"];
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
/** @description Message created */
|
|
3213
|
+
201: {
|
|
3214
|
+
headers: {
|
|
3215
|
+
[name: string]: unknown;
|
|
3216
|
+
};
|
|
3217
|
+
content: {
|
|
3218
|
+
"application/json": components["schemas"]["Message"];
|
|
3219
|
+
};
|
|
3220
|
+
};
|
|
3221
|
+
400: components["responses"]["BadRequest"];
|
|
3222
|
+
401: components["responses"]["Unauthorized"];
|
|
3223
|
+
403: components["responses"]["Forbidden"];
|
|
3224
|
+
404: components["responses"]["NotFound"];
|
|
3225
|
+
422: components["responses"]["ValidationFailed"];
|
|
3226
|
+
426: components["responses"]["ClientOutdated"];
|
|
3227
|
+
429: components["responses"]["TooManyRequests"];
|
|
3228
|
+
};
|
|
3229
|
+
};
|
|
3230
|
+
searchMessages: {
|
|
3231
|
+
parameters: {
|
|
3232
|
+
query: {
|
|
3233
|
+
q: string;
|
|
3234
|
+
/** @description Page size */
|
|
3235
|
+
limit?: components["parameters"]["Limit"];
|
|
3236
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
3237
|
+
after?: components["parameters"]["After"];
|
|
3238
|
+
};
|
|
3239
|
+
header?: {
|
|
3240
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3241
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3242
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3243
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3244
|
+
};
|
|
3245
|
+
path: {
|
|
3246
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3247
|
+
};
|
|
3248
|
+
cookie?: never;
|
|
3249
|
+
};
|
|
3250
|
+
requestBody?: never;
|
|
3251
|
+
responses: {
|
|
3252
|
+
/** @description Matches, newest first */
|
|
3253
|
+
200: {
|
|
3254
|
+
headers: {
|
|
3255
|
+
[name: string]: unknown;
|
|
3256
|
+
};
|
|
3257
|
+
content: {
|
|
3258
|
+
"application/json": components["schemas"]["MessageSearchPage"];
|
|
3259
|
+
};
|
|
3260
|
+
};
|
|
3261
|
+
400: components["responses"]["BadRequest"];
|
|
3262
|
+
401: components["responses"]["Unauthorized"];
|
|
3263
|
+
404: components["responses"]["NotFound"];
|
|
3264
|
+
422: components["responses"]["ValidationFailed"];
|
|
3265
|
+
426: components["responses"]["ClientOutdated"];
|
|
3266
|
+
};
|
|
3267
|
+
};
|
|
3268
|
+
listChatMedia: {
|
|
3269
|
+
parameters: {
|
|
3270
|
+
query: {
|
|
3271
|
+
kind: components["schemas"]["MediaKind"];
|
|
3272
|
+
/** @description Page size */
|
|
3273
|
+
limit?: components["parameters"]["Limit"];
|
|
3274
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
3275
|
+
after?: components["parameters"]["After"];
|
|
3276
|
+
};
|
|
3277
|
+
header?: {
|
|
3278
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3279
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3280
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3281
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3282
|
+
};
|
|
3283
|
+
path: {
|
|
3284
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3285
|
+
};
|
|
3286
|
+
cookie?: never;
|
|
3287
|
+
};
|
|
3288
|
+
requestBody?: never;
|
|
3289
|
+
responses: {
|
|
3290
|
+
/** @description Messages with matching attachments, newest first */
|
|
3291
|
+
200: {
|
|
3292
|
+
headers: {
|
|
3293
|
+
[name: string]: unknown;
|
|
3294
|
+
};
|
|
3295
|
+
content: {
|
|
3296
|
+
"application/json": components["schemas"]["MessageSearchPage"];
|
|
3297
|
+
};
|
|
3298
|
+
};
|
|
3299
|
+
400: components["responses"]["BadRequest"];
|
|
3300
|
+
401: components["responses"]["Unauthorized"];
|
|
3301
|
+
404: components["responses"]["NotFound"];
|
|
3302
|
+
422: components["responses"]["ValidationFailed"];
|
|
3303
|
+
426: components["responses"]["ClientOutdated"];
|
|
3304
|
+
};
|
|
3305
|
+
};
|
|
3306
|
+
deleteMessage: {
|
|
3307
|
+
parameters: {
|
|
3308
|
+
query: {
|
|
3309
|
+
scope: "me" | "everyone";
|
|
3310
|
+
};
|
|
3311
|
+
header?: {
|
|
3312
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3313
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3314
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3315
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3316
|
+
};
|
|
3317
|
+
path: {
|
|
3318
|
+
message_id: components["parameters"]["MessageId"];
|
|
3319
|
+
};
|
|
3320
|
+
cookie?: never;
|
|
3321
|
+
};
|
|
3322
|
+
requestBody?: never;
|
|
3323
|
+
responses: {
|
|
3324
|
+
/** @description Deleted */
|
|
3325
|
+
204: {
|
|
3326
|
+
headers: {
|
|
3327
|
+
[name: string]: unknown;
|
|
3328
|
+
};
|
|
3329
|
+
content?: never;
|
|
3330
|
+
};
|
|
3331
|
+
400: components["responses"]["BadRequest"];
|
|
3332
|
+
401: components["responses"]["Unauthorized"];
|
|
3333
|
+
403: components["responses"]["Forbidden"];
|
|
3334
|
+
404: components["responses"]["NotFound"];
|
|
3335
|
+
422: components["responses"]["ValidationFailed"];
|
|
3336
|
+
426: components["responses"]["ClientOutdated"];
|
|
3337
|
+
};
|
|
3338
|
+
};
|
|
3339
|
+
editMessage: {
|
|
3340
|
+
parameters: {
|
|
3341
|
+
query?: never;
|
|
3342
|
+
header?: {
|
|
3343
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3344
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3345
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3346
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3347
|
+
};
|
|
3348
|
+
path: {
|
|
3349
|
+
message_id: components["parameters"]["MessageId"];
|
|
3350
|
+
};
|
|
3351
|
+
cookie?: never;
|
|
3352
|
+
};
|
|
3353
|
+
requestBody: {
|
|
3354
|
+
content: {
|
|
3355
|
+
"application/json": components["schemas"]["EditMessageRequest"];
|
|
3356
|
+
};
|
|
3357
|
+
};
|
|
3358
|
+
responses: {
|
|
3359
|
+
/** @description Edited message */
|
|
3360
|
+
200: {
|
|
3361
|
+
headers: {
|
|
3362
|
+
[name: string]: unknown;
|
|
3363
|
+
};
|
|
3364
|
+
content: {
|
|
3365
|
+
"application/json": components["schemas"]["Message"];
|
|
3366
|
+
};
|
|
3367
|
+
};
|
|
3368
|
+
400: components["responses"]["BadRequest"];
|
|
3369
|
+
401: components["responses"]["Unauthorized"];
|
|
3370
|
+
403: components["responses"]["Forbidden"];
|
|
3371
|
+
404: components["responses"]["NotFound"];
|
|
3372
|
+
422: components["responses"]["ValidationFailed"];
|
|
3373
|
+
426: components["responses"]["ClientOutdated"];
|
|
3374
|
+
};
|
|
3375
|
+
};
|
|
3376
|
+
forwardMessage: {
|
|
3377
|
+
parameters: {
|
|
3378
|
+
query?: never;
|
|
3379
|
+
header?: {
|
|
3380
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3381
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3382
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3383
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3384
|
+
};
|
|
3385
|
+
path: {
|
|
3386
|
+
message_id: components["parameters"]["MessageId"];
|
|
3387
|
+
};
|
|
3388
|
+
cookie?: never;
|
|
3389
|
+
};
|
|
3390
|
+
requestBody: {
|
|
3391
|
+
content: {
|
|
3392
|
+
"application/json": components["schemas"]["ForwardMessageRequest"];
|
|
3393
|
+
};
|
|
3394
|
+
};
|
|
3395
|
+
responses: {
|
|
3396
|
+
/** @description One new message per target chat */
|
|
3397
|
+
201: {
|
|
3398
|
+
headers: {
|
|
3399
|
+
[name: string]: unknown;
|
|
3400
|
+
};
|
|
3401
|
+
content: {
|
|
3402
|
+
"application/json": {
|
|
3403
|
+
items: components["schemas"]["Message"][];
|
|
3404
|
+
};
|
|
3405
|
+
};
|
|
3406
|
+
};
|
|
3407
|
+
400: components["responses"]["BadRequest"];
|
|
3408
|
+
401: components["responses"]["Unauthorized"];
|
|
3409
|
+
403: components["responses"]["Forbidden"];
|
|
3410
|
+
404: components["responses"]["NotFound"];
|
|
3411
|
+
422: components["responses"]["ValidationFailed"];
|
|
3412
|
+
426: components["responses"]["ClientOutdated"];
|
|
3413
|
+
429: components["responses"]["TooManyRequests"];
|
|
3414
|
+
};
|
|
3415
|
+
};
|
|
3416
|
+
listApprovalRequests: {
|
|
3417
|
+
parameters: {
|
|
3418
|
+
query?: {
|
|
3419
|
+
/** @description Page size */
|
|
3420
|
+
limit?: components["parameters"]["Limit"];
|
|
3421
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
3422
|
+
after?: components["parameters"]["After"];
|
|
3423
|
+
};
|
|
3424
|
+
header?: {
|
|
3425
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3426
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3427
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3428
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3429
|
+
};
|
|
3430
|
+
path?: never;
|
|
3431
|
+
cookie?: never;
|
|
3432
|
+
};
|
|
3433
|
+
requestBody?: never;
|
|
3434
|
+
responses: {
|
|
3435
|
+
/** @description A page of pending requests */
|
|
3436
|
+
200: {
|
|
3437
|
+
headers: {
|
|
3438
|
+
[name: string]: unknown;
|
|
3439
|
+
};
|
|
3440
|
+
content: {
|
|
3441
|
+
"application/json": {
|
|
3442
|
+
items: components["schemas"]["ApprovalRequest"][];
|
|
3443
|
+
next_cursor: components["schemas"]["Cursor"];
|
|
3444
|
+
};
|
|
3445
|
+
};
|
|
3446
|
+
};
|
|
3447
|
+
400: components["responses"]["BadRequest"];
|
|
3448
|
+
401: components["responses"]["Unauthorized"];
|
|
3449
|
+
426: components["responses"]["ClientOutdated"];
|
|
3450
|
+
};
|
|
3451
|
+
};
|
|
3452
|
+
approveRequest: {
|
|
3453
|
+
parameters: {
|
|
3454
|
+
query?: never;
|
|
3455
|
+
header?: {
|
|
3456
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3457
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3458
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3459
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3460
|
+
};
|
|
3461
|
+
path: {
|
|
3462
|
+
request_id: components["parameters"]["RequestId"];
|
|
3463
|
+
};
|
|
3464
|
+
cookie?: never;
|
|
3465
|
+
};
|
|
3466
|
+
requestBody?: never;
|
|
3467
|
+
responses: {
|
|
3468
|
+
/** @description Approved; the chat or group membership now exists */
|
|
3469
|
+
200: {
|
|
3470
|
+
headers: {
|
|
3471
|
+
[name: string]: unknown;
|
|
3472
|
+
};
|
|
3473
|
+
content: {
|
|
3474
|
+
"application/json": components["schemas"]["Chat"];
|
|
3475
|
+
};
|
|
3476
|
+
};
|
|
3477
|
+
400: components["responses"]["BadRequest"];
|
|
3478
|
+
401: components["responses"]["Unauthorized"];
|
|
3479
|
+
403: components["responses"]["Forbidden"];
|
|
3480
|
+
404: components["responses"]["NotFound"];
|
|
3481
|
+
409: components["responses"]["Conflict"];
|
|
3482
|
+
426: components["responses"]["ClientOutdated"];
|
|
3483
|
+
};
|
|
3484
|
+
};
|
|
3485
|
+
rejectRequest: {
|
|
3486
|
+
parameters: {
|
|
3487
|
+
query?: never;
|
|
3488
|
+
header?: {
|
|
3489
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3490
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3491
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3492
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3493
|
+
};
|
|
3494
|
+
path: {
|
|
3495
|
+
request_id: components["parameters"]["RequestId"];
|
|
3496
|
+
};
|
|
3497
|
+
cookie?: never;
|
|
3498
|
+
};
|
|
3499
|
+
requestBody?: never;
|
|
3500
|
+
responses: {
|
|
3501
|
+
/** @description Rejected */
|
|
3502
|
+
204: {
|
|
3503
|
+
headers: {
|
|
3504
|
+
[name: string]: unknown;
|
|
3505
|
+
};
|
|
3506
|
+
content?: never;
|
|
3507
|
+
};
|
|
3508
|
+
400: components["responses"]["BadRequest"];
|
|
3509
|
+
401: components["responses"]["Unauthorized"];
|
|
3510
|
+
403: components["responses"]["Forbidden"];
|
|
3511
|
+
404: components["responses"]["NotFound"];
|
|
3512
|
+
409: components["responses"]["Conflict"];
|
|
3513
|
+
426: components["responses"]["ClientOutdated"];
|
|
3514
|
+
};
|
|
3515
|
+
};
|
|
3516
|
+
listGroups: {
|
|
3517
|
+
parameters: {
|
|
3518
|
+
query?: {
|
|
3519
|
+
/** @description Page size */
|
|
3520
|
+
limit?: components["parameters"]["Limit"];
|
|
3521
|
+
/** @description Opaque `next_cursor` of the previous page */
|
|
3522
|
+
after?: components["parameters"]["After"];
|
|
3523
|
+
};
|
|
3524
|
+
header?: {
|
|
3525
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3526
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3527
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3528
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3529
|
+
};
|
|
3530
|
+
path?: never;
|
|
3531
|
+
cookie?: never;
|
|
3532
|
+
};
|
|
3533
|
+
requestBody?: never;
|
|
3534
|
+
responses: {
|
|
3535
|
+
/** @description A page of group chats */
|
|
3536
|
+
200: {
|
|
3537
|
+
headers: {
|
|
3538
|
+
[name: string]: unknown;
|
|
3539
|
+
};
|
|
3540
|
+
content: {
|
|
3541
|
+
"application/json": components["schemas"]["ChatPage"];
|
|
3542
|
+
};
|
|
3543
|
+
};
|
|
3544
|
+
400: components["responses"]["BadRequest"];
|
|
3545
|
+
401: components["responses"]["Unauthorized"];
|
|
3546
|
+
426: components["responses"]["ClientOutdated"];
|
|
3547
|
+
};
|
|
3548
|
+
};
|
|
3549
|
+
createGroup: {
|
|
3550
|
+
parameters: {
|
|
3551
|
+
query?: never;
|
|
3552
|
+
header?: {
|
|
3553
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3554
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3555
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3556
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3557
|
+
};
|
|
3558
|
+
path?: never;
|
|
3559
|
+
cookie?: never;
|
|
3560
|
+
};
|
|
3561
|
+
requestBody: {
|
|
3562
|
+
content: {
|
|
3563
|
+
"application/json": components["schemas"]["CreateGroupRequest"];
|
|
3564
|
+
};
|
|
3565
|
+
};
|
|
3566
|
+
responses: {
|
|
3567
|
+
/** @description Group created */
|
|
3568
|
+
201: {
|
|
3569
|
+
headers: {
|
|
3570
|
+
[name: string]: unknown;
|
|
3571
|
+
};
|
|
3572
|
+
content: {
|
|
3573
|
+
"application/json": components["schemas"]["Group"];
|
|
3574
|
+
};
|
|
3575
|
+
};
|
|
3576
|
+
400: components["responses"]["BadRequest"];
|
|
3577
|
+
401: components["responses"]["Unauthorized"];
|
|
3578
|
+
422: components["responses"]["ValidationFailed"];
|
|
3579
|
+
426: components["responses"]["ClientOutdated"];
|
|
3580
|
+
429: components["responses"]["TooManyRequests"];
|
|
3581
|
+
};
|
|
3582
|
+
};
|
|
3583
|
+
getGroup: {
|
|
3584
|
+
parameters: {
|
|
3585
|
+
query?: never;
|
|
3586
|
+
header?: {
|
|
3587
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3588
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3589
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3590
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3591
|
+
};
|
|
3592
|
+
path: {
|
|
3593
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3594
|
+
};
|
|
3595
|
+
cookie?: never;
|
|
3596
|
+
};
|
|
3597
|
+
requestBody?: never;
|
|
3598
|
+
responses: {
|
|
3599
|
+
/** @description The group */
|
|
3600
|
+
200: {
|
|
3601
|
+
headers: {
|
|
3602
|
+
[name: string]: unknown;
|
|
3603
|
+
};
|
|
3604
|
+
content: {
|
|
3605
|
+
"application/json": components["schemas"]["Group"];
|
|
3606
|
+
};
|
|
3607
|
+
};
|
|
3608
|
+
400: components["responses"]["BadRequest"];
|
|
3609
|
+
401: components["responses"]["Unauthorized"];
|
|
3610
|
+
404: components["responses"]["NotFound"];
|
|
3611
|
+
426: components["responses"]["ClientOutdated"];
|
|
3612
|
+
};
|
|
3613
|
+
};
|
|
3614
|
+
deleteGroup: {
|
|
3615
|
+
parameters: {
|
|
3616
|
+
query?: never;
|
|
3617
|
+
header?: {
|
|
3618
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3619
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3620
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3621
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3622
|
+
};
|
|
3623
|
+
path: {
|
|
3624
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3625
|
+
};
|
|
3626
|
+
cookie?: never;
|
|
3627
|
+
};
|
|
3628
|
+
requestBody?: never;
|
|
3629
|
+
responses: {
|
|
3630
|
+
/** @description Deleted for all members */
|
|
3631
|
+
204: {
|
|
3632
|
+
headers: {
|
|
3633
|
+
[name: string]: unknown;
|
|
3634
|
+
};
|
|
3635
|
+
content?: never;
|
|
3636
|
+
};
|
|
3637
|
+
400: components["responses"]["BadRequest"];
|
|
3638
|
+
401: components["responses"]["Unauthorized"];
|
|
3639
|
+
403: components["responses"]["Forbidden"];
|
|
3640
|
+
404: components["responses"]["NotFound"];
|
|
3641
|
+
426: components["responses"]["ClientOutdated"];
|
|
3642
|
+
};
|
|
3643
|
+
};
|
|
3644
|
+
updateGroup: {
|
|
3645
|
+
parameters: {
|
|
3646
|
+
query?: never;
|
|
3647
|
+
header?: {
|
|
3648
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3649
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3650
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3651
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3652
|
+
};
|
|
3653
|
+
path: {
|
|
3654
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3655
|
+
};
|
|
3656
|
+
cookie?: never;
|
|
3657
|
+
};
|
|
3658
|
+
requestBody: {
|
|
3659
|
+
content: {
|
|
3660
|
+
"application/json": components["schemas"]["UpdateGroupRequest"];
|
|
3661
|
+
};
|
|
3662
|
+
};
|
|
3663
|
+
responses: {
|
|
3664
|
+
/** @description Updated group */
|
|
3665
|
+
200: {
|
|
3666
|
+
headers: {
|
|
3667
|
+
[name: string]: unknown;
|
|
3668
|
+
};
|
|
3669
|
+
content: {
|
|
3670
|
+
"application/json": components["schemas"]["Group"];
|
|
3671
|
+
};
|
|
3672
|
+
};
|
|
3673
|
+
400: components["responses"]["BadRequest"];
|
|
3674
|
+
401: components["responses"]["Unauthorized"];
|
|
3675
|
+
403: components["responses"]["Forbidden"];
|
|
3676
|
+
404: components["responses"]["NotFound"];
|
|
3677
|
+
422: components["responses"]["ValidationFailed"];
|
|
3678
|
+
426: components["responses"]["ClientOutdated"];
|
|
3679
|
+
};
|
|
3680
|
+
};
|
|
3681
|
+
setGroupAvatar: {
|
|
3682
|
+
parameters: {
|
|
3683
|
+
query?: never;
|
|
3684
|
+
header?: {
|
|
3685
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3686
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3687
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3688
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3689
|
+
};
|
|
3690
|
+
path: {
|
|
3691
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3692
|
+
};
|
|
3693
|
+
cookie?: never;
|
|
3694
|
+
};
|
|
3695
|
+
requestBody: {
|
|
3696
|
+
content: {
|
|
3697
|
+
"application/json": components["schemas"]["SetAvatarRequest"];
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3700
|
+
responses: {
|
|
3701
|
+
/** @description Updated group */
|
|
3702
|
+
200: {
|
|
3703
|
+
headers: {
|
|
3704
|
+
[name: string]: unknown;
|
|
3705
|
+
};
|
|
3706
|
+
content: {
|
|
3707
|
+
"application/json": components["schemas"]["Group"];
|
|
3708
|
+
};
|
|
3709
|
+
};
|
|
3710
|
+
400: components["responses"]["BadRequest"];
|
|
3711
|
+
401: components["responses"]["Unauthorized"];
|
|
3712
|
+
403: components["responses"]["Forbidden"];
|
|
3713
|
+
404: components["responses"]["NotFound"];
|
|
3714
|
+
426: components["responses"]["ClientOutdated"];
|
|
3715
|
+
};
|
|
3716
|
+
};
|
|
3717
|
+
addGroupParticipant: {
|
|
3718
|
+
parameters: {
|
|
3719
|
+
query?: never;
|
|
3720
|
+
header?: {
|
|
3721
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3722
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3723
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3724
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3725
|
+
};
|
|
3726
|
+
path: {
|
|
3727
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3728
|
+
};
|
|
3729
|
+
cookie?: never;
|
|
3730
|
+
};
|
|
3731
|
+
requestBody: {
|
|
3732
|
+
content: {
|
|
3733
|
+
"application/json": components["schemas"]["AddParticipantRequest"];
|
|
3734
|
+
};
|
|
3735
|
+
};
|
|
3736
|
+
responses: {
|
|
3737
|
+
/** @description Updated group (the user may still be pending approval) */
|
|
3738
|
+
200: {
|
|
3739
|
+
headers: {
|
|
3740
|
+
[name: string]: unknown;
|
|
3741
|
+
};
|
|
3742
|
+
content: {
|
|
3743
|
+
"application/json": components["schemas"]["Group"];
|
|
3744
|
+
};
|
|
3745
|
+
};
|
|
3746
|
+
400: components["responses"]["BadRequest"];
|
|
3747
|
+
401: components["responses"]["Unauthorized"];
|
|
3748
|
+
403: components["responses"]["Forbidden"];
|
|
3749
|
+
404: components["responses"]["NotFound"];
|
|
3750
|
+
409: components["responses"]["Conflict"];
|
|
3751
|
+
426: components["responses"]["ClientOutdated"];
|
|
3752
|
+
};
|
|
3753
|
+
};
|
|
3754
|
+
removeGroupParticipant: {
|
|
3755
|
+
parameters: {
|
|
3756
|
+
query?: never;
|
|
3757
|
+
header?: {
|
|
3758
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3759
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3760
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3761
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3762
|
+
};
|
|
3763
|
+
path: {
|
|
3764
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3765
|
+
user_id: components["parameters"]["UserId"];
|
|
3766
|
+
};
|
|
3767
|
+
cookie?: never;
|
|
3768
|
+
};
|
|
3769
|
+
requestBody?: never;
|
|
3770
|
+
responses: {
|
|
3771
|
+
/** @description Removed */
|
|
3772
|
+
204: {
|
|
3773
|
+
headers: {
|
|
3774
|
+
[name: string]: unknown;
|
|
3775
|
+
};
|
|
3776
|
+
content?: never;
|
|
3777
|
+
};
|
|
3778
|
+
400: components["responses"]["BadRequest"];
|
|
3779
|
+
401: components["responses"]["Unauthorized"];
|
|
3780
|
+
403: components["responses"]["Forbidden"];
|
|
3781
|
+
404: components["responses"]["NotFound"];
|
|
3782
|
+
426: components["responses"]["ClientOutdated"];
|
|
3783
|
+
};
|
|
3784
|
+
};
|
|
3785
|
+
updateGroupParticipantRole: {
|
|
3786
|
+
parameters: {
|
|
3787
|
+
query?: never;
|
|
3788
|
+
header?: {
|
|
3789
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3790
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3791
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3792
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3793
|
+
};
|
|
3794
|
+
path: {
|
|
3795
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3796
|
+
user_id: components["parameters"]["UserId"];
|
|
3797
|
+
};
|
|
3798
|
+
cookie?: never;
|
|
3799
|
+
};
|
|
3800
|
+
requestBody: {
|
|
3801
|
+
content: {
|
|
3802
|
+
"application/json": components["schemas"]["UpdateRoleRequest"];
|
|
3803
|
+
};
|
|
3804
|
+
};
|
|
3805
|
+
responses: {
|
|
3806
|
+
/** @description Updated group */
|
|
3807
|
+
200: {
|
|
3808
|
+
headers: {
|
|
3809
|
+
[name: string]: unknown;
|
|
3810
|
+
};
|
|
3811
|
+
content: {
|
|
3812
|
+
"application/json": components["schemas"]["Group"];
|
|
3813
|
+
};
|
|
3814
|
+
};
|
|
3815
|
+
400: components["responses"]["BadRequest"];
|
|
3816
|
+
401: components["responses"]["Unauthorized"];
|
|
3817
|
+
403: components["responses"]["Forbidden"];
|
|
3818
|
+
404: components["responses"]["NotFound"];
|
|
3819
|
+
422: components["responses"]["ValidationFailed"];
|
|
3820
|
+
426: components["responses"]["ClientOutdated"];
|
|
3821
|
+
};
|
|
3822
|
+
};
|
|
3823
|
+
transferGroupOwnership: {
|
|
3824
|
+
parameters: {
|
|
3825
|
+
query?: never;
|
|
3826
|
+
header?: {
|
|
3827
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3828
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3829
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3830
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3831
|
+
};
|
|
3832
|
+
path: {
|
|
3833
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3834
|
+
};
|
|
3835
|
+
cookie?: never;
|
|
3836
|
+
};
|
|
3837
|
+
requestBody: {
|
|
3838
|
+
content: {
|
|
3839
|
+
"application/json": components["schemas"]["TransferOwnerRequest"];
|
|
3840
|
+
};
|
|
3841
|
+
};
|
|
3842
|
+
responses: {
|
|
3843
|
+
/** @description Updated group */
|
|
3844
|
+
200: {
|
|
3845
|
+
headers: {
|
|
3846
|
+
[name: string]: unknown;
|
|
3847
|
+
};
|
|
3848
|
+
content: {
|
|
3849
|
+
"application/json": components["schemas"]["Group"];
|
|
3850
|
+
};
|
|
3851
|
+
};
|
|
3852
|
+
400: components["responses"]["BadRequest"];
|
|
3853
|
+
401: components["responses"]["Unauthorized"];
|
|
3854
|
+
403: components["responses"]["Forbidden"];
|
|
3855
|
+
404: components["responses"]["NotFound"];
|
|
3856
|
+
426: components["responses"]["ClientOutdated"];
|
|
3857
|
+
};
|
|
3858
|
+
};
|
|
3859
|
+
leaveGroup: {
|
|
3860
|
+
parameters: {
|
|
3861
|
+
query?: never;
|
|
3862
|
+
header?: {
|
|
3863
|
+
/** @description Version of the client app, for logs and the per-client metric. */
|
|
3864
|
+
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
3865
|
+
/** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
|
|
3866
|
+
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
3867
|
+
};
|
|
3868
|
+
path: {
|
|
3869
|
+
chat_id: components["parameters"]["ChatId"];
|
|
3870
|
+
};
|
|
3871
|
+
cookie?: never;
|
|
3872
|
+
};
|
|
3873
|
+
requestBody?: never;
|
|
3874
|
+
responses: {
|
|
3875
|
+
/** @description Left */
|
|
3876
|
+
204: {
|
|
3877
|
+
headers: {
|
|
3878
|
+
[name: string]: unknown;
|
|
3879
|
+
};
|
|
3880
|
+
content?: never;
|
|
3881
|
+
};
|
|
3882
|
+
400: components["responses"]["BadRequest"];
|
|
3883
|
+
401: components["responses"]["Unauthorized"];
|
|
3884
|
+
404: components["responses"]["NotFound"];
|
|
3885
|
+
409: components["responses"]["Conflict"];
|
|
3886
|
+
426: components["responses"]["ClientOutdated"];
|
|
3887
|
+
};
|
|
3888
|
+
};
|
|
3889
|
+
}
|