@myronsi/messenger-api 2.1.0-alpha.45.next.154 → 2.1.0-alpha.47

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/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.45. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.47. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -2074,6 +2074,288 @@ export interface paths {
2074
2074
  patch?: never;
2075
2075
  trace?: never;
2076
2076
  };
2077
+ "/chats/{chat_id}/messages/{message_id}/poll/votes": {
2078
+ parameters: {
2079
+ query?: never;
2080
+ header?: {
2081
+ /** @description Version of the client app, for logs and the per-client metric. */
2082
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2083
+ /** @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`). */
2084
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2085
+ };
2086
+ path: {
2087
+ chat_id: components["parameters"]["ChatId"];
2088
+ message_id: components["parameters"]["MessageId"];
2089
+ };
2090
+ cookie?: never;
2091
+ };
2092
+ get?: never;
2093
+ /**
2094
+ * Vote in a poll, change the vote or take it back
2095
+ * @description Replaces the caller's vote with `options` (indexes into `Poll.options`). An empty list takes the vote back.
2096
+ * More than one option needs `multiple_answers` (`422`). A quiz takes one option, and its first answer is
2097
+ * final (`409` `quiz_answered`). A closed poll answers `409` `poll_closed`. Members only; in a direct chat
2098
+ * with a block `403`. Every change sends `poll_updated` to the members of the chat.
2099
+ */
2100
+ put: operations["votePoll"];
2101
+ post?: never;
2102
+ delete?: never;
2103
+ options?: never;
2104
+ head?: never;
2105
+ patch?: never;
2106
+ trace?: never;
2107
+ };
2108
+ "/chats/{chat_id}/messages/{message_id}/poll/close": {
2109
+ parameters: {
2110
+ query?: never;
2111
+ header?: {
2112
+ /** @description Version of the client app, for logs and the per-client metric. */
2113
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2114
+ /** @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`). */
2115
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2116
+ };
2117
+ path: {
2118
+ chat_id: components["parameters"]["ChatId"];
2119
+ message_id: components["parameters"]["MessageId"];
2120
+ };
2121
+ cookie?: never;
2122
+ };
2123
+ get?: never;
2124
+ put?: never;
2125
+ /**
2126
+ * Close a poll
2127
+ * @description The creator may close the poll; in a group also the owner and admins (`Poll.can_close`, `403` otherwise).
2128
+ * Closing a closed poll changes nothing. A closed poll shows its results and the quiz answer to everyone and
2129
+ * takes no more votes. Sends `poll_updated`; no system message and no push.
2130
+ */
2131
+ post: operations["closePoll"];
2132
+ delete?: never;
2133
+ options?: never;
2134
+ head?: never;
2135
+ patch?: never;
2136
+ trace?: never;
2137
+ };
2138
+ "/chats/{chat_id}/messages/{message_id}/poll/voters": {
2139
+ parameters: {
2140
+ query?: never;
2141
+ header?: {
2142
+ /** @description Version of the client app, for logs and the per-client metric. */
2143
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2144
+ /** @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`). */
2145
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2146
+ };
2147
+ path: {
2148
+ chat_id: components["parameters"]["ChatId"];
2149
+ message_id: components["parameters"]["MessageId"];
2150
+ };
2151
+ cookie?: never;
2152
+ };
2153
+ /**
2154
+ * Who voted for an option of a public poll
2155
+ * @description Only for polls with `anonymous: false`, and only when the caller sees the results (`PollOption.voter_count` is
2156
+ * not `null`); `403` otherwise. Newest vote first. Users appear as the caller may see them.
2157
+ */
2158
+ get: operations["listPollVoters"];
2159
+ put?: never;
2160
+ post?: never;
2161
+ delete?: never;
2162
+ options?: never;
2163
+ head?: never;
2164
+ patch?: never;
2165
+ trace?: never;
2166
+ };
2167
+ "/chats/{chat_id}/imports": {
2168
+ parameters: {
2169
+ query?: never;
2170
+ header?: {
2171
+ /** @description Version of the client app, for logs and the per-client metric. */
2172
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2173
+ /** @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`). */
2174
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2175
+ };
2176
+ path: {
2177
+ chat_id: components["parameters"]["ChatId"];
2178
+ };
2179
+ cookie?: never;
2180
+ };
2181
+ /**
2182
+ * The imported histories of a chat
2183
+ * @description Imports that are running or done, oldest period first. A sender the importer assigned to a member is
2184
+ * `pending` or `declined` only for the importer and that member; everyone else sees it as `unassigned`
2185
+ * without `user_id` until the member confirms.
2186
+ */
2187
+ get: operations["listChatImports"];
2188
+ put?: never;
2189
+ /**
2190
+ * Start importing a history from another messenger
2191
+ * @description The client parses the export (Telegram Desktop JSON or a WhatsApp chat export) on the device, uploads the
2192
+ * files with `POST /attachments`, then sends the messages in order with `PUT /imports/{import_id}/messages`
2193
+ * and ends with `POST /imports/{import_id}/finish`.
2194
+ *
2195
+ * In a direct chat either user may import, not in a chat in the Requests folder or with a block (`403`). In a
2196
+ * group only an admin or the owner may (`403`). One import per chat runs at a time (`409`). The messages are
2197
+ * placed above the oldest message of the chat, in their original order; a second import goes next to the
2198
+ * imports whose periods it follows, and an import whose period overlaps an existing one is `409`.
2199
+ *
2200
+ * `senders` lists every name of the export. `me: true` marks the caller's own messages. `user_id` suggests a
2201
+ * member of the chat for a name; that member confirms it after the import is finished. Every other name is
2202
+ * shown as text.
2203
+ */
2204
+ post: operations["startChatImport"];
2205
+ delete?: never;
2206
+ options?: never;
2207
+ head?: never;
2208
+ patch?: never;
2209
+ trace?: never;
2210
+ };
2211
+ "/imports/{import_id}": {
2212
+ parameters: {
2213
+ query?: never;
2214
+ header?: {
2215
+ /** @description Version of the client app, for logs and the per-client metric. */
2216
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2217
+ /** @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`). */
2218
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2219
+ };
2220
+ path: {
2221
+ import_id: components["parameters"]["ImportId"];
2222
+ };
2223
+ cookie?: never;
2224
+ };
2225
+ /** One import, for resuming it or showing its senders */
2226
+ get: operations["getChatImport"];
2227
+ put?: never;
2228
+ post?: never;
2229
+ /**
2230
+ * Remove an imported history
2231
+ * @description The importer, or the owner of a group, removes every message of the import for everyone. The messages
2232
+ * disappear at once (`import_update` with state `removing`); the worker deletes them afterwards.
2233
+ */
2234
+ delete: operations["removeChatImport"];
2235
+ options?: never;
2236
+ head?: never;
2237
+ patch?: never;
2238
+ trace?: never;
2239
+ };
2240
+ "/imports/{import_id}/messages": {
2241
+ parameters: {
2242
+ query?: never;
2243
+ header?: {
2244
+ /** @description Version of the client app, for logs and the per-client metric. */
2245
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2246
+ /** @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`). */
2247
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2248
+ };
2249
+ path: {
2250
+ import_id: components["parameters"]["ImportId"];
2251
+ };
2252
+ cookie?: never;
2253
+ };
2254
+ get?: never;
2255
+ /**
2256
+ * Add the next batch of messages to a running import
2257
+ * @description Only the importer. `from_index` must be the import's `next_index`; a batch that was stored already answers
2258
+ * with the current `next_index`, so a retry after a lost answer is safe. Another `from_index` is `409`.
2259
+ * Attachments must be the importer's own uploads. Imported messages send no push and count as read.
2260
+ */
2261
+ put: operations["addImportedMessages"];
2262
+ post?: never;
2263
+ delete?: never;
2264
+ options?: never;
2265
+ head?: never;
2266
+ patch?: never;
2267
+ trace?: never;
2268
+ };
2269
+ "/imports/{import_id}/finish": {
2270
+ parameters: {
2271
+ query?: never;
2272
+ header?: {
2273
+ /** @description Version of the client app, for logs and the per-client metric. */
2274
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2275
+ /** @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`). */
2276
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2277
+ };
2278
+ path: {
2279
+ import_id: components["parameters"]["ImportId"];
2280
+ };
2281
+ cookie?: never;
2282
+ };
2283
+ get?: never;
2284
+ put?: never;
2285
+ /**
2286
+ * Finish an import once every message is stored
2287
+ * @description Only the importer, once `next_index` equals `message_count` (`422` before). Adds the closing system
2288
+ * message, tells every member to load the chat again (`import_update`, sync change `history_imported`) and
2289
+ * asks each assigned member to confirm their messages (`import_sender_update`).
2290
+ */
2291
+ post: operations["finishChatImport"];
2292
+ delete?: never;
2293
+ options?: never;
2294
+ head?: never;
2295
+ patch?: never;
2296
+ trace?: never;
2297
+ };
2298
+ "/imports/{import_id}/senders/{sender_key}": {
2299
+ parameters: {
2300
+ query?: never;
2301
+ header?: {
2302
+ /** @description Version of the client app, for logs and the per-client metric. */
2303
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2304
+ /** @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`). */
2305
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2306
+ };
2307
+ path: {
2308
+ import_id: components["parameters"]["ImportId"];
2309
+ sender_key: components["parameters"]["ImportSenderKey"];
2310
+ };
2311
+ cookie?: never;
2312
+ };
2313
+ get?: never;
2314
+ /**
2315
+ * Suggest a member for a name of the export, or take the suggestion back
2316
+ * @description Only the importer. `user_id` must be another member of the chat; `null` makes the name text again. A name
2317
+ * that is `me` or `confirmed` cannot be reassigned, and a member who declined or withdrew a name cannot be
2318
+ * suggested for it again (`409`).
2319
+ */
2320
+ put: operations["assignImportSender"];
2321
+ post?: never;
2322
+ delete?: never;
2323
+ options?: never;
2324
+ head?: never;
2325
+ patch?: never;
2326
+ trace?: never;
2327
+ };
2328
+ "/imports/{import_id}/senders/{sender_key}/decision": {
2329
+ parameters: {
2330
+ query?: never;
2331
+ header?: {
2332
+ /** @description Version of the client app, for logs and the per-client metric. */
2333
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2334
+ /** @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`). */
2335
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2336
+ };
2337
+ path: {
2338
+ import_id: components["parameters"]["ImportId"];
2339
+ sender_key: components["parameters"]["ImportSenderKey"];
2340
+ };
2341
+ cookie?: never;
2342
+ };
2343
+ get?: never;
2344
+ put?: never;
2345
+ /**
2346
+ * Confirm or decline that a name of the export is you, or withdraw a confirmation
2347
+ * @description Only the member the importer suggested, once the import is finished. `confirm` links the messages of the
2348
+ * name to the caller's account for everyone; `decline` keeps them as text; `withdraw` turns a confirmed name
2349
+ * back into text. After `decline` or `withdraw` the importer cannot suggest the caller for that name again.
2350
+ * `404` when the caller is not the suggested member or the name is not in the matching state.
2351
+ */
2352
+ post: operations["decideImportSender"];
2353
+ delete?: never;
2354
+ options?: never;
2355
+ head?: never;
2356
+ patch?: never;
2357
+ trace?: never;
2358
+ };
2077
2359
  "/chats/{chat_id}/messages/forward": {
2078
2360
  parameters: {
2079
2361
  query?: never;
@@ -2317,7 +2599,10 @@ export interface paths {
2317
2599
  delete: operations["deleteGroup"];
2318
2600
  options?: never;
2319
2601
  head?: never;
2320
- /** Change name or description */
2602
+ /**
2603
+ * Change name or description
2604
+ * @description A new name posts a `group_renamed` system message; the same name posts nothing.
2605
+ */
2321
2606
  patch: operations["updateGroup"];
2322
2607
  trace?: never;
2323
2608
  };
@@ -2338,11 +2623,17 @@ export interface paths {
2338
2623
  get?: never;
2339
2624
  /**
2340
2625
  * Set the group avatar from an uploaded attachment
2341
- * @description The attachment must be an image the caller uploaded with purpose `avatar` (`422` otherwise).
2626
+ * @description The attachment must be an image the caller uploaded with purpose `avatar` (`422` otherwise). Posts a
2627
+ * `group_avatar_changed` system message.
2342
2628
  */
2343
2629
  put: operations["setGroupAvatar"];
2344
2630
  post?: never;
2345
- delete?: never;
2631
+ /**
2632
+ * Remove the group avatar
2633
+ * @description Same permission as setting it. Posts a `group_avatar_changed` system message with `avatar_removed: true`;
2634
+ * removing an avatar the group does not have changes nothing.
2635
+ */
2636
+ delete: operations["deleteGroupAvatar"];
2346
2637
  options?: never;
2347
2638
  head?: never;
2348
2639
  patch?: never;
@@ -2456,7 +2747,8 @@ export interface paths {
2456
2747
  put?: never;
2457
2748
  /**
2458
2749
  * Make another member the owner
2459
- * @description The previous owner becomes an admin. Transferring to yourself is `422`.
2750
+ * @description The previous owner becomes an admin. Transferring to yourself is `422`. Posts an `owner_transferred` system
2751
+ * message.
2460
2752
  */
2461
2753
  post: operations["transferGroupOwnership"];
2462
2754
  delete?: never;
@@ -3657,6 +3949,67 @@ export interface paths {
3657
3949
  patch?: never;
3658
3950
  trace?: never;
3659
3951
  };
3952
+ "/maps/tiles/{z}/{x}/{y}": {
3953
+ parameters: {
3954
+ query?: never;
3955
+ header?: {
3956
+ /** @description Version of the client app, for logs and the per-client metric. */
3957
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
3958
+ /** @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`). */
3959
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
3960
+ };
3961
+ path: {
3962
+ z: number;
3963
+ /** @description Tile column, `0` to `2^z - 1` */
3964
+ x: number;
3965
+ /** @description Tile row, `0` to `2^z - 1` */
3966
+ y: number;
3967
+ };
3968
+ cookie?: never;
3969
+ };
3970
+ /**
3971
+ * A 256 px map tile, through the server
3972
+ * @description For the map a client shows while picking a place. The server fetches OpenStreetMap tiles and caches them, so
3973
+ * the viewer never contacts the tile provider. Clients must show "© OpenStreetMap contributors" on the map,
3974
+ * request only the tiles of the visible area and never download tiles ahead (no offline maps). At most 600
3975
+ * tiles per minute per user (`429`). `503` when the provider cannot be reached and no copy is cached.
3976
+ */
3977
+ get: operations["getMapTile"];
3978
+ put?: never;
3979
+ post?: never;
3980
+ delete?: never;
3981
+ options?: never;
3982
+ head?: never;
3983
+ patch?: never;
3984
+ trace?: never;
3985
+ };
3986
+ "/maps/static": {
3987
+ parameters: {
3988
+ query?: never;
3989
+ header?: {
3990
+ /** @description Version of the client app, for logs and the per-client metric. */
3991
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
3992
+ /** @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`). */
3993
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
3994
+ };
3995
+ path?: never;
3996
+ cookie?: never;
3997
+ };
3998
+ /**
3999
+ * The map image of a location message
4000
+ * @description Use `MessageLocation.map.url` as it is; `sig` proves the server made it. A 640 x 320 JPEG at zoom 16 with a
4001
+ * pin in the middle, made from OpenStreetMap tiles. Clients show "© OpenStreetMap contributors" on it. `503`
4002
+ * when the image is not made yet and the tile provider cannot be reached.
4003
+ */
4004
+ get: operations["getStaticMap"];
4005
+ put?: never;
4006
+ post?: never;
4007
+ delete?: never;
4008
+ options?: never;
4009
+ head?: never;
4010
+ patch?: never;
4011
+ trace?: never;
4012
+ };
3660
4013
  "/me/notifications": {
3661
4014
  parameters: {
3662
4015
  query?: never;
@@ -4814,7 +5167,7 @@ export interface components {
4814
5167
  * codes must be treated like `internal_error`.
4815
5168
  * @enum {string}
4816
5169
  */
4817
- 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" | "device_proof_stale" | "invalid_client_version" | "blocked_by_user" | "approval_required" | "user_verification_required" | "session_too_new" | "calls_unavailable" | "calls_not_allowed" | "call_identity_required" | "call_full" | "call_ended" | "already_in_call" | "stale_epoch" | "limit_reached" | "account_restricted" | "internal_error";
5170
+ 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" | "device_proof_stale" | "invalid_client_version" | "blocked_by_user" | "approval_required" | "user_verification_required" | "session_too_new" | "calls_unavailable" | "calls_not_allowed" | "call_identity_required" | "call_full" | "call_ended" | "already_in_call" | "stale_epoch" | "limit_reached" | "account_restricted" | "poll_closed" | "quiz_answered" | "internal_error";
4818
5171
  /** @description RFC 9457 problem details. `426 Upgrade Required` (`client_outdated`) uses the same format. */
4819
5172
  Problem: {
4820
5173
  /**
@@ -5392,6 +5745,12 @@ export interface components {
5392
5745
  * border and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is
5393
5746
  * added to a pack.
5394
5747
  *
5748
+ * A sticker can also be made from a video (`kind: video`: MP4, WebM or MOV) or an animated GIF of at most 15 MB.
5749
+ * The server keeps at most 3 s of it (from `start_ms` to `end_ms`, or the first 3 s), crops it to the square
5750
+ * `crop_x`, `crop_y`, `crop_size` when given (otherwise it fits the clip into the square with a transparent
5751
+ * border), drops the sound and stores a looping animated WebP of at most 512 x 512 px (`413` when it is still
5752
+ * over 1 MB at the lowest quality). The sticker then has `is_animated: true`.
5753
+ *
5395
5754
  * `profile_music`: an audio file of at most 20 MB. The server keeps at most 30 s of it (from `start_ms` to
5396
5755
  * `end_ms`, or the first 30 s), stored as AAC, reads the title and artist into `tags` and the embedded cover
5397
5756
  * into `thumbnail_url`. Use it with `PUT /me/music`.
@@ -5414,10 +5773,22 @@ export interface components {
5414
5773
  duration_ms?: number;
5415
5774
  /** @description Amplitude samples (0-255) of a voice message */
5416
5775
  waveform?: number[];
5417
- /** @description `profile_music` only: where the kept part starts. */
5776
+ /** @description `profile_music`, and `sticker` from a video or GIF: where the kept part starts. */
5418
5777
  start_ms?: number;
5419
- /** @description `profile_music` only: where the kept part ends, at most 30 s after `start_ms`. */
5778
+ /**
5779
+ * @description `profile_music`: where the kept part ends, at most 30 s after `start_ms`. `sticker` from a video or GIF: at
5780
+ * most 3 s after `start_ms`.
5781
+ */
5420
5782
  end_ms?: number;
5783
+ /** @description `sticker` from a video or GIF: left edge of the square crop, as a fraction of the width. */
5784
+ crop_x?: number;
5785
+ /** @description `sticker` from a video or GIF: top edge of the square crop, as a fraction of the height. */
5786
+ crop_y?: number;
5787
+ /**
5788
+ * @description `sticker` from a video or GIF: side of the square crop, as a fraction of the shorter side. Send all three
5789
+ * crop fields or none; the square must lie inside the frame.
5790
+ */
5791
+ crop_size?: number;
5421
5792
  };
5422
5793
  Attachment: {
5423
5794
  id: components["schemas"]["AttachmentRef"];
@@ -5551,11 +5922,17 @@ export interface components {
5551
5922
  * @enum {string}
5552
5923
  */
5553
5924
  MediaKind: "image" | "audio" | "visual" | "file" | "voice" | "link";
5554
- /** @enum {string} */
5555
- MessageType: "text" | "file" | "voice" | "system" | "sticker";
5925
+ /**
5926
+ * @description `poll`, `contact` and `location` carry their data in `Message.poll`, `Message.contact` and
5927
+ * `Message.location`. For older clients their `content` holds a short plain-text summary: `📊 <question>`,
5928
+ * `👤 @<username>`, or `📍 <place name> <OpenStreetMap link>`.
5929
+ * @enum {string}
5930
+ */
5931
+ MessageType: "text" | "file" | "voice" | "system" | "sticker" | "poll" | "contact" | "location";
5556
5932
  /**
5557
5933
  * @description One sticker of a pack. `image` is a WebP or PNG of at most 512 x 512 px with transparency, animated when
5558
- * `is_animated` is true; any signed-in user can load it. Clients show it without a bubble.
5934
+ * `is_animated` is true (also stickers made from a video or GIF); any signed-in user can load it. The `panel`
5935
+ * variant of an animated sticker is a still first frame. Clients show it without a bubble.
5559
5936
  */
5560
5937
  Sticker: {
5561
5938
  id: components["schemas"]["Id"];
@@ -5710,10 +6087,11 @@ export interface components {
5710
6087
  * message and its `scope`. `pins_changed`: load the pins of the chat again. `history_cleared`: drop the
5711
6088
  * messages up to and including `before_message_id` (`scope` says for whom). `chat_hidden`: the caller
5712
6089
  * deleted the chat for themselves up to `before_message_id`.
6090
+ * `history_imported`: an imported history was added, removed or a sender confirmed; load the chat again.
5713
6091
  */
5714
6092
  SyncChange: {
5715
6093
  /** @enum {string} */
5716
- type: "message_updated" | "message_deleted" | "pins_changed" | "history_cleared" | "chat_hidden";
6094
+ type: "message_updated" | "message_deleted" | "pins_changed" | "history_cleared" | "chat_hidden" | "history_imported";
5717
6095
  chat_id: components["schemas"]["Id"];
5718
6096
  message_id?: components["schemas"]["Id"];
5719
6097
  /** @enum {string} */
@@ -5733,7 +6111,10 @@ export interface components {
5733
6111
  type: components["schemas"]["MessageType"];
5734
6112
  /** @description `null` for system messages. */
5735
6113
  sender: components["schemas"]["User"] | null;
5736
- /** @description Text, the caption of a file, or the emoji of a sticker; `null` when deleted. */
6114
+ /**
6115
+ * @description Text, the caption of a file, the emoji of a sticker, or the plain-text summary of a poll, contact or
6116
+ * location (see `MessageType`); `null` when deleted.
6117
+ */
5737
6118
  content: string | null;
5738
6119
  attachment: components["schemas"]["Attachment"] | null;
5739
6120
  reply_to: components["schemas"]["Id"] | null;
@@ -5748,9 +6129,11 @@ export interface components {
5748
6129
  attachments?: components["schemas"]["Attachment"][];
5749
6130
  reactions: components["schemas"]["Reaction"][];
5750
6131
  read_by: components["schemas"]["ReadReceipt"][];
6132
+ /** @description When the message was sent; for an imported message, when it was sent in the other messenger. */
5751
6133
  created_at: components["schemas"]["Timestamp"];
5752
6134
  edited_at: components["schemas"]["Timestamp"] | null;
5753
6135
  is_deleted: boolean;
6136
+ import?: components["schemas"]["MessageImport"];
5754
6137
  /**
5755
6138
  * @description `true` when moderation removed the message; it is then also `is_deleted`. Clients show "Removed by
5756
6139
  * moderation" instead of the deleted placeholder. Absent otherwise.
@@ -5768,6 +6151,107 @@ export interface components {
5768
6151
  mentions?: components["schemas"]["Id"][];
5769
6152
  /** @description `true` when an owner or admin wrote `@all`; it mentions every member. Absent otherwise. */
5770
6153
  mentions_all?: boolean;
6154
+ /** @description The poll of a `poll` message as the requesting user sees it; absent for other types, when deleted and in chat-list previews. */
6155
+ poll?: components["schemas"]["Poll"];
6156
+ /** @description The shared user of a `contact` message; absent for other types, when deleted and in chat-list previews. */
6157
+ contact?: components["schemas"]["ContactCard"];
6158
+ /** @description The place of a `location` message; absent for other types and when deleted. */
6159
+ location?: components["schemas"]["MessageLocation"];
6160
+ };
6161
+ /**
6162
+ * @description A new poll. Option texts are trimmed and must differ (ignoring case). `quiz` makes it a quiz: one correct
6163
+ * option, one answer per voter that cannot be changed; it cannot be combined with `multiple_answers`.
6164
+ * `close_at` closes the poll automatically, 5 minutes to 30 days from now.
6165
+ */
6166
+ PollCreate: {
6167
+ question: string;
6168
+ options: string[];
6169
+ /** @default false */
6170
+ multiple_answers: boolean;
6171
+ /**
6172
+ * @description `false` lets everyone who sees the results list who voted for what. Anonymous votes are still stored
6173
+ * with the voter, so each member votes once and can change the vote, but no one else sees them.
6174
+ * @default true
6175
+ */
6176
+ anonymous: boolean;
6177
+ quiz?: components["schemas"]["PollQuizCreate"];
6178
+ close_at?: components["schemas"]["Timestamp"];
6179
+ };
6180
+ PollQuizCreate: {
6181
+ /** @description Index into `options` */
6182
+ correct_option: number;
6183
+ explanation?: string;
6184
+ };
6185
+ /**
6186
+ * @description A poll as the requesting user sees it. Results (`voter_count`, `total_voters`, `is_correct`, `explanation`)
6187
+ * are `null` or absent until that user voted, unless they created the poll or it is closed. A poll is closed
6188
+ * when `closed_at` is set; clients also treat it as closed once `close_at` has passed.
6189
+ */
6190
+ Poll: {
6191
+ question: string;
6192
+ options: components["schemas"]["PollOption"][];
6193
+ multiple_answers: boolean;
6194
+ anonymous: boolean;
6195
+ quiz: boolean;
6196
+ /** @description The explanation of a quiz once the user sees the results. */
6197
+ explanation: string | null;
6198
+ close_at: components["schemas"]["Timestamp"] | null;
6199
+ closed_at: components["schemas"]["Timestamp"] | null;
6200
+ /** @description People who voted, each counted once even with several answers. */
6201
+ total_voters: number | null;
6202
+ /** @description Indexes of the options the user voted for; empty when they have not voted. */
6203
+ my_votes: number[];
6204
+ /** @description The user may close the poll now. */
6205
+ can_close: boolean;
6206
+ /** @description Grows with every vote and when the poll closes; keep the poll with the highest version. */
6207
+ version: number;
6208
+ };
6209
+ PollOption: {
6210
+ text: string;
6211
+ voter_count: number | null;
6212
+ /** @description Set on every option of a quiz once the user sees the results; absent otherwise. */
6213
+ is_correct?: boolean;
6214
+ };
6215
+ PollVoteRequest: {
6216
+ options: number[];
6217
+ };
6218
+ ContactCreate: {
6219
+ /** @description A user whose profile the sender may open (`403` otherwise), the sender included; not a deleted account. */
6220
+ user_id: components["schemas"]["Id"];
6221
+ };
6222
+ ContactCard: {
6223
+ user_id: components["schemas"]["Id"];
6224
+ /**
6225
+ * @description The shared user as the requesting user may see them now, not as they were when the card was sent; `null`
6226
+ * when the account is gone.
6227
+ */
6228
+ user: components["schemas"]["User"] | null;
6229
+ };
6230
+ LocationCreate: {
6231
+ /** Format: double */
6232
+ latitude: number;
6233
+ /** Format: double */
6234
+ longitude: number;
6235
+ /** @description Accuracy of a measured position in metres; omit for a point picked on the map. */
6236
+ accuracy_m?: number;
6237
+ /** @description A name for the place, typed by the sender. */
6238
+ title?: string;
6239
+ };
6240
+ /** @description Coordinates are rounded to 6 decimals (about 10 cm). */
6241
+ MessageLocation: {
6242
+ /** Format: double */
6243
+ latitude: number;
6244
+ /** Format: double */
6245
+ longitude: number;
6246
+ accuracy_m: number | null;
6247
+ title: string | null;
6248
+ map: components["schemas"]["MapImage"];
6249
+ };
6250
+ MapImage: {
6251
+ /** @description `GET /maps/static` with the signed point; load it like other API images */
6252
+ url: string;
6253
+ width: number;
6254
+ height: number;
5771
6255
  };
5772
6256
  LinkPreview: {
5773
6257
  /** @description The page after redirects */
@@ -5784,12 +6268,16 @@ export interface components {
5784
6268
  height: number | null;
5785
6269
  };
5786
6270
  /** @enum {string} */
5787
- SystemEventKind: "group_created" | "member_added" | "member_joined" | "member_removed" | "member_left" | "call" | "message_pinned" | "message_unpinned";
6271
+ SystemEventKind: "group_created" | "member_added" | "member_joined" | "member_removed" | "member_left" | "call" | "message_pinned" | "message_unpinned" | "history_imported" | "history_import_ended" | "imported_note" | "group_renamed" | "group_avatar_changed" | "owner_transferred";
5788
6272
  /**
5789
6273
  * @description What a `system` message records; set on system messages only, whose `content` is then `null`. The names
5790
- * are the display names at the time of the event. `target` fields are set for `member_added` and
5791
- * `member_removed`. `call` is set for `call` messages: one per call, posted when the call ends, `actor` is the
5792
- * initiator. `message_id` and `snippet` are set for `message_pinned` and `message_unpinned`.
6274
+ * are the display names at the time of the event. `target` fields are set for `member_added`,
6275
+ * `member_removed` and `owner_transferred` (the new owner; `actor` is the previous one). `call` is set for
6276
+ * `call` messages: one per call, posted when the call ends, `actor` is the initiator. `message_id` and
6277
+ * `snippet` are set for `message_pinned` and `message_unpinned`. `old_name` and `new_name` are set for
6278
+ * `group_renamed`, `avatar_removed` for `group_avatar_changed`.
6279
+ * `history_imported` opens and `history_import_ended` closes an imported history; both carry `import`, and
6280
+ * `actor` is the importer. `imported_note` is a line of the export that is not a message; its text is `text`.
5793
6281
  */
5794
6282
  SystemEvent: {
5795
6283
  kind: components["schemas"]["SystemEventKind"];
@@ -5801,11 +6289,19 @@ export interface components {
5801
6289
  /** @description The pinned or unpinned message. */
5802
6290
  message_id?: components["schemas"]["Id"];
5803
6291
  /**
5804
- * @description Start of the pinned message's text at the time of the event (at most 60 characters plus `…`); empty for a
5805
- * message without text, which clients name by its `message_type`.
6292
+ * @description Start of the pinned message's text at the time of the event (at most 60 characters plus `…`): the question
6293
+ * of a poll, the place name of a location. Empty for a message without text and for a contact, which clients
6294
+ * name by its `message_type`.
5806
6295
  */
5807
6296
  snippet?: string;
5808
6297
  message_type?: components["schemas"]["MessageType"];
6298
+ old_name?: string;
6299
+ new_name?: string;
6300
+ /** @description `true` when the group photo was removed, `false` when a new one was set. */
6301
+ avatar_removed?: boolean;
6302
+ import?: components["schemas"]["ImportSummary"];
6303
+ /** @description The line of the export, for `imported_note`. */
6304
+ text?: string;
5809
6305
  };
5810
6306
  MessagePage: {
5811
6307
  /** @description Oldest to newest */
@@ -5833,12 +6329,18 @@ export interface components {
5833
6329
  chat_id: components["schemas"]["Id"];
5834
6330
  client_temp_id: components["schemas"]["ClientTempId"];
5835
6331
  /** @enum {string} */
5836
- type: "text" | "file" | "voice" | "sticker";
6332
+ type: "text" | "file" | "voice" | "sticker" | "poll" | "contact" | "location";
5837
6333
  content: string | null;
5838
6334
  reply_to: components["schemas"]["Id"] | null;
5839
6335
  /** @description Uploaded files of the send that still exist, in the order they were sent. */
5840
6336
  attachments: components["schemas"]["Attachment"][];
5841
6337
  sticker?: components["schemas"]["Sticker"];
6338
+ /** @description The poll of an unsent `poll` message, as it was sent. */
6339
+ poll?: components["schemas"]["PollCreate"];
6340
+ /** @description The contact of an unsent `contact` message, as it was sent. */
6341
+ contact?: components["schemas"]["ContactCreate"];
6342
+ /** @description The place of an unsent `location` message, as it was sent. */
6343
+ location?: components["schemas"]["LocationCreate"];
5842
6344
  error_code: components["schemas"]["ErrorCode"];
5843
6345
  created_at: components["schemas"]["Timestamp"];
5844
6346
  };
@@ -5849,8 +6351,18 @@ export interface components {
5849
6351
  SendMessageRequest: {
5850
6352
  client_temp_id: components["schemas"]["ClientTempId"];
5851
6353
  /** @enum {string} */
5852
- type: "text" | "file" | "voice" | "sticker";
6354
+ type: "text" | "file" | "voice" | "sticker" | "poll" | "contact" | "location";
5853
6355
  content?: string | null;
6356
+ /**
6357
+ * @description The poll of a `poll` message. Poll, contact and location messages have no content, attachment, sticker or
6358
+ * drawings; the server writes a plain-text summary into `content` for older clients. Send them with this
6359
+ * operation; the WebSocket `message` event does not take them.
6360
+ */
6361
+ poll?: components["schemas"]["PollCreate"];
6362
+ /** @description The shared user of a `contact` message. */
6363
+ contact?: components["schemas"]["ContactCreate"];
6364
+ /** @description The place of a `location` message. */
6365
+ location?: components["schemas"]["LocationCreate"];
5854
6366
  /**
5855
6367
  * @description The sticker of a `sticker` message, from any pack that is not deleted. Sticker messages have no content,
5856
6368
  * attachment or drawings; the server sets `content` to the sticker's emoji. Send stickers with this
@@ -5868,7 +6380,7 @@ export interface components {
5868
6380
  * instead of the sender's own upload: that is how a member draws on an image someone sent.
5869
6381
  */
5870
6382
  drawings?: components["schemas"]["AttachmentDrawing"][];
5871
- };
6383
+ } & (unknown & unknown & unknown);
5872
6384
  EditMessageRequest: {
5873
6385
  /** @description New text, or the new caption of a file. Empty removes a file's caption; a text message rejects it. */
5874
6386
  content: string;
@@ -5984,6 +6496,120 @@ export interface components {
5984
6496
  items: components["schemas"]["PinnedMessage"][];
5985
6497
  next_cursor: components["schemas"]["Cursor"];
5986
6498
  };
6499
+ /** @enum {string} */
6500
+ ImportSource: "telegram" | "whatsapp";
6501
+ /**
6502
+ * @description `running`: messages are being added. `done`: finished. `removing`: being removed.
6503
+ * @enum {string}
6504
+ */
6505
+ ChatImportState: "running" | "done" | "removing";
6506
+ /** @description The client's key for one name of the export. */
6507
+ ImportSenderKey: string;
6508
+ /**
6509
+ * @description `me`: the importer's own messages. `unassigned`: shown as text. `pending`: suggested for `user_id`, who has
6510
+ * not answered. `confirmed`: `user_id` confirmed; the messages show their account. `declined`: the suggested
6511
+ * member said no; shown as text.
6512
+ * @enum {string}
6513
+ */
6514
+ ImportSenderState: "me" | "unassigned" | "pending" | "confirmed" | "declined";
6515
+ ChatImportSender: {
6516
+ key: components["schemas"]["ImportSenderKey"];
6517
+ name: string;
6518
+ message_count: number;
6519
+ state: components["schemas"]["ImportSenderState"];
6520
+ user_id: components["schemas"]["Id"] | null;
6521
+ };
6522
+ ChatImport: {
6523
+ id: components["schemas"]["Id"];
6524
+ chat_id: components["schemas"]["Id"];
6525
+ source: components["schemas"]["ImportSource"];
6526
+ state: components["schemas"]["ChatImportState"];
6527
+ message_count: number;
6528
+ file_count: number;
6529
+ first_at: components["schemas"]["Timestamp"];
6530
+ last_at: components["schemas"]["Timestamp"];
6531
+ /** @description How many messages are stored; the `from_index` of the next batch. */
6532
+ next_index: number;
6533
+ imported_by: components["schemas"]["Id"] | null;
6534
+ created_at: components["schemas"]["Timestamp"];
6535
+ finished_at: components["schemas"]["Timestamp"] | null;
6536
+ senders: components["schemas"]["ChatImportSender"][];
6537
+ };
6538
+ ChatImportList: {
6539
+ items: components["schemas"]["ChatImport"][];
6540
+ };
6541
+ StartChatImportSender: {
6542
+ key: components["schemas"]["ImportSenderKey"];
6543
+ name: string;
6544
+ message_count: number;
6545
+ /** @description The caller's own messages; at most one sender. */
6546
+ me?: boolean;
6547
+ /** @description A member of the chat suggested for this name; not with `me`. */
6548
+ user_id?: components["schemas"]["Id"];
6549
+ };
6550
+ StartChatImportRequest: {
6551
+ source: components["schemas"]["ImportSource"];
6552
+ message_count: number;
6553
+ file_count: number;
6554
+ first_at: components["schemas"]["Timestamp"];
6555
+ last_at: components["schemas"]["Timestamp"];
6556
+ senders: components["schemas"]["StartChatImportSender"][];
6557
+ };
6558
+ /**
6559
+ * @description `note`: a line of the export that is not a message (for example that someone joined), shown as a system message.
6560
+ * @enum {string}
6561
+ */
6562
+ ImportedMessageType: "text" | "file" | "voice" | "note";
6563
+ ImportedMessage: {
6564
+ /** @description Position in the import, counting from 0 without gaps. */
6565
+ index: number;
6566
+ /** @description Required except for `note`. */
6567
+ sender_key?: components["schemas"]["ImportSenderKey"];
6568
+ /** @description When the message was sent in the other messenger; between the import's `first_at` and `last_at`. */
6569
+ original_at: components["schemas"]["Timestamp"];
6570
+ type: components["schemas"]["ImportedMessageType"];
6571
+ content?: string | null;
6572
+ /** @description The importer's uploads; two to ten images or videos make an album. */
6573
+ attachment_ids?: components["schemas"]["AttachmentRef"][];
6574
+ /** @description `index` of an earlier message of the import that this one answers. */
6575
+ reply_to_index?: number;
6576
+ };
6577
+ AddImportedMessagesRequest: {
6578
+ from_index: number;
6579
+ messages: components["schemas"]["ImportedMessage"][];
6580
+ };
6581
+ ImportProgress: {
6582
+ next_index: number;
6583
+ };
6584
+ AssignImportSenderRequest: {
6585
+ user_id: components["schemas"]["Id"] | null;
6586
+ };
6587
+ DecideImportSenderRequest: {
6588
+ /** @enum {string} */
6589
+ decision: "confirm" | "decline" | "withdraw";
6590
+ };
6591
+ /** @description Set on messages that came from an import. */
6592
+ MessageImport: {
6593
+ import_id: components["schemas"]["Id"];
6594
+ source: components["schemas"]["ImportSource"];
6595
+ original_at: components["schemas"]["Timestamp"];
6596
+ /** @description The name in the export; absent on system messages. */
6597
+ sender_name?: string;
6598
+ /**
6599
+ * @description `me`: the importer's own message, `sender` is the importer. `confirmed`: the member confirmed the name,
6600
+ * `sender` is that member. `unconfirmed`: `sender` is `null`; show `sender_name` as text. Absent on system
6601
+ * messages.
6602
+ * @enum {string}
6603
+ */
6604
+ sender_state?: "me" | "confirmed" | "unconfirmed";
6605
+ };
6606
+ ImportSummary: {
6607
+ import_id: components["schemas"]["Id"];
6608
+ source: components["schemas"]["ImportSource"];
6609
+ message_count: number;
6610
+ first_at: components["schemas"]["Timestamp"];
6611
+ last_at: components["schemas"]["Timestamp"];
6612
+ };
5987
6613
  CreateChatRequest: {
5988
6614
  user_id: components["schemas"]["Id"];
5989
6615
  initial_message?: string | null;
@@ -6580,6 +7206,8 @@ export interface components {
6580
7206
  After: components["schemas"]["Cursor"];
6581
7207
  ChatId: components["schemas"]["Id"];
6582
7208
  MessageId: components["schemas"]["Id"];
7209
+ ImportId: components["schemas"]["Id"];
7210
+ ImportSenderKey: components["schemas"]["ImportSenderKey"];
6583
7211
  UserId: components["schemas"]["Id"];
6584
7212
  InviteLinkId: components["schemas"]["Id"];
6585
7213
  InviteToken: components["schemas"]["InviteToken"];
@@ -9856,6 +10484,390 @@ export interface operations {
9856
10484
  426: components["responses"]["ClientOutdated"];
9857
10485
  };
9858
10486
  };
10487
+ votePoll: {
10488
+ parameters: {
10489
+ query?: never;
10490
+ header?: {
10491
+ /** @description Version of the client app, for logs and the per-client metric. */
10492
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10493
+ /** @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`). */
10494
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10495
+ };
10496
+ path: {
10497
+ chat_id: components["parameters"]["ChatId"];
10498
+ message_id: components["parameters"]["MessageId"];
10499
+ };
10500
+ cookie?: never;
10501
+ };
10502
+ requestBody: {
10503
+ content: {
10504
+ "application/json": components["schemas"]["PollVoteRequest"];
10505
+ };
10506
+ };
10507
+ responses: {
10508
+ /** @description The poll as the caller sees it after the vote */
10509
+ 200: {
10510
+ headers: {
10511
+ [name: string]: unknown;
10512
+ };
10513
+ content: {
10514
+ "application/json": components["schemas"]["Poll"];
10515
+ };
10516
+ };
10517
+ 400: components["responses"]["BadRequest"];
10518
+ 401: components["responses"]["Unauthorized"];
10519
+ 403: components["responses"]["Forbidden"];
10520
+ 404: components["responses"]["NotFound"];
10521
+ 409: components["responses"]["Conflict"];
10522
+ 422: components["responses"]["ValidationFailed"];
10523
+ 426: components["responses"]["ClientOutdated"];
10524
+ 429: components["responses"]["TooManyRequests"];
10525
+ };
10526
+ };
10527
+ closePoll: {
10528
+ parameters: {
10529
+ query?: never;
10530
+ header?: {
10531
+ /** @description Version of the client app, for logs and the per-client metric. */
10532
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10533
+ /** @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`). */
10534
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10535
+ };
10536
+ path: {
10537
+ chat_id: components["parameters"]["ChatId"];
10538
+ message_id: components["parameters"]["MessageId"];
10539
+ };
10540
+ cookie?: never;
10541
+ };
10542
+ requestBody?: never;
10543
+ responses: {
10544
+ /** @description The closed poll as the caller sees it */
10545
+ 200: {
10546
+ headers: {
10547
+ [name: string]: unknown;
10548
+ };
10549
+ content: {
10550
+ "application/json": components["schemas"]["Poll"];
10551
+ };
10552
+ };
10553
+ 401: components["responses"]["Unauthorized"];
10554
+ 403: components["responses"]["Forbidden"];
10555
+ 404: components["responses"]["NotFound"];
10556
+ 426: components["responses"]["ClientOutdated"];
10557
+ };
10558
+ };
10559
+ listPollVoters: {
10560
+ parameters: {
10561
+ query: {
10562
+ option: number;
10563
+ /** @description Page size */
10564
+ limit?: components["parameters"]["Limit"];
10565
+ /** @description Opaque `next_cursor` of the previous page */
10566
+ after?: components["parameters"]["After"];
10567
+ };
10568
+ header?: {
10569
+ /** @description Version of the client app, for logs and the per-client metric. */
10570
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10571
+ /** @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`). */
10572
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10573
+ };
10574
+ path: {
10575
+ chat_id: components["parameters"]["ChatId"];
10576
+ message_id: components["parameters"]["MessageId"];
10577
+ };
10578
+ cookie?: never;
10579
+ };
10580
+ requestBody?: never;
10581
+ responses: {
10582
+ /** @description Voters of the option */
10583
+ 200: {
10584
+ headers: {
10585
+ [name: string]: unknown;
10586
+ };
10587
+ content: {
10588
+ "application/json": components["schemas"]["UserPage"];
10589
+ };
10590
+ };
10591
+ 400: components["responses"]["BadRequest"];
10592
+ 401: components["responses"]["Unauthorized"];
10593
+ 403: components["responses"]["Forbidden"];
10594
+ 404: components["responses"]["NotFound"];
10595
+ 426: components["responses"]["ClientOutdated"];
10596
+ };
10597
+ };
10598
+ listChatImports: {
10599
+ parameters: {
10600
+ query?: never;
10601
+ header?: {
10602
+ /** @description Version of the client app, for logs and the per-client metric. */
10603
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10604
+ /** @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`). */
10605
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10606
+ };
10607
+ path: {
10608
+ chat_id: components["parameters"]["ChatId"];
10609
+ };
10610
+ cookie?: never;
10611
+ };
10612
+ requestBody?: never;
10613
+ responses: {
10614
+ /** @description The imports */
10615
+ 200: {
10616
+ headers: {
10617
+ [name: string]: unknown;
10618
+ };
10619
+ content: {
10620
+ "application/json": components["schemas"]["ChatImportList"];
10621
+ };
10622
+ };
10623
+ 401: components["responses"]["Unauthorized"];
10624
+ 404: components["responses"]["NotFound"];
10625
+ 426: components["responses"]["ClientOutdated"];
10626
+ };
10627
+ };
10628
+ startChatImport: {
10629
+ parameters: {
10630
+ query?: never;
10631
+ header?: {
10632
+ /** @description Version of the client app, for logs and the per-client metric. */
10633
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10634
+ /** @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`). */
10635
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10636
+ };
10637
+ path: {
10638
+ chat_id: components["parameters"]["ChatId"];
10639
+ };
10640
+ cookie?: never;
10641
+ };
10642
+ requestBody: {
10643
+ content: {
10644
+ "application/json": components["schemas"]["StartChatImportRequest"];
10645
+ };
10646
+ };
10647
+ responses: {
10648
+ /** @description The import, running */
10649
+ 201: {
10650
+ headers: {
10651
+ [name: string]: unknown;
10652
+ };
10653
+ content: {
10654
+ "application/json": components["schemas"]["ChatImport"];
10655
+ };
10656
+ };
10657
+ 400: components["responses"]["BadRequest"];
10658
+ 401: components["responses"]["Unauthorized"];
10659
+ 403: components["responses"]["Forbidden"];
10660
+ 404: components["responses"]["NotFound"];
10661
+ 409: components["responses"]["Conflict"];
10662
+ 422: components["responses"]["ValidationFailed"];
10663
+ 426: components["responses"]["ClientOutdated"];
10664
+ };
10665
+ };
10666
+ getChatImport: {
10667
+ parameters: {
10668
+ query?: never;
10669
+ header?: {
10670
+ /** @description Version of the client app, for logs and the per-client metric. */
10671
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10672
+ /** @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`). */
10673
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10674
+ };
10675
+ path: {
10676
+ import_id: components["parameters"]["ImportId"];
10677
+ };
10678
+ cookie?: never;
10679
+ };
10680
+ requestBody?: never;
10681
+ responses: {
10682
+ /** @description The import */
10683
+ 200: {
10684
+ headers: {
10685
+ [name: string]: unknown;
10686
+ };
10687
+ content: {
10688
+ "application/json": components["schemas"]["ChatImport"];
10689
+ };
10690
+ };
10691
+ 401: components["responses"]["Unauthorized"];
10692
+ 404: components["responses"]["NotFound"];
10693
+ 426: components["responses"]["ClientOutdated"];
10694
+ };
10695
+ };
10696
+ removeChatImport: {
10697
+ parameters: {
10698
+ query?: never;
10699
+ header?: {
10700
+ /** @description Version of the client app, for logs and the per-client metric. */
10701
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10702
+ /** @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`). */
10703
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10704
+ };
10705
+ path: {
10706
+ import_id: components["parameters"]["ImportId"];
10707
+ };
10708
+ cookie?: never;
10709
+ };
10710
+ requestBody?: never;
10711
+ responses: {
10712
+ /** @description Removing */
10713
+ 202: {
10714
+ headers: {
10715
+ [name: string]: unknown;
10716
+ };
10717
+ content?: never;
10718
+ };
10719
+ 401: components["responses"]["Unauthorized"];
10720
+ 403: components["responses"]["Forbidden"];
10721
+ 404: components["responses"]["NotFound"];
10722
+ 426: components["responses"]["ClientOutdated"];
10723
+ };
10724
+ };
10725
+ addImportedMessages: {
10726
+ parameters: {
10727
+ query?: never;
10728
+ header?: {
10729
+ /** @description Version of the client app, for logs and the per-client metric. */
10730
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10731
+ /** @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`). */
10732
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10733
+ };
10734
+ path: {
10735
+ import_id: components["parameters"]["ImportId"];
10736
+ };
10737
+ cookie?: never;
10738
+ };
10739
+ requestBody: {
10740
+ content: {
10741
+ "application/json": components["schemas"]["AddImportedMessagesRequest"];
10742
+ };
10743
+ };
10744
+ responses: {
10745
+ /** @description Stored */
10746
+ 200: {
10747
+ headers: {
10748
+ [name: string]: unknown;
10749
+ };
10750
+ content: {
10751
+ "application/json": components["schemas"]["ImportProgress"];
10752
+ };
10753
+ };
10754
+ 400: components["responses"]["BadRequest"];
10755
+ 401: components["responses"]["Unauthorized"];
10756
+ 403: components["responses"]["Forbidden"];
10757
+ 404: components["responses"]["NotFound"];
10758
+ 409: components["responses"]["Conflict"];
10759
+ 422: components["responses"]["ValidationFailed"];
10760
+ 426: components["responses"]["ClientOutdated"];
10761
+ };
10762
+ };
10763
+ finishChatImport: {
10764
+ parameters: {
10765
+ query?: never;
10766
+ header?: {
10767
+ /** @description Version of the client app, for logs and the per-client metric. */
10768
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10769
+ /** @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`). */
10770
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10771
+ };
10772
+ path: {
10773
+ import_id: components["parameters"]["ImportId"];
10774
+ };
10775
+ cookie?: never;
10776
+ };
10777
+ requestBody?: never;
10778
+ responses: {
10779
+ /** @description The finished import */
10780
+ 200: {
10781
+ headers: {
10782
+ [name: string]: unknown;
10783
+ };
10784
+ content: {
10785
+ "application/json": components["schemas"]["ChatImport"];
10786
+ };
10787
+ };
10788
+ 401: components["responses"]["Unauthorized"];
10789
+ 403: components["responses"]["Forbidden"];
10790
+ 404: components["responses"]["NotFound"];
10791
+ 422: components["responses"]["ValidationFailed"];
10792
+ 426: components["responses"]["ClientOutdated"];
10793
+ };
10794
+ };
10795
+ assignImportSender: {
10796
+ parameters: {
10797
+ query?: never;
10798
+ header?: {
10799
+ /** @description Version of the client app, for logs and the per-client metric. */
10800
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10801
+ /** @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`). */
10802
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10803
+ };
10804
+ path: {
10805
+ import_id: components["parameters"]["ImportId"];
10806
+ sender_key: components["parameters"]["ImportSenderKey"];
10807
+ };
10808
+ cookie?: never;
10809
+ };
10810
+ requestBody: {
10811
+ content: {
10812
+ "application/json": components["schemas"]["AssignImportSenderRequest"];
10813
+ };
10814
+ };
10815
+ responses: {
10816
+ /** @description The sender */
10817
+ 200: {
10818
+ headers: {
10819
+ [name: string]: unknown;
10820
+ };
10821
+ content: {
10822
+ "application/json": components["schemas"]["ChatImportSender"];
10823
+ };
10824
+ };
10825
+ 400: components["responses"]["BadRequest"];
10826
+ 401: components["responses"]["Unauthorized"];
10827
+ 403: components["responses"]["Forbidden"];
10828
+ 404: components["responses"]["NotFound"];
10829
+ 409: components["responses"]["Conflict"];
10830
+ 422: components["responses"]["ValidationFailed"];
10831
+ 426: components["responses"]["ClientOutdated"];
10832
+ };
10833
+ };
10834
+ decideImportSender: {
10835
+ parameters: {
10836
+ query?: never;
10837
+ header?: {
10838
+ /** @description Version of the client app, for logs and the per-client metric. */
10839
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10840
+ /** @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`). */
10841
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10842
+ };
10843
+ path: {
10844
+ import_id: components["parameters"]["ImportId"];
10845
+ sender_key: components["parameters"]["ImportSenderKey"];
10846
+ };
10847
+ cookie?: never;
10848
+ };
10849
+ requestBody: {
10850
+ content: {
10851
+ "application/json": components["schemas"]["DecideImportSenderRequest"];
10852
+ };
10853
+ };
10854
+ responses: {
10855
+ /** @description The sender */
10856
+ 200: {
10857
+ headers: {
10858
+ [name: string]: unknown;
10859
+ };
10860
+ content: {
10861
+ "application/json": components["schemas"]["ChatImportSender"];
10862
+ };
10863
+ };
10864
+ 400: components["responses"]["BadRequest"];
10865
+ 401: components["responses"]["Unauthorized"];
10866
+ 404: components["responses"]["NotFound"];
10867
+ 422: components["responses"]["ValidationFailed"];
10868
+ 426: components["responses"]["ClientOutdated"];
10869
+ };
10870
+ };
9859
10871
  forwardMessages: {
9860
10872
  parameters: {
9861
10873
  query?: never;
@@ -10324,6 +11336,37 @@ export interface operations {
10324
11336
  426: components["responses"]["ClientOutdated"];
10325
11337
  };
10326
11338
  };
11339
+ deleteGroupAvatar: {
11340
+ parameters: {
11341
+ query?: never;
11342
+ header?: {
11343
+ /** @description Version of the client app, for logs and the per-client metric. */
11344
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
11345
+ /** @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`). */
11346
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
11347
+ };
11348
+ path: {
11349
+ chat_id: components["parameters"]["ChatId"];
11350
+ };
11351
+ cookie?: never;
11352
+ };
11353
+ requestBody?: never;
11354
+ responses: {
11355
+ /** @description Updated group */
11356
+ 200: {
11357
+ headers: {
11358
+ [name: string]: unknown;
11359
+ };
11360
+ content: {
11361
+ "application/json": components["schemas"]["Group"];
11362
+ };
11363
+ };
11364
+ 401: components["responses"]["Unauthorized"];
11365
+ 403: components["responses"]["Forbidden"];
11366
+ 404: components["responses"]["NotFound"];
11367
+ 426: components["responses"]["ClientOutdated"];
11368
+ };
11369
+ };
10327
11370
  setGroupBackground: {
10328
11371
  parameters: {
10329
11372
  query?: never;
@@ -12405,6 +13448,88 @@ export interface operations {
12405
13448
  429: components["responses"]["TooManyRequests"];
12406
13449
  };
12407
13450
  };
13451
+ getMapTile: {
13452
+ parameters: {
13453
+ query?: never;
13454
+ header?: {
13455
+ /** @description Version of the client app, for logs and the per-client metric. */
13456
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
13457
+ /** @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`). */
13458
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
13459
+ };
13460
+ path: {
13461
+ z: number;
13462
+ /** @description Tile column, `0` to `2^z - 1` */
13463
+ x: number;
13464
+ /** @description Tile row, `0` to `2^z - 1` */
13465
+ y: number;
13466
+ };
13467
+ cookie?: never;
13468
+ };
13469
+ requestBody?: never;
13470
+ responses: {
13471
+ /** @description PNG tile */
13472
+ 200: {
13473
+ headers: {
13474
+ [name: string]: unknown;
13475
+ };
13476
+ content: {
13477
+ "image/png": string;
13478
+ };
13479
+ };
13480
+ 400: components["responses"]["BadRequest"];
13481
+ 401: components["responses"]["Unauthorized"];
13482
+ 426: components["responses"]["ClientOutdated"];
13483
+ 429: components["responses"]["TooManyRequests"];
13484
+ /** @description The tile provider is unavailable */
13485
+ 503: {
13486
+ headers: {
13487
+ [name: string]: unknown;
13488
+ };
13489
+ content?: never;
13490
+ };
13491
+ };
13492
+ };
13493
+ getStaticMap: {
13494
+ parameters: {
13495
+ query: {
13496
+ lat: number;
13497
+ lon: number;
13498
+ sig: string;
13499
+ };
13500
+ header?: {
13501
+ /** @description Version of the client app, for logs and the per-client metric. */
13502
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
13503
+ /** @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`). */
13504
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
13505
+ };
13506
+ path?: never;
13507
+ cookie?: never;
13508
+ };
13509
+ requestBody?: never;
13510
+ responses: {
13511
+ /** @description JPEG image */
13512
+ 200: {
13513
+ headers: {
13514
+ [name: string]: unknown;
13515
+ };
13516
+ content: {
13517
+ "image/jpeg": string;
13518
+ };
13519
+ };
13520
+ 400: components["responses"]["BadRequest"];
13521
+ 401: components["responses"]["Unauthorized"];
13522
+ 403: components["responses"]["Forbidden"];
13523
+ 426: components["responses"]["ClientOutdated"];
13524
+ /** @description The tile provider is unavailable */
13525
+ 503: {
13526
+ headers: {
13527
+ [name: string]: unknown;
13528
+ };
13529
+ content?: never;
13530
+ };
13531
+ };
13532
+ };
12408
13533
  getNotificationSettings: {
12409
13534
  parameters: {
12410
13535
  query?: never;