@ada-cx/messaging-bridge 1.6.2 → 1.7.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.
|
@@ -69,6 +69,7 @@ export declare const STATE: {
|
|
|
69
69
|
readonly CONFIG_PRIVACY_LINK: "config.privacyLink";
|
|
70
70
|
readonly CONFIG_PRIVACY: "config.privacy";
|
|
71
71
|
readonly CONFIG_SDK_PLATFORM: "config.sdkPlatform";
|
|
72
|
+
readonly CONFIG_ANDROID_HOST_NAVIGATION: "config.androidHostNavigation";
|
|
72
73
|
readonly CONFIG_SDK_SUPPORTS_DOWNLOAD_LINK: "config.sdkSupportsDownloadLink";
|
|
73
74
|
readonly CONFIG_SHOW_ALL_QUICK_REPLIES: "config.showAllQuickReplies";
|
|
74
75
|
readonly CONFIG_SHOW_BRANDING: "config.showBranding";
|
|
@@ -192,6 +192,14 @@ export interface StagedAttachmentRejection {
|
|
|
192
192
|
/** `too_many` is new with multi-image staging: an exhaustive switch written
|
|
193
193
|
* against the single-image contract needs a case for it. */
|
|
194
194
|
error: "unsupported_type" | "too_large" | "too_many" | "unavailable" | "upload_failed";
|
|
195
|
+
/** The refused file's name, as the chatter's device reported it. Absent when
|
|
196
|
+
* several files of one `chat.attachment.stage` batch were refused, because
|
|
197
|
+
* the one slot can name only one of them. It is user content: show it, and
|
|
198
|
+
* keep it out of logs and monitoring. */
|
|
199
|
+
name?: string;
|
|
200
|
+
/** The refused file's extension in capitals, as in "PDF". Kept when several
|
|
201
|
+
* files of one batch were refused only while they all share it. */
|
|
202
|
+
fileType?: string;
|
|
195
203
|
}
|
|
196
204
|
export interface DownloadableMessage extends BaseMessage {
|
|
197
205
|
type: "downloadable";
|
|
@@ -353,6 +361,12 @@ export interface AppDisplayState {
|
|
|
353
361
|
"config.emailTranscriptEnabled": boolean;
|
|
354
362
|
"config.downloadTranscriptEnabled": boolean;
|
|
355
363
|
"config.sdkPlatform": SdkPlatform;
|
|
364
|
+
/**
|
|
365
|
+
* True only for Ada's own app frame on an Android host.
|
|
366
|
+
* The host supplies metaFields.sdkType as ANDROID. The SDK verifies its own
|
|
367
|
+
* page location is an Ada WebView and retains the signal for its lifetime.
|
|
368
|
+
*/
|
|
369
|
+
"config.androidHostNavigation"?: boolean;
|
|
356
370
|
"config.sdkSupportsDownloadLink": boolean;
|
|
357
371
|
"config.showBranding": boolean;
|
|
358
372
|
/** Reseller/partner name appended after the Ada logomark in the footer. */
|
|
@@ -552,6 +566,8 @@ export interface AppDisplayState {
|
|
|
552
566
|
"liveAgent.platform.name"?: string | null;
|
|
553
567
|
"liveAgent.platform.departmentId"?: number | null;
|
|
554
568
|
"liveAgent.queuePosition"?: number | null;
|
|
569
|
+
/** The estimated wait in whole minutes. Never set together with `queuePosition`. */
|
|
570
|
+
"liveAgent.queueWaitMinutes"?: number | null;
|
|
555
571
|
/** A queue-cancel POST is in flight; the banner's Cancel is disabled while true. */
|
|
556
572
|
"liveAgent.queueCancelPending"?: boolean;
|
|
557
573
|
"liveAgent.handoff.lastEvent"?: {
|
|
@@ -838,6 +854,10 @@ export interface AppEvents {
|
|
|
838
854
|
"chat.attachment.stage": {
|
|
839
855
|
file: File;
|
|
840
856
|
allowMultiple?: boolean;
|
|
857
|
+
/** Shared by every file of one pick or drop. Core then names a refused
|
|
858
|
+
* file in `chat.attachmentRejection` only while it is the one refusal of
|
|
859
|
+
* its batch. Without it, each stage is its own batch. */
|
|
860
|
+
batchId?: string;
|
|
841
861
|
};
|
|
842
862
|
/** Drop the staged image named by `id`; ignored once another pick replaced it. */
|
|
843
863
|
"chat.attachment.remove": {
|
|
@@ -48,6 +48,26 @@ export declare const IMAGE_ATTACHMENT_MIME_TYPES: readonly string[];
|
|
|
48
48
|
* them out in a MIME-only filter.
|
|
49
49
|
*/
|
|
50
50
|
export declare const IMAGE_ATTACHMENT_ACCEPT: string;
|
|
51
|
+
/**
|
|
52
|
+
* The most characters a refused file's name takes in an upload error, so the
|
|
53
|
+
* name fits one line of the toast in a 320px window.
|
|
54
|
+
*/
|
|
55
|
+
export declare const REFUSED_FILE_NAME_MAX_LENGTH = 32;
|
|
56
|
+
/**
|
|
57
|
+
* The file name to show in front of an upload error. A long name loses its
|
|
58
|
+
* middle, so the extension stays visible. Returns null when no name is left.
|
|
59
|
+
*/
|
|
60
|
+
export declare function formatRefusedFileName(
|
|
61
|
+
name: string | null | undefined,
|
|
62
|
+
): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* The refused file's type as its extension in capitals, as in "PDF", for an
|
|
65
|
+
* upload error that says which type was refused. Returns null when the name has
|
|
66
|
+
* no usable extension; the error then falls back to "This file type".
|
|
67
|
+
*/
|
|
68
|
+
export declare function refusedFileTypeLabel(
|
|
69
|
+
name: string | null | undefined,
|
|
70
|
+
): string | null;
|
|
51
71
|
/** Typed bridge contract for file-upload failures shown to the chatter. */
|
|
52
72
|
export interface FileUploadErrorData {
|
|
53
73
|
reason?: FileUploadErrorReason;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-cx/messaging-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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",
|