@deepdesk/deepdesk-sdk 14.3.1-beta.3 → 14.3.1-beta.4

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.d.mts CHANGED
@@ -914,10 +914,6 @@ type SendEventV2ArgumentMap = {
914
914
  eventName: string;
915
915
  value: string;
916
916
  }>;
917
- 'summary feedback': EventV2<{
918
- summary: string;
919
- rating: 'up' | 'down';
920
- }>;
921
917
  'knowledge assist feedback': EventV2<{
922
918
  question: string;
923
919
  isFollowUpQuestion: boolean;
@@ -1286,12 +1282,15 @@ type State$d = {
1286
1282
  selectedSuggestionIndex: number;
1287
1283
  };
1288
1284
 
1289
- type State$c = {
1290
- startTime: Date | null;
1291
- stopTime: Date | null;
1285
+ type LegacyCue$1 = CamelCaseKeys<Server.LegacyCue> & {
1286
+ isLoading?: boolean;
1292
1287
  };
1293
1288
 
1294
1289
  type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
1290
+ type ArrayItemType<T> = T extends Array<infer I> ? I : never;
1291
+ type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
1292
+ isLoading?: boolean;
1293
+ };
1295
1294
  type AssistantAnswerSource = {
1296
1295
  url?: string;
1297
1296
  name: string;
@@ -1303,8 +1302,8 @@ type AssistantInteraction = {
1303
1302
  sources?: AssistantAnswerSource[];
1304
1303
  };
1305
1304
  };
1306
- type State$b = {
1307
- cues: EvaluationOutput<'json-schema:cues'>;
1305
+ type State$c = {
1306
+ cues: Cue[];
1308
1307
  threads: Record<number, AssistantInteraction[]>;
1309
1308
  fetchState: FetchState;
1310
1309
  };
@@ -1314,6 +1313,39 @@ type Transcript = Array<{
1314
1313
  }>;
1315
1314
  type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1316
1315
 
1316
+ interface State$b {
1317
+ isLoggedIn: boolean | null;
1318
+ loginFetchState: FetchState;
1319
+ verifyFetchState: FetchState;
1320
+ showLoginOverlay: boolean;
1321
+ }
1322
+
1323
+ interface State$a {
1324
+ current: Conversation | null;
1325
+ isSupported: boolean | null;
1326
+ }
1327
+
1328
+ type ContentType = CamelCaseKeys<Server.ContentType>;
1329
+ type State$9 = {
1330
+ data: ContentType[] | null;
1331
+ fetchState: FetchState;
1332
+ };
1333
+
1334
+ type State$8 = {
1335
+ token: string | null;
1336
+ interval: NodeJS.Timer | null;
1337
+ };
1338
+
1339
+ type State$7 = {
1340
+ data: Entity[] | null;
1341
+ fetchState: FetchState;
1342
+ };
1343
+
1344
+ type State$6 = {
1345
+ data: KnowledgeAssistant | null;
1346
+ fetchState: FetchState;
1347
+ };
1348
+
1317
1349
  interface StoreConfig {
1318
1350
  deepdeskAPI: DeepdeskAPI;
1319
1351
  dynamicThunkObject?: Record<string, unknown>;
@@ -1321,14 +1353,14 @@ interface StoreConfig {
1321
1353
  preloadedState?: any;
1322
1354
  }
1323
1355
  declare const reducers: redux.Reducer<redux.CombinedState<{
1324
- assistants: State$b;
1325
- auth: State$a;
1326
- conversation: State$9;
1327
- contentTypes: State$8;
1328
- passwordlessToken: State$7;
1329
- entities: State$6;
1330
- knowledgeAssistant: State$5;
1331
- handlingTime: State$c;
1356
+ assistants: State$c;
1357
+ auth: State$b;
1358
+ conversation: State$a;
1359
+ contentTypes: State$9;
1360
+ passwordlessToken: State$8;
1361
+ entities: State$7;
1362
+ knowledgeAssistant: State$6;
1363
+ handlingTime: State$5;
1332
1364
  info: {
1333
1365
  agentInfo?: AgentInfo | undefined;
1334
1366
  agentSettings: unknown;
@@ -1382,14 +1414,14 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1382
1414
  textSuggestions: TextSuggestionState;
1383
1415
  }>, redux.AnyAction>;
1384
1416
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
1385
- assistants: State$b;
1386
- auth: State$a;
1387
- conversation: State$9;
1388
- contentTypes: State$8;
1389
- passwordlessToken: State$7;
1390
- entities: State$6;
1391
- knowledgeAssistant: State$5;
1392
- handlingTime: State$c;
1417
+ assistants: State$c;
1418
+ auth: State$b;
1419
+ conversation: State$a;
1420
+ contentTypes: State$9;
1421
+ passwordlessToken: State$8;
1422
+ entities: State$7;
1423
+ knowledgeAssistant: State$6;
1424
+ handlingTime: State$5;
1393
1425
  info: {
1394
1426
  agentInfo?: AgentInfo | undefined;
1395
1427
  agentSettings: unknown;
@@ -1442,14 +1474,14 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1442
1474
  rules: State$1;
1443
1475
  textSuggestions: TextSuggestionState;
1444
1476
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
1445
- assistants: State$b;
1446
- auth: State$a;
1447
- conversation: State$9;
1448
- contentTypes: State$8;
1449
- passwordlessToken: State$7;
1450
- entities: State$6;
1451
- knowledgeAssistant: State$5;
1452
- handlingTime: State$c;
1477
+ assistants: State$c;
1478
+ auth: State$b;
1479
+ conversation: State$a;
1480
+ contentTypes: State$9;
1481
+ passwordlessToken: State$8;
1482
+ entities: State$7;
1483
+ knowledgeAssistant: State$6;
1484
+ handlingTime: State$5;
1453
1485
  info: {
1454
1486
  agentInfo?: AgentInfo | undefined;
1455
1487
  agentSettings: unknown;
@@ -1508,37 +1540,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1508
1540
  type RootState = ReturnType<typeof reducers>;
1509
1541
  type Store = ReturnType<typeof createStore>;
1510
1542
 
1511
- interface State$a {
1512
- isLoggedIn: boolean | null;
1513
- loginFetchState: FetchState;
1514
- verifyFetchState: FetchState;
1515
- showLoginOverlay: boolean;
1516
- }
1517
-
1518
- interface State$9 {
1519
- current: Conversation | null;
1520
- isSupported: boolean | null;
1521
- }
1522
-
1523
- type ContentType = CamelCaseKeys<Server.ContentType>;
1524
- type State$8 = {
1525
- data: ContentType[] | null;
1526
- fetchState: FetchState;
1527
- };
1528
-
1529
- type State$7 = {
1530
- token: string | null;
1531
- interval: NodeJS.Timer | null;
1532
- };
1533
-
1534
- type State$6 = {
1535
- data: Entity[] | null;
1536
- fetchState: FetchState;
1537
- };
1538
-
1539
1543
  type State$5 = {
1540
- data: KnowledgeAssistant | null;
1541
- fetchState: FetchState;
1544
+ startTime: Date | null;
1545
+ stopTime: Date | null;
1542
1546
  };
1543
1547
 
1544
1548
  type State$4 = {
@@ -1569,9 +1573,9 @@ interface State$2 {
1569
1573
  fetchState: FetchState;
1570
1574
  }
1571
1575
 
1572
- type Cue = CamelCaseKeys<Server.LegacyCue>;
1576
+ type LegacyCue = CamelCaseKeys<Server.LegacyCue>;
1573
1577
  type State$1 = {
1574
- cues: Cue[];
1578
+ cues: LegacyCue[];
1575
1579
  fetchState: FetchState;
1576
1580
  };
1577
1581
  type EvaluateRuleOptions = {
@@ -1821,8 +1825,10 @@ declare const styles$1: {
1821
1825
  readonly "loginText": string;
1822
1826
  readonly "stateText": string;
1823
1827
  readonly "sectionList": string;
1828
+ readonly "footer": string;
1824
1829
  readonly "shortcutList": string;
1825
1830
  readonly "shortcut": string;
1831
+ readonly "footerShortcut": string;
1826
1832
  readonly "link": string;
1827
1833
  };
1828
1834
 
@@ -1948,7 +1954,7 @@ interface SDKEventMap {
1948
1954
  text: string;
1949
1955
  selectionAfter: SelectionRange;
1950
1956
  };
1951
- 'cues': Cue[];
1957
+ 'cues': LegacyCue$1[];
1952
1958
  'replace': {
1953
1959
  text: string;
1954
1960
  replace: SelectionRange;
@@ -1964,7 +1970,7 @@ interface SDKEventMap {
1964
1970
  data: unknown;
1965
1971
  };
1966
1972
  'call-to-action': {
1967
- cue: Cue;
1973
+ cue: LegacyCue$1;
1968
1974
  };
1969
1975
  logout: undefined;
1970
1976
  ready: undefined;
@@ -2023,14 +2029,14 @@ declare class DeepdeskSDK {
2023
2029
  store: Store;
2024
2030
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2025
2031
  get state(): redux.EmptyObject & {
2026
- assistants: State$b;
2027
- auth: State$a;
2028
- conversation: State$9;
2029
- contentTypes: State$8;
2030
- passwordlessToken: State$7;
2031
- entities: State$6;
2032
- knowledgeAssistant: State$5;
2033
- handlingTime: State$c;
2032
+ assistants: State$c;
2033
+ auth: State$b;
2034
+ conversation: State$a;
2035
+ contentTypes: State$9;
2036
+ passwordlessToken: State$8;
2037
+ entities: State$7;
2038
+ knowledgeAssistant: State$6;
2039
+ handlingTime: State$5;
2034
2040
  info: {
2035
2041
  agentInfo?: AgentInfo | undefined;
2036
2042
  agentSettings: unknown;
@@ -2193,7 +2199,7 @@ declare class DeepdeskSDK {
2193
2199
  /**
2194
2200
  * @deprecated in favor of `evaluateAssistant`
2195
2201
  */
2196
- evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<Cue[]>;
2202
+ evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<LegacyCue$1[]>;
2197
2203
  /**
2198
2204
  * Evaluate assistant
2199
2205
  * By default will expect cues and show them in the widget.
package/dist/index.d.ts CHANGED
@@ -914,10 +914,6 @@ type SendEventV2ArgumentMap = {
914
914
  eventName: string;
915
915
  value: string;
916
916
  }>;
917
- 'summary feedback': EventV2<{
918
- summary: string;
919
- rating: 'up' | 'down';
920
- }>;
921
917
  'knowledge assist feedback': EventV2<{
922
918
  question: string;
923
919
  isFollowUpQuestion: boolean;
@@ -1286,12 +1282,15 @@ type State$d = {
1286
1282
  selectedSuggestionIndex: number;
1287
1283
  };
1288
1284
 
1289
- type State$c = {
1290
- startTime: Date | null;
1291
- stopTime: Date | null;
1285
+ type LegacyCue$1 = CamelCaseKeys<Server.LegacyCue> & {
1286
+ isLoading?: boolean;
1292
1287
  };
1293
1288
 
1294
1289
  type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
1290
+ type ArrayItemType<T> = T extends Array<infer I> ? I : never;
1291
+ type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
1292
+ isLoading?: boolean;
1293
+ };
1295
1294
  type AssistantAnswerSource = {
1296
1295
  url?: string;
1297
1296
  name: string;
@@ -1303,8 +1302,8 @@ type AssistantInteraction = {
1303
1302
  sources?: AssistantAnswerSource[];
1304
1303
  };
1305
1304
  };
1306
- type State$b = {
1307
- cues: EvaluationOutput<'json-schema:cues'>;
1305
+ type State$c = {
1306
+ cues: Cue[];
1308
1307
  threads: Record<number, AssistantInteraction[]>;
1309
1308
  fetchState: FetchState;
1310
1309
  };
@@ -1314,6 +1313,39 @@ type Transcript = Array<{
1314
1313
  }>;
1315
1314
  type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1316
1315
 
1316
+ interface State$b {
1317
+ isLoggedIn: boolean | null;
1318
+ loginFetchState: FetchState;
1319
+ verifyFetchState: FetchState;
1320
+ showLoginOverlay: boolean;
1321
+ }
1322
+
1323
+ interface State$a {
1324
+ current: Conversation | null;
1325
+ isSupported: boolean | null;
1326
+ }
1327
+
1328
+ type ContentType = CamelCaseKeys<Server.ContentType>;
1329
+ type State$9 = {
1330
+ data: ContentType[] | null;
1331
+ fetchState: FetchState;
1332
+ };
1333
+
1334
+ type State$8 = {
1335
+ token: string | null;
1336
+ interval: NodeJS.Timer | null;
1337
+ };
1338
+
1339
+ type State$7 = {
1340
+ data: Entity[] | null;
1341
+ fetchState: FetchState;
1342
+ };
1343
+
1344
+ type State$6 = {
1345
+ data: KnowledgeAssistant | null;
1346
+ fetchState: FetchState;
1347
+ };
1348
+
1317
1349
  interface StoreConfig {
1318
1350
  deepdeskAPI: DeepdeskAPI;
1319
1351
  dynamicThunkObject?: Record<string, unknown>;
@@ -1321,14 +1353,14 @@ interface StoreConfig {
1321
1353
  preloadedState?: any;
1322
1354
  }
1323
1355
  declare const reducers: redux.Reducer<redux.CombinedState<{
1324
- assistants: State$b;
1325
- auth: State$a;
1326
- conversation: State$9;
1327
- contentTypes: State$8;
1328
- passwordlessToken: State$7;
1329
- entities: State$6;
1330
- knowledgeAssistant: State$5;
1331
- handlingTime: State$c;
1356
+ assistants: State$c;
1357
+ auth: State$b;
1358
+ conversation: State$a;
1359
+ contentTypes: State$9;
1360
+ passwordlessToken: State$8;
1361
+ entities: State$7;
1362
+ knowledgeAssistant: State$6;
1363
+ handlingTime: State$5;
1332
1364
  info: {
1333
1365
  agentInfo?: AgentInfo | undefined;
1334
1366
  agentSettings: unknown;
@@ -1382,14 +1414,14 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1382
1414
  textSuggestions: TextSuggestionState;
1383
1415
  }>, redux.AnyAction>;
1384
1416
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
1385
- assistants: State$b;
1386
- auth: State$a;
1387
- conversation: State$9;
1388
- contentTypes: State$8;
1389
- passwordlessToken: State$7;
1390
- entities: State$6;
1391
- knowledgeAssistant: State$5;
1392
- handlingTime: State$c;
1417
+ assistants: State$c;
1418
+ auth: State$b;
1419
+ conversation: State$a;
1420
+ contentTypes: State$9;
1421
+ passwordlessToken: State$8;
1422
+ entities: State$7;
1423
+ knowledgeAssistant: State$6;
1424
+ handlingTime: State$5;
1393
1425
  info: {
1394
1426
  agentInfo?: AgentInfo | undefined;
1395
1427
  agentSettings: unknown;
@@ -1442,14 +1474,14 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1442
1474
  rules: State$1;
1443
1475
  textSuggestions: TextSuggestionState;
1444
1476
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
1445
- assistants: State$b;
1446
- auth: State$a;
1447
- conversation: State$9;
1448
- contentTypes: State$8;
1449
- passwordlessToken: State$7;
1450
- entities: State$6;
1451
- knowledgeAssistant: State$5;
1452
- handlingTime: State$c;
1477
+ assistants: State$c;
1478
+ auth: State$b;
1479
+ conversation: State$a;
1480
+ contentTypes: State$9;
1481
+ passwordlessToken: State$8;
1482
+ entities: State$7;
1483
+ knowledgeAssistant: State$6;
1484
+ handlingTime: State$5;
1453
1485
  info: {
1454
1486
  agentInfo?: AgentInfo | undefined;
1455
1487
  agentSettings: unknown;
@@ -1508,37 +1540,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1508
1540
  type RootState = ReturnType<typeof reducers>;
1509
1541
  type Store = ReturnType<typeof createStore>;
1510
1542
 
1511
- interface State$a {
1512
- isLoggedIn: boolean | null;
1513
- loginFetchState: FetchState;
1514
- verifyFetchState: FetchState;
1515
- showLoginOverlay: boolean;
1516
- }
1517
-
1518
- interface State$9 {
1519
- current: Conversation | null;
1520
- isSupported: boolean | null;
1521
- }
1522
-
1523
- type ContentType = CamelCaseKeys<Server.ContentType>;
1524
- type State$8 = {
1525
- data: ContentType[] | null;
1526
- fetchState: FetchState;
1527
- };
1528
-
1529
- type State$7 = {
1530
- token: string | null;
1531
- interval: NodeJS.Timer | null;
1532
- };
1533
-
1534
- type State$6 = {
1535
- data: Entity[] | null;
1536
- fetchState: FetchState;
1537
- };
1538
-
1539
1543
  type State$5 = {
1540
- data: KnowledgeAssistant | null;
1541
- fetchState: FetchState;
1544
+ startTime: Date | null;
1545
+ stopTime: Date | null;
1542
1546
  };
1543
1547
 
1544
1548
  type State$4 = {
@@ -1569,9 +1573,9 @@ interface State$2 {
1569
1573
  fetchState: FetchState;
1570
1574
  }
1571
1575
 
1572
- type Cue = CamelCaseKeys<Server.LegacyCue>;
1576
+ type LegacyCue = CamelCaseKeys<Server.LegacyCue>;
1573
1577
  type State$1 = {
1574
- cues: Cue[];
1578
+ cues: LegacyCue[];
1575
1579
  fetchState: FetchState;
1576
1580
  };
1577
1581
  type EvaluateRuleOptions = {
@@ -1821,8 +1825,10 @@ declare const styles$1: {
1821
1825
  readonly "loginText": string;
1822
1826
  readonly "stateText": string;
1823
1827
  readonly "sectionList": string;
1828
+ readonly "footer": string;
1824
1829
  readonly "shortcutList": string;
1825
1830
  readonly "shortcut": string;
1831
+ readonly "footerShortcut": string;
1826
1832
  readonly "link": string;
1827
1833
  };
1828
1834
 
@@ -1948,7 +1954,7 @@ interface SDKEventMap {
1948
1954
  text: string;
1949
1955
  selectionAfter: SelectionRange;
1950
1956
  };
1951
- 'cues': Cue[];
1957
+ 'cues': LegacyCue$1[];
1952
1958
  'replace': {
1953
1959
  text: string;
1954
1960
  replace: SelectionRange;
@@ -1964,7 +1970,7 @@ interface SDKEventMap {
1964
1970
  data: unknown;
1965
1971
  };
1966
1972
  'call-to-action': {
1967
- cue: Cue;
1973
+ cue: LegacyCue$1;
1968
1974
  };
1969
1975
  logout: undefined;
1970
1976
  ready: undefined;
@@ -2023,14 +2029,14 @@ declare class DeepdeskSDK {
2023
2029
  store: Store;
2024
2030
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2025
2031
  get state(): redux.EmptyObject & {
2026
- assistants: State$b;
2027
- auth: State$a;
2028
- conversation: State$9;
2029
- contentTypes: State$8;
2030
- passwordlessToken: State$7;
2031
- entities: State$6;
2032
- knowledgeAssistant: State$5;
2033
- handlingTime: State$c;
2032
+ assistants: State$c;
2033
+ auth: State$b;
2034
+ conversation: State$a;
2035
+ contentTypes: State$9;
2036
+ passwordlessToken: State$8;
2037
+ entities: State$7;
2038
+ knowledgeAssistant: State$6;
2039
+ handlingTime: State$5;
2034
2040
  info: {
2035
2041
  agentInfo?: AgentInfo | undefined;
2036
2042
  agentSettings: unknown;
@@ -2193,7 +2199,7 @@ declare class DeepdeskSDK {
2193
2199
  /**
2194
2200
  * @deprecated in favor of `evaluateAssistant`
2195
2201
  */
2196
- evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<Cue[]>;
2202
+ evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<LegacyCue$1[]>;
2197
2203
  /**
2198
2204
  * Evaluate assistant
2199
2205
  * By default will expect cues and show them in the widget.