@or-sdk/hitl 0.27.1-beta.572.0 → 0.27.1-beta.574.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.
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __generator = (this && this.__generator) || function (thisArg, body) {
38
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
39
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
40
+ function verb(n) { return function (v) { return step([n, v]); }; }
41
+ function step(op) {
42
+ if (f) throw new TypeError("Generator is already executing.");
43
+ while (_) try {
44
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
+ if (y = 0, t) op = [op[0] & 2, t.value];
46
+ switch (op[0]) {
47
+ case 0: case 1: t = op; break;
48
+ case 4: _.label++; return { value: op[1], done: false };
49
+ case 5: _.label++; y = op[1]; op = [0]; continue;
50
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
51
+ default:
52
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
53
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
54
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
55
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
56
+ if (t[2]) _.ops.pop();
57
+ _.trys.pop(); continue;
58
+ }
59
+ op = body.call(thisArg, _);
60
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
61
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
62
+ }
63
+ };
64
+ var __importDefault = (this && this.__importDefault) || function (mod) {
65
+ return (mod && mod.__esModule) ? mod : { "default": mod };
66
+ };
67
+ Object.defineProperty(exports, "__esModule", { value: true });
68
+ exports.Commands = void 0;
69
+ var lodash_1 = __importDefault(require("lodash"));
70
+ var HITLBase_1 = require("./HITLBase");
71
+ var Commands = (function (_super) {
72
+ __extends(Commands, _super);
73
+ function Commands() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ Commands.applyCommandToSession = function (options) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var route, params, data;
79
+ return __generator(this, function (_a) {
80
+ route = this.getBaseUrl(options);
81
+ params = lodash_1.default.pick(options, ['command', 'sessionId']);
82
+ data = lodash_1.default.pick(options, ['data']);
83
+ return [2, this.request({
84
+ method: 'POST',
85
+ route: route,
86
+ params: params,
87
+ data: data,
88
+ })];
89
+ });
90
+ });
91
+ };
92
+ Commands.getBaseUrl = function (options) {
93
+ return HITLBase_1.HITLBase.getBaseUrl(__assign(__assign({}, options), { module: this.MODULE_URL }));
94
+ };
95
+ Commands.MODULE_URL = 'commands';
96
+ return Commands;
97
+ }(HITLBase_1.HITLBase));
98
+ exports.Commands = Commands;
99
+ //# sourceMappingURL=Commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Commands.js","sourceRoot":"","sources":["../../../src/api/Commands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AAIvB,uCAAsC;AAEtC;IAA8B,4BAAQ;IAAtC;;IAwBA,CAAC;IArBqB,8BAAqB,GAAzC,UACE,OAA6B;;;;gBAEvB,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;gBACnD,IAAI,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;gBAEvC,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,MAAM,EAAE,MAAM;wBACd,KAAK,OAAA;wBACL,MAAM,QAAA;wBACN,IAAI,MAAA;qBACL,CAAC,EAAC;;;KACJ;IAEgB,mBAAU,GAA3B,UAA4B,OAA0B;QACpD,OAAO,mBAAQ,CAAC,UAAU,uBACrB,OAAO,KACV,MAAM,EAAE,IAAI,CAAC,UAAU,IACvB,CAAC;IACL,CAAC;IAtBgB,mBAAU,GAAG,UAAU,CAAC;IAuB3C,eAAC;CAAA,AAxBD,CAA8B,mBAAQ,GAwBrC;AAxBY,4BAAQ"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionEvents = exports.Listeners = exports.Sessions = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Settings = exports.Migrations = void 0;
3
+ exports.Commands = exports.SessionEvents = exports.Listeners = exports.Sessions = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Settings = exports.Migrations = void 0;
4
4
  var Migrations_1 = require("./Migrations");
5
5
  Object.defineProperty(exports, "Migrations", { enumerable: true, get: function () { return Migrations_1.Migrations; } });
6
6
  var Settings_1 = require("./Settings");
@@ -23,4 +23,6 @@ var Listeners_1 = require("./Listeners");
23
23
  Object.defineProperty(exports, "Listeners", { enumerable: true, get: function () { return Listeners_1.Listeners; } });
24
24
  var SessionEvents_1 = require("./SessionEvents");
25
25
  Object.defineProperty(exports, "SessionEvents", { enumerable: true, get: function () { return SessionEvents_1.SessionEvents; } });
26
+ var Commands_1 = require("./Commands");
27
+ Object.defineProperty(exports, "Commands", { enumerable: true, get: function () { return Commands_1.Commands; } });
26
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":""}
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ReadEvents = exports.SessionEvents = exports.Listeners = exports.Sessions = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Settings = exports.Migrations = void 0;
29
+ exports.Commands = exports.ReadEvents = exports.SessionEvents = exports.Listeners = exports.Sessions = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Settings = exports.Migrations = void 0;
30
30
  __exportStar(require("./common"), exports);
31
31
  exports.Migrations = __importStar(require("./migrations"));
32
32
  exports.Settings = __importStar(require("./settings"));
@@ -40,4 +40,5 @@ exports.Sessions = __importStar(require("./sessions"));
40
40
  exports.Listeners = __importStar(require("./listeners"));
41
41
  exports.SessionEvents = __importStar(require("./session-events"));
42
42
  exports.ReadEvents = __importStar(require("./read-events"));
43
+ exports.Commands = __importStar(require("./commands"));
43
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2DAA2C;AAC3C,uDAAuC;AACvC,mDAAmC;AACnC,4DAA4C;AAC5C,oEAAoD;AACpD,6DAA6C;AAC7C,qDAAqC;AACrC,oEAAoD;AACpD,uDAAuC;AACvC,yDAAyC;AACzC,kEAAkD;AAClD,4DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2DAA2C;AAC3C,uDAAuC;AACvC,mDAAmC;AACnC,4DAA4C;AAC5C,oEAAoD;AACpD,6DAA6C;AAC7C,qDAAqC;AACrC,oEAAoD;AACpD,uDAAuC;AACvC,yDAAyC;AACzC,kEAAkD;AAClD,4DAA4C;AAC5C,uDAAuC"}
@@ -0,0 +1,31 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import _ from 'lodash';
11
+ import { HITLBase } from './HITLBase';
12
+ export class Commands extends HITLBase {
13
+ static applyCommandToSession(options) {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ const route = this.getBaseUrl(options);
16
+ const params = _.pick(options, ['command', 'sessionId']);
17
+ const data = _.pick(options, ['data']);
18
+ return this.request({
19
+ method: 'POST',
20
+ route,
21
+ params,
22
+ data,
23
+ });
24
+ });
25
+ }
26
+ static getBaseUrl(options) {
27
+ return HITLBase.getBaseUrl(Object.assign(Object.assign({}, options), { module: this.MODULE_URL }));
28
+ }
29
+ }
30
+ Commands.MODULE_URL = 'commands';
31
+ //# sourceMappingURL=Commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Commands.js","sourceRoot":"","sources":["../../../src/api/Commands.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAIvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,OAAO,QAAS,SAAQ,QAAQ;IAG7B,MAAM,CAAO,qBAAqB,CACvC,OAA6B;;YAE7B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;YACzD,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;YAEvC,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,MAAM,EAAE,MAAM;gBACd,KAAK;gBACL,MAAM;gBACN,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;IAES,MAAM,CAAC,UAAU,CAAC,OAA0B;QACpD,OAAO,QAAQ,CAAC,UAAU,iCACrB,OAAO,KACV,MAAM,EAAE,IAAI,CAAC,UAAU,IACvB,CAAC;IACL,CAAC;;AAtBgB,mBAAU,GAAG,UAAU,CAAC"}
@@ -9,4 +9,5 @@ export { CannedMessages } from './CannedMessages';
9
9
  export { Sessions } from './Sessions';
10
10
  export { Listeners } from './Listeners';
11
11
  export { SessionEvents } from './SessionEvents';
12
+ export { Commands } from './Commands';
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":""}
@@ -23,4 +23,6 @@ import * as SessionEvents_1 from './session-events';
23
23
  export { SessionEvents_1 as SessionEvents };
24
24
  import * as ReadEvents_1 from './read-events';
25
25
  export { ReadEvents_1 as ReadEvents };
26
+ import * as Commands_1 from './commands';
27
+ export { Commands_1 as Commands };
26
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;8BACG,cAAc;yBAA9B,UAAU;4BACI,YAAY;uBAA1B,QAAQ;0BACI,UAAU;qBAAtB,MAAM;8BACU,eAAe;yBAA/B,UAAU;kCACU,mBAAmB;6BAAvC,cAAc;+BACG,eAAe;0BAAhC,WAAW;2BACE,WAAW;sBAAxB,OAAO;kCACa,mBAAmB;6BAAvC,cAAc;4BACA,YAAY;uBAA1B,QAAQ;6BACO,aAAa;wBAA5B,SAAS;iCACU,kBAAkB;4BAArC,aAAa;8BACG,eAAe;yBAA/B,UAAU"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;8BACG,cAAc;yBAA9B,UAAU;4BACI,YAAY;uBAA1B,QAAQ;0BACI,UAAU;qBAAtB,MAAM;8BACU,eAAe;yBAA/B,UAAU;kCACU,mBAAmB;6BAAvC,cAAc;+BACG,eAAe;0BAAhC,WAAW;2BACE,WAAW;sBAAxB,OAAO;kCACa,mBAAmB;6BAAvC,cAAc;4BACA,YAAY;uBAA1B,QAAQ;6BACO,aAAa;wBAA5B,SAAS;iCACU,kBAAkB;4BAArC,aAAa;8BACG,eAAe;yBAA/B,UAAU;4BACI,YAAY;uBAA1B,QAAQ"}
@@ -0,0 +1,9 @@
1
+ import { ApiVersionOptions } from '../types';
2
+ import { ApplyCommandsOptions } from '../types/commands';
3
+ import { HITLBase } from './HITLBase';
4
+ export declare class Commands extends HITLBase {
5
+ protected static MODULE_URL: string;
6
+ static applyCommandToSession(options: ApplyCommandsOptions): Promise<void>;
7
+ protected static getBaseUrl(options: ApiVersionOptions): string;
8
+ }
9
+ //# sourceMappingURL=Commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Commands.d.ts","sourceRoot":"","sources":["../../../src/api/Commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAc;WAErB,qBAAqB,CACvC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC;IAahB,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM;CAMhE"}
@@ -9,4 +9,5 @@ export { CannedMessages } from './CannedMessages';
9
9
  export { Sessions } from './Sessions';
10
10
  export { Listeners } from './Listeners';
11
11
  export { SessionEvents } from './SessionEvents';
12
+ export { Commands } from './Commands';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Commands } from '@onereach/types-hitl-api';
2
+ import { ApiVersionOptions } from './common';
3
+ export declare type ApplyCommandsOptions = ApiVersionOptions & Commands.IApplyCommandQuery & Commands.IApplyCommandBody;
4
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,oBAAY,oBAAoB,GAAG,iBAAiB,GAChD,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,iBAAiB,CAAC"}
@@ -11,4 +11,5 @@ export * as Sessions from './sessions';
11
11
  export * as Listeners from './listeners';
12
12
  export * as SessionEvents from './session-events';
13
13
  export * as ReadEvents from './read-events';
14
+ export * as Commands from './commands';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/hitl",
3
- "version": "0.27.1-beta.572.0",
3
+ "version": "0.27.1-beta.574.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dev": "pnpm build:watch:esm"
18
18
  },
19
19
  "dependencies": {
20
- "@onereach/types-hitl-api": "^0.0.32-rc.1",
20
+ "@onereach/types-hitl-api": "^0.0.32-rc.2",
21
21
  "@or-sdk/base": "^0.26.3",
22
22
  "@types/lodash": "^4.14.178",
23
23
  "@types/urijs": "^1.19.18",
@@ -0,0 +1,31 @@
1
+ import _ from 'lodash';
2
+
3
+ import { ApiVersionOptions } from '../types';
4
+ import { ApplyCommandsOptions } from '../types/commands';
5
+ import { HITLBase } from './HITLBase';
6
+
7
+ export class Commands extends HITLBase {
8
+ protected static MODULE_URL = 'commands';
9
+
10
+ public static async applyCommandToSession(
11
+ options: ApplyCommandsOptions
12
+ ): Promise<void> {
13
+ const route = this.getBaseUrl(options);
14
+ const params = _.pick(options, ['command', 'sessionId']);
15
+ const data = _.pick(options, ['data']);
16
+
17
+ return this.request({
18
+ method: 'POST',
19
+ route,
20
+ params,
21
+ data,
22
+ });
23
+ }
24
+
25
+ protected static getBaseUrl(options: ApiVersionOptions): string {
26
+ return HITLBase.getBaseUrl({
27
+ ...options,
28
+ module: this.MODULE_URL,
29
+ });
30
+ }
31
+ }
package/src/api/index.ts CHANGED
@@ -9,3 +9,4 @@ export { CannedMessages } from './CannedMessages';
9
9
  export { Sessions } from './Sessions';
10
10
  export { Listeners } from './Listeners';
11
11
  export { SessionEvents } from './SessionEvents';
12
+ export { Commands } from './Commands';
@@ -0,0 +1,7 @@
1
+ import { Commands } from '@onereach/types-hitl-api';
2
+ import { ApiVersionOptions } from './common';
3
+
4
+ /* eslint-disable @typescript-eslint/indent */
5
+ export type ApplyCommandsOptions = ApiVersionOptions
6
+ & Commands.IApplyCommandQuery
7
+ & Commands.IApplyCommandBody;
@@ -11,3 +11,4 @@ export * as Sessions from './sessions';
11
11
  export * as Listeners from './listeners';
12
12
  export * as SessionEvents from './session-events';
13
13
  export * as ReadEvents from './read-events';
14
+ export * as Commands from './commands';