@myronsi/messenger-api 2.1.0-alpha.4.next.68 → 2.1.0-alpha.40.next.140

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,401 @@
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.40
6
+
7
+ - `RegisterRequest` gains the optional `terms_version` (the date of the accepted Terms of Use, such as `2026-11-19`)
8
+ and `age_confirmed` (at least 13, a parent or guardian agrees under 16). `age_confirmed: false` or a
9
+ `terms_version` that is not such a date is `422` with the field. When the server requires terms acceptance, a
10
+ registration without `terms_version` or without `age_confirmed: true` is `422` as well.
11
+ - `Me` gains the required, nullable `terms_version` and `terms_accepted_at`.
12
+
13
+ ## 2.1.0-alpha.39
14
+
15
+ - Content reports: `POST /chats/{chat_id}/messages/{message_id}/report` and `POST /groups/{chat_id}/report`
16
+ (`ContentReportRequest`: `ContentReportReason`, which adds `illegal` with a required `note`), and `DELETE` on both
17
+ to withdraw. User, message and group reports share the limit of 20 a day.
18
+ - `Message.removed_by_moderation` and, for the sender only, `Message.moderation_reason` (`ModerationRemovalReason`:
19
+ a `ModerationReason` `code` and a `text`); `ReplyPreview.removed_by_moderation`. The WebSocket `delete` event gains
20
+ the optional `removed_by_moderation` and, in the sender's copy, `moderation_reason`.
21
+
22
+ ## 2.1.0-alpha.38
23
+
24
+ - Review by a person: `POST /me/account-status/review` (`AccountReviewRequest`: `text`, 1 to 500 characters) stores a
25
+ request for the moderation team while the status is not `good`; one open request at a time (`409`), at most 3 in
26
+ 30 days (`429`). `AccountStatus` gains `review_requested_at` and `can_request_review`, also in the
27
+ WebSocket event `account_status`.
28
+
29
+ ## 2.1.0-alpha.37
30
+
31
+ - `AccountStatus` gains the optional `decided_by` (`AccountStatusDecidedBy`: `automatic`, `staff`), `reason_code`
32
+ (`ModerationReason`: `spam`, `scam`, `harassment`, `impersonation`, `inappropriate_profile`, `illegal`, `other`) and
33
+ `reason_text` for statuses a person on the moderation team set. `can_appeal` is `false` for those.
34
+ - Reporter outcome notices: `GET /me/report-outcomes` (`ReportOutcomeList` of `ReportOutcome`: `ReportSubjectType`,
35
+ `ReportOutcomeKind`) and `POST /me/report-outcomes/{outcome_id}/read`; the WebSocket event `report_outcome` carries a
36
+ new one to the reporter's own sessions.
37
+
38
+ ## 2.1.0-alpha.36
39
+
40
+ - User reports: `POST /users/{user_id}/report` (`ReportUserRequest`: `ReportReason`, optional `note`, `block`
41
+ default `true`) and `DELETE /users/{user_id}/report`.
42
+ - Automatic account status: `GET /me/account-status` and `POST /me/account-status/appeal` return `AccountStatus`
43
+ (`AccountStatusLevel`, `AccountRestriction`, including `manage_group` for group changes of a suspended
44
+ account); the WebSocket event `account_status` carries it to the user's own sessions.
45
+ - `ErrorCode` gains `account_restricted` (`403`); `Problem.restriction` and the WebSocket `error` event's
46
+ `data.restriction` name the blocked action.
47
+ - `User.account_label` (`AccountLabel`: `restricted`) marks suspended accounts.
48
+
49
+ ## 2.1.0-alpha.35
50
+
51
+ - `PrivacySettings` gains the required `voice_video_messages` (`VoiceVideoPolicy`: `everyone`, `contacts`) and
52
+ `forward_link` (`ForwardLinkPolicy`: `everyone`, `contacts`, `nobody`); `UpdatePrivacySettingsRequest` accepts both.
53
+ `PUT /me/privacy/exceptions/{setting_key}/{effect}` accepts both keys, and `PrivacySettings.exceptions` lists them.
54
+ - A voice message, or a file message with a video, sent, resent or forwarded into a direct chat whose peer does not
55
+ accept it is refused with `403` `forbidden` and the field `voice_video_messages`. The WebSocket `error` event gains
56
+ the optional `field`.
57
+ - `User.can_send_voice_video`, only on `Chat.peer` of a direct chat. When the peer changes `voice_video_messages` or its
58
+ exceptions, a `chat_list_update` brings the new value.
59
+ - `ForwardedFrom.sender_id` is `null` for viewers that the original sender's `forward_link` excludes.
60
+
61
+ ## 2.1.0-alpha.34
62
+
63
+ - Requests folder: `Chat` gains the required `is_request`, `true` when a stranger opened the direct chat and the caller
64
+ has not replied, accepted, pinned or archived it yet. Messages in such a chat send the caller no push.
65
+ - `GET /chats` gains `folder` (`main`, the default, `requests` or `all`). Without it the answer holds only the main list.
66
+ - `POST /chats/{chat_id}/accept` moves a chat out of the Requests folder; `GET /chats/requests/count` answers
67
+ `ChatRequestCount` (`requests_count`).
68
+ - WebSocket: `chat_list_update` also goes out when a chat moves out of the Requests folder.
69
+
70
+ ## 2.1.0-alpha.32
71
+
72
+ - `Attachment` gains `placeholder` (ThumbHash), `processing` (`MediaProcessing`: `queued`, `running`, `done`,
73
+ `failed`), `source_url`, `animation_url`, `panel_url` and `message_url`. `thumbnail_url` is a 480 px WebP for new
74
+ uploads and the cover of an audio file; `tags` (with the new `album`) is set for audio files, not only profile music.
75
+ - `GET /attachments/{attachment_id}/content` gains the variants `source`, `panel`, `message`, `animation`, `inline`,
76
+ `avatar_64`, `avatar_128` and `avatar_256`, and `pt`: it works without a bearer token when `pt` is a playback token.
77
+ Without `variant`, an optimized video or audio file answers with the optimized copy.
78
+ - `POST /attachments/{attachment_id}/playback` returns `PlaybackUrl`, a five-minute URL for media elements.
79
+ - Resumable uploads: `POST /upload-sessions`, `GET`/`DELETE /upload-sessions/{upload_id}`,
80
+ `PUT /upload-sessions/{upload_id}/chunks` and `POST /upload-sessions/{upload_id}/complete`.
81
+ - `GET /users/{user_id}/avatar` gains `size`; `GET /emoji/items/{emoji_id}/image` gains `variant=inline`.
82
+ - WebSocket: `attachment_updated` carries an attachment whose optimized copy is ready or failed.
83
+
84
+ ## 2.1.0-alpha.31
85
+
86
+ - Custom emoji: `CustomEmoji`, `EmojiPack` and the `emoji` tag with `GET`/`POST /emoji/packs`, `GET`/`PATCH`/`DELETE
87
+ /emoji/packs/{pack_id}`, `PUT`/`DELETE /emoji/packs/{pack_id}/installation`, `POST /emoji/packs/{pack_id}/emoji`,
88
+ `PATCH`/`DELETE /emoji/packs/{pack_id}/emoji/{emoji_id}`, `POST /emoji/packs/{pack_id}/report`, `GET /emoji/links/{slug}`,
89
+ `GET /emoji/items/{emoji_id}`, `GET /emoji/items/{emoji_id}/image` and `GET /groups/{chat_id}/emoji` (one set per group, edited by the
90
+ owner and admins).
91
+ - Message text, captions, display names and bios may hold the tokens `<:shortcode:id>` and `<a:shortcode:id>`; the
92
+ server turns tokens the sender may not use into `:shortcode:`. `Reaction.emoji` may be `c:<id>`.
93
+ - `UploadPurpose` gains `emoji`. `UpdateMeRequest.display_name` allows up to 400 characters and `bio` up to 4000 (the
94
+ visible text keeps its limits of 64 and 500, counting each token as its `:shortcode:`).
95
+ ## 2.1.0-alpha.30
96
+
97
+ - Connected accounts (`Connection`, `ConnectionList`, `ConnectionProvider`): `GET /me/connections`,
98
+ `PUT /me/connections/order`, `DELETE /me/connections/{connection_id}` and `GET /users/{user_id}/connections`
99
+ (visible like the bio). At most 15 per user.
100
+ - Providers that sign the user in: `POST /me/connections/{provider}/start` returns a `redirect_url`; the provider
101
+ sends the browser back to `GET /connections/callback/{provider}`, which redirects to the web app with `provider` and
102
+ `result`.
103
+ - Bluesky, Mastodon and websites: `POST /me/connections/{provider}/claim` returns a code to publish,
104
+ `POST /me/connections/{provider}/verify` checks it.
105
+ - `Meta` gains the required `connection_providers`: the providers this server offers.
106
+
107
+ ## 2.1.0-alpha.29
108
+
109
+ - `User` gains the required `pronouns`, `birthday` (`Birthday`: day, month, optional year), `music`
110
+ (`ProfileMusic`) and `background` (`ProfileBackground`: an uploaded image, GIF or short video, a built-in preset or
111
+ one or two colors); all grow `profile_version`. `Me` gains the required `time_zone`.
112
+ - `PATCH /me` accepts `pronouns`, `birthday` and `time_zone`.
113
+ - `PUT`/`DELETE /me/music`, `PUT`/`DELETE /me/background`, `PUT`/`DELETE /groups/{chat_id}/background`.
114
+ `Group` gains the required `background`.
115
+ - `UploadPurpose` gains `profile_music` (cut to at most 30 s with the new `start_ms` and `end_ms`, tags in the new
116
+ `Attachment.tags`) and `profile_background`.
117
+ - `PrivacySettings` gains the required `birthday_visibility`; `birthday_visibility` is a new privacy exception key.
118
+ - `NotificationPreferences` gains the optional `birthday_reminders`.
119
+
120
+ ## 2.1.0-alpha.28
121
+
122
+ - `MediaKind` gains `voice` (voice messages only) and `link` (messages whose text or caption contains a web link) for
123
+ `GET /chats/{chat_id}/media`.
124
+ - `GET /groups/{chat_id}/participants` (`GroupMemberPage`): members page by page, owner first, then admins, moderators
125
+ and members by display name, with an optional `q` filter and the matching `total`.
126
+ - `GET /users/{user_id}/common-groups` (`CommonGroupPage` of `CommonGroup`): the groups the caller shares with the
127
+ user.
128
+
129
+ ## 2.1.0-alpha.27
130
+
131
+ - `User` gains the required `profile_version` (grows with username, display name, bio or avatar changes, not with
132
+ presence) and `StickerPack` the required `version` (grows with title or sticker changes).
133
+ - `GET /me`, `GET /users/{user_id}`, `GET /groups/{chat_id}`, `GET /stickers/packs` and `GET /stickers/packs/{pack_id}`
134
+ send an `ETag` with `Cache-Control: private, no-cache` and answer `304` to a matching `If-None-Match`.
135
+ - `/attachments/{attachment_id}/content` is cached as immutable (an attachment never changes).
136
+ - New server WebSocket event `user_updated` (`user_id`, `profile_version`) for users who share a chat with the user.
137
+
138
+ ## 2.1.0-alpha.26
139
+
140
+ - `DELETE /chats/{chat_id}` takes `scope=me|everyone` (default `everyone`, as before). `me` deletes the direct chat
141
+ only for the caller: it leaves their list, its history so far stays hidden for them, and it comes back with only
142
+ newer messages when one arrives.
143
+ - `POST /chats/{chat_id}/clear` (`ClearHistoryRequest`, `scope: me|everyone`) clears the history up to the newest
144
+ message: for the caller only, or for every member (direct chats: either user; groups: owner and admins, else
145
+ `403`).
146
+ - New server WebSocket event `history_cleared` (`before_message_id`, `scope`, `actor_id`).
147
+
148
+ ## 2.1.0-alpha.25
149
+
150
+ - Archive: `PUT` and `DELETE /chats/{chat_id}/archive` archive a chat for the caller and move it back. `Chat` gains
151
+ the required `is_archived`; `GET /chats?archived=true|false` lists only archived or only other chats (without the
152
+ parameter, every chat as before). Archiving unpins; an archived chat stays archived when new messages arrive;
153
+ pinning a chat unarchives it.
154
+ - Pin order: `Chat` gains the required, nullable `pin_position` (lowest first) and pinned chats are listed in that
155
+ order. A newly pinned chat goes to the top. `PUT /chats/pins/order` (`PinOrderRequest`) sets the order of all
156
+ pinned chats at once.
157
+ - Saved Messages: `POST /chats` accepts the caller's own `user_id` and opens a direct chat whose only member and
158
+ `peer` is the caller.
159
+
160
+ ## 2.1.0-alpha.24
161
+
162
+ - `PrivacySettings` gains the required `last_seen_visibility`, also accepted by `PATCH /me/privacy` and as a
163
+ `setting_key` of `PUT /me/privacy/exceptions/{setting_key}/{effect}`. It decides who sees `User.last_seen` and the
164
+ `last_seen` of `presence` events; `presence_visibility` now decides only `User.is_online` and online `presence`
165
+ events. Existing users start with both settings and their exceptions equal to their old `presence_visibility`.
166
+ - The `action` of the client and server `typing` events gains `choosing_sticker`, `uploading_photo`,
167
+ `uploading_video` and `uploading_file`.
168
+
169
+ ## 2.1.0-alpha.23
170
+
171
+ - `MediaKind` gains `file`: `GET /chats/{chat_id}/media?kind=file` lists messages with file attachments (documents,
172
+ archives and other files that are not images, videos, audio or voice messages), newest first.
173
+ - Rejected sends are kept for the sender: a send refused with `forbidden`, `blocked_by_user`, `rate_limited` or
174
+ `internal_error` is listed by `GET /chats/{chat_id}/unsent` (`UnsentMessage`, oldest first) on all of the sender's
175
+ devices until a send with the same `client_temp_id` succeeds or `DELETE /chats/{chat_id}/unsent/{client_temp_id}`
176
+ discards it.
177
+
178
+ ## 2.1.0-alpha.22
179
+
180
+ - `Chat` gains the required, nullable `first_unread_message_id` (the oldest message the caller has not read, `null`
181
+ when `unread_count` is 0) and `last_read_message_id` (the caller's read marker), also in `chat_created` and
182
+ `chat_list_update`. Clients open a chat around `first_unread_message_id` and show the "new messages" divider there.
183
+ - `q` of `GET /chats/{chat_id}/messages/search` and `GET /search/messages` takes up to 256 characters (was 128).
184
+ - `RegisterRequest.display_name` is optional; a missing, empty or blank display name becomes the username.
185
+
186
+ ## 2.1.0-alpha.21
187
+
188
+ - User sticker packs: `POST /attachments` takes `purpose: sticker` (PNG, JPEG or still WebP up to 5 MB, stored as a
189
+ 512 x 512 WebP of at most 512 KB). `POST /stickers/packs` creates a pack; `PATCH` and `DELETE
190
+ /stickers/packs/{pack_id}` rename and delete it; `POST /stickers/packs/{pack_id}/stickers`, `PATCH` and `DELETE
191
+ /stickers/packs/{pack_id}/stickers/{sticker_id}` and `PUT /stickers/packs/{pack_id}/order` manage its stickers.
192
+ Only the owner may change a pack (`403`). Limits: 50 packs per user and 120 stickers per pack
193
+ (`409 limit_reached`).
194
+ - `GET /stickers/packs?owned=true` lists the packs the user made. `GET /stickers/links/{slug}` opens a pack by its
195
+ share link. A user pack is reachable by its ID (`GET`, add, report, sending its stickers) only for its owner and
196
+ for users who opened its link; `Sticker.pack_slug` carries the link, so receivers of a sticker can open its pack.
197
+ - `StickerPack` gains the required `is_mine` and `is_hidden` and the optional `owner_id` and `slug`.
198
+ - `POST /stickers/packs/{pack_id}/report` reports a pack; after 5 reports it is hidden for everybody but its owner
199
+ and stickers cannot be sent from it.
200
+ - `ErrorCode` gains `limit_reached`.
201
+ - A sticker upload not yet in a pack can be loaded only by its uploader.
202
+
203
+ ## 2.1.0-alpha.20
204
+
205
+ - Stickers: `MessageType` and `SendMessageRequest.type` gain `sticker`. A sticker message is sent with `sticker_id`
206
+ only (no content, attachment or drawings) through `POST /chats/{chat_id}/messages`; the WebSocket `message` event
207
+ does not take stickers. The server sets `content` to the sticker's emoji.
208
+ - `Message.sticker` returns the `Sticker` (id, pack, emoji, `is_animated`, `image`). `Message.attachment` carries
209
+ the same image, so older clients show a sticker as a picture with its emoji as caption.
210
+ - New `stickers` operations: `GET /stickers/packs` (the user's panel), `GET /stickers/packs/{pack_id}` (any pack),
211
+ `PUT` and `DELETE /stickers/packs/{pack_id}/installation` (add or remove a pack) and `GET /stickers/recent` (the
212
+ last 20 stickers the user sent). Built-in default packs are in every panel until the user removes them.
213
+ - Sticker images are attachments any signed-in user can download.
214
+ - The search `type` filter accepts `sticker`.
215
+
216
+ ## 2.1.0-alpha.19
217
+
218
+ - Typing status for voice messages: the WebSocket `typing` event gains `data.action` (`typing` or
219
+ `recording_voice`). It is optional in the client event (default `typing`) and always set in the server event.
220
+ Clients show an unknown value like `typing`.
221
+ - `PrivacySettings` has a required `typing_indicators_enabled` (default `true`) and `UpdatePrivacySettingsRequest`
222
+ an optional one: with `false` the server drops the user's `typing` events, so nobody sees them typing.
223
+
224
+ ## 2.1.0-alpha.18
225
+
226
+ - Drawings on images: `SendMessageRequest.drawings` adds strokes and text labels to images of a `file` message.
227
+ The image file stays unchanged; the drawing is stored with the message.
228
+ - To draw on an image someone else sent, reply to that message with `reply_to`, reuse its image ID in
229
+ `attachment_id` and send a drawing for it.
230
+ - `Attachment.drawing` returns the drawing. Clients show the image with it. Older clients ignore it and show the
231
+ plain image.
232
+
233
+ ## 2.1.0-alpha.17
234
+
235
+ - Media albums: `SendMessageRequest.attachment_ids` sends two to ten image or video uploads as one `file` message
236
+ with one caption. `attachment_id` and `attachment_ids` are mutually exclusive; albums are `file` only.
237
+ - `Message.attachments` lists the album items in order. `Message.attachment` still carries the first item, so
238
+ older clients show the first photo or video.
239
+ - `MediaKind` gains `visual` for `GET /chats/{chat_id}/media`: images and videos together.
240
+
241
+ ## 2.1.0-alpha.16
242
+
243
+ - Trusted-device recovery no longer needs the current password. `DeviceRecoveryApproval.password` is no longer
244
+ required, is deprecated and ignored. New optional `passkey` (`PasskeyVerification`).
245
+ - `POST /auth/recovery-requests/{requestId}/approve/options` (`DeviceRecoveryApprovalOptions`: `method` `passkey`
246
+ with `challenge_id` and `public_key`, or `session` with `approvable_from` while the session is too new).
247
+ - New error codes `user_verification_required` (account has passkeys, no assertion sent) and `session_too_new`
248
+ (no passkeys and the session is younger than the minimum session age), both `403` on the approval.
249
+
250
+ ## 2.1.0-alpha.15
251
+
252
+ - End-to-end encrypted audio calls in direct chats and groups (tag `calls`, see `docs/calls.md` and
253
+ `docs/calls-e2ee.md`). `GET /calls/config` (`CallConfig`: `enabled`, `max_participants`,
254
+ `ring_timeout_seconds`) tells clients whether to show call controls; with `enabled: false` they hide them.
255
+ - `PUT /me/call-identity` (`CallIdentityRequest`, `204`) registers the session's P-256 call identity key
256
+ (`CallIdentityKey`, 87 characters of base64url); a new key raises the epoch of a call the session is in.
257
+ - `GET /calls` (`CallList`) lists the user's calls that are not over; clients load it after every (re)connect.
258
+ `GET /chats/{chat_id}/call` returns the chat's current call, `POST /chats/{chat_id}/call` (`StartCallRequest`
259
+ with a required `client_request_id`, idempotent for 24 hours) starts one (`201`) or returns the running one
260
+ (`200`). `GET /calls/{call_id}` reads a call, ended calls for 90 days.
261
+ - `POST /calls/{call_id}/join` (optional `JoinCallRequest` with `takeover`) answers or joins and returns
262
+ `CallJoin` (`call` and a short-lived `CallGrant`: `url`, `token`, `identity`, `expires_at`);
263
+ `POST /calls/{call_id}/grant` renews the grant for the session that joined. `POST /calls/{call_id}/decline`,
264
+ `/leave` and `/end` answer `204`.
265
+ - `GET /calls/{call_id}/keys` (`CallKeyEnvelopeList`) and `POST /calls/{call_id}/keys` (`SendCallKeysRequest` with
266
+ 1 to 64 `OutgoingCallKeyEnvelope`) relay opaque HPKE envelopes (`CallKeyEnvelope`) for the current epoch.
267
+ - New schemas `Call` (`kind`, `state`, `end_reason`, `epoch`, `version`, `participants`, timestamps),
268
+ `CallState` (`ringing`, `active`, `ended`), `CallEndReason` (`completed`, `missed`, `declined`, `cancelled`,
269
+ `failed`), `CallParticipant` and `CallParticipantState` (`ringing`, `joined`, `declined`, `missed`, `left`).
270
+ - New error codes `calls_unavailable`, `calls_not_allowed`, `call_identity_required`, `call_full`, `call_ended`,
271
+ `already_in_call` and `stale_epoch`. Every call operation except `GET /calls/config` can answer `503`
272
+ (`CallsUnavailable`, with `Retry-After` when calls are only away for a moment). `403 calls_not_allowed` when the
273
+ peer of a direct chat has calls off or one user blocked the other; `409` for `already_in_call`, `call_ended`,
274
+ `call_full` and `stale_epoch`; `422 call_identity_required` when joining without a call identity.
275
+ - New WebSocket events `call_updated` (the whole `Call` to every chat member; keep the highest `version`) and
276
+ `call_keys` (a `CallKeyEnvelopeList` for the recipient session only).
277
+ - `PrivacySettings` has a required `calls_enabled` (default `true`) and `UpdatePrivacySettingsRequest` an optional
278
+ one: with `false` nobody can ring the user.
279
+ - `SystemEventKind` adds `call`: one `system` message per call, posted when it ends, with `actor` the initiator and
280
+ `SystemEvent.call` a `CallSummary` (`call_id`, `kind`, `outcome`, `duration_seconds`).
281
+
282
+ ## 2.1.0-alpha.14
283
+
284
+ - New schema `Location` (`city`, `country_code` (ISO 3166-1 alpha-2), `country` (English name), each nullable): the
285
+ approximate location of a client address from an offline GeoIP database (IP geolocation by DB-IP). Clients
286
+ localise the country name from `country_code`.
287
+ - `Session` (`GET /me/sessions`) and the items of `SecurityEventPage` (`GET /me/security-events`) have a required,
288
+ nullable `location`, captured when the session signed in or refreshed and when the event happened.
289
+ - The `recovery_request` WebSocket event replaces `ip_hint` with a required, nullable `location`. No response or
290
+ event exposes a client IP address or network.
291
+ - Operations that take an optional second-factor `code` answer `401` with `code: two_factor_required` when every
292
+ other credential in the request was valid, the account has two-factor on and no `code` was sent; nothing
293
+ single-use is consumed, so clients ask for the code and repeat the request. Invalid other credentials and a wrong
294
+ `code` keep their errors. Affected: `POST /auth/recover/key`, `POST /auth/password-reset/confirm`,
295
+ `POST /auth/recovery-requests/{requestId}/approve`, `POST /me/recovery-key`, `POST /me/2fa/disable`,
296
+ `POST /auth/passkeys/register/options`, `PUT /me/email` and `DELETE /me/email`. `code` of
297
+ `DisableTwoFactorRequest` is now optional.
298
+ - Sign in with a QR code. A device that is not signed in calls `POST /auth/qr-login` (public, `201`
299
+ `QrLoginStart`: `request_id`, `poll_token`, `url` = `<RECOVERY_WEB_URL>/qr/<request_id>`, `expires_at` after 2
300
+ minutes) and polls `POST /auth/qr-login/{requestId}/poll` with `{ poll_token }` (public, `QrLoginPollResult`:
301
+ `status` `pending`, `scanned`, `denied` or `expired`). A signed-in device opens the link: `GET
302
+ /auth/qr-login/{requestId}` (`QrLoginRequest` with `device`, `location`, `created_at`, `expires_at`) moves the
303
+ request to `scanned` and binds it to that account, then `POST /auth/qr-login/{requestId}/approve` (optional
304
+ `code`, `401 two_factor_required` with two-factor on and no code, `403 forbidden` for an idle or old session) or
305
+ `POST /auth/qr-login/{requestId}/deny` answer `204`. The first poll after approval answers `status: approved`
306
+ plus the `TokenResponse` fields and sets the refresh cookie, exactly once; later polls, a wrong `poll_token` and
307
+ unknown requests answer `expired`. Unknown, expired or used requests answer `404` to the signed-in operations,
308
+ already decided ones `409`.
309
+ - New security event types `qr_login_approved`, `qr_login_denied` (both with the new device's user agent and
310
+ location) and `qr_login` (the new device signed in). The new `security_alert` WebSocket event
311
+ carries informational notices (sign-ins, password, 2FA, passkey and recovery changes, `qr_login_approved`);
312
+ `security_notice` stays limited to `password_reset`, so released clients that sign out on it keep working.
313
+ - `request_id` of the `recovery_request` WebSocket event is now an approval handle that differs from the
314
+ requester's capability. `POST /auth/recovery-requests/{requestId}/approve` and `/deny` take this handle; status
315
+ polling and `/complete` keep taking the requester's capability, so a signed-in device that receives the event can
316
+ no longer poll or complete the request. `DeviceRecoveryApproval` has a new required `password`. Approve and deny
317
+ answer `404` for an unknown, expired or already decided request and `403 forbidden` for an idle or old session.
318
+ - `POST /auth/passkeys/register/verify` answers `400 invalid_request` instead of `401 unauthenticated` for an
319
+ expired or used registration challenge, so clients do not treat it as a lost session.
320
+ - A completed password recovery (key, device approval or email) removes every passkey and, except for an email
321
+ recovery, the recovery email. The `password_reset` security event details gain `passkeys_removed` and
322
+ `recovery_email_removed`.
323
+ - New `POST /auth/recovery-requests/{requestId}/cancel` (public, requester capability, `204` for every
324
+ capability): withdraws a pending device recovery request so it stops counting towards the limit of three.
325
+ - `security_alert` adds `login_2fa` to its types and an optional `session_id`: the session that made the change,
326
+ so clients can skip alerts about their own actions.
327
+ - `POST /auth/password-reset/confirm` answers `404 not_found` for an unknown, expired or used link instead of
328
+ `400 invalid_credentials`, so clients can tell a dead link from a wrong code.
329
+
330
+ ## 2.1.0-alpha.12
331
+
332
+ - `GET /link-preview?url=` returns the Open Graph preview of a public web page (`title`, `description`,
333
+ `site_name`, `image`), cached for a day. `image.url` points to `GET /link-preview/image`, which streams the
334
+ picture through the server (PNG, JPEG, GIF or WebP up to 5 MB) with a signature, so clients never load
335
+ third-party images directly. Only public `http`/`https` addresses on ports 80 and 443 are fetched.
336
+ - Messages have an optional `system_event` (`kind`, `actor_id`, `actor_name`, `target_id`, `target_name`) on
337
+ `system` messages, whose `content` is then `null`. Groups write them when a group is created and when members
338
+ are added, join, are removed or leave. System messages do not count as unread.
339
+ - `GET /groups/{chat_id}/role-log` lists who changed whose role and when, newest first (members only).
340
+ - `GroupRole` and `UpdateRoleRequest` have `moderator` again: moderators may delete other members' messages.
341
+ - In a direct chat either side may delete any message for everyone (`DELETE /messages/{message_id}?scope=everyone`
342
+ and `POST /chats/{chat_id}/messages/delete`).
343
+ - The last message of a chat (`GET /chats`, `GET /chats/{chat_id}`) skips messages deleted for everyone and is the
344
+ newest message that still has content.
345
+
346
+ ## 2.1.0-alpha.11
347
+
348
+ - Attachments have `display_url`: a JPEG of at most 1600 px (`GET /attachments/{attachment_id}/content?variant=display`)
349
+ for showing a large still image in a viewer, much smaller than the original. It is `null` for small images and
350
+ GIFs. Older images get their display copy on the first request.
351
+
352
+ ## 2.1.0-alpha.10
353
+
354
+ - `GET /attachments/{attachment_id}/content` is cached for an hour again (`private, max-age=3600`) instead of a
355
+ year, so a file is not kept in caches long after its message is deleted. Versioned avatar URLs keep the
356
+ year-long cache.
357
+ - `POST /chats/{chat_id}/messages/delete` with `scope` everyone treats messages that are already deleted for
358
+ everyone as done (`204` instead of `404`), so a retry after a partial failure deletes the rest.
359
+ - WebSocket: a connection with more than 64 client events waiting to be handled is closed with `1013`.
360
+ - WebSocket: a user has at most 10 connections per server; opening another closes the oldest with the new close
361
+ code `4429`.
362
+ - `GET /users/{user_id}` and `GET /usernames/{username}` answer `404` for a user whose `search_visibility` hides
363
+ them from the current user, unless the two share a chat, and are rate limited per user (`429`).
364
+ `PUT /users/{user_id}/contact-name` follows the same rules and limit.
365
+ - `contacts` (and `shared_chats`) count a direct chat only once the user opened it or read a message in it, so
366
+ opening an empty chat with someone does not make you their contact. Groups count as before.
367
+
368
+ ## 2.1.0-alpha.9
369
+
370
+ - Privacy exceptions apply to every value of avatar, profile and presence visibility, not only to `*_except`:
371
+ an `allow` exception always shows the item to that user and a `deny` exception always hides it. Group invites
372
+ already worked this way.
373
+ - `direct_messages` and `search_visibility` take exception lists too (`PUT /me/privacy/exceptions/{setting_key}/{effect}`
374
+ and `exceptions` of `PrivacySettings`): `allow` lets the user start a direct chat without approval or find you in
375
+ search, `deny` never does.
376
+
377
+ ## 2.1.0-alpha.8
378
+
379
+ - Adds `POST /chats/{chat_id}/messages/forward` (up to 20 messages to up to 20 chats, at most 20 copies, oldest
380
+ first) and `POST /chats/{chat_id}/messages/delete` (up to 100 messages, `scope` me or everyone). Both check
381
+ every message first and change nothing when one is refused.
382
+
383
+ ## 2.1.0-alpha.7
384
+
385
+ - Adds `DELETE /me/avatars/{avatar_id}`: removes one of your avatars from the history and answers the updated
386
+ `Me`. Deleting the current avatar makes the newest remaining one current again, or the default when none is left.
387
+
388
+ ## 2.1.0-alpha.6
389
+
390
+ - `Message` adds optional `reply_preview` (`ReplyPreview`: id, type, sender, the first 100 characters of the
391
+ text, attachment, is_deleted) on history pages and `message` events, so a reply shows what it answers even
392
+ when that message is not loaded. It is absent when the answered message is gone or hidden for the recipient.
393
+
394
+ ## 2.1.0-alpha.5
395
+
396
+ - A user's `avatar_url` adds `?rev={revision}`, which changes with every new avatar. `GET /users/{user_id}/avatar`
397
+ accepts `rev`; while it matches the current avatar, the answer is `Cache-Control: private, max-age=31536000, immutable`.
398
+ - `GET /attachments/{attachment_id}/content` is cached for a year (`immutable`): an attachment's bytes never change.
399
+
5
400
  ## 2.1.0-alpha.4
6
401
 
7
402
  - Editing a file message accepts an empty `content` (HTTP `PATCH /messages/{message_id}` and the WebSocket `edit`
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.4. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.4";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.40. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.40";
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.4";
1
+ export const API_VERSION = "2.1.0-alpha.40";