@ada-cx/messaging-bridge 1.12.1 → 1.14.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.
|
@@ -42,6 +42,7 @@ export declare const STATE: {
|
|
|
42
42
|
readonly CHAT_IMAGE_UPLOAD_VISIBLE: "chat.imageUploadVisible";
|
|
43
43
|
readonly CHAT_ANSWERED_INTERACTIVE_IDS: "chat.answeredInteractiveIds";
|
|
44
44
|
readonly CHAT_PLAYBOOK_STEP_EXECUTING: "chat.playbookStepExecuting";
|
|
45
|
+
readonly CHAT_GREETING_PENDING: "chat.greetingPending";
|
|
45
46
|
readonly CHATTER_ALERT_SOUND_ENABLED: "chatter.alertSoundEnabled";
|
|
46
47
|
readonly CHATTER_DEVICE_NOTIFICATIONS_ENABLED: "chatter.deviceNotificationsEnabled";
|
|
47
48
|
readonly CHATTER_HAS_DEVICE_TOKEN: "chatter.hasDeviceToken";
|
|
@@ -109,13 +110,35 @@ export declare const STATE: {
|
|
|
109
110
|
readonly SAML_LOCKED: "saml.locked";
|
|
110
111
|
readonly SAML_URL: "saml.url";
|
|
111
112
|
readonly SAML_LOGIN_BUTTON: "saml.loginButton";
|
|
113
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
112
114
|
readonly VOICE_AUDIO_LEVEL: "voice.audioLevel";
|
|
115
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
113
116
|
readonly VOICE_CURRENT_TRANSCRIPT: "voice.currentTranscript";
|
|
117
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
114
118
|
readonly VOICE_ENABLED: "voice.enabled";
|
|
115
|
-
|
|
119
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
116
120
|
readonly VOICE_IS_FINAL: "voice.isFinal";
|
|
121
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
117
122
|
readonly VOICE_IS_RECORDING: "voice.isRecording";
|
|
123
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
118
124
|
readonly VOICE_MODE: "voice.mode";
|
|
125
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
119
126
|
readonly VOICE_TTS_ENABLED: "voice.ttsEnabled";
|
|
127
|
+
readonly VOICE_AVAILABILITY: "voice.availability";
|
|
128
|
+
readonly VOICE_UNAVAILABLE_REASON: "voice.unavailableReason";
|
|
129
|
+
readonly VOICE_CONSENT_REQUIRED: "voice.consentRequired";
|
|
130
|
+
readonly VOICE_CALL_STATE: "voice.callState";
|
|
131
|
+
readonly VOICE_TURN: "voice.turn";
|
|
132
|
+
readonly VOICE_TURN_ID: "voice.turnId";
|
|
133
|
+
readonly VOICE_PENDING_REPLY_TURN_ID: "voice.pendingReplyTurnId";
|
|
134
|
+
readonly VOICE_SPOKEN_CHARS: "voice.spokenChars";
|
|
135
|
+
readonly VOICE_MUTED: "voice.muted";
|
|
136
|
+
readonly VOICE_INPUT_LEVEL: "voice.inputLevel";
|
|
137
|
+
readonly VOICE_CALL_STARTED_AT: "voice.callStartedAt";
|
|
138
|
+
readonly VOICE_AGENT_CAPTION: "voice.agentCaption";
|
|
139
|
+
readonly VOICE_USER_CAPTION: "voice.userCaption";
|
|
140
|
+
readonly VOICE_REJECTED_CAPTIONS: "voice.rejectedCaptions";
|
|
141
|
+
readonly VOICE_ERROR: "voice.error";
|
|
142
|
+
readonly VOICE_ENDED_REASON: "voice.endedReason";
|
|
120
143
|
};
|
|
121
144
|
export type StateKey = (typeof STATE)[keyof typeof STATE];
|
|
@@ -6,6 +6,32 @@ import type { CsatFeedbackOption, CsatSurveySettings, CustomAppFrameStyles, File
|
|
|
6
6
|
* These types are the source of truth for the `@ada-cx/messaging-bridge`
|
|
7
7
|
* package and must stay in sync with the AsyncAPI spec at asyncapi.yml.
|
|
8
8
|
*/
|
|
9
|
+
export type VoiceAvailability = "unavailable" | "available";
|
|
10
|
+
export type VoiceUnavailableReason = "not_enabled" | "delegation_missing" | "host_unsupported" | "mic_policy_blocked" | "unsupported" | "language_unsupported";
|
|
11
|
+
export type VoiceCallState = "idle" | "requesting_permission" | "connecting" | "in_call" | "reconnecting" | "ended" | "error";
|
|
12
|
+
export type VoiceTurn = "quiet" | "agent_speaking" | "user_speaking";
|
|
13
|
+
export type VoiceErrorCode = "permission_denied" | "mic_policy_blocked" | "session_refused" | "connect_failed" | "disconnected" | "audio_blocked" | "unsupported" | "capture_failed" | (string & {});
|
|
14
|
+
export type VoiceEndedReason = "client_end" | "idle_timeout" | "max_duration" | "grace_expired" | "handoff" | "voice_box_draining" | "resume_unavailable" | "error" | "voice_disabled" | "conversation_reset" | (string & {});
|
|
15
|
+
export interface VoiceSpokenChars {
|
|
16
|
+
turnId: number;
|
|
17
|
+
chars: number;
|
|
18
|
+
playedMs: number;
|
|
19
|
+
scheduledMs: number;
|
|
20
|
+
finalReceived: boolean;
|
|
21
|
+
revision: number;
|
|
22
|
+
}
|
|
23
|
+
export interface VoiceCaption {
|
|
24
|
+
accepted?: boolean;
|
|
25
|
+
turnId?: number;
|
|
26
|
+
utteranceId?: string;
|
|
27
|
+
text: string;
|
|
28
|
+
final: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface VoiceError {
|
|
31
|
+
code: VoiceErrorCode;
|
|
32
|
+
message: string;
|
|
33
|
+
refusalCode?: string;
|
|
34
|
+
}
|
|
9
35
|
export interface FallbackUiLink {
|
|
10
36
|
label: string;
|
|
11
37
|
url: string;
|
|
@@ -84,6 +110,7 @@ export interface LiveChatStateData {
|
|
|
84
110
|
timeoutAfterMs: string;
|
|
85
111
|
}
|
|
86
112
|
interface BaseMessage {
|
|
113
|
+
turnId?: number;
|
|
87
114
|
id: string;
|
|
88
115
|
sender: "user" | "bot" | "agent";
|
|
89
116
|
timestamp: number;
|
|
@@ -348,7 +375,7 @@ export type SdkPlatform = "IOS" | "ANDROID" | "REACTNATIVE" | null;
|
|
|
348
375
|
* - `error.*` — fatal error surface.
|
|
349
376
|
* - `chatter.*` — end-user preferences: language, notifications, translations.
|
|
350
377
|
* - `ui.*` — transient UI signals (typing indicators, dialogs, toasts).
|
|
351
|
-
* - `voice.*` —
|
|
378
|
+
* - `voice.*` — Voice call state.
|
|
352
379
|
* - `csat.*` / `endChat.*` — survey settings, eligibility, and End Chat gates.
|
|
353
380
|
* - `security.*` — Turnstile challenge state.
|
|
354
381
|
* - `featureFlags` — allowlisted LaunchDarkly values exposed to the app.
|
|
@@ -565,6 +592,8 @@ export interface AppDisplayState {
|
|
|
565
592
|
"chat.answeredInteractiveIds": string[];
|
|
566
593
|
/** A playbook step is running, so the composer must refuse to send. */
|
|
567
594
|
"chat.playbookStepExecuting": boolean;
|
|
595
|
+
/** A greeting was sent and its final frame has not arrived, so voice entry stays hidden. */
|
|
596
|
+
"chat.greetingPending": boolean;
|
|
568
597
|
"liveAgent.inLiveChat"?: boolean;
|
|
569
598
|
"liveAgent.inPending"?: boolean;
|
|
570
599
|
"liveAgent.isActive"?: boolean;
|
|
@@ -671,14 +700,36 @@ export interface AppDisplayState {
|
|
|
671
700
|
"ui.botTyping.visible": boolean;
|
|
672
701
|
"ui.showRetryDialog"?: boolean;
|
|
673
702
|
"ui.retryDialog.pending"?: boolean;
|
|
703
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
704
|
+
"voice.audioLevel"?: number;
|
|
705
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
706
|
+
"voice.currentTranscript"?: string;
|
|
707
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
674
708
|
"voice.enabled"?: boolean;
|
|
709
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
710
|
+
"voice.isFinal"?: boolean;
|
|
711
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
675
712
|
"voice.isRecording"?: boolean;
|
|
713
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
676
714
|
"voice.mode"?: "toggle" | "push-to-talk";
|
|
677
|
-
|
|
678
|
-
"voice.isFinal"?: boolean;
|
|
679
|
-
"voice.audioLevel"?: number;
|
|
680
|
-
"voice.error"?: string | null;
|
|
715
|
+
/** @deprecated No-op alias retained for one release. Use the voice.callState contract. */
|
|
681
716
|
"voice.ttsEnabled"?: boolean;
|
|
717
|
+
"voice.consentRequired"?: boolean;
|
|
718
|
+
"voice.availability"?: VoiceAvailability;
|
|
719
|
+
"voice.unavailableReason"?: VoiceUnavailableReason;
|
|
720
|
+
"voice.callState"?: VoiceCallState;
|
|
721
|
+
"voice.turn"?: VoiceTurn;
|
|
722
|
+
"voice.turnId"?: number | null;
|
|
723
|
+
"voice.pendingReplyTurnId"?: number | null;
|
|
724
|
+
"voice.spokenChars"?: VoiceSpokenChars | null;
|
|
725
|
+
"voice.muted"?: boolean;
|
|
726
|
+
"voice.inputLevel"?: number;
|
|
727
|
+
"voice.callStartedAt"?: number | null;
|
|
728
|
+
"voice.agentCaption"?: VoiceCaption | null;
|
|
729
|
+
"voice.userCaption"?: VoiceCaption | null;
|
|
730
|
+
"voice.rejectedCaptions"?: Record<string, VoiceCaption>;
|
|
731
|
+
"voice.error"?: string | VoiceError | null;
|
|
732
|
+
"voice.endedReason"?: VoiceEndedReason | null;
|
|
682
733
|
"csat.autoTrigger"?: boolean;
|
|
683
734
|
"csat.autoTriggerConversationId"?: string | null;
|
|
684
735
|
"csat.showAfterEndChat"?: boolean;
|
|
@@ -746,7 +797,7 @@ export interface AppDisplayState {
|
|
|
746
797
|
* typing edges, visitor info.
|
|
747
798
|
* - `zendesk.*` / `zendeskMessaging.*` — Zendesk handoff SDK control.
|
|
748
799
|
* - `file.*` — handoff file-upload start/cancel/retry/error-dismiss.
|
|
749
|
-
* - `voice.*` —
|
|
800
|
+
* - `voice.*` — Voice call controls.
|
|
750
801
|
* - `ui.*` — widget chrome interactions (close, minimize, dialogs, toasts,
|
|
751
802
|
* viewport, composer-changed edge).
|
|
752
803
|
* - `settings.*` / `appearance.*` — end-user preference changes.
|
|
@@ -888,17 +939,35 @@ export interface AppEvents {
|
|
|
888
939
|
file: File;
|
|
889
940
|
uploadId?: string;
|
|
890
941
|
};
|
|
942
|
+
/** @deprecated No-op alias retained for one release. Use voice.call.* events. */
|
|
891
943
|
"voice.recording.start": undefined;
|
|
944
|
+
/** @deprecated No-op alias retained for one release. Use voice.call.* events. */
|
|
892
945
|
"voice.recording.stop": undefined;
|
|
946
|
+
/** @deprecated No-op alias retained for one release. Use voice.call.* events. */
|
|
893
947
|
"voice.mode.set": {
|
|
894
948
|
mode: "toggle" | "push-to-talk";
|
|
895
949
|
};
|
|
950
|
+
/** @deprecated No-op alias retained for one release. Use voice.call.* events. */
|
|
896
951
|
"voice.transcript.apply": {
|
|
897
952
|
transcript: string;
|
|
898
953
|
};
|
|
954
|
+
/** @deprecated No-op alias retained for one release. Use voice.call.* events. */
|
|
899
955
|
"voice.tts.toggle": {
|
|
900
956
|
enabled: boolean;
|
|
901
957
|
};
|
|
958
|
+
"voice.consent.accept": undefined;
|
|
959
|
+
"voice.consent.decline": undefined;
|
|
960
|
+
"voice.call.start": undefined;
|
|
961
|
+
"voice.call.end": undefined;
|
|
962
|
+
"voice.call.mute": {
|
|
963
|
+
muted: boolean;
|
|
964
|
+
};
|
|
965
|
+
"voice.call.audio.start": undefined;
|
|
966
|
+
"voice.call.interrupt": undefined;
|
|
967
|
+
"voice.text.rendered": {
|
|
968
|
+
turnId: number;
|
|
969
|
+
length: number;
|
|
970
|
+
};
|
|
902
971
|
"ui.closeButton.click": undefined;
|
|
903
972
|
"ui.minimizeButton.click": undefined;
|
|
904
973
|
"ui.drawer.dismiss": undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-cx/messaging-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Types, test mocks, and a thin CDN loader for building a custom app UI on Ada Messaging's bridge contract. The bridge runtime always loads from Ada's CDN.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "ISC",
|