@myronsi/messenger-api 2.1.0-alpha.3.next.67 → 2.1.0-alpha.4
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 +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +7 -3
- package/dist/schema.d.ts +6 -2
- package/dist/ws-events.d.ts +2 -2
- package/dist/ws-events.schema.json +3 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
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.4
|
|
6
|
+
|
|
7
|
+
- Editing a file message accepts an empty `content` (HTTP `PATCH /messages/{message_id}` and the WebSocket `edit`
|
|
8
|
+
event): it removes the caption. A text message still needs at least one character.
|
|
9
|
+
|
|
5
10
|
## 2.1.0-alpha.3
|
|
6
11
|
|
|
7
12
|
- Adds `GET /notifications/avatar/{token}` and `POST /notifications/read/{token}` without a session, for the
|
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.4. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.1.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.1.0-alpha.
|
|
1
|
+
export const API_VERSION = "2.1.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.1.0-alpha.
|
|
4
|
+
version: 2.1.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
|
|
@@ -1281,7 +1281,8 @@ paths:
|
|
|
1281
1281
|
patch:
|
|
1282
1282
|
tags: [messages]
|
|
1283
1283
|
operationId: editMessage
|
|
1284
|
-
summary: Edit your text message
|
|
1284
|
+
summary: Edit your text message or the caption of your file
|
|
1285
|
+
description: An empty `content` removes the caption of a file message; a text message needs at least one character.
|
|
1285
1286
|
requestBody:
|
|
1286
1287
|
required: true
|
|
1287
1288
|
content:
|
|
@@ -2764,7 +2765,10 @@ components:
|
|
|
2764
2765
|
type: object
|
|
2765
2766
|
required: [content]
|
|
2766
2767
|
properties:
|
|
2767
|
-
content:
|
|
2768
|
+
content:
|
|
2769
|
+
type: string
|
|
2770
|
+
maxLength: 4096
|
|
2771
|
+
description: New text, or the new caption of a file. Empty removes a file's caption; a text message rejects it.
|
|
2768
2772
|
ForwardMessageRequest:
|
|
2769
2773
|
type: object
|
|
2770
2774
|
required: [chat_ids]
|
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.4. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -1029,7 +1029,10 @@ export interface paths {
|
|
|
1029
1029
|
delete: operations["deleteMessage"];
|
|
1030
1030
|
options?: never;
|
|
1031
1031
|
head?: never;
|
|
1032
|
-
/**
|
|
1032
|
+
/**
|
|
1033
|
+
* Edit your text message or the caption of your file
|
|
1034
|
+
* @description An empty `content` removes the caption of a file message; a text message needs at least one character.
|
|
1035
|
+
*/
|
|
1033
1036
|
patch: operations["editMessage"];
|
|
1034
1037
|
trace?: never;
|
|
1035
1038
|
};
|
|
@@ -1876,6 +1879,7 @@ export interface components {
|
|
|
1876
1879
|
reply_to?: components["schemas"]["Id"] | null;
|
|
1877
1880
|
};
|
|
1878
1881
|
EditMessageRequest: {
|
|
1882
|
+
/** @description New text, or the new caption of a file. Empty removes a file's caption; a text message rejects it. */
|
|
1879
1883
|
content: string;
|
|
1880
1884
|
};
|
|
1881
1885
|
ForwardMessageRequest: {
|
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.4. Do not edit. */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Any WebSocket event, in either direction.
|
|
@@ -97,7 +97,7 @@ export interface ClientDeleteEvent {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* Edit your own text message.
|
|
100
|
+
* Edit your own text message or the caption of your file. An empty content removes a file's caption.
|
|
101
101
|
*/
|
|
102
102
|
export interface ClientEditEvent {
|
|
103
103
|
type: "edit";
|
|
@@ -1551,8 +1551,8 @@
|
|
|
1551
1551
|
"properties": {
|
|
1552
1552
|
"content": {
|
|
1553
1553
|
"type": "string",
|
|
1554
|
-
"
|
|
1555
|
-
"
|
|
1554
|
+
"maxLength": 4096,
|
|
1555
|
+
"description": "New text, or the new caption of a file. Empty removes a file's caption; a text message rejects it."
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
1558
|
},
|
|
@@ -1965,7 +1965,7 @@
|
|
|
1965
1965
|
},
|
|
1966
1966
|
"ClientEditEvent": {
|
|
1967
1967
|
"title": "ClientEditEvent",
|
|
1968
|
-
"description": "Edit your own text message.",
|
|
1968
|
+
"description": "Edit your own text message or the caption of your file. An empty content removes a file's caption.",
|
|
1969
1969
|
"type": "object",
|
|
1970
1970
|
"properties": {
|
|
1971
1971
|
"type": {
|
|
@@ -1985,7 +1985,6 @@
|
|
|
1985
1985
|
},
|
|
1986
1986
|
"content": {
|
|
1987
1987
|
"type": "string",
|
|
1988
|
-
"minLength": 1,
|
|
1989
1988
|
"maxLength": 4096
|
|
1990
1989
|
}
|
|
1991
1990
|
},
|
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.4",
|
|
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": {
|