@myronsi/messenger-api 2.1.0-alpha.45 → 2.1.0-alpha.46.next.165

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.46. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -2074,6 +2074,198 @@ export interface paths {
2074
2074
  patch?: never;
2075
2075
  trace?: never;
2076
2076
  };
2077
+ "/chats/{chat_id}/imports": {
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
+ };
2089
+ cookie?: never;
2090
+ };
2091
+ /**
2092
+ * The imported histories of a chat
2093
+ * @description Imports that are running or done, oldest period first. A sender the importer assigned to a member is
2094
+ * `pending` or `declined` only for the importer and that member; everyone else sees it as `unassigned`
2095
+ * without `user_id` until the member confirms.
2096
+ */
2097
+ get: operations["listChatImports"];
2098
+ put?: never;
2099
+ /**
2100
+ * Start importing a history from another messenger
2101
+ * @description The client parses the export (Telegram Desktop JSON or a WhatsApp chat export) on the device, uploads the
2102
+ * files with `POST /attachments`, then sends the messages in order with `PUT /imports/{import_id}/messages`
2103
+ * and ends with `POST /imports/{import_id}/finish`.
2104
+ *
2105
+ * In a direct chat either user may import, not in a chat in the Requests folder or with a block (`403`). In a
2106
+ * group only an admin or the owner may (`403`). One import per chat runs at a time (`409`). The messages are
2107
+ * placed above the oldest message of the chat, in their original order; a second import goes next to the
2108
+ * imports whose periods it follows, and an import whose period overlaps an existing one is `409`.
2109
+ *
2110
+ * `senders` lists every name of the export. `me: true` marks the caller's own messages. `user_id` suggests a
2111
+ * member of the chat for a name; that member confirms it after the import is finished. Every other name is
2112
+ * shown as text.
2113
+ */
2114
+ post: operations["startChatImport"];
2115
+ delete?: never;
2116
+ options?: never;
2117
+ head?: never;
2118
+ patch?: never;
2119
+ trace?: never;
2120
+ };
2121
+ "/imports/{import_id}": {
2122
+ parameters: {
2123
+ query?: never;
2124
+ header?: {
2125
+ /** @description Version of the client app, for logs and the per-client metric. */
2126
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2127
+ /** @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`). */
2128
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2129
+ };
2130
+ path: {
2131
+ import_id: components["parameters"]["ImportId"];
2132
+ };
2133
+ cookie?: never;
2134
+ };
2135
+ /** One import, for resuming it or showing its senders */
2136
+ get: operations["getChatImport"];
2137
+ put?: never;
2138
+ post?: never;
2139
+ /**
2140
+ * Remove an imported history
2141
+ * @description The importer, or the owner of a group, removes every message of the import for everyone. The messages
2142
+ * disappear at once (`import_update` with state `removing`); the worker deletes them afterwards.
2143
+ */
2144
+ delete: operations["removeChatImport"];
2145
+ options?: never;
2146
+ head?: never;
2147
+ patch?: never;
2148
+ trace?: never;
2149
+ };
2150
+ "/imports/{import_id}/messages": {
2151
+ parameters: {
2152
+ query?: never;
2153
+ header?: {
2154
+ /** @description Version of the client app, for logs and the per-client metric. */
2155
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2156
+ /** @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`). */
2157
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2158
+ };
2159
+ path: {
2160
+ import_id: components["parameters"]["ImportId"];
2161
+ };
2162
+ cookie?: never;
2163
+ };
2164
+ get?: never;
2165
+ /**
2166
+ * Add the next batch of messages to a running import
2167
+ * @description Only the importer. `from_index` must be the import's `next_index`; a batch that was stored already answers
2168
+ * with the current `next_index`, so a retry after a lost answer is safe. Another `from_index` is `409`.
2169
+ * Attachments must be the importer's own uploads. Imported messages send no push and count as read.
2170
+ */
2171
+ put: operations["addImportedMessages"];
2172
+ post?: never;
2173
+ delete?: never;
2174
+ options?: never;
2175
+ head?: never;
2176
+ patch?: never;
2177
+ trace?: never;
2178
+ };
2179
+ "/imports/{import_id}/finish": {
2180
+ parameters: {
2181
+ query?: never;
2182
+ header?: {
2183
+ /** @description Version of the client app, for logs and the per-client metric. */
2184
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2185
+ /** @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`). */
2186
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2187
+ };
2188
+ path: {
2189
+ import_id: components["parameters"]["ImportId"];
2190
+ };
2191
+ cookie?: never;
2192
+ };
2193
+ get?: never;
2194
+ put?: never;
2195
+ /**
2196
+ * Finish an import once every message is stored
2197
+ * @description Only the importer, once `next_index` equals `message_count` (`422` before). Adds the closing system
2198
+ * message, tells every member to load the chat again (`import_update`, sync change `history_imported`) and
2199
+ * asks each assigned member to confirm their messages (`import_sender_update`).
2200
+ */
2201
+ post: operations["finishChatImport"];
2202
+ delete?: never;
2203
+ options?: never;
2204
+ head?: never;
2205
+ patch?: never;
2206
+ trace?: never;
2207
+ };
2208
+ "/imports/{import_id}/senders/{sender_key}": {
2209
+ parameters: {
2210
+ query?: never;
2211
+ header?: {
2212
+ /** @description Version of the client app, for logs and the per-client metric. */
2213
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2214
+ /** @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`). */
2215
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2216
+ };
2217
+ path: {
2218
+ import_id: components["parameters"]["ImportId"];
2219
+ sender_key: components["parameters"]["ImportSenderKey"];
2220
+ };
2221
+ cookie?: never;
2222
+ };
2223
+ get?: never;
2224
+ /**
2225
+ * Suggest a member for a name of the export, or take the suggestion back
2226
+ * @description Only the importer. `user_id` must be another member of the chat; `null` makes the name text again. A name
2227
+ * that is `me` or `confirmed` cannot be reassigned, and a member who declined or withdrew a name cannot be
2228
+ * suggested for it again (`409`).
2229
+ */
2230
+ put: operations["assignImportSender"];
2231
+ post?: never;
2232
+ delete?: never;
2233
+ options?: never;
2234
+ head?: never;
2235
+ patch?: never;
2236
+ trace?: never;
2237
+ };
2238
+ "/imports/{import_id}/senders/{sender_key}/decision": {
2239
+ parameters: {
2240
+ query?: never;
2241
+ header?: {
2242
+ /** @description Version of the client app, for logs and the per-client metric. */
2243
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2244
+ /** @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`). */
2245
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2246
+ };
2247
+ path: {
2248
+ import_id: components["parameters"]["ImportId"];
2249
+ sender_key: components["parameters"]["ImportSenderKey"];
2250
+ };
2251
+ cookie?: never;
2252
+ };
2253
+ get?: never;
2254
+ put?: never;
2255
+ /**
2256
+ * Confirm or decline that a name of the export is you, or withdraw a confirmation
2257
+ * @description Only the member the importer suggested, once the import is finished. `confirm` links the messages of the
2258
+ * name to the caller's account for everyone; `decline` keeps them as text; `withdraw` turns a confirmed name
2259
+ * back into text. After `decline` or `withdraw` the importer cannot suggest the caller for that name again.
2260
+ * `404` when the caller is not the suggested member or the name is not in the matching state.
2261
+ */
2262
+ post: operations["decideImportSender"];
2263
+ delete?: never;
2264
+ options?: never;
2265
+ head?: never;
2266
+ patch?: never;
2267
+ trace?: never;
2268
+ };
2077
2269
  "/chats/{chat_id}/messages/forward": {
2078
2270
  parameters: {
2079
2271
  query?: never;
@@ -5710,10 +5902,11 @@ export interface components {
5710
5902
  * message and its `scope`. `pins_changed`: load the pins of the chat again. `history_cleared`: drop the
5711
5903
  * messages up to and including `before_message_id` (`scope` says for whom). `chat_hidden`: the caller
5712
5904
  * deleted the chat for themselves up to `before_message_id`.
5905
+ * `history_imported`: an imported history was added, removed or a sender confirmed; load the chat again.
5713
5906
  */
5714
5907
  SyncChange: {
5715
5908
  /** @enum {string} */
5716
- type: "message_updated" | "message_deleted" | "pins_changed" | "history_cleared" | "chat_hidden";
5909
+ type: "message_updated" | "message_deleted" | "pins_changed" | "history_cleared" | "chat_hidden" | "history_imported";
5717
5910
  chat_id: components["schemas"]["Id"];
5718
5911
  message_id?: components["schemas"]["Id"];
5719
5912
  /** @enum {string} */
@@ -5748,9 +5941,11 @@ export interface components {
5748
5941
  attachments?: components["schemas"]["Attachment"][];
5749
5942
  reactions: components["schemas"]["Reaction"][];
5750
5943
  read_by: components["schemas"]["ReadReceipt"][];
5944
+ /** @description When the message was sent; for an imported message, when it was sent in the other messenger. */
5751
5945
  created_at: components["schemas"]["Timestamp"];
5752
5946
  edited_at: components["schemas"]["Timestamp"] | null;
5753
5947
  is_deleted: boolean;
5948
+ import?: components["schemas"]["MessageImport"];
5754
5949
  /**
5755
5950
  * @description `true` when moderation removed the message; it is then also `is_deleted`. Clients show "Removed by
5756
5951
  * moderation" instead of the deleted placeholder. Absent otherwise.
@@ -5784,12 +5979,14 @@ export interface components {
5784
5979
  height: number | null;
5785
5980
  };
5786
5981
  /** @enum {string} */
5787
- SystemEventKind: "group_created" | "member_added" | "member_joined" | "member_removed" | "member_left" | "call" | "message_pinned" | "message_unpinned";
5982
+ SystemEventKind: "group_created" | "member_added" | "member_joined" | "member_removed" | "member_left" | "call" | "message_pinned" | "message_unpinned" | "history_imported" | "history_import_ended" | "imported_note";
5788
5983
  /**
5789
5984
  * @description What a `system` message records; set on system messages only, whose `content` is then `null`. The names
5790
5985
  * are the display names at the time of the event. `target` fields are set for `member_added` and
5791
5986
  * `member_removed`. `call` is set for `call` messages: one per call, posted when the call ends, `actor` is the
5792
5987
  * initiator. `message_id` and `snippet` are set for `message_pinned` and `message_unpinned`.
5988
+ * `history_imported` opens and `history_import_ended` closes an imported history; both carry `import`, and
5989
+ * `actor` is the importer. `imported_note` is a line of the export that is not a message; its text is `text`.
5793
5990
  */
5794
5991
  SystemEvent: {
5795
5992
  kind: components["schemas"]["SystemEventKind"];
@@ -5806,6 +6003,9 @@ export interface components {
5806
6003
  */
5807
6004
  snippet?: string;
5808
6005
  message_type?: components["schemas"]["MessageType"];
6006
+ import?: components["schemas"]["ImportSummary"];
6007
+ /** @description The line of the export, for `imported_note`. */
6008
+ text?: string;
5809
6009
  };
5810
6010
  MessagePage: {
5811
6011
  /** @description Oldest to newest */
@@ -5984,6 +6184,120 @@ export interface components {
5984
6184
  items: components["schemas"]["PinnedMessage"][];
5985
6185
  next_cursor: components["schemas"]["Cursor"];
5986
6186
  };
6187
+ /** @enum {string} */
6188
+ ImportSource: "telegram" | "whatsapp";
6189
+ /**
6190
+ * @description `running`: messages are being added. `done`: finished. `removing`: being removed.
6191
+ * @enum {string}
6192
+ */
6193
+ ChatImportState: "running" | "done" | "removing";
6194
+ /** @description The client's key for one name of the export. */
6195
+ ImportSenderKey: string;
6196
+ /**
6197
+ * @description `me`: the importer's own messages. `unassigned`: shown as text. `pending`: suggested for `user_id`, who has
6198
+ * not answered. `confirmed`: `user_id` confirmed; the messages show their account. `declined`: the suggested
6199
+ * member said no; shown as text.
6200
+ * @enum {string}
6201
+ */
6202
+ ImportSenderState: "me" | "unassigned" | "pending" | "confirmed" | "declined";
6203
+ ChatImportSender: {
6204
+ key: components["schemas"]["ImportSenderKey"];
6205
+ name: string;
6206
+ message_count: number;
6207
+ state: components["schemas"]["ImportSenderState"];
6208
+ user_id: components["schemas"]["Id"] | null;
6209
+ };
6210
+ ChatImport: {
6211
+ id: components["schemas"]["Id"];
6212
+ chat_id: components["schemas"]["Id"];
6213
+ source: components["schemas"]["ImportSource"];
6214
+ state: components["schemas"]["ChatImportState"];
6215
+ message_count: number;
6216
+ file_count: number;
6217
+ first_at: components["schemas"]["Timestamp"];
6218
+ last_at: components["schemas"]["Timestamp"];
6219
+ /** @description How many messages are stored; the `from_index` of the next batch. */
6220
+ next_index: number;
6221
+ imported_by: components["schemas"]["Id"] | null;
6222
+ created_at: components["schemas"]["Timestamp"];
6223
+ finished_at: components["schemas"]["Timestamp"] | null;
6224
+ senders: components["schemas"]["ChatImportSender"][];
6225
+ };
6226
+ ChatImportList: {
6227
+ items: components["schemas"]["ChatImport"][];
6228
+ };
6229
+ StartChatImportSender: {
6230
+ key: components["schemas"]["ImportSenderKey"];
6231
+ name: string;
6232
+ message_count: number;
6233
+ /** @description The caller's own messages; at most one sender. */
6234
+ me?: boolean;
6235
+ /** @description A member of the chat suggested for this name; not with `me`. */
6236
+ user_id?: components["schemas"]["Id"];
6237
+ };
6238
+ StartChatImportRequest: {
6239
+ source: components["schemas"]["ImportSource"];
6240
+ message_count: number;
6241
+ file_count: number;
6242
+ first_at: components["schemas"]["Timestamp"];
6243
+ last_at: components["schemas"]["Timestamp"];
6244
+ senders: components["schemas"]["StartChatImportSender"][];
6245
+ };
6246
+ /**
6247
+ * @description `note`: a line of the export that is not a message (for example that someone joined), shown as a system message.
6248
+ * @enum {string}
6249
+ */
6250
+ ImportedMessageType: "text" | "file" | "voice" | "note";
6251
+ ImportedMessage: {
6252
+ /** @description Position in the import, counting from 0 without gaps. */
6253
+ index: number;
6254
+ /** @description Required except for `note`. */
6255
+ sender_key?: components["schemas"]["ImportSenderKey"];
6256
+ /** @description When the message was sent in the other messenger; between the import's `first_at` and `last_at`. */
6257
+ original_at: components["schemas"]["Timestamp"];
6258
+ type: components["schemas"]["ImportedMessageType"];
6259
+ content?: string | null;
6260
+ /** @description The importer's uploads; two to ten images or videos make an album. */
6261
+ attachment_ids?: components["schemas"]["AttachmentRef"][];
6262
+ /** @description `index` of an earlier message of the import that this one answers. */
6263
+ reply_to_index?: number;
6264
+ };
6265
+ AddImportedMessagesRequest: {
6266
+ from_index: number;
6267
+ messages: components["schemas"]["ImportedMessage"][];
6268
+ };
6269
+ ImportProgress: {
6270
+ next_index: number;
6271
+ };
6272
+ AssignImportSenderRequest: {
6273
+ user_id: components["schemas"]["Id"] | null;
6274
+ };
6275
+ DecideImportSenderRequest: {
6276
+ /** @enum {string} */
6277
+ decision: "confirm" | "decline" | "withdraw";
6278
+ };
6279
+ /** @description Set on messages that came from an import. */
6280
+ MessageImport: {
6281
+ import_id: components["schemas"]["Id"];
6282
+ source: components["schemas"]["ImportSource"];
6283
+ original_at: components["schemas"]["Timestamp"];
6284
+ /** @description The name in the export; absent on system messages. */
6285
+ sender_name?: string;
6286
+ /**
6287
+ * @description `me`: the importer's own message, `sender` is the importer. `confirmed`: the member confirmed the name,
6288
+ * `sender` is that member. `unconfirmed`: `sender` is `null`; show `sender_name` as text. Absent on system
6289
+ * messages.
6290
+ * @enum {string}
6291
+ */
6292
+ sender_state?: "me" | "confirmed" | "unconfirmed";
6293
+ };
6294
+ ImportSummary: {
6295
+ import_id: components["schemas"]["Id"];
6296
+ source: components["schemas"]["ImportSource"];
6297
+ message_count: number;
6298
+ first_at: components["schemas"]["Timestamp"];
6299
+ last_at: components["schemas"]["Timestamp"];
6300
+ };
5987
6301
  CreateChatRequest: {
5988
6302
  user_id: components["schemas"]["Id"];
5989
6303
  initial_message?: string | null;
@@ -6580,6 +6894,8 @@ export interface components {
6580
6894
  After: components["schemas"]["Cursor"];
6581
6895
  ChatId: components["schemas"]["Id"];
6582
6896
  MessageId: components["schemas"]["Id"];
6897
+ ImportId: components["schemas"]["Id"];
6898
+ ImportSenderKey: components["schemas"]["ImportSenderKey"];
6583
6899
  UserId: components["schemas"]["Id"];
6584
6900
  InviteLinkId: components["schemas"]["Id"];
6585
6901
  InviteToken: components["schemas"]["InviteToken"];
@@ -9856,6 +10172,279 @@ export interface operations {
9856
10172
  426: components["responses"]["ClientOutdated"];
9857
10173
  };
9858
10174
  };
10175
+ listChatImports: {
10176
+ parameters: {
10177
+ query?: never;
10178
+ header?: {
10179
+ /** @description Version of the client app, for logs and the per-client metric. */
10180
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10181
+ /** @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`). */
10182
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10183
+ };
10184
+ path: {
10185
+ chat_id: components["parameters"]["ChatId"];
10186
+ };
10187
+ cookie?: never;
10188
+ };
10189
+ requestBody?: never;
10190
+ responses: {
10191
+ /** @description The imports */
10192
+ 200: {
10193
+ headers: {
10194
+ [name: string]: unknown;
10195
+ };
10196
+ content: {
10197
+ "application/json": components["schemas"]["ChatImportList"];
10198
+ };
10199
+ };
10200
+ 401: components["responses"]["Unauthorized"];
10201
+ 404: components["responses"]["NotFound"];
10202
+ 426: components["responses"]["ClientOutdated"];
10203
+ };
10204
+ };
10205
+ startChatImport: {
10206
+ parameters: {
10207
+ query?: never;
10208
+ header?: {
10209
+ /** @description Version of the client app, for logs and the per-client metric. */
10210
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10211
+ /** @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`). */
10212
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10213
+ };
10214
+ path: {
10215
+ chat_id: components["parameters"]["ChatId"];
10216
+ };
10217
+ cookie?: never;
10218
+ };
10219
+ requestBody: {
10220
+ content: {
10221
+ "application/json": components["schemas"]["StartChatImportRequest"];
10222
+ };
10223
+ };
10224
+ responses: {
10225
+ /** @description The import, running */
10226
+ 201: {
10227
+ headers: {
10228
+ [name: string]: unknown;
10229
+ };
10230
+ content: {
10231
+ "application/json": components["schemas"]["ChatImport"];
10232
+ };
10233
+ };
10234
+ 400: components["responses"]["BadRequest"];
10235
+ 401: components["responses"]["Unauthorized"];
10236
+ 403: components["responses"]["Forbidden"];
10237
+ 404: components["responses"]["NotFound"];
10238
+ 409: components["responses"]["Conflict"];
10239
+ 422: components["responses"]["ValidationFailed"];
10240
+ 426: components["responses"]["ClientOutdated"];
10241
+ };
10242
+ };
10243
+ getChatImport: {
10244
+ parameters: {
10245
+ query?: never;
10246
+ header?: {
10247
+ /** @description Version of the client app, for logs and the per-client metric. */
10248
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10249
+ /** @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`). */
10250
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10251
+ };
10252
+ path: {
10253
+ import_id: components["parameters"]["ImportId"];
10254
+ };
10255
+ cookie?: never;
10256
+ };
10257
+ requestBody?: never;
10258
+ responses: {
10259
+ /** @description The import */
10260
+ 200: {
10261
+ headers: {
10262
+ [name: string]: unknown;
10263
+ };
10264
+ content: {
10265
+ "application/json": components["schemas"]["ChatImport"];
10266
+ };
10267
+ };
10268
+ 401: components["responses"]["Unauthorized"];
10269
+ 404: components["responses"]["NotFound"];
10270
+ 426: components["responses"]["ClientOutdated"];
10271
+ };
10272
+ };
10273
+ removeChatImport: {
10274
+ parameters: {
10275
+ query?: never;
10276
+ header?: {
10277
+ /** @description Version of the client app, for logs and the per-client metric. */
10278
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10279
+ /** @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`). */
10280
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10281
+ };
10282
+ path: {
10283
+ import_id: components["parameters"]["ImportId"];
10284
+ };
10285
+ cookie?: never;
10286
+ };
10287
+ requestBody?: never;
10288
+ responses: {
10289
+ /** @description Removing */
10290
+ 202: {
10291
+ headers: {
10292
+ [name: string]: unknown;
10293
+ };
10294
+ content?: never;
10295
+ };
10296
+ 401: components["responses"]["Unauthorized"];
10297
+ 403: components["responses"]["Forbidden"];
10298
+ 404: components["responses"]["NotFound"];
10299
+ 426: components["responses"]["ClientOutdated"];
10300
+ };
10301
+ };
10302
+ addImportedMessages: {
10303
+ parameters: {
10304
+ query?: never;
10305
+ header?: {
10306
+ /** @description Version of the client app, for logs and the per-client metric. */
10307
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10308
+ /** @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`). */
10309
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10310
+ };
10311
+ path: {
10312
+ import_id: components["parameters"]["ImportId"];
10313
+ };
10314
+ cookie?: never;
10315
+ };
10316
+ requestBody: {
10317
+ content: {
10318
+ "application/json": components["schemas"]["AddImportedMessagesRequest"];
10319
+ };
10320
+ };
10321
+ responses: {
10322
+ /** @description Stored */
10323
+ 200: {
10324
+ headers: {
10325
+ [name: string]: unknown;
10326
+ };
10327
+ content: {
10328
+ "application/json": components["schemas"]["ImportProgress"];
10329
+ };
10330
+ };
10331
+ 400: components["responses"]["BadRequest"];
10332
+ 401: components["responses"]["Unauthorized"];
10333
+ 403: components["responses"]["Forbidden"];
10334
+ 404: components["responses"]["NotFound"];
10335
+ 409: components["responses"]["Conflict"];
10336
+ 422: components["responses"]["ValidationFailed"];
10337
+ 426: components["responses"]["ClientOutdated"];
10338
+ };
10339
+ };
10340
+ finishChatImport: {
10341
+ parameters: {
10342
+ query?: never;
10343
+ header?: {
10344
+ /** @description Version of the client app, for logs and the per-client metric. */
10345
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10346
+ /** @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`). */
10347
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10348
+ };
10349
+ path: {
10350
+ import_id: components["parameters"]["ImportId"];
10351
+ };
10352
+ cookie?: never;
10353
+ };
10354
+ requestBody?: never;
10355
+ responses: {
10356
+ /** @description The finished import */
10357
+ 200: {
10358
+ headers: {
10359
+ [name: string]: unknown;
10360
+ };
10361
+ content: {
10362
+ "application/json": components["schemas"]["ChatImport"];
10363
+ };
10364
+ };
10365
+ 401: components["responses"]["Unauthorized"];
10366
+ 403: components["responses"]["Forbidden"];
10367
+ 404: components["responses"]["NotFound"];
10368
+ 422: components["responses"]["ValidationFailed"];
10369
+ 426: components["responses"]["ClientOutdated"];
10370
+ };
10371
+ };
10372
+ assignImportSender: {
10373
+ parameters: {
10374
+ query?: never;
10375
+ header?: {
10376
+ /** @description Version of the client app, for logs and the per-client metric. */
10377
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10378
+ /** @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`). */
10379
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10380
+ };
10381
+ path: {
10382
+ import_id: components["parameters"]["ImportId"];
10383
+ sender_key: components["parameters"]["ImportSenderKey"];
10384
+ };
10385
+ cookie?: never;
10386
+ };
10387
+ requestBody: {
10388
+ content: {
10389
+ "application/json": components["schemas"]["AssignImportSenderRequest"];
10390
+ };
10391
+ };
10392
+ responses: {
10393
+ /** @description The sender */
10394
+ 200: {
10395
+ headers: {
10396
+ [name: string]: unknown;
10397
+ };
10398
+ content: {
10399
+ "application/json": components["schemas"]["ChatImportSender"];
10400
+ };
10401
+ };
10402
+ 400: components["responses"]["BadRequest"];
10403
+ 401: components["responses"]["Unauthorized"];
10404
+ 403: components["responses"]["Forbidden"];
10405
+ 404: components["responses"]["NotFound"];
10406
+ 409: components["responses"]["Conflict"];
10407
+ 422: components["responses"]["ValidationFailed"];
10408
+ 426: components["responses"]["ClientOutdated"];
10409
+ };
10410
+ };
10411
+ decideImportSender: {
10412
+ parameters: {
10413
+ query?: never;
10414
+ header?: {
10415
+ /** @description Version of the client app, for logs and the per-client metric. */
10416
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
10417
+ /** @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`). */
10418
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
10419
+ };
10420
+ path: {
10421
+ import_id: components["parameters"]["ImportId"];
10422
+ sender_key: components["parameters"]["ImportSenderKey"];
10423
+ };
10424
+ cookie?: never;
10425
+ };
10426
+ requestBody: {
10427
+ content: {
10428
+ "application/json": components["schemas"]["DecideImportSenderRequest"];
10429
+ };
10430
+ };
10431
+ responses: {
10432
+ /** @description The sender */
10433
+ 200: {
10434
+ headers: {
10435
+ [name: string]: unknown;
10436
+ };
10437
+ content: {
10438
+ "application/json": components["schemas"]["ChatImportSender"];
10439
+ };
10440
+ };
10441
+ 400: components["responses"]["BadRequest"];
10442
+ 401: components["responses"]["Unauthorized"];
10443
+ 404: components["responses"]["NotFound"];
10444
+ 422: components["responses"]["ValidationFailed"];
10445
+ 426: components["responses"]["ClientOutdated"];
10446
+ };
10447
+ };
9859
10448
  forwardMessages: {
9860
10449
  parameters: {
9861
10450
  query?: never;