@epam/ai-dial-chat-shared 1.1.0-rc.0 → 1.1.0-rc.2
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/index.d.ts +65 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -70,6 +70,53 @@ export declare interface AnnotationTarget {
|
|
|
70
70
|
selector?: AnnotationSelector;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* A single application → grouped visualizer mapping from the
|
|
75
|
+
* `APPLICATION_VISUALIZERS` registry. Field semantics are fixed by
|
|
76
|
+
* already-deployed visualizer applications and operator configurations
|
|
77
|
+
* carried over from legacy Chat 0.x, which is why `contentType` is optional
|
|
78
|
+
* here while `CustomVisualizer.contentType` is required.
|
|
79
|
+
*/
|
|
80
|
+
export declare interface ApplicationVisualizer {
|
|
81
|
+
/**
|
|
82
|
+
* The postMessage protocol namespace, NOT a display label. Every message
|
|
83
|
+
* exchanged with the iframe is prefixed `${title}/…`, and the iframe-side
|
|
84
|
+
* visualizer application must be constructed with this identical string
|
|
85
|
+
* as its `appName`. A mismatch is a silent failure — the iframe loads but
|
|
86
|
+
* never receives data. Also used as the inline frame's header text.
|
|
87
|
+
*/
|
|
88
|
+
title: string;
|
|
89
|
+
/** Human-readable description of the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
|
|
90
|
+
description?: string;
|
|
91
|
+
/** Icon URL or identifier for the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
|
|
92
|
+
icon?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Comma-separated list of MIME types this entry claims (e.g.
|
|
95
|
+
* `'application/vnd.plotly.v1+json'` or
|
|
96
|
+
* `'application/vnd.plotly.v1+json, application/vnd.vega.v5+json'`).
|
|
97
|
+
* Stored verbatim; splitting happens at lookup time. When omitted, the
|
|
98
|
+
* entry claims every attachment that carries a URL.
|
|
99
|
+
*/
|
|
100
|
+
contentType?: string;
|
|
101
|
+
/** Absolute HTTP(S) URL of the visualizer iframe. */
|
|
102
|
+
url: string;
|
|
103
|
+
/** Milliseconds to wait for a `send()` request's `/RESPONSE` before rejecting. Defaults to `10000`. Does NOT bound the initial handshake. */
|
|
104
|
+
requestTimeout?: number;
|
|
105
|
+
/** Suggested initial width of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
|
|
106
|
+
width?: number;
|
|
107
|
+
/** Suggested initial height of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame. */
|
|
108
|
+
height?: number;
|
|
109
|
+
/** Suggested height on mobile viewports in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame on mobile. */
|
|
110
|
+
mobileHeight?: number;
|
|
111
|
+
/** Whether the host should pass auth info to the visualizer. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
|
|
112
|
+
passAuthInfo?: boolean;
|
|
113
|
+
/** Whether the host should pass an explicit access token. Accepted for operator-configuration parity; inert, because 1.0 auth is server-side and the browser holds no access token. */
|
|
114
|
+
passExplicitToken?: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** The `APPLICATION_VISUALIZERS` registry: application id → grouped visualizer entry. */
|
|
118
|
+
export declare type ApplicationVisualizerRegistry = Record<string, ApplicationVisualizer>;
|
|
119
|
+
|
|
73
120
|
/** Attachment selected locally by the user before it is sent to the backend. */
|
|
74
121
|
export declare interface Attachment extends DisplayAttachment {
|
|
75
122
|
/** The underlying browser `File` object selected by the user. */
|
|
@@ -1192,6 +1239,24 @@ export declare const getParentFolderPath: (path: string) => string;
|
|
|
1192
1239
|
/** Returns the UTF-8 byte length of `str`. */
|
|
1193
1240
|
export declare const getUtf8ByteLength: (str: string) => number;
|
|
1194
1241
|
|
|
1242
|
+
/** A single attachment handed to a grouped visualizer inside `SEND_GROUPED_VISUALIZE_DATA`. */
|
|
1243
|
+
export declare interface GroupedAttachmentItem {
|
|
1244
|
+
/** Absolute URL of the attachment, resolved by the host before sending. */
|
|
1245
|
+
url: string;
|
|
1246
|
+
/** The attachment's own MIME type. */
|
|
1247
|
+
mimeType: string;
|
|
1248
|
+
/** Presentation layout plus the opaque per-attachment payload. */
|
|
1249
|
+
visualizerData: CustomVisualizerData;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/** Payload of a `SEND_GROUPED_VISUALIZE_DATA` request: every claimed attachment plus the shared presentation layout. */
|
|
1253
|
+
export declare interface GroupedAttachmentsData {
|
|
1254
|
+
/** One item per claimed attachment, in the message's attachment order. */
|
|
1255
|
+
attachments: GroupedAttachmentItem[];
|
|
1256
|
+
/** Presentation layout hints shared by every item. */
|
|
1257
|
+
layout: CustomVisualizerDataLayout;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1195
1260
|
/** Minimal hast shapes this plugin reads and writes. */
|
|
1196
1261
|
declare interface HastNode {
|
|
1197
1262
|
type: string;
|
package/package.json
CHANGED