@deepdesk/deepdesk-sdk 15.1.0 → 15.1.1-beta.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/dist/index.cjs.js +8 -8
- package/dist/index.d.mts +63 -88
- package/dist/index.d.ts +63 -88
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +16 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -482,7 +482,6 @@ declare namespace Server {
|
|
|
482
482
|
type Account = {
|
|
483
483
|
code: string;
|
|
484
484
|
name: string;
|
|
485
|
-
rule_engine: boolean;
|
|
486
485
|
live_translation_enabled: boolean;
|
|
487
486
|
};
|
|
488
487
|
/**
|
|
@@ -1066,12 +1065,6 @@ declare class DeepdeskAPI {
|
|
|
1066
1065
|
verifyLoginToken(token: string): Promise<{
|
|
1067
1066
|
isLoggedIn: boolean;
|
|
1068
1067
|
}>;
|
|
1069
|
-
/**
|
|
1070
|
-
* @deprecated in favour of evaluateAssistant
|
|
1071
|
-
*/
|
|
1072
|
-
evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
|
|
1073
|
-
raiseForFailingConditions?: boolean;
|
|
1074
|
-
}): Promise<CamelCaseKeys<Server.LegacyCue[]>>;
|
|
1075
1068
|
/**
|
|
1076
1069
|
* Temporarily restore getSummary for more controlled rollout
|
|
1077
1070
|
* @deprecated
|
|
@@ -1107,7 +1100,6 @@ declare class DeepdeskAPI {
|
|
|
1107
1100
|
}): Promise<{
|
|
1108
1101
|
threadId: number;
|
|
1109
1102
|
}>;
|
|
1110
|
-
getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
|
|
1111
1103
|
translateMessages(params: TranslationRequest): Promise<TranslationResponse>;
|
|
1112
1104
|
private handleDeepdeskVersionHeaders;
|
|
1113
1105
|
}
|
|
@@ -1278,7 +1270,7 @@ type MetricState = {
|
|
|
1278
1270
|
textSuggestions: SuggestionMetrics[];
|
|
1279
1271
|
cuts: any[];
|
|
1280
1272
|
};
|
|
1281
|
-
type State$
|
|
1273
|
+
type State$c = {
|
|
1282
1274
|
text: string;
|
|
1283
1275
|
html: string | null;
|
|
1284
1276
|
selection: SelectionRange;
|
|
@@ -1293,7 +1285,7 @@ type State$d = {
|
|
|
1293
1285
|
selectedSuggestionIndex: number;
|
|
1294
1286
|
};
|
|
1295
1287
|
|
|
1296
|
-
type LegacyCue
|
|
1288
|
+
type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
|
|
1297
1289
|
isLoading?: boolean;
|
|
1298
1290
|
specialType?: 'summary';
|
|
1299
1291
|
};
|
|
@@ -1315,7 +1307,7 @@ type AssistantInteraction = {
|
|
|
1315
1307
|
sources?: AssistantAnswerSource[];
|
|
1316
1308
|
};
|
|
1317
1309
|
};
|
|
1318
|
-
type State$
|
|
1310
|
+
type State$b = {
|
|
1319
1311
|
cues: Cue[];
|
|
1320
1312
|
threads: Record<number, AssistantInteraction[]>;
|
|
1321
1313
|
fetchState: FetchState;
|
|
@@ -1326,35 +1318,35 @@ type Transcript = Array<{
|
|
|
1326
1318
|
}>;
|
|
1327
1319
|
type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
|
|
1328
1320
|
|
|
1329
|
-
interface State$
|
|
1321
|
+
interface State$a {
|
|
1330
1322
|
isLoggedIn: boolean | null;
|
|
1331
1323
|
loginFetchState: FetchState;
|
|
1332
1324
|
verifyFetchState: FetchState;
|
|
1333
1325
|
showLoginOverlay: boolean;
|
|
1334
1326
|
}
|
|
1335
1327
|
|
|
1336
|
-
interface State$
|
|
1328
|
+
interface State$9 {
|
|
1337
1329
|
current: Conversation | null;
|
|
1338
1330
|
isSupported: boolean | null;
|
|
1339
1331
|
}
|
|
1340
1332
|
|
|
1341
1333
|
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
1342
|
-
type State$
|
|
1334
|
+
type State$8 = {
|
|
1343
1335
|
data: ContentType[] | null;
|
|
1344
1336
|
fetchState: FetchState;
|
|
1345
1337
|
};
|
|
1346
1338
|
|
|
1347
|
-
type State$
|
|
1339
|
+
type State$7 = {
|
|
1348
1340
|
token: string | null;
|
|
1349
1341
|
interval: NodeJS.Timer | null;
|
|
1350
1342
|
};
|
|
1351
1343
|
|
|
1352
|
-
type State$
|
|
1344
|
+
type State$6 = {
|
|
1353
1345
|
data: Entity[] | null;
|
|
1354
1346
|
fetchState: FetchState;
|
|
1355
1347
|
};
|
|
1356
1348
|
|
|
1357
|
-
type State$
|
|
1349
|
+
type State$5 = {
|
|
1358
1350
|
data: KnowledgeAssistant | null;
|
|
1359
1351
|
fetchState: FetchState;
|
|
1360
1352
|
};
|
|
@@ -1366,14 +1358,14 @@ interface StoreConfig {
|
|
|
1366
1358
|
preloadedState?: any;
|
|
1367
1359
|
}
|
|
1368
1360
|
declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
1369
|
-
assistants: State$
|
|
1370
|
-
auth: State$
|
|
1371
|
-
conversation: State$
|
|
1372
|
-
contentTypes: State$
|
|
1373
|
-
passwordlessToken: State$
|
|
1374
|
-
entities: State$
|
|
1375
|
-
knowledgeAssistant: State$
|
|
1376
|
-
handlingTime: State$
|
|
1361
|
+
assistants: State$b;
|
|
1362
|
+
auth: State$a;
|
|
1363
|
+
conversation: State$9;
|
|
1364
|
+
contentTypes: State$8;
|
|
1365
|
+
passwordlessToken: State$7;
|
|
1366
|
+
entities: State$6;
|
|
1367
|
+
knowledgeAssistant: State$5;
|
|
1368
|
+
handlingTime: State$4;
|
|
1377
1369
|
info: {
|
|
1378
1370
|
agentInfo?: AgentInfo | undefined;
|
|
1379
1371
|
agentSettings: unknown;
|
|
@@ -1382,7 +1374,7 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1382
1374
|
platformVariables?: VariableMapping | undefined;
|
|
1383
1375
|
fetchState: FetchState;
|
|
1384
1376
|
};
|
|
1385
|
-
input: State$
|
|
1377
|
+
input: State$c;
|
|
1386
1378
|
settings: {
|
|
1387
1379
|
locale: Locale;
|
|
1388
1380
|
deanonymize: boolean;
|
|
@@ -1415,9 +1407,9 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1415
1407
|
enableFeedbackForm: boolean;
|
|
1416
1408
|
hasKeyboardInput: boolean;
|
|
1417
1409
|
};
|
|
1418
|
-
profile: State$
|
|
1419
|
-
search: State$
|
|
1420
|
-
styleSuggestions: State$
|
|
1410
|
+
profile: State$3;
|
|
1411
|
+
search: State$2;
|
|
1412
|
+
styleSuggestions: State$1;
|
|
1421
1413
|
ui: {
|
|
1422
1414
|
showTabHint: boolean;
|
|
1423
1415
|
inputHasFocus: boolean;
|
|
@@ -1425,18 +1417,17 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1425
1417
|
openOverlayWhenTyping: boolean;
|
|
1426
1418
|
overlayCollapsedUserOverwrite: boolean;
|
|
1427
1419
|
};
|
|
1428
|
-
rules: State$1;
|
|
1429
1420
|
textSuggestions: TextSuggestionState;
|
|
1430
1421
|
}>, redux.AnyAction>;
|
|
1431
1422
|
declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
|
|
1432
|
-
assistants: State$
|
|
1433
|
-
auth: State$
|
|
1434
|
-
conversation: State$
|
|
1435
|
-
contentTypes: State$
|
|
1436
|
-
passwordlessToken: State$
|
|
1437
|
-
entities: State$
|
|
1438
|
-
knowledgeAssistant: State$
|
|
1439
|
-
handlingTime: State$
|
|
1423
|
+
assistants: State$b;
|
|
1424
|
+
auth: State$a;
|
|
1425
|
+
conversation: State$9;
|
|
1426
|
+
contentTypes: State$8;
|
|
1427
|
+
passwordlessToken: State$7;
|
|
1428
|
+
entities: State$6;
|
|
1429
|
+
knowledgeAssistant: State$5;
|
|
1430
|
+
handlingTime: State$4;
|
|
1440
1431
|
info: {
|
|
1441
1432
|
agentInfo?: AgentInfo | undefined;
|
|
1442
1433
|
agentSettings: unknown;
|
|
@@ -1445,7 +1436,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1445
1436
|
platformVariables?: VariableMapping | undefined;
|
|
1446
1437
|
fetchState: FetchState;
|
|
1447
1438
|
};
|
|
1448
|
-
input: State$
|
|
1439
|
+
input: State$c;
|
|
1449
1440
|
settings: {
|
|
1450
1441
|
locale: Locale;
|
|
1451
1442
|
deanonymize: boolean;
|
|
@@ -1478,9 +1469,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1478
1469
|
enableFeedbackForm: boolean;
|
|
1479
1470
|
hasKeyboardInput: boolean;
|
|
1480
1471
|
};
|
|
1481
|
-
profile: State$
|
|
1482
|
-
search: State$
|
|
1483
|
-
styleSuggestions: State$
|
|
1472
|
+
profile: State$3;
|
|
1473
|
+
search: State$2;
|
|
1474
|
+
styleSuggestions: State$1;
|
|
1484
1475
|
ui: {
|
|
1485
1476
|
showTabHint: boolean;
|
|
1486
1477
|
inputHasFocus: boolean;
|
|
@@ -1488,17 +1479,16 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1488
1479
|
openOverlayWhenTyping: boolean;
|
|
1489
1480
|
overlayCollapsedUserOverwrite: boolean;
|
|
1490
1481
|
};
|
|
1491
|
-
rules: State$1;
|
|
1492
1482
|
textSuggestions: TextSuggestionState;
|
|
1493
1483
|
}, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
|
|
1494
|
-
assistants: State$
|
|
1495
|
-
auth: State$
|
|
1496
|
-
conversation: State$
|
|
1497
|
-
contentTypes: State$
|
|
1498
|
-
passwordlessToken: State$
|
|
1499
|
-
entities: State$
|
|
1500
|
-
knowledgeAssistant: State$
|
|
1501
|
-
handlingTime: State$
|
|
1484
|
+
assistants: State$b;
|
|
1485
|
+
auth: State$a;
|
|
1486
|
+
conversation: State$9;
|
|
1487
|
+
contentTypes: State$8;
|
|
1488
|
+
passwordlessToken: State$7;
|
|
1489
|
+
entities: State$6;
|
|
1490
|
+
knowledgeAssistant: State$5;
|
|
1491
|
+
handlingTime: State$4;
|
|
1502
1492
|
info: {
|
|
1503
1493
|
agentInfo?: AgentInfo | undefined;
|
|
1504
1494
|
agentSettings: unknown;
|
|
@@ -1507,7 +1497,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1507
1497
|
platformVariables?: VariableMapping | undefined;
|
|
1508
1498
|
fetchState: FetchState;
|
|
1509
1499
|
};
|
|
1510
|
-
input: State$
|
|
1500
|
+
input: State$c;
|
|
1511
1501
|
settings: {
|
|
1512
1502
|
locale: Locale;
|
|
1513
1503
|
deanonymize: boolean;
|
|
@@ -1540,9 +1530,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1540
1530
|
enableFeedbackForm: boolean;
|
|
1541
1531
|
hasKeyboardInput: boolean;
|
|
1542
1532
|
};
|
|
1543
|
-
profile: State$
|
|
1544
|
-
search: State$
|
|
1545
|
-
styleSuggestions: State$
|
|
1533
|
+
profile: State$3;
|
|
1534
|
+
search: State$2;
|
|
1535
|
+
styleSuggestions: State$1;
|
|
1546
1536
|
ui: {
|
|
1547
1537
|
showTabHint: boolean;
|
|
1548
1538
|
inputHasFocus: boolean;
|
|
@@ -1550,7 +1540,6 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1550
1540
|
openOverlayWhenTyping: boolean;
|
|
1551
1541
|
overlayCollapsedUserOverwrite: boolean;
|
|
1552
1542
|
};
|
|
1553
|
-
rules: State$1;
|
|
1554
1543
|
textSuggestions: TextSuggestionState;
|
|
1555
1544
|
}>, redux.AnyAction, {
|
|
1556
1545
|
dynamicThunkObject: Record<string, unknown> | undefined;
|
|
@@ -1559,12 +1548,12 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1559
1548
|
type RootState = ReturnType<typeof reducers>;
|
|
1560
1549
|
type Store = ReturnType<typeof createStore>;
|
|
1561
1550
|
|
|
1562
|
-
type State$
|
|
1551
|
+
type State$4 = {
|
|
1563
1552
|
startTime: Date | null;
|
|
1564
1553
|
stopTime: Date | null;
|
|
1565
1554
|
};
|
|
1566
1555
|
|
|
1567
|
-
type State$
|
|
1556
|
+
type State$3 = {
|
|
1568
1557
|
data: Profile | null;
|
|
1569
1558
|
fetchState: FetchState;
|
|
1570
1559
|
};
|
|
@@ -1578,7 +1567,7 @@ declare enum SearchResultDefaultType {
|
|
|
1578
1567
|
}
|
|
1579
1568
|
type SearchResultType = string | SearchResultDefaultType;
|
|
1580
1569
|
type SearchResult = SearchSuggestion;
|
|
1581
|
-
interface State$
|
|
1570
|
+
interface State$2 {
|
|
1582
1571
|
list: Array<SearchResult>;
|
|
1583
1572
|
page: string;
|
|
1584
1573
|
fetchState: FetchState;
|
|
@@ -1587,20 +1576,11 @@ interface State$3 {
|
|
|
1587
1576
|
}
|
|
1588
1577
|
|
|
1589
1578
|
type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
|
|
1590
|
-
interface State$
|
|
1579
|
+
interface State$1 {
|
|
1591
1580
|
list: StyleSuggestion;
|
|
1592
1581
|
fetchState: FetchState;
|
|
1593
1582
|
}
|
|
1594
1583
|
|
|
1595
|
-
type LegacyCue = CamelCaseKeys<Server.LegacyCue>;
|
|
1596
|
-
type State$1 = {
|
|
1597
|
-
cues: LegacyCue[];
|
|
1598
|
-
fetchState: FetchState;
|
|
1599
|
-
};
|
|
1600
|
-
type EvaluateRuleOptions = {
|
|
1601
|
-
excludeFromWidget: boolean;
|
|
1602
|
-
};
|
|
1603
|
-
|
|
1604
1584
|
type SuggestionState = {
|
|
1605
1585
|
suggestions: TextSuggestion[];
|
|
1606
1586
|
fetchState: FetchState;
|
|
@@ -1976,7 +1956,7 @@ interface SDKEventMap {
|
|
|
1976
1956
|
text: string;
|
|
1977
1957
|
selectionAfter: SelectionRange;
|
|
1978
1958
|
};
|
|
1979
|
-
'cues': LegacyCue
|
|
1959
|
+
'cues': LegacyCue[];
|
|
1980
1960
|
'replace': {
|
|
1981
1961
|
text: string;
|
|
1982
1962
|
replace: SelectionRange;
|
|
@@ -1992,7 +1972,7 @@ interface SDKEventMap {
|
|
|
1992
1972
|
data: unknown;
|
|
1993
1973
|
};
|
|
1994
1974
|
'call-to-action': {
|
|
1995
|
-
cue: LegacyCue
|
|
1975
|
+
cue: LegacyCue;
|
|
1996
1976
|
};
|
|
1997
1977
|
logout: undefined;
|
|
1998
1978
|
ready: undefined;
|
|
@@ -2042,14 +2022,14 @@ declare class DeepdeskSDK {
|
|
|
2042
2022
|
store: Store;
|
|
2043
2023
|
constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
2044
2024
|
get state(): redux.EmptyObject & {
|
|
2045
|
-
assistants: State$
|
|
2046
|
-
auth: State$
|
|
2047
|
-
conversation: State$
|
|
2048
|
-
contentTypes: State$
|
|
2049
|
-
passwordlessToken: State$
|
|
2050
|
-
entities: State$
|
|
2051
|
-
knowledgeAssistant: State$
|
|
2052
|
-
handlingTime: State$
|
|
2025
|
+
assistants: State$b;
|
|
2026
|
+
auth: State$a;
|
|
2027
|
+
conversation: State$9;
|
|
2028
|
+
contentTypes: State$8;
|
|
2029
|
+
passwordlessToken: State$7;
|
|
2030
|
+
entities: State$6;
|
|
2031
|
+
knowledgeAssistant: State$5;
|
|
2032
|
+
handlingTime: State$4;
|
|
2053
2033
|
info: {
|
|
2054
2034
|
agentInfo?: AgentInfo | undefined;
|
|
2055
2035
|
agentSettings: unknown;
|
|
@@ -2058,7 +2038,7 @@ declare class DeepdeskSDK {
|
|
|
2058
2038
|
platformVariables?: VariableMapping | undefined;
|
|
2059
2039
|
fetchState: FetchState;
|
|
2060
2040
|
};
|
|
2061
|
-
input: State$
|
|
2041
|
+
input: State$c;
|
|
2062
2042
|
settings: {
|
|
2063
2043
|
locale: Locale;
|
|
2064
2044
|
deanonymize: boolean;
|
|
@@ -2091,9 +2071,9 @@ declare class DeepdeskSDK {
|
|
|
2091
2071
|
enableFeedbackForm: boolean;
|
|
2092
2072
|
hasKeyboardInput: boolean;
|
|
2093
2073
|
};
|
|
2094
|
-
profile: State$
|
|
2095
|
-
search: State$
|
|
2096
|
-
styleSuggestions: State$
|
|
2074
|
+
profile: State$3;
|
|
2075
|
+
search: State$2;
|
|
2076
|
+
styleSuggestions: State$1;
|
|
2097
2077
|
ui: {
|
|
2098
2078
|
showTabHint: boolean;
|
|
2099
2079
|
inputHasFocus: boolean;
|
|
@@ -2101,7 +2081,6 @@ declare class DeepdeskSDK {
|
|
|
2101
2081
|
openOverlayWhenTyping: boolean;
|
|
2102
2082
|
overlayCollapsedUserOverwrite: boolean;
|
|
2103
2083
|
};
|
|
2104
|
-
rules: State$1;
|
|
2105
2084
|
textSuggestions: TextSuggestionState;
|
|
2106
2085
|
};
|
|
2107
2086
|
get settings(): {
|
|
@@ -2213,10 +2192,6 @@ declare class DeepdeskSDK {
|
|
|
2213
2192
|
*/
|
|
2214
2193
|
refresh(): Promise<void>;
|
|
2215
2194
|
notifyExternalSuggestion(suggestion: StageSuggestion): void;
|
|
2216
|
-
/**
|
|
2217
|
-
* @deprecated in favor of `evaluateAssistant`
|
|
2218
|
-
*/
|
|
2219
|
-
evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<LegacyCue$1[]>;
|
|
2220
2195
|
/**
|
|
2221
2196
|
* Evaluate assistant
|
|
2222
2197
|
* By default will expect cues and show them in the widget.
|