@myronsi/messenger-api 2.0.0-alpha.2.next.34 → 2.0.0-alpha.4.next.44
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 +16 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +32 -8
- package/dist/schema.d.ts +26 -9
- package/dist/ws-docs.json +1 -1
- package/dist/ws-events.d.ts +7 -3
- package/dist/ws-events.schema.json +13 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.0.0-alpha.4
|
|
6
|
+
|
|
7
|
+
Media, found while implementing uploads:
|
|
8
|
+
|
|
9
|
+
- Attachment IDs are UUIDs (`AttachmentRef`, `format: uuid`) instead of decimal IDs: `Attachment.id`, the `attachment_id` path parameter, `attachment_id` of `SendMessageRequest`, `SetAvatarRequest` and the WebSocket `message` event.
|
|
10
|
+
- `GET /attachments/{attachment_id}/content` takes `variant=thumbnail`, may answer `302` to a signed URL, and documents its `Content-Disposition` rules.
|
|
11
|
+
- `GET /users/{user_id}/avatar` takes `version` (an `AvatarVersion.id`), which `AvatarVersion.url` points to.
|
|
12
|
+
|
|
13
|
+
## 2.0.0-alpha.3
|
|
14
|
+
|
|
15
|
+
WebSocket details found while implementing the gateway (documentation of `websocket.md` only):
|
|
16
|
+
|
|
17
|
+
- Optional `api_version` query parameter on `/api/v2/ws`: browsers cannot send `X-Client-Api-Version` on a WebSocket, so a client passes its contract version here and an outdated one gets `hello` and then close code `4426`.
|
|
18
|
+
- Close codes: `4401` also when the session of the connection ends (logout, revoked session, password change); `1012` "reconnect" also after the server lost its pub/sub connection (events may be missing, so the client catches up); `1013` when the client cannot keep up with its events.
|
|
19
|
+
- A user removed from a chat gets `chat_deleted` and no further events of that chat.
|
|
20
|
+
|
|
5
21
|
## 2.0.0-alpha.2
|
|
6
22
|
|
|
7
23
|
Authentication details found while implementing the Go backend:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.0.0-alpha.
|
|
2
|
-
export declare const API_VERSION: "2.0.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.0.0-alpha.4. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.0.0-alpha.4";
|
|
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.0.0-alpha.
|
|
1
|
+
export const API_VERSION = "2.0.0-alpha.4";
|
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.0.0-alpha.
|
|
4
|
+
version: 2.0.0-alpha.4
|
|
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
|
|
@@ -727,7 +727,14 @@ paths:
|
|
|
727
727
|
tags: [users]
|
|
728
728
|
operationId: getUserAvatar
|
|
729
729
|
summary: Current avatar image
|
|
730
|
-
description:
|
|
730
|
+
description: |
|
|
731
|
+
Respects the avatar visibility of the user; falls back to the default avatar. With `version`, an
|
|
732
|
+
earlier avatar of the history (`AvatarVersion.url`).
|
|
733
|
+
parameters:
|
|
734
|
+
- name: version
|
|
735
|
+
in: query
|
|
736
|
+
description: "`id` of an `AvatarVersion` of this user."
|
|
737
|
+
schema: { $ref: "#/components/schemas/Id" }
|
|
731
738
|
responses:
|
|
732
739
|
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
733
740
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
@@ -843,7 +850,19 @@ paths:
|
|
|
843
850
|
tags: [attachments]
|
|
844
851
|
operationId: getAttachmentContent
|
|
845
852
|
summary: Download an attachment
|
|
846
|
-
description:
|
|
853
|
+
description: |
|
|
854
|
+
Only the uploader and members of a chat in which a message using the attachment is visible to them can
|
|
855
|
+
download it. The answer is the file, or a `302` redirect to a short-lived signed URL of the object
|
|
856
|
+
storage. Images, audio and video are sent `inline`; everything else as a download
|
|
857
|
+
(`Content-Disposition: attachment`, `application/octet-stream`), always with
|
|
858
|
+
`X-Content-Type-Options: nosniff`.
|
|
859
|
+
parameters:
|
|
860
|
+
- name: variant
|
|
861
|
+
in: query
|
|
862
|
+
description: "`thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment)."
|
|
863
|
+
schema:
|
|
864
|
+
type: string
|
|
865
|
+
enum: [thumbnail]
|
|
847
866
|
responses:
|
|
848
867
|
"426": { $ref: "#/components/responses/ClientOutdated" }
|
|
849
868
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
@@ -1558,7 +1577,7 @@ components:
|
|
|
1558
1577
|
name: attachment_id
|
|
1559
1578
|
in: path
|
|
1560
1579
|
required: true
|
|
1561
|
-
schema: { $ref: "#/components/schemas/
|
|
1580
|
+
schema: { $ref: "#/components/schemas/AttachmentRef" }
|
|
1562
1581
|
SessionId:
|
|
1563
1582
|
name: session_id
|
|
1564
1583
|
in: path
|
|
@@ -1641,6 +1660,11 @@ components:
|
|
|
1641
1660
|
pattern: "^[0-9]{1,19}$"
|
|
1642
1661
|
description: Decimal ID as a string (Snowflake IDs exceed 2^53).
|
|
1643
1662
|
examples: ["7217400317439950848"]
|
|
1663
|
+
AttachmentRef:
|
|
1664
|
+
type: string
|
|
1665
|
+
format: uuid
|
|
1666
|
+
description: ID of an uploaded attachment (a UUID, unlike the decimal IDs of messages, users and chats).
|
|
1667
|
+
examples: ["5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e"]
|
|
1644
1668
|
Cursor:
|
|
1645
1669
|
type: [string, "null"]
|
|
1646
1670
|
maxLength: 256
|
|
@@ -1824,7 +1848,7 @@ components:
|
|
|
1824
1848
|
type: object
|
|
1825
1849
|
required: [attachment_id]
|
|
1826
1850
|
properties:
|
|
1827
|
-
attachment_id: { $ref: "#/components/schemas/
|
|
1851
|
+
attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
|
|
1828
1852
|
SecuritySettings:
|
|
1829
1853
|
type: object
|
|
1830
1854
|
required: [session_duration_days, two_factor_enabled]
|
|
@@ -2021,7 +2045,7 @@ components:
|
|
|
2021
2045
|
type: object
|
|
2022
2046
|
required: [id, kind, filename, content_type, size, url]
|
|
2023
2047
|
properties:
|
|
2024
|
-
id: { $ref: "#/components/schemas/
|
|
2048
|
+
id: { $ref: "#/components/schemas/AttachmentRef" }
|
|
2025
2049
|
kind: { $ref: "#/components/schemas/AttachmentKind" }
|
|
2026
2050
|
filename: { type: string }
|
|
2027
2051
|
content_type:
|
|
@@ -2176,7 +2200,7 @@ components:
|
|
|
2176
2200
|
attachment_id:
|
|
2177
2201
|
description: Required and not null for `file` and `voice`; never a URL.
|
|
2178
2202
|
oneOf:
|
|
2179
|
-
- $ref: "#/components/schemas/
|
|
2203
|
+
- $ref: "#/components/schemas/AttachmentRef"
|
|
2180
2204
|
- type: "null"
|
|
2181
2205
|
reply_to:
|
|
2182
2206
|
oneOf:
|
|
@@ -2188,7 +2212,7 @@ components:
|
|
|
2188
2212
|
then:
|
|
2189
2213
|
required: [attachment_id]
|
|
2190
2214
|
properties:
|
|
2191
|
-
attachment_id: { $ref: "#/components/schemas/
|
|
2215
|
+
attachment_id: { $ref: "#/components/schemas/AttachmentRef" }
|
|
2192
2216
|
else:
|
|
2193
2217
|
required: [content]
|
|
2194
2218
|
properties:
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from api/openapi.yaml 2.0.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.0.0-alpha.4. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -613,7 +613,8 @@ export interface paths {
|
|
|
613
613
|
};
|
|
614
614
|
/**
|
|
615
615
|
* Current avatar image
|
|
616
|
-
* @description Respects the avatar visibility of the user; falls back to the default avatar.
|
|
616
|
+
* @description Respects the avatar visibility of the user; falls back to the default avatar. With `version`, an
|
|
617
|
+
* earlier avatar of the history (`AvatarVersion.url`).
|
|
617
618
|
*/
|
|
618
619
|
get: operations["getUserAvatar"];
|
|
619
620
|
put?: never;
|
|
@@ -716,7 +717,11 @@ export interface paths {
|
|
|
716
717
|
};
|
|
717
718
|
/**
|
|
718
719
|
* Download an attachment
|
|
719
|
-
* @description Only
|
|
720
|
+
* @description Only the uploader and members of a chat in which a message using the attachment is visible to them can
|
|
721
|
+
* download it. The answer is the file, or a `302` redirect to a short-lived signed URL of the object
|
|
722
|
+
* storage. Images, audio and video are sent `inline`; everything else as a download
|
|
723
|
+
* (`Content-Disposition: attachment`, `application/octet-stream`), always with
|
|
724
|
+
* `X-Content-Type-Options: nosniff`.
|
|
720
725
|
*/
|
|
721
726
|
get: operations["getAttachmentContent"];
|
|
722
727
|
put?: never;
|
|
@@ -1232,6 +1237,12 @@ export interface components {
|
|
|
1232
1237
|
* @example 7217400317439950848
|
|
1233
1238
|
*/
|
|
1234
1239
|
Id: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Format: uuid
|
|
1242
|
+
* @description ID of an uploaded attachment (a UUID, unlike the decimal IDs of messages, users and chats).
|
|
1243
|
+
* @example 5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e
|
|
1244
|
+
*/
|
|
1245
|
+
AttachmentRef: string;
|
|
1235
1246
|
/** @description Opaque cursor; `null` when there are no more results. */
|
|
1236
1247
|
Cursor: string | null;
|
|
1237
1248
|
/** Format: date-time */
|
|
@@ -1341,7 +1352,7 @@ export interface components {
|
|
|
1341
1352
|
bio?: string | null;
|
|
1342
1353
|
};
|
|
1343
1354
|
SetAvatarRequest: {
|
|
1344
|
-
attachment_id: components["schemas"]["
|
|
1355
|
+
attachment_id: components["schemas"]["AttachmentRef"];
|
|
1345
1356
|
};
|
|
1346
1357
|
SecuritySettings: {
|
|
1347
1358
|
session_duration_days: number;
|
|
@@ -1460,7 +1471,7 @@ export interface components {
|
|
|
1460
1471
|
waveform?: number[];
|
|
1461
1472
|
};
|
|
1462
1473
|
Attachment: {
|
|
1463
|
-
id: components["schemas"]["
|
|
1474
|
+
id: components["schemas"]["AttachmentRef"];
|
|
1464
1475
|
kind: components["schemas"]["AttachmentKind"];
|
|
1465
1476
|
filename: string;
|
|
1466
1477
|
/** @description Detected by the server */
|
|
@@ -1536,7 +1547,7 @@ export interface components {
|
|
|
1536
1547
|
type: "text" | "file" | "voice";
|
|
1537
1548
|
content?: string | null;
|
|
1538
1549
|
/** @description Required and not null for `file` and `voice`; never a URL. */
|
|
1539
|
-
attachment_id?: components["schemas"]["
|
|
1550
|
+
attachment_id?: components["schemas"]["AttachmentRef"] | null;
|
|
1540
1551
|
reply_to?: components["schemas"]["Id"] | null;
|
|
1541
1552
|
};
|
|
1542
1553
|
EditMessageRequest: {
|
|
@@ -1729,7 +1740,7 @@ export interface components {
|
|
|
1729
1740
|
MessageId: components["schemas"]["Id"];
|
|
1730
1741
|
UserId: components["schemas"]["Id"];
|
|
1731
1742
|
RequestId: components["schemas"]["Id"];
|
|
1732
|
-
AttachmentId: components["schemas"]["
|
|
1743
|
+
AttachmentId: components["schemas"]["AttachmentRef"];
|
|
1733
1744
|
SessionId: string;
|
|
1734
1745
|
/** @description Version of the client app, for logs and the per-client metric. */
|
|
1735
1746
|
ClientVersion: string;
|
|
@@ -2715,7 +2726,10 @@ export interface operations {
|
|
|
2715
2726
|
};
|
|
2716
2727
|
getUserAvatar: {
|
|
2717
2728
|
parameters: {
|
|
2718
|
-
query?:
|
|
2729
|
+
query?: {
|
|
2730
|
+
/** @description `id` of an `AvatarVersion` of this user. */
|
|
2731
|
+
version?: components["schemas"]["Id"];
|
|
2732
|
+
};
|
|
2719
2733
|
header?: {
|
|
2720
2734
|
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2721
2735
|
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
|
@@ -2885,7 +2899,10 @@ export interface operations {
|
|
|
2885
2899
|
};
|
|
2886
2900
|
getAttachmentContent: {
|
|
2887
2901
|
parameters: {
|
|
2888
|
-
query?:
|
|
2902
|
+
query?: {
|
|
2903
|
+
/** @description `thumbnail`: a JPEG of at most 320 px (images only; `thumbnail_url` of the attachment). */
|
|
2904
|
+
variant?: "thumbnail";
|
|
2905
|
+
};
|
|
2889
2906
|
header?: {
|
|
2890
2907
|
/** @description Version of the client app, for logs and the per-client metric. */
|
|
2891
2908
|
"X-Client-Version"?: components["parameters"]["ClientVersion"];
|
package/dist/ws-docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"markdown": "# WebSocket protocol (API contract v2)\n\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`).\n\n## Connecting\n\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.\n2. Open **one connection per
|
|
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`. `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 indicator (not acknowledged) |\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 |\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 |\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.0.0-alpha.
|
|
1
|
+
/* Generated from api/openapi.yaml 2.0.0-alpha.4. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -24,6 +24,10 @@ export type ClientTempId = string;
|
|
|
24
24
|
* Decimal ID as a string (Snowflake IDs exceed 2^53).
|
|
25
25
|
*/
|
|
26
26
|
export type Id = string;
|
|
27
|
+
/**
|
|
28
|
+
* ID of an uploaded attachment (a UUID, unlike the decimal IDs of messages, users and chats).
|
|
29
|
+
*/
|
|
30
|
+
export type AttachmentRef = string;
|
|
27
31
|
/**
|
|
28
32
|
* Every event the server may send.
|
|
29
33
|
*/
|
|
@@ -126,7 +130,7 @@ export interface AttachmentMessageData {
|
|
|
126
130
|
* Optional caption
|
|
127
131
|
*/
|
|
128
132
|
content?: string | null;
|
|
129
|
-
attachment_id:
|
|
133
|
+
attachment_id: AttachmentRef;
|
|
130
134
|
reply_to?: Id | null;
|
|
131
135
|
}
|
|
132
136
|
/**
|
|
@@ -311,7 +315,7 @@ export interface Message {
|
|
|
311
315
|
client_temp_id?: ClientTempId;
|
|
312
316
|
}
|
|
313
317
|
export interface Attachment {
|
|
314
|
-
id:
|
|
318
|
+
id: AttachmentRef;
|
|
315
319
|
kind: AttachmentKind;
|
|
316
320
|
filename: string;
|
|
317
321
|
/**
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
"7217400317439950848"
|
|
10
10
|
]
|
|
11
11
|
},
|
|
12
|
+
"AttachmentRef": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "uuid",
|
|
15
|
+
"description": "ID of an uploaded attachment (a UUID, unlike the decimal IDs of messages, users and chats).",
|
|
16
|
+
"examples": [
|
|
17
|
+
"5f0c8a64-2f2b-4c7e-9d0e-6b1f3a2c4d5e"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
12
20
|
"Cursor": {
|
|
13
21
|
"type": [
|
|
14
22
|
"string",
|
|
@@ -407,7 +415,7 @@
|
|
|
407
415
|
],
|
|
408
416
|
"properties": {
|
|
409
417
|
"attachment_id": {
|
|
410
|
-
"$ref": "#/$defs/
|
|
418
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
411
419
|
}
|
|
412
420
|
}
|
|
413
421
|
},
|
|
@@ -871,7 +879,7 @@
|
|
|
871
879
|
],
|
|
872
880
|
"properties": {
|
|
873
881
|
"id": {
|
|
874
|
-
"$ref": "#/$defs/
|
|
882
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
875
883
|
},
|
|
876
884
|
"kind": {
|
|
877
885
|
"$ref": "#/$defs/AttachmentKind"
|
|
@@ -1221,7 +1229,7 @@
|
|
|
1221
1229
|
"description": "Required and not null for `file` and `voice`; never a URL.",
|
|
1222
1230
|
"oneOf": [
|
|
1223
1231
|
{
|
|
1224
|
-
"$ref": "#/$defs/
|
|
1232
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1225
1233
|
},
|
|
1226
1234
|
{
|
|
1227
1235
|
"type": "null"
|
|
@@ -1255,7 +1263,7 @@
|
|
|
1255
1263
|
],
|
|
1256
1264
|
"properties": {
|
|
1257
1265
|
"attachment_id": {
|
|
1258
|
-
"$ref": "#/$defs/
|
|
1266
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1259
1267
|
}
|
|
1260
1268
|
}
|
|
1261
1269
|
},
|
|
@@ -1801,7 +1809,7 @@
|
|
|
1801
1809
|
"description": "Optional caption"
|
|
1802
1810
|
},
|
|
1803
1811
|
"attachment_id": {
|
|
1804
|
-
"$ref": "#/$defs/
|
|
1812
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1805
1813
|
},
|
|
1806
1814
|
"reply_to": {
|
|
1807
1815
|
"oneOf": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myronsi/messenger-api",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4.next.44",
|
|
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": {
|