@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.
Files changed (75) hide show
  1. package/dist/{bundle.cimulate.copilot-sdk.65f7195a.esm.js → bundle.cimulate.copilot-sdk.2115a6a5.esm.js} +2 -2
  2. package/dist/{bundle.cimulate.copilot-sdk.65f7195a.esm.js.map → bundle.cimulate.copilot-sdk.2115a6a5.esm.js.map} +1 -1
  3. package/dist/bundle.cimulate.copilot-sdk.4bdff942.cjs.js +2 -0
  4. package/dist/{bundle.cimulate.copilot-sdk.c68ae11d.umd.js.map → bundle.cimulate.copilot-sdk.4bdff942.cjs.js.map} +1 -1
  5. package/dist/{bundle.cimulate.copilot-sdk.c68ae11d.umd.js → bundle.cimulate.copilot-sdk.83e04b89.umd.js} +2 -2
  6. package/dist/{bundle.cimulate.copilot-sdk.a2e829d8.cjs.js.map → bundle.cimulate.copilot-sdk.83e04b89.umd.js.map} +1 -1
  7. package/dist/index.cjs.js +1 -1
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.esm.js +1 -1
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.umd.js +1 -1
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/copilot.d.ts +3 -3
  14. package/dist/types/model/Cancel.d.ts +1 -1
  15. package/dist/types/model/CommonEventFields.d.ts +1 -1
  16. package/dist/types/model/CommonFields.d.ts +4 -4
  17. package/dist/types/model/CommonRequiredFields.d.ts +3 -3
  18. package/dist/types/model/ConnectAck.d.ts +4 -4
  19. package/dist/types/model/ConnectionAcknowledgmentMessageFields.d.ts +1 -1
  20. package/dist/types/model/CopilotSearch.d.ts +2 -2
  21. package/dist/types/model/DisplayProducts.d.ts +4 -4
  22. package/dist/types/model/Done.d.ts +4 -4
  23. package/dist/types/model/Error.d.ts +5 -5
  24. package/dist/types/model/ErrorMessageFields.d.ts +1 -1
  25. package/dist/types/model/EventAck.d.ts +5 -5
  26. package/dist/types/model/EventAcknowledgmentMessageFields.d.ts +1 -1
  27. package/dist/types/model/FacetValue.d.ts +1 -1
  28. package/dist/types/model/FacetedNavigation.d.ts +1 -1
  29. package/dist/types/model/FollowUp.d.ts +4 -4
  30. package/dist/types/model/Inquiry.d.ts +4 -4
  31. package/dist/types/model/PartialInquiry.d.ts +5 -5
  32. package/dist/types/model/PartialInquiryMessageFields.d.ts +1 -1
  33. package/dist/types/model/RefinedSearch.d.ts +6 -6
  34. package/dist/types/model/RefinedSearchMessageFields.d.ts +2 -2
  35. package/dist/types/model/ReservedEvent.d.ts +4 -4
  36. package/dist/types/model/Root.d.ts +21 -21
  37. package/dist/types/model/SearchParameters.d.ts +1 -1
  38. package/dist/types/model/SessionData.d.ts +1 -1
  39. package/dist/types/model/SessionEventInformationReply.d.ts +1 -1
  40. package/dist/types/model/SessionEventStatusReply.d.ts +1 -1
  41. package/dist/types/model/SessionInformation.d.ts +4 -4
  42. package/dist/types/model/Suggestion.d.ts +1 -1
  43. package/package.json +4 -2
  44. package/src/copilot.ts +3 -3
  45. package/src/model/Cancel.ts +1 -1
  46. package/src/model/CommonEventFields.ts +1 -1
  47. package/src/model/CommonFields.ts +4 -4
  48. package/src/model/CommonRequiredFields.ts +3 -3
  49. package/src/model/ConnectAck.ts +4 -4
  50. package/src/model/ConnectionAcknowledgmentMessageFields.ts +1 -1
  51. package/src/model/CopilotSearch.ts +2 -2
  52. package/src/model/DisplayProducts.ts +4 -4
  53. package/src/model/Done.ts +4 -4
  54. package/src/model/Error.ts +5 -5
  55. package/src/model/ErrorMessageFields.ts +1 -1
  56. package/src/model/EventAck.ts +5 -5
  57. package/src/model/EventAcknowledgmentMessageFields.ts +1 -1
  58. package/src/model/FacetValue.ts +1 -1
  59. package/src/model/FacetedNavigation.ts +1 -1
  60. package/src/model/FollowUp.ts +4 -4
  61. package/src/model/Inquiry.ts +4 -4
  62. package/src/model/PartialInquiry.ts +5 -5
  63. package/src/model/PartialInquiryMessageFields.ts +1 -1
  64. package/src/model/RefinedSearch.ts +6 -6
  65. package/src/model/RefinedSearchMessageFields.ts +2 -2
  66. package/src/model/ReservedEvent.ts +4 -4
  67. package/src/model/Root.ts +21 -21
  68. package/src/model/SearchParameters.ts +1 -1
  69. package/src/model/SessionData.ts +1 -1
  70. package/src/model/SessionEventInformationReply.ts +1 -1
  71. package/src/model/SessionEventStatusReply.ts +1 -1
  72. package/src/model/SessionInformation.ts +4 -4
  73. package/src/model/Suggestion.ts +1 -1
  74. package/src/model/index.ts +1 -1
  75. package/dist/bundle.cimulate.copilot-sdk.a2e829d8.cjs.js +0 -2
@@ -1,10 +1,10 @@
1
1
  interface ReservedEvent {
2
2
  id?: string;
3
- sessionId?: string;
4
- reservedName?: string;
5
- eventSourceId?: string;
3
+ session_id?: string;
4
+ name?: string;
5
+ event_source_id?: string;
6
6
  data?: any;
7
- createdAt?: string;
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
- commonFields?: CommonRequiredFields;
27
- commonEventFields?: CommonFields;
28
- connectAckMetadata?: ConnectAckMetadata;
29
- connectAck?: ConnectAck;
30
- searchParams?: SearchParameters;
31
- facetValue?: FacetValue;
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
- copilotSearch?: CopilotSearch;
34
- facetedNavigation?: FacetedNavigation;
35
- eventAck?: EventAck;
36
- refinedSearch?: RefinedSearch;
37
- displayProducts?: DisplayProducts;
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
- followUp?: FollowUp;
40
- partialInquiry?: PartialInquiry;
39
+ follow_up?: FollowUp;
40
+ partial_inquiry?: PartialInquiry;
41
41
  inquiry?: Inquiry;
42
42
  done?: Done;
43
43
  error?: Error;
44
- reservedEvent?: ReservedEvent;
45
- sessionData?: SessionData;
46
- sessionInfoReply?: SessionInformation;
47
- sessionEventsReply?: Map<string, any>[];
48
- sessionEventInfo?: string;
49
- sessionEventInfoReply?: SessionEventInformationReply;
50
- sessionEventStatus?: string;
51
- sessionEventStatusReply?: SessionEventStatusReply;
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,5 +1,5 @@
1
1
  interface SearchParameters {
2
2
  query: string;
3
- facetFilters?: Map<string, string[]>;
3
+ facet_filters?: Map<string, string[]>;
4
4
  }
5
5
  export { SearchParameters };
@@ -1,6 +1,6 @@
1
1
  import { ReservedEvent } from './ReservedEvent';
2
2
  interface SessionData {
3
3
  events?: Map<string, ReservedEvent>;
4
- eventSourceMap?: Map<string, string[]>;
4
+ event_source_map?: Map<string, string[]>;
5
5
  }
6
6
  export { SessionData };
@@ -1,5 +1,5 @@
1
1
  interface SessionEventInformationReply {
2
- reservedType?: any;
2
+ type?: any;
3
3
  additionalProperties?: Map<string, any>;
4
4
  }
5
5
  export { SessionEventInformationReply };
@@ -1,5 +1,5 @@
1
1
  interface SessionEventStatusReply {
2
- reservedStatus?: string;
2
+ status?: string;
3
3
  additionalProperties?: Map<string, any>;
4
4
  }
5
5
  export { SessionEventStatusReply };
@@ -1,9 +1,9 @@
1
1
  import { SessionData } from './SessionData';
2
2
  interface SessionInformation {
3
- sessionId?: string;
4
- createdAt?: string;
5
- lastActiveAt?: string;
6
- reservedStatus?: string;
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
  }
@@ -1,5 +1,5 @@
1
1
  interface Suggestion {
2
- displayText?: string;
2
+ display_text?: string;
3
3
  action?: string;
4
4
  params?: Map<string, any>;
5
5
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@cimulate/copilot-sdk",
3
- "version": "1.1.0",
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": "src/model/index.ts",
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: string; searchParams: SearchParams },
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?: (facetedNavigation: Event.FacetedNavigation) => void
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
- requestSessionData(callback: (sessionData: Event.SessionData) => void) {
104
+ requestSessionInformation(callback: (sessionInformation: Event.SessionInformation) => void) {
105
105
  this.socket.emit("session_info", callback);
106
106
  }
107
107
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface Cancel {
3
- eventId: string;
3
+ event_id: string;
4
4
  reason?: string;
5
5
  }
6
6
  export { Cancel };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface CommonEventFields {
3
- eventSourceId: string;
3
+ event_source_id: string;
4
4
  message: string;
5
5
  }
6
6
  export { CommonEventFields };
@@ -1,10 +1,10 @@
1
1
 
2
2
  interface CommonFields {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
9
  }
10
10
  export { CommonFields };
@@ -1,8 +1,8 @@
1
1
 
2
2
  interface CommonRequiredFields {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
7
  }
8
8
  export { CommonRequiredFields };
@@ -1,10 +1,10 @@
1
1
  import {ConnectAckMetadata} from './ConnectAckMetadata';
2
2
  interface ConnectAck {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- reservedStatus: number;
7
+ status: number;
8
8
  message: string;
9
9
  metadata: ConnectAckMetadata;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import {ConnectAckMetadata} from './ConnectAckMetadata';
2
2
  interface ConnectionAcknowledgmentMessageFields {
3
- reservedStatus: number;
3
+ status: number;
4
4
  message: string;
5
5
  metadata: ConnectAckMetadata;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import {SearchParameters} from './SearchParameters';
2
2
  interface CopilotSearch {
3
- searchParams: SearchParameters;
4
- userPrompt?: string;
3
+ search_params: SearchParameters;
4
+ user_prompt?: string;
5
5
  }
6
6
  export { CopilotSearch };
@@ -1,10 +1,10 @@
1
1
 
2
2
  interface DisplayProducts {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
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
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
9
  }
10
10
  export { Done };
@@ -1,12 +1,12 @@
1
1
 
2
2
  interface Error {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
- reservedStatus: number;
9
+ status: number;
10
10
  error: string;
11
11
  }
12
12
  export { Error };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface ErrorMessageFields {
3
- reservedStatus: number;
3
+ status: number;
4
4
  error: string;
5
5
  }
6
6
  export { ErrorMessageFields };
@@ -1,12 +1,12 @@
1
1
  import {CopilotSearch} from './CopilotSearch';
2
2
  interface EventAck {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
- reservedStatus: string;
9
+ status: string;
10
10
  request: CopilotSearch;
11
11
  }
12
12
  export { EventAck };
@@ -1,6 +1,6 @@
1
1
  import {CopilotSearch} from './CopilotSearch';
2
2
  interface EventAcknowledgmentMessageFields {
3
- reservedStatus: string;
3
+ status: string;
4
4
  request: CopilotSearch;
5
5
  }
6
6
  export { EventAcknowledgmentMessageFields };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface FacetValue {
3
- reservedName?: string;
3
+ name?: string;
4
4
  count?: number;
5
5
  }
6
6
  export { FacetValue };
@@ -1,5 +1,5 @@
1
1
  import {SearchParameters} from './SearchParameters';
2
2
  interface FacetedNavigation {
3
- searchParams: SearchParameters;
3
+ search_params: SearchParameters;
4
4
  }
5
5
  export { FacetedNavigation };
@@ -1,10 +1,10 @@
1
1
  import {Suggestion} from './Suggestion';
2
2
  interface FollowUp {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
9
  suggestions: Suggestion[];
10
10
  }
@@ -1,10 +1,10 @@
1
1
 
2
2
  interface Inquiry {
3
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
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
- sessionId: string;
4
- eventId: string;
5
- eventName: string;
3
+ session_id: string;
4
+ event_id: string;
5
+ event_name: string;
6
6
  timestamp: string;
7
- eventSourceId: string;
7
+ event_source_id: string;
8
8
  message: string;
9
- inquiryEventId: string;
9
+ inquiry_event_id: string;
10
10
  index: number;
11
11
  }
12
12
  export { PartialInquiry };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface PartialInquiryMessageFields {
3
- inquiryEventId: string;
3
+ inquiry_event_id: string;
4
4
  index: number;
5
5
  }
6
6
  export { PartialInquiryMessageFields };
@@ -1,15 +1,15 @@
1
1
  import {SearchParameters} from './SearchParameters';
2
2
  import {Facet} from './Facet';
3
3
  interface RefinedSearch {
4
- sessionId: string;
5
- eventId: string;
6
- eventName: string;
4
+ session_id: string;
5
+ event_id: string;
6
+ event_name: string;
7
7
  timestamp: string;
8
- eventSourceId: string;
8
+ event_source_id: string;
9
9
  message: string;
10
- searchParams: SearchParameters;
10
+ search_params: SearchParameters;
11
11
  hits?: Map<string, any>[];
12
- totalHits?: number;
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
- searchParams: SearchParameters;
4
+ search_params: SearchParameters;
5
5
  hits?: Map<string, any>[];
6
- totalHits?: number;
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
- sessionId?: string;
5
- reservedName?: string;
6
- eventSourceId?: string;
4
+ session_id?: string;
5
+ name?: string;
6
+ event_source_id?: string;
7
7
  data?: any;
8
- createdAt?: string;
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
- commonFields?: CommonRequiredFields;
27
- commonEventFields?: CommonFields;
28
- connectAckMetadata?: ConnectAckMetadata;
29
- connectAck?: ConnectAck;
30
- searchParams?: SearchParameters;
31
- facetValue?: FacetValue;
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
- copilotSearch?: CopilotSearch;
34
- facetedNavigation?: FacetedNavigation;
35
- eventAck?: EventAck;
36
- refinedSearch?: RefinedSearch;
37
- displayProducts?: DisplayProducts;
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
- followUp?: FollowUp;
40
- partialInquiry?: PartialInquiry;
39
+ follow_up?: FollowUp;
40
+ partial_inquiry?: PartialInquiry;
41
41
  inquiry?: Inquiry;
42
42
  done?: Done;
43
43
  error?: Error;
44
- reservedEvent?: ReservedEvent;
45
- sessionData?: SessionData;
46
- sessionInfoReply?: SessionInformation;
47
- sessionEventsReply?: Map<string, any>[];
48
- sessionEventInfo?: string;
49
- sessionEventInfoReply?: SessionEventInformationReply;
50
- sessionEventStatus?: string;
51
- sessionEventStatusReply?: SessionEventStatusReply;
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,6 +1,6 @@
1
1
 
2
2
  interface SearchParameters {
3
3
  query: string;
4
- facetFilters?: Map<string, string[]>;
4
+ facet_filters?: Map<string, string[]>;
5
5
  }
6
6
  export { SearchParameters };
@@ -1,6 +1,6 @@
1
1
  import {ReservedEvent} from './ReservedEvent';
2
2
  interface SessionData {
3
3
  events?: Map<string, ReservedEvent>;
4
- eventSourceMap?: Map<string, string[]>;
4
+ event_source_map?: Map<string, string[]>;
5
5
  }
6
6
  export { SessionData };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface SessionEventInformationReply {
3
- reservedType?: any;
3
+ type?: any;
4
4
  additionalProperties?: Map<string, any>;
5
5
  }
6
6
  export { SessionEventInformationReply };
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface SessionEventStatusReply {
3
- reservedStatus?: string;
3
+ status?: string;
4
4
  additionalProperties?: Map<string, any>;
5
5
  }
6
6
  export { SessionEventStatusReply };
@@ -1,9 +1,9 @@
1
1
  import {SessionData} from './SessionData';
2
2
  interface SessionInformation {
3
- sessionId?: string;
4
- createdAt?: string;
5
- lastActiveAt?: string;
6
- reservedStatus?: string;
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
  }
@@ -1,6 +1,6 @@
1
1
 
2
2
  interface Suggestion {
3
- displayText?: string;
3
+ display_text?: string;
4
4
  action?: string;
5
5
  params?: Map<string, any>;
6
6
  }
@@ -30,4 +30,4 @@ export * from './SessionData';
30
30
  export * from './SessionInformation';
31
31
  export * from './SessionEventInformationReply';
32
32
  export * from './SessionEventStatusReply';
33
- export * from './Cancel';
33
+ export * from './Cancel';
@@ -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