@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
|
@@ -1,440 +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.BackupManagementApi = exports.BackupManagementApiApiKeys = 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 BackupManagementApiApiKeys;
|
|
35
|
-
(function (BackupManagementApiApiKeys) {
|
|
36
|
-
})(BackupManagementApiApiKeys = exports.BackupManagementApiApiKeys || (exports.BackupManagementApiApiKeys = {}));
|
|
37
|
-
class BackupManagementApi {
|
|
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[BackupManagementApiApiKeys[key]].apiKey = value;
|
|
77
|
-
}
|
|
78
|
-
addInterceptor(interceptor) {
|
|
79
|
-
this.interceptors.push(interceptor);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @summary Create a backup for an environment
|
|
84
|
-
* @param organisation The organisation ID
|
|
85
|
-
* @param application The application ID
|
|
86
|
-
* @param environment The environment ID
|
|
87
|
-
* @param type The backup type
|
|
88
|
-
* @param createBackupRequest
|
|
89
|
-
*/
|
|
90
|
-
createBackup(organisation, application, environment, type, createBackupRequest, options = { headers: {} }) {
|
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/backups/{type}'
|
|
93
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
94
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
95
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
96
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)));
|
|
97
|
-
let localVarQueryParameters = {};
|
|
98
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
99
|
-
const produces = ['application/json'];
|
|
100
|
-
// give precedence to 'application/json'
|
|
101
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
102
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
106
|
-
}
|
|
107
|
-
let localVarFormParams = {};
|
|
108
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
109
|
-
if (organisation === null || organisation === undefined) {
|
|
110
|
-
throw new Error('Required parameter organisation was null or undefined when calling createBackup.');
|
|
111
|
-
}
|
|
112
|
-
// verify required parameter 'application' is not null or undefined
|
|
113
|
-
if (application === null || application === undefined) {
|
|
114
|
-
throw new Error('Required parameter application was null or undefined when calling createBackup.');
|
|
115
|
-
}
|
|
116
|
-
// verify required parameter 'environment' is not null or undefined
|
|
117
|
-
if (environment === null || environment === undefined) {
|
|
118
|
-
throw new Error('Required parameter environment was null or undefined when calling createBackup.');
|
|
119
|
-
}
|
|
120
|
-
// verify required parameter 'type' is not null or undefined
|
|
121
|
-
if (type === null || type === undefined) {
|
|
122
|
-
throw new Error('Required parameter type was null or undefined when calling createBackup.');
|
|
123
|
-
}
|
|
124
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
125
|
-
let localVarUseFormData = false;
|
|
126
|
-
let localVarRequestOptions = {
|
|
127
|
-
method: 'POST',
|
|
128
|
-
qs: localVarQueryParameters,
|
|
129
|
-
headers: localVarHeaderParams,
|
|
130
|
-
uri: localVarPath,
|
|
131
|
-
useQuerystring: this._useQuerystring,
|
|
132
|
-
json: true,
|
|
133
|
-
body: models_1.ObjectSerializer.serialize(createBackupRequest, "CreateBackupRequest")
|
|
134
|
-
};
|
|
135
|
-
let authenticationPromise = Promise.resolve();
|
|
136
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
137
|
-
let interceptorPromise = authenticationPromise;
|
|
138
|
-
for (const interceptor of this.interceptors) {
|
|
139
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
140
|
-
}
|
|
141
|
-
return interceptorPromise.then(() => {
|
|
142
|
-
if (Object.keys(localVarFormParams).length) {
|
|
143
|
-
if (localVarUseFormData) {
|
|
144
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return new Promise((resolve, reject) => {
|
|
151
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
152
|
-
if (error) {
|
|
153
|
-
reject(error);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
157
|
-
body = models_1.ObjectSerializer.deserialize(body, "CreateBackup202Response");
|
|
158
|
-
resolve({ response: response, body: body });
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
*
|
|
171
|
-
* @summary Delete a backup
|
|
172
|
-
* @param organisation The organisation ID
|
|
173
|
-
* @param application The application ID
|
|
174
|
-
* @param environment The environment ID
|
|
175
|
-
* @param type The backup type
|
|
176
|
-
* @param backupId The backup ID
|
|
177
|
-
*/
|
|
178
|
-
deleteBackup(organisation, application, environment, type, backupId, options = { headers: {} }) {
|
|
179
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}'
|
|
181
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
182
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
183
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
184
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)))
|
|
185
|
-
.replace('{' + 'backupId' + '}', encodeURIComponent(String(backupId)));
|
|
186
|
-
let localVarQueryParameters = {};
|
|
187
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
188
|
-
const produces = ['application/json'];
|
|
189
|
-
// give precedence to 'application/json'
|
|
190
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
191
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
195
|
-
}
|
|
196
|
-
let localVarFormParams = {};
|
|
197
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
198
|
-
if (organisation === null || organisation === undefined) {
|
|
199
|
-
throw new Error('Required parameter organisation was null or undefined when calling deleteBackup.');
|
|
200
|
-
}
|
|
201
|
-
// verify required parameter 'application' is not null or undefined
|
|
202
|
-
if (application === null || application === undefined) {
|
|
203
|
-
throw new Error('Required parameter application was null or undefined when calling deleteBackup.');
|
|
204
|
-
}
|
|
205
|
-
// verify required parameter 'environment' is not null or undefined
|
|
206
|
-
if (environment === null || environment === undefined) {
|
|
207
|
-
throw new Error('Required parameter environment was null or undefined when calling deleteBackup.');
|
|
208
|
-
}
|
|
209
|
-
// verify required parameter 'type' is not null or undefined
|
|
210
|
-
if (type === null || type === undefined) {
|
|
211
|
-
throw new Error('Required parameter type was null or undefined when calling deleteBackup.');
|
|
212
|
-
}
|
|
213
|
-
// verify required parameter 'backupId' is not null or undefined
|
|
214
|
-
if (backupId === null || backupId === undefined) {
|
|
215
|
-
throw new Error('Required parameter backupId was null or undefined when calling deleteBackup.');
|
|
216
|
-
}
|
|
217
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
218
|
-
let localVarUseFormData = false;
|
|
219
|
-
let localVarRequestOptions = {
|
|
220
|
-
method: 'DELETE',
|
|
221
|
-
qs: localVarQueryParameters,
|
|
222
|
-
headers: localVarHeaderParams,
|
|
223
|
-
uri: localVarPath,
|
|
224
|
-
useQuerystring: this._useQuerystring,
|
|
225
|
-
json: true,
|
|
226
|
-
};
|
|
227
|
-
let authenticationPromise = Promise.resolve();
|
|
228
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
229
|
-
let interceptorPromise = authenticationPromise;
|
|
230
|
-
for (const interceptor of this.interceptors) {
|
|
231
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
232
|
-
}
|
|
233
|
-
return interceptorPromise.then(() => {
|
|
234
|
-
if (Object.keys(localVarFormParams).length) {
|
|
235
|
-
if (localVarUseFormData) {
|
|
236
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return new Promise((resolve, reject) => {
|
|
243
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
244
|
-
if (error) {
|
|
245
|
-
reject(error);
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
249
|
-
body = models_1.ObjectSerializer.deserialize(body, "DeleteBackup200Response");
|
|
250
|
-
resolve({ response: response, body: body });
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
*
|
|
263
|
-
* @summary Generate a download URL for a backup
|
|
264
|
-
* @param organisation The organisation ID
|
|
265
|
-
* @param application The application ID
|
|
266
|
-
* @param environment The environment ID
|
|
267
|
-
* @param type The backup type
|
|
268
|
-
* @param backupId The backup ID
|
|
269
|
-
*/
|
|
270
|
-
downloadBackup(organisation, application, environment, type, backupId, options = { headers: {} }) {
|
|
271
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/backups/{type}/{backupId}/download'
|
|
273
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
274
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
275
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
276
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)))
|
|
277
|
-
.replace('{' + 'backupId' + '}', encodeURIComponent(String(backupId)));
|
|
278
|
-
let localVarQueryParameters = {};
|
|
279
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
280
|
-
const produces = ['application/json'];
|
|
281
|
-
// give precedence to 'application/json'
|
|
282
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
283
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
287
|
-
}
|
|
288
|
-
let localVarFormParams = {};
|
|
289
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
290
|
-
if (organisation === null || organisation === undefined) {
|
|
291
|
-
throw new Error('Required parameter organisation was null or undefined when calling downloadBackup.');
|
|
292
|
-
}
|
|
293
|
-
// verify required parameter 'application' is not null or undefined
|
|
294
|
-
if (application === null || application === undefined) {
|
|
295
|
-
throw new Error('Required parameter application was null or undefined when calling downloadBackup.');
|
|
296
|
-
}
|
|
297
|
-
// verify required parameter 'environment' is not null or undefined
|
|
298
|
-
if (environment === null || environment === undefined) {
|
|
299
|
-
throw new Error('Required parameter environment was null or undefined when calling downloadBackup.');
|
|
300
|
-
}
|
|
301
|
-
// verify required parameter 'type' is not null or undefined
|
|
302
|
-
if (type === null || type === undefined) {
|
|
303
|
-
throw new Error('Required parameter type was null or undefined when calling downloadBackup.');
|
|
304
|
-
}
|
|
305
|
-
// verify required parameter 'backupId' is not null or undefined
|
|
306
|
-
if (backupId === null || backupId === undefined) {
|
|
307
|
-
throw new Error('Required parameter backupId was null or undefined when calling downloadBackup.');
|
|
308
|
-
}
|
|
309
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
310
|
-
let localVarUseFormData = false;
|
|
311
|
-
let localVarRequestOptions = {
|
|
312
|
-
method: 'GET',
|
|
313
|
-
qs: localVarQueryParameters,
|
|
314
|
-
headers: localVarHeaderParams,
|
|
315
|
-
uri: localVarPath,
|
|
316
|
-
useQuerystring: this._useQuerystring,
|
|
317
|
-
json: true,
|
|
318
|
-
};
|
|
319
|
-
let authenticationPromise = Promise.resolve();
|
|
320
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
321
|
-
let interceptorPromise = authenticationPromise;
|
|
322
|
-
for (const interceptor of this.interceptors) {
|
|
323
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
324
|
-
}
|
|
325
|
-
return interceptorPromise.then(() => {
|
|
326
|
-
if (Object.keys(localVarFormParams).length) {
|
|
327
|
-
if (localVarUseFormData) {
|
|
328
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
return new Promise((resolve, reject) => {
|
|
335
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
336
|
-
if (error) {
|
|
337
|
-
reject(error);
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
341
|
-
body = models_1.ObjectSerializer.deserialize(body, "DownloadBackup200Response");
|
|
342
|
-
resolve({ response: response, body: body });
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
*
|
|
355
|
-
* @summary List backups for an environment
|
|
356
|
-
* @param organisation The organisation ID
|
|
357
|
-
* @param application The application ID
|
|
358
|
-
* @param environment The environment ID
|
|
359
|
-
* @param type The backup type
|
|
360
|
-
*/
|
|
361
|
-
listBackups(organisation, application, environment, type, options = { headers: {} }) {
|
|
362
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
-
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/backups/{type}'
|
|
364
|
-
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
|
|
365
|
-
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
|
|
366
|
-
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
|
|
367
|
-
.replace('{' + 'type' + '}', encodeURIComponent(String(type)));
|
|
368
|
-
let localVarQueryParameters = {};
|
|
369
|
-
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
370
|
-
const produces = ['application/json'];
|
|
371
|
-
// give precedence to 'application/json'
|
|
372
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
373
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
377
|
-
}
|
|
378
|
-
let localVarFormParams = {};
|
|
379
|
-
// verify required parameter 'organisation' is not null or undefined
|
|
380
|
-
if (organisation === null || organisation === undefined) {
|
|
381
|
-
throw new Error('Required parameter organisation was null or undefined when calling listBackups.');
|
|
382
|
-
}
|
|
383
|
-
// verify required parameter 'application' is not null or undefined
|
|
384
|
-
if (application === null || application === undefined) {
|
|
385
|
-
throw new Error('Required parameter application was null or undefined when calling listBackups.');
|
|
386
|
-
}
|
|
387
|
-
// verify required parameter 'environment' is not null or undefined
|
|
388
|
-
if (environment === null || environment === undefined) {
|
|
389
|
-
throw new Error('Required parameter environment was null or undefined when calling listBackups.');
|
|
390
|
-
}
|
|
391
|
-
// verify required parameter 'type' is not null or undefined
|
|
392
|
-
if (type === null || type === undefined) {
|
|
393
|
-
throw new Error('Required parameter type was null or undefined when calling listBackups.');
|
|
394
|
-
}
|
|
395
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
396
|
-
let localVarUseFormData = false;
|
|
397
|
-
let localVarRequestOptions = {
|
|
398
|
-
method: 'GET',
|
|
399
|
-
qs: localVarQueryParameters,
|
|
400
|
-
headers: localVarHeaderParams,
|
|
401
|
-
uri: localVarPath,
|
|
402
|
-
useQuerystring: this._useQuerystring,
|
|
403
|
-
json: true,
|
|
404
|
-
};
|
|
405
|
-
let authenticationPromise = Promise.resolve();
|
|
406
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
407
|
-
let interceptorPromise = authenticationPromise;
|
|
408
|
-
for (const interceptor of this.interceptors) {
|
|
409
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
410
|
-
}
|
|
411
|
-
return interceptorPromise.then(() => {
|
|
412
|
-
if (Object.keys(localVarFormParams).length) {
|
|
413
|
-
if (localVarUseFormData) {
|
|
414
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
return new Promise((resolve, reject) => {
|
|
421
|
-
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
422
|
-
if (error) {
|
|
423
|
-
reject(error);
|
|
424
|
-
}
|
|
425
|
-
else {
|
|
426
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
427
|
-
body = models_1.ObjectSerializer.deserialize(body, "ListBackups200Response");
|
|
428
|
-
resolve({ response: response, body: body });
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
});
|
|
436
|
-
});
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
exports.BackupManagementApi = BackupManagementApi;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QuantCloud API
|
|
3
|
-
* QuantCloud API
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/// <reference types="node" />
|
|
13
|
-
import http from 'http';
|
|
14
|
-
import { Command } from '../model/command';
|
|
15
|
-
import { CreateCommandRequest } from '../model/createCommandRequest';
|
|
16
|
-
import { Authentication, Interceptor } from '../model/models';
|
|
17
|
-
export declare enum CommandsApiApiKeys {
|
|
18
|
-
}
|
|
19
|
-
export declare class CommandsApi {
|
|
20
|
-
protected _basePath: string;
|
|
21
|
-
protected _defaultHeaders: any;
|
|
22
|
-
protected _useQuerystring: boolean;
|
|
23
|
-
protected authentications: {
|
|
24
|
-
default: Authentication;
|
|
25
|
-
};
|
|
26
|
-
protected interceptors: Interceptor[];
|
|
27
|
-
constructor(basePath?: string);
|
|
28
|
-
set useQuerystring(value: boolean);
|
|
29
|
-
set basePath(basePath: string);
|
|
30
|
-
set defaultHeaders(defaultHeaders: any);
|
|
31
|
-
get defaultHeaders(): any;
|
|
32
|
-
get basePath(): string;
|
|
33
|
-
setDefaultAuthentication(auth: Authentication): void;
|
|
34
|
-
setApiKey(key: CommandsApiApiKeys, value: string): void;
|
|
35
|
-
addInterceptor(interceptor: Interceptor): void;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @summary Create a command for an environment
|
|
39
|
-
* @param organisation The organisation ID
|
|
40
|
-
* @param environment The environment ID
|
|
41
|
-
* @param createCommandRequest
|
|
42
|
-
*/
|
|
43
|
-
createCommand(organisation: string, environment: string, createCommandRequest: CreateCommandRequest, options?: {
|
|
44
|
-
headers: {
|
|
45
|
-
[name: string]: string;
|
|
46
|
-
};
|
|
47
|
-
}): Promise<{
|
|
48
|
-
response: http.IncomingMessage;
|
|
49
|
-
body: Command;
|
|
50
|
-
}>;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @summary Get a command
|
|
54
|
-
* @param organisation The organisation ID
|
|
55
|
-
* @param environment The environment ID
|
|
56
|
-
* @param command The command ID
|
|
57
|
-
*/
|
|
58
|
-
getCommand(organisation: string, environment: string, command: string, options?: {
|
|
59
|
-
headers: {
|
|
60
|
-
[name: string]: string;
|
|
61
|
-
};
|
|
62
|
-
}): Promise<{
|
|
63
|
-
response: http.IncomingMessage;
|
|
64
|
-
body: Command;
|
|
65
|
-
}>;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @summary Get all commands for an environment
|
|
69
|
-
* @param organisation The organisation ID
|
|
70
|
-
* @param environment The environment ID
|
|
71
|
-
*/
|
|
72
|
-
listCommands(organisation: string, environment: string, options?: {
|
|
73
|
-
headers: {
|
|
74
|
-
[name: string]: string;
|
|
75
|
-
};
|
|
76
|
-
}): Promise<{
|
|
77
|
-
response: http.IncomingMessage;
|
|
78
|
-
body: Command;
|
|
79
|
-
}>;
|
|
80
|
-
}
|