@myronsi/messenger-api 2.1.0-alpha.23.next.104 → 2.1.0-alpha.24.next.106
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 +9 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +10 -3
- package/dist/schema.d.ts +7 -3
- package/dist/ws-docs.json +1 -1
- package/dist/ws-events.d.ts +7 -5
- package/dist/ws-events.schema.json +30 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.24
|
|
6
|
+
|
|
7
|
+
- `PrivacySettings` gains the required `last_seen_visibility`, also accepted by `PATCH /me/privacy` and as a
|
|
8
|
+
`setting_key` of `PUT /me/privacy/exceptions/{setting_key}/{effect}`. It decides who sees `User.last_seen` and the
|
|
9
|
+
`last_seen` of `presence` events; `presence_visibility` now decides only `User.is_online` and online `presence`
|
|
10
|
+
events. Existing users start with both settings and their exceptions equal to their old `presence_visibility`.
|
|
11
|
+
- The `action` of the client and server `typing` events gains `choosing_sticker`, `uploading_photo`,
|
|
12
|
+
`uploading_video` and `uploading_file`.
|
|
13
|
+
|
|
5
14
|
## 2.1.0-alpha.23
|
|
6
15
|
|
|
7
16
|
- `MediaKind` gains `file`: `GET /chats/{chat_id}/media?kind=file` lists messages with file attachments (documents,
|
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.24. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.0-alpha.24";
|
|
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.24";
|
package/dist/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: Messenger API
|
|
4
|
-
version: 2.1.0-alpha.
|
|
4
|
+
version: 2.1.0-alpha.24
|
|
5
5
|
summary: REST contract of the Messenger backend (v2).
|
|
6
6
|
description: |
|
|
7
7
|
Contract for the Go backend. The WebSocket protocol is described in `websocket/` and
|
|
@@ -651,7 +651,7 @@ paths:
|
|
|
651
651
|
required: true
|
|
652
652
|
schema:
|
|
653
653
|
type: string
|
|
654
|
-
enum: [avatar_visibility, profile_visibility, presence_visibility, group_invites, direct_messages, search_visibility]
|
|
654
|
+
enum: [avatar_visibility, profile_visibility, presence_visibility, last_seen_visibility, group_invites, direct_messages, search_visibility]
|
|
655
655
|
- name: effect
|
|
656
656
|
in: path
|
|
657
657
|
required: true
|
|
@@ -4736,6 +4736,7 @@ components:
|
|
|
4736
4736
|
- avatar_visibility
|
|
4737
4737
|
- profile_visibility
|
|
4738
4738
|
- presence_visibility
|
|
4739
|
+
- last_seen_visibility
|
|
4739
4740
|
- read_receipts_enabled
|
|
4740
4741
|
- direct_messages
|
|
4741
4742
|
- group_invites
|
|
@@ -4746,7 +4747,12 @@ components:
|
|
|
4746
4747
|
properties:
|
|
4747
4748
|
avatar_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4748
4749
|
profile_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4749
|
-
presence_visibility:
|
|
4750
|
+
presence_visibility:
|
|
4751
|
+
description: Who sees that the user is online now (`User.is_online`, `presence` events).
|
|
4752
|
+
allOf: [{ $ref: "#/components/schemas/Visibility" }]
|
|
4753
|
+
last_seen_visibility:
|
|
4754
|
+
description: Who sees when the user was last online (`User.last_seen`, `presence` events).
|
|
4755
|
+
allOf: [{ $ref: "#/components/schemas/Visibility" }]
|
|
4750
4756
|
read_receipts_enabled: { type: boolean }
|
|
4751
4757
|
direct_messages: { $ref: "#/components/schemas/DirectMessagePolicy" }
|
|
4752
4758
|
group_invites: { $ref: "#/components/schemas/GroupInvitePolicy" }
|
|
@@ -4765,6 +4771,7 @@ components:
|
|
|
4765
4771
|
avatar_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4766
4772
|
profile_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4767
4773
|
presence_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4774
|
+
last_seen_visibility: { $ref: "#/components/schemas/Visibility" }
|
|
4768
4775
|
read_receipts_enabled: { type: boolean }
|
|
4769
4776
|
direct_messages: { $ref: "#/components/schemas/DirectMessagePolicy" }
|
|
4770
4777
|
group_invites: { $ref: "#/components/schemas/GroupInvitePolicy" }
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.1.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.1.0-alpha.24. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -514,7 +514,7 @@ export interface paths {
|
|
|
514
514
|
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
515
515
|
};
|
|
516
516
|
path: {
|
|
517
|
-
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
517
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
518
518
|
effect: "allow" | "deny";
|
|
519
519
|
};
|
|
520
520
|
cookie?: never;
|
|
@@ -3118,7 +3118,10 @@ export interface components {
|
|
|
3118
3118
|
PrivacySettings: {
|
|
3119
3119
|
avatar_visibility: components["schemas"]["Visibility"];
|
|
3120
3120
|
profile_visibility: components["schemas"]["Visibility"];
|
|
3121
|
+
/** @description Who sees that the user is online now (`User.is_online`, `presence` events). */
|
|
3121
3122
|
presence_visibility: components["schemas"]["Visibility"];
|
|
3123
|
+
/** @description Who sees when the user was last online (`User.last_seen`, `presence` events). */
|
|
3124
|
+
last_seen_visibility: components["schemas"]["Visibility"];
|
|
3122
3125
|
read_receipts_enabled: boolean;
|
|
3123
3126
|
direct_messages: components["schemas"]["DirectMessagePolicy"];
|
|
3124
3127
|
group_invites: components["schemas"]["GroupInvitePolicy"];
|
|
@@ -3133,6 +3136,7 @@ export interface components {
|
|
|
3133
3136
|
avatar_visibility?: components["schemas"]["Visibility"];
|
|
3134
3137
|
profile_visibility?: components["schemas"]["Visibility"];
|
|
3135
3138
|
presence_visibility?: components["schemas"]["Visibility"];
|
|
3139
|
+
last_seen_visibility?: components["schemas"]["Visibility"];
|
|
3136
3140
|
read_receipts_enabled?: boolean;
|
|
3137
3141
|
direct_messages?: components["schemas"]["DirectMessagePolicy"];
|
|
3138
3142
|
group_invites?: components["schemas"]["GroupInvitePolicy"];
|
|
@@ -4887,7 +4891,7 @@ export interface operations {
|
|
|
4887
4891
|
"X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
|
|
4888
4892
|
};
|
|
4889
4893
|
path: {
|
|
4890
|
-
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
4894
|
+
setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "last_seen_visibility" | "group_invites" | "direct_messages" | "search_visibility";
|
|
4891
4895
|
effect: "allow" | "deny";
|
|
4892
4896
|
};
|
|
4893
4897
|
cookie?: never;
|
package/dist/ws-docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"markdown": "# WebSocket protocol (API contract v2)\r\n\r\nThe JSON Schemas in `websocket/client/` (client → server) and `websocket/server/` (server → client) are the source of truth. Every event has an example in `websocket/examples/`, validated against its schema by `npm run check`. TypeScript types are generated into `dist/ws-events.d.ts` (`ClientEvent`, `ServerEvent`).\r\n\r\n## Connecting\r\n\r\n1. `POST /api/v2/ws/ticket` (authenticated) returns `{ \"ticket\": \"…\", \"expires_in\": 30 }`. The ticket is single-use and short-lived, so no access token ends up in a URL or a log.\r\n2. Open **one connection per browser tab**: `wss://<host>/api/v2/ws?ticket=<ticket>&api_version=<contract version>`. The connection carries the events of all chats of the user. `api_version` is optional and takes the place of the `X-Client-Api-Version` header, which browsers cannot send on a WebSocket.\r\n3. The first server event is `hello` with `api_version` and `min_client_api_version`. A client that reconnects after a deploy compares them with the contract version it was built for and shows an upgrade notice instead of failing at random.\r\n4. When the ticket is invalid or expired the server closes the connection with code `4401`. A client whose `api_version` is no longer served is closed with `4426` after `hello`.\r\n\r\n## Close codes\r\n\r\n| Code | Meaning | Client |\r\n| --- | --- | --- |\r\n| `1012` | `reconnect`: the server is restarting, or it lost its pub/sub connection and events may be missing | reconnect with backoff, then load what was missed (`after` cursor) |\r\n| `1013` | the client did not keep up with its events, or sent more than 64 events that are not handled yet | reconnect, then catch up |\r\n| `4401` | invalid ticket, or the session ended (logout, revoked, password changed) | get a new ticket; if that fails, sign in again |\r\n| `4426` | the client's contract version is no longer served | show the upgrade notice |\r\n| `4429` | the user opened more than 10 connections on this server; the oldest one is closed | do not reconnect this tab automatically |\r\n\r\n## Envelope\r\n\r\nServer → client:\r\n\r\n```json\r\n{ \"type\": \"message\", \"event_id\": \"7217400317439950849\", \"chat_id\": \"42\", \"data\": { \"message\": { \"…\": \"…\" } } }\r\n```\r\n\r\nClient → server:\r\n\r\n```json\r\n{ \"type\": \"message\", \"client_temp_id\": \"c-1\", \"chat_id\": \"42\", \"data\": { \"type\": \"text\", \"content\": \"Hello!\" } }\r\n```\r\n\r\n- All IDs are strings (Snowflake IDs do not fit into a JavaScript number).\r\n- `event_id` is unique and increases per server; it is only for deduplication and logs.\r\n- `chat_id` is always `null` in `hello`, `presence` and `approval_request_created`, which do not belong to a chat. `ack` and `error` repeat the `chat_id` of the client event they answer, and it is `null` for connection-level errors.\r\n- Unknown event `type`s must be ignored by clients, so new event types are not a breaking change.\r\n- A user who is removed from a chat (or whose chat is deleted) receives `chat_deleted` and no further events of that chat.\r\n\r\n## Acknowledgements\r\n\r\nEvery client event except `typing` (which is not acknowledged and carries no `client_temp_id`) has a `client_temp_id` (1–64 characters, unique per client). The server answers with exactly one of:\r\n\r\n- `ack` — `client_temp_id`, and for `message` the stored `message_id` and `created_at`. Sending the same `client_temp_id` again returns the same `ack` (idempotent), which makes retries after a reconnect safe.\r\n- `error` — `client_temp_id` and `data.code`/`data.message`. `code` is one of the stable codes of `ErrorCode` in `openapi.yaml` (the same codes as the REST `application/problem+json` errors).\r\n\r\nThe sender also receives the broadcast `message` event with the stored message (its `client_temp_id` is included, so the client can replace its pending copy).\r\n\r\n## Client → server events\r\n\r\n| Type | Purpose |\r\n| --- | --- |\r\n| `message` | Send a message (`type` `text`, `file` or `voice`; files are referenced by `attachment_id`, never by URL) |\r\n| `resend` | Deliver a stored but undelivered message again |\r\n| `edit` | Edit your own text message |\r\n| `delete` | Delete a message for yourself (`scope: me`) or everyone |\r\n| `read` | Mark messages as read up to `message_id` |\r\n| `reaction_add`, `reaction_remove` | Add or remove a reaction |\r\n| `typing` | Typing
|
|
2
|
+
"markdown": "# WebSocket protocol (API contract v2)\r\n\r\nThe JSON Schemas in `websocket/client/` (client → server) and `websocket/server/` (server → client) are the source of truth. Every event has an example in `websocket/examples/`, validated against its schema by `npm run check`. TypeScript types are generated into `dist/ws-events.d.ts` (`ClientEvent`, `ServerEvent`).\r\n\r\n## Connecting\r\n\r\n1. `POST /api/v2/ws/ticket` (authenticated) returns `{ \"ticket\": \"…\", \"expires_in\": 30 }`. The ticket is single-use and short-lived, so no access token ends up in a URL or a log.\r\n2. Open **one connection per browser tab**: `wss://<host>/api/v2/ws?ticket=<ticket>&api_version=<contract version>`. The connection carries the events of all chats of the user. `api_version` is optional and takes the place of the `X-Client-Api-Version` header, which browsers cannot send on a WebSocket.\r\n3. The first server event is `hello` with `api_version` and `min_client_api_version`. A client that reconnects after a deploy compares them with the contract version it was built for and shows an upgrade notice instead of failing at random.\r\n4. When the ticket is invalid or expired the server closes the connection with code `4401`. A client whose `api_version` is no longer served is closed with `4426` after `hello`.\r\n\r\n## Close codes\r\n\r\n| Code | Meaning | Client |\r\n| --- | --- | --- |\r\n| `1012` | `reconnect`: the server is restarting, or it lost its pub/sub connection and events may be missing | reconnect with backoff, then load what was missed (`after` cursor) |\r\n| `1013` | the client did not keep up with its events, or sent more than 64 events that are not handled yet | reconnect, then catch up |\r\n| `4401` | invalid ticket, or the session ended (logout, revoked, password changed) | get a new ticket; if that fails, sign in again |\r\n| `4426` | the client's contract version is no longer served | show the upgrade notice |\r\n| `4429` | the user opened more than 10 connections on this server; the oldest one is closed | do not reconnect this tab automatically |\r\n\r\n## Envelope\r\n\r\nServer → client:\r\n\r\n```json\r\n{ \"type\": \"message\", \"event_id\": \"7217400317439950849\", \"chat_id\": \"42\", \"data\": { \"message\": { \"…\": \"…\" } } }\r\n```\r\n\r\nClient → server:\r\n\r\n```json\r\n{ \"type\": \"message\", \"client_temp_id\": \"c-1\", \"chat_id\": \"42\", \"data\": { \"type\": \"text\", \"content\": \"Hello!\" } }\r\n```\r\n\r\n- All IDs are strings (Snowflake IDs do not fit into a JavaScript number).\r\n- `event_id` is unique and increases per server; it is only for deduplication and logs.\r\n- `chat_id` is always `null` in `hello`, `presence` and `approval_request_created`, which do not belong to a chat. `ack` and `error` repeat the `chat_id` of the client event they answer, and it is `null` for connection-level errors.\r\n- Unknown event `type`s must be ignored by clients, so new event types are not a breaking change.\r\n- A user who is removed from a chat (or whose chat is deleted) receives `chat_deleted` and no further events of that chat.\r\n\r\n## Acknowledgements\r\n\r\nEvery client event except `typing` (which is not acknowledged and carries no `client_temp_id`) has a `client_temp_id` (1–64 characters, unique per client). The server answers with exactly one of:\r\n\r\n- `ack` — `client_temp_id`, and for `message` the stored `message_id` and `created_at`. Sending the same `client_temp_id` again returns the same `ack` (idempotent), which makes retries after a reconnect safe.\r\n- `error` — `client_temp_id` and `data.code`/`data.message`. `code` is one of the stable codes of `ErrorCode` in `openapi.yaml` (the same codes as the REST `application/problem+json` errors).\r\n\r\nThe sender also receives the broadcast `message` event with the stored message (its `client_temp_id` is included, so the client can replace its pending copy).\r\n\r\n## Client → server events\r\n\r\n| Type | Purpose |\r\n| --- | --- |\r\n| `message` | Send a message (`type` `text`, `file` or `voice`; files are referenced by `attachment_id`, never by URL) |\r\n| `resend` | Deliver a stored but undelivered message again |\r\n| `edit` | Edit your own text message |\r\n| `delete` | Delete a message for yourself (`scope: me`) or everyone |\r\n| `read` | Mark messages as read up to `message_id` |\r\n| `reaction_add`, `reaction_remove` | Add or remove a reaction |\r\n| `typing` | Typing, recording a voice message, choosing a sticker or sending a photo, video or file (`action`, not acknowledged). Repeat `is_typing: true` every 3 s while it lasts, send `false` when it ends |\r\n\r\n## Server → client events\r\n\r\n| Type | Meaning |\r\n| --- | --- |\r\n| `hello` | First event: `api_version`, `min_client_api_version`, `user_id` |\r\n| `ack`, `error` | Result of a client event, references `client_temp_id` |\r\n| `message`, `edit`, `delete` | Message created, edited or deleted |\r\n| `reaction_add`, `reaction_remove` | Reactions changed |\r\n| `read` | A user read up to `message_id` |\r\n| `typing` | A user is typing, recording a voice message, choosing a sticker or sending a photo, video or file (`action`); hide it after 6 s without a repeat |\r\n| `chat_created`, `chat_deleted`, `chat_list_update` | Chat list changes |\r\n| `group_created`, `group_updated` | Group changes (members, roles, name, avatar) |\r\n| `approval_request_created` | New request in the inbox |\r\n| `presence` | A user came online or went offline |\n| `call_updated` | A call of the chat changed (state, participants, epoch); carries the whole call, keep the highest `version` |\n| `call_keys` | Sealed call sender keys for this session only (`docs/calls-e2ee.md`) |\r\n\r\n## Compatibility\r\n\r\nAdding an event type or an optional field is a MINOR change; removing or renaming an event or field, or making a field required, is MAJOR (see `docs/api-compatibility.md`). Clients must ignore unknown events and unknown fields.\r\n",
|
|
3
3
|
"examples": {
|
|
4
4
|
"client/delete.json": {
|
|
5
5
|
"type": "delete",
|
package/dist/ws-events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.1.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.1.0-alpha.24. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -221,7 +221,7 @@ export interface ClientResendEvent {
|
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Tell the chat that you are (not) typing
|
|
224
|
+
* Tell the chat that you are (not) typing, recording a voice message, choosing a sticker or sending a photo, video or file. Not acknowledged, so it carries no `client_temp_id`. Send `is_typing: true` again every few seconds while it lasts and `false` when it ends; receivers hide it when it is not repeated. Dropped when your `typing_indicators_enabled` privacy setting is off.
|
|
225
225
|
*/
|
|
226
226
|
export interface ClientTypingEvent {
|
|
227
227
|
type: "typing";
|
|
@@ -231,7 +231,8 @@ export interface ClientTypingEvent {
|
|
|
231
231
|
/**
|
|
232
232
|
* What you are doing. Without it, `typing`.
|
|
233
233
|
*/
|
|
234
|
-
action?:
|
|
234
|
+
action?:
|
|
235
|
+
"typing" | "recording_voice" | "choosing_sticker" | "uploading_photo" | "uploading_video" | "uploading_file";
|
|
235
236
|
};
|
|
236
237
|
}
|
|
237
238
|
/**
|
|
@@ -881,7 +882,7 @@ export interface ServerSecurityNoticeEvent {
|
|
|
881
882
|
};
|
|
882
883
|
}
|
|
883
884
|
/**
|
|
884
|
-
* A user started or stopped typing
|
|
885
|
+
* A user started or stopped typing, recording a voice message, choosing a sticker or sending a photo, video or file. Hide it after about 6 seconds without a repeat: the sender may disconnect before it sends `false`.
|
|
885
886
|
*/
|
|
886
887
|
export interface ServerTypingEvent {
|
|
887
888
|
type: "typing";
|
|
@@ -893,6 +894,7 @@ export interface ServerTypingEvent {
|
|
|
893
894
|
/**
|
|
894
895
|
* What the user is doing. New values may be added: show an unknown one like `typing`.
|
|
895
896
|
*/
|
|
896
|
-
action:
|
|
897
|
+
action:
|
|
898
|
+
"typing" | "recording_voice" | "choosing_sticker" | "uploading_photo" | "uploading_video" | "uploading_file";
|
|
897
899
|
};
|
|
898
900
|
}
|
|
@@ -892,6 +892,7 @@
|
|
|
892
892
|
"avatar_visibility",
|
|
893
893
|
"profile_visibility",
|
|
894
894
|
"presence_visibility",
|
|
895
|
+
"last_seen_visibility",
|
|
895
896
|
"read_receipts_enabled",
|
|
896
897
|
"direct_messages",
|
|
897
898
|
"group_invites",
|
|
@@ -908,7 +909,20 @@
|
|
|
908
909
|
"$ref": "#/$defs/Visibility"
|
|
909
910
|
},
|
|
910
911
|
"presence_visibility": {
|
|
911
|
-
"
|
|
912
|
+
"description": "Who sees that the user is online now (`User.is_online`, `presence` events).",
|
|
913
|
+
"allOf": [
|
|
914
|
+
{
|
|
915
|
+
"$ref": "#/$defs/Visibility"
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
},
|
|
919
|
+
"last_seen_visibility": {
|
|
920
|
+
"description": "Who sees when the user was last online (`User.last_seen`, `presence` events).",
|
|
921
|
+
"allOf": [
|
|
922
|
+
{
|
|
923
|
+
"$ref": "#/$defs/Visibility"
|
|
924
|
+
}
|
|
925
|
+
]
|
|
912
926
|
},
|
|
913
927
|
"read_receipts_enabled": {
|
|
914
928
|
"type": "boolean"
|
|
@@ -948,6 +962,9 @@
|
|
|
948
962
|
"presence_visibility": {
|
|
949
963
|
"$ref": "#/$defs/Visibility"
|
|
950
964
|
},
|
|
965
|
+
"last_seen_visibility": {
|
|
966
|
+
"$ref": "#/$defs/Visibility"
|
|
967
|
+
},
|
|
951
968
|
"read_receipts_enabled": {
|
|
952
969
|
"type": "boolean"
|
|
953
970
|
},
|
|
@@ -4193,7 +4210,7 @@
|
|
|
4193
4210
|
},
|
|
4194
4211
|
"ClientTypingEvent": {
|
|
4195
4212
|
"title": "ClientTypingEvent",
|
|
4196
|
-
"description": "Tell the chat that you are (not) typing
|
|
4213
|
+
"description": "Tell the chat that you are (not) typing, recording a voice message, choosing a sticker or sending a photo, video or file. Not acknowledged, so it carries no `client_temp_id`. Send `is_typing: true` again every few seconds while it lasts and `false` when it ends; receivers hide it when it is not repeated. Dropped when your `typing_indicators_enabled` privacy setting is off.",
|
|
4197
4214
|
"type": "object",
|
|
4198
4215
|
"properties": {
|
|
4199
4216
|
"type": {
|
|
@@ -4213,7 +4230,11 @@
|
|
|
4213
4230
|
"type": "string",
|
|
4214
4231
|
"enum": [
|
|
4215
4232
|
"typing",
|
|
4216
|
-
"recording_voice"
|
|
4233
|
+
"recording_voice",
|
|
4234
|
+
"choosing_sticker",
|
|
4235
|
+
"uploading_photo",
|
|
4236
|
+
"uploading_video",
|
|
4237
|
+
"uploading_file"
|
|
4217
4238
|
],
|
|
4218
4239
|
"default": "typing"
|
|
4219
4240
|
}
|
|
@@ -5068,7 +5089,7 @@
|
|
|
5068
5089
|
},
|
|
5069
5090
|
"ServerTypingEvent": {
|
|
5070
5091
|
"title": "ServerTypingEvent",
|
|
5071
|
-
"description": "A user started or stopped typing
|
|
5092
|
+
"description": "A user started or stopped typing, recording a voice message, choosing a sticker or sending a photo, video or file. Hide it after about 6 seconds without a repeat: the sender may disconnect before it sends `false`.",
|
|
5072
5093
|
"type": "object",
|
|
5073
5094
|
"properties": {
|
|
5074
5095
|
"type": {
|
|
@@ -5094,7 +5115,11 @@
|
|
|
5094
5115
|
"type": "string",
|
|
5095
5116
|
"enum": [
|
|
5096
5117
|
"typing",
|
|
5097
|
-
"recording_voice"
|
|
5118
|
+
"recording_voice",
|
|
5119
|
+
"choosing_sticker",
|
|
5120
|
+
"uploading_photo",
|
|
5121
|
+
"uploading_video",
|
|
5122
|
+
"uploading_file"
|
|
5098
5123
|
]
|
|
5099
5124
|
}
|
|
5100
5125
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myronsi/messenger-api",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.24.next.106",
|
|
4
4
|
"description": "API contract of the Messenger backend: OpenAPI document, WebSocket event schemas and generated TypeScript types",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|