@myronsi/messenger-api 2.1.0-alpha.47.next.167 → 2.1.0-alpha.49.next.171

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,19 @@
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.49
6
+
7
+ - Chat imports hold up to 500,000 messages: `ChatImport.message_count` and `StartChatImportRequest.message_count`
8
+ allow up to `500000`.
9
+ - `UploadPurpose` `message` accepts animated WebP (for example WhatsApp stickers in an import) and keeps the
10
+ animation; before, such files got `415`.
11
+
12
+ ## 2.1.0-alpha.48
13
+
14
+ - Video and screen sharing in calls: `CallConfig` (`GET /calls/config`) gains `video_enabled` and
15
+ `screen_share_enabled`. When they are on, the media grant also allows the `camera`, `screen_share` and
16
+ `screen_share_audio` sources; every source is end-to-end encrypted with the same per-epoch sender keys as audio.
17
+
5
18
  ## 2.1.0-alpha.47
6
19
 
7
20
  - New message types `poll`, `contact` and `location` (`MessageType`, `SendMessageRequest.type`, `UnsentMessage.type`),
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.47. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.47";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.49. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.49";
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.47";
1
+ export const API_VERSION = "2.1.0-alpha.49";
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.47
4
+ version: 2.1.0-alpha.49
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
@@ -6124,10 +6124,11 @@ paths:
6124
6124
  get:
6125
6125
  tags: [calls]
6126
6126
  operationId: getCallConfig
6127
- summary: Whether audio calls are available and their limits
6127
+ summary: Whether calls are available and their limits
6128
6128
  description: |
6129
6129
  `enabled` is `false` when the server has no media service configured or calls are switched off; clients then
6130
- hide every call control. Clients must also check that the browser supports call encryption before offering
6130
+ hide every call control. `video_enabled` and `screen_share_enabled` say whether the camera and screen sharing
6131
+ controls are offered; the media grant allows only the sources that are switched on. Clients must also check that the browser supports call encryption before offering
6131
6132
  calls.
6132
6133
  responses:
6133
6134
  "426": { $ref: "#/components/responses/ClientOutdated" }
@@ -7672,6 +7673,9 @@ components:
7672
7673
  UploadPurpose:
7673
7674
  type: string
7674
7675
  description: |
7676
+ `message`: an animated WebP keeps its frames (at most 300); the server removes its metadata and checks every
7677
+ frame. `avatar` and `profile_background` take only still WebP (`415` otherwise).
7678
+
7675
7679
  `sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent
7676
7680
  border and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is
7677
7681
  added to a pack.
@@ -9017,7 +9021,7 @@ components:
9017
9021
  chat_id: { $ref: "#/components/schemas/Id" }
9018
9022
  source: { $ref: "#/components/schemas/ImportSource" }
9019
9023
  state: { $ref: "#/components/schemas/ChatImportState" }
9020
- message_count: { type: integer, minimum: 1, maximum: 100000 }
9024
+ message_count: { type: integer, minimum: 1, maximum: 500000 }
9021
9025
  file_count: { type: integer, minimum: 0, maximum: 5000 }
9022
9026
  first_at: { $ref: "#/components/schemas/Timestamp" }
9023
9027
  last_at: { $ref: "#/components/schemas/Timestamp" }
@@ -9062,7 +9066,7 @@ components:
9062
9066
  required: [source, message_count, file_count, first_at, last_at, senders]
9063
9067
  properties:
9064
9068
  source: { $ref: "#/components/schemas/ImportSource" }
9065
- message_count: { type: integer, minimum: 1, maximum: 100000 }
9069
+ message_count: { type: integer, minimum: 1, maximum: 500000 }
9066
9070
  file_count: { type: integer, minimum: 0, maximum: 5000 }
9067
9071
  first_at: { $ref: "#/components/schemas/Timestamp" }
9068
9072
  last_at: { $ref: "#/components/schemas/Timestamp" }
@@ -9817,9 +9821,20 @@ components:
9817
9821
  # ----------------------------------------------------------- calls
9818
9822
  CallConfig:
9819
9823
  type: object
9820
- required: [enabled, max_participants, ring_timeout_seconds]
9824
+ required: [enabled, video_enabled, screen_share_enabled, max_participants, ring_timeout_seconds]
9821
9825
  properties:
9822
9826
  enabled: { type: boolean }
9827
+ video_enabled:
9828
+ type: boolean
9829
+ description: |
9830
+ Participants may publish their camera. Always `false` while `enabled` is `false`. Clients treat a missing
9831
+ field (older servers) as `false`.
9832
+ screen_share_enabled:
9833
+ type: boolean
9834
+ description: |
9835
+ Participants may share their screen, with its sound where the browser offers it. Several participants may
9836
+ share at the same time. Always `false` while `enabled` is `false`. Clients treat a missing field as
9837
+ `false`.
9823
9838
  max_participants:
9824
9839
  type: integer
9825
9840
  minimum: 2
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.47. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.49. Do not edit. */
2
2
  export interface paths {
3
3
  "/meta": {
4
4
  parameters: {
@@ -4791,9 +4791,10 @@ export interface paths {
4791
4791
  cookie?: never;
4792
4792
  };
4793
4793
  /**
4794
- * Whether audio calls are available and their limits
4794
+ * Whether calls are available and their limits
4795
4795
  * @description `enabled` is `false` when the server has no media service configured or calls are switched off; clients then
4796
- * hide every call control. Clients must also check that the browser supports call encryption before offering
4796
+ * hide every call control. `video_enabled` and `screen_share_enabled` say whether the camera and screen sharing
4797
+ * controls are offered; the media grant allows only the sources that are switched on. Clients must also check that the browser supports call encryption before offering
4797
4798
  * calls.
4798
4799
  */
4799
4800
  get: operations["getCallConfig"];
@@ -5741,7 +5742,10 @@ export interface components {
5741
5742
  /** @enum {string} */
5742
5743
  AttachmentKind: "image" | "audio" | "voice" | "video" | "file";
5743
5744
  /**
5744
- * @description `sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent
5745
+ * @description `message`: an animated WebP keeps its frames (at most 300); the server removes its metadata and checks every
5746
+ * frame. `avatar` and `profile_background` take only still WebP (`415` otherwise).
5747
+ *
5748
+ * `sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent
5745
5749
  * border and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is
5746
5750
  * added to a pack.
5747
5751
  *
@@ -6944,6 +6948,17 @@ export interface components {
6944
6948
  };
6945
6949
  CallConfig: {
6946
6950
  enabled: boolean;
6951
+ /**
6952
+ * @description Participants may publish their camera. Always `false` while `enabled` is `false`. Clients treat a missing
6953
+ * field (older servers) as `false`.
6954
+ */
6955
+ video_enabled: boolean;
6956
+ /**
6957
+ * @description Participants may share their screen, with its sound where the browser offers it. Several participants may
6958
+ * share at the same time. Always `false` while `enabled` is `false`. Clients treat a missing field as
6959
+ * `false`.
6960
+ */
6961
+ screen_share_enabled: boolean;
6947
6962
  /** @description Most sessions joined to one call at the same time. */
6948
6963
  max_participants: number;
6949
6964
  /** @description How long an invitation rings before it counts as missed. */
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.47. Do not edit. */
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.49. Do not edit. */
2
2
 
3
3
  /**
4
4
  * Any WebSocket event, in either direction.
@@ -2003,7 +2003,7 @@
2003
2003
  },
2004
2004
  "UploadPurpose": {
2005
2005
  "type": "string",
2006
- "description": "`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent\nborder and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is\nadded to a pack.\n\nA sticker can also be made from a video (`kind: video`: MP4, WebM or MOV) or an animated GIF of at most 15 MB.\nThe server keeps at most 3 s of it (from `start_ms` to `end_ms`, or the first 3 s), crops it to the square\n`crop_x`, `crop_y`, `crop_size` when given (otherwise it fits the clip into the square with a transparent\nborder), drops the sound and stores a looping animated WebP of at most 512 x 512 px (`413` when it is still\nover 1 MB at the lowest quality). The sticker then has `is_animated: true`.\n\n`profile_music`: an audio file of at most 20 MB. The server keeps at most 30 s of it (from `start_ms` to\n`end_ms`, or the first 30 s), stored as AAC, reads the title and artist into `tags` and the embedded cover\ninto `thumbnail_url`. Use it with `PUT /me/music`.\n\n`profile_background`: an image (10 MB), an animated GIF (15 MB) or a video of at most 15 s (15 MB). Use it\nwith `PUT /me/background` or `PUT /groups/{chat_id}/background`.\n\n`emoji`: a PNG, JPEG, still WebP or GIF of at most 8 MB. The server scales it into 128 x 128 px (a GIF frame\nby frame) and refuses it with `413` when the result is still over 256 KB. Use it with\n`POST /emoji/packs/{pack_id}/emoji`.\n",
2006
+ "description": "`message`: an animated WebP keeps its frames (at most 300); the server removes its metadata and checks every\nframe. `avatar` and `profile_background` take only still WebP (`415` otherwise).\n\n`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent\nborder and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is\nadded to a pack.\n\nA sticker can also be made from a video (`kind: video`: MP4, WebM or MOV) or an animated GIF of at most 15 MB.\nThe server keeps at most 3 s of it (from `start_ms` to `end_ms`, or the first 3 s), crops it to the square\n`crop_x`, `crop_y`, `crop_size` when given (otherwise it fits the clip into the square with a transparent\nborder), drops the sound and stores a looping animated WebP of at most 512 x 512 px (`413` when it is still\nover 1 MB at the lowest quality). The sticker then has `is_animated: true`.\n\n`profile_music`: an audio file of at most 20 MB. The server keeps at most 30 s of it (from `start_ms` to\n`end_ms`, or the first 30 s), stored as AAC, reads the title and artist into `tags` and the embedded cover\ninto `thumbnail_url`. Use it with `PUT /me/music`.\n\n`profile_background`: an image (10 MB), an animated GIF (15 MB) or a video of at most 15 s (15 MB). Use it\nwith `PUT /me/background` or `PUT /groups/{chat_id}/background`.\n\n`emoji`: a PNG, JPEG, still WebP or GIF of at most 8 MB. The server scales it into 128 x 128 px (a GIF frame\nby frame) and refuses it with `413` when the result is still over 256 KB. Use it with\n`POST /emoji/packs/{pack_id}/emoji`.\n",
2007
2007
  "enum": [
2008
2008
  "message",
2009
2009
  "avatar",
@@ -4780,7 +4780,7 @@
4780
4780
  "message_count": {
4781
4781
  "type": "integer",
4782
4782
  "minimum": 1,
4783
- "maximum": 100000
4783
+ "maximum": 500000
4784
4784
  },
4785
4785
  "file_count": {
4786
4786
  "type": "integer",
@@ -4894,7 +4894,7 @@
4894
4894
  "message_count": {
4895
4895
  "type": "integer",
4896
4896
  "minimum": 1,
4897
- "maximum": 100000
4897
+ "maximum": 500000
4898
4898
  },
4899
4899
  "file_count": {
4900
4900
  "type": "integer",
@@ -6411,6 +6411,8 @@
6411
6411
  "type": "object",
6412
6412
  "required": [
6413
6413
  "enabled",
6414
+ "video_enabled",
6415
+ "screen_share_enabled",
6414
6416
  "max_participants",
6415
6417
  "ring_timeout_seconds"
6416
6418
  ],
@@ -6418,6 +6420,14 @@
6418
6420
  "enabled": {
6419
6421
  "type": "boolean"
6420
6422
  },
6423
+ "video_enabled": {
6424
+ "type": "boolean",
6425
+ "description": "Participants may publish their camera. Always `false` while `enabled` is `false`. Clients treat a missing\nfield (older servers) as `false`.\n"
6426
+ },
6427
+ "screen_share_enabled": {
6428
+ "type": "boolean",
6429
+ "description": "Participants may share their screen, with its sound where the browser offers it. Several participants may\nshare at the same time. Always `false` while `enabled` is `false`. Clients treat a missing field as\n`false`.\n"
6430
+ },
6421
6431
  "max_participants": {
6422
6432
  "type": "integer",
6423
6433
  "minimum": 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.1.0-alpha.47.next.167",
3
+ "version": "2.1.0-alpha.49.next.171",
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": {