@droponair/sdk-js 0.3.0

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 ADDED
@@ -0,0 +1,65 @@
1
+ # Changelog
2
+
3
+ All notable changes to the DropOnAir JS SDK will be documented in this file.
4
+
5
+ This project follows [Semantic Versioning](https://semver.org/).
6
+
7
+ ---
8
+
9
+ ## [0.3.0], 2026-04-04
10
+
11
+ ### Added
12
+ - **Group messaging (E2EE + cleartext):** Create groups, manage members, and send encrypted or cleartext messages to all group members at once
13
+ - **Group management REST API:** `createGroup()`, `listGroups()`, `getGroupMembers()`, `addGroupMembers()`, `removeGroupMembers()`, `deleteGroup()`
14
+ - **E2EE group send:** `sendGroupMessage()`, sender-side fan-out encrypts per-member per-device using existing X25519 + AES-256-GCM
15
+ - **Cleartext group send:** Send plaintext group messages with zero crypto overhead for public groups
16
+ - **Group message events:** `onGroupMessage()` / `offGroupMessage()` callbacks for inbound group messages
17
+ - **Group voice & video calls:** Mesh WebRTC group calling with signaling over the same encrypted WebSocket
18
+ - **Group call lifecycle:** `startGroupCall()`, `joinGroupCall()`, `leaveGroupCall()`, `endGroupCall()`
19
+ - **Group call signaling:** `sendGroupCallSignal()` for SDP/ICE exchange between mesh peers
20
+ - **Group call events:** `onGroupCallEvent()` / `offGroupCallEvent()` for OFFER, ANSWER, ICE, JOIN, LEAVE, END events
21
+ - **New proto frame types:** `GroupEnvelope`, `GroupMessageNotification`, `GroupAck`, `GroupCallFrame`, `GroupMemberPayload`
22
+ - **Per-plan group limits:** `maxGroupsPerApp`, `maxGroupMembers`, `maxGroupMessagesPerMonth`, `maxGroupCallMinutesPerMonth`, `maxGroupCallParticipants`
23
+ - **New usage types:** `GROUP_MESSAGE`, `GROUP_CALL_MINUTE` with independent billing and quotas
24
+
25
+ ### Changed
26
+ - `PROTOCOL_VERSION` bumped from `1` to `2` (new group proto frame types)
27
+ - Package version bumped from `0.2.0` to `0.3.0`
28
+
29
+ ---
30
+
31
+ ## [0.2.0], 2026-02-28
32
+
33
+ ### Added
34
+ - **SDK versioning infrastructure:** `SDK_VERSION`, `PROTOCOL_VERSION`, and `PAYLOAD_FORMAT_VERSION` exported from `src/version.ts`
35
+ - **Version telemetry:** `X-SDK-Version` header sent on token exchange; `sdkVersion` and `protocolVersion` query params on WebSocket handshake
36
+ - **Server info endpoint:** SDK-BE now exposes `GET /api/info` (no auth) returning `protocolVersion`, `minSdkVersion`, and supported `features`
37
+ - **Multi-device E2EE:** Per-device encrypted payloads (`devicePayloads[]` in Envelope proto), sender encrypts once per recipient device + self-sync to own other devices
38
+ - **Self-sync:** Sent messages are encrypted for the sender's other devices so all devices see the conversation in real time
39
+ - **Legacy fallback:** When recipient has no device keys, SDK falls back to single `encryptedPayload` path for backward compat with older clients
40
+ - **Call signaling:** Full WebRTC call lifecycle (invite → ringing → accept/reject → SDP/ICE relay → end) over the same WebSocket
41
+ - **TURN credentials:** `fetchTurnCredentials()` for NAT traversal
42
+ - **Manual ack support:** `autoAckIncomingMessages` option to defer PROCESSED acks until app decides
43
+ - **Proactive token rotation:** JWT refreshed 90s before expiry to prevent silent failures
44
+ - **iOS background recovery:** Visibility-change handler detects when app returns from background and re-evaluates JWT state
45
+
46
+ ### Changed
47
+ - Package version bumped from `0.1.0` to `0.2.0`
48
+ - Encrypted payload format now imports version constant from `src/version.ts` instead of inline magic number
49
+
50
+ ### Fixed
51
+ - JWT expiry race condition: `sendMessage()` now fails fast with `JWT_EXPIRED` error instead of letting the server reject the frame
52
+
53
+ ---
54
+
55
+ ## [0.1.0], 2026-02-15
56
+
57
+ ### Added
58
+ - Initial SDK release
59
+ - X25519 ECDH key agreement + AES-256-GCM encryption
60
+ - Protobuf binary WebSocket transport
61
+ - IndexedDB secure key storage with in-memory fallback
62
+ - Automatic reconnect with exponential backoff
63
+ - Rate limit detection (LIMIT_REACHED event)
64
+ - Impersonation detection
65
+ - Offline message fetch on reconnect
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 DropOnAir
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.