@myronsi/messenger-api 2.1.0-alpha.4 → 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 +395 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +6314 -1063
- package/dist/schema.d.ts +10255 -1863
- package/dist/ws-docs.json +245 -12
- package/dist/ws-events.d.ts +749 -29
- package/dist/ws-events.schema.json +4473 -720
- package/package.json +1 -1
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 | 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\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
|
|
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`, and `data.field` when one setting or field caused it (for example `voice_video_messages`). `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; `delete` with `removed_by_moderation` when moderation removed it (the sender's copy also carries `moderation_reason`) |\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 |\n| `history_cleared` | Messages up to `before_message_id` were cleared for you (`scope: me`) or everyone |\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| `account_status` | Your account status changed (`AccountStatus`); only your own sessions get it |\r\n| `report_outcome` | The moderation team reviewed something you reported (`ReportOutcome`); only your own sessions get it |\r\n| `user_updated` | A user you share a chat with changed their profile (`profile_version`) |\n| `attachment_updated` | An optimized copy of an attachment you can see is ready (or failed): replace it in your messages |\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",
|
|
@@ -66,7 +66,35 @@
|
|
|
66
66
|
"type": "typing",
|
|
67
67
|
"chat_id": "42",
|
|
68
68
|
"data": {
|
|
69
|
-
"is_typing": true
|
|
69
|
+
"is_typing": true,
|
|
70
|
+
"action": "recording_voice"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"server/account_status.json": {
|
|
74
|
+
"type": "account_status",
|
|
75
|
+
"event_id": "7217400317439950011",
|
|
76
|
+
"chat_id": null,
|
|
77
|
+
"data": {
|
|
78
|
+
"status": "restricted",
|
|
79
|
+
"since": "2026-11-18T09:30:00Z",
|
|
80
|
+
"restrictions": [
|
|
81
|
+
"start_direct",
|
|
82
|
+
"invite_to_group",
|
|
83
|
+
"call",
|
|
84
|
+
"create_group",
|
|
85
|
+
"upload",
|
|
86
|
+
"forward",
|
|
87
|
+
"edit_profile",
|
|
88
|
+
"publish_pack",
|
|
89
|
+
"search"
|
|
90
|
+
],
|
|
91
|
+
"can_appeal": false,
|
|
92
|
+
"probation_until": null,
|
|
93
|
+
"decided_by": "staff",
|
|
94
|
+
"reason_code": "spam",
|
|
95
|
+
"reason_text": "Your account sent the same advertising link to many people who did not know you.",
|
|
96
|
+
"review_requested_at": null,
|
|
97
|
+
"can_request_review": true
|
|
70
98
|
}
|
|
71
99
|
},
|
|
72
100
|
"server/ack.json": {
|
|
@@ -94,9 +122,14 @@
|
|
|
94
122
|
"display_name": "Alice",
|
|
95
123
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
96
124
|
"bio": null,
|
|
125
|
+
"pronouns": null,
|
|
126
|
+
"birthday": null,
|
|
127
|
+
"music": null,
|
|
128
|
+
"background": null,
|
|
97
129
|
"is_online": true,
|
|
98
130
|
"last_seen": null,
|
|
99
|
-
"is_deleted": false
|
|
131
|
+
"is_deleted": false,
|
|
132
|
+
"profile_version": 1
|
|
100
133
|
},
|
|
101
134
|
"group_name": null,
|
|
102
135
|
"preview": "Hi, can we talk?",
|
|
@@ -104,6 +137,91 @@
|
|
|
104
137
|
}
|
|
105
138
|
}
|
|
106
139
|
},
|
|
140
|
+
"server/attachment_updated.json": {
|
|
141
|
+
"type": "attachment_updated",
|
|
142
|
+
"event_id": "0",
|
|
143
|
+
"chat_id": null,
|
|
144
|
+
"data": {
|
|
145
|
+
"attachment": {
|
|
146
|
+
"id": "5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e",
|
|
147
|
+
"kind": "video",
|
|
148
|
+
"filename": "clip.mp4",
|
|
149
|
+
"content_type": "video/mp4",
|
|
150
|
+
"size": 6815744,
|
|
151
|
+
"url": "/api/v2/attachments/5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e/content",
|
|
152
|
+
"width": 720,
|
|
153
|
+
"height": 1280,
|
|
154
|
+
"duration_ms": 42000,
|
|
155
|
+
"thumbnail_url": "/api/v2/attachments/5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e/content?variant=thumbnail",
|
|
156
|
+
"processing": "done",
|
|
157
|
+
"source_url": "/api/v2/attachments/5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e/content?variant=source"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"server/call_keys.json": {
|
|
162
|
+
"type": "call_keys",
|
|
163
|
+
"event_id": "7217400317439950111",
|
|
164
|
+
"chat_id": "77",
|
|
165
|
+
"data": {
|
|
166
|
+
"call_id": "7217400317439950100",
|
|
167
|
+
"epoch": 2,
|
|
168
|
+
"items": [
|
|
169
|
+
{
|
|
170
|
+
"epoch": 2,
|
|
171
|
+
"sender_user_id": "1002",
|
|
172
|
+
"sender_session_id": "9c1d2e3f-4a5b-4c6d-8e7f-001122334455",
|
|
173
|
+
"recipient_session_id": "5b0e8f0a-3f1c-4a52-9a8e-0d6e1c3f9b21",
|
|
174
|
+
"enc": "BJCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC",
|
|
175
|
+
"ciphertext": "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"server/call_updated.json": {
|
|
181
|
+
"type": "call_updated",
|
|
182
|
+
"event_id": "7217400317439950110",
|
|
183
|
+
"chat_id": "77",
|
|
184
|
+
"data": {
|
|
185
|
+
"call": {
|
|
186
|
+
"id": "7217400317439950100",
|
|
187
|
+
"chat_id": "77",
|
|
188
|
+
"kind": "group",
|
|
189
|
+
"state": "active",
|
|
190
|
+
"end_reason": null,
|
|
191
|
+
"initiator_id": "1001",
|
|
192
|
+
"created_at": "2026-11-07T12:00:00Z",
|
|
193
|
+
"started_at": "2026-11-07T12:00:05Z",
|
|
194
|
+
"ended_at": null,
|
|
195
|
+
"ring_expires_at": "2026-11-07T12:00:30Z",
|
|
196
|
+
"epoch": 2,
|
|
197
|
+
"version": 4,
|
|
198
|
+
"max_participants": 10,
|
|
199
|
+
"participants": [
|
|
200
|
+
{
|
|
201
|
+
"user_id": "1001",
|
|
202
|
+
"state": "joined",
|
|
203
|
+
"session_id": "5b0e8f0a-3f1c-4a52-9a8e-0d6e1c3f9b21",
|
|
204
|
+
"identity_key": "BAt2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
205
|
+
"joined_at": "2026-11-07T12:00:01Z"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"user_id": "1002",
|
|
209
|
+
"state": "joined",
|
|
210
|
+
"session_id": "9c1d2e3f-4a5b-4c6d-8e7f-001122334455",
|
|
211
|
+
"identity_key": "BHk9BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
|
|
212
|
+
"joined_at": "2026-11-07T12:00:05Z"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"user_id": "1003",
|
|
216
|
+
"state": "ringing",
|
|
217
|
+
"session_id": null,
|
|
218
|
+
"identity_key": null,
|
|
219
|
+
"joined_at": null
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
107
225
|
"server/chat_created.json": {
|
|
108
226
|
"type": "chat_created",
|
|
109
227
|
"event_id": "7217400317439950009",
|
|
@@ -120,12 +238,22 @@
|
|
|
120
238
|
"display_name": "Alice",
|
|
121
239
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
122
240
|
"bio": null,
|
|
241
|
+
"pronouns": null,
|
|
242
|
+
"birthday": null,
|
|
243
|
+
"music": null,
|
|
244
|
+
"background": null,
|
|
123
245
|
"is_online": true,
|
|
124
246
|
"last_seen": null,
|
|
125
|
-
"is_deleted": false
|
|
247
|
+
"is_deleted": false,
|
|
248
|
+
"profile_version": 1
|
|
126
249
|
},
|
|
127
250
|
"is_pinned": false,
|
|
251
|
+
"pin_position": null,
|
|
252
|
+
"is_archived": false,
|
|
253
|
+
"is_request": false,
|
|
128
254
|
"unread_count": 1,
|
|
255
|
+
"first_unread_message_id": "7217400317439950001",
|
|
256
|
+
"last_read_message_id": null,
|
|
129
257
|
"last_message": {
|
|
130
258
|
"id": "7217400317439950001",
|
|
131
259
|
"chat_id": "42",
|
|
@@ -136,9 +264,14 @@
|
|
|
136
264
|
"display_name": "Alice",
|
|
137
265
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
138
266
|
"bio": null,
|
|
267
|
+
"pronouns": null,
|
|
268
|
+
"birthday": null,
|
|
269
|
+
"music": null,
|
|
270
|
+
"background": null,
|
|
139
271
|
"is_online": true,
|
|
140
272
|
"last_seen": null,
|
|
141
|
-
"is_deleted": false
|
|
273
|
+
"is_deleted": false,
|
|
274
|
+
"profile_version": 1
|
|
142
275
|
},
|
|
143
276
|
"content": "Hello!",
|
|
144
277
|
"attachment": null,
|
|
@@ -178,12 +311,22 @@
|
|
|
178
311
|
"display_name": "Alice",
|
|
179
312
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
180
313
|
"bio": null,
|
|
314
|
+
"pronouns": null,
|
|
315
|
+
"birthday": null,
|
|
316
|
+
"music": null,
|
|
317
|
+
"background": null,
|
|
181
318
|
"is_online": true,
|
|
182
319
|
"last_seen": null,
|
|
183
|
-
"is_deleted": false
|
|
320
|
+
"is_deleted": false,
|
|
321
|
+
"profile_version": 1
|
|
184
322
|
},
|
|
185
323
|
"is_pinned": false,
|
|
324
|
+
"pin_position": null,
|
|
325
|
+
"is_archived": false,
|
|
326
|
+
"is_request": false,
|
|
186
327
|
"unread_count": 1,
|
|
328
|
+
"first_unread_message_id": "7217400317439950001",
|
|
329
|
+
"last_read_message_id": null,
|
|
187
330
|
"last_message": {
|
|
188
331
|
"id": "7217400317439950001",
|
|
189
332
|
"chat_id": "42",
|
|
@@ -194,9 +337,14 @@
|
|
|
194
337
|
"display_name": "Alice",
|
|
195
338
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
196
339
|
"bio": null,
|
|
340
|
+
"pronouns": null,
|
|
341
|
+
"birthday": null,
|
|
342
|
+
"music": null,
|
|
343
|
+
"background": null,
|
|
197
344
|
"is_online": true,
|
|
198
345
|
"last_seen": null,
|
|
199
|
-
"is_deleted": false
|
|
346
|
+
"is_deleted": false,
|
|
347
|
+
"profile_version": 1
|
|
200
348
|
},
|
|
201
349
|
"content": "Hello!",
|
|
202
350
|
"attachment": null,
|
|
@@ -238,9 +386,14 @@
|
|
|
238
386
|
"display_name": "Alice",
|
|
239
387
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
240
388
|
"bio": null,
|
|
389
|
+
"pronouns": null,
|
|
390
|
+
"birthday": null,
|
|
391
|
+
"music": null,
|
|
392
|
+
"background": null,
|
|
241
393
|
"is_online": true,
|
|
242
394
|
"last_seen": null,
|
|
243
|
-
"is_deleted": false
|
|
395
|
+
"is_deleted": false,
|
|
396
|
+
"profile_version": 1
|
|
244
397
|
},
|
|
245
398
|
"content": "Hello, world!",
|
|
246
399
|
"attachment": null,
|
|
@@ -275,6 +428,7 @@
|
|
|
275
428
|
"name": "Team",
|
|
276
429
|
"description": null,
|
|
277
430
|
"avatar_url": null,
|
|
431
|
+
"background": null,
|
|
278
432
|
"owner_id": "1001",
|
|
279
433
|
"my_role": "owner",
|
|
280
434
|
"members": [
|
|
@@ -285,9 +439,14 @@
|
|
|
285
439
|
"display_name": "Alice",
|
|
286
440
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
287
441
|
"bio": null,
|
|
442
|
+
"pronouns": null,
|
|
443
|
+
"birthday": null,
|
|
444
|
+
"music": null,
|
|
445
|
+
"background": null,
|
|
288
446
|
"is_online": true,
|
|
289
447
|
"last_seen": null,
|
|
290
|
-
"is_deleted": false
|
|
448
|
+
"is_deleted": false,
|
|
449
|
+
"profile_version": 1
|
|
291
450
|
},
|
|
292
451
|
"role": "owner",
|
|
293
452
|
"joined_at": "2026-10-04T12:00:00Z"
|
|
@@ -307,6 +466,7 @@
|
|
|
307
466
|
"name": "Team",
|
|
308
467
|
"description": null,
|
|
309
468
|
"avatar_url": null,
|
|
469
|
+
"background": null,
|
|
310
470
|
"owner_id": "1001",
|
|
311
471
|
"my_role": "owner",
|
|
312
472
|
"members": [
|
|
@@ -317,9 +477,14 @@
|
|
|
317
477
|
"display_name": "Alice",
|
|
318
478
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
319
479
|
"bio": null,
|
|
480
|
+
"pronouns": null,
|
|
481
|
+
"birthday": null,
|
|
482
|
+
"music": null,
|
|
483
|
+
"background": null,
|
|
320
484
|
"is_online": true,
|
|
321
485
|
"last_seen": null,
|
|
322
|
-
"is_deleted": false
|
|
486
|
+
"is_deleted": false,
|
|
487
|
+
"profile_version": 1
|
|
323
488
|
},
|
|
324
489
|
"role": "owner",
|
|
325
490
|
"joined_at": "2026-10-04T12:00:00Z"
|
|
@@ -339,6 +504,16 @@
|
|
|
339
504
|
"user_id": "1001"
|
|
340
505
|
}
|
|
341
506
|
},
|
|
507
|
+
"server/history_cleared.json": {
|
|
508
|
+
"type": "history_cleared",
|
|
509
|
+
"event_id": "7217400317439950011",
|
|
510
|
+
"chat_id": "42",
|
|
511
|
+
"data": {
|
|
512
|
+
"before_message_id": "7217400317439950002",
|
|
513
|
+
"scope": "everyone",
|
|
514
|
+
"actor_id": "7"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
342
517
|
"server/message.json": {
|
|
343
518
|
"type": "message",
|
|
344
519
|
"event_id": "7217400317439950009",
|
|
@@ -354,9 +529,14 @@
|
|
|
354
529
|
"display_name": "Alice",
|
|
355
530
|
"avatar_url": "/api/v2/users/1001/avatar",
|
|
356
531
|
"bio": null,
|
|
532
|
+
"pronouns": null,
|
|
533
|
+
"birthday": null,
|
|
534
|
+
"music": null,
|
|
535
|
+
"background": null,
|
|
357
536
|
"is_online": true,
|
|
358
537
|
"last_seen": null,
|
|
359
|
-
"is_deleted": false
|
|
538
|
+
"is_deleted": false,
|
|
539
|
+
"profile_version": 1
|
|
360
540
|
},
|
|
361
541
|
"content": "Hello!",
|
|
362
542
|
"attachment": null,
|
|
@@ -415,6 +595,49 @@
|
|
|
415
595
|
"read_at": "2026-10-04T12:00:00Z"
|
|
416
596
|
}
|
|
417
597
|
},
|
|
598
|
+
"server/recovery_request.json": {
|
|
599
|
+
"type": "recovery_request",
|
|
600
|
+
"event_id": "7217400317439950849",
|
|
601
|
+
"chat_id": null,
|
|
602
|
+
"data": {
|
|
603
|
+
"request_id": "z8uFZt0xFYtjm_iO3vI9xFYxsy7xM4K5uM1g1s8YbYI",
|
|
604
|
+
"user_agent": "Chrome on Windows",
|
|
605
|
+
"location": {
|
|
606
|
+
"city": "Berlin",
|
|
607
|
+
"country_code": "DE",
|
|
608
|
+
"country": "Germany"
|
|
609
|
+
},
|
|
610
|
+
"choices": [
|
|
611
|
+
17,
|
|
612
|
+
42,
|
|
613
|
+
85
|
|
614
|
+
],
|
|
615
|
+
"expires_at": "2026-11-05T20:00:00Z"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
"server/report_outcome.json": {
|
|
619
|
+
"type": "report_outcome",
|
|
620
|
+
"event_id": "7217400317439950012",
|
|
621
|
+
"chat_id": null,
|
|
622
|
+
"data": {
|
|
623
|
+
"id": "41",
|
|
624
|
+
"subject_type": "user",
|
|
625
|
+
"subject_id": "7217400317439950848",
|
|
626
|
+
"outcome": "action_taken",
|
|
627
|
+
"created_at": "2026-11-19T10:15:00Z",
|
|
628
|
+
"read": false
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
"server/security_alert.json": {
|
|
632
|
+
"type": "security_alert",
|
|
633
|
+
"event_id": "7217400317439950010",
|
|
634
|
+
"chat_id": null,
|
|
635
|
+
"data": {
|
|
636
|
+
"type": "login",
|
|
637
|
+
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/140.0",
|
|
638
|
+
"created_at": "2026-11-06T12:00:00Z"
|
|
639
|
+
}
|
|
640
|
+
},
|
|
418
641
|
"server/security_notice.json": {
|
|
419
642
|
"type": "security_notice",
|
|
420
643
|
"event_id": "7217400317439950009",
|
|
@@ -429,7 +652,17 @@
|
|
|
429
652
|
"chat_id": "42",
|
|
430
653
|
"data": {
|
|
431
654
|
"user_id": "1002",
|
|
432
|
-
"is_typing": true
|
|
655
|
+
"is_typing": true,
|
|
656
|
+
"action": "recording_voice"
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"server/user_updated.json": {
|
|
660
|
+
"type": "user_updated",
|
|
661
|
+
"event_id": "7217400317439950012",
|
|
662
|
+
"chat_id": null,
|
|
663
|
+
"data": {
|
|
664
|
+
"user_id": "7",
|
|
665
|
+
"profile_version": 3
|
|
433
666
|
}
|
|
434
667
|
}
|
|
435
668
|
}
|