@cimulate/copilot-sdk 1.1.0 → 1.1.2
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/{bundle.cimulate.copilot-sdk.65f7195a.esm.js → bundle.cimulate.copilot-sdk.2115a6a5.esm.js} +2 -2
- package/dist/{bundle.cimulate.copilot-sdk.65f7195a.esm.js.map → bundle.cimulate.copilot-sdk.2115a6a5.esm.js.map} +1 -1
- package/dist/bundle.cimulate.copilot-sdk.4bdff942.cjs.js +2 -0
- package/dist/{bundle.cimulate.copilot-sdk.c68ae11d.umd.js.map → bundle.cimulate.copilot-sdk.4bdff942.cjs.js.map} +1 -1
- package/dist/{bundle.cimulate.copilot-sdk.c68ae11d.umd.js → bundle.cimulate.copilot-sdk.83e04b89.umd.js} +2 -2
- package/dist/{bundle.cimulate.copilot-sdk.a2e829d8.cjs.js.map → bundle.cimulate.copilot-sdk.83e04b89.umd.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/copilot.d.ts +3 -3
- package/dist/types/model/Cancel.d.ts +1 -1
- package/dist/types/model/CommonEventFields.d.ts +1 -1
- package/dist/types/model/CommonFields.d.ts +4 -4
- package/dist/types/model/CommonRequiredFields.d.ts +3 -3
- package/dist/types/model/ConnectAck.d.ts +4 -4
- package/dist/types/model/ConnectionAcknowledgmentMessageFields.d.ts +1 -1
- package/dist/types/model/CopilotSearch.d.ts +2 -2
- package/dist/types/model/DisplayProducts.d.ts +4 -4
- package/dist/types/model/Done.d.ts +4 -4
- package/dist/types/model/Error.d.ts +5 -5
- package/dist/types/model/ErrorMessageFields.d.ts +1 -1
- package/dist/types/model/EventAck.d.ts +5 -5
- package/dist/types/model/EventAcknowledgmentMessageFields.d.ts +1 -1
- package/dist/types/model/FacetValue.d.ts +1 -1
- package/dist/types/model/FacetedNavigation.d.ts +1 -1
- package/dist/types/model/FollowUp.d.ts +4 -4
- package/dist/types/model/Inquiry.d.ts +4 -4
- package/dist/types/model/PartialInquiry.d.ts +5 -5
- package/dist/types/model/PartialInquiryMessageFields.d.ts +1 -1
- package/dist/types/model/RefinedSearch.d.ts +6 -6
- package/dist/types/model/RefinedSearchMessageFields.d.ts +2 -2
- package/dist/types/model/ReservedEvent.d.ts +4 -4
- package/dist/types/model/Root.d.ts +21 -21
- package/dist/types/model/SearchParameters.d.ts +1 -1
- package/dist/types/model/SessionData.d.ts +1 -1
- package/dist/types/model/SessionEventInformationReply.d.ts +1 -1
- package/dist/types/model/SessionEventStatusReply.d.ts +1 -1
- package/dist/types/model/SessionInformation.d.ts +4 -4
- package/dist/types/model/Suggestion.d.ts +1 -1
- package/package.json +4 -2
- package/src/copilot.ts +3 -3
- package/src/model/Cancel.ts +1 -1
- package/src/model/CommonEventFields.ts +1 -1
- package/src/model/CommonFields.ts +4 -4
- package/src/model/CommonRequiredFields.ts +3 -3
- package/src/model/ConnectAck.ts +4 -4
- package/src/model/ConnectionAcknowledgmentMessageFields.ts +1 -1
- package/src/model/CopilotSearch.ts +2 -2
- package/src/model/DisplayProducts.ts +4 -4
- package/src/model/Done.ts +4 -4
- package/src/model/Error.ts +5 -5
- package/src/model/ErrorMessageFields.ts +1 -1
- package/src/model/EventAck.ts +5 -5
- package/src/model/EventAcknowledgmentMessageFields.ts +1 -1
- package/src/model/FacetValue.ts +1 -1
- package/src/model/FacetedNavigation.ts +1 -1
- package/src/model/FollowUp.ts +4 -4
- package/src/model/Inquiry.ts +4 -4
- package/src/model/PartialInquiry.ts +5 -5
- package/src/model/PartialInquiryMessageFields.ts +1 -1
- package/src/model/RefinedSearch.ts +6 -6
- package/src/model/RefinedSearchMessageFields.ts +2 -2
- package/src/model/ReservedEvent.ts +4 -4
- package/src/model/Root.ts +21 -21
- package/src/model/SearchParameters.ts +1 -1
- package/src/model/SessionData.ts +1 -1
- package/src/model/SessionEventInformationReply.ts +1 -1
- package/src/model/SessionEventStatusReply.ts +1 -1
- package/src/model/SessionInformation.ts +4 -4
- package/src/model/Suggestion.ts +1 -1
- package/src/model/index.ts +1 -1
- package/dist/bundle.cimulate.copilot-sdk.a2e829d8.cjs.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface ReservedEvent {
|
|
2
2
|
id?: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
event_source_id?: string;
|
|
6
6
|
data?: any;
|
|
7
|
-
|
|
7
|
+
created_at?: string;
|
|
8
8
|
metadata?: Map<string, any>;
|
|
9
9
|
}
|
|
10
10
|
export { ReservedEvent };
|
|
@@ -23,32 +23,32 @@ import { SessionEventInformationReply } from './SessionEventInformationReply';
|
|
|
23
23
|
import { SessionEventStatusReply } from './SessionEventStatusReply';
|
|
24
24
|
import { Cancel } from './Cancel';
|
|
25
25
|
interface Root {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
common_fields?: CommonRequiredFields;
|
|
27
|
+
common_event_fields?: CommonFields;
|
|
28
|
+
connect_ack_metadata?: ConnectAckMetadata;
|
|
29
|
+
connect_ack?: ConnectAck;
|
|
30
|
+
search_params?: SearchParameters;
|
|
31
|
+
facet_value?: FacetValue;
|
|
32
32
|
facets?: Facet[];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
copilot_search?: CopilotSearch;
|
|
34
|
+
faceted_navigation?: FacetedNavigation;
|
|
35
|
+
event_ack?: EventAck;
|
|
36
|
+
refined_search?: RefinedSearch;
|
|
37
|
+
display_products?: DisplayProducts;
|
|
38
38
|
suggestions?: Suggestion[];
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
follow_up?: FollowUp;
|
|
40
|
+
partial_inquiry?: PartialInquiry;
|
|
41
41
|
inquiry?: Inquiry;
|
|
42
42
|
done?: Done;
|
|
43
43
|
error?: Error;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
event?: ReservedEvent;
|
|
45
|
+
session_data?: SessionData;
|
|
46
|
+
session_info_reply?: SessionInformation;
|
|
47
|
+
session_events_reply?: Map<string, any>[];
|
|
48
|
+
session_event_info?: string;
|
|
49
|
+
session_event_info_reply?: SessionEventInformationReply;
|
|
50
|
+
session_event_status?: string;
|
|
51
|
+
session_event_status_reply?: SessionEventStatusReply;
|
|
52
52
|
cancel?: Cancel;
|
|
53
53
|
}
|
|
54
54
|
export { Root };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SessionData } from './SessionData';
|
|
2
2
|
interface SessionInformation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
session_id?: string;
|
|
4
|
+
created_at?: string;
|
|
5
|
+
last_active_at?: string;
|
|
6
|
+
status?: string;
|
|
7
7
|
data?: SessionData;
|
|
8
8
|
metadata?: Map<string, any>;
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cimulate/copilot-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A lightweight API client SDK for Cimulate Copilot",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"browser": "dist/index.umd.js",
|
|
8
|
-
"types": "
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"generate-models": "tsx scripts/generate-model.ts ../../python/cimulate-copilot-api/asyncapi.yaml src/model",
|
|
11
11
|
"build": "rollup -c"
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
32
32
|
"@rollup/plugin-typescript": "^9.0.0",
|
|
33
33
|
"@types/js-yaml": "^4.0.9",
|
|
34
|
+
"@types/eslint": "^9.6.1",
|
|
35
|
+
"@types/estree": "^1.0.6",
|
|
34
36
|
"babel-loader": "^9.2.1",
|
|
35
37
|
"js-yaml": "^4.1.0",
|
|
36
38
|
"rollup": "^2.42.0",
|
package/src/copilot.ts
CHANGED
|
@@ -58,7 +58,7 @@ class CimulateCopilot {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
search(
|
|
61
|
-
{ userPrompt, searchParams }: { userPrompt
|
|
61
|
+
{ userPrompt, searchParams }: { userPrompt?: string; searchParams: SearchParams },
|
|
62
62
|
callback?: (searchAck: Event.EventAck) => void
|
|
63
63
|
) {
|
|
64
64
|
const payload = {
|
|
@@ -74,7 +74,7 @@ class CimulateCopilot {
|
|
|
74
74
|
|
|
75
75
|
facetedNavigation(
|
|
76
76
|
{ searchParams }: { searchParams: SearchParams },
|
|
77
|
-
callback?: (
|
|
77
|
+
callback?: (facetedNavigationAck: Event.EventAck) => void
|
|
78
78
|
) {
|
|
79
79
|
const payload = {
|
|
80
80
|
search_params: searchParams,
|
|
@@ -101,7 +101,7 @@ class CimulateCopilot {
|
|
|
101
101
|
this.socket.emit("cancel", payload);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
requestSessionInformation(callback: (sessionInformation: Event.SessionInformation) => void) {
|
|
105
105
|
this.socket.emit("session_info", callback);
|
|
106
106
|
}
|
|
107
107
|
|
package/src/model/Cancel.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
interface CommonFields {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
9
|
}
|
|
10
10
|
export { CommonFields };
|
package/src/model/ConnectAck.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {ConnectAckMetadata} from './ConnectAckMetadata';
|
|
2
2
|
interface ConnectAck {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
status: number;
|
|
8
8
|
message: string;
|
|
9
9
|
metadata: ConnectAckMetadata;
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
interface DisplayProducts {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
9
|
products: Map<string, any>[];
|
|
10
10
|
}
|
package/src/model/Done.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
interface Done {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
9
|
}
|
|
10
10
|
export { Done };
|
package/src/model/Error.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
interface Error {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
|
-
|
|
9
|
+
status: number;
|
|
10
10
|
error: string;
|
|
11
11
|
}
|
|
12
12
|
export { Error };
|
package/src/model/EventAck.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {CopilotSearch} from './CopilotSearch';
|
|
2
2
|
interface EventAck {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
|
-
|
|
9
|
+
status: string;
|
|
10
10
|
request: CopilotSearch;
|
|
11
11
|
}
|
|
12
12
|
export { EventAck };
|
package/src/model/FacetValue.ts
CHANGED
package/src/model/FollowUp.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {Suggestion} from './Suggestion';
|
|
2
2
|
interface FollowUp {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
9
|
suggestions: Suggestion[];
|
|
10
10
|
}
|
package/src/model/Inquiry.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
interface Inquiry {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
9
|
}
|
|
10
10
|
export { Inquiry };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
interface PartialInquiry {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
event_name: string;
|
|
6
6
|
timestamp: string;
|
|
7
|
-
|
|
7
|
+
event_source_id: string;
|
|
8
8
|
message: string;
|
|
9
|
-
|
|
9
|
+
inquiry_event_id: string;
|
|
10
10
|
index: number;
|
|
11
11
|
}
|
|
12
12
|
export { PartialInquiry };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {SearchParameters} from './SearchParameters';
|
|
2
2
|
import {Facet} from './Facet';
|
|
3
3
|
interface RefinedSearch {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
session_id: string;
|
|
5
|
+
event_id: string;
|
|
6
|
+
event_name: string;
|
|
7
7
|
timestamp: string;
|
|
8
|
-
|
|
8
|
+
event_source_id: string;
|
|
9
9
|
message: string;
|
|
10
|
-
|
|
10
|
+
search_params: SearchParameters;
|
|
11
11
|
hits?: Map<string, any>[];
|
|
12
|
-
|
|
12
|
+
total_hits?: number;
|
|
13
13
|
facets?: Facet[];
|
|
14
14
|
}
|
|
15
15
|
export { RefinedSearch };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {SearchParameters} from './SearchParameters';
|
|
2
2
|
import {Facet} from './Facet';
|
|
3
3
|
interface RefinedSearchMessageFields {
|
|
4
|
-
|
|
4
|
+
search_params: SearchParameters;
|
|
5
5
|
hits?: Map<string, any>[];
|
|
6
|
-
|
|
6
|
+
total_hits?: number;
|
|
7
7
|
facets?: Facet[];
|
|
8
8
|
}
|
|
9
9
|
export { RefinedSearchMessageFields };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
interface ReservedEvent {
|
|
3
3
|
id?: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
session_id?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
event_source_id?: string;
|
|
7
7
|
data?: any;
|
|
8
|
-
|
|
8
|
+
created_at?: string;
|
|
9
9
|
metadata?: Map<string, any>;
|
|
10
10
|
}
|
|
11
11
|
export { ReservedEvent };
|
package/src/model/Root.ts
CHANGED
|
@@ -23,32 +23,32 @@ import {SessionEventInformationReply} from './SessionEventInformationReply';
|
|
|
23
23
|
import {SessionEventStatusReply} from './SessionEventStatusReply';
|
|
24
24
|
import {Cancel} from './Cancel';
|
|
25
25
|
interface Root {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
common_fields?: CommonRequiredFields;
|
|
27
|
+
common_event_fields?: CommonFields;
|
|
28
|
+
connect_ack_metadata?: ConnectAckMetadata;
|
|
29
|
+
connect_ack?: ConnectAck;
|
|
30
|
+
search_params?: SearchParameters;
|
|
31
|
+
facet_value?: FacetValue;
|
|
32
32
|
facets?: Facet[];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
copilot_search?: CopilotSearch;
|
|
34
|
+
faceted_navigation?: FacetedNavigation;
|
|
35
|
+
event_ack?: EventAck;
|
|
36
|
+
refined_search?: RefinedSearch;
|
|
37
|
+
display_products?: DisplayProducts;
|
|
38
38
|
suggestions?: Suggestion[];
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
follow_up?: FollowUp;
|
|
40
|
+
partial_inquiry?: PartialInquiry;
|
|
41
41
|
inquiry?: Inquiry;
|
|
42
42
|
done?: Done;
|
|
43
43
|
error?: Error;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
event?: ReservedEvent;
|
|
45
|
+
session_data?: SessionData;
|
|
46
|
+
session_info_reply?: SessionInformation;
|
|
47
|
+
session_events_reply?: Map<string, any>[];
|
|
48
|
+
session_event_info?: string;
|
|
49
|
+
session_event_info_reply?: SessionEventInformationReply;
|
|
50
|
+
session_event_status?: string;
|
|
51
|
+
session_event_status_reply?: SessionEventStatusReply;
|
|
52
52
|
cancel?: Cancel;
|
|
53
53
|
}
|
|
54
54
|
export { Root };
|
package/src/model/SessionData.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {SessionData} from './SessionData';
|
|
2
2
|
interface SessionInformation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
session_id?: string;
|
|
4
|
+
created_at?: string;
|
|
5
|
+
last_active_at?: string;
|
|
6
|
+
status?: string;
|
|
7
7
|
data?: SessionData;
|
|
8
8
|
metadata?: Map<string, any>;
|
|
9
9
|
}
|
package/src/model/Suggestion.ts
CHANGED
package/src/model/index.ts
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("socket.io-client"));const o=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},s=(...t)=>t.reduce(((t,e)=>{if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(t[r])&&Array.isArray(e[r])?t[r]=s.options.mergeArrays?s.options.uniqueArrayItems?Array.from(new Set(t[r].concat(e[r]))):[...t[r],...e[r]]:e[r]:o(t[r])&&o(e[r])?t[r]=s(t[r],e[r]):t[r]=void 0===e[r]?s.options.allowUndefinedOverrides?e[r]:t[r]:e[r])})),t}),{}),r={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};s.options=r,s.withOptions=(t,...e)=>{s.options=Object.assign(Object.assign({},r),t);const o=s(...e);return s.options=r,o};const n={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};exports.CimulateCopilot=class{constructor({apiKey:t,baseUrl:o,namespace:r="/copilot",socketOptions:c={}}){const i=`${o}${r}`;this.socket=e.default(i,s(n,c,{withCredentials:!0,transportOptions:{polling:{extraHeaders:{"x-cimulate-api-key":t}}}}))}connect(){this.socket.connect()}search({userPrompt:t,searchParams:e},o){const s={user_prompt:t,search_params:e};o?this.socket.emit("copilot_search",s,o):this.socket.emit("copilot_search",s)}facetedNavigation({searchParams:t},e){const o={search_params:t};e?this.socket.emit("faceted_navigation",o,e):this.socket.emit("faceted_navigation",o)}cancelRequest({eventId:t,reason:e},o){const s={event_id:t,reason:e};o?this.socket.emit("cancel",s,o):this.socket.emit("cancel",s)}requestSessionData(t){this.socket.emit("session_info",t)}onConnectAck(t){this.socket.on("connect_ack",t)}onSearchAck(t){this.socket.on("search_ack",t)}onRefinedSearch(t){this.socket.on("refined_search",t)}onFollowUp(t){this.socket.on("follow_up",t)}onInquiry(t){this.socket.on("inquiry",t)}onPartialInquiry(t){this.socket.on("partial_inquiry",t)}onDisplayProducts(t){this.socket.on("display_products",t)}onDone(t){this.socket.on("done",t)}onError(t){this.socket.on("error",t)}disconnect(){this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}};
|
|
2
|
-
//# sourceMappingURL=bundle.cimulate.copilot-sdk.a2e829d8.cjs.js.map
|