@myronsi/messenger-api 2.1.0-alpha.6.next.71 → 2.1.0-alpha.9

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 CHANGED
@@ -2,6 +2,26 @@
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.9
6
+
7
+ - Privacy exceptions apply to every value of avatar, profile and presence visibility, not only to `*_except`:
8
+ an `allow` exception always shows the item to that user and a `deny` exception always hides it. Group invites
9
+ already worked this way.
10
+ - `direct_messages` and `search_visibility` take exception lists too (`PUT /me/privacy/exceptions/{setting_key}/{effect}`
11
+ and `exceptions` of `PrivacySettings`): `allow` lets the user start a direct chat without approval or find you in
12
+ search, `deny` never does.
13
+
14
+ ## 2.1.0-alpha.8
15
+
16
+ - Adds `POST /chats/{chat_id}/messages/forward` (up to 20 messages to up to 20 chats, at most 20 copies, oldest
17
+ first) and `POST /chats/{chat_id}/messages/delete` (up to 100 messages, `scope` me or everyone). Both check
18
+ every message first and change nothing when one is refused.
19
+
20
+ ## 2.1.0-alpha.7
21
+
22
+ - Adds `DELETE /me/avatars/{avatar_id}`: removes one of your avatars from the history and answers the updated
23
+ `Me`. Deleting the current avatar makes the newest remaining one current again, or the default when none is left.
24
+
5
25
  ## 2.1.0-alpha.6
6
26
 
7
27
  - `Message` adds optional `reply_preview` (`ReplyPreview`: id, type, sender, the first 100 characters of the
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.6. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.6";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.9. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.9";
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.6";
1
+ export const API_VERSION = "2.1.0-alpha.9";
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.6
4
+ version: 2.1.0-alpha.9
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
@@ -444,6 +444,33 @@ paths:
444
444
  "400": { $ref: "#/components/responses/BadRequest" }
445
445
  "401": { $ref: "#/components/responses/Unauthorized" }
446
446
  "404": { $ref: "#/components/responses/NotFound" }
447
+ /me/avatars/{avatar_id}:
448
+ parameters:
449
+ - $ref: "#/components/parameters/ClientVersion"
450
+ - $ref: "#/components/parameters/ClientApiVersion"
451
+ - name: avatar_id
452
+ in: path
453
+ required: true
454
+ description: "`id` of an `AvatarVersion` of the caller."
455
+ schema: { $ref: "#/components/schemas/Id" }
456
+ delete:
457
+ tags: [me]
458
+ operationId: deleteMyAvatar
459
+ summary: Delete one of your avatars
460
+ description: |
461
+ Removes the avatar from your history. When it is the current one, the newest remaining avatar becomes
462
+ current again; without one you get the default avatar. The image is deleted from storage once nothing
463
+ uses it any more.
464
+ responses:
465
+ "426": { $ref: "#/components/responses/ClientOutdated" }
466
+ "200":
467
+ description: Updated user
468
+ content:
469
+ application/json:
470
+ schema: { $ref: "#/components/schemas/Me" }
471
+ "400": { $ref: "#/components/responses/BadRequest" }
472
+ "401": { $ref: "#/components/responses/Unauthorized" }
473
+ "404": { $ref: "#/components/responses/NotFound" }
447
474
  /me/password:
448
475
  parameters:
449
476
  - $ref: "#/components/parameters/ClientVersion"
@@ -670,7 +697,7 @@ paths:
670
697
  required: true
671
698
  schema:
672
699
  type: string
673
- enum: [avatar_visibility, profile_visibility, presence_visibility, group_invites]
700
+ enum: [avatar_visibility, profile_visibility, presence_visibility, group_invites, direct_messages, search_visibility]
674
701
  - name: effect
675
702
  in: path
676
703
  required: true
@@ -1362,6 +1389,69 @@ paths:
1362
1389
  "404": { $ref: "#/components/responses/NotFound" }
1363
1390
  "422": { $ref: "#/components/responses/ValidationFailed" }
1364
1391
  "429": { $ref: "#/components/responses/TooManyRequests" }
1392
+ /chats/{chat_id}/messages/forward:
1393
+ parameters:
1394
+ - $ref: "#/components/parameters/ClientVersion"
1395
+ - $ref: "#/components/parameters/ClientApiVersion"
1396
+ - $ref: "#/components/parameters/ChatId"
1397
+ post:
1398
+ tags: [messages]
1399
+ operationId: forwardMessages
1400
+ summary: Forward several messages of a chat to other chats
1401
+ description: |
1402
+ Copies up to 20 messages of the chat, oldest first, into every target chat, at most 20 copies in all. Every
1403
+ copy counts against the sender's message rate. Every message and target is checked before anything is
1404
+ written, so a refused one forwards nothing.
1405
+ requestBody:
1406
+ required: true
1407
+ content:
1408
+ application/json:
1409
+ schema: { $ref: "#/components/schemas/ForwardMessagesRequest" }
1410
+ responses:
1411
+ "426": { $ref: "#/components/responses/ClientOutdated" }
1412
+ "400": { $ref: "#/components/responses/BadRequest" }
1413
+ "201":
1414
+ description: The new messages, per target chat oldest first
1415
+ content:
1416
+ application/json:
1417
+ schema:
1418
+ type: object
1419
+ required: [items]
1420
+ properties:
1421
+ items:
1422
+ type: array
1423
+ items: { $ref: "#/components/schemas/Message" }
1424
+ "401": { $ref: "#/components/responses/Unauthorized" }
1425
+ "403": { $ref: "#/components/responses/Forbidden" }
1426
+ "404": { $ref: "#/components/responses/NotFound" }
1427
+ "422": { $ref: "#/components/responses/ValidationFailed" }
1428
+ "429": { $ref: "#/components/responses/TooManyRequests" }
1429
+ /chats/{chat_id}/messages/delete:
1430
+ parameters:
1431
+ - $ref: "#/components/parameters/ClientVersion"
1432
+ - $ref: "#/components/parameters/ClientApiVersion"
1433
+ - $ref: "#/components/parameters/ChatId"
1434
+ post:
1435
+ tags: [messages]
1436
+ operationId: deleteMessages
1437
+ summary: Delete several messages of a chat
1438
+ description: |
1439
+ Deletes up to 100 messages of the chat with the rules of `DELETE /messages/{message_id}`. Every message
1440
+ is checked first: when one may not be deleted, none is.
1441
+ requestBody:
1442
+ required: true
1443
+ content:
1444
+ application/json:
1445
+ schema: { $ref: "#/components/schemas/DeleteMessagesRequest" }
1446
+ responses:
1447
+ "426": { $ref: "#/components/responses/ClientOutdated" }
1448
+ "400": { $ref: "#/components/responses/BadRequest" }
1449
+ "204":
1450
+ description: Deleted
1451
+ "401": { $ref: "#/components/responses/Unauthorized" }
1452
+ "403": { $ref: "#/components/responses/Forbidden" }
1453
+ "404": { $ref: "#/components/responses/NotFound" }
1454
+ "422": { $ref: "#/components/responses/ValidationFailed" }
1365
1455
 
1366
1456
  # -------------------------------------------------------------- search
1367
1457
  /search/messages:
@@ -2446,7 +2536,7 @@ components:
2446
2536
  description: A code of the authenticator app, or an unused recovery code.
2447
2537
  Visibility:
2448
2538
  type: string
2449
- description: Who may see the item. `*_except` scopes use the exception lists.
2539
+ description: Who may see the item. The exception lists apply to every value; `*_except` behave like `everyone` and `nobody`.
2450
2540
  enum: [everyone, contacts, everyone_except, nobody_except, nobody]
2451
2541
  DirectMessagePolicy:
2452
2542
  type: string
@@ -2459,7 +2549,7 @@ components:
2459
2549
  enum: [everyone, nobody]
2460
2550
  PrivacyExceptions:
2461
2551
  type: object
2462
- description: User IDs per setting; `allow` applies to `nobody_except`, `deny` to `everyone_except`.
2552
+ description: User IDs per setting. An exception wins over the setting whatever its value; `allow` always lets the user in, `deny` always keeps them out.
2463
2553
  additionalProperties:
2464
2554
  type: object
2465
2555
  required: [allow, deny]
@@ -2810,6 +2900,35 @@ components:
2810
2900
  maxItems: 20
2811
2901
  uniqueItems: true
2812
2902
  items: { $ref: "#/components/schemas/Id" }
2903
+ ForwardMessagesRequest:
2904
+ type: object
2905
+ required: [message_ids, chat_ids]
2906
+ properties:
2907
+ message_ids:
2908
+ type: array
2909
+ minItems: 1
2910
+ maxItems: 20
2911
+ uniqueItems: true
2912
+ items: { $ref: "#/components/schemas/Id" }
2913
+ chat_ids:
2914
+ type: array
2915
+ minItems: 1
2916
+ maxItems: 20
2917
+ uniqueItems: true
2918
+ items: { $ref: "#/components/schemas/Id" }
2919
+ DeleteMessagesRequest:
2920
+ type: object
2921
+ required: [message_ids, scope]
2922
+ properties:
2923
+ message_ids:
2924
+ type: array
2925
+ minItems: 1
2926
+ maxItems: 100
2927
+ uniqueItems: true
2928
+ items: { $ref: "#/components/schemas/Id" }
2929
+ scope:
2930
+ type: string
2931
+ enum: [me, everyone]
2813
2932
  MarkReadRequest:
2814
2933
  type: object
2815
2934
  required: [message_id]
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.6. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.9. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -328,6 +328,36 @@ export interface paths {
328
328
  patch?: never;
329
329
  trace?: never;
330
330
  };
331
+ "/me/avatars/{avatar_id}": {
332
+ parameters: {
333
+ query?: never;
334
+ header?: {
335
+ /** @description Version of the client app, for logs and the per-client metric. */
336
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
337
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
338
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
339
+ };
340
+ path: {
341
+ /** @description `id` of an `AvatarVersion` of the caller. */
342
+ avatar_id: components["schemas"]["Id"];
343
+ };
344
+ cookie?: never;
345
+ };
346
+ get?: never;
347
+ put?: never;
348
+ post?: never;
349
+ /**
350
+ * Delete one of your avatars
351
+ * @description Removes the avatar from your history. When it is the current one, the newest remaining avatar becomes
352
+ * current again; without one you get the default avatar. The image is deleted from storage once nothing
353
+ * uses it any more.
354
+ */
355
+ delete: operations["deleteMyAvatar"];
356
+ options?: never;
357
+ head?: never;
358
+ patch?: never;
359
+ trace?: never;
360
+ };
331
361
  "/me/password": {
332
362
  parameters: {
333
363
  query?: never;
@@ -531,7 +561,7 @@ export interface paths {
531
561
  "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
532
562
  };
533
563
  path: {
534
- setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites";
564
+ setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites" | "direct_messages" | "search_visibility";
535
565
  effect: "allow" | "deny";
536
566
  };
537
567
  cookie?: never;
@@ -1062,6 +1092,63 @@ export interface paths {
1062
1092
  patch?: never;
1063
1093
  trace?: never;
1064
1094
  };
1095
+ "/chats/{chat_id}/messages/forward": {
1096
+ parameters: {
1097
+ query?: never;
1098
+ header?: {
1099
+ /** @description Version of the client app, for logs and the per-client metric. */
1100
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
1101
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
1102
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
1103
+ };
1104
+ path: {
1105
+ chat_id: components["parameters"]["ChatId"];
1106
+ };
1107
+ cookie?: never;
1108
+ };
1109
+ get?: never;
1110
+ put?: never;
1111
+ /**
1112
+ * Forward several messages of a chat to other chats
1113
+ * @description Copies up to 20 messages of the chat, oldest first, into every target chat, at most 20 copies in all. Every
1114
+ * copy counts against the sender's message rate. Every message and target is checked before anything is
1115
+ * written, so a refused one forwards nothing.
1116
+ */
1117
+ post: operations["forwardMessages"];
1118
+ delete?: never;
1119
+ options?: never;
1120
+ head?: never;
1121
+ patch?: never;
1122
+ trace?: never;
1123
+ };
1124
+ "/chats/{chat_id}/messages/delete": {
1125
+ parameters: {
1126
+ query?: never;
1127
+ header?: {
1128
+ /** @description Version of the client app, for logs and the per-client metric. */
1129
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
1130
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
1131
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
1132
+ };
1133
+ path: {
1134
+ chat_id: components["parameters"]["ChatId"];
1135
+ };
1136
+ cookie?: never;
1137
+ };
1138
+ get?: never;
1139
+ put?: never;
1140
+ /**
1141
+ * Delete several messages of a chat
1142
+ * @description Deletes up to 100 messages of the chat with the rules of `DELETE /messages/{message_id}`. Every message
1143
+ * is checked first: when one may not be deleted, none is.
1144
+ */
1145
+ post: operations["deleteMessages"];
1146
+ delete?: never;
1147
+ options?: never;
1148
+ head?: never;
1149
+ patch?: never;
1150
+ trace?: never;
1151
+ };
1065
1152
  "/search/messages": {
1066
1153
  parameters: {
1067
1154
  query?: never;
@@ -1712,7 +1799,7 @@ export interface components {
1712
1799
  code: string;
1713
1800
  };
1714
1801
  /**
1715
- * @description Who may see the item. `*_except` scopes use the exception lists.
1802
+ * @description Who may see the item. The exception lists apply to every value; `*_except` behave like `everyone` and `nobody`.
1716
1803
  * @enum {string}
1717
1804
  */
1718
1805
  Visibility: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody";
@@ -1722,7 +1809,7 @@ export interface components {
1722
1809
  GroupInvitePolicy: "everyone" | "contacts" | "everyone_except" | "nobody_except" | "nobody" | "wait_approval";
1723
1810
  /** @enum {string} */
1724
1811
  SearchVisibility: "everyone" | "nobody";
1725
- /** @description User IDs per setting; `allow` applies to `nobody_except`, `deny` to `everyone_except`. */
1812
+ /** @description User IDs per setting. An exception wins over the setting whatever its value; `allow` always lets the user in, `deny` always keeps them out. */
1726
1813
  PrivacyExceptions: {
1727
1814
  [key: string]: {
1728
1815
  allow: components["schemas"]["Id"][];
@@ -1902,6 +1989,15 @@ export interface components {
1902
1989
  ForwardMessageRequest: {
1903
1990
  chat_ids: components["schemas"]["Id"][];
1904
1991
  };
1992
+ ForwardMessagesRequest: {
1993
+ message_ids: components["schemas"]["Id"][];
1994
+ chat_ids: components["schemas"]["Id"][];
1995
+ };
1996
+ DeleteMessagesRequest: {
1997
+ message_ids: components["schemas"]["Id"][];
1998
+ /** @enum {string} */
1999
+ scope: "me" | "everyone";
2000
+ };
1905
2001
  MarkReadRequest: {
1906
2002
  /** @description Everything up to and including this message is read. */
1907
2003
  message_id: components["schemas"]["Id"];
@@ -2641,6 +2737,38 @@ export interface operations {
2641
2737
  426: components["responses"]["ClientOutdated"];
2642
2738
  };
2643
2739
  };
2740
+ deleteMyAvatar: {
2741
+ parameters: {
2742
+ query?: never;
2743
+ header?: {
2744
+ /** @description Version of the client app, for logs and the per-client metric. */
2745
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
2746
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
2747
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2748
+ };
2749
+ path: {
2750
+ /** @description `id` of an `AvatarVersion` of the caller. */
2751
+ avatar_id: components["schemas"]["Id"];
2752
+ };
2753
+ cookie?: never;
2754
+ };
2755
+ requestBody?: never;
2756
+ responses: {
2757
+ /** @description Updated user */
2758
+ 200: {
2759
+ headers: {
2760
+ [name: string]: unknown;
2761
+ };
2762
+ content: {
2763
+ "application/json": components["schemas"]["Me"];
2764
+ };
2765
+ };
2766
+ 400: components["responses"]["BadRequest"];
2767
+ 401: components["responses"]["Unauthorized"];
2768
+ 404: components["responses"]["NotFound"];
2769
+ 426: components["responses"]["ClientOutdated"];
2770
+ };
2771
+ };
2644
2772
  changePassword: {
2645
2773
  parameters: {
2646
2774
  query?: never;
@@ -2992,7 +3120,7 @@ export interface operations {
2992
3120
  "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
2993
3121
  };
2994
3122
  path: {
2995
- setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites";
3123
+ setting_key: "avatar_visibility" | "profile_visibility" | "presence_visibility" | "group_invites" | "direct_messages" | "search_visibility";
2996
3124
  effect: "allow" | "deny";
2997
3125
  };
2998
3126
  cookie?: never;
@@ -3989,6 +4117,81 @@ export interface operations {
3989
4117
  429: components["responses"]["TooManyRequests"];
3990
4118
  };
3991
4119
  };
4120
+ forwardMessages: {
4121
+ parameters: {
4122
+ query?: never;
4123
+ header?: {
4124
+ /** @description Version of the client app, for logs and the per-client metric. */
4125
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
4126
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
4127
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
4128
+ };
4129
+ path: {
4130
+ chat_id: components["parameters"]["ChatId"];
4131
+ };
4132
+ cookie?: never;
4133
+ };
4134
+ requestBody: {
4135
+ content: {
4136
+ "application/json": components["schemas"]["ForwardMessagesRequest"];
4137
+ };
4138
+ };
4139
+ responses: {
4140
+ /** @description The new messages, per target chat oldest first */
4141
+ 201: {
4142
+ headers: {
4143
+ [name: string]: unknown;
4144
+ };
4145
+ content: {
4146
+ "application/json": {
4147
+ items: components["schemas"]["Message"][];
4148
+ };
4149
+ };
4150
+ };
4151
+ 400: components["responses"]["BadRequest"];
4152
+ 401: components["responses"]["Unauthorized"];
4153
+ 403: components["responses"]["Forbidden"];
4154
+ 404: components["responses"]["NotFound"];
4155
+ 422: components["responses"]["ValidationFailed"];
4156
+ 426: components["responses"]["ClientOutdated"];
4157
+ 429: components["responses"]["TooManyRequests"];
4158
+ };
4159
+ };
4160
+ deleteMessages: {
4161
+ parameters: {
4162
+ query?: never;
4163
+ header?: {
4164
+ /** @description Version of the client app, for logs and the per-client metric. */
4165
+ "X-Client-Version"?: components["parameters"]["ClientVersion"];
4166
+ /** @description Contract version the client was built with (`API_VERSION` of `@myronsi/messenger-api`). A different MAJOR or a version below `min_client_api_version` is answered with `426`; a malformed value with `400` (`invalid_client_version`). */
4167
+ "X-Client-Api-Version"?: components["parameters"]["ClientApiVersion"];
4168
+ };
4169
+ path: {
4170
+ chat_id: components["parameters"]["ChatId"];
4171
+ };
4172
+ cookie?: never;
4173
+ };
4174
+ requestBody: {
4175
+ content: {
4176
+ "application/json": components["schemas"]["DeleteMessagesRequest"];
4177
+ };
4178
+ };
4179
+ responses: {
4180
+ /** @description Deleted */
4181
+ 204: {
4182
+ headers: {
4183
+ [name: string]: unknown;
4184
+ };
4185
+ content?: never;
4186
+ };
4187
+ 400: components["responses"]["BadRequest"];
4188
+ 401: components["responses"]["Unauthorized"];
4189
+ 403: components["responses"]["Forbidden"];
4190
+ 404: components["responses"]["NotFound"];
4191
+ 422: components["responses"]["ValidationFailed"];
4192
+ 426: components["responses"]["ClientOutdated"];
4193
+ };
4194
+ };
3992
4195
  searchAllMessages: {
3993
4196
  parameters: {
3994
4197
  query: {
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.6. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.9. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
@@ -803,7 +803,7 @@
803
803
  },
804
804
  "Visibility": {
805
805
  "type": "string",
806
- "description": "Who may see the item. `*_except` scopes use the exception lists.",
806
+ "description": "Who may see the item. The exception lists apply to every value; `*_except` behave like `everyone` and `nobody`.",
807
807
  "enum": [
808
808
  "everyone",
809
809
  "contacts",
@@ -840,7 +840,7 @@
840
840
  },
841
841
  "PrivacyExceptions": {
842
842
  "type": "object",
843
- "description": "User IDs per setting; `allow` applies to `nobody_except`, `deny` to `everyone_except`.",
843
+ "description": "User IDs per setting. An exception wins over the setting whatever its value; `allow` always lets the user in, `deny` always keeps them out.",
844
844
  "additionalProperties": {
845
845
  "type": "object",
846
846
  "required": [
@@ -1627,6 +1627,58 @@
1627
1627
  }
1628
1628
  }
1629
1629
  },
1630
+ "ForwardMessagesRequest": {
1631
+ "type": "object",
1632
+ "required": [
1633
+ "message_ids",
1634
+ "chat_ids"
1635
+ ],
1636
+ "properties": {
1637
+ "message_ids": {
1638
+ "type": "array",
1639
+ "minItems": 1,
1640
+ "maxItems": 20,
1641
+ "uniqueItems": true,
1642
+ "items": {
1643
+ "$ref": "#/$defs/Id"
1644
+ }
1645
+ },
1646
+ "chat_ids": {
1647
+ "type": "array",
1648
+ "minItems": 1,
1649
+ "maxItems": 20,
1650
+ "uniqueItems": true,
1651
+ "items": {
1652
+ "$ref": "#/$defs/Id"
1653
+ }
1654
+ }
1655
+ }
1656
+ },
1657
+ "DeleteMessagesRequest": {
1658
+ "type": "object",
1659
+ "required": [
1660
+ "message_ids",
1661
+ "scope"
1662
+ ],
1663
+ "properties": {
1664
+ "message_ids": {
1665
+ "type": "array",
1666
+ "minItems": 1,
1667
+ "maxItems": 100,
1668
+ "uniqueItems": true,
1669
+ "items": {
1670
+ "$ref": "#/$defs/Id"
1671
+ }
1672
+ },
1673
+ "scope": {
1674
+ "type": "string",
1675
+ "enum": [
1676
+ "me",
1677
+ "everyone"
1678
+ ]
1679
+ }
1680
+ }
1681
+ },
1630
1682
  "MarkReadRequest": {
1631
1683
  "type": "object",
1632
1684
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.6.next.71",
3
+ "version": "2.1.0-alpha.9",
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": {