@acrobits/ipc-sdk 0.11.2-alpha.8 → 0.12.0-alpha.11

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
@@ -23,17 +23,83 @@ export declare type BaseContactItem = {
23
23
  /**
24
24
  * Cloud ID associated with the contact.
25
25
  *
26
- * @deprecated Use {@link CloudContact.cloudId} instead.
26
+ * @deprecated Use `CloudContact.cloudId` instead.
27
27
  */
28
28
  cloudId?: string;
29
29
  /**
30
30
  * Network ID for the contact.
31
31
  *
32
- * @deprecated Use {@link CloudContact.networkId} instead.
32
+ * @deprecated Use `CloudContact.networkId` instead.
33
33
  */
34
34
  networkId?: string;
35
35
  };
36
36
 
37
+ /**
38
+ * Represents information about a single call.
39
+ *
40
+ * @public
41
+ */
42
+ export declare interface CallInfoItem {
43
+ /**
44
+ * Unique identifier for the call.
45
+ */
46
+ callId: string;
47
+ /**
48
+ * Call event ID as tracked by the Host app.
49
+ */
50
+ eventId: number;
51
+ /**
52
+ * Optional group ID as tracked by the Host app, provided if the call is part of a group.
53
+ */
54
+ groupId?: string;
55
+ /**
56
+ * Current state of the call.
57
+ */
58
+ callState: CallState;
59
+ /**
60
+ * Optional timestamp (in seconds since epoch) when the call was established.
61
+ */
62
+ establishedDate?: number;
63
+ /**
64
+ * Information about the remote user in the call.
65
+ */
66
+ remoteUser: RemoteUser;
67
+ /**
68
+ * Whether the call is currently on hold.
69
+ */
70
+ isHeld: boolean;
71
+ }
72
+
73
+ /**
74
+ * Possible states of a call as tracked by the Host app.
75
+ *
76
+ * - `Unknown` - Default/initial state; call state cannot be determined.
77
+ * - `Trying` - Outgoing call: INVITE sent, waiting for provisional response.
78
+ * - `Ringing` - Outgoing call: remote party is ringing (180 Ringing received).
79
+ * - `Busy` - Outgoing call: called party is busy (486 response). Terminal, Failed.
80
+ * - `IncomingAnswered` - Incoming call: user answered, media setup in progress.
81
+ * - `IncomingTrying` - Incoming call: protocol-level setup in progress, user has not answered.
82
+ * - `IncomingRinging` - Incoming call: alerting the user (ringing locally). This is the initial
83
+ * state for pushed incoming calls received from SIPIS.
84
+ * - `IncomingIgnored` - Incoming call: user explicitly ignored the call on call screen or silenced
85
+ * the ringer.
86
+ * - `IncomingRejected` - Incoming call: user explicitly rejected. Terminal.
87
+ * - `IncomingMissed` - Incoming call: caller hung up or timed out before user answered. Terminal.
88
+ * - `Established` - Call connected: signaling/media session established; actual media may be
89
+ * muted/on hold/one-way.
90
+ * - `Error` - Call failed due to RTP, transport, or logic error. Terminal, Failed.
91
+ * - `Unauthorized` - Authentication with server failed. Terminal, Failed.
92
+ * - `Terminated` - Call ended normally (BYE exchanged or clean hangup). Terminal.
93
+ * - `IncomingForwarded` - Incoming call: forwarded to another destination by user. Terminal.
94
+ * - `IncomingAnsweredElsewhere` - Incoming call: answered on another device (same account).
95
+ * Terminal.
96
+ * - `RedirectedToAlternativeService` - Outgoing call: server redirected to alternative service
97
+ * (3xx/location). Terminal.
98
+ *
99
+ * @public
100
+ */
101
+ export declare type CallState = 'Unknown' | 'Trying' | 'Ringing' | 'Busy' | 'IncomingAnswered' | 'IncomingTrying' | 'IncomingRinging' | 'IncomingIgnored' | 'IncomingRejected' | 'IncomingMissed' | 'Established' | 'Error' | 'Unauthorized' | 'Terminated' | 'IncomingForwarded' | 'IncomingAnsweredElsewhere' | 'RedirectedToAlternativeService';
102
+
37
103
  /**
38
104
  * Defines cloud-username contact information.
39
105
  *
@@ -71,7 +137,7 @@ export declare type CloudUsernameContactItem = BaseContactItem & {
71
137
  /**
72
138
  * Cloud username associated with the contact.
73
139
  *
74
- * @deprecated Use {@link CloudContact.cloudUsername} instead.
140
+ * @deprecated Use `CloudContact.cloudUsername` instead.
75
141
  */
76
142
  cloudUsername?: string;
77
143
  };
@@ -81,8 +147,9 @@ export declare type CloudUsernameContactItem = BaseContactItem & {
81
147
  *
82
148
  * @example
83
149
  * ```ts
84
- * const email1 = 'test@example.com';
85
- * const email2 = 'test@example.com';
150
+ * const email1 = 'test\@example.com';
151
+ * const email2 = 'test\@example.com';
152
+ * ```
86
153
  *
87
154
  * @public
88
155
  */
@@ -267,6 +334,18 @@ export declare interface ILogger {
267
334
  error(...args: any[]): void;
268
335
  }
269
336
 
337
+ /**
338
+ * An error thrown when a parameter in the message payload is invalid.
339
+ *
340
+ * @public
341
+ */
342
+ export declare class InvalidParameterError extends Error {
343
+ param: string;
344
+ value: unknown;
345
+ reason: string;
346
+ constructor(param: string, value: unknown, reason: string);
347
+ }
348
+
270
349
  /**
271
350
  * Defines the context the web app is running under.
272
351
  *
@@ -300,7 +379,11 @@ export declare const enum IPCEvents {
300
379
  /**
301
380
  * Event that is fired when the `Host` app sends a REQUEST LOGS event.
302
381
  */
303
- RequestLogs = "REQUEST LOGS"
382
+ RequestLogs = "REQUEST LOGS",
383
+ /**
384
+ * Event that is fired when the `Host` app sends a CALL INFO update.
385
+ */
386
+ CallInfo = "CALL INFO"
304
387
  }
305
388
 
306
389
  /**
@@ -369,6 +452,10 @@ export declare class IPCManager {
369
452
  /**
370
453
  * Requests the `Host` app to open the contact selection UI.
371
454
  *
455
+ * @remarks
456
+ * This overload requires protocol version 2.1 or higher. If the negotiated version
457
+ * is 2.0, an {@link UnsupportedVersionError} will be thrown.
458
+ *
372
459
  * @param corelationId - An identifier for the message stream
373
460
  * @param options - Configuration options for contact selection:
374
461
  * - `mode`: Whether to allow 'single' or 'multi' contact selection
@@ -377,214 +464,271 @@ export declare class IPCManager {
377
464
  * - `includeOffNetworkContacts`: Whether to include contacts not on the network. Defaults to false
378
465
  *
379
466
  * @returns A collection of {@link ContactItem} objects which the user selected
380
- */
381
- selectContacts(corelationId: number, options: SelectContactsOptions): Promise<ContactItem[]>;
382
- /**
383
- * Requests the `Host` app to open the contact selection UI.
384
- *
385
- * @deprecated Use the `selectContacts` method with the `options` parameter instead.
386
- *
387
- * @remarks
388
- * When requesting a `single` contact, the `Host` app will return immediately
389
- * after contact selection.
390
- *
391
- * @param corelationId - An identifier for the message stream
392
- * @param mode - _Optional_. Whether to allow `single` or `multi` contact selection.
393
- * @param contactType - _Optional_. The type of contacts to be selected. This can be either
394
- * `cloudUsername` or `uri`. Defaults to `cloudUsername`.
395
- *
396
- * @returns A collection of {@link ContactItem} objects which the user selected along with the
397
- * `corelationId`.
398
- */
399
- selectContacts(corelationId: number, mode?: 'single', contactType?: ContactType): Promise<ContactItem[]>;
400
- /**
401
- * Requests the `Host` app to open the contact selection UI.
402
- *
403
- * @deprecated Use the `selectContacts` method with the `options` parameter instead.
404
467
  *
405
- * @remarks
406
- * When requesting a `multi` contact, the user will have to manually close the contact selection
407
- * UI. The `Host` app will return the selected contacts when the user closes the UI.
408
- *
409
- * When requesting a `multi` contact, the `currentContacts` parameter is required. This will
410
- * be used to highlight the contacts that are already selected.
411
- *
412
- * @param corelationId - An identifier for the message stream
413
- * @param mode - Whether to allow `single` or `multi` contact selection.
414
- * @param currentContacts - A list of {@link ContactItem} objects that are currently selected.
415
- * This is used to highlight the current contacts from the selection UI.
416
- * @param contactType - _Optional_. The type of contacts to be selected. This can be either
417
- * `cloudUsername` or `uri`. Defaults to `cloudUsername`.
418
- *
419
- * @returns A collection of {@link ContactItem} objects which the user selected along with the
420
- * `corelationId`.
421
- */
422
- selectContacts(corelationId: number, mode: 'multi', currentContacts: ContactItem[], contactType?: ContactType): Promise<ContactItem[]>;
423
- private selectContacts_V2_0;
424
- private selectContacts_V2_1;
425
- /**
426
- * Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
427
- * contact information.
428
- *
429
- * @param contacts - List of {@link ContactItem} collection to match against the Host's contact
430
- * list.
431
- * @returns A collection of {@link DetailedContactItem} objects which were matched against the
432
- * Host's contact list.
433
- */
434
- matchContacts(contacts: ContactItem[]): Promise<Record<string, DetailedContactItem_2 | null | undefined> | CloudUsernameDetailedContactItem[]>;
435
- /**
436
- * Requests the `Host` app to provide the Push Token for the current device.
437
- *
438
- * @returns A promise with the Push Token as `string`.
439
- */
440
- requestPushToken(): Promise<string>;
441
- /**
442
- * Sends the current badge count to the `Host` app.
443
- *
444
- * @param count - The count to update the badge to.
445
- * @param isActivity - _Optional_. Whether the update is for an activity instead of a badge.
446
- */
447
- badgeUpdate(count: number, isActivity?: boolean): void;
448
- /**
449
- * Requests the `Host` app to reset the app and log out the user.
450
- *
451
- * @remarks
452
- * For added security, the Host can confirm the user's intention to reset the app by displaying
453
- * a confirmation dialog. The user can decide to cancel the reset operation.
454
- */
455
- requestAppReset(): void;
456
- /**
457
- * Requests the `Host` app to open the given URL in an external browser.
458
- *
459
- * @remarks
460
- * Any additional data to be posted alongside the URL is included with the `data` parameter.
461
- *
462
- * @example
463
- *
464
- * ```ts
465
- * // import the IPCManager
466
- * import { IPCManager } from '@acrobits/ipc-sdk';
467
- *
468
- * // create an instance of IPCManager
469
- * const manager = new IPCManager();
470
- *
471
- * // open the URL with additional data
472
- * const url = 'https://example.com';
473
- * const data = {
474
- * name: 'John Doe',
475
- * age: 30
476
- * };
477
- *
478
- * manager.openUrl(url, data);
479
- * ```
480
- *
481
- * @param url - URL to open in the external browser
482
- * @param data - _Optional_. Any additional data to be sent along with the URL
483
- */
484
- openUrl<TData>(url: string, data?: TData): void;
485
- /**
486
- * Initiates a SIP call to the given {@link ContactItem}.
487
- *
488
- * @param contact - {@link ContactItem} for the callee.
489
- */
490
- sipCall(contact: ContactItem): void;
491
- /**
492
- * Registers a callback to be invoked when a {@link IPCEvents.BadgeQuery} is received.
493
- *
494
- * @param callback - A callback function to be invoked when a {@link IPCEvents.BadgeQuery} event
495
- * is received.
496
- * @returns An unsubscribe callback to remove the listener.
497
- */
498
- onBadgeQueryRequest(callback: () => void): UnsubscribeCallback;
499
- /**
500
- * Registers a callback to be invoked when a {@link IPCEvents.Lifecycle} event is received.
501
- *
502
- * @remarks
503
- * The `eventName` and `payload` are defined by the `Host` app and can vary for each LIFECYCLE
504
- * event. The payload can be an empty object for events without any additional data.
505
- *
506
- * @param callback - A callback function to be invoked when a {@link IPCEvents.Lifecycle} event
507
- * is received.
508
- *
509
- * @returns An unsubscribe callback to remove the listener.
510
- */
511
- onLifecycleEvent(callback: (event: string, payload: Record<string, unknown>) => void): UnsubscribeCallback;
512
- /**
513
- * Registers a callback to be invoked when a {@link IPCEvents.PushToken} event is received.
514
- *
515
- * @remarks
516
- * The `token`, `appId`, `selector` and `expiry` are defined by the `Host` app and can vary for
517
- * each Push Token event.
518
- *
519
- * @param callback - A callback function to be invoked when a {@link IPCEvents.PushToken} event
520
- * is received.
521
- * @returns An unsubscribe callback to remove the listener.
522
- */
523
- onPushToken(callback: (token: string, appId: string, selector: string) => void): () => boolean | undefined;
524
- /**
525
- * Registers a callback to be invoked when a {@link IPCEvents.RequestLogs} event is received.
526
- *
527
- * @remarks
528
- * The Host app can request logs from the Client app by sending a RequestLogs event. The callback
529
- * will receive a skipCompression parameter indicating whether the logs should be compressed or not.
530
- *
531
- * When skipCompression is true, the logs should be sent uncompressed. When false or undefined,
532
- * the logs should be compressed before sending.
533
- *
534
- * @param callback - A callback function to be invoked when a {@link IPCEvents.RequestLogs} event
535
- * is received. The callback receives an optional skipCompression parameter.
536
- *
537
- * @returns An unsubscribe callback to remove the listener.
538
- */
539
- onRequestLogsMessage(callback: (skipCompression?: boolean) => void): () => boolean | undefined;
540
- private evaluateContext;
541
- }
468
+ * @throws {@link UnsupportedVersionError} if the negotiated version is 2.0.
469
+ */
470
+ selectContacts(corelationId: number, options: SelectContactsOptions): Promise<ContactItem[]>;
471
+ /**
472
+ * Requests the `Host` app to open the contact selection UI.
473
+ *
474
+ * @deprecated Use the `selectContacts` method with the `options` parameter instead.
475
+ *
476
+ * @remarks
477
+ * When requesting a `single` contact, the `Host` app will return immediately
478
+ * after contact selection.
479
+ *
480
+ * @param corelationId - An identifier for the message stream
481
+ * @param mode - _Optional_. Whether to allow `single` or `multi` contact selection.
482
+ * @param contactType - _Optional_. The type of contacts to be selected. This can be either
483
+ * `cloudUsername` or `uri`. Defaults to `cloudUsername`.
484
+ *
485
+ * @returns A collection of {@link ContactItem} objects which the user selected along with the
486
+ * `corelationId`.
487
+ */
488
+ selectContacts(corelationId: number, mode?: 'single', contactType?: ContactType): Promise<ContactItem[]>;
489
+ /**
490
+ * Requests the `Host` app to open the contact selection UI.
491
+ *
492
+ * @deprecated Use the `selectContacts` method with the `options` parameter instead.
493
+ *
494
+ * @remarks
495
+ * When requesting a `multi` contact, the user will have to manually close the contact selection
496
+ * UI. The `Host` app will return the selected contacts when the user closes the UI.
497
+ *
498
+ * When requesting a `multi` contact, the `currentContacts` parameter is required. This will
499
+ * be used to highlight the contacts that are already selected.
500
+ *
501
+ * @param corelationId - An identifier for the message stream
502
+ * @param mode - Whether to allow `single` or `multi` contact selection.
503
+ * @param currentContacts - A list of {@link ContactItem} objects that are currently selected.
504
+ * This is used to highlight the current contacts from the selection UI.
505
+ * @param contactType - _Optional_. The type of contacts to be selected. This can be either
506
+ * `cloudUsername` or `uri`. Defaults to `cloudUsername`.
507
+ *
508
+ * @returns A collection of {@link ContactItem} objects which the user selected along with the
509
+ * `corelationId`.
510
+ */
511
+ selectContacts(corelationId: number, mode: 'multi', currentContacts: ContactItem[], contactType?: ContactType): Promise<ContactItem[]>;
512
+ private selectContacts_V2_0;
513
+ private selectContacts_V2_1;
514
+ /**
515
+ * Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
516
+ * contact information.
517
+ *
518
+ * @param contacts - List of {@link ContactItem} collection to match against the Host's contact
519
+ * list.
520
+ * @returns A collection of {@link DetailedContactItem} objects which were matched against the
521
+ * Host's contact list.
522
+ */
523
+ matchContacts(contacts: ContactItem[]): Promise<Record<string, DetailedContactItem_2 | null | undefined> | CloudUsernameDetailedContactItem[]>;
524
+ /**
525
+ * Requests the `Host` app to provide the Push Token for the current device.
526
+ *
527
+ * @returns A promise with the Push Token as `string`.
528
+ */
529
+ requestPushToken(): Promise<string>;
530
+ /**
531
+ * Sends the current badge count to the `Host` app.
532
+ *
533
+ * @param count - The count to update the badge to.
534
+ * @param isActivity - _Optional_. Whether the update is for an activity instead of a badge.
535
+ */
536
+ badgeUpdate(count: number, isActivity?: boolean): void;
537
+ /**
538
+ * Requests the `Host` app to reset the app and log out the user.
539
+ *
540
+ * @remarks
541
+ * For added security, the Host can confirm the user's intention to reset the app by displaying
542
+ * a confirmation dialog. The user can decide to cancel the reset operation.
543
+ */
544
+ requestAppReset(): void;
545
+ /**
546
+ * Requests the `Host` app to open the given URL in an external browser.
547
+ *
548
+ * @remarks
549
+ * Any additional data to be posted alongside the URL is included with the `data` parameter.
550
+ *
551
+ * @example
552
+ *
553
+ * ```ts
554
+ * // import the IPCManager
555
+ * import { IPCManager } from '@acrobits/ipc-sdk';
556
+ *
557
+ * // create an instance of IPCManager
558
+ * const manager = new IPCManager();
559
+ *
560
+ * // open the URL with additional data
561
+ * const url = 'https://example.com';
562
+ * const data = {
563
+ * name: 'John Doe',
564
+ * age: 30
565
+ * };
566
+ *
567
+ * manager.openUrl(url, data);
568
+ * ```
569
+ *
570
+ * @param url - URL to open in the external browser
571
+ * @param data - _Optional_. Any additional data to be sent along with the URL
572
+ */
573
+ openUrl<TData>(url: string, data?: TData): void;
574
+ /**
575
+ * Initiates a SIP call to the given {@link ContactItem}.
576
+ *
577
+ * @param contact - {@link ContactItem} for the callee.
578
+ */
579
+ sipCall(contact: ContactItem): void;
580
+ /**
581
+ * Registers a callback to be invoked when a {@link IPCEvents.BadgeQuery} is received.
582
+ *
583
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.BadgeQuery} event
584
+ * is received.
585
+ * @returns An unsubscribe callback to remove the listener.
586
+ */
587
+ onBadgeQueryRequest(callback: () => void): UnsubscribeCallback;
588
+ /**
589
+ * Registers a callback to be invoked when a {@link IPCEvents.Lifecycle} event is received.
590
+ *
591
+ * @remarks
592
+ * The `eventName` and `payload` are defined by the `Host` app and can vary for each LIFECYCLE
593
+ * event. The payload can be an empty object for events without any additional data.
594
+ *
595
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.Lifecycle} event
596
+ * is received.
597
+ *
598
+ * @returns An unsubscribe callback to remove the listener.
599
+ */
600
+ onLifecycleEvent(callback: (event: string, payload: Record<string, unknown>) => void): UnsubscribeCallback;
601
+ /**
602
+ * Registers a callback to be invoked when a {@link IPCEvents.PushToken} event is received.
603
+ *
604
+ * @remarks
605
+ * The `token`, `appId`, `selector` and `expiry` are defined by the `Host` app and can vary for
606
+ * each Push Token event.
607
+ *
608
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.PushToken} event
609
+ * is received.
610
+ * @returns An unsubscribe callback to remove the listener.
611
+ */
612
+ onPushToken(callback: (token: string, appId: string, selector: string) => void): () => boolean | undefined;
613
+ /**
614
+ * Registers a callback to be invoked when a {@link IPCEvents.RequestLogs} event is received.
615
+ *
616
+ * @remarks
617
+ * The Host app can request logs from the Client app by sending a RequestLogs event. The callback
618
+ * will receive a skipCompression parameter indicating whether the logs should be compressed or not.
619
+ *
620
+ * When skipCompression is true, the logs should be sent uncompressed. When false or undefined,
621
+ * the logs should be compressed before sending.
622
+ *
623
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.RequestLogs} event
624
+ * is received. The callback receives an optional skipCompression parameter.
625
+ *
626
+ * @returns An unsubscribe callback to remove the listener.
627
+ */
628
+ onRequestLogsMessage(callback: (skipCompression?: boolean) => void): () => boolean | undefined;
629
+ /**
630
+ * Requests the current call information from the `Host` app.
631
+ *
632
+ * @remarks
633
+ * This method requires protocol version 2.2 or higher. If the negotiated version
634
+ * is lower, an {@link UnsupportedVersionError} will be thrown.
635
+ *
636
+ * @returns A promise with an array of {@link CallInfoItem} objects representing
637
+ * the current calls.
638
+ *
639
+ * @throws {@link UnsupportedVersionError} if the negotiated version is below 2.2.
640
+ */
641
+ requestCallInfo(): Promise<CallInfoItem[]>;
642
+ /**
643
+ * Registers a callback to be invoked when a {@link IPCEvents.CallInfo} event is received.
644
+ *
645
+ * @remarks
646
+ * The Host app sends CALL INFO updates when call state changes occur. This includes
647
+ * new calls, call state transitions, and call terminations.
648
+ *
649
+ * Note: This event is only available on protocol version 2.2 or higher. On lower versions,
650
+ * the callback will never be invoked.
651
+ *
652
+ * @param callback - A callback function to be invoked when a {@link IPCEvents.CallInfo} event
653
+ * is received. The callback receives an array of {@link CallInfoItem} objects.
654
+ *
655
+ * @returns An unsubscribe callback to remove the listener.
656
+ */
657
+ onCallInfo(callback: (calls: CallInfoItem[]) => void): UnsubscribeCallback;
658
+ private evaluateContext;
659
+ }
542
660
 
543
- /**
544
- * Supported versions of the IPC Protocol.
545
- *
546
- * @public
547
- */
548
- export declare type IpcProtocolVersion = '0.1' | '0.2' | '0.3' | '0.4' | '0.5' | '0.6' | '0.7' | '0.8' | '0.9' | '0.10' | '2.0' | '2.1' | '2.2';
661
+ /**
662
+ * Supported versions of the IPC Protocol.
663
+ *
664
+ * @public
665
+ */
666
+ export declare type IpcProtocolVersion = '0.1' | '0.2' | '0.3' | '0.4' | '0.5' | '0.6' | '0.7' | '0.8' | '0.9' | '0.10' | '2.0' | '2.1' | '2.2';
549
667
 
550
- /**
551
- * Defines the properties of a number based contact item.
552
- *
553
- * @public
554
- */
555
- declare type NumberContactItem = BaseContactItem & {
556
- type: 'number';
557
- /**
558
- * Number associated with the contact.
559
- */
560
- numbers: ContactNumber[];
561
- };
668
+ /**
669
+ * Defines the properties of a number based contact item.
670
+ *
671
+ * @public
672
+ */
673
+ declare type NumberContactItem = BaseContactItem & {
674
+ type: 'number';
675
+ /**
676
+ * Number associated with the contact.
677
+ */
678
+ numbers: ContactNumber[];
679
+ };
562
680
 
563
- declare type SelectContactsOptions = {
564
- mode: 'single' | 'multi';
565
- filterToSelectedType: boolean;
566
- currentContacts?: ContactItem[];
567
- resultTypes?: ContactType[];
568
- };
681
+ /**
682
+ * Represents the remote user in a call.
683
+ *
684
+ * @public
685
+ */
686
+ export declare interface RemoteUser {
687
+ /**
688
+ * Display name of the remote user.
689
+ */
690
+ displayName: string;
691
+ /**
692
+ * Transport URI of the remote user.
693
+ */
694
+ transportUri: string;
695
+ }
569
696
 
570
- /**
571
- * A callback function to unsubscribe the registered listener.
572
- *
573
- * @public
574
- */
575
- export declare type UnsubscribeCallback = () => void;
697
+ declare type SelectContactsOptions = {
698
+ mode: 'single' | 'multi';
699
+ filterToSelectedType: boolean;
700
+ currentContacts?: ContactItem[];
701
+ resultTypes?: ContactType[];
702
+ };
576
703
 
577
- /**
578
- * Defines the properties of a SIP URI based contact item.
579
- *
580
- * @public
581
- */
582
- export declare type UriContactItem = BaseContactItem & {
583
- type: 'uri';
584
- /**
585
- * URI or number associated with the contact with prefix (e.g. sip: or tel:)
586
- */
587
- uri: ContactURI;
588
- };
704
+ /**
705
+ * A callback function to unsubscribe the registered listener.
706
+ *
707
+ * @public
708
+ */
709
+ export declare type UnsubscribeCallback = () => void;
710
+
711
+ /**
712
+ * An error thrown when the protocol version being requested is not supported by the app or library.
713
+ *
714
+ * @public
715
+ */
716
+ export declare class UnsupportedVersionError extends Error {
717
+ version: IpcProtocolVersion | IpcProtocolVersion[];
718
+ constructor(version: IpcProtocolVersion | IpcProtocolVersion[], minVersion?: IpcProtocolVersion);
719
+ }
720
+
721
+ /**
722
+ * Defines the properties of a SIP URI based contact item.
723
+ *
724
+ * @public
725
+ */
726
+ export declare type UriContactItem = BaseContactItem & {
727
+ type: 'uri';
728
+ /**
729
+ * URI or number associated with the contact with prefix (e.g. sip: or tel:)
730
+ */
731
+ uri: ContactURI;
732
+ };
589
733
 
590
- export { }
734
+ export { }