@opens/widget-ui 1.0.5 → 1.0.9
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/dist/app-screen-page.vue.d.ts.map +1 -0
- package/dist/components/pages/app-service-page.vue.d.ts +5 -1
- package/dist/components/typography/types.d.ts +1 -0
- package/dist/components/typography/use-typography-classes.d.ts +2 -1
- package/dist/components/widget/app-widget-anchor.vue.d.ts +1 -1
- package/dist/components/widget/app-widget-view.vue.d.ts +2 -0
- package/dist/components/widget/app-widget.vue.d.ts +4 -2
- package/dist/composables/use-app-widget.d.ts +300 -1
- package/dist/composables/use-hex-color.d.ts +8 -0
- package/dist/composables/use-service-chat-behavior.d.ts +17 -0
- package/dist/composables/use-service-page.d.ts +20 -0
- package/dist/composables/use-service-voice-behavior.d.ts +1 -0
- package/dist/composables/use-widget-appearance.d.ts +1663 -0
- package/dist/index.d.ts +6 -1
- package/dist/main.d.ts +5 -0
- package/dist/typography/app-text.vue.d.ts +1 -1
- package/dist/widget/app-widget-view.vue.d.ts +1 -1
- package/dist/widget/app-widget.vue.d.ts +1 -1
- package/dist/yunique_widget_ui.cjs.js +1 -1
- package/dist/yunique_widget_ui.css +1 -1
- package/dist/yunique_widget_ui.es.js +1787 -1832
- package/dist/yunique_widget_ui.umd.js +2 -2
- package/package.json +1 -1
- package/dist/pages/app-screen-page.vue.d.ts.map +0 -1
- /package/dist/{pages/app-screen-page.vue.d.ts → app-screen-page.vue.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-screen-page.vue.d.ts","sourceRoot":"","sources":["../src/components/pages/app-screen-page.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kHAAkH,CAAC;AACzI,cAAc,kHAAkH,CAAC;AACjI,eAAe,SAAS,CAAC"}
|
|
@@ -3,5 +3,9 @@ type __VLS_Props = {
|
|
|
3
3
|
rule: Rule;
|
|
4
4
|
edges?: Rule[];
|
|
5
5
|
};
|
|
6
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"send-message": (text: string) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onSend-message"?: ((text: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
11
|
export default _default;
|
|
@@ -4,13 +4,14 @@ export declare function useTypographyClasses(element: IElement, props: ITypograp
|
|
|
4
4
|
'!yu-font-plus': boolean | undefined;
|
|
5
5
|
'!yu-font-inter': boolean | undefined;
|
|
6
6
|
'!yu-font-titillium': boolean | undefined;
|
|
7
|
+
'!yu-font-mono': boolean | undefined;
|
|
7
8
|
}>;
|
|
8
9
|
colorClass: import('vue').ComputedRef<{
|
|
9
10
|
'!yu-text-white': boolean | undefined;
|
|
10
11
|
'!yu-text-primary': boolean | undefined;
|
|
11
12
|
'!yu-text-secondary': boolean | undefined;
|
|
12
13
|
'!yu-text-base': boolean | undefined;
|
|
13
|
-
'!yu-text-neutral': boolean | undefined;
|
|
14
|
+
'!yu-text-neutral dark:!yu-text-neutral-200': boolean | undefined;
|
|
14
15
|
}>;
|
|
15
16
|
weightClass: import('vue').ComputedRef<{
|
|
16
17
|
'!yu-font-thin': boolean | undefined;
|
|
@@ -33,6 +33,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
33
33
|
}>> & Readonly<{
|
|
34
34
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
|
+
logo: string;
|
|
36
37
|
label: string;
|
|
37
38
|
small: boolean;
|
|
38
39
|
large: boolean;
|
|
@@ -40,6 +41,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
40
41
|
outline: boolean;
|
|
41
42
|
ghost: boolean;
|
|
42
43
|
loading: boolean;
|
|
43
|
-
logo: string;
|
|
44
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
export default _default;
|
|
@@ -9,11 +9,13 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
9
9
|
submit: (values: Record<string, string>) => any;
|
|
10
10
|
back: () => any;
|
|
11
11
|
close: () => any;
|
|
12
|
+
"send-message": (text: string) => any;
|
|
12
13
|
"edge-click": (edge: Rule) => any;
|
|
13
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
15
|
onSubmit?: ((values: Record<string, string>) => any) | undefined;
|
|
15
16
|
onBack?: (() => any) | undefined;
|
|
16
17
|
onClose?: (() => any) | undefined;
|
|
18
|
+
"onSend-message"?: ((text: string) => any) | undefined;
|
|
17
19
|
"onEdge-click"?: ((edge: Rule) => any) | undefined;
|
|
18
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
21
|
export default _default;
|
|
@@ -9,13 +9,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
9
9
|
submit: (values: Record<string, string>) => any;
|
|
10
10
|
back: () => any;
|
|
11
11
|
close: () => any;
|
|
12
|
-
"
|
|
12
|
+
"send-message": (text: string) => any;
|
|
13
13
|
open: () => any;
|
|
14
|
+
"edge-click": (edge: Rule) => any;
|
|
14
15
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
16
|
onSubmit?: ((values: Record<string, string>) => any) | undefined;
|
|
16
17
|
onBack?: (() => any) | undefined;
|
|
17
18
|
onClose?: (() => any) | undefined;
|
|
18
|
-
"
|
|
19
|
+
"onSend-message"?: ((text: string) => any) | undefined;
|
|
19
20
|
onOpen?: (() => any) | undefined;
|
|
21
|
+
"onEdge-click"?: ((edge: Rule) => any) | undefined;
|
|
20
22
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
23
|
export default _default;
|
|
@@ -1,8 +1,307 @@
|
|
|
1
|
-
|
|
1
|
+
import { Rule, WorkflowData } from '@opens/gateways/chat-config';
|
|
2
|
+
export declare const useAppWidget: () => {
|
|
3
|
+
behavior: import('vue').ComputedRef<import('./use-service-page').ServicePageBehavior>;
|
|
4
|
+
service: import('vue').ComputedRef<{}>;
|
|
5
|
+
voice: {};
|
|
6
|
+
chat: {
|
|
7
|
+
messages: import('vue').Ref<{
|
|
8
|
+
from: import('./use-service-chat-behavior').ServiceChatMessageFrom;
|
|
9
|
+
text: string;
|
|
10
|
+
}[], import('./use-service-chat-behavior').ServiceChatMessage[] | {
|
|
11
|
+
from: import('./use-service-chat-behavior').ServiceChatMessageFrom;
|
|
12
|
+
text: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
text: import('vue').Ref<string, string>;
|
|
15
|
+
setMessages: (list: import('./use-service-chat-behavior').ServiceChatMessage[]) => void;
|
|
16
|
+
addMessage: (message: import('./use-service-chat-behavior').ServiceChatMessage) => void;
|
|
17
|
+
};
|
|
2
18
|
currentRuleId: import('vue').Ref<string | undefined, string | undefined>;
|
|
19
|
+
currentRule: import('vue').ComputedRef<Rule | undefined>;
|
|
20
|
+
rootRule: import('vue').ComputedRef<Rule | undefined>;
|
|
21
|
+
workflow: import('vue').Ref<{
|
|
22
|
+
id: string;
|
|
23
|
+
rules: {
|
|
24
|
+
id: string;
|
|
25
|
+
companyId: string;
|
|
26
|
+
name: string;
|
|
27
|
+
action: import('@opens/gateways/chat-config').RuleAction | string;
|
|
28
|
+
message: string | null;
|
|
29
|
+
automaticMessage: {
|
|
30
|
+
messageBody: string;
|
|
31
|
+
caption?: string | null | undefined;
|
|
32
|
+
messageType?: string | undefined;
|
|
33
|
+
} | null;
|
|
34
|
+
callOnQueue: {
|
|
35
|
+
id: string;
|
|
36
|
+
attendanceGroupId?: string | undefined;
|
|
37
|
+
voiceTimeout?: number | undefined;
|
|
38
|
+
minutesToExpire?: number | undefined;
|
|
39
|
+
callToActionMessage?: string | undefined;
|
|
40
|
+
} | null;
|
|
41
|
+
uraDescription: string | null;
|
|
42
|
+
interactiveMessageId: string | null;
|
|
43
|
+
configId: string | null;
|
|
44
|
+
queueId: string | null;
|
|
45
|
+
redirectQueue: string | null;
|
|
46
|
+
redirectRuleId: string | null;
|
|
47
|
+
questionnaire: {
|
|
48
|
+
questions?: {
|
|
49
|
+
questionText: string;
|
|
50
|
+
isResponsePrivateEnabled?: boolean | undefined;
|
|
51
|
+
isEnabledCustomDebounce?: boolean | undefined;
|
|
52
|
+
customDebounceSeconds?: number | undefined;
|
|
53
|
+
hasValidation?: boolean | undefined;
|
|
54
|
+
isUsingCustomValidation?: boolean | undefined;
|
|
55
|
+
customValidationUrl?: string | undefined;
|
|
56
|
+
customValidationMethod?: string | undefined;
|
|
57
|
+
validationRegexType?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationRegexType | undefined;
|
|
58
|
+
validationRegexPattern?: string | undefined;
|
|
59
|
+
maxValidationAttempts?: number | undefined;
|
|
60
|
+
onValidationFailureReply?: string | undefined;
|
|
61
|
+
onValidationSuccessAction?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationAction | undefined;
|
|
62
|
+
onValidationSuccessActionTarget?: string | undefined;
|
|
63
|
+
onValidationFailureAction?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationAction | undefined;
|
|
64
|
+
onValidationFailureActionTarget?: string | undefined;
|
|
65
|
+
onValidationFailureMessage?: string | undefined;
|
|
66
|
+
onValidationSuccessAutoTagIds?: number[] | undefined;
|
|
67
|
+
onValidationFailureAutoTagIds?: number[] | undefined;
|
|
68
|
+
questionType?: import('@opens/gateways/chat-config').RuleQuestionnaireQuestionType | undefined;
|
|
69
|
+
interactiveOptions?: {
|
|
70
|
+
id: string;
|
|
71
|
+
text: string;
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
}[] | undefined;
|
|
74
|
+
questionHeaders?: {
|
|
75
|
+
id?: number | undefined;
|
|
76
|
+
key: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}[] | undefined;
|
|
79
|
+
questionBodyFields?: {
|
|
80
|
+
id?: number | undefined;
|
|
81
|
+
key: string;
|
|
82
|
+
value: string;
|
|
83
|
+
isFilledByAnswer?: boolean | undefined;
|
|
84
|
+
answerIndex?: number | null | undefined;
|
|
85
|
+
}[] | undefined;
|
|
86
|
+
questionEndpoint?: string | undefined;
|
|
87
|
+
questionMethodType?: (import('@opens/gateways/chat-config').RuleHttpMethod | "") | undefined;
|
|
88
|
+
} | null;
|
|
89
|
+
webhook: {
|
|
90
|
+
customHeaders: {
|
|
91
|
+
key: string;
|
|
92
|
+
value: string;
|
|
93
|
+
}[];
|
|
94
|
+
webhookMethodType: import('@opens/gateways/chat-config').RuleHttpMethod;
|
|
95
|
+
webhookEndpoint: string;
|
|
96
|
+
webhookResponseMappings: {
|
|
97
|
+
replaceValue: string;
|
|
98
|
+
jsonPath: string;
|
|
99
|
+
newJsonKey: string;
|
|
100
|
+
}[];
|
|
101
|
+
} | null;
|
|
102
|
+
isRoot: boolean;
|
|
103
|
+
redirectDefault: boolean;
|
|
104
|
+
redirectTimeout: number;
|
|
105
|
+
delay: number | null;
|
|
106
|
+
disableTyping: boolean;
|
|
107
|
+
settings: {
|
|
108
|
+
[x: string]: unknown;
|
|
109
|
+
interactiveType?: import('@opens/gateways/chat-config').RuleInteractiveType | undefined;
|
|
110
|
+
flow?: {
|
|
111
|
+
configId: string;
|
|
112
|
+
metaFlowId: string;
|
|
113
|
+
flowAction: "navigate" | "data_exchange";
|
|
114
|
+
flowCta: string;
|
|
115
|
+
flowBody: string;
|
|
116
|
+
webhookUrl?: string | undefined;
|
|
117
|
+
firstScreen?: string | undefined;
|
|
118
|
+
flowHeader?: string | undefined;
|
|
119
|
+
flowFooter?: string | undefined;
|
|
120
|
+
contextKey?: string | undefined;
|
|
121
|
+
textResponse?: {
|
|
122
|
+
behavior: "require_flow" | "redirect_rule";
|
|
123
|
+
sendReminder?: boolean | undefined;
|
|
124
|
+
reminderMessage?: string | undefined;
|
|
125
|
+
targetRuleId?: string | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
header?: {
|
|
129
|
+
logo?: string | undefined;
|
|
130
|
+
title?: string | undefined;
|
|
131
|
+
subtitle?: string | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
body?: {
|
|
134
|
+
logo?: string | undefined;
|
|
135
|
+
eyebrow?: string | undefined;
|
|
136
|
+
title?: string | undefined;
|
|
137
|
+
subtitle?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
features?: {
|
|
140
|
+
sendMessage?: boolean | undefined;
|
|
141
|
+
sendAttachment?: boolean | undefined;
|
|
142
|
+
} | undefined;
|
|
143
|
+
behavior?: import('@opens/gateways/chat-config').ServiceRuleBehavior | undefined;
|
|
144
|
+
form?: {
|
|
145
|
+
fields?: {
|
|
146
|
+
name: string;
|
|
147
|
+
alias: string;
|
|
148
|
+
required: boolean;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
} | null;
|
|
152
|
+
archivedAt: string | null;
|
|
153
|
+
autoTagEnabled: boolean;
|
|
154
|
+
autoTagIds: number[];
|
|
155
|
+
createdAt: string;
|
|
156
|
+
updatedAt: string;
|
|
157
|
+
flow?: /*elided*/ any[] | undefined;
|
|
158
|
+
}[];
|
|
159
|
+
edges: Record<string, import('@opens/gateways/chat-config').WorkflowEdge[]>;
|
|
160
|
+
} | undefined, WorkflowData | {
|
|
161
|
+
id: string;
|
|
162
|
+
rules: {
|
|
163
|
+
id: string;
|
|
164
|
+
companyId: string;
|
|
165
|
+
name: string;
|
|
166
|
+
action: import('@opens/gateways/chat-config').RuleAction | string;
|
|
167
|
+
message: string | null;
|
|
168
|
+
automaticMessage: {
|
|
169
|
+
messageBody: string;
|
|
170
|
+
caption?: string | null | undefined;
|
|
171
|
+
messageType?: string | undefined;
|
|
172
|
+
} | null;
|
|
173
|
+
callOnQueue: {
|
|
174
|
+
id: string;
|
|
175
|
+
attendanceGroupId?: string | undefined;
|
|
176
|
+
voiceTimeout?: number | undefined;
|
|
177
|
+
minutesToExpire?: number | undefined;
|
|
178
|
+
callToActionMessage?: string | undefined;
|
|
179
|
+
} | null;
|
|
180
|
+
uraDescription: string | null;
|
|
181
|
+
interactiveMessageId: string | null;
|
|
182
|
+
configId: string | null;
|
|
183
|
+
queueId: string | null;
|
|
184
|
+
redirectQueue: string | null;
|
|
185
|
+
redirectRuleId: string | null;
|
|
186
|
+
questionnaire: {
|
|
187
|
+
questions?: {
|
|
188
|
+
questionText: string;
|
|
189
|
+
isResponsePrivateEnabled?: boolean | undefined;
|
|
190
|
+
isEnabledCustomDebounce?: boolean | undefined;
|
|
191
|
+
customDebounceSeconds?: number | undefined;
|
|
192
|
+
hasValidation?: boolean | undefined;
|
|
193
|
+
isUsingCustomValidation?: boolean | undefined;
|
|
194
|
+
customValidationUrl?: string | undefined;
|
|
195
|
+
customValidationMethod?: string | undefined;
|
|
196
|
+
validationRegexType?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationRegexType | undefined;
|
|
197
|
+
validationRegexPattern?: string | undefined;
|
|
198
|
+
maxValidationAttempts?: number | undefined;
|
|
199
|
+
onValidationFailureReply?: string | undefined;
|
|
200
|
+
onValidationSuccessAction?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationAction | undefined;
|
|
201
|
+
onValidationSuccessActionTarget?: string | undefined;
|
|
202
|
+
onValidationFailureAction?: import('@opens/gateways/chat-config').RuleQuestionnaireValidationAction | undefined;
|
|
203
|
+
onValidationFailureActionTarget?: string | undefined;
|
|
204
|
+
onValidationFailureMessage?: string | undefined;
|
|
205
|
+
onValidationSuccessAutoTagIds?: number[] | undefined;
|
|
206
|
+
onValidationFailureAutoTagIds?: number[] | undefined;
|
|
207
|
+
questionType?: import('@opens/gateways/chat-config').RuleQuestionnaireQuestionType | undefined;
|
|
208
|
+
interactiveOptions?: {
|
|
209
|
+
id: string;
|
|
210
|
+
text: string;
|
|
211
|
+
}[] | undefined;
|
|
212
|
+
}[] | undefined;
|
|
213
|
+
questionHeaders?: {
|
|
214
|
+
id?: number | undefined;
|
|
215
|
+
key: string;
|
|
216
|
+
value: string;
|
|
217
|
+
}[] | undefined;
|
|
218
|
+
questionBodyFields?: {
|
|
219
|
+
id?: number | undefined;
|
|
220
|
+
key: string;
|
|
221
|
+
value: string;
|
|
222
|
+
isFilledByAnswer?: boolean | undefined;
|
|
223
|
+
answerIndex?: number | null | undefined;
|
|
224
|
+
}[] | undefined;
|
|
225
|
+
questionEndpoint?: string | undefined;
|
|
226
|
+
questionMethodType?: (import('@opens/gateways/chat-config').RuleHttpMethod | "") | undefined;
|
|
227
|
+
} | null;
|
|
228
|
+
webhook: {
|
|
229
|
+
customHeaders: {
|
|
230
|
+
key: string;
|
|
231
|
+
value: string;
|
|
232
|
+
}[];
|
|
233
|
+
webhookMethodType: import('@opens/gateways/chat-config').RuleHttpMethod;
|
|
234
|
+
webhookEndpoint: string;
|
|
235
|
+
webhookResponseMappings: {
|
|
236
|
+
replaceValue: string;
|
|
237
|
+
jsonPath: string;
|
|
238
|
+
newJsonKey: string;
|
|
239
|
+
}[];
|
|
240
|
+
} | null;
|
|
241
|
+
isRoot: boolean;
|
|
242
|
+
redirectDefault: boolean;
|
|
243
|
+
redirectTimeout: number;
|
|
244
|
+
delay: number | null;
|
|
245
|
+
disableTyping: boolean;
|
|
246
|
+
settings: {
|
|
247
|
+
[x: string]: unknown;
|
|
248
|
+
interactiveType?: import('@opens/gateways/chat-config').RuleInteractiveType | undefined;
|
|
249
|
+
flow?: {
|
|
250
|
+
configId: string;
|
|
251
|
+
metaFlowId: string;
|
|
252
|
+
flowAction: "navigate" | "data_exchange";
|
|
253
|
+
flowCta: string;
|
|
254
|
+
flowBody: string;
|
|
255
|
+
webhookUrl?: string | undefined;
|
|
256
|
+
firstScreen?: string | undefined;
|
|
257
|
+
flowHeader?: string | undefined;
|
|
258
|
+
flowFooter?: string | undefined;
|
|
259
|
+
contextKey?: string | undefined;
|
|
260
|
+
textResponse?: {
|
|
261
|
+
behavior: "require_flow" | "redirect_rule";
|
|
262
|
+
sendReminder?: boolean | undefined;
|
|
263
|
+
reminderMessage?: string | undefined;
|
|
264
|
+
targetRuleId?: string | undefined;
|
|
265
|
+
} | undefined;
|
|
266
|
+
} | undefined;
|
|
267
|
+
header?: {
|
|
268
|
+
logo?: string | undefined;
|
|
269
|
+
title?: string | undefined;
|
|
270
|
+
subtitle?: string | undefined;
|
|
271
|
+
} | undefined;
|
|
272
|
+
body?: {
|
|
273
|
+
logo?: string | undefined;
|
|
274
|
+
eyebrow?: string | undefined;
|
|
275
|
+
title?: string | undefined;
|
|
276
|
+
subtitle?: string | undefined;
|
|
277
|
+
} | undefined;
|
|
278
|
+
features?: {
|
|
279
|
+
sendMessage?: boolean | undefined;
|
|
280
|
+
sendAttachment?: boolean | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
behavior?: import('@opens/gateways/chat-config').ServiceRuleBehavior | undefined;
|
|
283
|
+
form?: {
|
|
284
|
+
fields?: {
|
|
285
|
+
name: string;
|
|
286
|
+
alias: string;
|
|
287
|
+
required: boolean;
|
|
288
|
+
}[] | undefined;
|
|
289
|
+
} | undefined;
|
|
290
|
+
} | null;
|
|
291
|
+
archivedAt: string | null;
|
|
292
|
+
autoTagEnabled: boolean;
|
|
293
|
+
autoTagIds: number[];
|
|
294
|
+
createdAt: string;
|
|
295
|
+
updatedAt: string;
|
|
296
|
+
flow?: /*elided*/ any[] | undefined;
|
|
297
|
+
}[];
|
|
298
|
+
edges: Record<string, import('@opens/gateways/chat-config').WorkflowEdge[]>;
|
|
299
|
+
} | undefined>;
|
|
3
300
|
history: import('vue').Ref<string[], string[]>;
|
|
301
|
+
edges: import('vue').ComputedRef<Rule[]>;
|
|
4
302
|
setCurrentRuleId: (id: string | undefined) => void;
|
|
5
303
|
clearHistory: () => void;
|
|
304
|
+
setWorkflow: (data: WorkflowData | undefined) => void;
|
|
6
305
|
pushHistory: (id: string) => void;
|
|
7
306
|
setHistory: (ids: string[]) => void;
|
|
8
307
|
popHistory: () => string | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ServiceChatMessageFrom = 'system' | 'operator' | 'contact';
|
|
2
|
+
export type ServiceChatMessage = {
|
|
3
|
+
from: ServiceChatMessageFrom;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function useServiceChatBehavior(): {
|
|
7
|
+
messages: import('vue').Ref<{
|
|
8
|
+
from: ServiceChatMessageFrom;
|
|
9
|
+
text: string;
|
|
10
|
+
}[], ServiceChatMessage[] | {
|
|
11
|
+
from: ServiceChatMessageFrom;
|
|
12
|
+
text: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
text: import('vue').Ref<string, string>;
|
|
15
|
+
setMessages: (list: ServiceChatMessage[]) => void;
|
|
16
|
+
addMessage: (message: ServiceChatMessage) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { Rule } from '@opens/gateways/chat-config';
|
|
3
|
+
export type ServicePageBehavior = 'chat' | 'voice';
|
|
4
|
+
export declare function useServicePage(rule?: MaybeRefOrGetter<Rule | undefined | null>): {
|
|
5
|
+
behavior: import('vue').ComputedRef<ServicePageBehavior>;
|
|
6
|
+
service: import('vue').ComputedRef<{}>;
|
|
7
|
+
voice: {};
|
|
8
|
+
chat: {
|
|
9
|
+
messages: import('vue').Ref<{
|
|
10
|
+
from: import('./use-service-chat-behavior').ServiceChatMessageFrom;
|
|
11
|
+
text: string;
|
|
12
|
+
}[], import('./use-service-chat-behavior').ServiceChatMessage[] | {
|
|
13
|
+
from: import('./use-service-chat-behavior').ServiceChatMessageFrom;
|
|
14
|
+
text: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
text: import('vue').Ref<string, string>;
|
|
17
|
+
setMessages: (list: import('./use-service-chat-behavior').ServiceChatMessage[]) => void;
|
|
18
|
+
addMessage: (message: import('./use-service-chat-behavior').ServiceChatMessage) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useServiceVoiceBehavior(): {};
|