@or-sdk/deployments 1.2.5 → 1.2.6-next.664.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/README.md +1 -1
- package/dist/cjs/Deployments.js +57 -126
- package/dist/cjs/Deployments.js.map +1 -1
- package/dist/cjs/constants.js +3 -15
- package/dist/cjs/constants.js.map +1 -1
- package/dist/esm/Deployments.js +39 -99
- package/dist/esm/Deployments.js.map +1 -1
- package/dist/esm/constants.js +1 -57
- package/dist/esm/constants.js.map +1 -1
- package/dist/types/Deployments.d.ts +6 -6
- package/dist/types/Deployments.d.ts.map +1 -1
- package/dist/types/constants.d.ts +1 -7
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +17 -3
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/Deployments.ts +50 -144
- package/src/constants.ts +1 -63
- package/src/types.ts +21 -4
- package/dist/cjs/utils/getDeleteQuery.js +0 -12
- package/dist/cjs/utils/getDeleteQuery.js.map +0 -1
- package/dist/cjs/utils/getGetQuery.js +0 -12
- package/dist/cjs/utils/getGetQuery.js.map +0 -1
- package/dist/cjs/utils/getListQuery.js +0 -12
- package/dist/cjs/utils/getListQuery.js.map +0 -1
- package/dist/cjs/utils/index.js +0 -13
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/esm/utils/getDeleteQuery.js +0 -17
- package/dist/esm/utils/getDeleteQuery.js.map +0 -1
- package/dist/esm/utils/getGetQuery.js +0 -20
- package/dist/esm/utils/getGetQuery.js.map +0 -1
- package/dist/esm/utils/getListQuery.js +0 -25
- package/dist/esm/utils/getListQuery.js.map +0 -1
- package/dist/esm/utils/index.js +0 -4
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/types/utils/getDeleteQuery.d.ts +0 -6
- package/dist/types/utils/getDeleteQuery.d.ts.map +0 -1
- package/dist/types/utils/getGetQuery.d.ts +0 -6
- package/dist/types/utils/getGetQuery.d.ts.map +0 -1
- package/dist/types/utils/getListQuery.d.ts +0 -6
- package/dist/types/utils/getListQuery.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/index.d.ts.map +0 -1
- package/src/utils/getDeleteQuery.ts +0 -18
- package/src/utils/getGetQuery.ts +0 -21
- package/src/utils/getListQuery.ts +0 -26
- package/src/utils/index.ts +0 -7
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ import { Deployments } from '@or-sdk/deployments'
|
|
|
10
10
|
// with direct api url
|
|
11
11
|
const deployments = new Deployments({
|
|
12
12
|
token: 'my-account-token-string',
|
|
13
|
-
|
|
13
|
+
dataHubSvcUrl: 'http://example.data-hub-svc/endpoint'
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
// with service discovery(slower)
|
package/dist/cjs/Deployments.js
CHANGED
|
@@ -48,49 +48,40 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.Deployments = void 0;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var utils_1 = require("./utils");
|
|
51
|
+
var base_1 = require("@or-sdk/base");
|
|
52
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
54
53
|
var Deployments = (function () {
|
|
55
54
|
function Deployments(params) {
|
|
56
|
-
var token = params.token, discoveryUrl = params.discoveryUrl, accountId = params.accountId,
|
|
57
|
-
this.
|
|
55
|
+
var token = params.token, discoveryUrl = params.discoveryUrl, accountId = params.accountId, dataHubSvcUrl = params.dataHubSvcUrl;
|
|
56
|
+
this.dataHubSvc = new data_hub_svc_1.DataHubSvc({
|
|
58
57
|
token: token,
|
|
59
58
|
discoveryUrl: discoveryUrl,
|
|
60
59
|
accountId: accountId,
|
|
61
|
-
|
|
60
|
+
dataHubSvcUrl: dataHubSvcUrl,
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
|
-
Deployments.prototype.listDeployments = function (
|
|
65
|
-
|
|
63
|
+
Deployments.prototype.listDeployments = function (params, paginationOptions) {
|
|
64
|
+
if (params === void 0) { params = {}; }
|
|
65
|
+
if (paginationOptions === void 0) { paginationOptions = {}; }
|
|
66
66
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
var
|
|
68
|
-
return __generator(this, function (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.LIST);
|
|
80
|
-
data = {
|
|
81
|
-
operationName: operationName,
|
|
82
|
-
query: (0, utils_1.getListQuery)({
|
|
83
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
84
|
-
projection: projection,
|
|
85
|
-
}),
|
|
86
|
-
variables: variables,
|
|
87
|
-
};
|
|
88
|
-
return [2, this.dataHub.getFullList('POST', '/graphql', data)];
|
|
67
|
+
var result;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
71
|
+
method: 'GET',
|
|
72
|
+
route: 'deployments',
|
|
73
|
+
params: __assign(__assign(__assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
74
|
+
})];
|
|
75
|
+
case 1:
|
|
76
|
+
result = _a.sent();
|
|
77
|
+
return [2, (0, base_1.makeList)(result)];
|
|
78
|
+
}
|
|
89
79
|
});
|
|
90
80
|
});
|
|
91
81
|
};
|
|
92
|
-
Deployments.prototype.listActiveDeployments = function (projection) {
|
|
82
|
+
Deployments.prototype.listActiveDeployments = function (projection, paginationOptions) {
|
|
93
83
|
if (projection === void 0) { projection = []; }
|
|
84
|
+
if (paginationOptions === void 0) { paginationOptions = {}; }
|
|
94
85
|
return __awaiter(this, void 0, void 0, function () {
|
|
95
86
|
return __generator(this, function (_a) {
|
|
96
87
|
return [2, this.listDeployments({
|
|
@@ -98,7 +89,7 @@ var Deployments = (function () {
|
|
|
98
89
|
dateDeactivated: 0,
|
|
99
90
|
},
|
|
100
91
|
projection: projection,
|
|
101
|
-
})];
|
|
92
|
+
}, paginationOptions)];
|
|
102
93
|
});
|
|
103
94
|
});
|
|
104
95
|
};
|
|
@@ -156,132 +147,72 @@ var Deployments = (function () {
|
|
|
156
147
|
});
|
|
157
148
|
});
|
|
158
149
|
};
|
|
159
|
-
Deployments.prototype.getDeployment = function (
|
|
160
|
-
if (
|
|
150
|
+
Deployments.prototype.getDeployment = function (id, params) {
|
|
151
|
+
if (params === void 0) { params = {}; }
|
|
161
152
|
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var variables, operationName, data, result;
|
|
163
153
|
return __generator(this, function (_a) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.GET);
|
|
170
|
-
data = {
|
|
171
|
-
operationName: operationName,
|
|
172
|
-
query: (0, utils_1.getGetQuery)({
|
|
173
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
174
|
-
projection: projection,
|
|
175
|
-
}),
|
|
176
|
-
variables: variables,
|
|
177
|
-
};
|
|
178
|
-
return [4, this.dataHub.makeRequest({
|
|
179
|
-
method: 'POST',
|
|
180
|
-
route: '/graphql',
|
|
181
|
-
data: data,
|
|
182
|
-
})];
|
|
183
|
-
case 1:
|
|
184
|
-
result = _a.sent();
|
|
185
|
-
return [2, result.data[operationName]];
|
|
186
|
-
}
|
|
154
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
155
|
+
method: 'GET',
|
|
156
|
+
route: "deployments/".concat(id),
|
|
157
|
+
params: __assign(__assign({}, Array.isArray(params) ? { projection: params } : params), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
158
|
+
})];
|
|
187
159
|
});
|
|
188
160
|
});
|
|
189
161
|
};
|
|
190
|
-
Deployments.prototype.deleteDeployment = function (
|
|
191
|
-
if (projection === void 0) { projection = []; }
|
|
162
|
+
Deployments.prototype.deleteDeployment = function (id) {
|
|
192
163
|
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
-
var variables, operationName, data, result;
|
|
194
164
|
return __generator(this, function (_a) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
variables = {
|
|
201
|
-
entity: constants_1.ENTITY_NAME,
|
|
202
|
-
data: {
|
|
203
|
-
id: deploymentId,
|
|
204
|
-
},
|
|
205
|
-
};
|
|
206
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.DELETE);
|
|
207
|
-
data = {
|
|
208
|
-
operationName: operationName,
|
|
209
|
-
query: (0, utils_1.getDeleteQuery)({
|
|
210
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
211
|
-
projection: projection,
|
|
212
|
-
}),
|
|
213
|
-
variables: variables,
|
|
214
|
-
};
|
|
215
|
-
return [4, this.dataHub.makeRequest({
|
|
216
|
-
method: 'POST',
|
|
217
|
-
route: '/graphql',
|
|
218
|
-
data: data,
|
|
219
|
-
})];
|
|
220
|
-
case 1:
|
|
221
|
-
result = _a.sent();
|
|
222
|
-
return [2, result.data[operationName]];
|
|
223
|
-
}
|
|
165
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
166
|
+
method: 'DELETE',
|
|
167
|
+
route: "deployments/".concat(id),
|
|
168
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
169
|
+
})];
|
|
224
170
|
});
|
|
225
171
|
});
|
|
226
172
|
};
|
|
227
173
|
Deployments.prototype.saveDeployment = function (source) {
|
|
228
174
|
return __awaiter(this, void 0, void 0, function () {
|
|
229
175
|
return __generator(this, function (_a) {
|
|
230
|
-
return [2, source.id ? this.updateDeployment(source) : this.createDeployment(source)];
|
|
176
|
+
return [2, (source.id && source.id !== 'new') ? this.updateDeployment(source) : this.createDeployment(source)];
|
|
231
177
|
});
|
|
232
178
|
});
|
|
233
179
|
};
|
|
234
180
|
Deployments.prototype.createDeployment = function (source) {
|
|
235
181
|
return __awaiter(this, void 0, void 0, function () {
|
|
236
|
-
var
|
|
182
|
+
var result;
|
|
237
183
|
return __generator(this, function (_a) {
|
|
238
184
|
switch (_a.label) {
|
|
239
|
-
case 0:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
variables: variables,
|
|
248
|
-
};
|
|
249
|
-
return [4, this.dataHub.makeRequest({
|
|
250
|
-
method: 'POST',
|
|
251
|
-
route: '/graphql',
|
|
252
|
-
data: data,
|
|
253
|
-
})];
|
|
185
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
186
|
+
method: 'POST',
|
|
187
|
+
route: 'deployments/new',
|
|
188
|
+
data: {
|
|
189
|
+
deployment: __assign(__assign({}, source), { id: 'new' }),
|
|
190
|
+
},
|
|
191
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
192
|
+
})];
|
|
254
193
|
case 1:
|
|
255
194
|
result = _a.sent();
|
|
256
|
-
return [2, result
|
|
195
|
+
return [2, (0, data_hub_svc_1.setDiff)(source, result)];
|
|
257
196
|
}
|
|
258
197
|
});
|
|
259
198
|
});
|
|
260
199
|
};
|
|
261
200
|
Deployments.prototype.updateDeployment = function (source) {
|
|
262
201
|
return __awaiter(this, void 0, void 0, function () {
|
|
263
|
-
var
|
|
202
|
+
var result;
|
|
264
203
|
return __generator(this, function (_a) {
|
|
265
204
|
switch (_a.label) {
|
|
266
|
-
case 0:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
query: this.dataHub.isCrossAccount ? constants_1.QUERY_UPDATE_CROSSACCOUNT : constants_1.QUERY_UPDATE,
|
|
275
|
-
variables: variables,
|
|
276
|
-
};
|
|
277
|
-
return [4, this.dataHub.makeRequest({
|
|
278
|
-
method: 'POST',
|
|
279
|
-
route: '/graphql',
|
|
280
|
-
data: data,
|
|
281
|
-
})];
|
|
205
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
206
|
+
method: 'POST',
|
|
207
|
+
route: "deployments/".concat(source.id),
|
|
208
|
+
data: {
|
|
209
|
+
deployment: source,
|
|
210
|
+
},
|
|
211
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
212
|
+
})];
|
|
282
213
|
case 1:
|
|
283
214
|
result = _a.sent();
|
|
284
|
-
return [2, result
|
|
215
|
+
return [2, (0, data_hub_svc_1.setDiff)(source, result)];
|
|
285
216
|
}
|
|
286
217
|
});
|
|
287
218
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deployments.js","sourceRoot":"","sources":["../../src/Deployments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Deployments.js","sourceRoot":"","sources":["../../src/Deployments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8C;AAC9C,qDAA2D;AAG3D;IAGE,qBAAY,MAAyB;QAC3B,IAAA,KAAK,GAA6C,MAAM,MAAnD,EAAE,YAAY,GAA+B,MAAM,aAArC,EAAE,SAAS,GAAoB,MAAM,UAA1B,EAAE,aAAa,GAAK,MAAM,cAAX,CAAY;QAEjE,IAAI,CAAC,UAAU,GAAG,IAAI,yBAAU,CAAC;YAC/B,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,aAAa,eAAA;SACd,CAAC,CAAC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,CAAC,AAxMD,IAwMC;AAxMY,kCAAW"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
exports.DEFAULT_PROJECTION_LIST = [
|
|
7
|
-
'id',
|
|
8
|
-
'data',
|
|
9
|
-
'botId',
|
|
10
|
-
'flowId',
|
|
11
|
-
'dateDeactivated',
|
|
12
|
-
];
|
|
13
|
-
exports.QUERY_CREATE = "mutation create($entity: EntityType!, $data: CreateInput!) {\n create(entity: $entity, data: $data) {\n ... on Deployment {\n id\n data\n botId\n flowId\n dateDeactivated\n }\n }\n}\n";
|
|
14
|
-
exports.QUERY_CREATE_CROSSACCOUNT = "mutation createCrossAccount($entity: EntityType!, $data: CreateInput!, $accountId: String!) {\n createCrossAccount(entity: $entity, data: $data, accountId: $accountId) {\n ... on Deployment {\n id\n data\n botId\n flowId\n dateDeactivated\n }\n }\n}\n";
|
|
15
|
-
exports.QUERY_UPDATE = "mutation update($entity: EntityType!, $data: UpdateInput!) {\n update(entity: $entity, data: $data) {\n ... on Deployment {\n id\n data\n botId\n flowId\n dateDeactivated\n }\n }\n}\n";
|
|
16
|
-
exports.QUERY_UPDATE_CROSSACCOUNT = "mutation updateCrossAccount($entity: EntityType!, $data: UpdateInput!, $accountId: String!) {\n updateCrossAccount(entity: $entity, data: $data, accountId: $accountId) {\n ... on Deployment {\n id\n data\n botId\n flowId\n dateDeactivated\n }\n }\n}\n";
|
|
17
|
-
exports.ENTITY_NAME = 'DEPLOYMENT';
|
|
3
|
+
exports.DATA_HUB_SVC_SERVICE_KEY = void 0;
|
|
4
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
5
|
+
Object.defineProperty(exports, "DATA_HUB_SVC_SERVICE_KEY", { enumerable: true, get: function () { return data_hub_svc_1.DATA_HUB_SVC_SERVICE_KEY; } });
|
|
18
6
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,qDAAgE;AAAvD,wHAAA,wBAAwB,OAAA"}
|
package/dist/esm/Deployments.js
CHANGED
|
@@ -7,51 +7,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { getGetQuery, getListQuery, getDeleteQuery } from './utils';
|
|
10
|
+
import { makeList } from '@or-sdk/base';
|
|
11
|
+
import { DataHubSvc, setDiff } from '@or-sdk/data-hub-svc';
|
|
13
12
|
export class Deployments {
|
|
14
13
|
constructor(params) {
|
|
15
|
-
const { token, discoveryUrl, accountId,
|
|
16
|
-
this.
|
|
14
|
+
const { token, discoveryUrl, accountId, dataHubSvcUrl } = params;
|
|
15
|
+
this.dataHubSvc = new DataHubSvc({
|
|
17
16
|
token,
|
|
18
17
|
discoveryUrl,
|
|
19
18
|
accountId,
|
|
20
|
-
|
|
19
|
+
dataHubSvcUrl,
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
|
-
listDeployments(
|
|
22
|
+
listDeployments(params = {}, paginationOptions = {}) {
|
|
24
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
queryParams: Array.isArray(query.id) ? Object.assign(Object.assign({}, query), { id: query.id.join(',') }) :
|
|
32
|
-
query,
|
|
33
|
-
limit: 30,
|
|
34
|
-
} }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : { sandbox: false });
|
|
35
|
-
const operationName = this.dataHub.getOperationName(OperationNames.LIST);
|
|
36
|
-
const data = {
|
|
37
|
-
operationName,
|
|
38
|
-
query: getListQuery({
|
|
39
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
40
|
-
projection,
|
|
41
|
-
}),
|
|
42
|
-
variables,
|
|
43
|
-
};
|
|
44
|
-
return this.dataHub.getFullList('POST', '/graphql', data);
|
|
24
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
route: 'deployments',
|
|
27
|
+
params: Object.assign(Object.assign(Object.assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
28
|
+
});
|
|
29
|
+
return makeList(result);
|
|
45
30
|
});
|
|
46
31
|
}
|
|
47
|
-
listActiveDeployments(projection = []) {
|
|
32
|
+
listActiveDeployments(projection = [], paginationOptions = {}) {
|
|
48
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
34
|
return this.listDeployments({
|
|
50
35
|
query: {
|
|
51
36
|
dateDeactivated: 0,
|
|
52
37
|
},
|
|
53
38
|
projection,
|
|
54
|
-
});
|
|
39
|
+
}, paginationOptions);
|
|
55
40
|
});
|
|
56
41
|
}
|
|
57
42
|
listDeploymentsByBotId(botId, projection = []) {
|
|
@@ -96,98 +81,53 @@ export class Deployments {
|
|
|
96
81
|
});
|
|
97
82
|
});
|
|
98
83
|
}
|
|
99
|
-
getDeployment(
|
|
84
|
+
getDeployment(id, params = {}) {
|
|
100
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const data = {
|
|
106
|
-
operationName,
|
|
107
|
-
query: getGetQuery({
|
|
108
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
109
|
-
projection,
|
|
110
|
-
}),
|
|
111
|
-
variables,
|
|
112
|
-
};
|
|
113
|
-
const result = yield this.dataHub.makeRequest({
|
|
114
|
-
method: 'POST',
|
|
115
|
-
route: '/graphql',
|
|
116
|
-
data,
|
|
86
|
+
return this.dataHubSvc.makeRequest({
|
|
87
|
+
method: 'GET',
|
|
88
|
+
route: `deployments/${id}`,
|
|
89
|
+
params: Object.assign(Object.assign({}, Array.isArray(params) ? { projection: params } : params), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
117
90
|
});
|
|
118
|
-
return result.data[operationName];
|
|
119
91
|
});
|
|
120
92
|
}
|
|
121
|
-
deleteDeployment(
|
|
93
|
+
deleteDeployment(id) {
|
|
122
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
entity: ENTITY_NAME,
|
|
128
|
-
data: {
|
|
129
|
-
id: deploymentId,
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
const operationName = this.dataHub.getOperationName(OperationNames.DELETE);
|
|
133
|
-
const data = {
|
|
134
|
-
operationName,
|
|
135
|
-
query: getDeleteQuery({
|
|
136
|
-
crossAccount: this.dataHub.isCrossAccount,
|
|
137
|
-
projection,
|
|
138
|
-
}),
|
|
139
|
-
variables,
|
|
140
|
-
};
|
|
141
|
-
const result = yield this.dataHub.makeRequest({
|
|
142
|
-
method: 'POST',
|
|
143
|
-
route: '/graphql',
|
|
144
|
-
data,
|
|
95
|
+
return this.dataHubSvc.makeRequest({
|
|
96
|
+
method: 'DELETE',
|
|
97
|
+
route: `deployments/${id}`,
|
|
98
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
145
99
|
});
|
|
146
|
-
return result.data[operationName];
|
|
147
100
|
});
|
|
148
101
|
}
|
|
149
102
|
saveDeployment(source) {
|
|
150
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
return source.id ? this.updateDeployment(source) : this.createDeployment(source);
|
|
104
|
+
return (source.id && source.id !== 'new') ? this.updateDeployment(source) : this.createDeployment(source);
|
|
152
105
|
});
|
|
153
106
|
}
|
|
154
107
|
createDeployment(source) {
|
|
155
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
const
|
|
157
|
-
body: source,
|
|
158
|
-
} }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {});
|
|
159
|
-
const operationName = this.dataHub.getOperationName(OperationNames.CREATE);
|
|
160
|
-
const data = {
|
|
161
|
-
operationName,
|
|
162
|
-
query: this.dataHub.isCrossAccount ? QUERY_CREATE_CROSSACCOUNT : QUERY_CREATE,
|
|
163
|
-
variables,
|
|
164
|
-
};
|
|
165
|
-
const result = yield this.dataHub.makeRequest({
|
|
109
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
166
110
|
method: 'POST',
|
|
167
|
-
route: '/
|
|
168
|
-
data
|
|
111
|
+
route: 'deployments/new',
|
|
112
|
+
data: {
|
|
113
|
+
deployment: Object.assign(Object.assign({}, source), { id: 'new' }),
|
|
114
|
+
},
|
|
115
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
169
116
|
});
|
|
170
|
-
return result
|
|
117
|
+
return setDiff(source, result);
|
|
171
118
|
});
|
|
172
119
|
}
|
|
173
120
|
updateDeployment(source) {
|
|
174
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
const
|
|
176
|
-
id: source.id,
|
|
177
|
-
body: source,
|
|
178
|
-
} }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {});
|
|
179
|
-
const operationName = this.dataHub.getOperationName(OperationNames.UPDATE);
|
|
180
|
-
const data = {
|
|
181
|
-
operationName,
|
|
182
|
-
query: this.dataHub.isCrossAccount ? QUERY_UPDATE_CROSSACCOUNT : QUERY_UPDATE,
|
|
183
|
-
variables,
|
|
184
|
-
};
|
|
185
|
-
const result = yield this.dataHub.makeRequest({
|
|
122
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
186
123
|
method: 'POST',
|
|
187
|
-
route:
|
|
188
|
-
data
|
|
124
|
+
route: `deployments/${source.id}`,
|
|
125
|
+
data: {
|
|
126
|
+
deployment: source,
|
|
127
|
+
},
|
|
128
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
189
129
|
});
|
|
190
|
-
return result
|
|
130
|
+
return setDiff(source, result);
|
|
191
131
|
});
|
|
192
132
|
}
|
|
193
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deployments.js","sourceRoot":"","sources":["../../src/Deployments.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Deployments.js","sourceRoot":"","sources":["../../src/Deployments.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAyB;QACnC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QAEjE,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC;YAC/B,KAAK;YACL,YAAY;YACZ,SAAS;YACT,aAAa;SACd,CAAC,CAAC;IACL,CAAC;IAQY,eAAe,CAAC,SAAgC,EAAE,EAAE,oBAAuC,EAAE;;YACxG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAe;gBAC7D,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,aAAa;gBACpB,MAAM,gDACD,MAAM,GACN,iBAAiB,GAChB,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAA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C1F;aACF,CAAC,CAAC;YAEH,OAAO,OAAO,CAAa,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;KAAA;IAQY,gBAAgB,CAAC,MAAkB;;YAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAkB;gBAChE,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,eAAe,MAAM,CAAC,EAAE,EAAE;gBACjC,IAAI,EAAE;oBACJ,UAAU,EAAE,MAAM;iBACnB;gBACD,MAAM,oBACA,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1F;aACF,CAAC,CAAC;YAEH,OAAO,OAAO,CAAa,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;KAAA;CACF"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,58 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export const DEFAULT_PROJECTION_LIST = [
|
|
3
|
-
'id',
|
|
4
|
-
'data',
|
|
5
|
-
'botId',
|
|
6
|
-
'flowId',
|
|
7
|
-
'dateDeactivated',
|
|
8
|
-
];
|
|
9
|
-
export const QUERY_CREATE = `mutation create($entity: EntityType!, $data: CreateInput!) {
|
|
10
|
-
create(entity: $entity, data: $data) {
|
|
11
|
-
... on Deployment {
|
|
12
|
-
id
|
|
13
|
-
data
|
|
14
|
-
botId
|
|
15
|
-
flowId
|
|
16
|
-
dateDeactivated
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
export const QUERY_CREATE_CROSSACCOUNT = `mutation createCrossAccount($entity: EntityType!, $data: CreateInput!, $accountId: String!) {
|
|
22
|
-
createCrossAccount(entity: $entity, data: $data, accountId: $accountId) {
|
|
23
|
-
... on Deployment {
|
|
24
|
-
id
|
|
25
|
-
data
|
|
26
|
-
botId
|
|
27
|
-
flowId
|
|
28
|
-
dateDeactivated
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
export const QUERY_UPDATE = `mutation update($entity: EntityType!, $data: UpdateInput!) {
|
|
34
|
-
update(entity: $entity, data: $data) {
|
|
35
|
-
... on Deployment {
|
|
36
|
-
id
|
|
37
|
-
data
|
|
38
|
-
botId
|
|
39
|
-
flowId
|
|
40
|
-
dateDeactivated
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
export const QUERY_UPDATE_CROSSACCOUNT = `mutation updateCrossAccount($entity: EntityType!, $data: UpdateInput!, $accountId: String!) {
|
|
46
|
-
updateCrossAccount(entity: $entity, data: $data, accountId: $accountId) {
|
|
47
|
-
... on Deployment {
|
|
48
|
-
id
|
|
49
|
-
data
|
|
50
|
-
botId
|
|
51
|
-
flowId
|
|
52
|
-
dateDeactivated
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
export const ENTITY_NAME = 'DEPLOYMENT';
|
|
1
|
+
export { DATA_HUB_SVC_SERVICE_KEY } from '@or-sdk/data-hub-svc';
|
|
58
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { List } from '@or-sdk/base';
|
|
2
|
-
import { DeploymentsConfig, Deployment, ListDeploymentsParams } from './types';
|
|
2
|
+
import { DeploymentsConfig, Deployment, ListDeploymentsParams, PaginationOptions, GetDeploymentParams } from './types';
|
|
3
3
|
export declare class Deployments {
|
|
4
|
-
private readonly
|
|
4
|
+
private readonly dataHubSvc;
|
|
5
5
|
constructor(params: DeploymentsConfig);
|
|
6
|
-
listDeployments(
|
|
7
|
-
listActiveDeployments(projection?: string[]): Promise<List<Deployment>>;
|
|
6
|
+
listDeployments(params?: ListDeploymentsParams, paginationOptions?: PaginationOptions): Promise<List<Deployment>>;
|
|
7
|
+
listActiveDeployments(projection?: string[], paginationOptions?: PaginationOptions): Promise<List<Deployment>>;
|
|
8
8
|
listDeploymentsByBotId(botId: string, projection?: string[]): Promise<List<Deployment>>;
|
|
9
9
|
listActiveDeploymentsByBotId(botId: string, projection?: string[]): Promise<List<Deployment>>;
|
|
10
10
|
listDeploymentsByFlowId(flowId: string, projection?: string[]): Promise<List<Deployment>>;
|
|
11
11
|
listActiveDeploymentsByFlowId(flowId: string, projection?: string[]): Promise<List<Deployment>>;
|
|
12
|
-
getDeployment(
|
|
13
|
-
deleteDeployment(
|
|
12
|
+
getDeployment(id: string, params?: GetDeploymentParams): Promise<Deployment>;
|
|
13
|
+
deleteDeployment(id: string): Promise<Deployment>;
|
|
14
14
|
saveDeployment(source: Deployment): Promise<Deployment>;
|
|
15
15
|
createDeployment(source: Deployment): Promise<Deployment>;
|
|
16
16
|
updateDeployment(source: Deployment): Promise<Deployment>;
|