@or-sdk/hitl 0.36.2 → 0.36.3

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 (47) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/api/Sessions.js +4 -3
  3. package/dist/cjs/api/Sessions.js.map +1 -1
  4. package/dist/esm/api/Sessions.js +3 -2
  5. package/dist/esm/api/Sessions.js.map +1 -1
  6. package/dist/types/HITL.d.ts +13 -0
  7. package/dist/types/HITL.d.ts.map +1 -1
  8. package/dist/types/api/Agents.d.ts +347 -0
  9. package/dist/types/api/Agents.d.ts.map +1 -1
  10. package/dist/types/api/CannedMessages.d.ts +168 -0
  11. package/dist/types/api/CannedMessages.d.ts.map +1 -1
  12. package/dist/types/api/Commands.d.ts +46 -0
  13. package/dist/types/api/Commands.d.ts.map +1 -1
  14. package/dist/types/api/Conferences.d.ts +120 -0
  15. package/dist/types/api/Conferences.d.ts.map +1 -1
  16. package/dist/types/api/ContactRuleGroups.d.ts +131 -0
  17. package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
  18. package/dist/types/api/Contacts.d.ts +37 -0
  19. package/dist/types/api/Contacts.d.ts.map +1 -1
  20. package/dist/types/api/ContactsMeta.d.ts +33 -0
  21. package/dist/types/api/ContactsMeta.d.ts.map +1 -1
  22. package/dist/types/api/EventTemplates.d.ts +135 -0
  23. package/dist/types/api/EventTemplates.d.ts.map +1 -1
  24. package/dist/types/api/Filters.d.ts +215 -0
  25. package/dist/types/api/Filters.d.ts.map +1 -1
  26. package/dist/types/api/Helpers.d.ts +33 -0
  27. package/dist/types/api/Helpers.d.ts.map +1 -1
  28. package/dist/types/api/Listeners.d.ts +150 -0
  29. package/dist/types/api/Listeners.d.ts.map +1 -1
  30. package/dist/types/api/Migrations.d.ts +222 -0
  31. package/dist/types/api/Migrations.d.ts.map +1 -1
  32. package/dist/types/api/RuleGroups.d.ts +127 -0
  33. package/dist/types/api/RuleGroups.d.ts.map +1 -1
  34. package/dist/types/api/SessionEvents.d.ts +145 -0
  35. package/dist/types/api/SessionEvents.d.ts.map +1 -1
  36. package/dist/types/api/SessionRelations.d.ts +109 -0
  37. package/dist/types/api/SessionRelations.d.ts.map +1 -1
  38. package/dist/types/api/Sessions.d.ts +455 -1
  39. package/dist/types/api/Sessions.d.ts.map +1 -1
  40. package/dist/types/api/Settings.d.ts +145 -0
  41. package/dist/types/api/Settings.d.ts.map +1 -1
  42. package/dist/types/api/Tasks.d.ts +39 -0
  43. package/dist/types/api/Tasks.d.ts.map +1 -1
  44. package/dist/types/api/Versions.d.ts +80 -0
  45. package/dist/types/api/Versions.d.ts.map +1 -1
  46. package/package.json +2 -2
  47. package/src/api/Sessions.ts +2 -1
@@ -1,7 +1,46 @@
1
1
  import { RunTaskOptions } from '../types/tasks';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * Manages asynchronous task execution in the system
5
+ *
6
+ * This class provides functionality to:
7
+ * - Execute various system tasks like event sending, broadcasting, sharing cards to agents, etc.
8
+ *
9
+ * @remarks
10
+ * - All methods in this class interact with the `/tasks` endpoint
11
+ * @public
12
+ */
3
13
  export declare class Tasks extends HITLBase {
4
14
  protected static MODULE_URL: string;
15
+ /**
16
+ * Executes a specified task with provided data
17
+ *
18
+ * @param options - Configuration parameters for task execution
19
+ *
20
+ * Required parameters:
21
+ * - `task` - (string) The type/name of task to execute
22
+ * - `data` - (object) Task-specific data required for execution
23
+ *
24
+ * Optional parameters:
25
+ * - `timeout` - (number) Request timeout in milliseconds
26
+ * - `version` - (string | number) API version to use
27
+ *
28
+ * @returns {Promise<void>} Promise that resolves when the task is initiated
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * await hitlApi.tasks.runTask({
33
+ * task: 'shareCardsToAgents',
34
+ * data: {
35
+ * cardIds: ['card-id-1', 'card-id-2'],
36
+ * }
37
+ * });
38
+ * ```
39
+ *
40
+ * @remarks
41
+ * Makes a POST request to the `/tasks` endpoint
42
+ * @public
43
+ */
5
44
  static runTask({ task, data, ...options }: RunTaskOptions): Promise<void>;
6
45
  }
7
46
  //# sourceMappingURL=Tasks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tasks.d.ts","sourceRoot":"","sources":["../../../src/api/Tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC,qBAAa,KAAM,SAAQ,QAAQ;IACjC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAW;WA+BlB,OAAO,CACzB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,cAAc,GACzC,OAAO,CAAC,IAAI,CAAC;CAWjB"}
1
+ {"version":3,"file":"Tasks.d.ts","sourceRoot":"","sources":["../../../src/api/Tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;GASG;AACH,qBAAa,KAAM,SAAQ,QAAQ;IACjC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAW;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACiB,OAAO,CACzB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,cAAc,GACzC,OAAO,CAAC,IAAI,CAAC;CAWjB"}
@@ -1,12 +1,92 @@
1
1
  import { ApiVersionOptions } from '../types';
2
2
  import { GetVersionsListResponse, GetVersionInfoResponse, GetStepsToUIVersionsMapOptions } from '../types/versions';
3
3
  import { HITLBase } from './HITLBase';
4
+ /**
5
+ * Manages UI version information and compatibility
6
+ *
7
+ * This class provides functionality to:
8
+ * - Retrieve available UI versions
9
+ * - Get detailed version information
10
+ *
11
+ * Key features:
12
+ * - List all available UI versions
13
+ * - Get specific version details
14
+ *
15
+ * @remarks
16
+ * - All methods in this class interact with the `/ui-versions` endpoint
17
+ * @public
18
+ */
4
19
  export declare class Versions extends HITLBase {
5
20
  protected static MODULE_URL: string;
6
21
  protected static VERSION_INFO: string;
7
22
  protected static STEPS_TO_UI_VERSIONS_MAP: string;
23
+ /**
24
+ * Retrieves a list of available UI versions
25
+ *
26
+ * @param options - Configuration parameters for retrieving versions
27
+ *
28
+ * Optional parameters:
29
+ * - `timeout` - (number) Request timeout in milliseconds
30
+ * - `version` - (string | number) API version to use
31
+ *
32
+ * @returns {Promise<GetVersionsListResponse>} Promise resolving to the list of available versions
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const versions = await hitlApi.versions.getVersionsList();
37
+ * ```
38
+ *
39
+ * @remarks
40
+ * Makes a GET request to the `/ui-versions` endpoint
41
+ * @public
42
+ */
8
43
  static getVersionsList(options: ApiVersionOptions): Promise<GetVersionsListResponse>;
44
+ /**
45
+ * Retrieves detailed information about the last available version of HitL UI
46
+ *
47
+ * @param options - Configuration parameters for retrieving version information
48
+ *
49
+ * Optional parameters:
50
+ * - `timeout` - (number) Request timeout in milliseconds
51
+ * - `version` - (string | number) API version to use
52
+ *
53
+ * @returns {Promise<GetVersionInfoResponse>} Promise resolving to the version information
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * const versionInfo = await hitlApi.versions.getVersionInfo();
58
+ * ```
59
+ *
60
+ * @remarks
61
+ * Makes a GET request to the `/ui-versions/version-info` endpoint
62
+ * @public
63
+ */
9
64
  static getVersionInfo(options: ApiVersionOptions): Promise<GetVersionInfoResponse>;
65
+ /**
66
+ * Retrieves information about the compatibility of steps to UI versions
67
+ *
68
+ * @param options - Configuration parameters for retrieving steps to UI versions map
69
+ *
70
+ * Optional parameters:
71
+ * - `stepName` - (string) The name of the step to retrieve mapping information for
72
+ * - `timeout` - (number) Request timeout in milliseconds
73
+ * - `version` - (string | number) API version to use
74
+ *
75
+ * @returns {Promise<GetStepsToUIVersionsMapResponse>} Promise resolving to steps to UI versions map
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * const stepsToUIVesionsMap = await hitlApi.versions.getStepsToUIVersionsMap();
80
+ * ```
81
+ *
82
+ * ```typescript
83
+ * const stepToUIVesionsMap = await hitlApi.versions.getStepsToUIVersionsMap({ stepName });
84
+ * ```
85
+ *
86
+ * @remarks
87
+ * Makes a GET request to the `/ui-versions/steps-to-ui-map` endpoint
88
+ * @public
89
+ */
10
90
  static getStepsToUIVersionsMap({ stepName, ...options }: GetStepsToUIVersionsMapOptions): Promise<object>;
11
91
  }
12
92
  //# sourceMappingURL=Versions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Versions.d.ts","sourceRoot":"","sources":["../../../src/api/Versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiBtC,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;IAC5C,SAAS,CAAC,MAAM,CAAC,YAAY,SAAkB;IAC/C,SAAS,CAAC,MAAM,CAAC,wBAAwB,SAAqB;WAsB1C,eAAe,CACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC;WA6Bf,cAAc,CAChC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,CAAC;WAmCd,uBAAuB,CACzC,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,8BAA8B,GACvD,OAAO,CAAC,MAAM,CAAC;CAUnB"}
1
+ {"version":3,"file":"Versions.d.ts","sourceRoot":"","sources":["../../../src/api/Versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;IAC5C,SAAS,CAAC,MAAM,CAAC,YAAY,SAAkB;IAC/C,SAAS,CAAC,MAAM,CAAC,wBAAwB,SAAqB;IAE9D;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,eAAe,CACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC;IASnC;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,cAAc,CAChC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,CAAC;IAUlC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,uBAAuB,CACzC,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,8BAA8B,GACvD,OAAO,CAAC,MAAM,CAAC;CAUnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/hitl",
3
- "version": "0.36.2",
3
+ "version": "0.36.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -30,5 +30,5 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "c0be7bf38017f5f90c179bf5990f548f03fddd4f"
33
+ "gitHead": "a419be0fc640fc0fbd68a1f99ff61219c210c63d"
34
34
  }
@@ -651,7 +651,7 @@ export class Sessions extends HITLBase {
651
651
  * @remarks Makes a POST request to `/sessions/{sessionId}/reopen`
652
652
  */
653
653
  public static async reopenSession(
654
- options: ReopenSessionOptions,
654
+ { startedSessionId, ...options }: ReopenSessionOptions,
655
655
  ): Promise<Session> {
656
656
  const baseUrl = this.getBaseUrl(options);
657
657
  const route = new URI(baseUrl)
@@ -662,6 +662,7 @@ export class Sessions extends HITLBase {
662
662
  return this.request({
663
663
  method: 'POST',
664
664
  route,
665
+ params: { startedSessionId },
665
666
  ...this.getBaseSettings(options),
666
667
  });
667
668
  }