@myronsi/messenger-api 2.1.0-alpha.6.next.71 → 2.1.0-alpha.61.next.210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,587 @@
2
2
 
3
3
  Contract changes only. The backend changelog is `CHANGELOG.md` in the repository root. Rules: `docs/api-compatibility.md`.
4
4
 
5
+ ## 2.1.0-alpha.61
6
+
7
+ - Channel settings `sensitive` (18+) and `recommendable` (on by default) on `Group` and `UpdateGroupRequest`; only the
8
+ owner changes them (`403` for admins). `PublicGroup` gains `sensitive`. Staff can mark a channel sensitive later
9
+ through the internal API.
10
+
11
+ ## 2.1.0-alpha.60
12
+
13
+ - Channel category and tags (C11): `ChannelCategory` (16 values); `Group`, `UpdateGroupRequest` and `PublicGroup` gain
14
+ `category` and `tags` (public channels only, up to 5 cleaned tags, a staff blocklist refuses some with `422`).
15
+ - `searchPublicGroups` gains `category` and `tag`, and `q` also matches the start of a tag.
16
+
17
+ ## 2.1.0-alpha.59
18
+
19
+ - Built-in comments on channel posts, two levels deep. `SendMessageRequest.thread_root_id` (and the WebSocket
20
+ `message` event) sends a comment; `reply_to` to another comment makes it a reply. `Message` gains
21
+ `thread_root_id`, `parent_id`, `comment_count` and `comments_enabled`.
22
+ - `GET /chats/{chat_id}/messages/{message_id}/comments` pages a post's comments or a comment's replies;
23
+ `PUT /chats/{chat_id}/messages/{message_id}/comments-enabled` turns comments off for one post.
24
+ - `Group` and `UpdateGroupRequest` gain `comments_enabled` and `comment_slow_mode` (`CommentSlowMode`); `Group` gains
25
+ `notify_comments`. New `PUT /groups/{chat_id}/comment-notifications`, `GET /groups/{chat_id}/comment-bans` and
26
+ `PUT`/`DELETE /groups/{chat_id}/comment-bans/{user_id}`.
27
+ - WebSocket: client events `thread_open` and `thread_close` (`message_id` of the post); new, edited and deleted
28
+ comments go only to users who have the thread open (re-send `thread_open` at least every 2 minutes).
29
+ `post_stats` items gain `comment_count` and, for posts, `comments_enabled`.
30
+ - Search: `searchMessages` gains `in` (`all`, `posts`, `comments`); `searchAllMessages` gains `chat_kind=channel` and
31
+ `include_comments`. `searchPublicGroups` gains `mode`, and `q` is optional (`mode=channel` lists public channels).
32
+
33
+ ## 2.1.0-alpha.58
34
+
35
+ - Channel post stats: `Message` gains `view_count` and `reaction_counts` (`ReactionCount`: `emoji`, `count`), both
36
+ `null` outside channels. In a channel `reactions` lists only the caller's own reactions, and `reaction_add` /
37
+ `reaction_remove` go only to the reacting user's own sessions.
38
+ - New server event `post_stats`: merged view and reaction counts of channel posts, at most one per post every 10 s,
39
+ to the subscribers who are online.
40
+
41
+ ## 2.1.0-alpha.57
42
+
43
+ - Channels: `GroupMode` (`group`, `channel`). `CreateGroupRequest` gains `mode`; `Chat` gains `group_mode` (`null` for
44
+ direct chats); `Group` gains `group_mode` and `member_count`; `PublicGroup` gains `group_mode`. In a channel only the
45
+ owner and admins post, forward, pin for everyone and start calls; subscribers get `403` for these, `members` of
46
+ `Group` is always empty, and `listGroupMembers`, `getGroupRoleLog` and `listPollVoters` answer `403` to subscribers.
47
+ - A group has at most 10,000 members: adding, accepting an invitation, joining by link or by public name answers `409`
48
+ `limit_reached` when it is full.
49
+
50
+ ## 2.1.0-alpha.56
51
+
52
+ - Description only: the `import_upload` rate of `POST /attachments?import_id=…` is 1,200 per minute (burst 100), and
53
+ an imported sticker that is already a 512×512 WebP within the sticker limits is stored at once, with its smaller
54
+ copies made in the background (`processing` until `attachment_updated`).
55
+
56
+ ## 2.1.0-alpha.55
57
+
58
+ - `import_id` of `POST /attachments` moves from the form to the query (`POST /attachments?import_id=…`), so the
59
+ upload rate (`upload` or `import_upload`) is checked before the body is read. The form field is removed.
60
+
61
+ ## 2.1.0-alpha.54
62
+
63
+ - `UploadAttachmentRequest` gains `import_id`: uploads of the caller's own running import get their own rate limit
64
+ (300 per minute, burst 50), and their JPEG, PNG and still WebP images get the thumbnail, display copy and
65
+ placeholder in the background: `Attachment.processing` now also covers images (`queued` until
66
+ `attachment_updated`).
67
+
68
+ ## 2.1.0-alpha.53
69
+
70
+ - Documentation: `startChatImport` allows one running import per user (`409` otherwise), and a running import that
71
+ gets no batch for 24 hours is removed (`import_update` with `removing`).
72
+
73
+ ## 2.1.0-alpha.52
74
+
75
+ - Imported stickers can be real stickers: `ImportedMessageType` gains `sticker` and `ImportedMessage` gains
76
+ `sticker_id` (a sticker the importer may send, for example from a pack made from the export's stickers).
77
+
78
+ ## 2.1.0-alpha.51
79
+
80
+ - `UploadPurpose` `sticker` accepts animated WebP as a source of an animated sticker, like an animated GIF: the server
81
+ keeps at most 3 s, crops it when asked and stores a looping animated WebP of at most 512 x 512 px. Before, such
82
+ files got `415`.
83
+
84
+ ## 2.1.0-alpha.50
85
+
86
+ - Synced settings: `GET` and `PATCH /me/client-settings` (`ClientSettings`, `UpdateClientSettingsRequest`,
87
+ `AppearanceSettings`): appearance, recent emoji (24) and recent reactions (8) shared by all devices.
88
+ - Chat backgrounds: `GET /me/wallpapers` (`WallpaperList`), `PUT` and `DELETE /me/wallpapers/default`, `PUT` and
89
+ `DELETE /chats/{chat_id}/wallpaper` (`SetChatWallpaperRequest` with `for_both` for direct chats), `Wallpaper`,
90
+ `WallpaperEntry`, `WallpaperPattern`. `UploadPurpose` gains `chat_wallpaper`; `SystemEventKind` gains
91
+ `chat_wallpaper_set`.
92
+ - Playlists: `GET` and `POST /me/playlists`, `GET`, `PATCH` and `DELETE /me/playlists/{playlist_id}`,
93
+ `PUT /me/playlists/{playlist_id}/tracks` (`Playlist`, `PlaylistSummary`, `PlaylistTrack` with `available`). At most
94
+ 100 playlists and 1000 tracks each.
95
+ - WebSocket server events `client_settings_updated`, `wallpaper_updated` and `playlists_updated`, only to the user's
96
+ own sessions.
97
+
98
+ ## 2.1.0-alpha.49
99
+
100
+ - Chat imports hold up to 500,000 messages: `ChatImport.message_count` and `StartChatImportRequest.message_count`
101
+ allow up to `500000`.
102
+ - `UploadPurpose` `message` accepts animated WebP (for example WhatsApp stickers in an import) and keeps the
103
+ animation; before, such files got `415`.
104
+
105
+ ## 2.1.0-alpha.48
106
+
107
+ - Video and screen sharing in calls: `CallConfig` (`GET /calls/config`) gains `video_enabled` and
108
+ `screen_share_enabled`. When they are on, the media grant also allows the `camera`, `screen_share` and
109
+ `screen_share_audio` sources; every source is end-to-end encrypted with the same per-epoch sender keys as audio.
110
+
111
+ ## 2.1.0-alpha.47
112
+
113
+ - New message types `poll`, `contact` and `location` (`MessageType`, `SendMessageRequest.type`, `UnsentMessage.type`),
114
+ sent over REST only. `SendMessageRequest` and `UnsentMessage` gain `poll` (`PollCreate`), `contact`
115
+ (`ContactCreate`) and `location` (`LocationCreate`); `Message` gains `poll` (`Poll`), `contact` (`ContactCard`) and
116
+ `location` (`MessageLocation`). Their `content` holds a plain-text summary for older clients.
117
+ - Polls: `PUT /chats/{chat_id}/messages/{message_id}/poll/votes` (`votePoll`), `POST …/poll/close` (`closePoll`) and
118
+ `GET …/poll/voters` (`listPollVoters`). New schemas `PollQuizCreate`, `PollOption`, `PollVoteRequest`; `ErrorCode`
119
+ gains `poll_closed` and `quiz_answered`. New WebSocket server event `poll_updated`.
120
+ - Maps: `GET /maps/tiles/{z}/{x}/{y}` (`getMapTile`) and `GET /maps/static` (`getStaticMap`), new tag `maps`, new
121
+ schema `MapImage`.
122
+ - `SystemEventKind` gains `group_renamed`, `group_avatar_changed` and `owner_transferred`; `SystemEvent` gains
123
+ `old_name`, `new_name` and `avatar_removed`. New `DELETE /groups/{chat_id}/avatar` (`deleteGroupAvatar`).
124
+ - Stickers from videos and GIFs: `UploadAttachmentRequest` gains `crop_x`, `crop_y` and `crop_size`; `start_ms` and
125
+ `end_ms` also apply to stickers.
126
+
127
+ ## 2.1.0-alpha.46
128
+
129
+ - Chat import from Telegram and WhatsApp: `GET`/`POST /chats/{chat_id}/imports` (`listChatImports`,
130
+ `startChatImport`), `GET`/`DELETE /imports/{import_id}` (`getChatImport`, `removeChatImport`),
131
+ `PUT /imports/{import_id}/messages` (`addImportedMessages`), `POST /imports/{import_id}/finish`
132
+ (`finishChatImport`), `PUT /imports/{import_id}/senders/{sender_key}` (`assignImportSender`) and
133
+ `POST /imports/{import_id}/senders/{sender_key}/decision` (`decideImportSender`). New schemas `ChatImport`,
134
+ `ChatImportList`, `ChatImportSender`, `ChatImportState`, `ImportSource`, `ImportSenderKey`, `ImportSenderState`,
135
+ `StartChatImportRequest`, `StartChatImportSender`, `ImportedMessage`, `ImportedMessageType`,
136
+ `AddImportedMessagesRequest`, `ImportProgress`, `AssignImportSenderRequest`, `DecideImportSenderRequest`,
137
+ `MessageImport` and `ImportSummary`; new path parameters `ImportId` and `ImportSenderKey`.
138
+ - `Message` gains `import`; for imported messages `created_at` is the time in the other messenger, and `sender` is
139
+ `null` until the member behind the name confirms it.
140
+ - `SystemEventKind` gains `history_imported`, `history_import_ended` and `imported_note`; `SystemEvent` gains
141
+ `import` and `text`.
142
+ - `SyncChange.type` gains `history_imported`.
143
+ - WebSocket server events `import_update` and `import_sender_update`.
144
+
145
+ ## 2.1.0-alpha.45
146
+
147
+ - `GET /search/messages` gains the query parameter `kind` (`MediaKind`: `image`, `visual`, `audio`, `voice`, `file`,
148
+ `link`) to find only messages with that kind of attachment or with a web link. `q` is now optional when `kind` is
149
+ given, which lists those messages newest first.
150
+
151
+ ## 2.1.0-alpha.44
152
+
153
+ - `GET /sync/changes` (`listSyncChanges`): edits, reaction changes, deletions, pin changes, cleared histories and
154
+ chats deleted for the caller since a cursor, for clients that keep messages offline. New schemas
155
+ `SyncChangesPage` and `SyncChange`.
156
+ - `POST /me/storage-key` (`getStorageKey`): the key of the current session for encrypting offline data, new schema
157
+ `StorageKey`.
158
+
159
+ ## 2.1.0-alpha.43
160
+
161
+ - Device-bound sessions: optional header parameter `DeviceProof` (`Device-Proof`, a DPoP-style ES256 proof) on
162
+ `POST /auth/register`, `/auth/login`, `/auth/login/2fa`, `/auth/refresh`, `/auth/recover/key`,
163
+ `/auth/recovery-requests/{requestId}/complete`, `/auth/qr-login/{requestId}/poll` and
164
+ `/auth/passkeys/login/verify`. A refresh of a bound session without a proof of its key answers `401` and ends the
165
+ session.
166
+ - `ErrorCode` gains `device_proof_stale`.
167
+ - `Date` is exposed to cross-origin clients.
168
+
169
+ ## 2.1.0-alpha.42
170
+
171
+ - Pinned messages: `PUT /chats/{chat_id}/messages/{message_id}/pin` (`PinMessageRequest` with `PinScope` `me` or
172
+ `everyone`, returns `PinnedMessage`), `DELETE /chats/{chat_id}/messages/{message_id}/pin?scope=` and
173
+ `GET /chats/{chat_id}/pins` (`PinnedMessagePage`). At most 500 pins for everyone per chat and 500 own pins per member
174
+ and chat (`409` `limit_reached`).
175
+ - `Chat.pinned_message_count`.
176
+ - `SystemEventKind` gains `message_pinned` and `message_unpinned`; `SystemEvent` gains `message_id`, `snippet` and
177
+ `message_type`.
178
+ - WebSocket server event `pin_update`.
179
+
180
+ ## 2.1.0-alpha.41
181
+
182
+ - Public cards without an account (tag `public`, `security: []`, rate limited per IP, `X-Robots-Tag: noindex`):
183
+ `GET /public/names/{public_name}` (`PublicNameLookup`: `PublicNameKind` `user`, `group`, `unavailable`, with
184
+ `PublicUser` or `PublicGroup`), `GET /public/invites/{token}` (`PublicGroup`), their avatars
185
+ `GET /public/names/{public_name}/avatar` and `GET /public/invites/{token}/avatar`, and link preview pages for
186
+ crawlers `GET /og/names/{public_name}` and `GET /og/invites/{token}` (`text/html`).
187
+ - `PrivacySettings.web_profile_visibility` (`WebProfileVisibility`: `everyone`, `nobody`; default `everyone`);
188
+ `UpdatePrivacySettingsRequest` accepts it.
189
+ - Group invite links: `GET/POST /groups/{chat_id}/invite-links`, `PATCH/DELETE /groups/{chat_id}/invite-links/{link_id}`
190
+ (`InviteLink`, `InviteLinkList`, `CreateInviteLinkRequest`, `UpdateInviteLinkRequest`), `GET /invites/{token}`
191
+ (`GroupPreview`) and `POST /invites/{token}/join` (`Chat`).
192
+ - Public groups: `PUT/DELETE /groups/{chat_id}/public-name` (`SetPublicNameRequest`), `Group.public_name`
193
+ (`PublicName`, one name space with usernames), `GET /public-groups` (`GroupPreviewPage`),
194
+ `GET /public-groups/{public_name}`, `POST /public-groups/{public_name}/join` and
195
+ `GET /public-names/{public_name}/availability` (`PublicNameAvailability`).
196
+ - Bans: removing a member bans them; `GET /groups/{chat_id}/bans` (`GroupBanPage` of `GroupBan`) and
197
+ `DELETE /groups/{chat_id}/bans/{user_id}`.
198
+ - `AccountRestriction` gains `share_group` and `join_by_link`.
199
+ - Mentions: `Message.mentions` (member IDs) and `Message.mentions_all` (`@all` from an owner or admin);
200
+ `Chat.unread_mentions_count`; `GET /chats/{chat_id}/mentions` (`MentionList`);
201
+ `NotificationPreferences.mentions_in_muted` (default `true`).
202
+
203
+ ## 2.1.0-alpha.40
204
+
205
+ - `RegisterRequest` gains the optional `terms_version` (the date of the accepted Terms of Use, such as `2026-11-19`)
206
+ and `age_confirmed` (at least 13, a parent or guardian agrees under 16). `age_confirmed: false` or a
207
+ `terms_version` that is not such a date is `422` with the field. When the server requires terms acceptance, a
208
+ registration without `terms_version` or without `age_confirmed: true` is `422` as well.
209
+ - `Me` gains the required, nullable `terms_version` and `terms_accepted_at`.
210
+
211
+ ## 2.1.0-alpha.39
212
+
213
+ - Content reports: `POST /chats/{chat_id}/messages/{message_id}/report` and `POST /groups/{chat_id}/report`
214
+ (`ContentReportRequest`: `ContentReportReason`, which adds `illegal` with a required `note`), and `DELETE` on both
215
+ to withdraw. User, message and group reports share the limit of 20 a day.
216
+ - `Message.removed_by_moderation` and, for the sender only, `Message.moderation_reason` (`ModerationRemovalReason`:
217
+ a `ModerationReason` `code` and a `text`); `ReplyPreview.removed_by_moderation`. The WebSocket `delete` event gains
218
+ the optional `removed_by_moderation` and, in the sender's copy, `moderation_reason`.
219
+
220
+ ## 2.1.0-alpha.38
221
+
222
+ - Review by a person: `POST /me/account-status/review` (`AccountReviewRequest`: `text`, 1 to 500 characters) stores a
223
+ request for the moderation team while the status is not `good`; one open request at a time (`409`), at most 3 in
224
+ 30 days (`429`). `AccountStatus` gains `review_requested_at` and `can_request_review`, also in the
225
+ WebSocket event `account_status`.
226
+
227
+ ## 2.1.0-alpha.37
228
+
229
+ - `AccountStatus` gains the optional `decided_by` (`AccountStatusDecidedBy`: `automatic`, `staff`), `reason_code`
230
+ (`ModerationReason`: `spam`, `scam`, `harassment`, `impersonation`, `inappropriate_profile`, `illegal`, `other`) and
231
+ `reason_text` for statuses a person on the moderation team set. `can_appeal` is `false` for those.
232
+ - Reporter outcome notices: `GET /me/report-outcomes` (`ReportOutcomeList` of `ReportOutcome`: `ReportSubjectType`,
233
+ `ReportOutcomeKind`) and `POST /me/report-outcomes/{outcome_id}/read`; the WebSocket event `report_outcome` carries a
234
+ new one to the reporter's own sessions.
235
+
236
+ ## 2.1.0-alpha.36
237
+
238
+ - User reports: `POST /users/{user_id}/report` (`ReportUserRequest`: `ReportReason`, optional `note`, `block`
239
+ default `true`) and `DELETE /users/{user_id}/report`.
240
+ - Automatic account status: `GET /me/account-status` and `POST /me/account-status/appeal` return `AccountStatus`
241
+ (`AccountStatusLevel`, `AccountRestriction`, including `manage_group` for group changes of a suspended
242
+ account); the WebSocket event `account_status` carries it to the user's own sessions.
243
+ - `ErrorCode` gains `account_restricted` (`403`); `Problem.restriction` and the WebSocket `error` event's
244
+ `data.restriction` name the blocked action.
245
+ - `User.account_label` (`AccountLabel`: `restricted`) marks suspended accounts.
246
+
247
+ ## 2.1.0-alpha.35
248
+
249
+ - `PrivacySettings` gains the required `voice_video_messages` (`VoiceVideoPolicy`: `everyone`, `contacts`) and
250
+ `forward_link` (`ForwardLinkPolicy`: `everyone`, `contacts`, `nobody`); `UpdatePrivacySettingsRequest` accepts both.
251
+ `PUT /me/privacy/exceptions/{setting_key}/{effect}` accepts both keys, and `PrivacySettings.exceptions` lists them.
252
+ - A voice message, or a file message with a video, sent, resent or forwarded into a direct chat whose peer does not
253
+ accept it is refused with `403` `forbidden` and the field `voice_video_messages`. The WebSocket `error` event gains
254
+ the optional `field`.
255
+ - `User.can_send_voice_video`, only on `Chat.peer` of a direct chat. When the peer changes `voice_video_messages` or its
256
+ exceptions, a `chat_list_update` brings the new value.
257
+ - `ForwardedFrom.sender_id` is `null` for viewers that the original sender's `forward_link` excludes.
258
+
259
+ ## 2.1.0-alpha.34
260
+
261
+ - Requests folder: `Chat` gains the required `is_request`, `true` when a stranger opened the direct chat and the caller
262
+ has not replied, accepted, pinned or archived it yet. Messages in such a chat send the caller no push.
263
+ - `GET /chats` gains `folder` (`main`, the default, `requests` or `all`). Without it the answer holds only the main list.
264
+ - `POST /chats/{chat_id}/accept` moves a chat out of the Requests folder; `GET /chats/requests/count` answers
265
+ `ChatRequestCount` (`requests_count`).
266
+ - WebSocket: `chat_list_update` also goes out when a chat moves out of the Requests folder.
267
+
268
+ ## 2.1.0-alpha.32
269
+
270
+ - `Attachment` gains `placeholder` (ThumbHash), `processing` (`MediaProcessing`: `queued`, `running`, `done`,
271
+ `failed`), `source_url`, `animation_url`, `panel_url` and `message_url`. `thumbnail_url` is a 480 px WebP for new
272
+ uploads and the cover of an audio file; `tags` (with the new `album`) is set for audio files, not only profile music.
273
+ - `GET /attachments/{attachment_id}/content` gains the variants `source`, `panel`, `message`, `animation`, `inline`,
274
+ `avatar_64`, `avatar_128` and `avatar_256`, and `pt`: it works without a bearer token when `pt` is a playback token.
275
+ Without `variant`, an optimized video or audio file answers with the optimized copy.
276
+ - `POST /attachments/{attachment_id}/playback` returns `PlaybackUrl`, a five-minute URL for media elements.
277
+ - Resumable uploads: `POST /upload-sessions`, `GET`/`DELETE /upload-sessions/{upload_id}`,
278
+ `PUT /upload-sessions/{upload_id}/chunks` and `POST /upload-sessions/{upload_id}/complete`.
279
+ - `GET /users/{user_id}/avatar` gains `size`; `GET /emoji/items/{emoji_id}/image` gains `variant=inline`.
280
+ - WebSocket: `attachment_updated` carries an attachment whose optimized copy is ready or failed.
281
+
282
+ ## 2.1.0-alpha.31
283
+
284
+ - Custom emoji: `CustomEmoji`, `EmojiPack` and the `emoji` tag with `GET`/`POST /emoji/packs`, `GET`/`PATCH`/`DELETE
285
+ /emoji/packs/{pack_id}`, `PUT`/`DELETE /emoji/packs/{pack_id}/installation`, `POST /emoji/packs/{pack_id}/emoji`,
286
+ `PATCH`/`DELETE /emoji/packs/{pack_id}/emoji/{emoji_id}`, `POST /emoji/packs/{pack_id}/report`, `GET /emoji/links/{slug}`,
287
+ `GET /emoji/items/{emoji_id}`, `GET /emoji/items/{emoji_id}/image` and `GET /groups/{chat_id}/emoji` (one set per group, edited by the
288
+ owner and admins).
289
+ - Message text, captions, display names and bios may hold the tokens `<:shortcode:id>` and `<a:shortcode:id>`; the
290
+ server turns tokens the sender may not use into `:shortcode:`. `Reaction.emoji` may be `c:<id>`.
291
+ - `UploadPurpose` gains `emoji`. `UpdateMeRequest.display_name` allows up to 400 characters and `bio` up to 4000 (the
292
+ visible text keeps its limits of 64 and 500, counting each token as its `:shortcode:`).
293
+ ## 2.1.0-alpha.30
294
+
295
+ - Connected accounts (`Connection`, `ConnectionList`, `ConnectionProvider`): `GET /me/connections`,
296
+ `PUT /me/connections/order`, `DELETE /me/connections/{connection_id}` and `GET /users/{user_id}/connections`
297
+ (visible like the bio). At most 15 per user.
298
+ - Providers that sign the user in: `POST /me/connections/{provider}/start` returns a `redirect_url`; the provider
299
+ sends the browser back to `GET /connections/callback/{provider}`, which redirects to the web app with `provider` and
300
+ `result`.
301
+ - Bluesky, Mastodon and websites: `POST /me/connections/{provider}/claim` returns a code to publish,
302
+ `POST /me/connections/{provider}/verify` checks it.
303
+ - `Meta` gains the required `connection_providers`: the providers this server offers.
304
+
305
+ ## 2.1.0-alpha.29
306
+
307
+ - `User` gains the required `pronouns`, `birthday` (`Birthday`: day, month, optional year), `music`
308
+ (`ProfileMusic`) and `background` (`ProfileBackground`: an uploaded image, GIF or short video, a built-in preset or
309
+ one or two colors); all grow `profile_version`. `Me` gains the required `time_zone`.
310
+ - `PATCH /me` accepts `pronouns`, `birthday` and `time_zone`.
311
+ - `PUT`/`DELETE /me/music`, `PUT`/`DELETE /me/background`, `PUT`/`DELETE /groups/{chat_id}/background`.
312
+ `Group` gains the required `background`.
313
+ - `UploadPurpose` gains `profile_music` (cut to at most 30 s with the new `start_ms` and `end_ms`, tags in the new
314
+ `Attachment.tags`) and `profile_background`.
315
+ - `PrivacySettings` gains the required `birthday_visibility`; `birthday_visibility` is a new privacy exception key.
316
+ - `NotificationPreferences` gains the optional `birthday_reminders`.
317
+
318
+ ## 2.1.0-alpha.28
319
+
320
+ - `MediaKind` gains `voice` (voice messages only) and `link` (messages whose text or caption contains a web link) for
321
+ `GET /chats/{chat_id}/media`.
322
+ - `GET /groups/{chat_id}/participants` (`GroupMemberPage`): members page by page, owner first, then admins, moderators
323
+ and members by display name, with an optional `q` filter and the matching `total`.
324
+ - `GET /users/{user_id}/common-groups` (`CommonGroupPage` of `CommonGroup`): the groups the caller shares with the
325
+ user.
326
+
327
+ ## 2.1.0-alpha.27
328
+
329
+ - `User` gains the required `profile_version` (grows with username, display name, bio or avatar changes, not with
330
+ presence) and `StickerPack` the required `version` (grows with title or sticker changes).
331
+ - `GET /me`, `GET /users/{user_id}`, `GET /groups/{chat_id}`, `GET /stickers/packs` and `GET /stickers/packs/{pack_id}`
332
+ send an `ETag` with `Cache-Control: private, no-cache` and answer `304` to a matching `If-None-Match`.
333
+ - `/attachments/{attachment_id}/content` is cached as immutable (an attachment never changes).
334
+ - New server WebSocket event `user_updated` (`user_id`, `profile_version`) for users who share a chat with the user.
335
+
336
+ ## 2.1.0-alpha.26
337
+
338
+ - `DELETE /chats/{chat_id}` takes `scope=me|everyone` (default `everyone`, as before). `me` deletes the direct chat
339
+ only for the caller: it leaves their list, its history so far stays hidden for them, and it comes back with only
340
+ newer messages when one arrives.
341
+ - `POST /chats/{chat_id}/clear` (`ClearHistoryRequest`, `scope: me|everyone`) clears the history up to the newest
342
+ message: for the caller only, or for every member (direct chats: either user; groups: owner and admins, else
343
+ `403`).
344
+ - New server WebSocket event `history_cleared` (`before_message_id`, `scope`, `actor_id`).
345
+
346
+ ## 2.1.0-alpha.25
347
+
348
+ - Archive: `PUT` and `DELETE /chats/{chat_id}/archive` archive a chat for the caller and move it back. `Chat` gains
349
+ the required `is_archived`; `GET /chats?archived=true|false` lists only archived or only other chats (without the
350
+ parameter, every chat as before). Archiving unpins; an archived chat stays archived when new messages arrive;
351
+ pinning a chat unarchives it.
352
+ - Pin order: `Chat` gains the required, nullable `pin_position` (lowest first) and pinned chats are listed in that
353
+ order. A newly pinned chat goes to the top. `PUT /chats/pins/order` (`PinOrderRequest`) sets the order of all
354
+ pinned chats at once.
355
+ - Saved Messages: `POST /chats` accepts the caller's own `user_id` and opens a direct chat whose only member and
356
+ `peer` is the caller.
357
+
358
+ ## 2.1.0-alpha.24
359
+
360
+ - `PrivacySettings` gains the required `last_seen_visibility`, also accepted by `PATCH /me/privacy` and as a
361
+ `setting_key` of `PUT /me/privacy/exceptions/{setting_key}/{effect}`. It decides who sees `User.last_seen` and the
362
+ `last_seen` of `presence` events; `presence_visibility` now decides only `User.is_online` and online `presence`
363
+ events. Existing users start with both settings and their exceptions equal to their old `presence_visibility`.
364
+ - The `action` of the client and server `typing` events gains `choosing_sticker`, `uploading_photo`,
365
+ `uploading_video` and `uploading_file`.
366
+
367
+ ## 2.1.0-alpha.23
368
+
369
+ - `MediaKind` gains `file`: `GET /chats/{chat_id}/media?kind=file` lists messages with file attachments (documents,
370
+ archives and other files that are not images, videos, audio or voice messages), newest first.
371
+ - Rejected sends are kept for the sender: a send refused with `forbidden`, `blocked_by_user`, `rate_limited` or
372
+ `internal_error` is listed by `GET /chats/{chat_id}/unsent` (`UnsentMessage`, oldest first) on all of the sender's
373
+ devices until a send with the same `client_temp_id` succeeds or `DELETE /chats/{chat_id}/unsent/{client_temp_id}`
374
+ discards it.
375
+
376
+ ## 2.1.0-alpha.22
377
+
378
+ - `Chat` gains the required, nullable `first_unread_message_id` (the oldest message the caller has not read, `null`
379
+ when `unread_count` is 0) and `last_read_message_id` (the caller's read marker), also in `chat_created` and
380
+ `chat_list_update`. Clients open a chat around `first_unread_message_id` and show the "new messages" divider there.
381
+ - `q` of `GET /chats/{chat_id}/messages/search` and `GET /search/messages` takes up to 256 characters (was 128).
382
+ - `RegisterRequest.display_name` is optional; a missing, empty or blank display name becomes the username.
383
+
384
+ ## 2.1.0-alpha.21
385
+
386
+ - User sticker packs: `POST /attachments` takes `purpose: sticker` (PNG, JPEG or still WebP up to 5 MB, stored as a
387
+ 512 x 512 WebP of at most 512 KB). `POST /stickers/packs` creates a pack; `PATCH` and `DELETE
388
+ /stickers/packs/{pack_id}` rename and delete it; `POST /stickers/packs/{pack_id}/stickers`, `PATCH` and `DELETE
389
+ /stickers/packs/{pack_id}/stickers/{sticker_id}` and `PUT /stickers/packs/{pack_id}/order` manage its stickers.
390
+ Only the owner may change a pack (`403`). Limits: 50 packs per user and 120 stickers per pack
391
+ (`409 limit_reached`).
392
+ - `GET /stickers/packs?owned=true` lists the packs the user made. `GET /stickers/links/{slug}` opens a pack by its
393
+ share link. A user pack is reachable by its ID (`GET`, add, report, sending its stickers) only for its owner and
394
+ for users who opened its link; `Sticker.pack_slug` carries the link, so receivers of a sticker can open its pack.
395
+ - `StickerPack` gains the required `is_mine` and `is_hidden` and the optional `owner_id` and `slug`.
396
+ - `POST /stickers/packs/{pack_id}/report` reports a pack; after 5 reports it is hidden for everybody but its owner
397
+ and stickers cannot be sent from it.
398
+ - `ErrorCode` gains `limit_reached`.
399
+ - A sticker upload not yet in a pack can be loaded only by its uploader.
400
+
401
+ ## 2.1.0-alpha.20
402
+
403
+ - Stickers: `MessageType` and `SendMessageRequest.type` gain `sticker`. A sticker message is sent with `sticker_id`
404
+ only (no content, attachment or drawings) through `POST /chats/{chat_id}/messages`; the WebSocket `message` event
405
+ does not take stickers. The server sets `content` to the sticker's emoji.
406
+ - `Message.sticker` returns the `Sticker` (id, pack, emoji, `is_animated`, `image`). `Message.attachment` carries
407
+ the same image, so older clients show a sticker as a picture with its emoji as caption.
408
+ - New `stickers` operations: `GET /stickers/packs` (the user's panel), `GET /stickers/packs/{pack_id}` (any pack),
409
+ `PUT` and `DELETE /stickers/packs/{pack_id}/installation` (add or remove a pack) and `GET /stickers/recent` (the
410
+ last 20 stickers the user sent). Built-in default packs are in every panel until the user removes them.
411
+ - Sticker images are attachments any signed-in user can download.
412
+ - The search `type` filter accepts `sticker`.
413
+
414
+ ## 2.1.0-alpha.19
415
+
416
+ - Typing status for voice messages: the WebSocket `typing` event gains `data.action` (`typing` or
417
+ `recording_voice`). It is optional in the client event (default `typing`) and always set in the server event.
418
+ Clients show an unknown value like `typing`.
419
+ - `PrivacySettings` has a required `typing_indicators_enabled` (default `true`) and `UpdatePrivacySettingsRequest`
420
+ an optional one: with `false` the server drops the user's `typing` events, so nobody sees them typing.
421
+
422
+ ## 2.1.0-alpha.18
423
+
424
+ - Drawings on images: `SendMessageRequest.drawings` adds strokes and text labels to images of a `file` message.
425
+ The image file stays unchanged; the drawing is stored with the message.
426
+ - To draw on an image someone else sent, reply to that message with `reply_to`, reuse its image ID in
427
+ `attachment_id` and send a drawing for it.
428
+ - `Attachment.drawing` returns the drawing. Clients show the image with it. Older clients ignore it and show the
429
+ plain image.
430
+
431
+ ## 2.1.0-alpha.17
432
+
433
+ - Media albums: `SendMessageRequest.attachment_ids` sends two to ten image or video uploads as one `file` message
434
+ with one caption. `attachment_id` and `attachment_ids` are mutually exclusive; albums are `file` only.
435
+ - `Message.attachments` lists the album items in order. `Message.attachment` still carries the first item, so
436
+ older clients show the first photo or video.
437
+ - `MediaKind` gains `visual` for `GET /chats/{chat_id}/media`: images and videos together.
438
+
439
+ ## 2.1.0-alpha.16
440
+
441
+ - Trusted-device recovery no longer needs the current password. `DeviceRecoveryApproval.password` is no longer
442
+ required, is deprecated and ignored. New optional `passkey` (`PasskeyVerification`).
443
+ - `POST /auth/recovery-requests/{requestId}/approve/options` (`DeviceRecoveryApprovalOptions`: `method` `passkey`
444
+ with `challenge_id` and `public_key`, or `session` with `approvable_from` while the session is too new).
445
+ - New error codes `user_verification_required` (account has passkeys, no assertion sent) and `session_too_new`
446
+ (no passkeys and the session is younger than the minimum session age), both `403` on the approval.
447
+
448
+ ## 2.1.0-alpha.15
449
+
450
+ - End-to-end encrypted audio calls in direct chats and groups (tag `calls`, see `docs/calls.md` and
451
+ `docs/calls-e2ee.md`). `GET /calls/config` (`CallConfig`: `enabled`, `max_participants`,
452
+ `ring_timeout_seconds`) tells clients whether to show call controls; with `enabled: false` they hide them.
453
+ - `PUT /me/call-identity` (`CallIdentityRequest`, `204`) registers the session's P-256 call identity key
454
+ (`CallIdentityKey`, 87 characters of base64url); a new key raises the epoch of a call the session is in.
455
+ - `GET /calls` (`CallList`) lists the user's calls that are not over; clients load it after every (re)connect.
456
+ `GET /chats/{chat_id}/call` returns the chat's current call, `POST /chats/{chat_id}/call` (`StartCallRequest`
457
+ with a required `client_request_id`, idempotent for 24 hours) starts one (`201`) or returns the running one
458
+ (`200`). `GET /calls/{call_id}` reads a call, ended calls for 90 days.
459
+ - `POST /calls/{call_id}/join` (optional `JoinCallRequest` with `takeover`) answers or joins and returns
460
+ `CallJoin` (`call` and a short-lived `CallGrant`: `url`, `token`, `identity`, `expires_at`);
461
+ `POST /calls/{call_id}/grant` renews the grant for the session that joined. `POST /calls/{call_id}/decline`,
462
+ `/leave` and `/end` answer `204`.
463
+ - `GET /calls/{call_id}/keys` (`CallKeyEnvelopeList`) and `POST /calls/{call_id}/keys` (`SendCallKeysRequest` with
464
+ 1 to 64 `OutgoingCallKeyEnvelope`) relay opaque HPKE envelopes (`CallKeyEnvelope`) for the current epoch.
465
+ - New schemas `Call` (`kind`, `state`, `end_reason`, `epoch`, `version`, `participants`, timestamps),
466
+ `CallState` (`ringing`, `active`, `ended`), `CallEndReason` (`completed`, `missed`, `declined`, `cancelled`,
467
+ `failed`), `CallParticipant` and `CallParticipantState` (`ringing`, `joined`, `declined`, `missed`, `left`).
468
+ - New error codes `calls_unavailable`, `calls_not_allowed`, `call_identity_required`, `call_full`, `call_ended`,
469
+ `already_in_call` and `stale_epoch`. Every call operation except `GET /calls/config` can answer `503`
470
+ (`CallsUnavailable`, with `Retry-After` when calls are only away for a moment). `403 calls_not_allowed` when the
471
+ peer of a direct chat has calls off or one user blocked the other; `409` for `already_in_call`, `call_ended`,
472
+ `call_full` and `stale_epoch`; `422 call_identity_required` when joining without a call identity.
473
+ - New WebSocket events `call_updated` (the whole `Call` to every chat member; keep the highest `version`) and
474
+ `call_keys` (a `CallKeyEnvelopeList` for the recipient session only).
475
+ - `PrivacySettings` has a required `calls_enabled` (default `true`) and `UpdatePrivacySettingsRequest` an optional
476
+ one: with `false` nobody can ring the user.
477
+ - `SystemEventKind` adds `call`: one `system` message per call, posted when it ends, with `actor` the initiator and
478
+ `SystemEvent.call` a `CallSummary` (`call_id`, `kind`, `outcome`, `duration_seconds`).
479
+
480
+ ## 2.1.0-alpha.14
481
+
482
+ - New schema `Location` (`city`, `country_code` (ISO 3166-1 alpha-2), `country` (English name), each nullable): the
483
+ approximate location of a client address from an offline GeoIP database (IP geolocation by DB-IP). Clients
484
+ localise the country name from `country_code`.
485
+ - `Session` (`GET /me/sessions`) and the items of `SecurityEventPage` (`GET /me/security-events`) have a required,
486
+ nullable `location`, captured when the session signed in or refreshed and when the event happened.
487
+ - The `recovery_request` WebSocket event replaces `ip_hint` with a required, nullable `location`. No response or
488
+ event exposes a client IP address or network.
489
+ - Operations that take an optional second-factor `code` answer `401` with `code: two_factor_required` when every
490
+ other credential in the request was valid, the account has two-factor on and no `code` was sent; nothing
491
+ single-use is consumed, so clients ask for the code and repeat the request. Invalid other credentials and a wrong
492
+ `code` keep their errors. Affected: `POST /auth/recover/key`, `POST /auth/password-reset/confirm`,
493
+ `POST /auth/recovery-requests/{requestId}/approve`, `POST /me/recovery-key`, `POST /me/2fa/disable`,
494
+ `POST /auth/passkeys/register/options`, `PUT /me/email` and `DELETE /me/email`. `code` of
495
+ `DisableTwoFactorRequest` is now optional.
496
+ - Sign in with a QR code. A device that is not signed in calls `POST /auth/qr-login` (public, `201`
497
+ `QrLoginStart`: `request_id`, `poll_token`, `url` = `<RECOVERY_WEB_URL>/qr/<request_id>`, `expires_at` after 2
498
+ minutes) and polls `POST /auth/qr-login/{requestId}/poll` with `{ poll_token }` (public, `QrLoginPollResult`:
499
+ `status` `pending`, `scanned`, `denied` or `expired`). A signed-in device opens the link: `GET
500
+ /auth/qr-login/{requestId}` (`QrLoginRequest` with `device`, `location`, `created_at`, `expires_at`) moves the
501
+ request to `scanned` and binds it to that account, then `POST /auth/qr-login/{requestId}/approve` (optional
502
+ `code`, `401 two_factor_required` with two-factor on and no code, `403 forbidden` for an idle or old session) or
503
+ `POST /auth/qr-login/{requestId}/deny` answer `204`. The first poll after approval answers `status: approved`
504
+ plus the `TokenResponse` fields and sets the refresh cookie, exactly once; later polls, a wrong `poll_token` and
505
+ unknown requests answer `expired`. Unknown, expired or used requests answer `404` to the signed-in operations,
506
+ already decided ones `409`.
507
+ - New security event types `qr_login_approved`, `qr_login_denied` (both with the new device's user agent and
508
+ location) and `qr_login` (the new device signed in). The new `security_alert` WebSocket event
509
+ carries informational notices (sign-ins, password, 2FA, passkey and recovery changes, `qr_login_approved`);
510
+ `security_notice` stays limited to `password_reset`, so released clients that sign out on it keep working.
511
+ - `request_id` of the `recovery_request` WebSocket event is now an approval handle that differs from the
512
+ requester's capability. `POST /auth/recovery-requests/{requestId}/approve` and `/deny` take this handle; status
513
+ polling and `/complete` keep taking the requester's capability, so a signed-in device that receives the event can
514
+ no longer poll or complete the request. `DeviceRecoveryApproval` has a new required `password`. Approve and deny
515
+ answer `404` for an unknown, expired or already decided request and `403 forbidden` for an idle or old session.
516
+ - `POST /auth/passkeys/register/verify` answers `400 invalid_request` instead of `401 unauthenticated` for an
517
+ expired or used registration challenge, so clients do not treat it as a lost session.
518
+ - A completed password recovery (key, device approval or email) removes every passkey and, except for an email
519
+ recovery, the recovery email. The `password_reset` security event details gain `passkeys_removed` and
520
+ `recovery_email_removed`.
521
+ - New `POST /auth/recovery-requests/{requestId}/cancel` (public, requester capability, `204` for every
522
+ capability): withdraws a pending device recovery request so it stops counting towards the limit of three.
523
+ - `security_alert` adds `login_2fa` to its types and an optional `session_id`: the session that made the change,
524
+ so clients can skip alerts about their own actions.
525
+ - `POST /auth/password-reset/confirm` answers `404 not_found` for an unknown, expired or used link instead of
526
+ `400 invalid_credentials`, so clients can tell a dead link from a wrong code.
527
+
528
+ ## 2.1.0-alpha.12
529
+
530
+ - `GET /link-preview?url=` returns the Open Graph preview of a public web page (`title`, `description`,
531
+ `site_name`, `image`), cached for a day. `image.url` points to `GET /link-preview/image`, which streams the
532
+ picture through the server (PNG, JPEG, GIF or WebP up to 5 MB) with a signature, so clients never load
533
+ third-party images directly. Only public `http`/`https` addresses on ports 80 and 443 are fetched.
534
+ - Messages have an optional `system_event` (`kind`, `actor_id`, `actor_name`, `target_id`, `target_name`) on
535
+ `system` messages, whose `content` is then `null`. Groups write them when a group is created and when members
536
+ are added, join, are removed or leave. System messages do not count as unread.
537
+ - `GET /groups/{chat_id}/role-log` lists who changed whose role and when, newest first (members only).
538
+ - `GroupRole` and `UpdateRoleRequest` have `moderator` again: moderators may delete other members' messages.
539
+ - In a direct chat either side may delete any message for everyone (`DELETE /messages/{message_id}?scope=everyone`
540
+ and `POST /chats/{chat_id}/messages/delete`).
541
+ - The last message of a chat (`GET /chats`, `GET /chats/{chat_id}`) skips messages deleted for everyone and is the
542
+ newest message that still has content.
543
+
544
+ ## 2.1.0-alpha.11
545
+
546
+ - Attachments have `display_url`: a JPEG of at most 1600 px (`GET /attachments/{attachment_id}/content?variant=display`)
547
+ for showing a large still image in a viewer, much smaller than the original. It is `null` for small images and
548
+ GIFs. Older images get their display copy on the first request.
549
+
550
+ ## 2.1.0-alpha.10
551
+
552
+ - `GET /attachments/{attachment_id}/content` is cached for an hour again (`private, max-age=3600`) instead of a
553
+ year, so a file is not kept in caches long after its message is deleted. Versioned avatar URLs keep the
554
+ year-long cache.
555
+ - `POST /chats/{chat_id}/messages/delete` with `scope` everyone treats messages that are already deleted for
556
+ everyone as done (`204` instead of `404`), so a retry after a partial failure deletes the rest.
557
+ - WebSocket: a connection with more than 64 client events waiting to be handled is closed with `1013`.
558
+ - WebSocket: a user has at most 10 connections per server; opening another closes the oldest with the new close
559
+ code `4429`.
560
+ - `GET /users/{user_id}` and `GET /usernames/{username}` answer `404` for a user whose `search_visibility` hides
561
+ them from the current user, unless the two share a chat, and are rate limited per user (`429`).
562
+ `PUT /users/{user_id}/contact-name` follows the same rules and limit.
563
+ - `contacts` (and `shared_chats`) count a direct chat only once the user opened it or read a message in it, so
564
+ opening an empty chat with someone does not make you their contact. Groups count as before.
565
+
566
+ ## 2.1.0-alpha.9
567
+
568
+ - Privacy exceptions apply to every value of avatar, profile and presence visibility, not only to `*_except`:
569
+ an `allow` exception always shows the item to that user and a `deny` exception always hides it. Group invites
570
+ already worked this way.
571
+ - `direct_messages` and `search_visibility` take exception lists too (`PUT /me/privacy/exceptions/{setting_key}/{effect}`
572
+ and `exceptions` of `PrivacySettings`): `allow` lets the user start a direct chat without approval or find you in
573
+ search, `deny` never does.
574
+
575
+ ## 2.1.0-alpha.8
576
+
577
+ - Adds `POST /chats/{chat_id}/messages/forward` (up to 20 messages to up to 20 chats, at most 20 copies, oldest
578
+ first) and `POST /chats/{chat_id}/messages/delete` (up to 100 messages, `scope` me or everyone). Both check
579
+ every message first and change nothing when one is refused.
580
+
581
+ ## 2.1.0-alpha.7
582
+
583
+ - Adds `DELETE /me/avatars/{avatar_id}`: removes one of your avatars from the history and answers the updated
584
+ `Me`. Deleting the current avatar makes the newest remaining one current again, or the default when none is left.
585
+
5
586
  ## 2.1.0-alpha.6
6
587
 
7
588
  - `Message` adds optional `reply_preview` (`ReplyPreview`: id, type, sender, the first 100 characters of the
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.6. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.6";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.61. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.61";
3
3
  export type { paths, components, operations } from "./schema.js";
4
4
  export * from "./ws-events.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export const API_VERSION = "2.1.0-alpha.6";
1
+ export const API_VERSION = "2.1.0-alpha.61";