Skip to content

Commit b564a92

Browse files
committed
Update client
1 parent ec5f785 commit b564a92

14 files changed

+396
-30
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ model/application.ts
1717
model/command.ts
1818
model/compose.ts
1919
model/container.ts
20+
model/containerDependsOnInner.ts
2021
model/containerEnvironmentInner.ts
22+
model/containerHealthCheck.ts
2123
model/containerImageReference.ts
2224
model/containerMountPointsInner.ts
25+
model/containerSecretsInner.ts
2326
model/createBackup202Response.ts
2427
model/createBackupRequest.ts
2528
model/createCommandRequest.ts
@@ -36,6 +39,7 @@ model/getSshAccessCredentials200Response.ts
3639
model/getSshAccessCredentials200ResponseCredentials.ts
3740
model/listBackups200Response.ts
3841
model/listBackups200ResponseBackupsInner.ts
42+
model/listBackups422Response.ts
3943
model/models.ts
4044
model/scalingPolicy.ts
4145
model/syncOperation.ts

api/backupManagementApi.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { CreateBackupRequest } from '../model/createBackupRequest';
2020
import { DeleteBackup200Response } from '../model/deleteBackup200Response';
2121
import { DownloadBackup200Response } from '../model/downloadBackup200Response';
2222
import { ListBackups200Response } from '../model/listBackups200Response';
23+
import { ListBackups422Response } from '../model/listBackups422Response';
2324

2425
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
2526

@@ -377,14 +378,20 @@ export class BackupManagementApi {
377378
});
378379
}
379380
/**
380-
*
381+
* Retrieves a list of backups (database or filesystem) for the environment with status, size, and metadata. Supports filtering and ordering via query parameters.
381382
* @summary List backups for an environment
382383
* @param organisation The organisation ID
383384
* @param application The application ID
384385
* @param environment The environment ID
385386
* @param type The backup type
387+
* @param order Sort order for backups by creation date (asc = oldest first, desc = newest first)
388+
* @param limit Maximum number of backups to return (max 100)
389+
* @param createdBefore Only return backups created before this ISO 8601 timestamp (e.g., 2025-01-01T00:00:00Z)
390+
* @param createdAfter Only return backups created after this ISO 8601 timestamp (e.g., 2024-12-01T00:00:00Z)
391+
* @param status Filter backups by status
392+
* @param nextToken Token for retrieving the next page of results
386393
*/
387-
public async listBackups (organisation: string, application: string, environment: string, type: 'database' | 'filesystem', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListBackups200Response; }> {
394+
public async listBackups (organisation: string, application: string, environment: string, type: 'database' | 'filesystem', order?: 'asc' | 'desc', limit?: number, createdBefore?: Date, createdAfter?: Date, status?: 'completed' | 'failed' | 'running', nextToken?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListBackups200Response; }> {
388395
const localVarPath = this.basePath + '/organisations/{organisation}/applications/{application}/environments/{environment}/backups/{type}'
389396
.replace('{' + 'organisation' + '}', encodeURIComponent(String(organisation)))
390397
.replace('{' + 'application' + '}', encodeURIComponent(String(application)))
@@ -421,6 +428,30 @@ export class BackupManagementApi {
421428
throw new Error('Required parameter type was null or undefined when calling listBackups.');
422429
}
423430

431+
if (order !== undefined) {
432+
localVarQueryParameters['order'] = ObjectSerializer.serialize(order, "'asc' | 'desc'");
433+
}
434+
435+
if (limit !== undefined) {
436+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
437+
}
438+
439+
if (createdBefore !== undefined) {
440+
localVarQueryParameters['createdBefore'] = ObjectSerializer.serialize(createdBefore, "Date");
441+
}
442+
443+
if (createdAfter !== undefined) {
444+
localVarQueryParameters['createdAfter'] = ObjectSerializer.serialize(createdAfter, "Date");
445+
}
446+
447+
if (status !== undefined) {
448+
localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'completed' | 'failed' | 'running'");
449+
}
450+
451+
if (nextToken !== undefined) {
452+
localVarQueryParameters['nextToken'] = ObjectSerializer.serialize(nextToken, "string");
453+
}
454+
424455
(<any>Object).assign(localVarHeaderParams, options.headers);
425456

426457
let localVarUseFormData = false;

api/environmentsApi.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import localVarRequest from 'request';
1515
import http from 'http';
1616

1717
/* tslint:disable:no-unused-locals */
18+
import { CreateCronJob422Response } from '../model/createCronJob422Response';
1819
import { CreateEnvironmentRequest } from '../model/createEnvironmentRequest';
1920
import { Environment } from '../model/environment';
2021
import { SyncOperation } from '../model/syncOperation';
@@ -746,8 +747,8 @@ export class EnvironmentsApi {
746747
});
747748
}
748749
/**
749-
*
750-
* @summary Update the compose for an environment
750+
* Replaces the entire task definition for the environment based on the provided multi-container compose definition. This will create a new task definition revision and update the ECS service, triggering a redeployment. Optionally accepts minCapacity and maxCapacity at the root level for convenience.
751+
* @summary Update Environment Compose Definition
751752
* @param organisation The organisation ID
752753
* @param application The application ID
753754
* @param environment The environment ID
@@ -760,6 +761,13 @@ export class EnvironmentsApi {
760761
.replace('{' + 'environment' + '}', encodeURIComponent(String(environment)));
761762
let localVarQueryParameters: any = {};
762763
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
764+
const produces = ['application/json'];
765+
// give precedence to 'application/json'
766+
if (produces.indexOf('application/json') >= 0) {
767+
localVarHeaderParams.Accept = 'application/json';
768+
} else {
769+
localVarHeaderParams.Accept = produces.join(',');
770+
}
763771
let localVarFormParams: any = {};
764772

765773
// verify required parameter 'organisation' is not null or undefined

model/container.ts

Lines changed: 81 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,59 @@
1111
*/
1212

1313
import { RequestFile } from './models';
14+
import { ContainerDependsOnInner } from './containerDependsOnInner';
1415
import { ContainerEnvironmentInner } from './containerEnvironmentInner';
16+
import { ContainerHealthCheck } from './containerHealthCheck';
1517
import { ContainerImageReference } from './containerImageReference';
1618
import { ContainerMountPointsInner } from './containerMountPointsInner';
19+
import { ContainerSecretsInner } from './containerSecretsInner';
1720

1821
export class Container {
22+
/**
23+
* Name of the container
24+
*/
1925
'name': string;
2026
'imageReference': ContainerImageReference;
21-
'cpu'?: number;
22-
'memory'?: number;
23-
'memoryReservation'?: number;
24-
'exposedPorts'?: Array<number>;
25-
'mountPoints'?: Array<ContainerMountPointsInner>;
26-
'environment'?: Array<ContainerEnvironmentInner>;
27-
'command'?: Array<string>;
28-
'entryPoint'?: Array<string>;
29-
'essential'?: boolean;
27+
/**
28+
* Container-level CPU units
29+
*/
30+
'cpu'?: number | null;
31+
/**
32+
* Container-level memory hard limit (MiB)
33+
*/
34+
'memory'?: number | null;
35+
/**
36+
* Container-level memory soft limit (MiB)
37+
*/
38+
'memoryReservation'?: number | null;
39+
/**
40+
* List of container ports to expose
41+
*/
42+
'exposedPorts'?: Array<number> | null;
43+
'mountPoints'?: Array<ContainerMountPointsInner> | null;
44+
/**
45+
* Environment variables specific to this container
46+
*/
47+
'environment'?: Array<ContainerEnvironmentInner> | null;
48+
/**
49+
* Secrets mapped to environment variables
50+
*/
51+
'secrets'?: Array<ContainerSecretsInner> | null;
52+
'healthCheck'?: ContainerHealthCheck | null;
53+
/**
54+
* Container startup dependencies
55+
*/
56+
'dependsOn'?: Array<ContainerDependsOnInner> | null;
57+
'command'?: Array<string> | null;
58+
'entryPoint'?: Array<string> | null;
59+
'workingDirectory'?: string | null;
60+
'essential'?: boolean | null = true;
61+
'readonlyRootFilesystem'?: boolean | null = false;
62+
'user'?: string | null;
63+
/**
64+
* Enable origin protection for all exposed ports on this container
65+
*/
66+
'originProtection'?: boolean | null = false;
3067

3168
static discriminator: string | undefined = undefined;
3269

@@ -71,6 +108,21 @@ export class Container {
71108
"baseName": "environment",
72109
"type": "Array<ContainerEnvironmentInner>"
73110
},
111+
{
112+
"name": "secrets",
113+
"baseName": "secrets",
114+
"type": "Array<ContainerSecretsInner>"
115+
},
116+
{
117+
"name": "healthCheck",
118+
"baseName": "healthCheck",
119+
"type": "ContainerHealthCheck"
120+
},
121+
{
122+
"name": "dependsOn",
123+
"baseName": "dependsOn",
124+
"type": "Array<ContainerDependsOnInner>"
125+
},
74126
{
75127
"name": "command",
76128
"baseName": "command",
@@ -81,10 +133,30 @@ export class Container {
81133
"baseName": "entryPoint",
82134
"type": "Array<string>"
83135
},
136+
{
137+
"name": "workingDirectory",
138+
"baseName": "workingDirectory",
139+
"type": "string"
140+
},
84141
{
85142
"name": "essential",
86143
"baseName": "essential",
87144
"type": "boolean"
145+
},
146+
{
147+
"name": "readonlyRootFilesystem",
148+
"baseName": "readonlyRootFilesystem",
149+
"type": "boolean"
150+
},
151+
{
152+
"name": "user",
153+
"baseName": "user",
154+
"type": "string"
155+
},
156+
{
157+
"name": "originProtection",
158+
"baseName": "originProtection",
159+
"type": "boolean"
88160
} ];
89161

90162
static getAttributeTypeMap() {

model/containerDependsOnInner.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
13+
import { RequestFile } from './models';
14+
15+
export class ContainerDependsOnInner {
16+
/**
17+
* The name of the container this container depends on
18+
*/
19+
'containerName': string;
20+
/**
21+
* The condition to wait for on the dependency
22+
*/
23+
'condition'?: ContainerDependsOnInner.ConditionEnum;
24+
25+
static discriminator: string | undefined = undefined;
26+
27+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
28+
{
29+
"name": "containerName",
30+
"baseName": "containerName",
31+
"type": "string"
32+
},
33+
{
34+
"name": "condition",
35+
"baseName": "condition",
36+
"type": "ContainerDependsOnInner.ConditionEnum"
37+
} ];
38+
39+
static getAttributeTypeMap() {
40+
return ContainerDependsOnInner.attributeTypeMap;
41+
}
42+
}
43+
44+
export namespace ContainerDependsOnInner {
45+
export enum ConditionEnum {
46+
Start = <any> 'START',
47+
Healthy = <any> 'HEALTHY',
48+
Complete = <any> 'COMPLETE',
49+
Success = <any> 'SUCCESS'
50+
}
51+
}

model/containerEnvironmentInner.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
import { RequestFile } from './models';
1414

1515
export class ContainerEnvironmentInner {
16+
/**
17+
* Environment variable name
18+
*/
1619
'name': string;
20+
/**
21+
* Environment variable value
22+
*/
1723
'value': string;
1824

1925
static discriminator: string | undefined = undefined;

model/containerHealthCheck.ts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
13+
import { RequestFile } from './models';
14+
15+
/**
16+
* Container health check configuration
17+
*/
18+
export class ContainerHealthCheck {
19+
/**
20+
* The command to run to determine if the container is healthy
21+
*/
22+
'command'?: Array<string>;
23+
/**
24+
* Time period (seconds) between health checks
25+
*/
26+
'interval'?: number = 30;
27+
/**
28+
* Time period (seconds) to wait for a health check to return
29+
*/
30+
'timeout'?: number = 5;
31+
/**
32+
* Number of times to retry a failed health check
33+
*/
34+
'retries'?: number = 3;
35+
/**
36+
* Grace period (seconds) to ignore unhealthy checks after container starts
37+
*/
38+
'startPeriod'?: number | null;
39+
40+
static discriminator: string | undefined = undefined;
41+
42+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
43+
{
44+
"name": "command",
45+
"baseName": "command",
46+
"type": "Array<string>"
47+
},
48+
{
49+
"name": "interval",
50+
"baseName": "interval",
51+
"type": "number"
52+
},
53+
{
54+
"name": "timeout",
55+
"baseName": "timeout",
56+
"type": "number"
57+
},
58+
{
59+
"name": "retries",
60+
"baseName": "retries",
61+
"type": "number"
62+
},
63+
{
64+
"name": "startPeriod",
65+
"baseName": "startPeriod",
66+
"type": "number"
67+
} ];
68+
69+
static getAttributeTypeMap() {
70+
return ContainerHealthCheck.attributeTypeMap;
71+
}
72+
}
73+

0 commit comments

Comments
 (0)