@epam/ai-dial-shared 0.23.0-rc.8 → 0.23.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/index.esm.js +11 -1
- package/package.json +1 -1
- package/src/types/chat.d.ts +3 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/message-form-schema.d.ts +30 -0
package/index.esm.js
CHANGED
|
@@ -89,6 +89,16 @@ var PublishActions;
|
|
|
89
89
|
PublishActions["ADD_IF_ABSENT"] = "ADD_IF_ABSENT";
|
|
90
90
|
})(PublishActions || (PublishActions = {}));
|
|
91
91
|
|
|
92
|
+
var FormSchemaPropertyWidget;
|
|
93
|
+
(function (FormSchemaPropertyWidget) {
|
|
94
|
+
FormSchemaPropertyWidget["buttons"] = "buttons";
|
|
95
|
+
})(FormSchemaPropertyWidget || (FormSchemaPropertyWidget = {}));
|
|
96
|
+
var FormSchemaPropertyType;
|
|
97
|
+
(function (FormSchemaPropertyType) {
|
|
98
|
+
FormSchemaPropertyType["array"] = "array";
|
|
99
|
+
FormSchemaPropertyType["number"] = "number";
|
|
100
|
+
})(FormSchemaPropertyType || (FormSchemaPropertyType = {}));
|
|
101
|
+
|
|
92
102
|
const validateFeature = (feature) => {
|
|
93
103
|
return feature in availableFeatures;
|
|
94
104
|
};
|
|
@@ -243,4 +253,4 @@ var VisualizerConnectorRequests;
|
|
|
243
253
|
VisualizerConnectorRequests["setVisualizerOptions"] = "SET_VISUALIZER_OPTIONS";
|
|
244
254
|
})(VisualizerConnectorRequests || (VisualizerConnectorRequests = {}));
|
|
245
255
|
|
|
246
|
-
export { DeferredRequest, Feature, LikeState, OverlayEvents, OverlayRequests, PublishActions, Role, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, availableFeatures, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
|
|
256
|
+
export { DeferredRequest, Feature, FormSchemaPropertyType, FormSchemaPropertyWidget, LikeState, OverlayEvents, OverlayRequests, PublishActions, Role, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, availableFeatures, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
|
package/package.json
CHANGED
package/src/types/chat.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MessageFormSchema, MessageFormValue } from './message-form-schema';
|
|
1
2
|
export declare enum Role {
|
|
2
3
|
Assistant = "assistant",
|
|
3
4
|
User = "user",
|
|
@@ -43,6 +44,8 @@ export interface Message {
|
|
|
43
44
|
attachments?: Attachment[];
|
|
44
45
|
stages?: Stage[];
|
|
45
46
|
state?: object;
|
|
47
|
+
form_schema?: MessageFormSchema;
|
|
48
|
+
form_value?: MessageFormValue;
|
|
46
49
|
};
|
|
47
50
|
like?: LikeState;
|
|
48
51
|
errorMessage?: string;
|
package/src/types/index.d.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum FormSchemaPropertyWidget {
|
|
2
|
+
buttons = "buttons"
|
|
3
|
+
}
|
|
4
|
+
export interface FormSchemaButtonOption {
|
|
5
|
+
title: string;
|
|
6
|
+
const: number;
|
|
7
|
+
'dial:widgetOptions'?: {
|
|
8
|
+
confirmationMessage?: string;
|
|
9
|
+
populateText?: string;
|
|
10
|
+
submit?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export type MessageFormValueType = string[] | number | undefined;
|
|
14
|
+
export type MessageFormValue = Record<string, MessageFormValueType>;
|
|
15
|
+
export declare enum FormSchemaPropertyType {
|
|
16
|
+
array = "array",
|
|
17
|
+
number = "number"
|
|
18
|
+
}
|
|
19
|
+
export interface FormSchemaProperty {
|
|
20
|
+
'dial:widget'?: FormSchemaPropertyWidget;
|
|
21
|
+
oneOf?: FormSchemaButtonOption[];
|
|
22
|
+
description?: string;
|
|
23
|
+
type: FormSchemaPropertyType;
|
|
24
|
+
}
|
|
25
|
+
export interface MessageFormSchema {
|
|
26
|
+
type: 'object';
|
|
27
|
+
required?: string[];
|
|
28
|
+
'dial:chatMessageInputDisabled'?: boolean;
|
|
29
|
+
properties: Record<string, FormSchemaProperty>;
|
|
30
|
+
}
|