@dialstack/sdk-react 3.8.0 → 3.9.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/dist/ai-agent.cjs +1 -1
- package/dist/ai-agent.cjs.map +1 -1
- package/dist/ai-agent.mjs +1 -1
- package/dist/ai-agent.mjs.map +1 -1
- package/dist/call-history.cjs +1 -1
- package/dist/call-history.cjs.map +1 -1
- package/dist/call-history.mjs +1 -1
- package/dist/call-history.mjs.map +1 -1
- package/dist/call-logs.cjs +1 -1
- package/dist/call-logs.cjs.map +1 -1
- package/dist/call-logs.d.cts +4 -0
- package/dist/call-logs.d.ts +4 -0
- package/dist/call-logs.mjs +1 -1
- package/dist/call-logs.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/onboarding.cjs +1 -1
- package/dist/onboarding.cjs.map +1 -1
- package/dist/onboarding.mjs +1 -1
- package/dist/onboarding.mjs.map +1 -1
- package/dist/phone-number-ordering.cjs +1 -1
- package/dist/phone-number-ordering.cjs.map +1 -1
- package/dist/phone-number-ordering.mjs +1 -1
- package/dist/phone-number-ordering.mjs.map +1 -1
- package/dist/phone-numbers.cjs +1 -1
- package/dist/phone-numbers.cjs.map +1 -1
- package/dist/phone-numbers.mjs +1 -1
- package/dist/phone-numbers.mjs.map +1 -1
- package/dist/softphone.cjs +1 -1
- package/dist/softphone.cjs.map +1 -1
- package/dist/softphone.d.cts +57 -27
- package/dist/softphone.d.ts +57 -27
- package/dist/softphone.mjs +1 -1
- package/dist/softphone.mjs.map +1 -1
- package/dist/voicemails.cjs +1 -1
- package/dist/voicemails.cjs.map +1 -1
- package/dist/voicemails.d.cts +4 -0
- package/dist/voicemails.d.ts +4 -0
- package/dist/voicemails.mjs +1 -1
- package/dist/voicemails.mjs.map +1 -1
- package/package.json +3 -3
package/dist/softphone.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Call, EmergencyAddress, EmergencyAddressInput, CallState, DialStackPhone, CallEndReason } from '@dialstack/sdk-webrtc';
|
|
2
|
+
import { Call, EmergencyAddress, EmergencyAddressInput, PresenceStatus, CallState, DialStackPhone, CallEndReason } from '@dialstack/sdk-webrtc';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
import { Locale } from '@dialstack/sdk-js';
|
|
5
5
|
import { Locale as Locale$1, AppearanceOptions, FormattingOptions, ClientAppInfo } from '@dialstack/sdk-js/pure';
|
|
@@ -223,27 +223,6 @@ interface PeerInfo {
|
|
|
223
223
|
*/
|
|
224
224
|
type ResolvePeer = (call: Call) => PeerInfo | null | undefined | Promise<PeerInfo | null | undefined>;
|
|
225
225
|
|
|
226
|
-
interface UseDialInput {
|
|
227
|
-
/**
|
|
228
|
-
* Handle a per-keystroke value change: strip display separators only (typing
|
|
229
|
-
* stays natural; no mid-field E.164 rewrite). Pass the raw field value.
|
|
230
|
-
*/
|
|
231
|
-
onType: (raw: string) => void;
|
|
232
|
-
/**
|
|
233
|
-
* Handle a paste: a pasted value is complete, so fully normalize it — a
|
|
234
|
-
* formatted `(581) 319-5082` becomes `+15813195082`, so the user sees exactly
|
|
235
|
-
* what will be dialed. Pass the raw clipboard text.
|
|
236
|
-
*/
|
|
237
|
-
onPasteText: (raw: string) => void;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Shared cleaning for a dial-string input, used by BOTH the dial pad and the
|
|
241
|
-
* transfer field on web + RN so the "what may I type / what does a paste become"
|
|
242
|
-
* rule lives in one place. Each platform wires its native input event (web
|
|
243
|
-
* onChange/onPaste, RN onChangeText) to these — the string logic never diverges.
|
|
244
|
-
*/
|
|
245
|
-
declare function useDialInput(setValue: (value: string) => void): UseDialInput;
|
|
246
|
-
|
|
247
226
|
/**
|
|
248
227
|
* Pure, platform-agnostic view-model helpers shared by the web and React Native
|
|
249
228
|
* softphones. No React, no DOM, no React Native — just functions over the headless
|
|
@@ -364,8 +343,35 @@ interface DirectoryContact {
|
|
|
364
343
|
* call"), and matched by the search like the other fields.
|
|
365
344
|
*/
|
|
366
345
|
tags?: readonly string[];
|
|
346
|
+
/**
|
|
347
|
+
* The entry's live availability, drawn as a status dot with its label beside
|
|
348
|
+
* the destination, and matched by the search like a tag. Leave it unset for
|
|
349
|
+
* entries that have no presence (a department, an outside number).
|
|
350
|
+
*/
|
|
351
|
+
presence?: PresenceStatus;
|
|
367
352
|
}
|
|
368
353
|
|
|
354
|
+
interface UseDialInput {
|
|
355
|
+
/**
|
|
356
|
+
* Handle a per-keystroke value change: strip display separators only (typing
|
|
357
|
+
* stays natural; no mid-field E.164 rewrite). Pass the raw field value.
|
|
358
|
+
*/
|
|
359
|
+
onType: (raw: string) => void;
|
|
360
|
+
/**
|
|
361
|
+
* Handle a paste: a pasted value is complete, so fully normalize it — a
|
|
362
|
+
* formatted `(581) 319-5082` becomes `+15813195082`, so the user sees exactly
|
|
363
|
+
* what will be dialed. Pass the raw clipboard text.
|
|
364
|
+
*/
|
|
365
|
+
onPasteText: (raw: string) => void;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Shared cleaning for a dial-string input, used by BOTH the dial pad and the
|
|
369
|
+
* transfer field on web + RN so the "what may I type / what does a paste become"
|
|
370
|
+
* rule lives in one place. Each platform wires its native input event (web
|
|
371
|
+
* onChange/onPaste, RN onChangeText) to these — the string logic never diverges.
|
|
372
|
+
*/
|
|
373
|
+
declare function useDialInput(setValue: (value: string) => void): UseDialInput;
|
|
374
|
+
|
|
369
375
|
/**
|
|
370
376
|
* Shared design tokens for the DialStack Softphone.
|
|
371
377
|
*
|
|
@@ -430,6 +436,14 @@ interface SoftphoneContextBase {
|
|
|
430
436
|
* web and React Native can't drift on when the overlays reset.
|
|
431
437
|
*/
|
|
432
438
|
overlays: UseCallOverlays;
|
|
439
|
+
/**
|
|
440
|
+
* Live `m:ss` duration of the active call.
|
|
441
|
+
*
|
|
442
|
+
* @deprecated Use `useCallDuration(activeCall)`. This field changes on every
|
|
443
|
+
* clock tick, so it re-renders every `useSoftphone()` consumer twice a second
|
|
444
|
+
* during a call, even ones that never read it. It will be removed in the next
|
|
445
|
+
* major release.
|
|
446
|
+
*/
|
|
433
447
|
duration: string;
|
|
434
448
|
consultCall: Call | null;
|
|
435
449
|
transferOriginal: Call | null;
|
|
@@ -469,7 +483,11 @@ interface SoftphoneContextBase {
|
|
|
469
483
|
peerInfo: (call: Call | null | undefined) => PeerInfo | null;
|
|
470
484
|
/** The size tier the host asked for (`'auto'` unless pinned). */
|
|
471
485
|
layoutVariant: SoftphoneLayoutVariant;
|
|
472
|
-
/**
|
|
486
|
+
/**
|
|
487
|
+
* What the transfer / add-call picker lists: the users from
|
|
488
|
+
* `accountDirectory` when on, then the host's `directory`. Empty when neither
|
|
489
|
+
* has entries.
|
|
490
|
+
*/
|
|
473
491
|
directory: readonly DirectoryContact[];
|
|
474
492
|
}
|
|
475
493
|
|
|
@@ -564,11 +582,22 @@ interface SoftphoneProviderProps {
|
|
|
564
582
|
layoutVariant?: SoftphoneLayoutVariant;
|
|
565
583
|
/**
|
|
566
584
|
* People and places the user can pick from instead of typing a number (a
|
|
567
|
-
* directory of
|
|
568
|
-
* list
|
|
569
|
-
* still works. Pass a new array when the list changes.
|
|
585
|
+
* directory of people or departments, say). Offered as a searchable
|
|
586
|
+
* list from the dial pad and when transferring or adding a call; typing a
|
|
587
|
+
* destination still works. Pass a new array when the list changes.
|
|
570
588
|
*/
|
|
571
589
|
directory?: readonly DirectoryContact[];
|
|
590
|
+
/**
|
|
591
|
+
* Also list the other users in the signed-in user's DialStack account, with
|
|
592
|
+
* live presence. Unset, it is on unless you pass `directory` (even an empty
|
|
593
|
+
* one, so a list that is still loading never shows the account's users
|
|
594
|
+
* first); `true` lists both, the account's users first, and `false` turns it
|
|
595
|
+
* off. Each user is dialled on their first extension; users without one are
|
|
596
|
+
* left out. Presence is watched for the first 100 (the server's limit); the
|
|
597
|
+
* rest are listed without a status. A `directory` entry whose `id` is a
|
|
598
|
+
* user's id replaces them in the list and keeps their presence.
|
|
599
|
+
*/
|
|
600
|
+
accountDirectory?: boolean;
|
|
572
601
|
/**
|
|
573
602
|
* Your application's name and version, reported to DialStack with the SDK's
|
|
574
603
|
* own package versions. Ignored inside a `<DialstackComponentsProvider>`:
|
|
@@ -654,7 +683,8 @@ declare const Softphone: React.FC<SoftphoneProps>;
|
|
|
654
683
|
|
|
655
684
|
/**
|
|
656
685
|
* DialPad — the idle/outbound screen of the softphone: connection status chip, a
|
|
657
|
-
* destination field, the 12-key pad, and the call button.
|
|
686
|
+
* destination field, the 12-key pad, and the call button. With a directory, a
|
|
687
|
+
* switch swaps the field and pad for the searchable list. Reads connection +
|
|
658
688
|
* `placeCall` from the softphone context and owns only its own `destination` text.
|
|
659
689
|
*
|
|
660
690
|
* The E911 prompt is NOT rendered here — `<EmergencyBanner>` is a separate
|
package/dist/softphone.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Call, EmergencyAddress, EmergencyAddressInput, CallState, DialStackPhone, CallEndReason } from '@dialstack/sdk-webrtc';
|
|
2
|
+
import { Call, EmergencyAddress, EmergencyAddressInput, PresenceStatus, CallState, DialStackPhone, CallEndReason } from '@dialstack/sdk-webrtc';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
import { Locale } from '@dialstack/sdk-js';
|
|
5
5
|
import { Locale as Locale$1, AppearanceOptions, FormattingOptions, ClientAppInfo } from '@dialstack/sdk-js/pure';
|
|
@@ -223,27 +223,6 @@ interface PeerInfo {
|
|
|
223
223
|
*/
|
|
224
224
|
type ResolvePeer = (call: Call) => PeerInfo | null | undefined | Promise<PeerInfo | null | undefined>;
|
|
225
225
|
|
|
226
|
-
interface UseDialInput {
|
|
227
|
-
/**
|
|
228
|
-
* Handle a per-keystroke value change: strip display separators only (typing
|
|
229
|
-
* stays natural; no mid-field E.164 rewrite). Pass the raw field value.
|
|
230
|
-
*/
|
|
231
|
-
onType: (raw: string) => void;
|
|
232
|
-
/**
|
|
233
|
-
* Handle a paste: a pasted value is complete, so fully normalize it — a
|
|
234
|
-
* formatted `(581) 319-5082` becomes `+15813195082`, so the user sees exactly
|
|
235
|
-
* what will be dialed. Pass the raw clipboard text.
|
|
236
|
-
*/
|
|
237
|
-
onPasteText: (raw: string) => void;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Shared cleaning for a dial-string input, used by BOTH the dial pad and the
|
|
241
|
-
* transfer field on web + RN so the "what may I type / what does a paste become"
|
|
242
|
-
* rule lives in one place. Each platform wires its native input event (web
|
|
243
|
-
* onChange/onPaste, RN onChangeText) to these — the string logic never diverges.
|
|
244
|
-
*/
|
|
245
|
-
declare function useDialInput(setValue: (value: string) => void): UseDialInput;
|
|
246
|
-
|
|
247
226
|
/**
|
|
248
227
|
* Pure, platform-agnostic view-model helpers shared by the web and React Native
|
|
249
228
|
* softphones. No React, no DOM, no React Native — just functions over the headless
|
|
@@ -364,8 +343,35 @@ interface DirectoryContact {
|
|
|
364
343
|
* call"), and matched by the search like the other fields.
|
|
365
344
|
*/
|
|
366
345
|
tags?: readonly string[];
|
|
346
|
+
/**
|
|
347
|
+
* The entry's live availability, drawn as a status dot with its label beside
|
|
348
|
+
* the destination, and matched by the search like a tag. Leave it unset for
|
|
349
|
+
* entries that have no presence (a department, an outside number).
|
|
350
|
+
*/
|
|
351
|
+
presence?: PresenceStatus;
|
|
367
352
|
}
|
|
368
353
|
|
|
354
|
+
interface UseDialInput {
|
|
355
|
+
/**
|
|
356
|
+
* Handle a per-keystroke value change: strip display separators only (typing
|
|
357
|
+
* stays natural; no mid-field E.164 rewrite). Pass the raw field value.
|
|
358
|
+
*/
|
|
359
|
+
onType: (raw: string) => void;
|
|
360
|
+
/**
|
|
361
|
+
* Handle a paste: a pasted value is complete, so fully normalize it — a
|
|
362
|
+
* formatted `(581) 319-5082` becomes `+15813195082`, so the user sees exactly
|
|
363
|
+
* what will be dialed. Pass the raw clipboard text.
|
|
364
|
+
*/
|
|
365
|
+
onPasteText: (raw: string) => void;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Shared cleaning for a dial-string input, used by BOTH the dial pad and the
|
|
369
|
+
* transfer field on web + RN so the "what may I type / what does a paste become"
|
|
370
|
+
* rule lives in one place. Each platform wires its native input event (web
|
|
371
|
+
* onChange/onPaste, RN onChangeText) to these — the string logic never diverges.
|
|
372
|
+
*/
|
|
373
|
+
declare function useDialInput(setValue: (value: string) => void): UseDialInput;
|
|
374
|
+
|
|
369
375
|
/**
|
|
370
376
|
* Shared design tokens for the DialStack Softphone.
|
|
371
377
|
*
|
|
@@ -430,6 +436,14 @@ interface SoftphoneContextBase {
|
|
|
430
436
|
* web and React Native can't drift on when the overlays reset.
|
|
431
437
|
*/
|
|
432
438
|
overlays: UseCallOverlays;
|
|
439
|
+
/**
|
|
440
|
+
* Live `m:ss` duration of the active call.
|
|
441
|
+
*
|
|
442
|
+
* @deprecated Use `useCallDuration(activeCall)`. This field changes on every
|
|
443
|
+
* clock tick, so it re-renders every `useSoftphone()` consumer twice a second
|
|
444
|
+
* during a call, even ones that never read it. It will be removed in the next
|
|
445
|
+
* major release.
|
|
446
|
+
*/
|
|
433
447
|
duration: string;
|
|
434
448
|
consultCall: Call | null;
|
|
435
449
|
transferOriginal: Call | null;
|
|
@@ -469,7 +483,11 @@ interface SoftphoneContextBase {
|
|
|
469
483
|
peerInfo: (call: Call | null | undefined) => PeerInfo | null;
|
|
470
484
|
/** The size tier the host asked for (`'auto'` unless pinned). */
|
|
471
485
|
layoutVariant: SoftphoneLayoutVariant;
|
|
472
|
-
/**
|
|
486
|
+
/**
|
|
487
|
+
* What the transfer / add-call picker lists: the users from
|
|
488
|
+
* `accountDirectory` when on, then the host's `directory`. Empty when neither
|
|
489
|
+
* has entries.
|
|
490
|
+
*/
|
|
473
491
|
directory: readonly DirectoryContact[];
|
|
474
492
|
}
|
|
475
493
|
|
|
@@ -564,11 +582,22 @@ interface SoftphoneProviderProps {
|
|
|
564
582
|
layoutVariant?: SoftphoneLayoutVariant;
|
|
565
583
|
/**
|
|
566
584
|
* People and places the user can pick from instead of typing a number (a
|
|
567
|
-
* directory of
|
|
568
|
-
* list
|
|
569
|
-
* still works. Pass a new array when the list changes.
|
|
585
|
+
* directory of people or departments, say). Offered as a searchable
|
|
586
|
+
* list from the dial pad and when transferring or adding a call; typing a
|
|
587
|
+
* destination still works. Pass a new array when the list changes.
|
|
570
588
|
*/
|
|
571
589
|
directory?: readonly DirectoryContact[];
|
|
590
|
+
/**
|
|
591
|
+
* Also list the other users in the signed-in user's DialStack account, with
|
|
592
|
+
* live presence. Unset, it is on unless you pass `directory` (even an empty
|
|
593
|
+
* one, so a list that is still loading never shows the account's users
|
|
594
|
+
* first); `true` lists both, the account's users first, and `false` turns it
|
|
595
|
+
* off. Each user is dialled on their first extension; users without one are
|
|
596
|
+
* left out. Presence is watched for the first 100 (the server's limit); the
|
|
597
|
+
* rest are listed without a status. A `directory` entry whose `id` is a
|
|
598
|
+
* user's id replaces them in the list and keeps their presence.
|
|
599
|
+
*/
|
|
600
|
+
accountDirectory?: boolean;
|
|
572
601
|
/**
|
|
573
602
|
* Your application's name and version, reported to DialStack with the SDK's
|
|
574
603
|
* own package versions. Ignored inside a `<DialstackComponentsProvider>`:
|
|
@@ -654,7 +683,8 @@ declare const Softphone: React.FC<SoftphoneProps>;
|
|
|
654
683
|
|
|
655
684
|
/**
|
|
656
685
|
* DialPad — the idle/outbound screen of the softphone: connection status chip, a
|
|
657
|
-
* destination field, the 12-key pad, and the call button.
|
|
686
|
+
* destination field, the 12-key pad, and the call button. With a directory, a
|
|
687
|
+
* switch swaps the field and pad for the searchable list. Reads connection +
|
|
658
688
|
* `placeCall` from the softphone context and owns only its own `destination` text.
|
|
659
689
|
*
|
|
660
690
|
* The E911 prompt is NOT rendered here — `<EmergencyBanner>` is a separate
|