@ada-cx/messaging-bridge 1.10.2 → 1.11.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/README.md CHANGED
@@ -382,6 +382,10 @@ await handle.settled();
382
382
 
383
383
  - `AppDisplayState` is the full state shape core publishes. `AppEvents` maps
384
384
  each sendable event to its payload type.
385
+ - `endChat.minimizeAfterThanks` asks the SDK to minimize the drawer after 1000 ms if it stays visible.
386
+ The SDK ignores this request in parent-element mode.
387
+ - Core cancels a pending minimize on restart, conversation change, or cleared ended flags. The SDK cancels on app frame teardown.
388
+ Custom apps need no separate cancellation request.
385
389
  - `app.initialize` is mandatory. Send it within 15 seconds of frame load.
386
390
  - The runtime derives the core origin from `document.referrer`, or locks it
387
391
  on the first valid state message. It rejects state from other origins.
@@ -88,6 +88,7 @@ export declare const STATE: {
88
88
  readonly CSAT_AUTO_TRIGGER: "csat.autoTrigger";
89
89
  readonly CSAT_AUTO_TRIGGER_CONVERSATION_ID: "csat.autoTriggerConversationId";
90
90
  readonly CSAT_SUBMIT_SUCCESS_SAME_GENERATION: "csat.submitSuccess.sameGeneration";
91
+ readonly END_CHAT_COMPLETED_SEQ: "endChat.completedSeq";
91
92
  readonly FILE_TRANSFER: "file.transfer";
92
93
  readonly FILE_UPLOAD_ERROR: "file.uploadError";
93
94
  readonly FEATURE_FLAGS: "featureFlags";
@@ -74,8 +74,7 @@ export interface ListSelectionData {
74
74
  dataId: string;
75
75
  }
76
76
  /**
77
- * `waiting_for_data`: the bot is blocked on an external system and api asked the
78
- * client to say so. Mirrors core's `conversation.stateData.liveChat` payload.
77
+ * @deprecated api no longer sends this state. Always null. Removed in 2.0.
79
78
  */
80
79
  export interface LiveChatStateData {
81
80
  notificationMessage: string;
@@ -269,12 +268,7 @@ export interface SignInMessage extends BaseMessage {
269
268
  messageLead: string;
270
269
  }
271
270
  /**
272
- * Silent OAuth. api emits this when a Sign In block resolves to a provider the
273
- * chatter is already authenticated with in this browser.
274
- *
275
- * There is no visible UI — the row loads `authLink` in a hidden iframe so the
276
- * provider's existing session cookie completes the flow and api resumes the
277
- * conversation on its own.
271
+ * @deprecated api no longer sends this message. Removed in 2.0.
278
272
  */
279
273
  export interface SeamlessOAuthMessage extends BaseMessage {
280
274
  type: "seamless_oauth";
@@ -308,7 +302,9 @@ export interface CsatMessage extends BaseMessage {
308
302
  netPromoterScore?: number | null;
309
303
  isPositive?: boolean | null;
310
304
  }
311
- export type Message = TextMessage | QuickRepliesMessage | LinkMessage | PictureMessage | VideoMessage | DownloadableMessage | PresenceMessage | QueueBotBlockMessage | SelectableListMessage | OptionsMessage | NotificationPermissionMessage | SeamlessOAuthMessage | SignInMessage | WidgetMessage | CsatMessage;
305
+ export type Message = TextMessage | QuickRepliesMessage | LinkMessage | PictureMessage | VideoMessage | DownloadableMessage | PresenceMessage | QueueBotBlockMessage | SelectableListMessage | OptionsMessage | NotificationPermissionMessage
306
+ /** @deprecated api no longer sends this message. Removed in 2.0. */
307
+ | SeamlessOAuthMessage | SignInMessage | WidgetMessage | CsatMessage;
312
308
  /** Native SDK wrapper hosting the widget; null on the web. */
313
309
  export type SdkPlatform = "IOS" | "ANDROID" | "REACTNATIVE" | null;
314
310
  /**
@@ -478,7 +474,7 @@ export interface AppDisplayState {
478
474
  "conversation.inState"?: boolean;
479
475
  "conversation.stateData.capture": CaptureData | null;
480
476
  "conversation.stateData.listSelection": ListSelectionData | null;
481
- /** `waiting_for_data`: null unless the bot is blocked on an external system. */
477
+ /** @deprecated Always null. Removed in 2.0. */
482
478
  "conversation.stateData.liveChat": LiveChatStateData | null;
483
479
  /** The transcript. Updates on any append/upsert/stream delta/reaction/
484
480
  * history load; array identity changes on EVERY streaming delta, so
@@ -704,6 +700,8 @@ export interface AppDisplayState {
704
700
  * has sent in it, and a conversation id exists. Gates the header close
705
701
  * affordance. */
706
702
  "endChat.canEnd"?: boolean;
703
+ /** Advances after an accepted terminal End Chat, excluding inline surveys and agent-leg ends. */
704
+ "endChat.completedSeq"?: number;
707
705
  "config.isParentElementMode"?: boolean;
708
706
  "config.hideDefaultHeader"?: boolean;
709
707
  "ui.secretMessage.isOpen"?: boolean;
@@ -991,6 +989,11 @@ export interface AppEvents {
991
989
  * after the live chat had already ended (`liveAgent.liveChatEndedInConversation`).
992
990
  */
993
991
  "endChat.skipCsat": undefined;
992
+ /**
993
+ * Ask the SDK to minimize the drawer after 1000 ms if it stays visible.
994
+ * The SDK ignores this request in parent-element mode.
995
+ */
996
+ "endChat.minimizeAfterThanks": undefined;
994
997
  "csat.close": {
995
998
  conversationId: string | null;
996
999
  surveyType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-cx/messaging-bridge",
3
- "version": "1.10.2",
3
+ "version": "1.11.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",