@quantcdn/quant-client 2.0.13 → 3.0.1
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 +49 -72
- package/dist/api/apis.d.ts +32 -0
- package/dist/api/apis.js +50 -0
- package/dist/api/applicationsApi.d.ts +104 -0
- package/dist/api/applicationsApi.js +431 -0
- package/dist/api/backupManagementApi.d.ts +106 -0
- package/dist/api/backupManagementApi.js +440 -0
- package/dist/api/commandsApi.d.ts +80 -0
- package/dist/api/commandsApi.js +316 -0
- package/dist/api/composeApi.d.ts +66 -0
- package/dist/api/composeApi.js +236 -0
- package/dist/api/containersApi.d.ts +67 -0
- package/dist/api/containersApi.js +236 -0
- package/dist/api/cronApi.d.ts +151 -0
- package/dist/api/cronApi.js +681 -0
- package/dist/api/environmentsApi.d.ts +194 -0
- package/dist/api/environmentsApi.js +861 -0
- package/dist/api/sSHAccessApi.d.ts +50 -0
- package/dist/api/sSHAccessApi.js +162 -0
- package/dist/api/scalingPolicyApi.d.ts +82 -0
- package/dist/api/scalingPolicyApi.js +307 -0
- package/dist/api/variablesApi.d.ts +83 -0
- package/dist/api/variablesApi.js +313 -0
- package/dist/api/volumesApi.d.ts +97 -0
- package/dist/api/volumesApi.js +405 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +19 -0
- package/dist/model/application.d.ts +38 -0
- package/dist/model/application.js +93 -0
- package/dist/model/command.d.ts +34 -0
- package/dist/model/command.js +73 -0
- package/dist/model/compose.d.ts +32 -0
- package/dist/model/compose.js +58 -0
- package/dist/model/configuration.d.ts +26 -0
- package/dist/model/configuration.js +30 -0
- package/dist/model/container.d.ts +38 -0
- package/dist/model/container.js +78 -0
- package/dist/model/containerEnvironmentInner.d.ts +26 -0
- package/dist/model/containerEnvironmentInner.js +33 -0
- package/dist/model/containerImageReference.d.ts +28 -0
- package/dist/model/containerImageReference.js +43 -0
- package/dist/model/containerMountPointsInner.d.ts +27 -0
- package/dist/model/containerMountPointsInner.js +38 -0
- package/dist/model/createApplicationRequest.d.ts +28 -0
- package/dist/model/createApplicationRequest.js +43 -0
- package/dist/model/createBackup202Response.d.ts +27 -0
- package/dist/model/createBackup202Response.js +38 -0
- package/dist/model/createBackupRequest.d.ts +32 -0
- package/dist/model/createBackupRequest.js +33 -0
- package/dist/model/createCommandRequest.d.ts +25 -0
- package/dist/model/createCommandRequest.js +28 -0
- package/dist/model/createCronJob422Response.d.ts +26 -0
- package/dist/model/createCronJob422Response.js +33 -0
- package/dist/model/createCronJobRequest.d.ts +30 -0
- package/dist/model/createCronJobRequest.js +56 -0
- package/dist/model/createEnvironmentRequest.d.ts +34 -0
- package/dist/model/createEnvironmentRequest.js +53 -0
- package/dist/model/cron.d.ts +27 -0
- package/dist/model/cron.js +38 -0
- package/dist/model/cronRun.d.ts +48 -0
- package/dist/model/cronRun.js +89 -0
- package/dist/model/deleteBackup200Response.d.ts +26 -0
- package/dist/model/deleteBackup200Response.js +33 -0
- package/dist/model/downloadBackup200Response.d.ts +36 -0
- package/dist/model/downloadBackup200Response.js +38 -0
- package/dist/model/environment.d.ts +45 -0
- package/dist/model/environment.js +103 -0
- package/dist/model/getEcrLoginCredentials200Response.d.ts +28 -0
- package/dist/model/getEcrLoginCredentials200Response.js +43 -0
- package/dist/model/getScalingPolicies200Response.d.ts +26 -0
- package/dist/model/getScalingPolicies200Response.js +28 -0
- package/dist/model/getSshAccessCredentials200Response.d.ts +34 -0
- package/dist/model/getSshAccessCredentials200Response.js +68 -0
- package/dist/model/getSshAccessCredentials200ResponseCredentials.d.ts +28 -0
- package/dist/model/getSshAccessCredentials200ResponseCredentials.js +43 -0
- package/dist/model/listBackups200Response.d.ts +26 -0
- package/dist/model/listBackups200Response.js +28 -0
- package/dist/model/listBackups200ResponseBackupsInner.d.ts +29 -0
- package/dist/model/listBackups200ResponseBackupsInner.js +48 -0
- package/dist/model/models.d.ts +84 -0
- package/dist/model/models.js +370 -0
- package/dist/model/scalingPolicy.d.ts +35 -0
- package/dist/model/scalingPolicy.js +51 -0
- package/dist/model/syncOperation.d.ts +31 -0
- package/dist/model/syncOperation.js +58 -0
- package/dist/model/syncToEnvironmentRequest.d.ts +25 -0
- package/dist/model/syncToEnvironmentRequest.js +28 -0
- package/dist/model/updateComposeRequest.d.ts +26 -0
- package/dist/model/updateComposeRequest.js +28 -0
- package/dist/model/updateCronJobRequest.d.ts +29 -0
- package/dist/model/updateCronJobRequest.js +48 -0
- package/dist/model/updateEnvironmentComposeRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentComposeRequest.js +28 -0
- package/dist/model/updateEnvironmentRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentRequest.js +28 -0
- package/dist/model/updateEnvironmentStateRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentStateRequest.js +33 -0
- package/dist/model/updateEnvironmentVariableRequest.d.ts +25 -0
- package/dist/model/updateEnvironmentVariableRequest.js +28 -0
- package/dist/model/validateCompose200Response.d.ts +27 -0
- package/dist/model/validateCompose200Response.js +38 -0
- package/dist/model/validateComposeRequest.d.ts +25 -0
- package/dist/model/validateComposeRequest.js +28 -0
- package/dist/model/variable.d.ts +26 -0
- package/dist/model/variable.js +33 -0
- package/dist/model/volume.d.ts +32 -0
- package/dist/model/volume.js +63 -0
- package/package.json +21 -40
- package/dist/src/client.d.ts +0 -15
- package/dist/src/client.js +0 -380
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +0 -42
- package/dist/src/interfaces.d.ts +0 -34
- package/dist/src/interfaces.js +0 -2
- package/dist/src/response.d.ts +0 -15
- package/dist/src/response.js +0 -103
- package/dist/src/types.d.ts +0 -68
- package/dist/src/types.js +0 -8
- package/dist/tests/client.test.d.ts +0 -1
- package/dist/tests/client.test.js +0 -191
- package/dist/tests/response.test.d.ts +0 -1
- package/dist/tests/response.test.js +0 -133
|
@@ -0,0 +1,313 @@
|
|
|
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.VariablesApi = exports.VariablesApiApiKeys = 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 VariablesApiApiKeys;
|
|
35
|
+
(function (VariablesApiApiKeys) {
|
|
36
|
+
})(VariablesApiApiKeys = exports.VariablesApiApiKeys || (exports.VariablesApiApiKeys = {}));
|
|
37
|
+
class VariablesApi {
|
|
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[VariablesApiApiKeys[key]].apiKey = value;
|
|
77
|
+
}
|
|
78
|
+
addInterceptor(interceptor) {
|
|
79
|
+
this.interceptors.push(interceptor);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @summary Delete a variable
|
|
84
|
+
* @param apiOrganisation The organisation ID
|
|
85
|
+
* @param apiApplication The application ID
|
|
86
|
+
* @param apiEnvironment The environment ID
|
|
87
|
+
* @param apiVariable The variable key
|
|
88
|
+
*/
|
|
89
|
+
deleteEnvironmentVariable(apiOrganisation, apiApplication, apiEnvironment, apiVariable, options = { headers: {} }) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const localVarPath = this.basePath + '/organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable}'
|
|
92
|
+
.replace('{' + 'api_organisation' + '}', encodeURIComponent(String(apiOrganisation)))
|
|
93
|
+
.replace('{' + 'api_application' + '}', encodeURIComponent(String(apiApplication)))
|
|
94
|
+
.replace('{' + 'api_environment' + '}', encodeURIComponent(String(apiEnvironment)))
|
|
95
|
+
.replace('{' + 'api_variable' + '}', encodeURIComponent(String(apiVariable)));
|
|
96
|
+
let localVarQueryParameters = {};
|
|
97
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
98
|
+
let localVarFormParams = {};
|
|
99
|
+
// verify required parameter 'apiOrganisation' is not null or undefined
|
|
100
|
+
if (apiOrganisation === null || apiOrganisation === undefined) {
|
|
101
|
+
throw new Error('Required parameter apiOrganisation was null or undefined when calling deleteEnvironmentVariable.');
|
|
102
|
+
}
|
|
103
|
+
// verify required parameter 'apiApplication' is not null or undefined
|
|
104
|
+
if (apiApplication === null || apiApplication === undefined) {
|
|
105
|
+
throw new Error('Required parameter apiApplication was null or undefined when calling deleteEnvironmentVariable.');
|
|
106
|
+
}
|
|
107
|
+
// verify required parameter 'apiEnvironment' is not null or undefined
|
|
108
|
+
if (apiEnvironment === null || apiEnvironment === undefined) {
|
|
109
|
+
throw new Error('Required parameter apiEnvironment was null or undefined when calling deleteEnvironmentVariable.');
|
|
110
|
+
}
|
|
111
|
+
// verify required parameter 'apiVariable' is not null or undefined
|
|
112
|
+
if (apiVariable === null || apiVariable === undefined) {
|
|
113
|
+
throw new Error('Required parameter apiVariable was null or undefined when calling deleteEnvironmentVariable.');
|
|
114
|
+
}
|
|
115
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
116
|
+
let localVarUseFormData = false;
|
|
117
|
+
let localVarRequestOptions = {
|
|
118
|
+
method: 'DELETE',
|
|
119
|
+
qs: localVarQueryParameters,
|
|
120
|
+
headers: localVarHeaderParams,
|
|
121
|
+
uri: localVarPath,
|
|
122
|
+
useQuerystring: this._useQuerystring,
|
|
123
|
+
json: true,
|
|
124
|
+
};
|
|
125
|
+
let authenticationPromise = Promise.resolve();
|
|
126
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
127
|
+
let interceptorPromise = authenticationPromise;
|
|
128
|
+
for (const interceptor of this.interceptors) {
|
|
129
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
130
|
+
}
|
|
131
|
+
return interceptorPromise.then(() => {
|
|
132
|
+
if (Object.keys(localVarFormParams).length) {
|
|
133
|
+
if (localVarUseFormData) {
|
|
134
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return new Promise((resolve, reject) => {
|
|
141
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
142
|
+
if (error) {
|
|
143
|
+
reject(error);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
147
|
+
resolve({ response: response, body: body });
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
*
|
|
160
|
+
* @summary Get all variables for an environment
|
|
161
|
+
* @param apiOrganisation The organisation ID
|
|
162
|
+
* @param apiApplication The application ID
|
|
163
|
+
* @param apiEnvironment The environment ID
|
|
164
|
+
*/
|
|
165
|
+
listEnvironmentVariables(apiOrganisation, apiApplication, apiEnvironment, options = { headers: {} }) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
const localVarPath = this.basePath + '/organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables'
|
|
168
|
+
.replace('{' + 'api_organisation' + '}', encodeURIComponent(String(apiOrganisation)))
|
|
169
|
+
.replace('{' + 'api_application' + '}', encodeURIComponent(String(apiApplication)))
|
|
170
|
+
.replace('{' + 'api_environment' + '}', encodeURIComponent(String(apiEnvironment)));
|
|
171
|
+
let localVarQueryParameters = {};
|
|
172
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
173
|
+
let localVarFormParams = {};
|
|
174
|
+
// verify required parameter 'apiOrganisation' is not null or undefined
|
|
175
|
+
if (apiOrganisation === null || apiOrganisation === undefined) {
|
|
176
|
+
throw new Error('Required parameter apiOrganisation was null or undefined when calling listEnvironmentVariables.');
|
|
177
|
+
}
|
|
178
|
+
// verify required parameter 'apiApplication' is not null or undefined
|
|
179
|
+
if (apiApplication === null || apiApplication === undefined) {
|
|
180
|
+
throw new Error('Required parameter apiApplication was null or undefined when calling listEnvironmentVariables.');
|
|
181
|
+
}
|
|
182
|
+
// verify required parameter 'apiEnvironment' is not null or undefined
|
|
183
|
+
if (apiEnvironment === null || apiEnvironment === undefined) {
|
|
184
|
+
throw new Error('Required parameter apiEnvironment was null or undefined when calling listEnvironmentVariables.');
|
|
185
|
+
}
|
|
186
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
187
|
+
let localVarUseFormData = false;
|
|
188
|
+
let localVarRequestOptions = {
|
|
189
|
+
method: 'GET',
|
|
190
|
+
qs: localVarQueryParameters,
|
|
191
|
+
headers: localVarHeaderParams,
|
|
192
|
+
uri: localVarPath,
|
|
193
|
+
useQuerystring: this._useQuerystring,
|
|
194
|
+
json: true,
|
|
195
|
+
};
|
|
196
|
+
let authenticationPromise = Promise.resolve();
|
|
197
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
198
|
+
let interceptorPromise = authenticationPromise;
|
|
199
|
+
for (const interceptor of this.interceptors) {
|
|
200
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
201
|
+
}
|
|
202
|
+
return interceptorPromise.then(() => {
|
|
203
|
+
if (Object.keys(localVarFormParams).length) {
|
|
204
|
+
if (localVarUseFormData) {
|
|
205
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return new Promise((resolve, reject) => {
|
|
212
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
213
|
+
if (error) {
|
|
214
|
+
reject(error);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
218
|
+
resolve({ response: response, body: body });
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @summary Update a variable
|
|
232
|
+
* @param apiOrganisation The organisation ID
|
|
233
|
+
* @param apiApplication The application ID
|
|
234
|
+
* @param apiEnvironment The environment ID
|
|
235
|
+
* @param apiVariable The variable key
|
|
236
|
+
* @param updateEnvironmentVariableRequest
|
|
237
|
+
*/
|
|
238
|
+
updateEnvironmentVariable(apiOrganisation, apiApplication, apiEnvironment, apiVariable, updateEnvironmentVariableRequest, options = { headers: {} }) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
const localVarPath = this.basePath + '/organisations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable}'
|
|
241
|
+
.replace('{' + 'api_organisation' + '}', encodeURIComponent(String(apiOrganisation)))
|
|
242
|
+
.replace('{' + 'api_application' + '}', encodeURIComponent(String(apiApplication)))
|
|
243
|
+
.replace('{' + 'api_environment' + '}', encodeURIComponent(String(apiEnvironment)))
|
|
244
|
+
.replace('{' + 'api_variable' + '}', encodeURIComponent(String(apiVariable)));
|
|
245
|
+
let localVarQueryParameters = {};
|
|
246
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
247
|
+
let localVarFormParams = {};
|
|
248
|
+
// verify required parameter 'apiOrganisation' is not null or undefined
|
|
249
|
+
if (apiOrganisation === null || apiOrganisation === undefined) {
|
|
250
|
+
throw new Error('Required parameter apiOrganisation was null or undefined when calling updateEnvironmentVariable.');
|
|
251
|
+
}
|
|
252
|
+
// verify required parameter 'apiApplication' is not null or undefined
|
|
253
|
+
if (apiApplication === null || apiApplication === undefined) {
|
|
254
|
+
throw new Error('Required parameter apiApplication was null or undefined when calling updateEnvironmentVariable.');
|
|
255
|
+
}
|
|
256
|
+
// verify required parameter 'apiEnvironment' is not null or undefined
|
|
257
|
+
if (apiEnvironment === null || apiEnvironment === undefined) {
|
|
258
|
+
throw new Error('Required parameter apiEnvironment was null or undefined when calling updateEnvironmentVariable.');
|
|
259
|
+
}
|
|
260
|
+
// verify required parameter 'apiVariable' is not null or undefined
|
|
261
|
+
if (apiVariable === null || apiVariable === undefined) {
|
|
262
|
+
throw new Error('Required parameter apiVariable was null or undefined when calling updateEnvironmentVariable.');
|
|
263
|
+
}
|
|
264
|
+
// verify required parameter 'updateEnvironmentVariableRequest' is not null or undefined
|
|
265
|
+
if (updateEnvironmentVariableRequest === null || updateEnvironmentVariableRequest === undefined) {
|
|
266
|
+
throw new Error('Required parameter updateEnvironmentVariableRequest was null or undefined when calling updateEnvironmentVariable.');
|
|
267
|
+
}
|
|
268
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
269
|
+
let localVarUseFormData = false;
|
|
270
|
+
let localVarRequestOptions = {
|
|
271
|
+
method: 'PUT',
|
|
272
|
+
qs: localVarQueryParameters,
|
|
273
|
+
headers: localVarHeaderParams,
|
|
274
|
+
uri: localVarPath,
|
|
275
|
+
useQuerystring: this._useQuerystring,
|
|
276
|
+
json: true,
|
|
277
|
+
body: models_1.ObjectSerializer.serialize(updateEnvironmentVariableRequest, "UpdateEnvironmentVariableRequest")
|
|
278
|
+
};
|
|
279
|
+
let authenticationPromise = Promise.resolve();
|
|
280
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
281
|
+
let interceptorPromise = authenticationPromise;
|
|
282
|
+
for (const interceptor of this.interceptors) {
|
|
283
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
284
|
+
}
|
|
285
|
+
return interceptorPromise.then(() => {
|
|
286
|
+
if (Object.keys(localVarFormParams).length) {
|
|
287
|
+
if (localVarUseFormData) {
|
|
288
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return new Promise((resolve, reject) => {
|
|
295
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
296
|
+
if (error) {
|
|
297
|
+
reject(error);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
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
|
+
exports.VariablesApi = VariablesApi;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 { Volume } from '../model/volume';
|
|
15
|
+
import { Authentication, Interceptor } from '../model/models';
|
|
16
|
+
export declare enum VolumesApiApiKeys {
|
|
17
|
+
}
|
|
18
|
+
export declare class VolumesApi {
|
|
19
|
+
protected _basePath: string;
|
|
20
|
+
protected _defaultHeaders: any;
|
|
21
|
+
protected _useQuerystring: boolean;
|
|
22
|
+
protected authentications: {
|
|
23
|
+
default: Authentication;
|
|
24
|
+
};
|
|
25
|
+
protected interceptors: Interceptor[];
|
|
26
|
+
constructor(basePath?: string);
|
|
27
|
+
set useQuerystring(value: boolean);
|
|
28
|
+
set basePath(basePath: string);
|
|
29
|
+
set defaultHeaders(defaultHeaders: any);
|
|
30
|
+
get defaultHeaders(): any;
|
|
31
|
+
get basePath(): string;
|
|
32
|
+
setDefaultAuthentication(auth: Authentication): void;
|
|
33
|
+
setApiKey(key: VolumesApiApiKeys, value: string): void;
|
|
34
|
+
addInterceptor(interceptor: Interceptor): void;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @summary Create a new volume
|
|
38
|
+
* @param organisation The organisation ID
|
|
39
|
+
* @param application The application ID
|
|
40
|
+
* @param environment The environment ID
|
|
41
|
+
*/
|
|
42
|
+
createVolume(organisation: string, application: string, environment: string, options?: {
|
|
43
|
+
headers: {
|
|
44
|
+
[name: string]: string;
|
|
45
|
+
};
|
|
46
|
+
}): Promise<{
|
|
47
|
+
response: http.IncomingMessage;
|
|
48
|
+
body: Volume;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @summary Delete a volume
|
|
53
|
+
* @param organisation The organisation ID
|
|
54
|
+
* @param application The application ID
|
|
55
|
+
* @param environment The environment ID
|
|
56
|
+
* @param volume The volume ID
|
|
57
|
+
*/
|
|
58
|
+
deleteVolume(organisation: string, application: string, environment: string, volume: string, options?: {
|
|
59
|
+
headers: {
|
|
60
|
+
[name: string]: string;
|
|
61
|
+
};
|
|
62
|
+
}): Promise<{
|
|
63
|
+
response: http.IncomingMessage;
|
|
64
|
+
body?: any;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @summary Get a volume
|
|
69
|
+
* @param organisation The organisation ID
|
|
70
|
+
* @param application The application ID
|
|
71
|
+
* @param environment The environment ID
|
|
72
|
+
* @param volume The volume ID
|
|
73
|
+
*/
|
|
74
|
+
getVolume(organisation: string, application: string, environment: string, volume: string, options?: {
|
|
75
|
+
headers: {
|
|
76
|
+
[name: string]: string;
|
|
77
|
+
};
|
|
78
|
+
}): Promise<{
|
|
79
|
+
response: http.IncomingMessage;
|
|
80
|
+
body: Volume;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @summary Get all volumes for an environment
|
|
85
|
+
* @param organisation The organisation ID
|
|
86
|
+
* @param application The application ID
|
|
87
|
+
* @param environment The environment ID
|
|
88
|
+
*/
|
|
89
|
+
listVolumes(organisation: string, application: string, environment: string, options?: {
|
|
90
|
+
headers: {
|
|
91
|
+
[name: string]: string;
|
|
92
|
+
};
|
|
93
|
+
}): Promise<{
|
|
94
|
+
response: http.IncomingMessage;
|
|
95
|
+
body: Volume;
|
|
96
|
+
}>;
|
|
97
|
+
}
|