@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.
Files changed (138) hide show
  1. package/README.md +145 -15
  2. package/api.ts +24933 -0
  3. package/base.ts +89 -0
  4. package/common.ts +150 -0
  5. package/configuration.ts +115 -0
  6. package/dist/api.d.ts +17980 -2
  7. package/dist/api.js +13594 -16
  8. package/dist/base.d.ts +66 -0
  9. package/dist/base.js +68 -0
  10. package/dist/common.d.ts +65 -0
  11. package/dist/common.js +161 -0
  12. package/dist/configuration.d.ts +91 -0
  13. package/dist/configuration.js +44 -0
  14. package/dist/esm/api.d.ts +17980 -0
  15. package/dist/esm/api.js +13455 -0
  16. package/dist/esm/base.d.ts +66 -0
  17. package/dist/esm/base.js +63 -0
  18. package/dist/esm/common.d.ts +65 -0
  19. package/dist/esm/common.js +149 -0
  20. package/dist/esm/configuration.d.ts +91 -0
  21. package/dist/esm/configuration.js +40 -0
  22. package/dist/esm/examples/basic-usage.d.ts +4 -0
  23. package/dist/esm/examples/basic-usage.js +93 -0
  24. package/dist/esm/index.d.ts +13 -0
  25. package/dist/esm/index.js +15 -0
  26. package/dist/examples/basic-usage.d.ts +4 -0
  27. package/dist/examples/basic-usage.js +95 -0
  28. package/dist/index.d.ts +13 -0
  29. package/dist/index.js +31 -0
  30. package/index.ts +18 -0
  31. package/package.json +44 -22
  32. package/tsconfig.json +18 -0
  33. package/dist/api/apis.d.ts +0 -32
  34. package/dist/api/apis.js +0 -50
  35. package/dist/api/applicationsApi.d.ts +0 -104
  36. package/dist/api/applicationsApi.js +0 -431
  37. package/dist/api/backupManagementApi.d.ts +0 -106
  38. package/dist/api/backupManagementApi.js +0 -440
  39. package/dist/api/commandsApi.d.ts +0 -80
  40. package/dist/api/commandsApi.js +0 -316
  41. package/dist/api/composeApi.d.ts +0 -67
  42. package/dist/api/composeApi.js +0 -240
  43. package/dist/api/containersApi.d.ts +0 -67
  44. package/dist/api/containersApi.js +0 -236
  45. package/dist/api/cronApi.d.ts +0 -151
  46. package/dist/api/cronApi.js +0 -681
  47. package/dist/api/environmentsApi.d.ts +0 -194
  48. package/dist/api/environmentsApi.js +0 -861
  49. package/dist/api/sSHAccessApi.d.ts +0 -50
  50. package/dist/api/sSHAccessApi.js +0 -162
  51. package/dist/api/scalingPolicyApi.d.ts +0 -82
  52. package/dist/api/scalingPolicyApi.js +0 -307
  53. package/dist/api/variablesApi.d.ts +0 -83
  54. package/dist/api/variablesApi.js +0 -313
  55. package/dist/api/volumesApi.d.ts +0 -97
  56. package/dist/api/volumesApi.js +0 -405
  57. package/dist/model/application.d.ts +0 -38
  58. package/dist/model/application.js +0 -93
  59. package/dist/model/command.d.ts +0 -34
  60. package/dist/model/command.js +0 -73
  61. package/dist/model/compose.d.ts +0 -32
  62. package/dist/model/compose.js +0 -58
  63. package/dist/model/configuration.d.ts +0 -26
  64. package/dist/model/configuration.js +0 -30
  65. package/dist/model/container.d.ts +0 -38
  66. package/dist/model/container.js +0 -78
  67. package/dist/model/containerEnvironmentInner.d.ts +0 -26
  68. package/dist/model/containerEnvironmentInner.js +0 -33
  69. package/dist/model/containerImageReference.d.ts +0 -28
  70. package/dist/model/containerImageReference.js +0 -43
  71. package/dist/model/containerMountPointsInner.d.ts +0 -27
  72. package/dist/model/containerMountPointsInner.js +0 -38
  73. package/dist/model/createApplicationRequest.d.ts +0 -28
  74. package/dist/model/createApplicationRequest.js +0 -43
  75. package/dist/model/createBackup202Response.d.ts +0 -27
  76. package/dist/model/createBackup202Response.js +0 -38
  77. package/dist/model/createBackupRequest.d.ts +0 -32
  78. package/dist/model/createBackupRequest.js +0 -33
  79. package/dist/model/createCommandRequest.d.ts +0 -25
  80. package/dist/model/createCommandRequest.js +0 -28
  81. package/dist/model/createCronJob422Response.d.ts +0 -26
  82. package/dist/model/createCronJob422Response.js +0 -33
  83. package/dist/model/createCronJobRequest.d.ts +0 -30
  84. package/dist/model/createCronJobRequest.js +0 -56
  85. package/dist/model/createEnvironmentRequest.d.ts +0 -34
  86. package/dist/model/createEnvironmentRequest.js +0 -53
  87. package/dist/model/cron.d.ts +0 -27
  88. package/dist/model/cron.js +0 -38
  89. package/dist/model/cronRun.d.ts +0 -48
  90. package/dist/model/cronRun.js +0 -89
  91. package/dist/model/deleteBackup200Response.d.ts +0 -26
  92. package/dist/model/deleteBackup200Response.js +0 -33
  93. package/dist/model/downloadBackup200Response.d.ts +0 -36
  94. package/dist/model/downloadBackup200Response.js +0 -38
  95. package/dist/model/environment.d.ts +0 -45
  96. package/dist/model/environment.js +0 -103
  97. package/dist/model/getEcrLoginCredentials200Response.d.ts +0 -28
  98. package/dist/model/getEcrLoginCredentials200Response.js +0 -43
  99. package/dist/model/getScalingPolicies200Response.d.ts +0 -26
  100. package/dist/model/getScalingPolicies200Response.js +0 -28
  101. package/dist/model/getSshAccessCredentials200Response.d.ts +0 -34
  102. package/dist/model/getSshAccessCredentials200Response.js +0 -68
  103. package/dist/model/getSshAccessCredentials200ResponseCredentials.d.ts +0 -28
  104. package/dist/model/getSshAccessCredentials200ResponseCredentials.js +0 -43
  105. package/dist/model/listBackups200Response.d.ts +0 -28
  106. package/dist/model/listBackups200Response.js +0 -38
  107. package/dist/model/listBackups200ResponseBackupsInner.d.ts +0 -37
  108. package/dist/model/listBackups200ResponseBackupsInner.js +0 -88
  109. package/dist/model/models.d.ts +0 -85
  110. package/dist/model/models.js +0 -373
  111. package/dist/model/scalingPolicy.d.ts +0 -35
  112. package/dist/model/scalingPolicy.js +0 -51
  113. package/dist/model/syncOperation.d.ts +0 -31
  114. package/dist/model/syncOperation.js +0 -58
  115. package/dist/model/syncToEnvironmentRequest.d.ts +0 -25
  116. package/dist/model/syncToEnvironmentRequest.js +0 -28
  117. package/dist/model/updateComposeRequest.d.ts +0 -26
  118. package/dist/model/updateComposeRequest.js +0 -28
  119. package/dist/model/updateCronJobRequest.d.ts +0 -29
  120. package/dist/model/updateCronJobRequest.js +0 -48
  121. package/dist/model/updateEnvironmentComposeRequest.d.ts +0 -26
  122. package/dist/model/updateEnvironmentComposeRequest.js +0 -28
  123. package/dist/model/updateEnvironmentRequest.d.ts +0 -26
  124. package/dist/model/updateEnvironmentRequest.js +0 -28
  125. package/dist/model/updateEnvironmentStateRequest.d.ts +0 -26
  126. package/dist/model/updateEnvironmentStateRequest.js +0 -33
  127. package/dist/model/updateEnvironmentVariableRequest.d.ts +0 -25
  128. package/dist/model/updateEnvironmentVariableRequest.js +0 -28
  129. package/dist/model/validateCompose200Response.d.ts +0 -33
  130. package/dist/model/validateCompose200Response.js +0 -38
  131. package/dist/model/validateCompose422Response.d.ts +0 -25
  132. package/dist/model/validateCompose422Response.js +0 -28
  133. package/dist/model/validateComposeRequest.d.ts +0 -36
  134. package/dist/model/validateComposeRequest.js +0 -38
  135. package/dist/model/variable.d.ts +0 -26
  136. package/dist/model/variable.js +0 -33
  137. package/dist/model/volume.d.ts +0 -32
  138. package/dist/model/volume.js +0 -63
@@ -1,50 +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 { GetSshAccessCredentials200Response } from '../model/getSshAccessCredentials200Response';
15
- import { Authentication, Interceptor } from '../model/models';
16
- export declare enum SSHAccessApiApiKeys {
17
- }
18
- export declare class SSHAccessApi {
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: SSHAccessApiApiKeys, value: string): void;
34
- addInterceptor(interceptor: Interceptor): void;
35
- /**
36
- *
37
- * @summary Get SSH access credentials for an environment
38
- * @param organisation The organisation machine name
39
- * @param application The application name
40
- * @param environment The environment name
41
- */
42
- getSshAccessCredentials(organisation: string, application: string, environment: string, options?: {
43
- headers: {
44
- [name: string]: string;
45
- };
46
- }): Promise<{
47
- response: http.IncomingMessage;
48
- body: GetSshAccessCredentials200Response;
49
- }>;
50
- }
@@ -1,162 +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.SSHAccessApi = exports.SSHAccessApiApiKeys = 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 SSHAccessApiApiKeys;
35
- (function (SSHAccessApiApiKeys) {
36
- })(SSHAccessApiApiKeys = exports.SSHAccessApiApiKeys || (exports.SSHAccessApiApiKeys = {}));
37
- class SSHAccessApi {
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[SSHAccessApiApiKeys[key]].apiKey = value;
77
- }
78
- addInterceptor(interceptor) {
79
- this.interceptors.push(interceptor);
80
- }
81
- /**
82
- *
83
- * @summary Get SSH access credentials for an environment
84
- * @param organisation The organisation machine name
85
- * @param application The application name
86
- * @param environment The environment name
87
- */
88
- getSshAccessCredentials(organisation, application, environment, options = { headers: {} }) {
89
- return __awaiter(this, void 0, void 0, function* () {
90
- const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/ssh-access'
91
- .replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
92
- .replace('{' + 'application' + '}', encodeURIComponent(String(application)))
93
- .replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
94
- let localVarQueryParameters = {};
95
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
96
- const produces = ['application/json'];
97
- // give precedence to 'application/json'
98
- if (produces.indexOf('application/json') >= 0) {
99
- localVarHeaderParams.Accept = 'application/json';
100
- }
101
- else {
102
- localVarHeaderParams.Accept = produces.join(',');
103
- }
104
- let localVarFormParams = {};
105
- // verify required parameter 'organisation' is not null or undefined
106
- if (organisation === null || organisation === undefined) {
107
- throw new Error('Required parameter organisation was null or undefined when calling getSshAccessCredentials.');
108
- }
109
- // verify required parameter 'application' is not null or undefined
110
- if (application === null || application === undefined) {
111
- throw new Error('Required parameter application was null or undefined when calling getSshAccessCredentials.');
112
- }
113
- // verify required parameter 'environment' is not null or undefined
114
- if (environment === null || environment === undefined) {
115
- throw new Error('Required parameter environment was null or undefined when calling getSshAccessCredentials.');
116
- }
117
- Object.assign(localVarHeaderParams, options.headers);
118
- let localVarUseFormData = false;
119
- let localVarRequestOptions = {
120
- method: 'GET',
121
- qs: localVarQueryParameters,
122
- headers: localVarHeaderParams,
123
- uri: localVarPath,
124
- useQuerystring: this._useQuerystring,
125
- json: true,
126
- };
127
- let authenticationPromise = Promise.resolve();
128
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
129
- let interceptorPromise = authenticationPromise;
130
- for (const interceptor of this.interceptors) {
131
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
132
- }
133
- return interceptorPromise.then(() => {
134
- if (Object.keys(localVarFormParams).length) {
135
- if (localVarUseFormData) {
136
- localVarRequestOptions.formData = localVarFormParams;
137
- }
138
- else {
139
- localVarRequestOptions.form = localVarFormParams;
140
- }
141
- }
142
- return new Promise((resolve, reject) => {
143
- (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
144
- if (error) {
145
- reject(error);
146
- }
147
- else {
148
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
149
- body = models_1.ObjectSerializer.deserialize(body, "GetSshAccessCredentials200Response");
150
- resolve({ response: response, body: body });
151
- }
152
- else {
153
- reject(new apis_1.HttpError(response, body, response.statusCode));
154
- }
155
- }
156
- });
157
- });
158
- });
159
- });
160
- }
161
- }
162
- exports.SSHAccessApi = SSHAccessApi;
@@ -1,82 +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 { ScalingPolicy } from '../model/scalingPolicy';
15
- import { Authentication, Interceptor } from '../model/models';
16
- export declare enum ScalingPolicyApiApiKeys {
17
- }
18
- export declare class ScalingPolicyApi {
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: ScalingPolicyApiApiKeys, value: string): void;
34
- addInterceptor(interceptor: Interceptor): void;
35
- /**
36
- *
37
- * @summary Delete the scaling policy for an environment
38
- * @param organisation The organisation ID
39
- * @param application The application ID
40
- * @param environment The environment ID
41
- * @param policyName The policy name
42
- */
43
- deleteScalingPolicy(organisation: string, application: string, environment: string, policyName: string, options?: {
44
- headers: {
45
- [name: string]: string;
46
- };
47
- }): Promise<{
48
- response: http.IncomingMessage;
49
- body?: any;
50
- }>;
51
- /**
52
- *
53
- * @summary Get the scaling policies for an environment
54
- * @param organisation The organisation ID
55
- * @param application The application ID
56
- * @param environment The environment ID
57
- */
58
- getScalingPolicies(organisation: string, application: string, environment: string, options?: {
59
- headers: {
60
- [name: string]: string;
61
- };
62
- }): Promise<{
63
- response: http.IncomingMessage;
64
- body?: any;
65
- }>;
66
- /**
67
- *
68
- * @summary Update the scaling policy for an environment
69
- * @param organisation The organisation ID
70
- * @param application The application ID
71
- * @param environment The environment ID
72
- * @param scalingPolicy
73
- */
74
- updateScalingPolicy(organisation: string, application: string, environment: string, scalingPolicy: ScalingPolicy, options?: {
75
- headers: {
76
- [name: string]: string;
77
- };
78
- }): Promise<{
79
- response: http.IncomingMessage;
80
- body?: any;
81
- }>;
82
- }
@@ -1,307 +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.ScalingPolicyApi = exports.ScalingPolicyApiApiKeys = 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 ScalingPolicyApiApiKeys;
35
- (function (ScalingPolicyApiApiKeys) {
36
- })(ScalingPolicyApiApiKeys = exports.ScalingPolicyApiApiKeys || (exports.ScalingPolicyApiApiKeys = {}));
37
- class ScalingPolicyApi {
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[ScalingPolicyApiApiKeys[key]].apiKey = value;
77
- }
78
- addInterceptor(interceptor) {
79
- this.interceptors.push(interceptor);
80
- }
81
- /**
82
- *
83
- * @summary Delete the scaling policy for an environment
84
- * @param organisation The organisation ID
85
- * @param application The application ID
86
- * @param environment The environment ID
87
- * @param policyName The policy name
88
- */
89
- deleteScalingPolicy(organisation, application, environment, policyName, options = { headers: {} }) {
90
- return __awaiter(this, void 0, void 0, function* () {
91
- const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies/{policyName}'
92
- .replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
93
- .replace('{' + 'application' + '}', encodeURIComponent(String(application)))
94
- .replace('{' + 'environment' + '}', encodeURIComponent(String(environment)))
95
- .replace('{' + 'policyName' + '}', encodeURIComponent(String(policyName)));
96
- let localVarQueryParameters = {};
97
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
98
- let localVarFormParams = {};
99
- // verify required parameter 'organisation' is not null or undefined
100
- if (organisation === null || organisation === undefined) {
101
- throw new Error('Required parameter organisation was null or undefined when calling deleteScalingPolicy.');
102
- }
103
- // verify required parameter 'application' is not null or undefined
104
- if (application === null || application === undefined) {
105
- throw new Error('Required parameter application was null or undefined when calling deleteScalingPolicy.');
106
- }
107
- // verify required parameter 'environment' is not null or undefined
108
- if (environment === null || environment === undefined) {
109
- throw new Error('Required parameter environment was null or undefined when calling deleteScalingPolicy.');
110
- }
111
- // verify required parameter 'policyName' is not null or undefined
112
- if (policyName === null || policyName === undefined) {
113
- throw new Error('Required parameter policyName was null or undefined when calling deleteScalingPolicy.');
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 the scaling policies for an environment
161
- * @param organisation The organisation ID
162
- * @param application The application ID
163
- * @param environment The environment ID
164
- */
165
- getScalingPolicies(organisation, application, environment, options = { headers: {} }) {
166
- return __awaiter(this, void 0, void 0, function* () {
167
- const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies'
168
- .replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
169
- .replace('{' + 'application' + '}', encodeURIComponent(String(application)))
170
- .replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
171
- let localVarQueryParameters = {};
172
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
173
- let localVarFormParams = {};
174
- // verify required parameter 'organisation' is not null or undefined
175
- if (organisation === null || organisation === undefined) {
176
- throw new Error('Required parameter organisation was null or undefined when calling getScalingPolicies.');
177
- }
178
- // verify required parameter 'application' is not null or undefined
179
- if (application === null || application === undefined) {
180
- throw new Error('Required parameter application was null or undefined when calling getScalingPolicies.');
181
- }
182
- // verify required parameter 'environment' is not null or undefined
183
- if (environment === null || environment === undefined) {
184
- throw new Error('Required parameter environment was null or undefined when calling getScalingPolicies.');
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 the scaling policy for an environment
232
- * @param organisation The organisation ID
233
- * @param application The application ID
234
- * @param environment The environment ID
235
- * @param scalingPolicy
236
- */
237
- updateScalingPolicy(organisation, application, environment, scalingPolicy, options = { headers: {} }) {
238
- return __awaiter(this, void 0, void 0, function* () {
239
- const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/scaling-policies'
240
- .replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
241
- .replace('{' + 'application' + '}', encodeURIComponent(String(application)))
242
- .replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
243
- let localVarQueryParameters = {};
244
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
245
- let localVarFormParams = {};
246
- // verify required parameter 'organisation' is not null or undefined
247
- if (organisation === null || organisation === undefined) {
248
- throw new Error('Required parameter organisation was null or undefined when calling updateScalingPolicy.');
249
- }
250
- // verify required parameter 'application' is not null or undefined
251
- if (application === null || application === undefined) {
252
- throw new Error('Required parameter application was null or undefined when calling updateScalingPolicy.');
253
- }
254
- // verify required parameter 'environment' is not null or undefined
255
- if (environment === null || environment === undefined) {
256
- throw new Error('Required parameter environment was null or undefined when calling updateScalingPolicy.');
257
- }
258
- // verify required parameter 'scalingPolicy' is not null or undefined
259
- if (scalingPolicy === null || scalingPolicy === undefined) {
260
- throw new Error('Required parameter scalingPolicy was null or undefined when calling updateScalingPolicy.');
261
- }
262
- Object.assign(localVarHeaderParams, options.headers);
263
- let localVarUseFormData = false;
264
- let localVarRequestOptions = {
265
- method: 'PUT',
266
- qs: localVarQueryParameters,
267
- headers: localVarHeaderParams,
268
- uri: localVarPath,
269
- useQuerystring: this._useQuerystring,
270
- json: true,
271
- body: models_1.ObjectSerializer.serialize(scalingPolicy, "ScalingPolicy")
272
- };
273
- let authenticationPromise = Promise.resolve();
274
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
275
- let interceptorPromise = authenticationPromise;
276
- for (const interceptor of this.interceptors) {
277
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
278
- }
279
- return interceptorPromise.then(() => {
280
- if (Object.keys(localVarFormParams).length) {
281
- if (localVarUseFormData) {
282
- localVarRequestOptions.formData = localVarFormParams;
283
- }
284
- else {
285
- localVarRequestOptions.form = localVarFormParams;
286
- }
287
- }
288
- return new Promise((resolve, reject) => {
289
- (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
290
- if (error) {
291
- reject(error);
292
- }
293
- else {
294
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
295
- resolve({ response: response, body: body });
296
- }
297
- else {
298
- reject(new apis_1.HttpError(response, body, response.statusCode));
299
- }
300
- }
301
- });
302
- });
303
- });
304
- });
305
- }
306
- }
307
- exports.ScalingPolicyApi = ScalingPolicyApi;
@@ -1,83 +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 { UpdateEnvironmentVariableRequest } from '../model/updateEnvironmentVariableRequest';
15
- import { Authentication, Interceptor } from '../model/models';
16
- export declare enum VariablesApiApiKeys {
17
- }
18
- export declare class VariablesApi {
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: VariablesApiApiKeys, value: string): void;
34
- addInterceptor(interceptor: Interceptor): void;
35
- /**
36
- *
37
- * @summary Delete a variable
38
- * @param apiOrganisation The organisation ID
39
- * @param apiApplication The application ID
40
- * @param apiEnvironment The environment ID
41
- * @param apiVariable The variable key
42
- */
43
- deleteEnvironmentVariable(apiOrganisation: string, apiApplication: string, apiEnvironment: string, apiVariable: string, options?: {
44
- headers: {
45
- [name: string]: string;
46
- };
47
- }): Promise<{
48
- response: http.IncomingMessage;
49
- body?: any;
50
- }>;
51
- /**
52
- *
53
- * @summary Get all variables for an environment
54
- * @param apiOrganisation The organisation ID
55
- * @param apiApplication The application ID
56
- * @param apiEnvironment The environment ID
57
- */
58
- listEnvironmentVariables(apiOrganisation: string, apiApplication: string, apiEnvironment: string, options?: {
59
- headers: {
60
- [name: string]: string;
61
- };
62
- }): Promise<{
63
- response: http.IncomingMessage;
64
- body?: any;
65
- }>;
66
- /**
67
- *
68
- * @summary Update a variable
69
- * @param apiOrganisation The organisation ID
70
- * @param apiApplication The application ID
71
- * @param apiEnvironment The environment ID
72
- * @param apiVariable The variable key
73
- * @param updateEnvironmentVariableRequest
74
- */
75
- updateEnvironmentVariable(apiOrganisation: string, apiApplication: string, apiEnvironment: string, apiVariable: string, updateEnvironmentVariableRequest: UpdateEnvironmentVariableRequest, options?: {
76
- headers: {
77
- [name: string]: string;
78
- };
79
- }): Promise<{
80
- response: http.IncomingMessage;
81
- body?: any;
82
- }>;
83
- }