@davi-ai/retorik-framework 1.1.7 → 2.0.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/README.md +5 -5
- package/dist/index.d.ts +371 -251
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19874 -17536
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20436 -18018
- package/dist/index.modern.js.map +1 -1
- package/package.json +188 -200
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { presets as _presets1, presets } from "@davi-ai/react-bodyengine-three";
|
|
2
|
+
import { StoreApi, UseBoundStore } from "zustand";
|
|
3
|
+
import { SpeechSynthesisEventProps } from "@davi-ai/web-speech-cognitive-services-davi";
|
|
4
|
+
import { TierResult } from "detect-gpu";
|
|
1
5
|
export enum AvailableViews {
|
|
2
6
|
home = 1,
|
|
3
7
|
news = 2,
|
|
@@ -29,17 +33,6 @@ export enum DeviceType {
|
|
|
29
33
|
widgetLandscape = 5,
|
|
30
34
|
widgetBorne = 6
|
|
31
35
|
}
|
|
32
|
-
enum Mode {
|
|
33
|
-
vocal = 1,
|
|
34
|
-
text = 2,
|
|
35
|
-
dashboard = 3
|
|
36
|
-
}
|
|
37
|
-
export enum RetorikEvent {
|
|
38
|
-
DetailViewOpen = 1,
|
|
39
|
-
DetailViewClose = 2,
|
|
40
|
-
SpeechStarted = 3,
|
|
41
|
-
SpeechEnded = 4
|
|
42
|
-
}
|
|
43
36
|
export enum Emotions {
|
|
44
37
|
Regret = "regret",
|
|
45
38
|
Dislike = "dislike",
|
|
@@ -58,7 +51,124 @@ export enum Emotions {
|
|
|
58
51
|
Joy = "joy",
|
|
59
52
|
Hope = "hope"
|
|
60
53
|
}
|
|
61
|
-
|
|
54
|
+
enum Mode {
|
|
55
|
+
vocal = 1,
|
|
56
|
+
text = 2,
|
|
57
|
+
dashboard = 3
|
|
58
|
+
}
|
|
59
|
+
enum PermissionStatus {
|
|
60
|
+
waiting = 1,
|
|
61
|
+
allowed = 2,
|
|
62
|
+
refused = 3,
|
|
63
|
+
error = 4
|
|
64
|
+
}
|
|
65
|
+
export enum RetorikEvent {
|
|
66
|
+
DetailViewOpen = 1,
|
|
67
|
+
DetailViewClose = 2,
|
|
68
|
+
SpeechStarted = 3,
|
|
69
|
+
SpeechEnded = 4
|
|
70
|
+
}
|
|
71
|
+
enum RecognitionState {
|
|
72
|
+
Initializing = 1,
|
|
73
|
+
Listening = 2,
|
|
74
|
+
Closing = 3,
|
|
75
|
+
ForceClosing = 4,
|
|
76
|
+
Closed = 5
|
|
77
|
+
}
|
|
78
|
+
enum Source3DEngine {
|
|
79
|
+
avatarsdk = "avatarsdk",
|
|
80
|
+
avatarsdkbis = "avatar-sdk",
|
|
81
|
+
avaturn = "avaturn",
|
|
82
|
+
cc3 = "cc3",
|
|
83
|
+
cc4 = "cc4",
|
|
84
|
+
rpm = "rpm",
|
|
85
|
+
readyplayerme = "readyplayerme"
|
|
86
|
+
}
|
|
87
|
+
enum UIPart {
|
|
88
|
+
none = 1,
|
|
89
|
+
agent = 2,
|
|
90
|
+
background = 3,
|
|
91
|
+
remote = 4,
|
|
92
|
+
languages = 5,
|
|
93
|
+
card = 6,
|
|
94
|
+
qroverlay = 7
|
|
95
|
+
}
|
|
96
|
+
interface DirectLineAttachment {
|
|
97
|
+
content?: any;
|
|
98
|
+
contentType: string;
|
|
99
|
+
contentUrl?: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
thumbnailUrl?: string;
|
|
102
|
+
}
|
|
103
|
+
interface FilterItem {
|
|
104
|
+
name: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}
|
|
107
|
+
interface Filter {
|
|
108
|
+
id: string;
|
|
109
|
+
title: string;
|
|
110
|
+
filterItems: Array<FilterItem>;
|
|
111
|
+
}
|
|
112
|
+
interface RetorikActivity {
|
|
113
|
+
id: string;
|
|
114
|
+
type: string;
|
|
115
|
+
from: {
|
|
116
|
+
id: string;
|
|
117
|
+
name?: string;
|
|
118
|
+
role: 'bot' | 'channel' | 'user';
|
|
119
|
+
};
|
|
120
|
+
meta?: {
|
|
121
|
+
method?: string;
|
|
122
|
+
queue?: string[];
|
|
123
|
+
};
|
|
124
|
+
name?: string;
|
|
125
|
+
attachments?: DirectLineAttachment[];
|
|
126
|
+
attachmentLayout?: string;
|
|
127
|
+
suggestedActions?: any;
|
|
128
|
+
text?: string;
|
|
129
|
+
htmlText?: string;
|
|
130
|
+
speak?: string;
|
|
131
|
+
channelData?: {
|
|
132
|
+
[option: string]: any;
|
|
133
|
+
filters?: Filter[];
|
|
134
|
+
selectedFilters?: Filter[];
|
|
135
|
+
numberOfResults?: number;
|
|
136
|
+
category?: {
|
|
137
|
+
id: string;
|
|
138
|
+
label?: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
channelId?: string;
|
|
142
|
+
conversation?: {
|
|
143
|
+
id: string;
|
|
144
|
+
};
|
|
145
|
+
localTimezone?: string;
|
|
146
|
+
timestamp?: string;
|
|
147
|
+
localTimestamp?: string;
|
|
148
|
+
replyToId?: string;
|
|
149
|
+
value?: any;
|
|
150
|
+
locale?: string;
|
|
151
|
+
label?: string;
|
|
152
|
+
inputHint?: string;
|
|
153
|
+
messageType?: string;
|
|
154
|
+
personality?: {
|
|
155
|
+
Etag: string;
|
|
156
|
+
Context: Array<EmotionData>;
|
|
157
|
+
ActionTendencies: Array<any>;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
interface EmotionData {
|
|
161
|
+
emotion: string;
|
|
162
|
+
value: number;
|
|
163
|
+
}
|
|
164
|
+
interface DetailedAttachmentAction {
|
|
165
|
+
type: string;
|
|
166
|
+
name?: string;
|
|
167
|
+
label?: string;
|
|
168
|
+
contentType?: string;
|
|
169
|
+
linkedComponent: ((props?: any) => JSX.Element) | null;
|
|
170
|
+
}
|
|
171
|
+
export interface Configuration extends RetorikMenusConfiguration {
|
|
62
172
|
fullSize?: boolean;
|
|
63
173
|
isUsedOnBorne?: boolean;
|
|
64
174
|
locales?: {
|
|
@@ -75,7 +185,18 @@ export type Configuration = RetorikMenusConfiguration & {
|
|
|
75
185
|
logo?: {
|
|
76
186
|
src: string;
|
|
77
187
|
};
|
|
78
|
-
answerpanel?: boolean
|
|
188
|
+
answerpanel?: boolean | {
|
|
189
|
+
borne?: {
|
|
190
|
+
containerRowStart?: number;
|
|
191
|
+
containerRowEnd?: number;
|
|
192
|
+
};
|
|
193
|
+
landscape?: {
|
|
194
|
+
containerRowStart?: number;
|
|
195
|
+
containerRowEnd?: number;
|
|
196
|
+
containerRowStartText?: number;
|
|
197
|
+
containerRowEndText?: number;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
79
200
|
skipWelcome?: boolean;
|
|
80
201
|
preventExpectedInputHint?: boolean;
|
|
81
202
|
pagination?: {
|
|
@@ -84,9 +205,15 @@ export type Configuration = RetorikMenusConfiguration & {
|
|
|
84
205
|
mobile?: number;
|
|
85
206
|
};
|
|
86
207
|
remote?: {
|
|
87
|
-
desktop?: number;
|
|
88
|
-
desktopTactile?: number;
|
|
89
|
-
verticalTactile?: number;
|
|
208
|
+
desktop?: number | string;
|
|
209
|
+
desktopTactile?: number | string;
|
|
210
|
+
verticalTactile?: number | string;
|
|
211
|
+
};
|
|
212
|
+
languageChoiceBottom?: {
|
|
213
|
+
setUnderRemote?: boolean;
|
|
214
|
+
desktop?: number | string;
|
|
215
|
+
desktopTactile?: number | string;
|
|
216
|
+
verticalTactile?: number | string;
|
|
90
217
|
};
|
|
91
218
|
companyName?: string;
|
|
92
219
|
companyNameLocalized?: Record<string, string>;
|
|
@@ -128,12 +255,12 @@ export type Configuration = RetorikMenusConfiguration & {
|
|
|
128
255
|
disableSpeechMode?: boolean;
|
|
129
256
|
disableSound?: boolean;
|
|
130
257
|
timerForFilterSelectionListMode?: number;
|
|
131
|
-
}
|
|
132
|
-
export
|
|
258
|
+
}
|
|
259
|
+
export interface RetorikMenusConfiguration {
|
|
133
260
|
baseMenu?: Array<BaseMenu | CustomMenu>;
|
|
134
261
|
customMenu?: Array<CustomMenu> | Array<Array<CustomMenu>>;
|
|
135
262
|
subMenu?: Array<BaseSubMenu | CustomMenu>;
|
|
136
|
-
}
|
|
263
|
+
}
|
|
137
264
|
interface SpeechRecognitionOptions {
|
|
138
265
|
timerBeforeSpeechEnd?: number;
|
|
139
266
|
enableActivationSound?: boolean;
|
|
@@ -169,19 +296,20 @@ interface SayAsItem {
|
|
|
169
296
|
text: string;
|
|
170
297
|
ipa: string;
|
|
171
298
|
}
|
|
172
|
-
export
|
|
299
|
+
export interface WidgetConfiguration {
|
|
173
300
|
position?: 'right' | 'left';
|
|
174
301
|
width?: number;
|
|
175
302
|
button?: WidgetButton;
|
|
176
303
|
large?: WidgetFrame;
|
|
177
304
|
thumbnail?: WidgetFrame;
|
|
178
|
-
}
|
|
179
|
-
|
|
305
|
+
}
|
|
306
|
+
interface WidgetButton {
|
|
180
307
|
display?: boolean;
|
|
181
308
|
text?: {
|
|
182
309
|
content?: string;
|
|
183
310
|
color?: string;
|
|
184
311
|
bold?: boolean;
|
|
312
|
+
maxWidth?: string | number;
|
|
185
313
|
};
|
|
186
314
|
image?: {
|
|
187
315
|
url?: string;
|
|
@@ -198,8 +326,8 @@ type WidgetButton = {
|
|
|
198
326
|
color?: string;
|
|
199
327
|
};
|
|
200
328
|
position?: Position;
|
|
201
|
-
}
|
|
202
|
-
|
|
329
|
+
}
|
|
330
|
+
interface WidgetFrame {
|
|
203
331
|
height?: string;
|
|
204
332
|
width?: string;
|
|
205
333
|
position?: Position;
|
|
@@ -208,29 +336,29 @@ type WidgetFrame = {
|
|
|
208
336
|
thickness?: number;
|
|
209
337
|
rounded?: boolean;
|
|
210
338
|
};
|
|
211
|
-
}
|
|
212
|
-
|
|
339
|
+
}
|
|
340
|
+
interface Position {
|
|
213
341
|
top?: string;
|
|
214
342
|
bottom?: string;
|
|
215
343
|
left?: string;
|
|
216
344
|
right?: string;
|
|
217
|
-
}
|
|
218
|
-
export
|
|
345
|
+
}
|
|
346
|
+
export interface ViewsConfiguration {
|
|
219
347
|
homeRoute: string;
|
|
220
348
|
webcamRotation?: 0 | 90 | -90 | 180;
|
|
221
349
|
views: Views;
|
|
222
|
-
}
|
|
223
|
-
|
|
350
|
+
}
|
|
351
|
+
interface Views {
|
|
224
352
|
home: {
|
|
225
353
|
background: BackgroundOptions;
|
|
226
354
|
};
|
|
227
355
|
[option: string]: View;
|
|
228
|
-
}
|
|
229
|
-
export
|
|
356
|
+
}
|
|
357
|
+
export interface View {
|
|
230
358
|
background: BackgroundOptions;
|
|
231
359
|
[option: string]: string | number | boolean | undefined | null | BackgroundOptions;
|
|
232
|
-
}
|
|
233
|
-
export
|
|
360
|
+
}
|
|
361
|
+
export interface BackgroundOptions {
|
|
234
362
|
style: 'image' | 'video' | 'webcam' | 'neutral';
|
|
235
363
|
image?: string;
|
|
236
364
|
video?: string;
|
|
@@ -238,22 +366,31 @@ export type BackgroundOptions = {
|
|
|
238
366
|
neutral?: string;
|
|
239
367
|
overlayOpacity?: number;
|
|
240
368
|
blur?: number;
|
|
241
|
-
}
|
|
242
|
-
export
|
|
369
|
+
}
|
|
370
|
+
export interface NewsConfig {
|
|
243
371
|
intervalInSeconds?: number;
|
|
244
372
|
loop?: boolean;
|
|
245
373
|
openingVideo?: string;
|
|
246
374
|
endingVideo?: string;
|
|
247
375
|
showMenu?: boolean;
|
|
248
376
|
background: BackgroundOptions;
|
|
249
|
-
}
|
|
250
|
-
export
|
|
251
|
-
size?: number | string
|
|
252
|
-
height?: number | string
|
|
377
|
+
}
|
|
378
|
+
export interface ChatbotData {
|
|
379
|
+
size?: number | string;
|
|
380
|
+
height?: number | string;
|
|
253
381
|
fullWidthInDesktopMode?: boolean;
|
|
382
|
+
cameraPreset?: keyof typeof _presets1;
|
|
383
|
+
containerRowStart?: number;
|
|
384
|
+
containerRowEnd?: number;
|
|
385
|
+
}
|
|
386
|
+
export type BaseAgentData = string | {
|
|
387
|
+
url?: string;
|
|
388
|
+
animationsUrl?: string;
|
|
389
|
+
name?: string;
|
|
254
390
|
};
|
|
255
391
|
export type AgentData = null | {
|
|
256
392
|
url: string;
|
|
393
|
+
animationsUrl?: string;
|
|
257
394
|
portrait: string;
|
|
258
395
|
gender: 'male' | 'female' | 'other';
|
|
259
396
|
data: {
|
|
@@ -263,19 +400,25 @@ export type AgentData = null | {
|
|
|
263
400
|
[option: string]: number;
|
|
264
401
|
};
|
|
265
402
|
name?: string;
|
|
403
|
+
source?: Source3DEngine;
|
|
404
|
+
useBodyEngineThree: boolean;
|
|
266
405
|
};
|
|
267
|
-
export
|
|
406
|
+
export interface PonyfillFactoryCredentials {
|
|
268
407
|
region: string;
|
|
269
408
|
subscriptionKey?: string;
|
|
270
409
|
authorizationToken?: string;
|
|
271
|
-
}
|
|
272
|
-
export
|
|
410
|
+
}
|
|
411
|
+
export interface AddressData {
|
|
273
412
|
baseURI?: string;
|
|
274
413
|
tenant?: string;
|
|
275
414
|
prefix?: string;
|
|
276
415
|
licenceKey?: string;
|
|
277
|
-
|
|
278
|
-
|
|
416
|
+
directline?: {
|
|
417
|
+
tokenEndpoint: string;
|
|
418
|
+
address: string;
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
export interface UserData {
|
|
279
422
|
name: string;
|
|
280
423
|
id: string;
|
|
281
424
|
username: string;
|
|
@@ -285,62 +428,44 @@ export type UserData = {
|
|
|
285
428
|
token: string;
|
|
286
429
|
referrer: string;
|
|
287
430
|
ipaddress: string;
|
|
288
|
-
}
|
|
289
|
-
export
|
|
290
|
-
export type CustomVoice = {
|
|
431
|
+
}
|
|
432
|
+
export interface CustomVoice {
|
|
291
433
|
voice?: string;
|
|
292
434
|
gender?: 'male' | 'female' | 'other';
|
|
293
|
-
}
|
|
294
|
-
export
|
|
435
|
+
}
|
|
436
|
+
export interface AvailableLanguages {
|
|
295
437
|
default: string;
|
|
296
438
|
all: Array<string>;
|
|
297
|
-
}
|
|
298
|
-
|
|
439
|
+
}
|
|
440
|
+
interface BaseMenu {
|
|
299
441
|
view: AvailableViews;
|
|
300
442
|
indice: number;
|
|
301
|
-
}
|
|
302
|
-
|
|
443
|
+
}
|
|
444
|
+
interface BaseSubMenu {
|
|
303
445
|
view: AvailableSubViews;
|
|
304
446
|
indice: number;
|
|
305
|
-
}
|
|
306
|
-
export
|
|
447
|
+
}
|
|
448
|
+
export interface CustomMenu {
|
|
307
449
|
icon: JSX.Element;
|
|
308
450
|
clickHandler?: () => void;
|
|
309
|
-
label:
|
|
451
|
+
label: Record<string, string> | string;
|
|
310
452
|
customDisplay?: string;
|
|
311
453
|
indice: number;
|
|
312
454
|
closeParametersOnClickInMobileMode?: boolean;
|
|
313
455
|
name?: string;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
[key: string]: string;
|
|
317
|
-
};
|
|
318
|
-
interface GDPR {
|
|
456
|
+
}
|
|
457
|
+
export interface GDPR {
|
|
319
458
|
userConsent?: boolean;
|
|
320
|
-
title?:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
message?: {
|
|
324
|
-
[key: string]: string;
|
|
325
|
-
};
|
|
326
|
-
link?: {
|
|
327
|
-
[key: string]: string;
|
|
328
|
-
};
|
|
459
|
+
title?: Record<string, string>;
|
|
460
|
+
message?: Record<string, string>;
|
|
461
|
+
link?: Record<string, string>;
|
|
329
462
|
linkURL?: string;
|
|
330
|
-
buttonAccept?:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
[key: string]: string;
|
|
335
|
-
};
|
|
336
|
-
messageAccepted?: {
|
|
337
|
-
[key: string]: string;
|
|
338
|
-
};
|
|
339
|
-
messageRefused?: {
|
|
340
|
-
[key: string]: string;
|
|
341
|
-
};
|
|
463
|
+
buttonAccept?: Record<string, string>;
|
|
464
|
+
buttonRefuse?: Record<string, string>;
|
|
465
|
+
messageAccepted?: Record<string, string>;
|
|
466
|
+
messageRefused?: Record<string, string>;
|
|
342
467
|
}
|
|
343
|
-
|
|
468
|
+
interface ThemeButton {
|
|
344
469
|
background: {
|
|
345
470
|
default: string;
|
|
346
471
|
hover: string;
|
|
@@ -353,8 +478,8 @@ type ThemeButton = {
|
|
|
353
478
|
default: string;
|
|
354
479
|
hover: string;
|
|
355
480
|
};
|
|
356
|
-
}
|
|
357
|
-
|
|
481
|
+
}
|
|
482
|
+
interface ThemeButtonConditional {
|
|
358
483
|
background?: {
|
|
359
484
|
default?: string;
|
|
360
485
|
hover?: string;
|
|
@@ -367,8 +492,8 @@ type ThemeButtonConditional = {
|
|
|
367
492
|
default?: string;
|
|
368
493
|
hover?: string;
|
|
369
494
|
};
|
|
370
|
-
}
|
|
371
|
-
export
|
|
495
|
+
}
|
|
496
|
+
export interface RetorikThemeColors {
|
|
372
497
|
theme?: string;
|
|
373
498
|
primary?: string;
|
|
374
499
|
secondary?: string;
|
|
@@ -407,6 +532,8 @@ export type RetorikThemeColors = {
|
|
|
407
532
|
border?: string;
|
|
408
533
|
conversationUser?: string;
|
|
409
534
|
conversationBot?: string;
|
|
535
|
+
backgroundUser?: string;
|
|
536
|
+
backgroundBot?: string;
|
|
410
537
|
};
|
|
411
538
|
};
|
|
412
539
|
vocalMode?: {
|
|
@@ -437,16 +564,13 @@ export type RetorikThemeColors = {
|
|
|
437
564
|
hover?: string;
|
|
438
565
|
};
|
|
439
566
|
};
|
|
440
|
-
}
|
|
567
|
+
}
|
|
441
568
|
export interface RetorikMainComponentConfiguration extends RetorikSharedProps {
|
|
442
569
|
config?: Configuration;
|
|
443
570
|
viewsConfig?: ViewsConfiguration;
|
|
444
571
|
chatbotData?: ChatbotData;
|
|
572
|
+
agentData?: BaseAgentData;
|
|
445
573
|
chatbotDataWidget?: ChatbotData;
|
|
446
|
-
agentData?: string | {
|
|
447
|
-
url: string;
|
|
448
|
-
name?: string;
|
|
449
|
-
};
|
|
450
574
|
ponyfillFactoryCredentials?: PonyfillFactoryCredentials;
|
|
451
575
|
customVoice?: CustomVoice;
|
|
452
576
|
colors?: RetorikThemeColors;
|
|
@@ -471,81 +595,8 @@ export interface RetorikSharedProps {
|
|
|
471
595
|
width?: number | string | 'full';
|
|
472
596
|
height?: number | string | 'full';
|
|
473
597
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
contentType: string;
|
|
477
|
-
contentUrl?: string;
|
|
478
|
-
name?: string;
|
|
479
|
-
thumbnailUrl?: string;
|
|
480
|
-
}
|
|
481
|
-
interface FilterItem {
|
|
482
|
-
name: string;
|
|
483
|
-
value: string;
|
|
484
|
-
}
|
|
485
|
-
interface Filter {
|
|
486
|
-
id: string;
|
|
487
|
-
title: string;
|
|
488
|
-
filterItems: Array<FilterItem>;
|
|
489
|
-
}
|
|
490
|
-
interface RetorikActivity {
|
|
491
|
-
id: string;
|
|
492
|
-
type: string;
|
|
493
|
-
from: {
|
|
494
|
-
id: string;
|
|
495
|
-
name?: string;
|
|
496
|
-
role: 'bot' | 'channel' | 'user';
|
|
497
|
-
};
|
|
498
|
-
meta?: {
|
|
499
|
-
method?: string;
|
|
500
|
-
queue?: string[];
|
|
501
|
-
};
|
|
502
|
-
name?: string;
|
|
503
|
-
attachments?: DirectLineAttachment[];
|
|
504
|
-
attachmentLayout?: string;
|
|
505
|
-
suggestedActions?: any;
|
|
506
|
-
text?: string;
|
|
507
|
-
htmlText?: string;
|
|
508
|
-
speak?: string;
|
|
509
|
-
channelData?: {
|
|
510
|
-
[option: string]: any;
|
|
511
|
-
filters?: Filter[];
|
|
512
|
-
selectedFilters?: Filter[];
|
|
513
|
-
numberOfResults?: number;
|
|
514
|
-
category?: {
|
|
515
|
-
id: string;
|
|
516
|
-
label?: string;
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
|
-
channelId?: string;
|
|
520
|
-
conversation?: {
|
|
521
|
-
id: string;
|
|
522
|
-
};
|
|
523
|
-
localTimezone?: string;
|
|
524
|
-
timestamp?: string;
|
|
525
|
-
localTimestamp?: string;
|
|
526
|
-
replyToId?: string;
|
|
527
|
-
value?: any;
|
|
528
|
-
locale?: string;
|
|
529
|
-
label?: string;
|
|
530
|
-
inputHint?: string;
|
|
531
|
-
messageType?: string;
|
|
532
|
-
personality?: {
|
|
533
|
-
Etag: string;
|
|
534
|
-
Context: Array<EmotionData>;
|
|
535
|
-
ActionTendencies: Array<any>;
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
interface EmotionData {
|
|
539
|
-
emotion: string;
|
|
540
|
-
value: number;
|
|
541
|
-
}
|
|
542
|
-
interface DetailedAttachmentAction {
|
|
543
|
-
type: string;
|
|
544
|
-
name?: string;
|
|
545
|
-
label?: string;
|
|
546
|
-
contentType?: string;
|
|
547
|
-
linkedComponent: ((props?: any) => JSX.Element) | null;
|
|
548
|
-
}
|
|
598
|
+
export const setVisibility: (value: 'visible' | 'hidden') => void;
|
|
599
|
+
export const toggleVisibility: () => void;
|
|
549
600
|
interface UtilsStore {
|
|
550
601
|
fullScreenImage: string | undefined;
|
|
551
602
|
lastListActivity: string | undefined;
|
|
@@ -563,34 +614,94 @@ interface UtilsStore {
|
|
|
563
614
|
askedForKioskParametersOpening: boolean;
|
|
564
615
|
detailedAttachmentTriggers: Array<DetailedAttachmentAction>;
|
|
565
616
|
modalFullscreenContent: JSX.Element | null;
|
|
617
|
+
modalFullscreenContentNoDisplayId: string | undefined;
|
|
566
618
|
printingCallback: ((url: string) => void) | null;
|
|
567
619
|
GDPRDisplay: boolean;
|
|
568
620
|
GDPRWindowData: GDPR | undefined;
|
|
569
621
|
GDPRUserConsent: boolean;
|
|
570
622
|
unlockClickedButton: boolean;
|
|
571
623
|
dashboardOpened: boolean;
|
|
624
|
+
clickedOnUI: UIPart;
|
|
572
625
|
}
|
|
573
|
-
export const useUtilsStore:
|
|
626
|
+
export const useUtilsStore: UseBoundStore<StoreApi<UtilsStore>>;
|
|
574
627
|
export const setCurrentSubView: (subview: number) => void;
|
|
575
628
|
export const setCurrentCustomView: (customView: CustomMenu) => void;
|
|
576
629
|
export const showAgent: () => void;
|
|
577
630
|
export const hideAgent: () => void;
|
|
578
631
|
export const sendActivity: (activity: RetorikActivity | undefined) => void;
|
|
579
632
|
export const addDetailedAttachmentTrigger: (value: DetailedAttachmentAction) => void;
|
|
580
|
-
export const setModalFullscreenContent: (value: JSX.Element | null) => void;
|
|
633
|
+
export const setModalFullscreenContent: (value: JSX.Element | null, fromActivity?: string) => void;
|
|
581
634
|
export const setPrintingCallback: (value: ((url: string) => void) | null) => void;
|
|
582
635
|
declare const unlockClickedButton: () => void;
|
|
583
636
|
export const setDashboardOpened: (value: boolean) => void;
|
|
637
|
+
interface Boundary {
|
|
638
|
+
word: string;
|
|
639
|
+
startTime: number;
|
|
640
|
+
endTime: number;
|
|
641
|
+
boundaryType: string;
|
|
642
|
+
}
|
|
643
|
+
interface SpeechStore {
|
|
644
|
+
ponyfillCredentials: PonyfillFactoryCredentials | undefined;
|
|
645
|
+
useContinuousRecognition: boolean;
|
|
646
|
+
customVoice: CustomVoice | undefined;
|
|
647
|
+
voice: SpeechSynthesisVoice | null;
|
|
648
|
+
speaking: boolean;
|
|
649
|
+
muted: boolean;
|
|
650
|
+
cancel: boolean;
|
|
651
|
+
boundaryData: Array<Boundary>;
|
|
652
|
+
visemeData: Array<SpeechSynthesisEventProps>;
|
|
653
|
+
singleVisemeAdded: SpeechSynthesisEventProps | null;
|
|
654
|
+
multiVisemesAdded: Array<SpeechSynthesisEventProps>;
|
|
655
|
+
currentReplyToId: string | undefined;
|
|
656
|
+
currentPlaying: RetorikActivity | undefined;
|
|
657
|
+
endedActivities: Array<string>;
|
|
658
|
+
currentOrLastPlayedActivity: RetorikActivity | undefined;
|
|
659
|
+
isMicrophoneAllowed: boolean;
|
|
660
|
+
showMicrophoneModal: boolean;
|
|
661
|
+
permissionStatus: PermissionStatus;
|
|
662
|
+
activeRecognitionState: RecognitionState;
|
|
663
|
+
lastRecognitionInterim: string;
|
|
664
|
+
streamingReplyToId: string | null;
|
|
665
|
+
streamingQueue: Array<RetorikActivity>;
|
|
666
|
+
streamingQueueForText: Array<RetorikActivity>;
|
|
667
|
+
currentStreaming: string | null;
|
|
668
|
+
streamingQueueFullLength: number;
|
|
669
|
+
streamingReplyToIdToIgnore: string | null;
|
|
670
|
+
speechRecognitionDynamicGrammars: Array<string>;
|
|
671
|
+
externalTextToSpeech: string | undefined;
|
|
672
|
+
}
|
|
673
|
+
export const useSpeechStore: UseBoundStore<StoreApi<SpeechStore>>;
|
|
674
|
+
export const setMuted: (value: boolean) => void;
|
|
675
|
+
export const toggleMicrophone: () => void;
|
|
676
|
+
export const playExternalSynthesis: (value: string) => void;
|
|
677
|
+
export const characters: {
|
|
678
|
+
alice: string;
|
|
679
|
+
greg: string;
|
|
680
|
+
jeanmarc: string;
|
|
681
|
+
jessica: string;
|
|
682
|
+
jessica_short: string;
|
|
683
|
+
ikaa: string;
|
|
684
|
+
karine: string;
|
|
685
|
+
lea: string;
|
|
686
|
+
prosper: string;
|
|
687
|
+
raphael: string;
|
|
688
|
+
rowan: string;
|
|
689
|
+
rowan_short: string;
|
|
690
|
+
zahra: string;
|
|
691
|
+
};
|
|
584
692
|
interface RetorikStore {
|
|
585
693
|
configuration: Configuration;
|
|
586
694
|
addressData: AddressData;
|
|
695
|
+
containerRef: HTMLDivElement | null;
|
|
587
696
|
sendBoxRef: HTMLTextAreaElement | null;
|
|
697
|
+
sendBoxPlaceHolder: string | undefined;
|
|
588
698
|
canFocusSendBox: boolean;
|
|
589
699
|
mode: Mode;
|
|
590
700
|
baseAddress: string;
|
|
591
701
|
subtitlesInConfiguration: boolean;
|
|
592
702
|
displaySubtitles: boolean;
|
|
593
703
|
agentData: AgentData | undefined;
|
|
704
|
+
gpuData: TierResult | undefined;
|
|
594
705
|
loaderClosed: boolean;
|
|
595
706
|
appAvailable: boolean;
|
|
596
707
|
currentLayout: ContainerParent;
|
|
@@ -598,69 +709,15 @@ interface RetorikStore {
|
|
|
598
709
|
disableSound: boolean;
|
|
599
710
|
isWaitingForResponse: boolean;
|
|
600
711
|
skipLoader: boolean;
|
|
712
|
+
displayAgentInNews: boolean;
|
|
713
|
+
submitDelayBeforeSendingMessage: number | undefined;
|
|
714
|
+
disableHistory: boolean;
|
|
601
715
|
}
|
|
602
|
-
export const useRetorikStore:
|
|
716
|
+
export const useRetorikStore: UseBoundStore<StoreApi<RetorikStore>>;
|
|
603
717
|
export const setMode: (value: Mode) => void;
|
|
604
718
|
export const setLoaderClosed: (value: boolean) => void;
|
|
605
|
-
export const
|
|
606
|
-
export const
|
|
607
|
-
export const CONTENT_TYPE_POI = "application/vnd.davi.retorik.card.poi";
|
|
608
|
-
interface AddressStructured {
|
|
609
|
-
addressLocality?: string;
|
|
610
|
-
street?: string;
|
|
611
|
-
postalCode?: string;
|
|
612
|
-
}
|
|
613
|
-
export type POIContentType = {
|
|
614
|
-
identifier?: string;
|
|
615
|
-
title?: string;
|
|
616
|
-
subtitle?: string;
|
|
617
|
-
text?: string;
|
|
618
|
-
addressStructured?: AddressStructured;
|
|
619
|
-
address?: string;
|
|
620
|
-
contact?: string;
|
|
621
|
-
phoneNumber?: string;
|
|
622
|
-
category?: {
|
|
623
|
-
id: string;
|
|
624
|
-
label: string;
|
|
625
|
-
};
|
|
626
|
-
media?: [
|
|
627
|
-
{
|
|
628
|
-
url?: string;
|
|
629
|
-
title?: string;
|
|
630
|
-
credits?: string;
|
|
631
|
-
}
|
|
632
|
-
];
|
|
633
|
-
color?: string;
|
|
634
|
-
customerReviews?: number;
|
|
635
|
-
coordinates?: Coordinates;
|
|
636
|
-
downloadUri?: string;
|
|
637
|
-
favorite?: boolean;
|
|
638
|
-
review?: Review;
|
|
639
|
-
infoBanner?: string;
|
|
640
|
-
otherInformations?: Array<{
|
|
641
|
-
title: string;
|
|
642
|
-
content: string | Array<string>;
|
|
643
|
-
}>;
|
|
644
|
-
tap?: {
|
|
645
|
-
[option: string]: string;
|
|
646
|
-
};
|
|
647
|
-
distance?: number;
|
|
648
|
-
};
|
|
649
|
-
type Review = {
|
|
650
|
-
author?: {
|
|
651
|
-
name?: string;
|
|
652
|
-
capacity?: string;
|
|
653
|
-
};
|
|
654
|
-
comment?: string;
|
|
655
|
-
picture?: {
|
|
656
|
-
url?: string;
|
|
657
|
-
description?: string;
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
type Coordinates = {
|
|
661
|
-
latitude: number;
|
|
662
|
-
longitude: number;
|
|
663
|
-
};
|
|
719
|
+
export const setDisplaySubtitles: (value: boolean) => void;
|
|
720
|
+
export const toggleSubtitles: () => void;
|
|
664
721
|
interface TranslationViews {
|
|
665
722
|
'1': string;
|
|
666
723
|
'2': string;
|
|
@@ -680,6 +737,7 @@ interface TranslationCommon {
|
|
|
680
737
|
downloadsheetmobile: string;
|
|
681
738
|
filter: string;
|
|
682
739
|
history: string;
|
|
740
|
+
knowmore: string;
|
|
683
741
|
lang: string;
|
|
684
742
|
menu: string;
|
|
685
743
|
mode: string;
|
|
@@ -723,7 +781,7 @@ interface TranslationLanguage {
|
|
|
723
781
|
select: string;
|
|
724
782
|
}
|
|
725
783
|
interface TranslationLink {
|
|
726
|
-
|
|
784
|
+
buttontext: string;
|
|
727
785
|
goto: string;
|
|
728
786
|
click: string;
|
|
729
787
|
scanQR: string;
|
|
@@ -750,7 +808,6 @@ interface TranslationLoader {
|
|
|
750
808
|
}
|
|
751
809
|
interface TranslationMenu {
|
|
752
810
|
message: string;
|
|
753
|
-
allowMicrophone: string;
|
|
754
811
|
backconversation: string;
|
|
755
812
|
answer: string;
|
|
756
813
|
}
|
|
@@ -801,6 +858,16 @@ interface TranslationGDPR {
|
|
|
801
858
|
messageAccepted: string;
|
|
802
859
|
messageRefused: string;
|
|
803
860
|
}
|
|
861
|
+
interface TranslationAnghello {
|
|
862
|
+
listening: string;
|
|
863
|
+
correct: string;
|
|
864
|
+
dontknow: string;
|
|
865
|
+
}
|
|
866
|
+
interface TranslationMicrophone {
|
|
867
|
+
allow: string;
|
|
868
|
+
rejected: string;
|
|
869
|
+
instructions: string;
|
|
870
|
+
}
|
|
804
871
|
interface TranslationFile extends TranslationViews {
|
|
805
872
|
common: TranslationCommon;
|
|
806
873
|
emergency: TranslationEmergency;
|
|
@@ -817,46 +884,99 @@ interface TranslationFile extends TranslationViews {
|
|
|
817
884
|
suggestion: TranslationSuggestion;
|
|
818
885
|
template: TranslationTemplate;
|
|
819
886
|
GDPR: TranslationGDPR;
|
|
887
|
+
anghello: TranslationAnghello;
|
|
888
|
+
microphone: TranslationMicrophone;
|
|
820
889
|
}
|
|
821
|
-
export function fetchAvailableLanguages(
|
|
890
|
+
export function fetchAvailableLanguages(baseAddress: string, needVisemes?: boolean): Promise<AvailableLanguages>;
|
|
891
|
+
export default getThemeColors;
|
|
822
892
|
interface LocaleStore {
|
|
823
893
|
locale: string;
|
|
824
894
|
defaultLocale: string;
|
|
825
895
|
supported: string[];
|
|
896
|
+
dumpedLanguagesFallback: Record<string, string>;
|
|
897
|
+
replacementLocales: Record<string, string>;
|
|
826
898
|
defaultTranslations: TranslationFile;
|
|
827
899
|
currentTranslations: TranslationFile;
|
|
900
|
+
isRTL: boolean;
|
|
828
901
|
}
|
|
829
|
-
export const useLocaleStore:
|
|
902
|
+
export const useLocaleStore: UseBoundStore<StoreApi<LocaleStore>>;
|
|
830
903
|
export const getLocale: () => string;
|
|
831
904
|
export const setLocale: (locale: string) => void;
|
|
905
|
+
export default getRetorikConfigs;
|
|
906
|
+
export const CONTENT_TYPE_ADAPTIVE_CARD = "application/vnd.microsoft.card.adaptive";
|
|
907
|
+
export const CONTENT_TYPE_NEWS = "application/vnd.davi.retorik.card.news";
|
|
908
|
+
export const CONTENT_TYPE_POI = "application/vnd.davi.retorik.card.poi";
|
|
909
|
+
interface AddressStructured {
|
|
910
|
+
addressLocality?: string;
|
|
911
|
+
street?: string;
|
|
912
|
+
postalCode?: string;
|
|
913
|
+
}
|
|
914
|
+
export interface POIContentType {
|
|
915
|
+
identifier?: string;
|
|
916
|
+
title?: string;
|
|
917
|
+
subtitle?: string;
|
|
918
|
+
text?: string;
|
|
919
|
+
addressStructured?: AddressStructured;
|
|
920
|
+
address?: string;
|
|
921
|
+
contact?: string;
|
|
922
|
+
phoneNumber?: string;
|
|
923
|
+
category?: {
|
|
924
|
+
id: string;
|
|
925
|
+
label: string;
|
|
926
|
+
};
|
|
927
|
+
media?: [
|
|
928
|
+
{
|
|
929
|
+
url?: string;
|
|
930
|
+
title?: string;
|
|
931
|
+
credits?: string;
|
|
932
|
+
}
|
|
933
|
+
];
|
|
934
|
+
color?: string;
|
|
935
|
+
customerReviews?: number;
|
|
936
|
+
coordinates?: Coordinates;
|
|
937
|
+
downloadUri?: string;
|
|
938
|
+
favorite?: boolean;
|
|
939
|
+
review?: Review;
|
|
940
|
+
infoBanner?: string;
|
|
941
|
+
otherInformations?: Array<{
|
|
942
|
+
title: string;
|
|
943
|
+
content: string | Array<string>;
|
|
944
|
+
}>;
|
|
945
|
+
tap?: {
|
|
946
|
+
[option: string]: string;
|
|
947
|
+
};
|
|
948
|
+
distance?: number;
|
|
949
|
+
}
|
|
950
|
+
interface Review {
|
|
951
|
+
author?: {
|
|
952
|
+
name?: string;
|
|
953
|
+
capacity?: string;
|
|
954
|
+
};
|
|
955
|
+
comment?: string;
|
|
956
|
+
picture?: {
|
|
957
|
+
url?: string;
|
|
958
|
+
description?: string;
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
interface Coordinates {
|
|
962
|
+
latitude: number;
|
|
963
|
+
longitude: number;
|
|
964
|
+
}
|
|
832
965
|
export const sendMessage: (text?: string, value?: Record<string, any>) => void;
|
|
833
966
|
export const sendEvent: (name: string, value?: Record<string, any> | null) => void;
|
|
967
|
+
export const pauseConversation: () => void;
|
|
968
|
+
export const resumeConversation: () => void;
|
|
969
|
+
export const sendMessageToChatbot: (value: string) => void;
|
|
834
970
|
export const openWidget: () => void;
|
|
835
971
|
export const closeWidget: () => void;
|
|
836
972
|
export const toggleWidget: () => void;
|
|
837
973
|
export const toggleDisplay: () => void;
|
|
838
|
-
export default getThemeColors;
|
|
839
|
-
export default getRetorikConfigs;
|
|
840
974
|
export const RetorikAgent: (props: RetorikMainComponentProps) => JSX.Element;
|
|
841
975
|
export const RetorikWidget: (props: RetorikMainComponentProps & RetorikWidgetProps) => JSX.Element;
|
|
842
976
|
export const RetorikNews: (props: RetorikMainComponentProps) => JSX.Element;
|
|
843
|
-
export const characters: {
|
|
844
|
-
alice: string;
|
|
845
|
-
greg: string;
|
|
846
|
-
jeanmarc: string;
|
|
847
|
-
jessica: string;
|
|
848
|
-
jessica_short: string;
|
|
849
|
-
ikaa: string;
|
|
850
|
-
karine: string;
|
|
851
|
-
lea: string;
|
|
852
|
-
prosper: string;
|
|
853
|
-
raphael: string;
|
|
854
|
-
rowan: string;
|
|
855
|
-
rowan_short: string;
|
|
856
|
-
zahra: string;
|
|
857
|
-
};
|
|
858
977
|
export const resetStores: () => void;
|
|
859
978
|
export const renderAgent: (props: any, element: HTMLElement) => void;
|
|
860
979
|
export default RetorikAgent;
|
|
980
|
+
export { presets };
|
|
861
981
|
|
|
862
982
|
//# sourceMappingURL=index.d.ts.map
|