@epam/ai-dial-chat-shared 1.3.0-dev.6 → 1.3.0-dev.63

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.
Files changed (244) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.d.ts +41 -0
  2. package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
  3. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
  4. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
  5. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
  6. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
  7. package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
  8. package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  9. package/components/ConfirmationView/ConfirmationFooter.js +3 -1
  10. package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
  11. package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  12. package/components/ConfirmationView/ConfirmationView.js +15 -14
  13. package/components/CopyButton/CopyButton.d.ts +19 -0
  14. package/components/CopyButton/CopyButton.d.ts.map +1 -0
  15. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
  16. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
  17. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.js +34 -0
  18. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
  19. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
  20. package/components/DeleteConfirmationView/DeleteConfirmationView.js +37 -0
  21. package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +6 -0
  22. package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
  23. package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
  24. package/components/EntityHeader/EntityHeader.d.ts +38 -0
  25. package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  26. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
  27. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
  28. package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
  29. package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
  30. package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
  31. package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
  32. package/components/ItemHeader/ItemHeader.d.ts +36 -0
  33. package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
  34. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +53 -0
  35. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
  36. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
  37. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
  38. package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
  39. package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
  40. package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
  41. package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
  42. package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
  43. package/components/MarkdownRenderer/MarkdownRenderer.js +136 -129
  44. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
  45. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
  46. package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
  47. package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
  48. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
  49. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
  50. package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
  51. package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
  52. package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
  53. package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
  54. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
  55. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
  56. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
  57. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
  58. package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
  59. package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
  60. package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
  61. package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
  62. package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
  63. package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
  64. package/components/MarkdownRenderer/markdown-whitespace.js +18 -0
  65. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
  66. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
  67. package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
  68. package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
  69. package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
  70. package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
  71. package/components/TextRefinementField/TextRefinementField.d.ts +31 -0
  72. package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
  73. package/constants/breakpoint.d.ts +9 -0
  74. package/constants/breakpoint.d.ts.map +1 -0
  75. package/constants/dial.d.ts +5 -0
  76. package/constants/dial.d.ts.map +1 -0
  77. package/constants/entity-colors.d.ts +6 -0
  78. package/constants/entity-colors.d.ts.map +1 -0
  79. package/constants/icon.d.ts +14 -0
  80. package/constants/icon.d.ts.map +1 -0
  81. package/constants/markdown-editor.d.ts +2 -0
  82. package/constants/markdown-editor.d.ts.map +1 -0
  83. package/constants/mime-types.d.ts +27 -0
  84. package/constants/mime-types.d.ts.map +1 -0
  85. package/constants/public-class-names.d.ts +13 -0
  86. package/constants/public-class-names.d.ts.map +1 -0
  87. package/constants/resizable-fields.d.ts +5 -0
  88. package/constants/resizable-fields.d.ts.map +1 -0
  89. package/constants/select-list.d.ts +4 -0
  90. package/constants/select-list.d.ts.map +1 -0
  91. package/constants/tag-input.d.ts +2 -0
  92. package/constants/tag-input.d.ts.map +1 -0
  93. package/entry-points/file-manager.d.ts +5 -0
  94. package/entry-points/file-manager.d.ts.map +1 -0
  95. package/entry-points/markdown.d.ts +19 -0
  96. package/entry-points/markdown.d.ts.map +1 -0
  97. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +58 -0
  98. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
  99. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +223 -214
  100. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
  101. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
  102. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +2 -1
  103. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
  104. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
  105. package/file-manager/attach-result.d.ts +9 -0
  106. package/file-manager/attach-result.d.ts.map +1 -0
  107. package/file-manager/file-manager-controller.d.ts +121 -0
  108. package/file-manager/file-manager-controller.d.ts.map +1 -0
  109. package/file-manager/file-manager-variant.d.ts +21 -0
  110. package/file-manager/file-manager-variant.d.ts.map +1 -0
  111. package/file-manager/file-upload-validation.d.ts +8 -0
  112. package/file-manager/file-upload-validation.d.ts.map +1 -0
  113. package/file-manager/index.d.ts +10 -0
  114. package/file-manager/index.d.ts.map +1 -0
  115. package/file-manager/labels.d.ts +156 -0
  116. package/file-manager/labels.d.ts.map +1 -0
  117. package/file-manager/path.d.ts +12 -0
  118. package/file-manager/path.d.ts.map +1 -0
  119. package/file-manager/upload-batch.d.ts +29 -0
  120. package/file-manager/upload-batch.d.ts.map +1 -0
  121. package/file-manager/upload-queue.d.ts +5 -0
  122. package/file-manager/upload-queue.d.ts.map +1 -0
  123. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
  124. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
  125. package/file-manager.d.ts +2 -506
  126. package/hooks/useAvailableHeightCap.d.ts +30 -0
  127. package/hooks/useAvailableHeightCap.d.ts.map +1 -0
  128. package/hooks/useCodeCopy.d.ts +6 -0
  129. package/hooks/useCodeCopy.d.ts.map +1 -0
  130. package/hooks/useCollapsedText.d.ts +27 -0
  131. package/hooks/useCollapsedText.d.ts.map +1 -0
  132. package/hooks/useHorizontalOverflow.d.ts +21 -0
  133. package/hooks/useHorizontalOverflow.d.ts.map +1 -0
  134. package/hooks/useIsMobile.d.ts +3 -0
  135. package/hooks/useIsMobile.d.ts.map +1 -0
  136. package/hooks/useStreamedMarkdownContent.d.ts +3 -0
  137. package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
  138. package/hooks/useTextRefinement.d.ts +44 -0
  139. package/hooks/useTextRefinement.d.ts.map +1 -0
  140. package/hooks/useUnsavedChangesGuard.d.ts +14 -0
  141. package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  142. package/index.css +2 -2
  143. package/index.d.ts +78 -3072
  144. package/index.d.ts.map +1 -0
  145. package/index.js +28 -25
  146. package/markdown.d.ts +2 -465
  147. package/markdown.js +3 -2
  148. package/models/annotation.d.ts +143 -0
  149. package/models/annotation.d.ts.map +1 -0
  150. package/models/application-visualizer.d.ts +67 -0
  151. package/models/application-visualizer.d.ts.map +1 -0
  152. package/models/auth.d.ts +26 -0
  153. package/models/auth.d.ts.map +1 -0
  154. package/models/chat.d.ts +407 -0
  155. package/models/chat.d.ts.map +1 -0
  156. package/models/conversation-classification.d.ts +9 -0
  157. package/models/conversation-classification.d.ts.map +1 -0
  158. package/models/conversation-transfer.d.ts +96 -0
  159. package/models/conversation-transfer.d.ts.map +1 -0
  160. package/models/custom-visualizer.d.ts +61 -0
  161. package/models/custom-visualizer.d.ts.map +1 -0
  162. package/models/deployment-configuration.d.ts +55 -0
  163. package/models/deployment-configuration.d.ts.map +1 -0
  164. package/models/deployment-features.d.ts +17 -0
  165. package/models/deployment-features.d.ts.map +1 -0
  166. package/models/deployment.d.ts +31 -0
  167. package/models/deployment.d.ts.map +1 -0
  168. package/models/dial-model.d.ts +19 -0
  169. package/models/dial-model.d.ts.map +1 -0
  170. package/models/entity.d.ts +15 -0
  171. package/models/entity.d.ts.map +1 -0
  172. package/models/import-export.d.ts +23 -0
  173. package/models/import-export.d.ts.map +1 -0
  174. package/models/inline-segment.d.ts +11 -0
  175. package/models/inline-segment.d.ts.map +1 -0
  176. package/models/locale.d.ts +19 -0
  177. package/models/locale.d.ts.map +1 -0
  178. package/models/text-refinement.d.ts +18 -0
  179. package/models/text-refinement.d.ts.map +1 -0
  180. package/models/theme.d.ts +36 -0
  181. package/models/theme.d.ts.map +1 -0
  182. package/models/tool-menu-item.d.ts +13 -0
  183. package/models/tool-menu-item.d.ts.map +1 -0
  184. package/package.json +3 -3
  185. package/types/attachment.d.ts +25 -0
  186. package/types/attachment.d.ts.map +1 -0
  187. package/types/code-editor.d.ts +8 -0
  188. package/types/code-editor.d.ts.map +1 -0
  189. package/types/entity-type.d.ts +10 -0
  190. package/types/entity-type.d.ts.map +1 -0
  191. package/types/file-manager-node.d.ts +17 -0
  192. package/types/file-manager-node.d.ts.map +1 -0
  193. package/types/mime-type.d.ts +59 -0
  194. package/types/mime-type.d.ts.map +1 -0
  195. package/utils/annotation.d.ts +29 -0
  196. package/utils/annotation.d.ts.map +1 -0
  197. package/utils/avatar-color.d.ts +10 -0
  198. package/utils/avatar-color.d.ts.map +1 -0
  199. package/utils/build-css-vars.d.ts +4 -0
  200. package/utils/build-css-vars.d.ts.map +1 -0
  201. package/utils/copy-to-clipboard.d.ts +18 -0
  202. package/utils/copy-to-clipboard.d.ts.map +1 -0
  203. package/utils/entity-field-limits.d.ts +11 -0
  204. package/utils/entity-field-limits.d.ts.map +1 -0
  205. package/utils/entity-type.d.ts +5 -0
  206. package/utils/entity-type.d.ts.map +1 -0
  207. package/utils/file-download.d.ts +21 -0
  208. package/utils/file-download.d.ts.map +1 -0
  209. package/utils/format-file-size.d.ts +3 -0
  210. package/utils/format-file-size.d.ts.map +1 -0
  211. package/utils/format-last-used.d.ts +3 -0
  212. package/utils/format-last-used.d.ts.map +1 -0
  213. package/utils/format-price.d.ts +7 -0
  214. package/utils/format-price.d.ts.map +1 -0
  215. package/utils/generate-uuid.d.ts +3 -0
  216. package/utils/generate-uuid.d.ts.map +1 -0
  217. package/utils/initials.d.ts +3 -0
  218. package/utils/initials.d.ts.map +1 -0
  219. package/utils/inline-segments.d.ts +38 -0
  220. package/utils/inline-segments.d.ts.map +1 -0
  221. package/utils/inline-segments.js +53 -0
  222. package/utils/is-audio-transcription-supported.d.ts +3 -0
  223. package/utils/is-audio-transcription-supported.d.ts.map +1 -0
  224. package/utils/is-skill-selection-unsupported.d.ts +3 -0
  225. package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
  226. package/utils/latex.d.ts +21 -0
  227. package/utils/latex.d.ts.map +1 -0
  228. package/utils/markdown-html.d.ts +14 -0
  229. package/utils/markdown-html.d.ts.map +1 -0
  230. package/utils/markdown-html.js +11 -0
  231. package/utils/merge-class.d.ts +4 -0
  232. package/utils/merge-class.d.ts.map +1 -0
  233. package/utils/message-attachment-to-display.d.ts +22 -0
  234. package/utils/message-attachment-to-display.d.ts.map +1 -0
  235. package/utils/message.d.ts +4 -0
  236. package/utils/message.d.ts.map +1 -0
  237. package/utils/mime-type.d.ts +22 -0
  238. package/utils/mime-type.d.ts.map +1 -0
  239. package/utils/prompt-variables.d.ts +62 -0
  240. package/utils/prompt-variables.d.ts.map +1 -0
  241. package/utils/string-utils.d.ts +11 -0
  242. package/utils/string-utils.d.ts.map +1 -0
  243. package/utils/syntax-highlighting.d.ts +8 -0
  244. package/utils/syntax-highlighting.d.ts.map +1 -0
@@ -0,0 +1,143 @@
1
+ /** Selector that targets a character range in a text string. All indices are inclusive. */
2
+ export interface TextCharacterRangeSelector {
3
+ /** Discriminator — always `'text_character_range'`. */
4
+ type: 'text_character_range';
5
+ /** Zero-based start index (inclusive). */
6
+ start: number;
7
+ /** Zero-based end index (inclusive). */
8
+ end: number;
9
+ }
10
+ /** Selector that targets an axis-aligned bounding box on a specific PDF page. */
11
+ export interface PdfBBoxSelector {
12
+ /** Discriminator — always `'pdf_bbox'`. */
13
+ type: 'pdf_bbox';
14
+ /** 1-based PDF page number. */
15
+ page: number;
16
+ /** Left edge coordinate. */
17
+ x1: number;
18
+ /** Top edge coordinate. */
19
+ y1: number;
20
+ /** Right edge coordinate. */
21
+ x2: number;
22
+ /** Bottom edge coordinate. */
23
+ y2: number;
24
+ }
25
+ /** Selector that targets a paired inline tag (e.g. `<cit data-id="…"></cit>`) by its `id` value. */
26
+ export interface HtmlTagSelector {
27
+ /** Discriminator — always `'html_tag'`. */
28
+ type: 'html_tag';
29
+ /** The tag name (e.g. `'cit'`). */
30
+ tag: string;
31
+ /** Matches the tag's `data-id` attribute value in the message text, used to associate this selector with its rendered position. */
32
+ id: string;
33
+ }
34
+ /**
35
+ * Selector that targets a character range inside a DOCX story. Confirmed
36
+ * against captured DIAL Core responses: unlike {@link TextCharacterRangeSelector},
37
+ * `end` is already exclusive on the wire, not inclusive.
38
+ */
39
+ export interface DocxRangeSelector {
40
+ /** Discriminator — always `'docx_text_range'`. */
41
+ type: 'docx_text_range';
42
+ /** Name of the DOCX story the range lives in, as an opaque string (only `'body'` is confirmed upstream — no closed set). */
43
+ story: string;
44
+ /** Source-tree element indices identifying the paragraph, matched element-wise. */
45
+ path: number[];
46
+ /** Zero-based start character offset within the story's matched text. */
47
+ start: number;
48
+ /** Zero-based end character offset — already exclusive on the wire. */
49
+ end: number;
50
+ /** The cited text, expected to equal the text resolved over `[start, end)`. */
51
+ text: string;
52
+ }
53
+ /**
54
+ * Selector that targets a character range inside a single shape on one PPTX
55
+ * slide. Confirmed against captured DIAL Core responses: unlike
56
+ * {@link TextCharacterRangeSelector}, `end` is already exclusive on the wire.
57
+ */
58
+ export interface PptxRangeSelector {
59
+ /** Discriminator — always `'pptx_text_range'`. */
60
+ type: 'pptx_text_range';
61
+ /** 1-based slide number. */
62
+ slide: number;
63
+ /** Shape identifier, compared as a string against the run's own shape id. */
64
+ shape_id: string;
65
+ /** Zero-based start character offset within the shape's matched text. */
66
+ start: number;
67
+ /** Zero-based end character offset — already exclusive on the wire. */
68
+ end: number;
69
+ /** The cited text, expected to equal the text resolved over `[start, end)`. */
70
+ text: string;
71
+ }
72
+ /** A 1-based cell address on an XLSX sheet. */
73
+ export interface ExcelCellAddress {
74
+ /** 1-based row number. */
75
+ row: number;
76
+ /** 1-based column number. */
77
+ col: number;
78
+ }
79
+ /** Selector that targets one cell, or a contiguous same-row cell range, on a named XLSX sheet. */
80
+ export interface ExcelRcRangeSelector {
81
+ /** Discriminator — always `'excel_rc_range'`. */
82
+ type: 'excel_rc_range';
83
+ /** Sheet name, matched exactly against the workbook's own sheet names. */
84
+ sheet: string;
85
+ /** First cell of the range. */
86
+ start: ExcelCellAddress;
87
+ /** Last (inclusive) cell of the range, on the same row as `start`. `null` and omitted both mean a single cell. */
88
+ end?: ExcelCellAddress | null;
89
+ }
90
+ /**
91
+ * Discriminated union of all recognised annotation selector shapes.
92
+ * Unknown selector types are preserved as an open record to allow forward-compatibility.
93
+ */
94
+ export type AnnotationSelector = TextCharacterRangeSelector | PdfBBoxSelector | HtmlTagSelector | DocxRangeSelector | PptxRangeSelector | ExcelRcRangeSelector | {
95
+ type: string;
96
+ [key: string]: unknown;
97
+ };
98
+ /** Identifies the part of the message (or a related resource) that the annotation refers to. */
99
+ export interface AnnotationTarget {
100
+ /** Source resource being targeted. `null` or absent means the first content part of the response. */
101
+ source?: unknown;
102
+ /** Character-range or document-region selector within the targeted source. */
103
+ selector?: AnnotationSelector;
104
+ }
105
+ /** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
106
+ export interface AttachmentResource {
107
+ /** MIME type of the attached file (e.g. `'application/pdf'`). */
108
+ type: string;
109
+ /** Remote URL pointing to the file content. */
110
+ url: string;
111
+ /** Human-readable display name for the file. Used in citation markers. */
112
+ title?: string;
113
+ }
114
+ /** Identifies the cited document attached to the annotation. */
115
+ export interface AnnotationSource {
116
+ /** Always `'attachment'` for file-based sources. */
117
+ type: 'attachment';
118
+ /** The cited file — auto-shared by DIAL Core so the recipient can access it. */
119
+ attachment: AttachmentResource;
120
+ }
121
+ /** Payload of the annotation: the cited text excerpt, its source document, and optional styling hints. */
122
+ export interface AnnotationBody {
123
+ /** Human-readable title of the cited section or document. */
124
+ title?: string;
125
+ /** The literal text excerpt being cited. */
126
+ quote?: string;
127
+ /** The cited source document (present when the annotation references a file). */
128
+ source?: AnnotationSource;
129
+ /** Selectors pointing to the cited region within the source document. */
130
+ selector?: AnnotationSelector | AnnotationSelector[];
131
+ /** Client-defined styling hints (e.g. highlight color). Treated as open-ended; unknown keys are preserved. */
132
+ configuration?: Record<string, unknown>;
133
+ }
134
+ /** A single annotation attached to an assistant message, optionally citing a source document. */
135
+ export interface Annotation {
136
+ /** Zero-based position in the annotation list; used to merge streaming delta updates. */
137
+ index?: number;
138
+ /** Which part of the message text (or a request resource) is annotated. */
139
+ target?: AnnotationTarget;
140
+ /** The annotation payload: quoted text, source document, and optional styling. */
141
+ body?: AnnotationBody;
142
+ }
143
+ //# sourceMappingURL=annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/models/annotation.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,67 @@
1
+ import { CustomVisualizerData, CustomVisualizerDataLayout } from './custom-visualizer';
2
+ /**
3
+ * A single application → grouped visualizer mapping from the
4
+ * `APPLICATION_VISUALIZERS` registry. Field semantics are fixed by
5
+ * already-deployed visualizer applications and operator configurations
6
+ * carried over from legacy Chat 0.x, which is why `contentType` is optional
7
+ * here while `CustomVisualizer.contentType` is required.
8
+ */
9
+ export interface ApplicationVisualizer {
10
+ /**
11
+ * The postMessage protocol namespace, NOT a display label. Every message
12
+ * exchanged with the iframe is prefixed `${title}/…`, and the iframe-side
13
+ * visualizer application must be constructed with this identical string
14
+ * as its `appName`. A mismatch is a silent failure — the iframe loads but
15
+ * never receives data. Also used as the inline frame's header text.
16
+ */
17
+ title: string;
18
+ /** Human-readable description of the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
19
+ description?: string;
20
+ /** Icon URL or identifier for the visualizer. Accepted for operator-configuration parity; not consumed by host logic. */
21
+ icon?: string;
22
+ /**
23
+ * Comma-separated list of MIME types this entry claims (e.g.
24
+ * `'application/vnd.plotly.v1+json'` or
25
+ * `'application/vnd.plotly.v1+json, application/vnd.vega.v5+json'`).
26
+ * Stored verbatim; splitting happens at lookup time. When omitted, the
27
+ * entry claims every attachment that carries a URL.
28
+ */
29
+ contentType?: string;
30
+ /** Absolute HTTP(S) URL of the visualizer iframe. */
31
+ url: string;
32
+ /** Milliseconds to wait for a `send()` request's `/RESPONSE` before rejecting. Defaults to `10000`. Does NOT bound the initial handshake. */
33
+ requestTimeout?: number;
34
+ /** Suggested initial width of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`. */
35
+ width?: number;
36
+ /** Suggested initial height of the visualizer surface in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame. */
37
+ height?: number;
38
+ /** Suggested height on mobile viewports in pixels. Forwarded as-is in `CustomVisualizerDataLayout`, and used by the host to size the inline frame on mobile. */
39
+ mobileHeight?: number;
40
+ /** 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. */
41
+ passAuthInfo?: boolean;
42
+ /** 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. */
43
+ passExplicitToken?: boolean;
44
+ /** When `true`, the host renders the inline frame without its border, rounded corners, background, and header divider. */
45
+ borderless?: boolean;
46
+ /** When `true`, the host hides the inline frame's header title text; the header actions stay visible. */
47
+ withoutTitle?: boolean;
48
+ }
49
+ /** The `APPLICATION_VISUALIZERS` registry: application id → grouped visualizer entry. */
50
+ export type ApplicationVisualizerRegistry = Record<string, ApplicationVisualizer>;
51
+ /** A single attachment handed to a grouped visualizer inside `SEND_GROUPED_VISUALIZE_DATA`. */
52
+ export interface GroupedAttachmentItem {
53
+ /** Absolute URL of the attachment, resolved by the host before sending. */
54
+ url: string;
55
+ /** The attachment's own MIME type. */
56
+ mimeType: string;
57
+ /** Presentation layout plus the opaque per-attachment payload. */
58
+ visualizerData: CustomVisualizerData;
59
+ }
60
+ /** Payload of a `SEND_GROUPED_VISUALIZE_DATA` request: every claimed attachment plus the shared presentation layout. */
61
+ export interface GroupedAttachmentsData {
62
+ /** One item per claimed attachment, in the message's attachment order. */
63
+ attachments: GroupedAttachmentItem[];
64
+ /** Presentation layout hints shared by every item. */
65
+ layout: CustomVisualizerDataLayout;
66
+ }
67
+ //# sourceMappingURL=application-visualizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-visualizer.d.ts","sourceRoot":"","sources":["../../src/models/application-visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,4HAA4H;IAC5H,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yHAAyH;IACzH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,6IAA6I;IAC7I,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oHAAoH;IACpH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oKAAoK;IACpK,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gKAAgK;IAChK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0LAA0L;IAC1L,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uLAAuL;IACvL,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0HAA0H;IAC1H,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yGAAyG;IACzG,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,yFAAyF;AACzF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAChD,MAAM,EACN,qBAAqB,CACtB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,cAAc,EAAE,oBAAoB,CAAC;CACtC;AAED,wHAAwH;AACxH,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,sDAAsD;IACtD,MAAM,EAAE,0BAA0B,CAAC;CACpC"}
@@ -0,0 +1,26 @@
1
+ /** Authenticated user's profile as returned by the identity provider. */
2
+ export interface UserProfile {
3
+ /** Subject identifier — unique, stable ID for the user within the provider. */
4
+ sub: string;
5
+ /** ID of the identity provider that authenticated the user. */
6
+ providerId: string;
7
+ /**
8
+ * Allowlisted claims, keyed by claim name. A dot-notation provider
9
+ * `rolesClaim` (e.g. `"realm_access.roles"`) is stored under one flat key
10
+ * equal to that literal string, never as a nested object — look it up
11
+ * with `claims[rolesClaim]`, not a nested path.
12
+ */
13
+ claims: Record<string, unknown>;
14
+ /** DIAL Core storage bucket for the authenticated user. Empty string when the bucket has not been resolved yet. */
15
+ bucket?: string;
16
+ /** Whether the user's roles claim intersects the provider's configured adminRoles. */
17
+ isAdmin: boolean;
18
+ }
19
+ /** Describes an available identity provider. */
20
+ export interface ProviderInfo {
21
+ /** Unique provider identifier used in API calls. */
22
+ id: string;
23
+ /** Human-readable display name shown in the UI. */
24
+ label: string;
25
+ }
26
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/models/auth.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,407 @@
1
+ import { AttachmentErrorReason, AttachmentType } from '../types/attachment';
2
+ import { MIMEType } from '../types/mime-type';
3
+ import { Annotation } from './annotation';
4
+ import { DeploymentConfigurationSchema } from './deployment-configuration';
5
+ import { ResponseFormat } from './deployment-features';
6
+ /** Metadata returned by the DIAL file/conversation listing API for a single resource node. */
7
+ export interface ConversationMetadata {
8
+ /** Display name of the resource. */
9
+ name: string;
10
+ /** Optional author identifier. */
11
+ author?: string;
12
+ /** Path of the parent folder in the resource tree. */
13
+ parentPath: string;
14
+ /** Storage bucket the resource belongs to. */
15
+ bucket: string;
16
+ /** Full resource URL used to fetch or reference the item. */
17
+ url: string;
18
+ /** Node type as returned by the backend (e.g. `'ITEM'`, `'FOLDER'`). */
19
+ nodeType: string;
20
+ /** Resource type discriminator (e.g. `'Conversation'`). */
21
+ resourceType: string;
22
+ /** ETag for optimistic concurrency / cache validation. */
23
+ etag?: string;
24
+ /** Unix timestamp (ms) when the resource was created. */
25
+ createdAt?: number;
26
+ /** Unix timestamp (ms) of the last modification. */
27
+ updatedAt?: number;
28
+ /** Permission strings granted to the current user for this resource. */
29
+ permissions?: string[];
30
+ }
31
+ /** Identifies the author of a chat message. */
32
+ export declare enum MessageRole {
33
+ User = "user",
34
+ Assistant = "assistant",
35
+ /** In-conversation system event; never sent to DIAL Core. */
36
+ Status = "status"
37
+ }
38
+ /** User-submitted thumbs-up or thumbs-down rating for an assistant message. */
39
+ export declare enum MessageRating {
40
+ Like = 1,
41
+ Dislike = -1
42
+ }
43
+ /** Status of a single agent stage. */
44
+ export declare enum StageStatus {
45
+ /** The stage completed successfully. */
46
+ Completed = "completed",
47
+ /** The stage encountered an error. */
48
+ Failed = "failed"
49
+ }
50
+ /** Lifecycle status of an assistant message generated by a DIAL Core background Responses job. */
51
+ export declare enum BackgroundGenerationStatus {
52
+ /** The job is running (or its result has not been saved yet); the message is still being generated. */
53
+ Pending = "pending",
54
+ /** The job finished and its final answer is saved. */
55
+ Completed = "completed",
56
+ /** The user stopped the generation; the message holds whatever output was available. */
57
+ Stopped = "stopped",
58
+ /** The job failed, expired, or could not be started; see `streamErrorMessage`. */
59
+ Failed = "failed"
60
+ }
61
+ /**
62
+ * Server-owned association between an assistant message and the DIAL Core background job
63
+ * producing it. Present only on messages generated through the background path; its
64
+ * `generationId` identifies the message across saves, because messages have no ids.
65
+ */
66
+ export interface BackgroundGeneration {
67
+ /** Client-supplied generation id of the request that started the job. */
68
+ generationId: string;
69
+ /** Current lifecycle status of the job's message. */
70
+ status: BackgroundGenerationStatus;
71
+ /** Server time (epoch ms) at which the pending placeholder was saved. */
72
+ startedAt: number;
73
+ }
74
+ /** Permitted scalar/array types for a single form field value. */
75
+ export type MessageFormValueType = number | string | boolean | string[];
76
+ /** Key-value map of field identifiers to form field values, submitted from an embedded form widget. */
77
+ export type MessageFormValue = Record<string, MessageFormValueType | undefined>;
78
+ /** Discriminator values for `StatusMessageCustomContent.event_type`. */
79
+ export declare enum StatusEvent {
80
+ ModelChanged = "model_changed"
81
+ }
82
+ /** Extra payload attached to a `MessageRole.Status` message. */
83
+ export interface StatusMessageCustomContent {
84
+ /** Machine-readable event discriminator. */
85
+ event_type: StatusEvent;
86
+ /** ID of the deployment that was active before the change, or `null` for the first selection. */
87
+ previous_deployment_id: string | null;
88
+ /** ID of the deployment selected after the change. */
89
+ new_deployment_id: string;
90
+ }
91
+ /**
92
+ * A skill referenced from `custom_content.skills` — DIAL Core's `RequestSkill`
93
+ * schema ([ai-dial-core#1956](https://github.com/epam/ai-dial-core/pull/1956)): an object with a non-blank `url`; Core rejects any other
94
+ * entry shape (e.g. a bare string) with 400.
95
+ */
96
+ export interface RequestSkill {
97
+ /** The skill's resource URL (`skills/{bucket}/{path}`) — the same form the skill listing and `CatalogItem.id` use. */
98
+ url: string;
99
+ }
100
+ /** Extra DIAL API payload attached to a message. */
101
+ export interface MessageCustomContent {
102
+ /** Files or media items associated with this message. */
103
+ attachments?: MessageAttachment[];
104
+ /** Annotations produced by the model, each optionally citing a source document. */
105
+ annotations?: Annotation[];
106
+ /** Form field values submitted via an embedded form widget. */
107
+ form_value?: MessageFormValue;
108
+ /**
109
+ * JSON Schema for a button/form widget embedded in an assistant response.
110
+ * Populated from the streaming delta's `custom_content.form_schema`.
111
+ */
112
+ form_schema?: DeploymentConfigurationSchema;
113
+ /**
114
+ * Configuration value submitted with the next user turn when a button is selected.
115
+ * Keys match the `propertyKey` from the `form_schema` (e.g. `{ button: 3 }`).
116
+ */
117
+ configuration_value?: Record<string, unknown>;
118
+ /** Accumulated agent execution stages streamed via `custom_content.stages`. */
119
+ stages?: Stage[];
120
+ /**
121
+ * Opaque app-managed state echoed back verbatim on the next turn, per the DIAL
122
+ * stateful-app contract. Overwritten (not merged) by each new streaming delta.
123
+ */
124
+ state?: Record<string, unknown>;
125
+ /**
126
+ * Skills used with this message; each entry carries the skill's resource URL.
127
+ * Present on user requests and, per Core's contract, on assistant responses
128
+ * ("skills referenced by the model as part of the response").
129
+ */
130
+ skills?: RequestSkill[];
131
+ }
132
+ /** A single message in a conversation. */
133
+ export interface Message {
134
+ /** Who authored the message. */
135
+ role: MessageRole;
136
+ /** Plain-text (or Markdown) message body. */
137
+ content: string;
138
+ /** ISO-8601 timestamp of when the message was created. */
139
+ timestamp: string;
140
+ /** DIAL Core response identifier used for the rate API. Present on the final chunk. */
141
+ responseId?: string;
142
+ /** Extra DIAL API payload; present on user requests and assistant responses. */
143
+ custom_content?: MessageCustomContent;
144
+ /** User-submitted rating for this message. */
145
+ rating?: MessageRating;
146
+ /** Deployment ID on `MessageRole.Assistant` and `MessageRole.Status` messages. */
147
+ deploymentId?: string;
148
+ streamErrorMessage?: string;
149
+ /** Set on an assistant message whose generation the user stopped; the content is whatever had streamed by then. */
150
+ wasStoppedByUser?: boolean;
151
+ /** Set on an assistant message produced by a DIAL Core background job; absent on every other message. */
152
+ backgroundGeneration?: BackgroundGeneration;
153
+ /** Allows extra SDK-level properties to pass through when serializing to DIAL Core. */
154
+ [key: string]: unknown;
155
+ }
156
+ /** In-conversation system event message, always with `role: MessageRole.Status`. */
157
+ export interface StatusMessage extends Omit<Message, 'role' | 'custom_content'> {
158
+ /** Always `MessageRole.Status` for status messages. */
159
+ role: MessageRole.Status;
160
+ /** Status event payload. */
161
+ custom_content?: StatusMessageCustomContent;
162
+ }
163
+ /** A single agent execution stage produced during a streaming response. */
164
+ export interface Stage {
165
+ /** Zero-based ordering key; used to merge/upsert incoming stage updates. */
166
+ index: number;
167
+ /** Human-readable label for this stage (e.g. `"Lookup available terms"`). */
168
+ name: string;
169
+ /** `null` while the stage is running; a `StageStatus` value when it has settled. */
170
+ status: StageStatus | null;
171
+ /** Additional text content for this stage, accumulated from streaming chunks. */
172
+ content?: string;
173
+ /** File or content attachments associated with this stage. */
174
+ attachments?: MessageAttachment[];
175
+ /**
176
+ * Short source/category label shown beside the step name (e.g. `"MCP"`).
177
+ * Rendered only when present — never inferred from `name`.
178
+ */
179
+ tag?: string;
180
+ /**
181
+ * `index` of the stage that produced this one, in the same message's stage
182
+ * array. In a streaming delta it names the parent's streaming `index` and is
183
+ * sent only on the chunk that opens the child; in a complete non-streaming
184
+ * array without indexes it names the parent's array position. Absent for a
185
+ * top-level stage; `0` is a valid parent.
186
+ */
187
+ parent_stage_index?: number;
188
+ }
189
+ /** A single LangChain-style tool-call request emitted by the model, present on a `ToolStateMessage` with `type: 'ai'`. */
190
+ export interface ToolCallRequest {
191
+ /** Name of the tool being called. */
192
+ name: string;
193
+ /** Arguments passed to the tool call. */
194
+ args: Record<string, unknown>;
195
+ /** Correlates this call to its result message via that message's `tool_call_id`. */
196
+ id: string;
197
+ }
198
+ /** One entry in `custom_content.state.tool_messages` — either the model's tool-call request or the tool's result. */
199
+ export interface ToolStateMessage {
200
+ /** LangChain message type: `'ai'` for the request, `'tool'` for the result. */
201
+ type: string;
202
+ /** Present on `type: 'tool'` result messages — the tool's own name. */
203
+ name?: string;
204
+ /** Present on `type: 'ai'` messages that requested one or more tool calls. */
205
+ tool_calls?: ToolCallRequest[];
206
+ /** Present on `type: 'tool'` result messages — correlates to the request's `id`. */
207
+ tool_call_id?: string;
208
+ /** Text content — the tool's result body on `type: 'tool'` messages. */
209
+ content?: string;
210
+ }
211
+ /** A single OpenAI-style tool-call request, present on a `ToolExecutionHistoryMessage` with `role: 'assistant'`. */
212
+ export interface OpenAiToolCall {
213
+ /** Correlates this call to its result message via that message's `tool_call_id`. */
214
+ id: string;
215
+ /** Always `'function'` for a tool call. */
216
+ type: string;
217
+ /** The invoked function's name and raw (unparsed) JSON-encoded arguments. */
218
+ function: {
219
+ name: string;
220
+ /** JSON-encoded arguments object — parse before use. */
221
+ arguments: string;
222
+ };
223
+ }
224
+ /** One entry in `custom_content.state.tool_execution_history` — either the model's tool-call request or the tool's result, in OpenAI chat-completion message shape (as opposed to `ToolStateMessage`'s LangChain shape). */
225
+ export interface ToolExecutionHistoryMessage {
226
+ /** `'assistant'` for the request, `'tool'` for the result. */
227
+ role: string;
228
+ /** Present on `role: 'assistant'` messages that requested one or more tool calls. */
229
+ tool_calls?: OpenAiToolCall[];
230
+ /** Present on `role: 'tool'` result messages — correlates to the request's `id`. */
231
+ tool_call_id?: string;
232
+ /** Text content — the tool's result body on `role: 'tool'` messages. */
233
+ content?: string;
234
+ }
235
+ /**
236
+ * Orchestrator-specific execution state, kept wire-verbatim snake_case like
237
+ * every other pass-through field under `custom_content` (e.g. `stages`) —
238
+ * not part of any standard DIAL Core contract. Different orchestrators emit
239
+ * different shapes: `tool_messages` (LangChain-style) is known from the
240
+ * StatGPT agent, gated behind its own `show_debug_stages` flag;
241
+ * `tool_execution_history` (OpenAI chat-completion-style) is known from a
242
+ * different agent. Both are optional and independent — a given orchestrator
243
+ * emits at most one of them.
244
+ */
245
+ export interface MessageState {
246
+ /** The model's tool-call requests and their results for this turn, LangChain-style. */
247
+ tool_messages?: ToolStateMessage[];
248
+ /** The model's tool-call requests and their results for this turn, OpenAI chat-completion-style. */
249
+ tool_execution_history?: ToolExecutionHistoryMessage[];
250
+ }
251
+ /** Incremental content delta inside a streaming SSE chunk. */
252
+ export interface StreamChunkDelta {
253
+ /** Partial text token appended to the assistant message. */
254
+ content?: string;
255
+ /** Role field — only present in the first chunk of a response. */
256
+ role?: string;
257
+ /** DIAL Core response identifier used for the rate API. Present on the final chunk. */
258
+ responseId?: string;
259
+ /**
260
+ * Partial custom content carried in this chunk.
261
+ * `form_schema`, `attachments`, and `stages` may arrive in separate chunks or together in the final chunk.
262
+ */
263
+ custom_content?: {
264
+ /** Incremental stage updates; merge by `index` into the accumulating stage list. */
265
+ stages?: Stage[];
266
+ /** JSON Schema for a button/form widget; arrives once the model decides to embed a form. */
267
+ form_schema?: DeploymentConfigurationSchema;
268
+ /** AI-generated files produced by the model; typically present in the final chunk. */
269
+ attachments?: MessageAttachment[];
270
+ /** Partial annotation updates; merge by `index` into the accumulating annotation list. */
271
+ annotations?: Annotation[];
272
+ /** Opaque app-managed state for the DIAL stateful-app contract; overwrites any previous value. */
273
+ state?: Record<string, unknown>;
274
+ };
275
+ /** Raw custom fields in the DIAL wire format. */
276
+ custom_fields?: {
277
+ /** Raw annotations in the DIAL wire format; must be normalized before use. */
278
+ annotations?: unknown[];
279
+ };
280
+ }
281
+ /** A single server-sent event chunk from the streaming completions endpoint. */
282
+ export interface StreamChunk {
283
+ /** Unique identifier for the completion stream. */
284
+ id: string;
285
+ /** Discriminator — always `'chat.completion.chunk'` for streaming responses. */
286
+ object: 'chat.completion.chunk';
287
+ /** One choice per requested completion (usually one entry). */
288
+ choices: Array<{
289
+ /** Partial token delta for this chunk. */
290
+ delta: StreamChunkDelta;
291
+ /** Set to a non-null string (e.g. `'stop'`) when the stream ends. */
292
+ finish_reason: string | null;
293
+ /** Zero-based index of this choice. */
294
+ index: number;
295
+ }>;
296
+ /**
297
+ * Present when DIAL Core signals an error inside the SSE stream instead of
298
+ * (or in addition to) a non-2xx HTTP status.
299
+ */
300
+ error?: {
301
+ /** Human-readable error description. */
302
+ message: string;
303
+ /** Machine-readable error category (e.g. `'invalid_request_error'`). */
304
+ type?: string;
305
+ };
306
+ }
307
+ /** Generic async-operation status, reusable for any request lifecycle. */
308
+ export declare enum RequestStatus {
309
+ /** No request has been made yet. */
310
+ Idle = "idle",
311
+ /** A request is in-flight. */
312
+ Loading = "loading",
313
+ /** The most recent request failed. */
314
+ Error = "error"
315
+ }
316
+ /** Represents a file or content item that can be displayed as an attachment. */
317
+ export interface DisplayAttachment {
318
+ /** Unique client-side identifier. */
319
+ id: string;
320
+ /** Display name (usually the original filename). */
321
+ name: string;
322
+ /** MIME type of the attachment (e.g. `'image/png'`, `'application/pdf'`). */
323
+ contentType: MIMEType | string;
324
+ /** Content category used to select the correct icon and thumbnail. */
325
+ type: AttachmentType;
326
+ /** Upload / processing lifecycle state. */
327
+ status: RequestStatus;
328
+ /** Reason the upload failed; only set when `status === RequestStatus.Error`. */
329
+ errorReason?: AttachmentErrorReason;
330
+ /** Object URL for image preview; only set when `type === AttachmentType.Image`. */
331
+ previewUrl?: string;
332
+ /** Resolved playback URL for audio; only set when `type === AttachmentType.Audio`. */
333
+ playUrl?: string;
334
+ /** Remote URL for an attachment that has already been uploaded. */
335
+ url?: string;
336
+ /** Alternate reference URL (e.g. from the DIAL API `reference_url` field); used when `url` is absent. */
337
+ referenceUrl?: string;
338
+ /** Inline base-64 encoded content; present when the attachment carries data directly rather than via a URL. */
339
+ data?: string;
340
+ }
341
+ /** Attachment selected locally by the user before it is sent to the backend. */
342
+ export interface Attachment extends DisplayAttachment {
343
+ /** The underlying browser `File` object selected by the user. */
344
+ file: File;
345
+ }
346
+ /** Result of successfully uploading an {@link Attachment}. */
347
+ export interface UploadedAttachmentResult {
348
+ /** The DIAL Core file URL the attachment was uploaded to. */
349
+ url: string;
350
+ /** The name actually stored on DIAL Core; differs from the attachment's original name when it contained characters the storage path forbids, or when a ` (n)` suffix was needed to avoid replacing an existing file. */
351
+ name: string;
352
+ }
353
+ /**
354
+ * Attachment payload stored in message custom content.
355
+ * Used inside `Message.custom_content.attachments` for both user requests
356
+ * and assistant responses.
357
+ */
358
+ export interface MessageAttachment {
359
+ /** Zero-based position in the attachment list. */
360
+ index?: number;
361
+ /** MIME type of the attachment content. May be absent in streamed runtime payloads. */
362
+ type?: MIMEType | string;
363
+ /** Display name shown in the UI. */
364
+ title: string;
365
+ /** Inline base-64 encoded content (mutually exclusive with `url`). */
366
+ data?: string;
367
+ /** Remote URL pointing to the attachment content. */
368
+ url?: string;
369
+ /** MIME type of the referenced resource (used with `reference_url`). */
370
+ reference_type?: MIMEType | string;
371
+ /** URL of an alternate reference resource (e.g. a download link). */
372
+ reference_url?: string;
373
+ }
374
+ /** A full conversation including its messages and configuration. */
375
+ export interface Conversation {
376
+ /** Unique conversation identifier. */
377
+ id: string;
378
+ /** Identifier of the folder this conversation lives in. */
379
+ folderId: string;
380
+ /** Human-readable conversation title. */
381
+ name: string;
382
+ /** The AI model used for this conversation. */
383
+ model: {
384
+ id: string;
385
+ };
386
+ /** System prompt prepended to every request. */
387
+ prompt: string;
388
+ /** Sampling temperature passed to the model (0–1). */
389
+ temperature: number;
390
+ /** Optional Responses-API output-token cap, forwarded as `max_output_tokens`. Never derived from deployment limits or Chat Completions defaults. */
391
+ maxOutputTokens?: number;
392
+ /** Ordered list of messages in the conversation. */
393
+ messages: Message[];
394
+ /** Unix timestamp (ms) of the most recent activity. */
395
+ lastActivityDate: number;
396
+ /** Unix timestamp (ms) of the last save. */
397
+ updatedAt: number;
398
+ /** Add-on IDs enabled for this conversation. */
399
+ selectedAddons: string[];
400
+ /** Override model ID used when an assistant model is selected. */
401
+ assistantModelId: string;
402
+ /** Response format used when rendering messages. */
403
+ responseFormat?: ResponseFormat;
404
+ /** Open, feature-keyed container for conversation-level view state. This change owns only the `annotations` key; any other key is opaque and preserved as-is. */
405
+ customViewState?: Record<string, unknown>;
406
+ }
407
+ //# sourceMappingURL=chat.d.ts.map