@droponair/sdk-js 0.9.0 → 0.9.1

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
@@ -6,6 +6,14 @@ This project follows [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [0.9.1], 2026-05-19
10
+
11
+ ### Fixed
12
+
13
+ - **`registerPushToken` / `unregisterPushToken` now exposed on the public `DropOnAirClient` type.** In 0.9.0 the methods were implemented on the `MessagingClient` class but missing from the exported `DropOnAirClient` interface, so TypeScript consumers couldn't call them through the `initialize()` return value. No wire-format change; this is a pure type-surface fix.
14
+
15
+ ---
16
+
9
17
  ## [0.9.0], 2026-05-19
10
18
 
11
19
  ### Added
@@ -170,6 +170,23 @@ export interface DropOnAirClient {
170
170
  onMessageEdit(callback: MessageEditCallback): () => void;
171
171
  /** Register a listener for incoming message-delete notifications. */
172
172
  onMessageDelete(callback: MessageDeleteCallback): () => void;
173
+ /**
174
+ * Register this device's push notification token. The platform delivers a
175
+ * push via APNs / FCM / Web Push when a sender attaches a pushPayload to
176
+ * a message and the recipient has no live WebSocket session. The token is
177
+ * opaque to the server. For iOS PushKit/CallKit, pass {@code voipToken}
178
+ * alongside the regular APNs token so incoming call invites wake the app
179
+ * via the VoIP push channel.
180
+ */
181
+ registerPushToken(opts: {
182
+ platform: 'APNS' | 'FCM' | 'WEB_PUSH';
183
+ token: string;
184
+ voipToken?: string;
185
+ }): Promise<void>;
186
+ /** Unregister this device's push notification token (e.g. on logout). */
187
+ unregisterPushToken(opts: {
188
+ platform: 'APNS' | 'FCM' | 'WEB_PUSH';
189
+ }): Promise<void>;
173
190
  /**
174
191
  * Convenience: encrypts (E2EE), uploads to the customer's bucket, finalizes,
175
192
  * and returns an AttachmentRef ready to pass into {@link sendMessage}.
package/dist/version.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
8
8
  * PATCH, bug-fix / perf improvement with no wire or API change
9
9
  */
10
- export declare const SDK_VERSION = "0.9.0";
10
+ export declare const SDK_VERSION = "0.9.1";
11
11
  /**
12
12
  * Binary encrypted-payload format version.
13
13
  * Included as the first byte of every encrypted payload so receivers can
package/dist/version.js CHANGED
@@ -10,7 +10,7 @@ exports.PROTOCOL_VERSION = exports.PAYLOAD_FORMAT_VERSION = exports.SDK_VERSION
10
10
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
11
11
  * PATCH, bug-fix / perf improvement with no wire or API change
12
12
  */
13
- exports.SDK_VERSION = '0.9.0';
13
+ exports.SDK_VERSION = '0.9.1';
14
14
  /**
15
15
  * Binary encrypted-payload format version.
16
16
  * Included as the first byte of every encrypted payload so receivers can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droponair/sdk-js",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "DropOnAir SDK for end-to-end encrypted messaging",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",