@myronsi/messenger-api 2.0.0-alpha.5.next.46 → 2.0.0-alpha.6.next.48
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 +8 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +9 -2
- package/dist/schema.d.ts +13 -3
- package/dist/ws-events.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.6
|
|
6
|
+
|
|
7
|
+
Groups, found while implementing them:
|
|
8
|
+
|
|
9
|
+
- `POST /groups` can answer `403`: a member who does not allow invitations from the caller fails the request.
|
|
10
|
+
- `PUT /groups/{chat_id}/avatar` (`422`: not an image the caller uploaded as an avatar) and
|
|
11
|
+
`POST /groups/{chat_id}/transfer-owner` (`422`: to yourself) document their validation errors.
|
|
12
|
+
|
|
5
13
|
## 2.0.0-alpha.5
|
|
6
14
|
|
|
7
15
|
Chats, found while implementing the chat list:
|
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.6. Do not edit. */
|
|
2
|
+
export declare const API_VERSION: "2.0.0-alpha.6";
|
|
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.6";
|
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.6
|
|
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
|
|
@@ -1333,7 +1333,9 @@ paths:
|
|
|
1333
1333
|
tags: [groups]
|
|
1334
1334
|
operationId: createGroup
|
|
1335
1335
|
summary: Create a group
|
|
1336
|
-
description:
|
|
1336
|
+
description: |
|
|
1337
|
+
Members whose `group_invites` setting requires approval get an approval request instead of being added.
|
|
1338
|
+
If any of them does not allow invitations from the caller at all, nothing is created (`403`).
|
|
1337
1339
|
requestBody:
|
|
1338
1340
|
required: true
|
|
1339
1341
|
content:
|
|
@@ -1348,6 +1350,7 @@ paths:
|
|
|
1348
1350
|
schema: { $ref: "#/components/schemas/Group" }
|
|
1349
1351
|
"400": { $ref: "#/components/responses/BadRequest" }
|
|
1350
1352
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1353
|
+
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1351
1354
|
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1352
1355
|
"429": { $ref: "#/components/responses/TooManyRequests" }
|
|
1353
1356
|
/groups/{chat_id}:
|
|
@@ -1411,6 +1414,7 @@ paths:
|
|
|
1411
1414
|
tags: [groups]
|
|
1412
1415
|
operationId: setGroupAvatar
|
|
1413
1416
|
summary: Set the group avatar from an uploaded attachment
|
|
1417
|
+
description: The attachment must be an image the caller uploaded with purpose `avatar` (`422` otherwise).
|
|
1414
1418
|
requestBody:
|
|
1415
1419
|
required: true
|
|
1416
1420
|
content:
|
|
@@ -1427,6 +1431,7 @@ paths:
|
|
|
1427
1431
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1428
1432
|
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1429
1433
|
"404": { $ref: "#/components/responses/NotFound" }
|
|
1434
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1430
1435
|
/groups/{chat_id}/participants:
|
|
1431
1436
|
parameters:
|
|
1432
1437
|
- $ref: "#/components/parameters/ClientVersion"
|
|
@@ -1501,6 +1506,7 @@ paths:
|
|
|
1501
1506
|
tags: [groups]
|
|
1502
1507
|
operationId: transferGroupOwnership
|
|
1503
1508
|
summary: Make another member the owner
|
|
1509
|
+
description: The previous owner becomes an admin. Transferring to yourself is `422`.
|
|
1504
1510
|
requestBody:
|
|
1505
1511
|
required: true
|
|
1506
1512
|
content:
|
|
@@ -1517,6 +1523,7 @@ paths:
|
|
|
1517
1523
|
"401": { $ref: "#/components/responses/Unauthorized" }
|
|
1518
1524
|
"403": { $ref: "#/components/responses/Forbidden" }
|
|
1519
1525
|
"404": { $ref: "#/components/responses/NotFound" }
|
|
1526
|
+
"422": { $ref: "#/components/responses/ValidationFailed" }
|
|
1520
1527
|
/groups/{chat_id}/leave:
|
|
1521
1528
|
parameters:
|
|
1522
1529
|
- $ref: "#/components/parameters/ClientVersion"
|
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.6. Do not edit. */
|
|
2
2
|
export interface paths {
|
|
3
3
|
"/meta": {
|
|
4
4
|
parameters: {
|
|
@@ -1078,6 +1078,7 @@ export interface paths {
|
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Create a group
|
|
1080
1080
|
* @description Members whose `group_invites` setting requires approval get an approval request instead of being added.
|
|
1081
|
+
* If any of them does not allow invitations from the caller at all, nothing is created (`403`).
|
|
1081
1082
|
*/
|
|
1082
1083
|
post: operations["createGroup"];
|
|
1083
1084
|
delete?: never;
|
|
@@ -1127,7 +1128,10 @@ export interface paths {
|
|
|
1127
1128
|
cookie?: never;
|
|
1128
1129
|
};
|
|
1129
1130
|
get?: never;
|
|
1130
|
-
/**
|
|
1131
|
+
/**
|
|
1132
|
+
* Set the group avatar from an uploaded attachment
|
|
1133
|
+
* @description The attachment must be an image the caller uploaded with purpose `avatar` (`422` otherwise).
|
|
1134
|
+
*/
|
|
1131
1135
|
put: operations["setGroupAvatar"];
|
|
1132
1136
|
post?: never;
|
|
1133
1137
|
delete?: never;
|
|
@@ -1202,7 +1206,10 @@ export interface paths {
|
|
|
1202
1206
|
};
|
|
1203
1207
|
get?: never;
|
|
1204
1208
|
put?: never;
|
|
1205
|
-
/**
|
|
1209
|
+
/**
|
|
1210
|
+
* Make another member the owner
|
|
1211
|
+
* @description The previous owner becomes an admin. Transferring to yourself is `422`.
|
|
1212
|
+
*/
|
|
1206
1213
|
post: operations["transferGroupOwnership"];
|
|
1207
1214
|
delete?: never;
|
|
1208
1215
|
options?: never;
|
|
@@ -3622,6 +3629,7 @@ export interface operations {
|
|
|
3622
3629
|
};
|
|
3623
3630
|
400: components["responses"]["BadRequest"];
|
|
3624
3631
|
401: components["responses"]["Unauthorized"];
|
|
3632
|
+
403: components["responses"]["Forbidden"];
|
|
3625
3633
|
422: components["responses"]["ValidationFailed"];
|
|
3626
3634
|
426: components["responses"]["ClientOutdated"];
|
|
3627
3635
|
429: components["responses"]["TooManyRequests"];
|
|
@@ -3758,6 +3766,7 @@ export interface operations {
|
|
|
3758
3766
|
401: components["responses"]["Unauthorized"];
|
|
3759
3767
|
403: components["responses"]["Forbidden"];
|
|
3760
3768
|
404: components["responses"]["NotFound"];
|
|
3769
|
+
422: components["responses"]["ValidationFailed"];
|
|
3761
3770
|
426: components["responses"]["ClientOutdated"];
|
|
3762
3771
|
};
|
|
3763
3772
|
};
|
|
@@ -3900,6 +3909,7 @@ export interface operations {
|
|
|
3900
3909
|
401: components["responses"]["Unauthorized"];
|
|
3901
3910
|
403: components["responses"]["Forbidden"];
|
|
3902
3911
|
404: components["responses"]["NotFound"];
|
|
3912
|
+
422: components["responses"]["ValidationFailed"];
|
|
3903
3913
|
426: components["responses"]["ClientOutdated"];
|
|
3904
3914
|
};
|
|
3905
3915
|
};
|
package/dist/ws-events.d.ts
CHANGED
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.6.next.48",
|
|
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": {
|