@or-sdk/hitl 0.31.0-beta.707.0 → 0.31.0-beta.760.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.
- package/CHANGELOG.md +34 -0
- package/dist/cjs/api/Agents.js +51 -0
- package/dist/cjs/api/Agents.js.map +1 -1
- package/dist/cjs/api/Migrations.js +15 -0
- package/dist/cjs/api/Migrations.js.map +1 -1
- package/dist/cjs/types/agents.js.map +1 -1
- package/dist/cjs/types/commands.js +3 -0
- package/dist/cjs/types/commands.js.map +1 -1
- package/dist/esm/api/Agents.js +41 -0
- package/dist/esm/api/Agents.js.map +1 -1
- package/dist/esm/api/Migrations.js +12 -0
- package/dist/esm/api/Migrations.js.map +1 -1
- package/dist/esm/types/agents.js.map +1 -1
- package/dist/esm/types/commands.js +2 -1
- package/dist/esm/types/commands.js.map +1 -1
- package/dist/types/api/Agents.d.ts +6 -1
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/api/Migrations.d.ts +3 -1
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/types/agents.d.ts +16 -2
- package/dist/types/types/agents.d.ts.map +1 -1
- package/dist/types/types/commands.d.ts +2 -1
- package/dist/types/types/commands.d.ts.map +1 -1
- package/dist/types/types/migrations.d.ts +1 -0
- package/dist/types/types/migrations.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/Agents.ts +58 -1
- package/src/api/Migrations.ts +13 -0
- package/src/types/agents.ts +24 -4
- package/src/types/commands.ts +3 -1
- package/src/types/migrations.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.30.8](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/hitl@0.30.7...@or-sdk/hitl@0.30.8) (2022-11-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @or-sdk/hitl
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### [0.30.7](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/hitl@0.30.6...@or-sdk/hitl@0.30.7) (2022-11-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @or-sdk/hitl
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### [0.30.6](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/hitl@0.30.5...@or-sdk/hitl@0.30.6) (2022-11-01)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **hitl:** add table default records creation api ([680d643](https://gitlab.com/onereach/platform/or-sdk-next/commit/680d64327bd4e5a5a07f013ff258dc0f12a9616d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### [0.30.5](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/hitl@0.30.4...@or-sdk/hitl@0.30.5) (2022-10-26)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* **hitl:** add set agent status method for hitl-api ([12d69c9](https://gitlab.com/onereach/platform/or-sdk-next/commit/12d69c9727378ada6bd7cae928e7b56c3dfdcb57))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
### [0.30.4](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/hitl@0.30.3...@or-sdk/hitl@0.30.4) (2022-10-11)
|
|
7
41
|
|
|
8
42
|
|
package/dist/cjs/api/Agents.js
CHANGED
|
@@ -63,6 +63,55 @@ var Agents = (function (_super) {
|
|
|
63
63
|
function Agents() {
|
|
64
64
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
65
65
|
}
|
|
66
|
+
Agents.getAgents = function (options) {
|
|
67
|
+
if (options === void 0) { options = {}; }
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var baseUrl, route, params;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
baseUrl = this.getBaseUrl(options);
|
|
72
|
+
route = new urijs_1.default(baseUrl).segment(this.AGENT_STATUS_URL).href();
|
|
73
|
+
params = lodash_1.default.omit(options, ['version']);
|
|
74
|
+
return [2, this.request({
|
|
75
|
+
route: route,
|
|
76
|
+
params: params,
|
|
77
|
+
})];
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
Agents.updateAgentMeta = function (options) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var baseUrl, route, params, data;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
baseUrl = this.getBaseUrl(options);
|
|
86
|
+
route = new urijs_1.default(baseUrl).segment(this.AGENT_META_URL).href();
|
|
87
|
+
params = lodash_1.default.pick(options, ['agentId']);
|
|
88
|
+
data = lodash_1.default.omit(options, ['version', 'agentId']);
|
|
89
|
+
return [2, this.request({
|
|
90
|
+
method: 'PUT',
|
|
91
|
+
route: route,
|
|
92
|
+
params: params,
|
|
93
|
+
data: data,
|
|
94
|
+
})];
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
Agents.updateAgentRuleGroups = function (options) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var baseUrl, route, params, data;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
baseUrl = this.getBaseUrl(options);
|
|
103
|
+
route = new urijs_1.default(baseUrl).segment(this.AGENT_RULE_GROUPS_URL).href();
|
|
104
|
+
params = lodash_1.default.pick(options, ['agentId']);
|
|
105
|
+
data = lodash_1.default.omit(options, ['version', 'agentId']);
|
|
106
|
+
return [2, this.request({
|
|
107
|
+
method: 'PUT',
|
|
108
|
+
route: route,
|
|
109
|
+
params: params,
|
|
110
|
+
data: data,
|
|
111
|
+
})];
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
66
115
|
Agents.getAgentStatus = function (options) {
|
|
67
116
|
if (options === void 0) { options = {}; }
|
|
68
117
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -113,6 +162,8 @@ var Agents = (function (_super) {
|
|
|
113
162
|
};
|
|
114
163
|
Agents.MODULE_URL = 'agents';
|
|
115
164
|
Agents.AGENT_STATUS_URL = 'agent-status';
|
|
165
|
+
Agents.AGENT_META_URL = 'agents-meta';
|
|
166
|
+
Agents.AGENT_RULE_GROUPS_URL = 'agents-meta/rule-groups';
|
|
116
167
|
Agents.PING_AGENT_STATUS_URL = 'ping-agent-status';
|
|
117
168
|
Agents.SET_AGENT_STATUS_URL = 'status';
|
|
118
169
|
return Agents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AACvB,gDAAwB;
|
|
1
|
+
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AACvB,gDAAwB;AAaxB,uCAAsC;AAEtC;IAA4B,0BAAQ;IAApC;;IA+FA,CAAC;IAvFqB,gBAAS,GAA7B,UACE,OAA8B;QAA9B,wBAAA,EAAA,YAA8B;;;;gBAExB,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACnC,KAAK,GAAG,IAAI,eAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC/D,MAAM,GAAG,gBAAC,CA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AAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;gBAErD,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,MAAM,EAAE,KAAK;wBACb,KAAK,OAAA;wBACL,MAAM,QAAA;wBACN,IAAI,MAAA;qBACL,CAAC,EAAC;;;KACJ;IA7FgB,iBAAU,GAAG,QAAQ,CAAC;IACtB,uBAAgB,GAAG,cAAc,CAAC;IAClC,qBAAc,GAAG,aAAa,CAAC;IAC/B,4BAAqB,GAAG,yBAAyB,CAAC;IAClD,4BAAqB,GAAG,mBAAmB,CAAC;IAC5C,2BAAoB,GAAG,QAAQ,CAAC;IAyFnD,aAAC;CAAA,AA/FD,CAA4B,mBAAQ,GA+FnC;AA/FY,wBAAM"}
|
|
@@ -57,6 +57,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
57
57
|
exports.Migrations = void 0;
|
|
58
58
|
var lodash_1 = __importDefault(require("lodash"));
|
|
59
59
|
var HITLBase_1 = require("./HITLBase");
|
|
60
|
+
var urijs_1 = __importDefault(require("urijs"));
|
|
60
61
|
var Migrations = (function (_super) {
|
|
61
62
|
__extends(Migrations, _super);
|
|
62
63
|
function Migrations() {
|
|
@@ -91,7 +92,21 @@ var Migrations = (function (_super) {
|
|
|
91
92
|
});
|
|
92
93
|
});
|
|
93
94
|
};
|
|
95
|
+
Migrations.createTableDefaultRecords = function () {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
+
var baseUrl, route;
|
|
98
|
+
return __generator(this, function (_a) {
|
|
99
|
+
baseUrl = this.getBaseUrl({});
|
|
100
|
+
route = new urijs_1.default(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
101
|
+
return [2, this.request({
|
|
102
|
+
route: route,
|
|
103
|
+
method: 'POST',
|
|
104
|
+
})];
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
94
108
|
Migrations.MODULE_URL = 'migrations';
|
|
109
|
+
Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
95
110
|
return Migrations;
|
|
96
111
|
}(HITLBase_1.HITLBase));
|
|
97
112
|
exports.Migrations = Migrations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;
|
|
1
|
+
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AAQvB,uCAAsC;AACtC,gDAAwB;AAExB;IAAgC,8BAAQ;IAAxC;;IAsCA,CAAC;IAlCqB,8BAAmB,GAAvC,UACE,OAAkC;QAAlC,wBAAA,EAAA,YAAkC;;;;gBAE5B,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;gBAE/C,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,QAAA;qBACP,CAAC,EAAC;;;KACJ;IAEmB,2BAAgB,GAApC,UACE,OAAkC;QAAlC,wBAAA,EAAA,YAAkC;;;;gBAE5B,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;gBAEjE,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,EAAE,MAAM;wBACd,MAAM,QAAA;qBACP,CAAC,EAAC;;;KACJ;IAEmB,oCAAyB,GAA7C;;;;gBACQ,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;gBAC9B,KAAK,GAAG,IAAI,eAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAC;gBAE/E,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,OAAA;wBACL,MAAM,EAAE,MAAM;qBACf,CAAC,EAAC;;;KACJ;IApCyB,qBAAU,GAAG,YAAY,CAAC;IACnC,qCAA0B,GAAG,iBAAiB,CAAC;IAoClE,iBAAC;CAAA,AAtCD,CAAgC,mBAAQ,GAsCvC;AAtCY,gCAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":";;;AAAA,2DAAoG;AAiC3F,6FAjCoB,6BAAY,OAiCpB;AAAE,uGAjCoB,uCAAsB,OAiCpB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMANDS = void 0;
|
|
4
|
+
var types_hitl_api_1 = require("@onereach/types-hitl-api");
|
|
5
|
+
Object.defineProperty(exports, "COMMANDS", { enumerable: true, get: function () { return types_hitl_api_1.COMMANDS; } });
|
|
3
6
|
//# sourceMappingURL=commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":";;;AAAA,2DAA8D;AAQrD,yFARU,yBAAQ,OAQV"}
|
package/dist/esm/api/Agents.js
CHANGED
|
@@ -11,6 +11,45 @@ import _ from 'lodash';
|
|
|
11
11
|
import URI from 'urijs';
|
|
12
12
|
import { HITLBase } from './HITLBase';
|
|
13
13
|
export class Agents extends HITLBase {
|
|
14
|
+
static getAgents(options = {}) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const baseUrl = this.getBaseUrl(options);
|
|
17
|
+
const route = new URI(baseUrl).segment(this.AGENT_STATUS_URL).href();
|
|
18
|
+
const params = _.omit(options, ['version']);
|
|
19
|
+
return this.request({
|
|
20
|
+
route,
|
|
21
|
+
params,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static updateAgentMeta(options) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const baseUrl = this.getBaseUrl(options);
|
|
28
|
+
const route = new URI(baseUrl).segment(this.AGENT_META_URL).href();
|
|
29
|
+
const params = _.pick(options, ['agentId']);
|
|
30
|
+
const data = _.omit(options, ['version', 'agentId']);
|
|
31
|
+
return this.request({
|
|
32
|
+
method: 'PUT',
|
|
33
|
+
route,
|
|
34
|
+
params,
|
|
35
|
+
data,
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static updateAgentRuleGroups(options) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const baseUrl = this.getBaseUrl(options);
|
|
42
|
+
const route = new URI(baseUrl).segment(this.AGENT_RULE_GROUPS_URL).href();
|
|
43
|
+
const params = _.pick(options, ['agentId']);
|
|
44
|
+
const data = _.omit(options, ['version', 'agentId']);
|
|
45
|
+
return this.request({
|
|
46
|
+
method: 'PUT',
|
|
47
|
+
route,
|
|
48
|
+
params,
|
|
49
|
+
data,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
14
53
|
static getAgentStatus(options = {}) {
|
|
15
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
55
|
const baseUrl = this.getBaseUrl(options);
|
|
@@ -51,6 +90,8 @@ export class Agents extends HITLBase {
|
|
|
51
90
|
}
|
|
52
91
|
Agents.MODULE_URL = 'agents';
|
|
53
92
|
Agents.AGENT_STATUS_URL = 'agent-status';
|
|
93
|
+
Agents.AGENT_META_URL = 'agents-meta';
|
|
94
|
+
Agents.AGENT_RULE_GROUPS_URL = 'agents-meta/rule-groups';
|
|
54
95
|
Agents.PING_AGENT_STATUS_URL = 'ping-agent-status';
|
|
55
96
|
Agents.SET_AGENT_STATUS_URL = 'status';
|
|
56
97
|
//# sourceMappingURL=Agents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,GAAG,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,GAAG,MAAM,OAAO,CAAC;AAaxB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,OAAO,MAAO,SAAQ,QAAQ;IAQ3B,MAAM,CAAO,SAAS,CAC3B,UAA4B,EAAE;;YAE9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACzC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;YACrE,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,KAAK;gBACL,MAAM;aACP,CAAC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MAAM,EAAE,KAAK;gBACb,KAAK;gBACL,MAAM;gBACN,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;;AA7FgB,iBAAU,GAAG,QAAQ,CAAC;AACtB,uBAAgB,GAAG,cAAc,CAAC;AAClC,qBAAc,GAAG,aAAa,CAAC;AAC/B,4BAAqB,GAAG,yBAAyB,CAAC;AAClD,4BAAqB,GAAG,mBAAmB,CAAC;AAC5C,2BAAoB,GAAG,QAAQ,CAAC"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import _ from 'lodash';
|
|
11
11
|
import { HITLBase } from './HITLBase';
|
|
12
|
+
import URI from 'urijs';
|
|
12
13
|
export class Migrations extends HITLBase {
|
|
13
14
|
static getListOfMigrations(options = {}) {
|
|
14
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -31,6 +32,17 @@ export class Migrations extends HITLBase {
|
|
|
31
32
|
});
|
|
32
33
|
});
|
|
33
34
|
}
|
|
35
|
+
static createTableDefaultRecords() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const baseUrl = this.getBaseUrl({});
|
|
38
|
+
const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
39
|
+
return this.request({
|
|
40
|
+
route,
|
|
41
|
+
method: 'POST',
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
34
45
|
}
|
|
35
46
|
Migrations.MODULE_URL = 'migrations';
|
|
47
|
+
Migrations.CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
36
48
|
//# sourceMappingURL=Migrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.js","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"Mig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AC;AACnC,qCAA0B,GAAG,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAiCpG,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { GetAgentStatusResponse, AgentStatusOptions, SetAgentStatusOptions } from '../types/agents';
|
|
1
|
+
import { GetAgentStatusResponse, AgentStatusOptions, SetAgentStatusOptions, GetAgentsOptions, GetAgentsResponse, UpdateAgentMetaOptions, UpdateAgentMetaResponse, UpdateAgentRuleGroupsOptions, UpdateAgentRuleGroupsResponse } from '../types/agents';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
3
|
export declare class Agents extends HITLBase {
|
|
4
4
|
protected static MODULE_URL: string;
|
|
5
5
|
protected static AGENT_STATUS_URL: string;
|
|
6
|
+
protected static AGENT_META_URL: string;
|
|
7
|
+
protected static AGENT_RULE_GROUPS_URL: string;
|
|
6
8
|
protected static PING_AGENT_STATUS_URL: string;
|
|
7
9
|
protected static SET_AGENT_STATUS_URL: string;
|
|
10
|
+
static getAgents(options?: GetAgentsOptions): Promise<GetAgentsResponse>;
|
|
11
|
+
static updateAgentMeta(options: UpdateAgentMetaOptions): Promise<UpdateAgentMetaResponse>;
|
|
12
|
+
static updateAgentRuleGroups(options: UpdateAgentRuleGroupsOptions): Promise<UpdateAgentRuleGroupsResponse>;
|
|
8
13
|
static getAgentStatus(options?: AgentStatusOptions): Promise<GetAgentStatusResponse>;
|
|
9
14
|
static pingAgentStatus(options?: AgentStatusOptions): Promise<GetAgentStatusResponse>;
|
|
10
15
|
static setAgentStatus(options: SetAgentStatusOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.d.ts","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Agents.d.ts","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,MAAO,SAAQ,QAAQ;IAClC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAY;IACvC,SAAS,CAAC,MAAM,CAAC,gBAAgB,SAAkB;IACnD,SAAS,CAAC,MAAM,CAAC,cAAc,SAAiB;IAChD,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAA6B;IACnE,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAAuB;IAC7D,SAAS,CAAC,MAAM,CAAC,oBAAoB,SAAY;WAE7B,SAAS,CAC3B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,iBAAiB,CAAC;WAWT,eAAe,CACjC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,uBAAuB,CAAC;WAcf,qBAAqB,CACvC,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;WAcrB,cAAc,CAChC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;WAWd,eAAe,CACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;WAYd,cAAc,CAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;CAajB"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse } from '../types/migrations';
|
|
1
|
+
import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse, CreateDefaultRecordsResponse } from '../types/migrations';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
3
|
export declare class Migrations extends HITLBase {
|
|
4
4
|
protected static readonly MODULE_URL = "migrations";
|
|
5
|
+
protected static CREATE_DEFAULT_RECORDS_URL: string;
|
|
5
6
|
static getListOfMigrations(options?: GetMigrationsOptions): Promise<GetMigrationsResponse>;
|
|
6
7
|
static runAllMigrations(options?: RunMigrationsOptions): Promise<RunMigrationsResponse>;
|
|
8
|
+
static createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse>;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=Migrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,qBAAa,UAAW,SAAQ,QAAQ;IACtC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IACpD,SAAS,CAAC,MAAM,CAAC,0BAA0B,SAAqB;WAE5C,mBAAmB,CACrC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAUb,gBAAgB,CAClC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;WAWb,yBAAyB,IAAI,OAAO,CAAC,4BAA4B,CAAC;CASvF"}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import { Agents, AGENT_STATUS, AGENT_BROADCAST_EVENTS } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Agents, AgentsMeta, AGENT_STATUS, AGENT_BROADCAST_EVENTS } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
|
+
export declare type Agent = Agents.IAgent;
|
|
4
|
+
export declare type AgentMeta = AgentsMeta.IAgentMeta;
|
|
5
|
+
export declare type GetAgentsResponse = Agents.IGetAgentsResponse;
|
|
6
|
+
export declare type GetAgentsOptions = ApiVersionOptions & NoAccountId<Agents.IGetAgentsOptions>;
|
|
7
|
+
export declare type UpdateAgentMetaResponse = Partial<AgentMeta>;
|
|
8
|
+
export declare type UpdateAgentMetaOptions = ApiVersionOptions & NoAccountId<Agents.IPutAgentMetaOptions>;
|
|
9
|
+
export declare type UpdateAgentRuleGroupsResponse = Partial<AgentMeta>;
|
|
10
|
+
export declare type UpdateAgentRuleGroupsOptions = ApiVersionOptions & NoAccountId<Agents.IPutAgentRuleGroupsOptions>;
|
|
3
11
|
export declare type GetAgentStatusResponse = Agents.IAgentStatus;
|
|
4
12
|
export interface AgentStatusOptions extends ApiVersionOptions {
|
|
5
13
|
readonly agentId?: string;
|
|
6
14
|
}
|
|
7
|
-
export
|
|
15
|
+
export interface SetAgentStatusOptions extends ApiVersionOptions, NoAccountId<Agents.ISetAgentStatusQuery> {
|
|
16
|
+
readonly statusData: {
|
|
17
|
+
readonly status: AGENT_STATUS;
|
|
18
|
+
readonly busyReason?: string;
|
|
19
|
+
};
|
|
20
|
+
readonly notifyStatusChange?: boolean;
|
|
21
|
+
}
|
|
8
22
|
export { AGENT_STATUS, AGENT_BROADCAST_EVENTS };
|
|
9
23
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG1D,oBAAY,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAClC,oBAAY,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC;AAE9C,oBAAY,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC1D,oBAAY,gBAAgB,GAAG,iBAAiB,GAC5C,WAAW,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAE1C,oBAAY,uBAAuB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACzD,oBAAY,sBAAsB,GAAG,iBAAiB,GAClD,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE7C,oBAAY,6BAA6B,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAC/D,oBAAY,4BAA4B,GAAG,iBAAiB,GACxD,WAAW,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAEnD,oBAAY,sBAAsB,GAAG,MAAM,CAAC,YAAY,CAAC;AACzD,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAC9D,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;QAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Commands } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Commands, COMMANDS } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions } from './common';
|
|
3
3
|
export declare type ApplyCommandOptions = ApiVersionOptions & Commands.IApplyCommandQuery & Commands.IApplyCommandBody;
|
|
4
|
+
export { COMMANDS };
|
|
4
5
|
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/types/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,oBAAY,mBAAmB,GAAG,iBAAiB,GAC/C,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,iBAAiB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -4,5 +4,6 @@ export declare type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migra
|
|
|
4
4
|
export declare type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
|
|
5
5
|
export declare type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
|
|
6
6
|
export declare type RunMigrationsResponse = Migrations.IMigrationResult;
|
|
7
|
+
export declare type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
7
8
|
export declare type Migration = Migrations.IMigration;
|
|
8
9
|
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACtE,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAChE,oBAAY,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/types/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACtE,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnG,oBAAY,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAChE,oBAAY,4BAA4B,GAAG,UAAU,CAAC,6BAA6B,CAAC;AACpF,oBAAY,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/hitl",
|
|
3
|
-
"version": "0.31.0-beta.
|
|
3
|
+
"version": "0.31.0-beta.760.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dev": "pnpm build:watch:esm"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@onereach/types-hitl-api": "^0.0.
|
|
21
|
-
"@or-sdk/base": "^0.
|
|
20
|
+
"@onereach/types-hitl-api": "^0.0.35-rc.2",
|
|
21
|
+
"@or-sdk/base": "^0.27.0",
|
|
22
22
|
"@types/lodash": "^4.14.186",
|
|
23
23
|
"@types/urijs": "^1.19.18",
|
|
24
24
|
"urijs": "^1.19.8"
|
package/src/api/Agents.ts
CHANGED
|
@@ -1,15 +1,72 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import URI from 'urijs';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
GetAgentStatusResponse,
|
|
6
|
+
AgentStatusOptions,
|
|
7
|
+
SetAgentStatusOptions,
|
|
8
|
+
GetAgentsOptions,
|
|
9
|
+
GetAgentsResponse,
|
|
10
|
+
UpdateAgentMetaOptions,
|
|
11
|
+
UpdateAgentMetaResponse,
|
|
12
|
+
UpdateAgentRuleGroupsOptions,
|
|
13
|
+
UpdateAgentRuleGroupsResponse,
|
|
14
|
+
} from '../types/agents';
|
|
5
15
|
import { HITLBase } from './HITLBase';
|
|
6
16
|
|
|
7
17
|
export class Agents extends HITLBase {
|
|
8
18
|
protected static MODULE_URL = 'agents';
|
|
9
19
|
protected static AGENT_STATUS_URL = 'agent-status';
|
|
20
|
+
protected static AGENT_META_URL = 'agents-meta';
|
|
21
|
+
protected static AGENT_RULE_GROUPS_URL = 'agents-meta/rule-groups';
|
|
10
22
|
protected static PING_AGENT_STATUS_URL = 'ping-agent-status';
|
|
11
23
|
protected static SET_AGENT_STATUS_URL = 'status';
|
|
12
24
|
|
|
25
|
+
public static async getAgents(
|
|
26
|
+
options: GetAgentsOptions = {}
|
|
27
|
+
): Promise<GetAgentsResponse> {
|
|
28
|
+
const baseUrl = this.getBaseUrl(options);
|
|
29
|
+
const route = new URI(baseUrl).segment(this.AGENT_STATUS_URL).href();
|
|
30
|
+
const params = _.omit(options, ['version']);
|
|
31
|
+
|
|
32
|
+
return this.request({
|
|
33
|
+
route,
|
|
34
|
+
params,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public static async updateAgentMeta(
|
|
39
|
+
options: UpdateAgentMetaOptions
|
|
40
|
+
): Promise<UpdateAgentMetaResponse> {
|
|
41
|
+
const baseUrl = this.getBaseUrl(options);
|
|
42
|
+
const route = new URI(baseUrl).segment(this.AGENT_META_URL).href();
|
|
43
|
+
const params = _.pick(options, ['agentId']);
|
|
44
|
+
const data = _.omit(options, ['version', 'agentId']);
|
|
45
|
+
|
|
46
|
+
return this.request({
|
|
47
|
+
method: 'PUT',
|
|
48
|
+
route,
|
|
49
|
+
params,
|
|
50
|
+
data,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public static async updateAgentRuleGroups(
|
|
55
|
+
options: UpdateAgentRuleGroupsOptions
|
|
56
|
+
): Promise<UpdateAgentRuleGroupsResponse> {
|
|
57
|
+
const baseUrl = this.getBaseUrl(options);
|
|
58
|
+
const route = new URI(baseUrl).segment(this.AGENT_RULE_GROUPS_URL).href();
|
|
59
|
+
const params = _.pick(options, ['agentId']);
|
|
60
|
+
const data = _.omit(options, ['version', 'agentId']);
|
|
61
|
+
|
|
62
|
+
return this.request({
|
|
63
|
+
method: 'PUT',
|
|
64
|
+
route,
|
|
65
|
+
params,
|
|
66
|
+
data,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
13
70
|
public static async getAgentStatus(
|
|
14
71
|
options: AgentStatusOptions = {}
|
|
15
72
|
): Promise<GetAgentStatusResponse> {
|
package/src/api/Migrations.ts
CHANGED
|
@@ -4,11 +4,14 @@ import {
|
|
|
4
4
|
GetMigrationsResponse,
|
|
5
5
|
RunMigrationsOptions,
|
|
6
6
|
RunMigrationsResponse,
|
|
7
|
+
CreateDefaultRecordsResponse,
|
|
7
8
|
} from '../types/migrations';
|
|
8
9
|
import { HITLBase } from './HITLBase';
|
|
10
|
+
import URI from 'urijs';
|
|
9
11
|
|
|
10
12
|
export class Migrations extends HITLBase {
|
|
11
13
|
protected static readonly MODULE_URL = 'migrations';
|
|
14
|
+
protected static CREATE_DEFAULT_RECORDS_URL = 'default-records';
|
|
12
15
|
|
|
13
16
|
public static async getListOfMigrations(
|
|
14
17
|
options: GetMigrationsOptions = {}
|
|
@@ -34,4 +37,14 @@ export class Migrations extends HITLBase {
|
|
|
34
37
|
params,
|
|
35
38
|
});
|
|
36
39
|
}
|
|
40
|
+
|
|
41
|
+
public static async createTableDefaultRecords(): Promise<CreateDefaultRecordsResponse> {
|
|
42
|
+
const baseUrl = this.getBaseUrl({});
|
|
43
|
+
const route = new URI(baseUrl).segment(this.CREATE_DEFAULT_RECORDS_URL).href();
|
|
44
|
+
|
|
45
|
+
return this.request({
|
|
46
|
+
route,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
37
50
|
}
|
package/src/types/agents.ts
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
import { Agents, AGENT_STATUS, AGENT_BROADCAST_EVENTS } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Agents, AgentsMeta, AGENT_STATUS, AGENT_BROADCAST_EVENTS } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/indent */
|
|
5
|
+
export type Agent = Agents.IAgent;
|
|
6
|
+
export type AgentMeta = AgentsMeta.IAgentMeta;
|
|
7
|
+
|
|
8
|
+
export type GetAgentsResponse = Agents.IGetAgentsResponse;
|
|
9
|
+
export type GetAgentsOptions = ApiVersionOptions
|
|
10
|
+
& NoAccountId<Agents.IGetAgentsOptions>;
|
|
11
|
+
|
|
12
|
+
export type UpdateAgentMetaResponse = Partial<AgentMeta>;
|
|
13
|
+
export type UpdateAgentMetaOptions = ApiVersionOptions
|
|
14
|
+
& NoAccountId<Agents.IPutAgentMetaOptions>;
|
|
15
|
+
|
|
16
|
+
export type UpdateAgentRuleGroupsResponse = Partial<AgentMeta>;
|
|
17
|
+
export type UpdateAgentRuleGroupsOptions = ApiVersionOptions
|
|
18
|
+
& NoAccountId<Agents.IPutAgentRuleGroupsOptions>;
|
|
19
|
+
|
|
5
20
|
export type GetAgentStatusResponse = Agents.IAgentStatus;
|
|
6
21
|
export interface AgentStatusOptions extends ApiVersionOptions {
|
|
7
22
|
readonly agentId?: string;
|
|
8
23
|
}
|
|
9
24
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
export interface SetAgentStatusOptions extends ApiVersionOptions,
|
|
26
|
+
NoAccountId<Agents.ISetAgentStatusQuery> {
|
|
27
|
+
readonly statusData: {
|
|
28
|
+
readonly status: AGENT_STATUS;
|
|
29
|
+
readonly busyReason?: string;
|
|
30
|
+
};
|
|
31
|
+
readonly notifyStatusChange?: boolean;
|
|
32
|
+
}
|
|
13
33
|
|
|
14
34
|
export { AGENT_STATUS, AGENT_BROADCAST_EVENTS };
|
package/src/types/commands.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Commands } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Commands, COMMANDS } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions } from './common';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/indent */
|
|
5
5
|
export type ApplyCommandOptions = ApiVersionOptions
|
|
6
6
|
& Commands.IApplyCommandQuery
|
|
7
7
|
& Commands.IApplyCommandBody;
|
|
8
|
+
|
|
9
|
+
export { COMMANDS };
|
package/src/types/migrations.ts
CHANGED
|
@@ -5,4 +5,5 @@ export type GetMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IG
|
|
|
5
5
|
export type GetMigrationsResponse = Migrations.IGetMigrationsResponse;
|
|
6
6
|
export type RunMigrationsOptions = ApiVersionOptions & NoAccountId<Migrations.IRunMigrationsQuery>;
|
|
7
7
|
export type RunMigrationsResponse = Migrations.IMigrationResult;
|
|
8
|
+
export type CreateDefaultRecordsResponse = Migrations.ICreateDefaultRecordsResponse;
|
|
8
9
|
export type Migration = Migrations.IMigration;
|