@myronsi/messenger-api 2.1.0-alpha.1.next.59 → 2.1.0-alpha.10
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 +65 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +485 -8
- package/dist/schema.d.ts +684 -28
- package/dist/ws-docs.json +1 -1
- package/dist/ws-events.d.ts +21 -3
- package/dist/ws-events.schema.json +253 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,71 @@
|
|
|
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.10
|
|
6
|
+
|
|
7
|
+
- `GET /attachments/{attachment_id}/content` is cached for an hour again (`private, max-age=3600`) instead of a
|
|
8
|
+
year, so a file is not kept in caches long after its message is deleted. Versioned avatar URLs keep the
|
|
9
|
+
year-long cache.
|
|
10
|
+
- `POST /chats/{chat_id}/messages/delete` with `scope` everyone treats messages that are already deleted for
|
|
11
|
+
everyone as done (`204` instead of `404`), so a retry after a partial failure deletes the rest.
|
|
12
|
+
- WebSocket: a connection with more than 64 client events waiting to be handled is closed with `1013`.
|
|
13
|
+
- WebSocket: a user has at most 10 connections per server; opening another closes the oldest with the new close
|
|
14
|
+
code `4429`.
|
|
15
|
+
- `GET /users/{user_id}` and `GET /usernames/{username}` answer `404` for a user whose `search_visibility` hides
|
|
16
|
+
them from the current user, unless the two share a chat, and are rate limited per user (`429`).
|
|
17
|
+
`PUT /users/{user_id}/contact-name` follows the same rules and limit.
|
|
18
|
+
- `contacts` (and `shared_chats`) count a direct chat only once the user opened it or read a message in it, so
|
|
19
|
+
opening an empty chat with someone does not make you their contact. Groups count as before.
|
|
20
|
+
|
|
21
|
+
## 2.1.0-alpha.9
|
|
22
|
+
|
|
23
|
+
- Privacy exceptions apply to every value of avatar, profile and presence visibility, not only to `*_except`:
|
|
24
|
+
an `allow` exception always shows the item to that user and a `deny` exception always hides it. Group invites
|
|
25
|
+
already worked this way.
|
|
26
|
+
- `direct_messages` and `search_visibility` take exception lists too (`PUT /me/privacy/exceptions/{setting_key}/{effect}`
|
|
27
|
+
and `exceptions` of `PrivacySettings`): `allow` lets the user start a direct chat without approval or find you in
|
|
28
|
+
search, `deny` never does.
|
|
29
|
+
|
|
30
|
+
## 2.1.0-alpha.8
|
|
31
|
+
|
|
32
|
+
- Adds `POST /chats/{chat_id}/messages/forward` (up to 20 messages to up to 20 chats, at most 20 copies, oldest
|
|
33
|
+
first) and `POST /chats/{chat_id}/messages/delete` (up to 100 messages, `scope` me or everyone). Both check
|
|
34
|
+
every message first and change nothing when one is refused.
|
|
35
|
+
|
|
36
|
+
## 2.1.0-alpha.7
|
|
37
|
+
|
|
38
|
+
- Adds `DELETE /me/avatars/{avatar_id}`: removes one of your avatars from the history and answers the updated
|
|
39
|
+
`Me`. Deleting the current avatar makes the newest remaining one current again, or the default when none is left.
|
|
40
|
+
|
|
41
|
+
## 2.1.0-alpha.6
|
|
42
|
+
|
|
43
|
+
- `Message` adds optional `reply_preview` (`ReplyPreview`: id, type, sender, the first 100 characters of the
|
|
44
|
+
text, attachment, is_deleted) on history pages and `message` events, so a reply shows what it answers even
|
|
45
|
+
when that message is not loaded. It is absent when the answered message is gone or hidden for the recipient.
|
|
46
|
+
|
|
47
|
+
## 2.1.0-alpha.5
|
|
48
|
+
|
|
49
|
+
- A user's `avatar_url` adds `?rev={revision}`, which changes with every new avatar. `GET /users/{user_id}/avatar`
|
|
50
|
+
accepts `rev`; while it matches the current avatar, the answer is `Cache-Control: private, max-age=31536000, immutable`.
|
|
51
|
+
- `GET /attachments/{attachment_id}/content` is cached for a year (`immutable`): an attachment's bytes never change.
|
|
52
|
+
|
|
53
|
+
## 2.1.0-alpha.4
|
|
54
|
+
|
|
55
|
+
- Editing a file message accepts an empty `content` (HTTP `PATCH /messages/{message_id}` and the WebSocket `edit`
|
|
56
|
+
event): it removes the caption. A text message still needs at least one character.
|
|
57
|
+
|
|
58
|
+
## 2.1.0-alpha.3
|
|
59
|
+
|
|
60
|
+
- Adds `GET /notifications/avatar/{token}` and `POST /notifications/read/{token}` without a session, for the
|
|
61
|
+
sender photo and the "Mark as read" action of a web push. Both answer `404` for a forged, expired or ended token.
|
|
62
|
+
- Web push payloads add `preview`, `read_token` and, with previews on, `sender_id` and `avatar_token`. Tokens are bound to the push
|
|
63
|
+
device and its session.
|
|
64
|
+
|
|
65
|
+
## 2.1.0-alpha.2
|
|
66
|
+
|
|
67
|
+
- Adds notification preferences, session-bound push device registration and per-tab activity leases.
|
|
68
|
+
- Adds chat notification mutes for one hour, eight hours, indefinitely, or until unmuted.
|
|
69
|
+
|
|
5
70
|
## 2.1.0-alpha.1
|
|
6
71
|
|
|
7
72
|
- Registration returns a one-time recovery_key. GET /me adds recovery_setup_required.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.1.0-alpha.
|
|
2
|
-
export declare const API_VERSION: "2.1.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.1.0-alpha.10. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.10";
|
|
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.
|
|
1
|
+
export const API_VERSION = "2.1.0-alpha.10";
|