@myronsi/messenger-api 2.1.0-alpha.14 → 2.1.0-alpha.15.next.87

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,38 @@
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.15
6
+
7
+ - End-to-end encrypted audio calls in direct chats and groups (tag `calls`, see `docs/calls.md` and
8
+ `docs/calls-e2ee.md`). `GET /calls/config` (`CallConfig`: `enabled`, `max_participants`,
9
+ `ring_timeout_seconds`) tells clients whether to show call controls; with `enabled: false` they hide them.
10
+ - `PUT /me/call-identity` (`CallIdentityRequest`, `204`) registers the session's P-256 call identity key
11
+ (`CallIdentityKey`, 87 characters of base64url); a new key raises the epoch of a call the session is in.
12
+ - `GET /calls` (`CallList`) lists the user's calls that are not over; clients load it after every (re)connect.
13
+ `GET /chats/{chat_id}/call` returns the chat's current call, `POST /chats/{chat_id}/call` (`StartCallRequest`
14
+ with a required `client_request_id`, idempotent for 24 hours) starts one (`201`) or returns the running one
15
+ (`200`). `GET /calls/{call_id}` reads a call, ended calls for 90 days.
16
+ - `POST /calls/{call_id}/join` (optional `JoinCallRequest` with `takeover`) answers or joins and returns
17
+ `CallJoin` (`call` and a short-lived `CallGrant`: `url`, `token`, `identity`, `expires_at`);
18
+ `POST /calls/{call_id}/grant` renews the grant for the session that joined. `POST /calls/{call_id}/decline`,
19
+ `/leave` and `/end` answer `204`.
20
+ - `GET /calls/{call_id}/keys` (`CallKeyEnvelopeList`) and `POST /calls/{call_id}/keys` (`SendCallKeysRequest` with
21
+ 1 to 64 `OutgoingCallKeyEnvelope`) relay opaque HPKE envelopes (`CallKeyEnvelope`) for the current epoch.
22
+ - New schemas `Call` (`kind`, `state`, `end_reason`, `epoch`, `version`, `participants`, timestamps),
23
+ `CallState` (`ringing`, `active`, `ended`), `CallEndReason` (`completed`, `missed`, `declined`, `cancelled`,
24
+ `failed`), `CallParticipant` and `CallParticipantState` (`ringing`, `joined`, `declined`, `missed`, `left`).
25
+ - New error codes `calls_unavailable`, `calls_not_allowed`, `call_identity_required`, `call_full`, `call_ended`,
26
+ `already_in_call` and `stale_epoch`. Every call operation except `GET /calls/config` can answer `503`
27
+ (`CallsUnavailable`, with `Retry-After` when calls are only away for a moment). `403 calls_not_allowed` when the
28
+ peer of a direct chat has calls off or one user blocked the other; `409` for `already_in_call`, `call_ended`,
29
+ `call_full` and `stale_epoch`; `422 call_identity_required` when joining without a call identity.
30
+ - New WebSocket events `call_updated` (the whole `Call` to every chat member; keep the highest `version`) and
31
+ `call_keys` (a `CallKeyEnvelopeList` for the recipient session only).
32
+ - `PrivacySettings` has a required `calls_enabled` (default `true`) and `UpdatePrivacySettingsRequest` an optional
33
+ one: with `false` nobody can ring the user.
34
+ - `SystemEventKind` adds `call`: one `system` message per call, posted when it ends, with `actor` the initiator and
35
+ `SystemEvent.call` a `CallSummary` (`call_id`, `kind`, `outcome`, `duration_seconds`).
36
+
5
37
  ## 2.1.0-alpha.14
6
38
 
7
39
  - New schema `Location` (`city`, `country_code` (ISO 3166-1 alpha-2), `country` (English name), each nullable): the
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from api/openapi.yaml 2.1.0-alpha.14. Do not edit. */
2
- export declare const API_VERSION: "2.1.0-alpha.14";
1
+ /* Generated from api/openapi.yaml 2.1.0-alpha.15. Do not edit. */
2
+ export declare const API_VERSION: "2.1.0-alpha.15";
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.14";
1
+ export const API_VERSION = "2.1.0-alpha.15";