@myronsi/messenger-api 2.1.0-alpha.6.next.71 → 2.1.0-alpha.60.next.209

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