@quantcdn/quant-client 3.0.4 → 4.1.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 +147 -18
- package/api.ts +26156 -0
- package/base.ts +89 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +18714 -2
- package/dist/api.js +13862 -16
- package/dist/base.d.ts +66 -0
- package/dist/base.js +68 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +18714 -0
- package/dist/esm/api.js +13756 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +63 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/examples/basic-usage.d.ts +4 -0
- package/dist/esm/examples/basic-usage.js +93 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/examples/basic-usage.d.ts +4 -0
- package/dist/examples/basic-usage.js +95 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/index.ts +18 -0
- package/package.json +44 -22
- package/tsconfig.json +20 -0
- package/dist/api/apis.d.ts +0 -32
- package/dist/api/apis.js +0 -50
- package/dist/api/applicationsApi.d.ts +0 -104
- package/dist/api/applicationsApi.js +0 -431
- package/dist/api/backupManagementApi.d.ts +0 -112
- package/dist/api/backupManagementApi.js +0 -464
- package/dist/api/commandsApi.d.ts +0 -80
- package/dist/api/commandsApi.js +0 -316
- package/dist/api/composeApi.d.ts +0 -67
- package/dist/api/composeApi.js +0 -240
- package/dist/api/containersApi.d.ts +0 -67
- package/dist/api/containersApi.js +0 -236
- package/dist/api/cronApi.d.ts +0 -151
- package/dist/api/cronApi.js +0 -681
- package/dist/api/environmentsApi.d.ts +0 -194
- package/dist/api/environmentsApi.js +0 -869
- package/dist/api/sSHAccessApi.d.ts +0 -50
- package/dist/api/sSHAccessApi.js +0 -162
- package/dist/api/scalingPolicyApi.d.ts +0 -82
- package/dist/api/scalingPolicyApi.js +0 -307
- package/dist/api/variablesApi.d.ts +0 -83
- package/dist/api/variablesApi.js +0 -313
- package/dist/api/volumesApi.d.ts +0 -97
- package/dist/api/volumesApi.js +0 -405
- package/dist/model/application.d.ts +0 -38
- package/dist/model/application.js +0 -93
- package/dist/model/command.d.ts +0 -34
- package/dist/model/command.js +0 -73
- package/dist/model/compose.d.ts +0 -32
- package/dist/model/compose.js +0 -58
- package/dist/model/configuration.d.ts +0 -26
- package/dist/model/configuration.js +0 -30
- package/dist/model/container.d.ts +0 -75
- package/dist/model/container.js +0 -121
- package/dist/model/containerDependsOnInner.d.ts +0 -40
- package/dist/model/containerDependsOnInner.js +0 -42
- package/dist/model/containerEnvironmentInner.d.ts +0 -32
- package/dist/model/containerEnvironmentInner.js +0 -33
- package/dist/model/containerHealthCheck.d.ts +0 -47
- package/dist/model/containerHealthCheck.js +0 -65
- package/dist/model/containerImageReference.d.ts +0 -38
- package/dist/model/containerImageReference.js +0 -40
- package/dist/model/containerMountPointsInner.d.ts +0 -33
- package/dist/model/containerMountPointsInner.js +0 -41
- package/dist/model/containerSecretsInner.d.ts +0 -32
- package/dist/model/containerSecretsInner.js +0 -33
- package/dist/model/createApplicationRequest.d.ts +0 -28
- package/dist/model/createApplicationRequest.js +0 -43
- package/dist/model/createBackup202Response.d.ts +0 -27
- package/dist/model/createBackup202Response.js +0 -38
- package/dist/model/createBackupRequest.d.ts +0 -32
- package/dist/model/createBackupRequest.js +0 -33
- package/dist/model/createCommandRequest.d.ts +0 -25
- package/dist/model/createCommandRequest.js +0 -28
- package/dist/model/createCronJob422Response.d.ts +0 -26
- package/dist/model/createCronJob422Response.js +0 -33
- package/dist/model/createCronJobRequest.d.ts +0 -30
- package/dist/model/createCronJobRequest.js +0 -56
- package/dist/model/createEnvironmentRequest.d.ts +0 -34
- package/dist/model/createEnvironmentRequest.js +0 -53
- package/dist/model/cron.d.ts +0 -27
- package/dist/model/cron.js +0 -38
- package/dist/model/cronRun.d.ts +0 -48
- package/dist/model/cronRun.js +0 -89
- package/dist/model/deleteBackup200Response.d.ts +0 -26
- package/dist/model/deleteBackup200Response.js +0 -33
- package/dist/model/downloadBackup200Response.d.ts +0 -36
- package/dist/model/downloadBackup200Response.js +0 -38
- package/dist/model/environment.d.ts +0 -45
- package/dist/model/environment.js +0 -103
- package/dist/model/getEcrLoginCredentials200Response.d.ts +0 -28
- package/dist/model/getEcrLoginCredentials200Response.js +0 -43
- package/dist/model/getScalingPolicies200Response.d.ts +0 -26
- package/dist/model/getScalingPolicies200Response.js +0 -28
- package/dist/model/getSshAccessCredentials200Response.d.ts +0 -34
- package/dist/model/getSshAccessCredentials200Response.js +0 -68
- package/dist/model/getSshAccessCredentials200ResponseCredentials.d.ts +0 -28
- package/dist/model/getSshAccessCredentials200ResponseCredentials.js +0 -43
- package/dist/model/listBackups200Response.d.ts +0 -32
- package/dist/model/listBackups200Response.js +0 -43
- package/dist/model/listBackups200ResponseBackupsInner.d.ts +0 -37
- package/dist/model/listBackups200ResponseBackupsInner.js +0 -88
- package/dist/model/listBackups422Response.d.ts +0 -25
- package/dist/model/listBackups422Response.js +0 -28
- package/dist/model/models.d.ts +0 -89
- package/dist/model/models.js +0 -387
- package/dist/model/scalingPolicy.d.ts +0 -35
- package/dist/model/scalingPolicy.js +0 -51
- package/dist/model/syncOperation.d.ts +0 -31
- package/dist/model/syncOperation.js +0 -58
- package/dist/model/syncToEnvironmentRequest.d.ts +0 -25
- package/dist/model/syncToEnvironmentRequest.js +0 -28
- package/dist/model/updateComposeRequest.d.ts +0 -26
- package/dist/model/updateComposeRequest.js +0 -28
- package/dist/model/updateCronJobRequest.d.ts +0 -29
- package/dist/model/updateCronJobRequest.js +0 -48
- package/dist/model/updateEnvironmentComposeRequest.d.ts +0 -26
- package/dist/model/updateEnvironmentComposeRequest.js +0 -28
- package/dist/model/updateEnvironmentRequest.d.ts +0 -34
- package/dist/model/updateEnvironmentRequest.js +0 -38
- package/dist/model/updateEnvironmentStateRequest.d.ts +0 -26
- package/dist/model/updateEnvironmentStateRequest.js +0 -33
- package/dist/model/updateEnvironmentVariableRequest.d.ts +0 -25
- package/dist/model/updateEnvironmentVariableRequest.js +0 -28
- package/dist/model/validateCompose200Response.d.ts +0 -33
- package/dist/model/validateCompose200Response.js +0 -38
- package/dist/model/validateCompose422Response.d.ts +0 -25
- package/dist/model/validateCompose422Response.js +0 -28
- package/dist/model/validateComposeRequest.d.ts +0 -36
- package/dist/model/validateComposeRequest.js +0 -38
- package/dist/model/variable.d.ts +0 -26
- package/dist/model/variable.js +0 -33
- package/dist/model/volume.d.ts +0 -32
- package/dist/model/volume.js +0 -63
|
@@ -1,869 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* QuantCloud API
|
|
4
|
-
* QuantCloud API
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 1.0.0
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.EnvironmentsApi = exports.EnvironmentsApiApiKeys = void 0;
|
|
27
|
-
const request_1 = __importDefault(require("request"));
|
|
28
|
-
const models_1 = require("../model/models");
|
|
29
|
-
const apis_1 = require("./apis");
|
|
30
|
-
let defaultBasePath = 'http://localhost';
|
|
31
|
-
// ===============================================
|
|
32
|
-
// This file is autogenerated - Please do not edit
|
|
33
|
-
// ===============================================
|
|
34
|
-
var EnvironmentsApiApiKeys;
|
|
35
|
-
(function (EnvironmentsApiApiKeys) {
|
|
36
|
-
})(EnvironmentsApiApiKeys = exports.EnvironmentsApiApiKeys || (exports.EnvironmentsApiApiKeys = {}));
|
|
37
|
-
class EnvironmentsApi {
|
|
38
|
-
constructor(basePathOrUsername, password, basePath) {
|
|
39
|
-
this._basePath = defaultBasePath;
|
|
40
|
-
this._defaultHeaders = {};
|
|
41
|
-
this._useQuerystring = false;
|
|
42
|
-
this.authentications = {
|
|
43
|
-
'default': new models_1.VoidAuth(),
|
|
44
|
-
};
|
|
45
|
-
this.interceptors = [];
|
|
46
|
-
if (password) {
|
|
47
|
-
if (basePath) {
|
|
48
|
-
this.basePath = basePath;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
if (basePathOrUsername) {
|
|
53
|
-
this.basePath = basePathOrUsername;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
set useQuerystring(value) {
|
|
58
|
-
this._useQuerystring = value;
|
|
59
|
-
}
|
|
60
|
-
set basePath(basePath) {
|
|
61
|
-
this._basePath = basePath;
|
|
62
|
-
}
|
|
63
|
-
set defaultHeaders(defaultHeaders) {
|
|
64
|
-
this._defaultHeaders = defaultHeaders;
|
|
65
|
-
}
|
|
66
|
-
get defaultHeaders() {
|
|
67
|
-
return this._defaultHeaders;
|
|
68
|
-
}
|
|
69
|
-
get basePath() {
|
|
70
|
-
return this._basePath;
|
|
71
|
-
}
|
|
72
|
-
setDefaultAuthentication(auth) {
|
|
73
|
-
this.authentications.default = auth;
|
|
74
|
-
}
|
|
75
|
-
setApiKey(key, value) {
|
|
76
|
-
this.authentications[EnvironmentsApiApiKeys[key]].apiKey = value;
|
|
77
|
-
}
|
|
78
|
-
addInterceptor(interceptor) {
|
|
79
|
-
this.interceptors.push(interceptor);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @summary Create a new environment
|
|
84
|
-
* @param organisation The organisation ID
|
|
85
|
-
* @param application The application ID
|
|
86
|
-
* @param createEnvironmentRequest
|
|
87
|
-
*/
|
|
88
|
-
createEnvironment(organisation, application, createEnvironmentRequest, options = { headers: {} }) {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments'
|
|
91
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
92
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)));
|
|
93
|
-
let localVarQueryParameters = {};
|
|
94
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
95
|
-
const produces = ['application/json'];
|
|
96
|
-
// give precedence to 'application/json'
|
|
97
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
98
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
102
|
-
}
|
|
103
|
-
let localVarFormParams = {};
|
|
104
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
105
|
-
if (organisation === null || organisation === undefined) {
|
|
106
|
-
throw new Error('Required parameter organisation was null or undefined when calling createEnvironment.');
|
|
107
|
-
}
|
|
108
|
-
// verify required parameter 'application' is not null or undefined
|
|
109
|
-
if (application === null || application === undefined) {
|
|
110
|
-
throw new Error('Required parameter application was null or undefined when calling createEnvironment.');
|
|
111
|
-
}
|
|
112
|
-
// verify required parameter 'createEnvironmentRequest' is not null or undefined
|
|
113
|
-
if (createEnvironmentRequest === null || createEnvironmentRequest === undefined) {
|
|
114
|
-
throw new Error('Required parameter createEnvironmentRequest was null or undefined when calling createEnvironment.');
|
|
115
|
-
}
|
|
116
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
117
|
-
let localVarUseFormData = false;
|
|
118
|
-
let localVarRequestOptions = {
|
|
119
|
-
method: 'POST',
|
|
120
|
-
qs: localVarQueryParameters,
|
|
121
|
-
headers: localVarHeaderParams,
|
|
122
|
-
uri: localVarPath,
|
|
123
|
-
useQuerystring: this._useQuerystring,
|
|
124
|
-
json: true,
|
|
125
|
-
body: models_1.ObjectSerializer.serialize(createEnvironmentRequest, "CreateEnvironmentRequest")
|
|
126
|
-
};
|
|
127
|
-
let authenticationPromise = Promise.resolve();
|
|
128
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
129
|
-
let interceptorPromise = authenticationPromise;
|
|
130
|
-
for (const interceptor of this.interceptors) {
|
|
131
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
132
|
-
}
|
|
133
|
-
return interceptorPromise.then(() => {
|
|
134
|
-
if (Object.keys(localVarFormParams).length) {
|
|
135
|
-
if (localVarUseFormData) {
|
|
136
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return new Promise((resolve, reject) => {
|
|
143
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
144
|
-
if (error) {
|
|
145
|
-
reject(error);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
149
|
-
body = models_1.ObjectSerializer.deserialize(body, "Environment");
|
|
150
|
-
resolve({ response: response, body: body });
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
*
|
|
163
|
-
* @summary Delete an environment
|
|
164
|
-
* @param organisation The organisation ID
|
|
165
|
-
* @param application The application ID
|
|
166
|
-
* @param environment The environment ID
|
|
167
|
-
*/
|
|
168
|
-
deleteEnvironment(organisation, application, environment, options = { headers: {} }) {
|
|
169
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}'
|
|
171
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
172
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
173
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
174
|
-
let localVarQueryParameters = {};
|
|
175
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
176
|
-
let localVarFormParams = {};
|
|
177
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
178
|
-
if (organisation === null || organisation === undefined) {
|
|
179
|
-
throw new Error('Required parameter organisation was null or undefined when calling deleteEnvironment.');
|
|
180
|
-
}
|
|
181
|
-
// verify required parameter 'application' is not null or undefined
|
|
182
|
-
if (application === null || application === undefined) {
|
|
183
|
-
throw new Error('Required parameter application was null or undefined when calling deleteEnvironment.');
|
|
184
|
-
}
|
|
185
|
-
// verify required parameter 'environment' is not null or undefined
|
|
186
|
-
if (environment === null || environment === undefined) {
|
|
187
|
-
throw new Error('Required parameter environment was null or undefined when calling deleteEnvironment.');
|
|
188
|
-
}
|
|
189
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
190
|
-
let localVarUseFormData = false;
|
|
191
|
-
let localVarRequestOptions = {
|
|
192
|
-
method: 'DELETE',
|
|
193
|
-
qs: localVarQueryParameters,
|
|
194
|
-
headers: localVarHeaderParams,
|
|
195
|
-
uri: localVarPath,
|
|
196
|
-
useQuerystring: this._useQuerystring,
|
|
197
|
-
json: true,
|
|
198
|
-
};
|
|
199
|
-
let authenticationPromise = Promise.resolve();
|
|
200
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
201
|
-
let interceptorPromise = authenticationPromise;
|
|
202
|
-
for (const interceptor of this.interceptors) {
|
|
203
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
204
|
-
}
|
|
205
|
-
return interceptorPromise.then(() => {
|
|
206
|
-
if (Object.keys(localVarFormParams).length) {
|
|
207
|
-
if (localVarUseFormData) {
|
|
208
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return new Promise((resolve, reject) => {
|
|
215
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
216
|
-
if (error) {
|
|
217
|
-
reject(error);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
221
|
-
resolve({ response: response, body: body });
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
234
|
-
* @summary Get a single environment
|
|
235
|
-
* @param organisation The organisation ID
|
|
236
|
-
* @param application The application ID
|
|
237
|
-
* @param environment The environment ID
|
|
238
|
-
*/
|
|
239
|
-
getEnvironment(organisation, application, environment, options = { headers: {} }) {
|
|
240
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}'
|
|
242
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
243
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
244
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
245
|
-
let localVarQueryParameters = {};
|
|
246
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
247
|
-
const produces = ['application/json'];
|
|
248
|
-
// give precedence to 'application/json'
|
|
249
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
250
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
254
|
-
}
|
|
255
|
-
let localVarFormParams = {};
|
|
256
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
257
|
-
if (organisation === null || organisation === undefined) {
|
|
258
|
-
throw new Error('Required parameter organisation was null or undefined when calling getEnvironment.');
|
|
259
|
-
}
|
|
260
|
-
// verify required parameter 'application' is not null or undefined
|
|
261
|
-
if (application === null || application === undefined) {
|
|
262
|
-
throw new Error('Required parameter application was null or undefined when calling getEnvironment.');
|
|
263
|
-
}
|
|
264
|
-
// verify required parameter 'environment' is not null or undefined
|
|
265
|
-
if (environment === null || environment === undefined) {
|
|
266
|
-
throw new Error('Required parameter environment was null or undefined when calling getEnvironment.');
|
|
267
|
-
}
|
|
268
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
269
|
-
let localVarUseFormData = false;
|
|
270
|
-
let localVarRequestOptions = {
|
|
271
|
-
method: 'GET',
|
|
272
|
-
qs: localVarQueryParameters,
|
|
273
|
-
headers: localVarHeaderParams,
|
|
274
|
-
uri: localVarPath,
|
|
275
|
-
useQuerystring: this._useQuerystring,
|
|
276
|
-
json: true,
|
|
277
|
-
};
|
|
278
|
-
let authenticationPromise = Promise.resolve();
|
|
279
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
280
|
-
let interceptorPromise = authenticationPromise;
|
|
281
|
-
for (const interceptor of this.interceptors) {
|
|
282
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
283
|
-
}
|
|
284
|
-
return interceptorPromise.then(() => {
|
|
285
|
-
if (Object.keys(localVarFormParams).length) {
|
|
286
|
-
if (localVarUseFormData) {
|
|
287
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return new Promise((resolve, reject) => {
|
|
294
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
295
|
-
if (error) {
|
|
296
|
-
reject(error);
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
300
|
-
body = models_1.ObjectSerializer.deserialize(body, "Environment");
|
|
301
|
-
resolve({ response: response, body: body });
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
*
|
|
314
|
-
* @summary Get the logs for an environment
|
|
315
|
-
* @param organisation The organisation ID
|
|
316
|
-
* @param application The application ID
|
|
317
|
-
* @param environment The environment ID
|
|
318
|
-
*/
|
|
319
|
-
getEnvironmentLogs(organisation, application, environment, options = { headers: {} }) {
|
|
320
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/logs'
|
|
322
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
323
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
324
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
325
|
-
let localVarQueryParameters = {};
|
|
326
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
327
|
-
let localVarFormParams = {};
|
|
328
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
329
|
-
if (organisation === null || organisation === undefined) {
|
|
330
|
-
throw new Error('Required parameter organisation was null or undefined when calling getEnvironmentLogs.');
|
|
331
|
-
}
|
|
332
|
-
// verify required parameter 'application' is not null or undefined
|
|
333
|
-
if (application === null || application === undefined) {
|
|
334
|
-
throw new Error('Required parameter application was null or undefined when calling getEnvironmentLogs.');
|
|
335
|
-
}
|
|
336
|
-
// verify required parameter 'environment' is not null or undefined
|
|
337
|
-
if (environment === null || environment === undefined) {
|
|
338
|
-
throw new Error('Required parameter environment was null or undefined when calling getEnvironmentLogs.');
|
|
339
|
-
}
|
|
340
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
341
|
-
let localVarUseFormData = false;
|
|
342
|
-
let localVarRequestOptions = {
|
|
343
|
-
method: 'GET',
|
|
344
|
-
qs: localVarQueryParameters,
|
|
345
|
-
headers: localVarHeaderParams,
|
|
346
|
-
uri: localVarPath,
|
|
347
|
-
useQuerystring: this._useQuerystring,
|
|
348
|
-
json: true,
|
|
349
|
-
};
|
|
350
|
-
let authenticationPromise = Promise.resolve();
|
|
351
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
352
|
-
let interceptorPromise = authenticationPromise;
|
|
353
|
-
for (const interceptor of this.interceptors) {
|
|
354
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
355
|
-
}
|
|
356
|
-
return interceptorPromise.then(() => {
|
|
357
|
-
if (Object.keys(localVarFormParams).length) {
|
|
358
|
-
if (localVarUseFormData) {
|
|
359
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
362
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return new Promise((resolve, reject) => {
|
|
366
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
367
|
-
if (error) {
|
|
368
|
-
reject(error);
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
372
|
-
resolve({ response: response, body: body });
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
*
|
|
385
|
-
* @summary Get the metrics for an environment
|
|
386
|
-
* @param organisation The organisation ID
|
|
387
|
-
* @param application The application ID
|
|
388
|
-
* @param environment The environment ID
|
|
389
|
-
*/
|
|
390
|
-
getEnvironmentMetrics(organisation, application, environment, options = { headers: {} }) {
|
|
391
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/metrics'
|
|
393
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
394
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
395
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
396
|
-
let localVarQueryParameters = {};
|
|
397
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
398
|
-
let localVarFormParams = {};
|
|
399
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
400
|
-
if (organisation === null || organisation === undefined) {
|
|
401
|
-
throw new Error('Required parameter organisation was null or undefined when calling getEnvironmentMetrics.');
|
|
402
|
-
}
|
|
403
|
-
// verify required parameter 'application' is not null or undefined
|
|
404
|
-
if (application === null || application === undefined) {
|
|
405
|
-
throw new Error('Required parameter application was null or undefined when calling getEnvironmentMetrics.');
|
|
406
|
-
}
|
|
407
|
-
// verify required parameter 'environment' is not null or undefined
|
|
408
|
-
if (environment === null || environment === undefined) {
|
|
409
|
-
throw new Error('Required parameter environment was null or undefined when calling getEnvironmentMetrics.');
|
|
410
|
-
}
|
|
411
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
412
|
-
let localVarUseFormData = false;
|
|
413
|
-
let localVarRequestOptions = {
|
|
414
|
-
method: 'GET',
|
|
415
|
-
qs: localVarQueryParameters,
|
|
416
|
-
headers: localVarHeaderParams,
|
|
417
|
-
uri: localVarPath,
|
|
418
|
-
useQuerystring: this._useQuerystring,
|
|
419
|
-
json: true,
|
|
420
|
-
};
|
|
421
|
-
let authenticationPromise = Promise.resolve();
|
|
422
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
423
|
-
let interceptorPromise = authenticationPromise;
|
|
424
|
-
for (const interceptor of this.interceptors) {
|
|
425
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
426
|
-
}
|
|
427
|
-
return interceptorPromise.then(() => {
|
|
428
|
-
if (Object.keys(localVarFormParams).length) {
|
|
429
|
-
if (localVarUseFormData) {
|
|
430
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
431
|
-
}
|
|
432
|
-
else {
|
|
433
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
return new Promise((resolve, reject) => {
|
|
437
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
438
|
-
if (error) {
|
|
439
|
-
reject(error);
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
443
|
-
resolve({ response: response, body: body });
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
*
|
|
456
|
-
* @summary Get all environments for an application
|
|
457
|
-
* @param organisation The organisation ID
|
|
458
|
-
* @param application The application ID
|
|
459
|
-
*/
|
|
460
|
-
listEnvironments(organisation, application, options = { headers: {} }) {
|
|
461
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
462
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments'
|
|
463
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
464
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)));
|
|
465
|
-
let localVarQueryParameters = {};
|
|
466
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
467
|
-
const produces = ['application/json'];
|
|
468
|
-
// give precedence to 'application/json'
|
|
469
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
470
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
474
|
-
}
|
|
475
|
-
let localVarFormParams = {};
|
|
476
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
477
|
-
if (organisation === null || organisation === undefined) {
|
|
478
|
-
throw new Error('Required parameter organisation was null or undefined when calling listEnvironments.');
|
|
479
|
-
}
|
|
480
|
-
// verify required parameter 'application' is not null or undefined
|
|
481
|
-
if (application === null || application === undefined) {
|
|
482
|
-
throw new Error('Required parameter application was null or undefined when calling listEnvironments.');
|
|
483
|
-
}
|
|
484
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
485
|
-
let localVarUseFormData = false;
|
|
486
|
-
let localVarRequestOptions = {
|
|
487
|
-
method: 'GET',
|
|
488
|
-
qs: localVarQueryParameters,
|
|
489
|
-
headers: localVarHeaderParams,
|
|
490
|
-
uri: localVarPath,
|
|
491
|
-
useQuerystring: this._useQuerystring,
|
|
492
|
-
json: true,
|
|
493
|
-
};
|
|
494
|
-
let authenticationPromise = Promise.resolve();
|
|
495
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
496
|
-
let interceptorPromise = authenticationPromise;
|
|
497
|
-
for (const interceptor of this.interceptors) {
|
|
498
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
499
|
-
}
|
|
500
|
-
return interceptorPromise.then(() => {
|
|
501
|
-
if (Object.keys(localVarFormParams).length) {
|
|
502
|
-
if (localVarUseFormData) {
|
|
503
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
return new Promise((resolve, reject) => {
|
|
510
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
511
|
-
if (error) {
|
|
512
|
-
reject(error);
|
|
513
|
-
}
|
|
514
|
-
else {
|
|
515
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
516
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<Environment>");
|
|
517
|
-
resolve({ response: response, body: body });
|
|
518
|
-
}
|
|
519
|
-
else {
|
|
520
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
*
|
|
530
|
-
* @summary List the sync operations for an environment
|
|
531
|
-
* @param organisation The organisation ID
|
|
532
|
-
* @param application The application ID
|
|
533
|
-
* @param environment The environment ID
|
|
534
|
-
* @param type The sync type
|
|
535
|
-
*/
|
|
536
|
-
listSyncOperations(organisation, application, environment, type, options = { headers: {} }) {
|
|
537
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
538
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/sync/{type}'
|
|
539
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
540
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
541
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
542
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)));
|
|
543
|
-
let localVarQueryParameters = {};
|
|
544
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
545
|
-
const produces = ['application/json'];
|
|
546
|
-
// give precedence to 'application/json'
|
|
547
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
548
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
549
|
-
}
|
|
550
|
-
else {
|
|
551
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
552
|
-
}
|
|
553
|
-
let localVarFormParams = {};
|
|
554
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
555
|
-
if (organisation === null || organisation === undefined) {
|
|
556
|
-
throw new Error('Required parameter organisation was null or undefined when calling listSyncOperations.');
|
|
557
|
-
}
|
|
558
|
-
// verify required parameter 'application' is not null or undefined
|
|
559
|
-
if (application === null || application === undefined) {
|
|
560
|
-
throw new Error('Required parameter application was null or undefined when calling listSyncOperations.');
|
|
561
|
-
}
|
|
562
|
-
// verify required parameter 'environment' is not null or undefined
|
|
563
|
-
if (environment === null || environment === undefined) {
|
|
564
|
-
throw new Error('Required parameter environment was null or undefined when calling listSyncOperations.');
|
|
565
|
-
}
|
|
566
|
-
// verify required parameter 'type' is not null or undefined
|
|
567
|
-
if (type === null || type === undefined) {
|
|
568
|
-
throw new Error('Required parameter type was null or undefined when calling listSyncOperations.');
|
|
569
|
-
}
|
|
570
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
571
|
-
let localVarUseFormData = false;
|
|
572
|
-
let localVarRequestOptions = {
|
|
573
|
-
method: 'GET',
|
|
574
|
-
qs: localVarQueryParameters,
|
|
575
|
-
headers: localVarHeaderParams,
|
|
576
|
-
uri: localVarPath,
|
|
577
|
-
useQuerystring: this._useQuerystring,
|
|
578
|
-
json: true,
|
|
579
|
-
};
|
|
580
|
-
let authenticationPromise = Promise.resolve();
|
|
581
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
582
|
-
let interceptorPromise = authenticationPromise;
|
|
583
|
-
for (const interceptor of this.interceptors) {
|
|
584
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
585
|
-
}
|
|
586
|
-
return interceptorPromise.then(() => {
|
|
587
|
-
if (Object.keys(localVarFormParams).length) {
|
|
588
|
-
if (localVarUseFormData) {
|
|
589
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return new Promise((resolve, reject) => {
|
|
596
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
597
|
-
if (error) {
|
|
598
|
-
reject(error);
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
601
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
602
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<SyncOperation>");
|
|
603
|
-
resolve({ response: response, body: body });
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
});
|
|
611
|
-
});
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
*
|
|
616
|
-
* @summary Perform a sync operation from a source environment to the current environment
|
|
617
|
-
* @param organisation The organisation ID
|
|
618
|
-
* @param application The application ID
|
|
619
|
-
* @param environment The environment ID
|
|
620
|
-
* @param type The sync type
|
|
621
|
-
* @param syncToEnvironmentRequest
|
|
622
|
-
*/
|
|
623
|
-
syncToEnvironment(organisation, application, environment, type, syncToEnvironmentRequest, options = { headers: {} }) {
|
|
624
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
625
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/sync/{type}'
|
|
626
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
627
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
628
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
629
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)));
|
|
630
|
-
let localVarQueryParameters = {};
|
|
631
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
632
|
-
const produces = ['application/json'];
|
|
633
|
-
// give precedence to 'application/json'
|
|
634
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
635
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
636
|
-
}
|
|
637
|
-
else {
|
|
638
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
639
|
-
}
|
|
640
|
-
let localVarFormParams = {};
|
|
641
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
642
|
-
if (organisation === null || organisation === undefined) {
|
|
643
|
-
throw new Error('Required parameter organisation was null or undefined when calling syncToEnvironment.');
|
|
644
|
-
}
|
|
645
|
-
// verify required parameter 'application' is not null or undefined
|
|
646
|
-
if (application === null || application === undefined) {
|
|
647
|
-
throw new Error('Required parameter application was null or undefined when calling syncToEnvironment.');
|
|
648
|
-
}
|
|
649
|
-
// verify required parameter 'environment' is not null or undefined
|
|
650
|
-
if (environment === null || environment === undefined) {
|
|
651
|
-
throw new Error('Required parameter environment was null or undefined when calling syncToEnvironment.');
|
|
652
|
-
}
|
|
653
|
-
// verify required parameter 'type' is not null or undefined
|
|
654
|
-
if (type === null || type === undefined) {
|
|
655
|
-
throw new Error('Required parameter type was null or undefined when calling syncToEnvironment.');
|
|
656
|
-
}
|
|
657
|
-
// verify required parameter 'syncToEnvironmentRequest' is not null or undefined
|
|
658
|
-
if (syncToEnvironmentRequest === null || syncToEnvironmentRequest === undefined) {
|
|
659
|
-
throw new Error('Required parameter syncToEnvironmentRequest was null or undefined when calling syncToEnvironment.');
|
|
660
|
-
}
|
|
661
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
662
|
-
let localVarUseFormData = false;
|
|
663
|
-
let localVarRequestOptions = {
|
|
664
|
-
method: 'POST',
|
|
665
|
-
qs: localVarQueryParameters,
|
|
666
|
-
headers: localVarHeaderParams,
|
|
667
|
-
uri: localVarPath,
|
|
668
|
-
useQuerystring: this._useQuerystring,
|
|
669
|
-
json: true,
|
|
670
|
-
body: models_1.ObjectSerializer.serialize(syncToEnvironmentRequest, "SyncToEnvironmentRequest")
|
|
671
|
-
};
|
|
672
|
-
let authenticationPromise = Promise.resolve();
|
|
673
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
674
|
-
let interceptorPromise = authenticationPromise;
|
|
675
|
-
for (const interceptor of this.interceptors) {
|
|
676
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
677
|
-
}
|
|
678
|
-
return interceptorPromise.then(() => {
|
|
679
|
-
if (Object.keys(localVarFormParams).length) {
|
|
680
|
-
if (localVarUseFormData) {
|
|
681
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
682
|
-
}
|
|
683
|
-
else {
|
|
684
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
return new Promise((resolve, reject) => {
|
|
688
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
689
|
-
if (error) {
|
|
690
|
-
reject(error);
|
|
691
|
-
}
|
|
692
|
-
else {
|
|
693
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
694
|
-
body = models_1.ObjectSerializer.deserialize(body, "SyncOperation");
|
|
695
|
-
resolve({ response: response, body: body });
|
|
696
|
-
}
|
|
697
|
-
else {
|
|
698
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
});
|
|
702
|
-
});
|
|
703
|
-
});
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Replaces the entire task definition for the environment based on the provided multi-container compose definition. This will create a new task definition revision and update the ECS service, triggering a redeployment. Optionally accepts minCapacity and maxCapacity at the root level for convenience.
|
|
708
|
-
* @summary Update Environment Compose Definition
|
|
709
|
-
* @param organisation The organisation ID
|
|
710
|
-
* @param application The application ID
|
|
711
|
-
* @param environment The environment ID
|
|
712
|
-
* @param updateEnvironmentRequest
|
|
713
|
-
*/
|
|
714
|
-
updateEnvironment(organisation, application, environment, updateEnvironmentRequest, options = { headers: {} }) {
|
|
715
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
716
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}'
|
|
717
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
718
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
719
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
720
|
-
let localVarQueryParameters = {};
|
|
721
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
722
|
-
const produces = ['application/json'];
|
|
723
|
-
// give precedence to 'application/json'
|
|
724
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
725
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
726
|
-
}
|
|
727
|
-
else {
|
|
728
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
729
|
-
}
|
|
730
|
-
let localVarFormParams = {};
|
|
731
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
732
|
-
if (organisation === null || organisation === undefined) {
|
|
733
|
-
throw new Error('Required parameter organisation was null or undefined when calling updateEnvironment.');
|
|
734
|
-
}
|
|
735
|
-
// verify required parameter 'application' is not null or undefined
|
|
736
|
-
if (application === null || application === undefined) {
|
|
737
|
-
throw new Error('Required parameter application was null or undefined when calling updateEnvironment.');
|
|
738
|
-
}
|
|
739
|
-
// verify required parameter 'environment' is not null or undefined
|
|
740
|
-
if (environment === null || environment === undefined) {
|
|
741
|
-
throw new Error('Required parameter environment was null or undefined when calling updateEnvironment.');
|
|
742
|
-
}
|
|
743
|
-
// verify required parameter 'updateEnvironmentRequest' is not null or undefined
|
|
744
|
-
if (updateEnvironmentRequest === null || updateEnvironmentRequest === undefined) {
|
|
745
|
-
throw new Error('Required parameter updateEnvironmentRequest was null or undefined when calling updateEnvironment.');
|
|
746
|
-
}
|
|
747
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
748
|
-
let localVarUseFormData = false;
|
|
749
|
-
let localVarRequestOptions = {
|
|
750
|
-
method: 'PUT',
|
|
751
|
-
qs: localVarQueryParameters,
|
|
752
|
-
headers: localVarHeaderParams,
|
|
753
|
-
uri: localVarPath,
|
|
754
|
-
useQuerystring: this._useQuerystring,
|
|
755
|
-
json: true,
|
|
756
|
-
body: models_1.ObjectSerializer.serialize(updateEnvironmentRequest, "UpdateEnvironmentRequest")
|
|
757
|
-
};
|
|
758
|
-
let authenticationPromise = Promise.resolve();
|
|
759
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
760
|
-
let interceptorPromise = authenticationPromise;
|
|
761
|
-
for (const interceptor of this.interceptors) {
|
|
762
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
763
|
-
}
|
|
764
|
-
return interceptorPromise.then(() => {
|
|
765
|
-
if (Object.keys(localVarFormParams).length) {
|
|
766
|
-
if (localVarUseFormData) {
|
|
767
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
768
|
-
}
|
|
769
|
-
else {
|
|
770
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
return new Promise((resolve, reject) => {
|
|
774
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
775
|
-
if (error) {
|
|
776
|
-
reject(error);
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
780
|
-
resolve({ response: response, body: body });
|
|
781
|
-
}
|
|
782
|
-
else {
|
|
783
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
});
|
|
788
|
-
});
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
*
|
|
793
|
-
* @summary Update the state of an environment
|
|
794
|
-
* @param organisation The organisation ID
|
|
795
|
-
* @param application The application ID
|
|
796
|
-
* @param environment The environment ID
|
|
797
|
-
* @param updateEnvironmentStateRequest
|
|
798
|
-
*/
|
|
799
|
-
updateEnvironmentState(organisation, application, environment, updateEnvironmentStateRequest, options = { headers: {} }) {
|
|
800
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
801
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/state'
|
|
802
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
803
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
804
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
805
|
-
let localVarQueryParameters = {};
|
|
806
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
807
|
-
let localVarFormParams = {};
|
|
808
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
809
|
-
if (organisation === null || organisation === undefined) {
|
|
810
|
-
throw new Error('Required parameter organisation was null or undefined when calling updateEnvironmentState.');
|
|
811
|
-
}
|
|
812
|
-
// verify required parameter 'application' is not null or undefined
|
|
813
|
-
if (application === null || application === undefined) {
|
|
814
|
-
throw new Error('Required parameter application was null or undefined when calling updateEnvironmentState.');
|
|
815
|
-
}
|
|
816
|
-
// verify required parameter 'environment' is not null or undefined
|
|
817
|
-
if (environment === null || environment === undefined) {
|
|
818
|
-
throw new Error('Required parameter environment was null or undefined when calling updateEnvironmentState.');
|
|
819
|
-
}
|
|
820
|
-
// verify required parameter 'updateEnvironmentStateRequest' is not null or undefined
|
|
821
|
-
if (updateEnvironmentStateRequest === null || updateEnvironmentStateRequest === undefined) {
|
|
822
|
-
throw new Error('Required parameter updateEnvironmentStateRequest was null or undefined when calling updateEnvironmentState.');
|
|
823
|
-
}
|
|
824
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
825
|
-
let localVarUseFormData = false;
|
|
826
|
-
let localVarRequestOptions = {
|
|
827
|
-
method: 'PUT',
|
|
828
|
-
qs: localVarQueryParameters,
|
|
829
|
-
headers: localVarHeaderParams,
|
|
830
|
-
uri: localVarPath,
|
|
831
|
-
useQuerystring: this._useQuerystring,
|
|
832
|
-
json: true,
|
|
833
|
-
body: models_1.ObjectSerializer.serialize(updateEnvironmentStateRequest, "UpdateEnvironmentStateRequest")
|
|
834
|
-
};
|
|
835
|
-
let authenticationPromise = Promise.resolve();
|
|
836
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
837
|
-
let interceptorPromise = authenticationPromise;
|
|
838
|
-
for (const interceptor of this.interceptors) {
|
|
839
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
840
|
-
}
|
|
841
|
-
return interceptorPromise.then(() => {
|
|
842
|
-
if (Object.keys(localVarFormParams).length) {
|
|
843
|
-
if (localVarUseFormData) {
|
|
844
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
845
|
-
}
|
|
846
|
-
else {
|
|
847
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
return new Promise((resolve, reject) => {
|
|
851
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
852
|
-
if (error) {
|
|
853
|
-
reject(error);
|
|
854
|
-
}
|
|
855
|
-
else {
|
|
856
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
857
|
-
resolve({ response: response, body: body });
|
|
858
|
-
}
|
|
859
|
-
else {
|
|
860
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
});
|
|
865
|
-
});
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
exports.EnvironmentsApi = EnvironmentsApi;
|