@ada-cx/messaging-bridge 1.11.3 → 1.12.1

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.
@@ -131,6 +131,23 @@ export interface QuickReply {
131
131
  buttonType: "suggestion" | "switch" | "accepted_value";
132
132
  /** Raw accepted value, used as the utterance only when the label is absent. */
133
133
  value?: string;
134
+ /** Card content for an `accepted_value` chip. When every chip is an accepted value
135
+ * whose card has an `image` or a `description`, the default app renders the set
136
+ * as cards. */
137
+ card?: QuickReplyCard;
138
+ }
139
+ export interface QuickReplyCard {
140
+ title: string;
141
+ description?: string;
142
+ /** Always an `https://` URL. */
143
+ image?: {
144
+ url: string;
145
+ alt?: string;
146
+ };
147
+ /** Text of the card's button. When absent, the card has no button and the whole
148
+ * card is the tap target, as in the default app. The api drops the label from every
149
+ * card in the set when any option cannot render it, so a set is consistent. */
150
+ buttonLabel?: string;
134
151
  }
135
152
  export interface QuickRepliesMessage extends BaseMessage {
136
153
  type: "quick_replies";
@@ -11,6 +11,6 @@ export type { BridgeClient } from "../contract/bridge-client.js";
11
11
  export type { MessageGroupingEntry, UnreadSelection } from "../contract/derive.js";
12
12
  export type { BridgeClientDestroyedError, BridgeOperations, BridgeOperationsHost, CaptureHandle, CsatSubmitHandle, EndChatEligibilityResult, FileUploadHandle, ObserveOptions, OperationResult, SendHandle, SettleOptions, } from "../contract/operations.js";
13
13
  export type { StateKey } from "../contract/state-keys.js";
14
- export type { AppDisplayState, AppEvents, CaptureData, CsatMessage, CsatScaleType, DownloadableMessage, FallbackUiConfig, LinkMessage, ListSelectionData, LiveChatStateData, Message, NotificationPermissionMessage, OptionItem, OptionsMessage, PictureMessage, PresenceMessage, QueueBotBlockMessage, QuickRepliesMessage, QuickReply, SdkPlatform, SeamlessOAuthMessage, SelectableListItem, SelectableListMessage, SignInMessage, StagedAttachment, StagedAttachmentRejection, TextMessage, VideoMessage, WidgetMessage, } from "../contract/types.js";
14
+ export type { AppDisplayState, AppEvents, CaptureData, CsatMessage, CsatScaleType, DownloadableMessage, FallbackUiConfig, LinkMessage, ListSelectionData, LiveChatStateData, Message, NotificationPermissionMessage, OptionItem, OptionsMessage, PictureMessage, PresenceMessage, QueueBotBlockMessage, QuickRepliesMessage, QuickReply, QuickReplyCard, SdkPlatform, SeamlessOAuthMessage, SelectableListItem, SelectableListMessage, SignInMessage, StagedAttachment, StagedAttachmentRejection, TextMessage, VideoMessage, WidgetMessage, } from "../contract/types.js";
15
15
  export type { LoadMessagingBridgeOptions, MessagingBridgeLoadErrorCode, MessagingBridgeModule, } from "./loader.js";
16
16
  export { FALLBACK_CDN_BASE, loadMessagingBridge, MessagingBridgeLoadError, resolveBridgeCdnUrl, } from "./loader.js";
@@ -27,17 +27,11 @@ export declare const IMAGE_ATTACHMENT_MAX_BYTES: number;
27
27
  /**
28
28
  * How many images one send may carry.
29
29
  *
30
- * Not an api limit on this path. `MAX_DESCRIBED_IMAGE_ATTACHMENTS` is read in
31
- * one api runtime site, `resolve_email_image_attachments_suffix`, which is the
32
- * email channel; the bot path posts one `downloadable` per image and describes
33
- * each through `resolve_uploaded_file_message_body`, which caps nothing. api
34
- * also never reads `attachment_group_id` outside analytics, so it cannot batch
35
- * a group into one describe budget. A fourth image would be hosted, rendered
36
- * *and* described — in its own reasoner turn.
37
- *
38
- * So the cap is a product decision about that cost, not a ceiling api imposes:
39
- * each extra image buys another bot turn and another describe call. Match it to
40
- * `MAX_DESCRIBED_IMAGE_ATTACHMENTS` by coincidence of value only.
30
+ * api answers one send in one reasoner turn and describes at most
31
+ * `MAX_DESCRIBED_IMAGE_ATTACHMENTS` of its images there. It holds at most
32
+ * `MAX_HELD_ROWS` rows besides the final row, so a fourth image would start
33
+ * a turn of its own. Keep this value equal to `MAX_DESCRIBED_IMAGE_ATTACHMENTS`
34
+ * (3) and to `MAX_HELD_ROWS` plus the final row (2 + 1).
41
35
  */
42
36
  export declare const IMAGE_ATTACHMENT_MAX_COUNT = 3;
43
37
  /** The image types api's attachments route accepts; HEIC/HEIF are transcoded to JPEG there. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-cx/messaging-bridge",
3
- "version": "1.11.3",
3
+ "version": "1.12.1",
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",