@acrobits/ipc-sdk 0.12.0-alpha.11 → 0.12.0-alpha.12

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/lib/index.d.ts CHANGED
@@ -376,6 +376,10 @@ export declare const enum IPCEvents {
376
376
  * Event that is fired when the `Host` app sends a new PUSH TOKEN.
377
377
  */
378
378
  PushToken = "PUSH TOKEN",
379
+ /**
380
+ * Event that is fired when the `Host` app sends a new PUSH TOKEN with payload object callback.
381
+ */
382
+ PushTokenPayload = "PUSH TOKEN PAYLOAD",
379
383
  /**
380
384
  * Event that is fired when the `Host` app sends a REQUEST LOGS event.
381
385
  */
@@ -527,6 +531,23 @@ export declare class IPCManager {
527
531
  * @returns A promise with the Push Token as `string`.
528
532
  */
529
533
  requestPushToken(): Promise<string>;
534
+ /**
535
+ * Requests the `Host` app to provide the Push Token for the current device.
536
+ *
537
+ * @param options - Options for the request. Set `extended` to `true` to return the full payload
538
+ * object instead of just the token.
539
+ *
540
+ * @returns A promise with the full Push Token payload object.
541
+ */
542
+ requestPushToken(options: {
543
+ extended: true;
544
+ }): Promise<{
545
+ pushToken: string;
546
+ appId: string;
547
+ selector: string;
548
+ isRegistered?: boolean;
549
+ installationId?: string;
550
+ }>;
530
551
  /**
531
552
  * Sends the current badge count to the `Host` app.
532
553
  *
@@ -609,7 +630,29 @@ export declare class IPCManager {
609
630
  * is received.
610
631
  * @returns An unsubscribe callback to remove the listener.
611
632
  */
612
- onPushToken(callback: (token: string, appId: string, selector: string) => void): () => boolean | undefined;
633
+ onPushToken(callback: (token: string, appId: string, selector: string) => void): UnsubscribeCallback;
634
+ /**
635
+ * Registers a callback to be invoked when a {@link IPCEvents.PushToken} event is received.
636
+ *
637
+ * @remarks
638
+ * When `asPayload` is `true`, the callback receives a single payload object with all fields
639
+ * including `isRegistered` and `installationId`.
640
+ *
641
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.PushToken} event
642
+ * is received. Receives a payload object with all push token fields.
643
+ * @param options - Options for the callback registration. Set `asPayload` to `true` to receive
644
+ * a payload object instead of positional parameters.
645
+ * @returns An unsubscribe callback to remove the listener.
646
+ */
647
+ onPushToken(callback: (payload: {
648
+ pushToken: string;
649
+ appId: string;
650
+ selector: string;
651
+ isRegistered?: boolean;
652
+ installationId?: string;
653
+ }) => void, options: {
654
+ asPayload: true;
655
+ }): UnsubscribeCallback;
613
656
  /**
614
657
  * Registers a callback to be invoked when a {@link IPCEvents.RequestLogs} event is received.
615
658
  *
@@ -694,10 +737,19 @@ export declare class IPCManager {
694
737
  transportUri: string;
695
738
  }
696
739
 
697
- declare type SelectContactsOptions = {
740
+ /**
741
+ * Options for the `selectContacts` method.
742
+ *
743
+ * @public
744
+ */
745
+ export declare type SelectContactsOptions = {
746
+ /** Whether to allow `single` or `multi` contact selection. */
698
747
  mode: 'single' | 'multi';
748
+ /** Whether to filter contacts to the selected type. */
699
749
  filterToSelectedType: boolean;
750
+ /** A list of currently selected contacts for multi-select mode. */
700
751
  currentContacts?: ContactItem[];
752
+ /** The types of contacts to return in the result. */
701
753
  resultTypes?: ContactType[];
702
754
  };
703
755