@myronsi/messenger-api 2.1.0-alpha.5.next.70 → 2.1.0-alpha.50.next.175

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