@quantcdn/quant-client 3.0.3 → 4.0.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 +145 -15
- package/api.ts +24933 -0
- package/base.ts +89 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +17980 -2
- package/dist/api.js +13594 -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 +17980 -0
- package/dist/esm/api.js +13455 -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 +18 -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 -106
- package/dist/api/backupManagementApi.js +0 -440
- 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 -861
- 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 -38
- package/dist/model/container.js +0 -78
- package/dist/model/containerEnvironmentInner.d.ts +0 -26
- package/dist/model/containerEnvironmentInner.js +0 -33
- package/dist/model/containerImageReference.d.ts +0 -28
- package/dist/model/containerImageReference.js +0 -43
- package/dist/model/containerMountPointsInner.d.ts +0 -27
- package/dist/model/containerMountPointsInner.js +0 -38
- 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 -28
- package/dist/model/listBackups200Response.js +0 -38
- package/dist/model/listBackups200ResponseBackupsInner.d.ts +0 -37
- package/dist/model/listBackups200ResponseBackupsInner.js +0 -88
- package/dist/model/models.d.ts +0 -85
- package/dist/model/models.js +0 -373
- 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 -26
- package/dist/model/updateEnvironmentRequest.js +0 -28
- 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
package/dist/api/cronApi.js
DELETED
|
@@ -1,681 +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.CronApi = exports.CronApiApiKeys = 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 CronApiApiKeys;
|
|
35
|
-
(function (CronApiApiKeys) {
|
|
36
|
-
})(CronApiApiKeys = exports.CronApiApiKeys || (exports.CronApiApiKeys = {}));
|
|
37
|
-
class CronApi {
|
|
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[CronApiApiKeys[key]].apiKey = value;
|
|
77
|
-
}
|
|
78
|
-
addInterceptor(interceptor) {
|
|
79
|
-
this.interceptors.push(interceptor);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @summary Create a new cron job
|
|
84
|
-
* @param organisation The organisation ID
|
|
85
|
-
* @param application The application ID
|
|
86
|
-
* @param environment The environment ID
|
|
87
|
-
* @param createCronJobRequest
|
|
88
|
-
*/
|
|
89
|
-
createCronJob(organisation, application, environment, createCronJobRequest, options = { headers: {} }) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron'
|
|
92
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
93
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
94
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
95
|
-
let localVarQueryParameters = {};
|
|
96
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
97
|
-
const produces = ['application/json'];
|
|
98
|
-
// give precedence to 'application/json'
|
|
99
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
100
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
104
|
-
}
|
|
105
|
-
let localVarFormParams = {};
|
|
106
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
107
|
-
if (organisation === null || organisation === undefined) {
|
|
108
|
-
throw new Error('Required parameter organisation was null or undefined when calling createCronJob.');
|
|
109
|
-
}
|
|
110
|
-
// verify required parameter 'application' is not null or undefined
|
|
111
|
-
if (application === null || application === undefined) {
|
|
112
|
-
throw new Error('Required parameter application was null or undefined when calling createCronJob.');
|
|
113
|
-
}
|
|
114
|
-
// verify required parameter 'environment' is not null or undefined
|
|
115
|
-
if (environment === null || environment === undefined) {
|
|
116
|
-
throw new Error('Required parameter environment was null or undefined when calling createCronJob.');
|
|
117
|
-
}
|
|
118
|
-
// verify required parameter 'createCronJobRequest' is not null or undefined
|
|
119
|
-
if (createCronJobRequest === null || createCronJobRequest === undefined) {
|
|
120
|
-
throw new Error('Required parameter createCronJobRequest was null or undefined when calling createCronJob.');
|
|
121
|
-
}
|
|
122
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
123
|
-
let localVarUseFormData = false;
|
|
124
|
-
let localVarRequestOptions = {
|
|
125
|
-
method: 'POST',
|
|
126
|
-
qs: localVarQueryParameters,
|
|
127
|
-
headers: localVarHeaderParams,
|
|
128
|
-
uri: localVarPath,
|
|
129
|
-
useQuerystring: this._useQuerystring,
|
|
130
|
-
json: true,
|
|
131
|
-
body: models_1.ObjectSerializer.serialize(createCronJobRequest, "CreateCronJobRequest")
|
|
132
|
-
};
|
|
133
|
-
let authenticationPromise = Promise.resolve();
|
|
134
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
135
|
-
let interceptorPromise = authenticationPromise;
|
|
136
|
-
for (const interceptor of this.interceptors) {
|
|
137
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
138
|
-
}
|
|
139
|
-
return interceptorPromise.then(() => {
|
|
140
|
-
if (Object.keys(localVarFormParams).length) {
|
|
141
|
-
if (localVarUseFormData) {
|
|
142
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return new Promise((resolve, reject) => {
|
|
149
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
150
|
-
if (error) {
|
|
151
|
-
reject(error);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
155
|
-
body = models_1.ObjectSerializer.deserialize(body, "Cron");
|
|
156
|
-
resolve({ response: response, body: body });
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @summary Delete a cron job
|
|
170
|
-
* @param organisation The organisation ID
|
|
171
|
-
* @param application The application ID
|
|
172
|
-
* @param environment The environment ID
|
|
173
|
-
* @param cron The cron job ID
|
|
174
|
-
*/
|
|
175
|
-
deleteCronJob(organisation, application, environment, cron, options = { headers: {} }) {
|
|
176
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}'
|
|
178
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
179
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
180
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
181
|
-
.replace('{' + 'cron' + '}', encodeURIComponent(String(cron)));
|
|
182
|
-
let localVarQueryParameters = {};
|
|
183
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
184
|
-
let localVarFormParams = {};
|
|
185
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
186
|
-
if (organisation === null || organisation === undefined) {
|
|
187
|
-
throw new Error('Required parameter organisation was null or undefined when calling deleteCronJob.');
|
|
188
|
-
}
|
|
189
|
-
// verify required parameter 'application' is not null or undefined
|
|
190
|
-
if (application === null || application === undefined) {
|
|
191
|
-
throw new Error('Required parameter application was null or undefined when calling deleteCronJob.');
|
|
192
|
-
}
|
|
193
|
-
// verify required parameter 'environment' is not null or undefined
|
|
194
|
-
if (environment === null || environment === undefined) {
|
|
195
|
-
throw new Error('Required parameter environment was null or undefined when calling deleteCronJob.');
|
|
196
|
-
}
|
|
197
|
-
// verify required parameter 'cron' is not null or undefined
|
|
198
|
-
if (cron === null || cron === undefined) {
|
|
199
|
-
throw new Error('Required parameter cron was null or undefined when calling deleteCronJob.');
|
|
200
|
-
}
|
|
201
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
202
|
-
let localVarUseFormData = false;
|
|
203
|
-
let localVarRequestOptions = {
|
|
204
|
-
method: 'DELETE',
|
|
205
|
-
qs: localVarQueryParameters,
|
|
206
|
-
headers: localVarHeaderParams,
|
|
207
|
-
uri: localVarPath,
|
|
208
|
-
useQuerystring: this._useQuerystring,
|
|
209
|
-
json: true,
|
|
210
|
-
};
|
|
211
|
-
let authenticationPromise = Promise.resolve();
|
|
212
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
213
|
-
let interceptorPromise = authenticationPromise;
|
|
214
|
-
for (const interceptor of this.interceptors) {
|
|
215
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
216
|
-
}
|
|
217
|
-
return interceptorPromise.then(() => {
|
|
218
|
-
if (Object.keys(localVarFormParams).length) {
|
|
219
|
-
if (localVarUseFormData) {
|
|
220
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return new Promise((resolve, reject) => {
|
|
227
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
228
|
-
if (error) {
|
|
229
|
-
reject(error);
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
233
|
-
resolve({ response: response, body: body });
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
*
|
|
246
|
-
* @summary Get a cron job
|
|
247
|
-
* @param organisation The organisation ID
|
|
248
|
-
* @param application The application ID
|
|
249
|
-
* @param environment The environment ID
|
|
250
|
-
* @param cron The cron job ID
|
|
251
|
-
*/
|
|
252
|
-
getCronJob(organisation, application, environment, cron, options = { headers: {} }) {
|
|
253
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}'
|
|
255
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
256
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
257
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
258
|
-
.replace('{' + 'cron' + '}', encodeURIComponent(String(cron)));
|
|
259
|
-
let localVarQueryParameters = {};
|
|
260
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
261
|
-
const produces = ['application/json'];
|
|
262
|
-
// give precedence to 'application/json'
|
|
263
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
264
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
268
|
-
}
|
|
269
|
-
let localVarFormParams = {};
|
|
270
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
271
|
-
if (organisation === null || organisation === undefined) {
|
|
272
|
-
throw new Error('Required parameter organisation was null or undefined when calling getCronJob.');
|
|
273
|
-
}
|
|
274
|
-
// verify required parameter 'application' is not null or undefined
|
|
275
|
-
if (application === null || application === undefined) {
|
|
276
|
-
throw new Error('Required parameter application was null or undefined when calling getCronJob.');
|
|
277
|
-
}
|
|
278
|
-
// verify required parameter 'environment' is not null or undefined
|
|
279
|
-
if (environment === null || environment === undefined) {
|
|
280
|
-
throw new Error('Required parameter environment was null or undefined when calling getCronJob.');
|
|
281
|
-
}
|
|
282
|
-
// verify required parameter 'cron' is not null or undefined
|
|
283
|
-
if (cron === null || cron === undefined) {
|
|
284
|
-
throw new Error('Required parameter cron was null or undefined when calling getCronJob.');
|
|
285
|
-
}
|
|
286
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
287
|
-
let localVarUseFormData = false;
|
|
288
|
-
let localVarRequestOptions = {
|
|
289
|
-
method: 'GET',
|
|
290
|
-
qs: localVarQueryParameters,
|
|
291
|
-
headers: localVarHeaderParams,
|
|
292
|
-
uri: localVarPath,
|
|
293
|
-
useQuerystring: this._useQuerystring,
|
|
294
|
-
json: true,
|
|
295
|
-
};
|
|
296
|
-
let authenticationPromise = Promise.resolve();
|
|
297
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
298
|
-
let interceptorPromise = authenticationPromise;
|
|
299
|
-
for (const interceptor of this.interceptors) {
|
|
300
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
301
|
-
}
|
|
302
|
-
return interceptorPromise.then(() => {
|
|
303
|
-
if (Object.keys(localVarFormParams).length) {
|
|
304
|
-
if (localVarUseFormData) {
|
|
305
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
return new Promise((resolve, reject) => {
|
|
312
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
313
|
-
if (error) {
|
|
314
|
-
reject(error);
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
318
|
-
body = models_1.ObjectSerializer.deserialize(body, "Cron");
|
|
319
|
-
resolve({ response: response, body: body });
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
*
|
|
332
|
-
* @summary Get a cron run
|
|
333
|
-
* @param organisation The organisation ID
|
|
334
|
-
* @param application The application ID
|
|
335
|
-
* @param environment The environment ID
|
|
336
|
-
* @param cron The cron job ID
|
|
337
|
-
* @param run The cron run ID
|
|
338
|
-
*/
|
|
339
|
-
getCronRun(organisation, application, environment, cron, run, options = { headers: {} }) {
|
|
340
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}/runs/{run}'
|
|
342
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
343
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
344
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
345
|
-
.replace('{' + 'cron' + '}', encodeURIComponent(String(cron)))
|
|
346
|
-
.replace('{' + 'run' + '}', encodeURIComponent(String(run)));
|
|
347
|
-
let localVarQueryParameters = {};
|
|
348
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
349
|
-
const produces = ['application/json'];
|
|
350
|
-
// give precedence to 'application/json'
|
|
351
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
352
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
356
|
-
}
|
|
357
|
-
let localVarFormParams = {};
|
|
358
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
359
|
-
if (organisation === null || organisation === undefined) {
|
|
360
|
-
throw new Error('Required parameter organisation was null or undefined when calling getCronRun.');
|
|
361
|
-
}
|
|
362
|
-
// verify required parameter 'application' is not null or undefined
|
|
363
|
-
if (application === null || application === undefined) {
|
|
364
|
-
throw new Error('Required parameter application was null or undefined when calling getCronRun.');
|
|
365
|
-
}
|
|
366
|
-
// verify required parameter 'environment' is not null or undefined
|
|
367
|
-
if (environment === null || environment === undefined) {
|
|
368
|
-
throw new Error('Required parameter environment was null or undefined when calling getCronRun.');
|
|
369
|
-
}
|
|
370
|
-
// verify required parameter 'cron' is not null or undefined
|
|
371
|
-
if (cron === null || cron === undefined) {
|
|
372
|
-
throw new Error('Required parameter cron was null or undefined when calling getCronRun.');
|
|
373
|
-
}
|
|
374
|
-
// verify required parameter 'run' is not null or undefined
|
|
375
|
-
if (run === null || run === undefined) {
|
|
376
|
-
throw new Error('Required parameter run was null or undefined when calling getCronRun.');
|
|
377
|
-
}
|
|
378
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
379
|
-
let localVarUseFormData = false;
|
|
380
|
-
let localVarRequestOptions = {
|
|
381
|
-
method: 'GET',
|
|
382
|
-
qs: localVarQueryParameters,
|
|
383
|
-
headers: localVarHeaderParams,
|
|
384
|
-
uri: localVarPath,
|
|
385
|
-
useQuerystring: this._useQuerystring,
|
|
386
|
-
json: true,
|
|
387
|
-
};
|
|
388
|
-
let authenticationPromise = Promise.resolve();
|
|
389
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
390
|
-
let interceptorPromise = authenticationPromise;
|
|
391
|
-
for (const interceptor of this.interceptors) {
|
|
392
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
393
|
-
}
|
|
394
|
-
return interceptorPromise.then(() => {
|
|
395
|
-
if (Object.keys(localVarFormParams).length) {
|
|
396
|
-
if (localVarUseFormData) {
|
|
397
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return new Promise((resolve, reject) => {
|
|
404
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
405
|
-
if (error) {
|
|
406
|
-
reject(error);
|
|
407
|
-
}
|
|
408
|
-
else {
|
|
409
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
410
|
-
body = models_1.ObjectSerializer.deserialize(body, "CronRun");
|
|
411
|
-
resolve({ response: response, body: body });
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
*
|
|
424
|
-
* @summary Get all runs for a cron job
|
|
425
|
-
* @param organisation The organisation ID
|
|
426
|
-
* @param application The application ID
|
|
427
|
-
* @param environment The environment ID
|
|
428
|
-
* @param cron The cron job ID
|
|
429
|
-
*/
|
|
430
|
-
listCronJobRuns(organisation, application, environment, cron, options = { headers: {} }) {
|
|
431
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
432
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}/runs'
|
|
433
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
434
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
435
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
436
|
-
.replace('{' + 'cron' + '}', encodeURIComponent(String(cron)));
|
|
437
|
-
let localVarQueryParameters = {};
|
|
438
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
439
|
-
const produces = ['application/json'];
|
|
440
|
-
// give precedence to 'application/json'
|
|
441
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
442
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
443
|
-
}
|
|
444
|
-
else {
|
|
445
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
446
|
-
}
|
|
447
|
-
let localVarFormParams = {};
|
|
448
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
449
|
-
if (organisation === null || organisation === undefined) {
|
|
450
|
-
throw new Error('Required parameter organisation was null or undefined when calling listCronJobRuns.');
|
|
451
|
-
}
|
|
452
|
-
// verify required parameter 'application' is not null or undefined
|
|
453
|
-
if (application === null || application === undefined) {
|
|
454
|
-
throw new Error('Required parameter application was null or undefined when calling listCronJobRuns.');
|
|
455
|
-
}
|
|
456
|
-
// verify required parameter 'environment' is not null or undefined
|
|
457
|
-
if (environment === null || environment === undefined) {
|
|
458
|
-
throw new Error('Required parameter environment was null or undefined when calling listCronJobRuns.');
|
|
459
|
-
}
|
|
460
|
-
// verify required parameter 'cron' is not null or undefined
|
|
461
|
-
if (cron === null || cron === undefined) {
|
|
462
|
-
throw new Error('Required parameter cron was null or undefined when calling listCronJobRuns.');
|
|
463
|
-
}
|
|
464
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
465
|
-
let localVarUseFormData = false;
|
|
466
|
-
let localVarRequestOptions = {
|
|
467
|
-
method: 'GET',
|
|
468
|
-
qs: localVarQueryParameters,
|
|
469
|
-
headers: localVarHeaderParams,
|
|
470
|
-
uri: localVarPath,
|
|
471
|
-
useQuerystring: this._useQuerystring,
|
|
472
|
-
json: true,
|
|
473
|
-
};
|
|
474
|
-
let authenticationPromise = Promise.resolve();
|
|
475
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
476
|
-
let interceptorPromise = authenticationPromise;
|
|
477
|
-
for (const interceptor of this.interceptors) {
|
|
478
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
479
|
-
}
|
|
480
|
-
return interceptorPromise.then(() => {
|
|
481
|
-
if (Object.keys(localVarFormParams).length) {
|
|
482
|
-
if (localVarUseFormData) {
|
|
483
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return new Promise((resolve, reject) => {
|
|
490
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
491
|
-
if (error) {
|
|
492
|
-
reject(error);
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
496
|
-
body = models_1.ObjectSerializer.deserialize(body, "Array<CronRun>");
|
|
497
|
-
resolve({ response: response, body: body });
|
|
498
|
-
}
|
|
499
|
-
else {
|
|
500
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
});
|
|
505
|
-
});
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
*
|
|
510
|
-
* @summary Get all cron jobs for an environment
|
|
511
|
-
* @param organisation The organisation ID
|
|
512
|
-
* @param application The application ID
|
|
513
|
-
* @param environment The environment ID
|
|
514
|
-
*/
|
|
515
|
-
listCronJobs(organisation, application, environment, options = { headers: {} }) {
|
|
516
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
517
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron'
|
|
518
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
519
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
520
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
|
|
521
|
-
let localVarQueryParameters = {};
|
|
522
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
523
|
-
const produces = ['application/json'];
|
|
524
|
-
// give precedence to 'application/json'
|
|
525
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
526
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
527
|
-
}
|
|
528
|
-
else {
|
|
529
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
530
|
-
}
|
|
531
|
-
let localVarFormParams = {};
|
|
532
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
533
|
-
if (organisation === null || organisation === undefined) {
|
|
534
|
-
throw new Error('Required parameter organisation was null or undefined when calling listCronJobs.');
|
|
535
|
-
}
|
|
536
|
-
// verify required parameter 'application' is not null or undefined
|
|
537
|
-
if (application === null || application === undefined) {
|
|
538
|
-
throw new Error('Required parameter application was null or undefined when calling listCronJobs.');
|
|
539
|
-
}
|
|
540
|
-
// verify required parameter 'environment' is not null or undefined
|
|
541
|
-
if (environment === null || environment === undefined) {
|
|
542
|
-
throw new Error('Required parameter environment was null or undefined when calling listCronJobs.');
|
|
543
|
-
}
|
|
544
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
545
|
-
let localVarUseFormData = false;
|
|
546
|
-
let localVarRequestOptions = {
|
|
547
|
-
method: 'GET',
|
|
548
|
-
qs: localVarQueryParameters,
|
|
549
|
-
headers: localVarHeaderParams,
|
|
550
|
-
uri: localVarPath,
|
|
551
|
-
useQuerystring: this._useQuerystring,
|
|
552
|
-
json: true,
|
|
553
|
-
};
|
|
554
|
-
let authenticationPromise = Promise.resolve();
|
|
555
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
556
|
-
let interceptorPromise = authenticationPromise;
|
|
557
|
-
for (const interceptor of this.interceptors) {
|
|
558
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
559
|
-
}
|
|
560
|
-
return interceptorPromise.then(() => {
|
|
561
|
-
if (Object.keys(localVarFormParams).length) {
|
|
562
|
-
if (localVarUseFormData) {
|
|
563
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
564
|
-
}
|
|
565
|
-
else {
|
|
566
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
return new Promise((resolve, reject) => {
|
|
570
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
571
|
-
if (error) {
|
|
572
|
-
reject(error);
|
|
573
|
-
}
|
|
574
|
-
else {
|
|
575
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
576
|
-
body = models_1.ObjectSerializer.deserialize(body, "Cron");
|
|
577
|
-
resolve({ response: response, body: body });
|
|
578
|
-
}
|
|
579
|
-
else {
|
|
580
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
});
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
*
|
|
590
|
-
* @summary Update a cron job
|
|
591
|
-
* @param organisation The organisation ID
|
|
592
|
-
* @param application The application ID
|
|
593
|
-
* @param environment The environment ID
|
|
594
|
-
* @param cron The cron job ID
|
|
595
|
-
* @param updateCronJobRequest
|
|
596
|
-
*/
|
|
597
|
-
updateCronJob(organisation, application, environment, cron, updateCronJobRequest, options = { headers: {} }) {
|
|
598
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
599
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/cron/{cron}'
|
|
600
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
601
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
602
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
603
|
-
.replace('{' + 'cron' + '}', encodeURIComponent(String(cron)));
|
|
604
|
-
let localVarQueryParameters = {};
|
|
605
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
606
|
-
const produces = ['application/json'];
|
|
607
|
-
// give precedence to 'application/json'
|
|
608
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
609
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
610
|
-
}
|
|
611
|
-
else {
|
|
612
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
613
|
-
}
|
|
614
|
-
let localVarFormParams = {};
|
|
615
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
616
|
-
if (organisation === null || organisation === undefined) {
|
|
617
|
-
throw new Error('Required parameter organisation was null or undefined when calling updateCronJob.');
|
|
618
|
-
}
|
|
619
|
-
// verify required parameter 'application' is not null or undefined
|
|
620
|
-
if (application === null || application === undefined) {
|
|
621
|
-
throw new Error('Required parameter application was null or undefined when calling updateCronJob.');
|
|
622
|
-
}
|
|
623
|
-
// verify required parameter 'environment' is not null or undefined
|
|
624
|
-
if (environment === null || environment === undefined) {
|
|
625
|
-
throw new Error('Required parameter environment was null or undefined when calling updateCronJob.');
|
|
626
|
-
}
|
|
627
|
-
// verify required parameter 'cron' is not null or undefined
|
|
628
|
-
if (cron === null || cron === undefined) {
|
|
629
|
-
throw new Error('Required parameter cron was null or undefined when calling updateCronJob.');
|
|
630
|
-
}
|
|
631
|
-
// verify required parameter 'updateCronJobRequest' is not null or undefined
|
|
632
|
-
if (updateCronJobRequest === null || updateCronJobRequest === undefined) {
|
|
633
|
-
throw new Error('Required parameter updateCronJobRequest was null or undefined when calling updateCronJob.');
|
|
634
|
-
}
|
|
635
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
636
|
-
let localVarUseFormData = false;
|
|
637
|
-
let localVarRequestOptions = {
|
|
638
|
-
method: 'PATCH',
|
|
639
|
-
qs: localVarQueryParameters,
|
|
640
|
-
headers: localVarHeaderParams,
|
|
641
|
-
uri: localVarPath,
|
|
642
|
-
useQuerystring: this._useQuerystring,
|
|
643
|
-
json: true,
|
|
644
|
-
body: models_1.ObjectSerializer.serialize(updateCronJobRequest, "UpdateCronJobRequest")
|
|
645
|
-
};
|
|
646
|
-
let authenticationPromise = Promise.resolve();
|
|
647
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
648
|
-
let interceptorPromise = authenticationPromise;
|
|
649
|
-
for (const interceptor of this.interceptors) {
|
|
650
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
651
|
-
}
|
|
652
|
-
return interceptorPromise.then(() => {
|
|
653
|
-
if (Object.keys(localVarFormParams).length) {
|
|
654
|
-
if (localVarUseFormData) {
|
|
655
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
return new Promise((resolve, reject) => {
|
|
662
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
663
|
-
if (error) {
|
|
664
|
-
reject(error);
|
|
665
|
-
}
|
|
666
|
-
else {
|
|
667
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
668
|
-
body = models_1.ObjectSerializer.deserialize(body, "Cron");
|
|
669
|
-
resolve({ response: response, body: body });
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
exports.CronApi = CronApi;
|