@cimulate/copilot-sdk 3.10.1 → 3.12.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.
Files changed (31) hide show
  1. package/dist/{bundle.cimulate.copilot-sdk.e5834e33.esm.js → bundle.cimulate.copilot-sdk.0480464d.esm.js} +2 -2
  2. package/dist/{bundle.cimulate.copilot-sdk.e5834e33.esm.js.map → bundle.cimulate.copilot-sdk.0480464d.esm.js.map} +1 -1
  3. package/dist/{bundle.cimulate.copilot-sdk.b3f98cd8.umd.js → bundle.cimulate.copilot-sdk.80adb541.umd.js} +2 -2
  4. package/dist/{bundle.cimulate.copilot-sdk.f395e1a3.cjs.js.map → bundle.cimulate.copilot-sdk.80adb541.umd.js.map} +1 -1
  5. package/dist/{bundle.cimulate.copilot-sdk.f395e1a3.cjs.js → bundle.cimulate.copilot-sdk.e8d315fa.cjs.js} +2 -2
  6. package/dist/{bundle.cimulate.copilot-sdk.b3f98cd8.umd.js.map → bundle.cimulate.copilot-sdk.e8d315fa.cjs.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 -1
  14. package/dist/types/model/AskCim.d.ts +6 -0
  15. package/dist/types/model/AskCimAck.d.ts +10 -0
  16. package/dist/types/model/Attachments.d.ts +4 -0
  17. package/dist/types/model/CopilotApiAck.d.ts +2 -1
  18. package/dist/types/model/CopilotBrowse.d.ts +2 -0
  19. package/dist/types/model/CopilotSearch.d.ts +2 -0
  20. package/dist/types/model/ProductView.d.ts +2 -0
  21. package/dist/types/model/index.d.ts +3 -0
  22. package/package.json +1 -1
  23. package/src/copilot.ts +20 -0
  24. package/src/model/AskCim.ts +6 -0
  25. package/src/model/AskCimAck.ts +10 -0
  26. package/src/model/Attachments.ts +5 -0
  27. package/src/model/CopilotApiAck.ts +2 -0
  28. package/src/model/CopilotBrowse.ts +2 -0
  29. package/src/model/CopilotSearch.ts +2 -0
  30. package/src/model/ProductView.ts +2 -1
  31. package/src/model/index.ts +3 -0
@@ -0,0 +1,6 @@
1
+ import { Attachments } from './Attachments';
2
+ interface AskCim {
3
+ userPrompt: string;
4
+ attachments?: Attachments;
5
+ }
6
+ export { AskCim };
@@ -0,0 +1,10 @@
1
+ import { AskCim } from './AskCim';
2
+ interface AskCimAck {
3
+ name: 'ask_cim';
4
+ request: AskCim;
5
+ sessionId: string;
6
+ id: string;
7
+ createdAt: string;
8
+ status: number;
9
+ }
10
+ export { AskCimAck };
@@ -0,0 +1,4 @@
1
+ interface Attachments {
2
+ image?: string;
3
+ }
4
+ export { Attachments };
@@ -2,6 +2,7 @@
2
2
  This not generated automatically by the generate model script.
3
3
  For any new event, manually create an entry here.
4
4
  */
5
+ import { AskCimAck } from "./AskCimAck";
5
6
  import { CancelAck } from "./CancelAck";
6
7
  import { ConversationResetAck } from "./ConversationResetAck";
7
8
  import { CopilotBrowseAck } from "./CopilotBrowseAck";
@@ -9,4 +10,4 @@ import { CopilotError } from "./CopilotError";
9
10
  import { CopilotSearchAck } from "./CopilotSearchAck";
10
11
  import { FacetedNavigationAck } from "./FacetedNavigationAck";
11
12
  import { ProductViewAck } from "./ProductViewAck";
12
- export type CopilotAPIAck = CancelAck | CopilotBrowseAck | CopilotSearchAck | ConversationResetAck | FacetedNavigationAck | ProductViewAck | CopilotError;
13
+ export type CopilotAPIAck = AskCimAck | CancelAck | CopilotBrowseAck | CopilotSearchAck | ConversationResetAck | FacetedNavigationAck | ProductViewAck | CopilotError;
@@ -1,6 +1,8 @@
1
+ import { Attachments } from './Attachments';
1
2
  import { BrowseParams } from './BrowseParams';
2
3
  interface CopilotBrowse {
3
4
  browseParams: BrowseParams;
4
5
  userPrompt?: string;
6
+ attachments?: Attachments;
5
7
  }
6
8
  export { CopilotBrowse };
@@ -1,6 +1,8 @@
1
+ import { Attachments } from './Attachments';
1
2
  import { SearchParams } from './SearchParams';
2
3
  interface CopilotSearch {
3
4
  searchParams: SearchParams;
4
5
  userPrompt?: string;
6
+ attachments?: Attachments;
5
7
  }
6
8
  export { CopilotSearch };
@@ -1,6 +1,8 @@
1
+ import { Attachments } from './Attachments';
1
2
  interface ProductView {
2
3
  productId: string;
3
4
  pdpLink?: string;
4
5
  userPrompt?: string;
6
+ attachments?: Attachments;
5
7
  }
6
8
  export { ProductView };
@@ -1,3 +1,6 @@
1
+ export * from './AskCim';
2
+ export * from './AskCimAck';
3
+ export * from './Attachments';
1
4
  export * from './BrowseParams';
2
5
  export * from './Cancel';
3
6
  export * from './CancelAck';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimulate/copilot-sdk",
3
- "version": "3.10.1",
3
+ "version": "3.12.0",
4
4
  "description": "A lightweight API client SDK for Cimulate Copilot",
5
5
  "files": [
6
6
  "dist/**",
package/src/copilot.ts CHANGED
@@ -2,6 +2,8 @@ import io, { ManagerOptions, Socket, SocketOptions } from "socket.io-client";
2
2
 
3
3
  import deepmerge from "deepmerge";
4
4
  import type {
5
+ AskCim,
6
+ AskCimAck,
5
7
  Cancel,
6
8
  CancelAck,
7
9
  CopilotAPIAck,
@@ -313,6 +315,24 @@ export default class CimulateCopilot<
313
315
  );
314
316
  }
315
317
 
318
+ async askCim(
319
+ args: AskCim
320
+ ): Promise<CopilotResult<T, AskCimAck>>;
321
+ async askCim(
322
+ args: AskCim,
323
+ callback?: (event: AskCimAck) => void
324
+ ): Promise<void>;
325
+ async askCim(
326
+ args: AskCim,
327
+ callback?: (event: AskCimAck) => void
328
+ ): Promise<CopilotResult<T, AskCimAck> | void> {
329
+ return this.asyncResponse<AskCim, AskCimAck>(
330
+ "ask_cim",
331
+ args,
332
+ callback
333
+ );
334
+ }
335
+
316
336
  async requestSessionInformation(): Promise<
317
337
  CopilotResult<T, SessionInformation>
318
338
  >;
@@ -0,0 +1,6 @@
1
+ import { Attachments } from './Attachments';
2
+ interface AskCim {
3
+ userPrompt: string;
4
+ attachments?: Attachments;
5
+ }
6
+ export { AskCim };
@@ -0,0 +1,10 @@
1
+ import { AskCim } from './AskCim';
2
+ interface AskCimAck {
3
+ name: 'ask_cim';
4
+ request: AskCim;
5
+ sessionId: string;
6
+ id: string;
7
+ createdAt: string;
8
+ status: number;
9
+ }
10
+ export { AskCimAck };
@@ -0,0 +1,5 @@
1
+
2
+ interface Attachments {
3
+ image?: string;
4
+ }
5
+ export { Attachments };
@@ -2,6 +2,7 @@
2
2
  This not generated automatically by the generate model script.
3
3
  For any new event, manually create an entry here.
4
4
  */
5
+ import { AskCimAck } from "./AskCimAck";
5
6
  import { CancelAck } from "./CancelAck";
6
7
  import { ConversationResetAck } from "./ConversationResetAck";
7
8
  import { CopilotBrowseAck } from "./CopilotBrowseAck";
@@ -11,6 +12,7 @@ import { FacetedNavigationAck } from "./FacetedNavigationAck";
11
12
  import { ProductViewAck } from "./ProductViewAck";
12
13
 
13
14
  export type CopilotAPIAck =
15
+ | AskCimAck
14
16
  | CancelAck
15
17
  | CopilotBrowseAck
16
18
  | CopilotSearchAck
@@ -1,6 +1,8 @@
1
+ import { Attachments } from './Attachments';
1
2
  import { BrowseParams } from './BrowseParams';
2
3
  interface CopilotBrowse {
3
4
  browseParams: BrowseParams;
4
5
  userPrompt?: string;
6
+ attachments?: Attachments;
5
7
  }
6
8
  export { CopilotBrowse };
@@ -1,6 +1,8 @@
1
+ import { Attachments } from './Attachments';
1
2
  import { SearchParams } from './SearchParams';
2
3
  interface CopilotSearch {
3
4
  searchParams: SearchParams;
4
5
  userPrompt?: string;
6
+ attachments?: Attachments;
5
7
  }
6
8
  export { CopilotSearch };
@@ -1,7 +1,8 @@
1
-
1
+ import { Attachments } from './Attachments';
2
2
  interface ProductView {
3
3
  productId: string;
4
4
  pdpLink?: string;
5
5
  userPrompt?: string;
6
+ attachments?: Attachments;
6
7
  }
7
8
  export { ProductView };
@@ -1,3 +1,6 @@
1
+ export * from './AskCim';
2
+ export * from './AskCimAck';
3
+ export * from './Attachments';
1
4
  export * from './BrowseParams';
2
5
  export * from './Cancel';
3
6
  export * from './CancelAck';