@deepdesk/deepdesk-sdk 10.10.0 → 10.10.1
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 +7 -7
- package/dist/index.d.mts +65 -45
- package/dist/index.d.ts +65 -45
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +13 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -274,12 +274,12 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
274
274
|
dispose(): void;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
type State$
|
|
277
|
+
type State$g = {
|
|
278
278
|
startTime: Date | null;
|
|
279
279
|
stopTime: Date | null;
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
interface State$
|
|
282
|
+
interface State$f {
|
|
283
283
|
contentType: string | null;
|
|
284
284
|
suggestion: TextSuggestion | null;
|
|
285
285
|
}
|
|
@@ -451,16 +451,17 @@ interface StoreConfig {
|
|
|
451
451
|
preloadedState?: any;
|
|
452
452
|
}
|
|
453
453
|
declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
454
|
-
activeSuggestion: State$
|
|
454
|
+
activeSuggestion: State$f;
|
|
455
455
|
answer: State$6;
|
|
456
|
-
auth: State$
|
|
457
|
-
autoflows: State$
|
|
458
|
-
conversation: State$
|
|
459
|
-
contentTypes: State$
|
|
460
|
-
customMessages: State$
|
|
461
|
-
passwordlessToken: State$
|
|
462
|
-
entities: State$
|
|
463
|
-
|
|
456
|
+
auth: State$e;
|
|
457
|
+
autoflows: State$d;
|
|
458
|
+
conversation: State$c;
|
|
459
|
+
contentTypes: State$b;
|
|
460
|
+
customMessages: State$a;
|
|
461
|
+
passwordlessToken: State$9;
|
|
462
|
+
entities: State$8;
|
|
463
|
+
knowledgeAssistant: State$7;
|
|
464
|
+
handlingTime: State$g;
|
|
464
465
|
info: {
|
|
465
466
|
agentInfo?: AgentInfo | undefined;
|
|
466
467
|
agentSettings: unknown;
|
|
@@ -513,16 +514,17 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
513
514
|
textSuggestions: TextSuggestionState;
|
|
514
515
|
}>, redux.AnyAction>;
|
|
515
516
|
declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
|
|
516
|
-
activeSuggestion: State$
|
|
517
|
+
activeSuggestion: State$f;
|
|
517
518
|
answer: State$6;
|
|
518
|
-
auth: State$
|
|
519
|
-
autoflows: State$
|
|
520
|
-
conversation: State$
|
|
521
|
-
contentTypes: State$
|
|
522
|
-
customMessages: State$
|
|
523
|
-
passwordlessToken: State$
|
|
524
|
-
entities: State$
|
|
525
|
-
|
|
519
|
+
auth: State$e;
|
|
520
|
+
autoflows: State$d;
|
|
521
|
+
conversation: State$c;
|
|
522
|
+
contentTypes: State$b;
|
|
523
|
+
customMessages: State$a;
|
|
524
|
+
passwordlessToken: State$9;
|
|
525
|
+
entities: State$8;
|
|
526
|
+
knowledgeAssistant: State$7;
|
|
527
|
+
handlingTime: State$g;
|
|
526
528
|
info: {
|
|
527
529
|
agentInfo?: AgentInfo | undefined;
|
|
528
530
|
agentSettings: unknown;
|
|
@@ -574,16 +576,17 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
574
576
|
};
|
|
575
577
|
textSuggestions: TextSuggestionState;
|
|
576
578
|
}, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
|
|
577
|
-
activeSuggestion: State$
|
|
579
|
+
activeSuggestion: State$f;
|
|
578
580
|
answer: State$6;
|
|
579
|
-
auth: State$
|
|
580
|
-
autoflows: State$
|
|
581
|
-
conversation: State$
|
|
582
|
-
contentTypes: State$
|
|
583
|
-
customMessages: State$
|
|
584
|
-
passwordlessToken: State$
|
|
585
|
-
entities: State$
|
|
586
|
-
|
|
581
|
+
auth: State$e;
|
|
582
|
+
autoflows: State$d;
|
|
583
|
+
conversation: State$c;
|
|
584
|
+
contentTypes: State$b;
|
|
585
|
+
customMessages: State$a;
|
|
586
|
+
passwordlessToken: State$9;
|
|
587
|
+
entities: State$8;
|
|
588
|
+
knowledgeAssistant: State$7;
|
|
589
|
+
handlingTime: State$g;
|
|
587
590
|
info: {
|
|
588
591
|
agentInfo?: AgentInfo | undefined;
|
|
589
592
|
agentSettings: unknown;
|
|
@@ -642,7 +645,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
642
645
|
type RootState = ReturnType<typeof reducers>;
|
|
643
646
|
type Store = ReturnType<typeof createStore>;
|
|
644
647
|
|
|
645
|
-
interface State$
|
|
648
|
+
interface State$e {
|
|
646
649
|
isLoggedIn: boolean | null;
|
|
647
650
|
loginFetchState: FetchState;
|
|
648
651
|
verifyFetchState: FetchState;
|
|
@@ -652,25 +655,25 @@ interface State$d {
|
|
|
652
655
|
type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
|
|
653
656
|
isBusy?: boolean;
|
|
654
657
|
};
|
|
655
|
-
interface State$
|
|
658
|
+
interface State$d {
|
|
656
659
|
list: Autoflow[];
|
|
657
660
|
fetchState: FetchState;
|
|
658
661
|
isInitialRequest: null | boolean;
|
|
659
662
|
}
|
|
660
663
|
|
|
661
|
-
interface State$
|
|
664
|
+
interface State$c {
|
|
662
665
|
current: Conversation | null;
|
|
663
666
|
isSupported: boolean | null;
|
|
664
667
|
}
|
|
665
668
|
|
|
666
669
|
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
667
|
-
type State$
|
|
670
|
+
type State$b = {
|
|
668
671
|
data: ContentType[] | null;
|
|
669
672
|
fetchState: FetchState;
|
|
670
673
|
};
|
|
671
674
|
|
|
672
675
|
type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
|
|
673
|
-
interface State$
|
|
676
|
+
interface State$a {
|
|
674
677
|
list: CustomMessage[];
|
|
675
678
|
fetchState: FetchState;
|
|
676
679
|
isInitialRequest: null | boolean;
|
|
@@ -679,17 +682,22 @@ interface State$9 {
|
|
|
679
682
|
answeredSuggestions: string[];
|
|
680
683
|
}
|
|
681
684
|
|
|
682
|
-
type State$
|
|
685
|
+
type State$9 = {
|
|
683
686
|
token: string | null;
|
|
684
687
|
accountUrl: string | null;
|
|
685
688
|
interval: NodeJS.Timer | null;
|
|
686
689
|
};
|
|
687
690
|
|
|
688
|
-
type State$
|
|
691
|
+
type State$8 = {
|
|
689
692
|
data: Entity[] | null;
|
|
690
693
|
fetchState: FetchState;
|
|
691
694
|
};
|
|
692
695
|
|
|
696
|
+
type State$7 = {
|
|
697
|
+
data: KnowledgeAssistant | null;
|
|
698
|
+
fetchState: FetchState;
|
|
699
|
+
};
|
|
700
|
+
|
|
693
701
|
interface ListItemSource {
|
|
694
702
|
url?: string;
|
|
695
703
|
name: string;
|
|
@@ -1049,6 +1057,15 @@ declare namespace Server {
|
|
|
1049
1057
|
question: string;
|
|
1050
1058
|
answer: string;
|
|
1051
1059
|
};
|
|
1060
|
+
type KnowledgeAssistant = {
|
|
1061
|
+
id: number;
|
|
1062
|
+
code: string;
|
|
1063
|
+
name: string;
|
|
1064
|
+
prompt: string;
|
|
1065
|
+
urls: Array<string>;
|
|
1066
|
+
files: Array<string>;
|
|
1067
|
+
has_changes: boolean;
|
|
1068
|
+
};
|
|
1052
1069
|
}
|
|
1053
1070
|
type ConversationMessage = CamelCaseKeys<Omit<Server.ConversationMessage, 'tags'>> & {
|
|
1054
1071
|
tags: Record<string, string> | null;
|
|
@@ -1152,6 +1169,7 @@ declare class DeepdeskAPI {
|
|
|
1152
1169
|
constructor(apiUrl: string, options?: DeepdeskAPIOptions);
|
|
1153
1170
|
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1154
1171
|
getProfile(profileCode: string): Promise<CamelCaseKeys<Server.Profile>>;
|
|
1172
|
+
getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server.KnowledgeAssistant>>;
|
|
1155
1173
|
getContentTypes(): Promise<CamelCaseKeys<Server.ContentType[]>>;
|
|
1156
1174
|
getPlatformConfig(): Promise<CamelCaseKeys<Server.PlatformConfig['config']>>;
|
|
1157
1175
|
checkUserExists(externalId: string): Promise<boolean>;
|
|
@@ -1325,6 +1343,7 @@ type AgentInfo = {
|
|
|
1325
1343
|
agentEmail?: string;
|
|
1326
1344
|
agentTimeZone?: string;
|
|
1327
1345
|
};
|
|
1346
|
+
type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
|
|
1328
1347
|
type User = CamelCaseKeys<Server.User>;
|
|
1329
1348
|
type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
|
|
1330
1349
|
type Profile = CamelCaseKeys<Server.Profile>;
|
|
@@ -1834,16 +1853,17 @@ declare class DeepdeskSDK {
|
|
|
1834
1853
|
store: Store;
|
|
1835
1854
|
constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
1836
1855
|
get state(): redux.EmptyObject & {
|
|
1837
|
-
activeSuggestion: State$
|
|
1856
|
+
activeSuggestion: State$f;
|
|
1838
1857
|
answer: State$6;
|
|
1839
|
-
auth: State$
|
|
1840
|
-
autoflows: State$
|
|
1841
|
-
conversation: State$
|
|
1842
|
-
contentTypes: State$
|
|
1843
|
-
customMessages: State$
|
|
1844
|
-
passwordlessToken: State$
|
|
1845
|
-
entities: State$
|
|
1846
|
-
|
|
1858
|
+
auth: State$e;
|
|
1859
|
+
autoflows: State$d;
|
|
1860
|
+
conversation: State$c;
|
|
1861
|
+
contentTypes: State$b;
|
|
1862
|
+
customMessages: State$a;
|
|
1863
|
+
passwordlessToken: State$9;
|
|
1864
|
+
entities: State$8;
|
|
1865
|
+
knowledgeAssistant: State$7;
|
|
1866
|
+
handlingTime: State$g;
|
|
1847
1867
|
info: {
|
|
1848
1868
|
agentInfo?: AgentInfo | undefined;
|
|
1849
1869
|
agentSettings: unknown;
|
package/dist/index.d.ts
CHANGED
|
@@ -274,12 +274,12 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
274
274
|
dispose(): void;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
type State$
|
|
277
|
+
type State$g = {
|
|
278
278
|
startTime: Date | null;
|
|
279
279
|
stopTime: Date | null;
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
interface State$
|
|
282
|
+
interface State$f {
|
|
283
283
|
contentType: string | null;
|
|
284
284
|
suggestion: TextSuggestion | null;
|
|
285
285
|
}
|
|
@@ -451,16 +451,17 @@ interface StoreConfig {
|
|
|
451
451
|
preloadedState?: any;
|
|
452
452
|
}
|
|
453
453
|
declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
454
|
-
activeSuggestion: State$
|
|
454
|
+
activeSuggestion: State$f;
|
|
455
455
|
answer: State$6;
|
|
456
|
-
auth: State$
|
|
457
|
-
autoflows: State$
|
|
458
|
-
conversation: State$
|
|
459
|
-
contentTypes: State$
|
|
460
|
-
customMessages: State$
|
|
461
|
-
passwordlessToken: State$
|
|
462
|
-
entities: State$
|
|
463
|
-
|
|
456
|
+
auth: State$e;
|
|
457
|
+
autoflows: State$d;
|
|
458
|
+
conversation: State$c;
|
|
459
|
+
contentTypes: State$b;
|
|
460
|
+
customMessages: State$a;
|
|
461
|
+
passwordlessToken: State$9;
|
|
462
|
+
entities: State$8;
|
|
463
|
+
knowledgeAssistant: State$7;
|
|
464
|
+
handlingTime: State$g;
|
|
464
465
|
info: {
|
|
465
466
|
agentInfo?: AgentInfo | undefined;
|
|
466
467
|
agentSettings: unknown;
|
|
@@ -513,16 +514,17 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
513
514
|
textSuggestions: TextSuggestionState;
|
|
514
515
|
}>, redux.AnyAction>;
|
|
515
516
|
declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
|
|
516
|
-
activeSuggestion: State$
|
|
517
|
+
activeSuggestion: State$f;
|
|
517
518
|
answer: State$6;
|
|
518
|
-
auth: State$
|
|
519
|
-
autoflows: State$
|
|
520
|
-
conversation: State$
|
|
521
|
-
contentTypes: State$
|
|
522
|
-
customMessages: State$
|
|
523
|
-
passwordlessToken: State$
|
|
524
|
-
entities: State$
|
|
525
|
-
|
|
519
|
+
auth: State$e;
|
|
520
|
+
autoflows: State$d;
|
|
521
|
+
conversation: State$c;
|
|
522
|
+
contentTypes: State$b;
|
|
523
|
+
customMessages: State$a;
|
|
524
|
+
passwordlessToken: State$9;
|
|
525
|
+
entities: State$8;
|
|
526
|
+
knowledgeAssistant: State$7;
|
|
527
|
+
handlingTime: State$g;
|
|
526
528
|
info: {
|
|
527
529
|
agentInfo?: AgentInfo | undefined;
|
|
528
530
|
agentSettings: unknown;
|
|
@@ -574,16 +576,17 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
574
576
|
};
|
|
575
577
|
textSuggestions: TextSuggestionState;
|
|
576
578
|
}, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
|
|
577
|
-
activeSuggestion: State$
|
|
579
|
+
activeSuggestion: State$f;
|
|
578
580
|
answer: State$6;
|
|
579
|
-
auth: State$
|
|
580
|
-
autoflows: State$
|
|
581
|
-
conversation: State$
|
|
582
|
-
contentTypes: State$
|
|
583
|
-
customMessages: State$
|
|
584
|
-
passwordlessToken: State$
|
|
585
|
-
entities: State$
|
|
586
|
-
|
|
581
|
+
auth: State$e;
|
|
582
|
+
autoflows: State$d;
|
|
583
|
+
conversation: State$c;
|
|
584
|
+
contentTypes: State$b;
|
|
585
|
+
customMessages: State$a;
|
|
586
|
+
passwordlessToken: State$9;
|
|
587
|
+
entities: State$8;
|
|
588
|
+
knowledgeAssistant: State$7;
|
|
589
|
+
handlingTime: State$g;
|
|
587
590
|
info: {
|
|
588
591
|
agentInfo?: AgentInfo | undefined;
|
|
589
592
|
agentSettings: unknown;
|
|
@@ -642,7 +645,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
642
645
|
type RootState = ReturnType<typeof reducers>;
|
|
643
646
|
type Store = ReturnType<typeof createStore>;
|
|
644
647
|
|
|
645
|
-
interface State$
|
|
648
|
+
interface State$e {
|
|
646
649
|
isLoggedIn: boolean | null;
|
|
647
650
|
loginFetchState: FetchState;
|
|
648
651
|
verifyFetchState: FetchState;
|
|
@@ -652,25 +655,25 @@ interface State$d {
|
|
|
652
655
|
type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
|
|
653
656
|
isBusy?: boolean;
|
|
654
657
|
};
|
|
655
|
-
interface State$
|
|
658
|
+
interface State$d {
|
|
656
659
|
list: Autoflow[];
|
|
657
660
|
fetchState: FetchState;
|
|
658
661
|
isInitialRequest: null | boolean;
|
|
659
662
|
}
|
|
660
663
|
|
|
661
|
-
interface State$
|
|
664
|
+
interface State$c {
|
|
662
665
|
current: Conversation | null;
|
|
663
666
|
isSupported: boolean | null;
|
|
664
667
|
}
|
|
665
668
|
|
|
666
669
|
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
667
|
-
type State$
|
|
670
|
+
type State$b = {
|
|
668
671
|
data: ContentType[] | null;
|
|
669
672
|
fetchState: FetchState;
|
|
670
673
|
};
|
|
671
674
|
|
|
672
675
|
type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
|
|
673
|
-
interface State$
|
|
676
|
+
interface State$a {
|
|
674
677
|
list: CustomMessage[];
|
|
675
678
|
fetchState: FetchState;
|
|
676
679
|
isInitialRequest: null | boolean;
|
|
@@ -679,17 +682,22 @@ interface State$9 {
|
|
|
679
682
|
answeredSuggestions: string[];
|
|
680
683
|
}
|
|
681
684
|
|
|
682
|
-
type State$
|
|
685
|
+
type State$9 = {
|
|
683
686
|
token: string | null;
|
|
684
687
|
accountUrl: string | null;
|
|
685
688
|
interval: NodeJS.Timer | null;
|
|
686
689
|
};
|
|
687
690
|
|
|
688
|
-
type State$
|
|
691
|
+
type State$8 = {
|
|
689
692
|
data: Entity[] | null;
|
|
690
693
|
fetchState: FetchState;
|
|
691
694
|
};
|
|
692
695
|
|
|
696
|
+
type State$7 = {
|
|
697
|
+
data: KnowledgeAssistant | null;
|
|
698
|
+
fetchState: FetchState;
|
|
699
|
+
};
|
|
700
|
+
|
|
693
701
|
interface ListItemSource {
|
|
694
702
|
url?: string;
|
|
695
703
|
name: string;
|
|
@@ -1049,6 +1057,15 @@ declare namespace Server {
|
|
|
1049
1057
|
question: string;
|
|
1050
1058
|
answer: string;
|
|
1051
1059
|
};
|
|
1060
|
+
type KnowledgeAssistant = {
|
|
1061
|
+
id: number;
|
|
1062
|
+
code: string;
|
|
1063
|
+
name: string;
|
|
1064
|
+
prompt: string;
|
|
1065
|
+
urls: Array<string>;
|
|
1066
|
+
files: Array<string>;
|
|
1067
|
+
has_changes: boolean;
|
|
1068
|
+
};
|
|
1052
1069
|
}
|
|
1053
1070
|
type ConversationMessage = CamelCaseKeys<Omit<Server.ConversationMessage, 'tags'>> & {
|
|
1054
1071
|
tags: Record<string, string> | null;
|
|
@@ -1152,6 +1169,7 @@ declare class DeepdeskAPI {
|
|
|
1152
1169
|
constructor(apiUrl: string, options?: DeepdeskAPIOptions);
|
|
1153
1170
|
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1154
1171
|
getProfile(profileCode: string): Promise<CamelCaseKeys<Server.Profile>>;
|
|
1172
|
+
getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server.KnowledgeAssistant>>;
|
|
1155
1173
|
getContentTypes(): Promise<CamelCaseKeys<Server.ContentType[]>>;
|
|
1156
1174
|
getPlatformConfig(): Promise<CamelCaseKeys<Server.PlatformConfig['config']>>;
|
|
1157
1175
|
checkUserExists(externalId: string): Promise<boolean>;
|
|
@@ -1325,6 +1343,7 @@ type AgentInfo = {
|
|
|
1325
1343
|
agentEmail?: string;
|
|
1326
1344
|
agentTimeZone?: string;
|
|
1327
1345
|
};
|
|
1346
|
+
type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
|
|
1328
1347
|
type User = CamelCaseKeys<Server.User>;
|
|
1329
1348
|
type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
|
|
1330
1349
|
type Profile = CamelCaseKeys<Server.Profile>;
|
|
@@ -1834,16 +1853,17 @@ declare class DeepdeskSDK {
|
|
|
1834
1853
|
store: Store;
|
|
1835
1854
|
constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
1836
1855
|
get state(): redux.EmptyObject & {
|
|
1837
|
-
activeSuggestion: State$
|
|
1856
|
+
activeSuggestion: State$f;
|
|
1838
1857
|
answer: State$6;
|
|
1839
|
-
auth: State$
|
|
1840
|
-
autoflows: State$
|
|
1841
|
-
conversation: State$
|
|
1842
|
-
contentTypes: State$
|
|
1843
|
-
customMessages: State$
|
|
1844
|
-
passwordlessToken: State$
|
|
1845
|
-
entities: State$
|
|
1846
|
-
|
|
1858
|
+
auth: State$e;
|
|
1859
|
+
autoflows: State$d;
|
|
1860
|
+
conversation: State$c;
|
|
1861
|
+
contentTypes: State$b;
|
|
1862
|
+
customMessages: State$a;
|
|
1863
|
+
passwordlessToken: State$9;
|
|
1864
|
+
entities: State$8;
|
|
1865
|
+
knowledgeAssistant: State$7;
|
|
1866
|
+
handlingTime: State$g;
|
|
1847
1867
|
info: {
|
|
1848
1868
|
agentInfo?: AgentInfo | undefined;
|
|
1849
1869
|
agentSettings: unknown;
|