Skip to content

Commit 9108704

Browse files
committed
auto-generated version 1.1.1
1 parent 9e79f84 commit 9108704

14 files changed

Lines changed: 169 additions & 42 deletions

api/backups-api.ts

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
3434
* Retrieves a list of all backups of the given PostgreSQL cluster.
3535
* @summary List backups of cluster
3636
* @param {string} clusterId The unique ID of the cluster.
37+
* @param {number} [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
38+
* @param {number} [offset] The first element to return. Use together with \'limit\' for pagination.
3739
* @param {*} [options] Override http request option.
3840
* @throws {RequiredError}
3941
*/
40-
clusterBackupsGet: async (clusterId: string, options: any = {}): Promise<RequestArgs> => {
42+
clusterBackupsGet: async (clusterId: string, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
4143
if (clusterId === null || clusterId === undefined) {
4244
throw new RequiredError('clusterId','Required parameter clusterId was null or undefined when calling clusterBackupsGet.');
4345
}
@@ -68,6 +70,20 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
6870
localVarHeaderParameter["Authorization"] = "Bearer " + localVarApiKeyValue;
6971
}
7072

73+
if ((limit === undefined) && (configuration !== undefined)) {
74+
limit = configuration.getDefaultParamValue('limit');
75+
}
76+
if (limit !== undefined) {
77+
localVarQueryParameter['limit'] = limit;
78+
}
79+
80+
if ((offset === undefined) && (configuration !== undefined)) {
81+
offset = configuration.getDefaultParamValue('offset');
82+
}
83+
if (offset !== undefined) {
84+
localVarQueryParameter['offset'] = offset;
85+
}
86+
7187

7288

7389
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -147,10 +163,12 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
147163
/**
148164
* Retrieves a list of all PostgreSQL cluster backups.
149165
* @summary List cluster backups
166+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
167+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
150168
* @param {*} [options] Override http request option.
151169
* @throws {RequiredError}
152170
*/
153-
clustersBackupsGet: async (options: any = {}): Promise<RequestArgs> => {
171+
clustersBackupsGet: async (limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
154172
const localVarPath = `/clusters/backups`;
155173
// use dummy base URL string because the URL constructor only accepts absolute URLs.
156174
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -177,6 +195,20 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
177195
localVarHeaderParameter["Authorization"] = "Bearer " + localVarApiKeyValue;
178196
}
179197

198+
if ((limit === undefined) && (configuration !== undefined)) {
199+
limit = configuration.getDefaultParamValue('limit');
200+
}
201+
if (limit !== undefined) {
202+
localVarQueryParameter['limit'] = limit;
203+
}
204+
205+
if ((offset === undefined) && (configuration !== undefined)) {
206+
offset = configuration.getDefaultParamValue('offset');
207+
}
208+
if (offset !== undefined) {
209+
localVarQueryParameter['offset'] = offset;
210+
}
211+
180212

181213

182214
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -209,11 +241,13 @@ export const BackupsApiFp = function(configuration?: Configuration) {
209241
* Retrieves a list of all backups of the given PostgreSQL cluster.
210242
* @summary List backups of cluster
211243
* @param {string} clusterId The unique ID of the cluster.
244+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
245+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
212246
* @param {*} [options] Override http request option.
213247
* @throws {RequiredError}
214248
*/
215-
async clusterBackupsGet(clusterId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterBackupList>> {
216-
const axiosArgs = await BackupsApiAxiosParamCreator(configuration).clusterBackupsGet(clusterId, options);
249+
async clusterBackupsGet(clusterId: string, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterBackupList>> {
250+
const axiosArgs = await BackupsApiAxiosParamCreator(configuration).clusterBackupsGet(clusterId, limit, offset, options);
217251
return runRequest(axiosArgs, configuration);
218252
},
219253
/**
@@ -230,11 +264,13 @@ export const BackupsApiFp = function(configuration?: Configuration) {
230264
/**
231265
* Retrieves a list of all PostgreSQL cluster backups.
232266
* @summary List cluster backups
267+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
268+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
233269
* @param {*} [options] Override http request option.
234270
* @throws {RequiredError}
235271
*/
236-
async clustersBackupsGet(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterBackupList>> {
237-
const axiosArgs = await BackupsApiAxiosParamCreator(configuration).clustersBackupsGet(options);
272+
async clustersBackupsGet(limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterBackupList>> {
273+
const axiosArgs = await BackupsApiAxiosParamCreator(configuration).clustersBackupsGet(limit, offset, options);
238274
return runRequest(axiosArgs, configuration);
239275
},
240276
}
@@ -250,11 +286,13 @@ export const BackupsApiFactory = function (configuration?: Configuration, basePa
250286
* Retrieves a list of all backups of the given PostgreSQL cluster.
251287
* @summary List backups of cluster
252288
* @param {string} clusterId The unique ID of the cluster.
289+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
290+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
253291
* @param {*} [options] Override http request option.
254292
* @throws {RequiredError}
255293
*/
256-
clusterBackupsGet(clusterId: string, options?: any): AxiosPromise<ClusterBackupList> {
257-
return BackupsApiFp(configuration).clusterBackupsGet(clusterId, options).then((request) => request(axios, basePath));
294+
clusterBackupsGet(clusterId: string, limit?: number, offset?: number, options?: any): AxiosPromise<ClusterBackupList> {
295+
return BackupsApiFp(configuration).clusterBackupsGet(clusterId, limit, offset, options).then((request) => request(axios, basePath));
258296
},
259297
/**
260298
* Retrieve a PostgreSQL cluster backup by using its ID. This value can be found when you GET a list of PostgreSQL cluster backups.
@@ -269,11 +307,13 @@ export const BackupsApiFactory = function (configuration?: Configuration, basePa
269307
/**
270308
* Retrieves a list of all PostgreSQL cluster backups.
271309
* @summary List cluster backups
310+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
311+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
272312
* @param {*} [options] Override http request option.
273313
* @throws {RequiredError}
274314
*/
275-
clustersBackupsGet(options?: any): AxiosPromise<ClusterBackupList> {
276-
return BackupsApiFp(configuration).clustersBackupsGet(options).then((request) => request(axios, basePath));
315+
clustersBackupsGet(limit?: number, offset?: number, options?: any): AxiosPromise<ClusterBackupList> {
316+
return BackupsApiFp(configuration).clustersBackupsGet(limit, offset, options).then((request) => request(axios, basePath));
277317
},
278318
};
279319
};
@@ -290,6 +330,20 @@ export interface BackupsApiClusterBackupsGetRequest {
290330
* @memberof BackupsApiClusterBackupsGet
291331
*/
292332
readonly clusterId: string
333+
334+
/**
335+
* The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
336+
* @type {number}
337+
* @memberof BackupsApiClusterBackupsGet
338+
*/
339+
readonly limit?: number
340+
341+
/**
342+
* The first element to return. Use together with \&#39;limit\&#39; for pagination.
343+
* @type {number}
344+
* @memberof BackupsApiClusterBackupsGet
345+
*/
346+
readonly offset?: number
293347
}
294348

295349
/**
@@ -306,6 +360,27 @@ export interface BackupsApiClustersBackupsFindByIdRequest {
306360
readonly backupId: string
307361
}
308362

363+
/**
364+
* Request parameters for clustersBackupsGet operation in BackupsApi.
365+
* @export
366+
* @interface BackupsApiClustersBackupsGetRequest
367+
*/
368+
export interface BackupsApiClustersBackupsGetRequest {
369+
/**
370+
* The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
371+
* @type {number}
372+
* @memberof BackupsApiClustersBackupsGet
373+
*/
374+
readonly limit?: number
375+
376+
/**
377+
* The first element to return. Use together with \&#39;limit\&#39; for pagination.
378+
* @type {number}
379+
* @memberof BackupsApiClustersBackupsGet
380+
*/
381+
readonly offset?: number
382+
}
383+
309384
/**
310385
* BackupsApi - object-oriented interface
311386
* @export
@@ -322,7 +397,7 @@ export class BackupsApi extends BaseAPI {
322397
* @memberof BackupsApi
323398
*/
324399
public clusterBackupsGet(requestParameters: BackupsApiClusterBackupsGetRequest, options?: any) {
325-
return BackupsApiFp(this.configuration).clusterBackupsGet(requestParameters.clusterId, options).then((request) => request(this.axios, this.basePath));
400+
return BackupsApiFp(this.configuration).clusterBackupsGet(requestParameters.clusterId, requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath));
326401
}
327402

328403
/**
@@ -340,11 +415,12 @@ export class BackupsApi extends BaseAPI {
340415
/**
341416
* Retrieves a list of all PostgreSQL cluster backups.
342417
* @summary List cluster backups
418+
* @param {BackupsApiClustersBackupsGetRequest} requestParameters Request parameters.
343419
* @param {*} [options] Override http request option.
344420
* @throws {RequiredError}
345421
* @memberof BackupsApi
346422
*/
347-
public clustersBackupsGet(options?: any) {
348-
return BackupsApiFp(this.configuration).clustersBackupsGet(options).then((request) => request(this.axios, this.basePath));
423+
public clustersBackupsGet(requestParameters: BackupsApiClustersBackupsGetRequest = {}, options?: any) {
424+
return BackupsApiFp(this.configuration).clustersBackupsGet(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath));
349425
}
350426
}

api/clusters-api.ts

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,13 @@ export const ClustersApiAxiosParamCreator = function (configuration?: Configurat
210210
/**
211211
* Retrieves a list of PostgreSQL clusters.
212212
* @summary List clusters
213+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
214+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
213215
* @param {string} [filterName] Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the \&#39;displayName\&#39; field.
214216
* @param {*} [options] Override http request option.
215217
* @throws {RequiredError}
216218
*/
217-
clustersGet: async (filterName?: string, options: any = {}): Promise<RequestArgs> => {
219+
clustersGet: async (limit?: number, offset?: number, filterName?: string, options: any = {}): Promise<RequestArgs> => {
218220
const localVarPath = `/clusters`;
219221
// use dummy base URL string because the URL constructor only accepts absolute URLs.
220222
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -241,6 +243,20 @@ export const ClustersApiAxiosParamCreator = function (configuration?: Configurat
241243
localVarHeaderParameter["Authorization"] = "Bearer " + localVarApiKeyValue;
242244
}
243245

246+
if ((limit === undefined) && (configuration !== undefined)) {
247+
limit = configuration.getDefaultParamValue('limit');
248+
}
249+
if (limit !== undefined) {
250+
localVarQueryParameter['limit'] = limit;
251+
}
252+
253+
if ((offset === undefined) && (configuration !== undefined)) {
254+
offset = configuration.getDefaultParamValue('offset');
255+
}
256+
if (offset !== undefined) {
257+
localVarQueryParameter['offset'] = offset;
258+
}
259+
244260
if ((filterName === undefined) && (configuration !== undefined)) {
245261
filterName = configuration.getDefaultParamValue('filterName');
246262
}
@@ -495,12 +511,14 @@ export const ClustersApiFp = function(configuration?: Configuration) {
495511
/**
496512
* Retrieves a list of PostgreSQL clusters.
497513
* @summary List clusters
514+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
515+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
498516
* @param {string} [filterName] Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the \&#39;displayName\&#39; field.
499517
* @param {*} [options] Override http request option.
500518
* @throws {RequiredError}
501519
*/
502-
async clustersGet(filterName?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterList>> {
503-
const axiosArgs = await ClustersApiAxiosParamCreator(configuration).clustersGet(filterName, options);
520+
async clustersGet(limit?: number, offset?: number, filterName?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClusterList>> {
521+
const axiosArgs = await ClustersApiAxiosParamCreator(configuration).clustersGet(limit, offset, filterName, options);
504522
return runRequest(axiosArgs, configuration);
505523
},
506524
/**
@@ -578,12 +596,14 @@ export const ClustersApiFactory = function (configuration?: Configuration, baseP
578596
/**
579597
* Retrieves a list of PostgreSQL clusters.
580598
* @summary List clusters
599+
* @param {number} [limit] The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
600+
* @param {number} [offset] The first element to return. Use together with \&#39;limit\&#39; for pagination.
581601
* @param {string} [filterName] Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the \&#39;displayName\&#39; field.
582602
* @param {*} [options] Override http request option.
583603
* @throws {RequiredError}
584604
*/
585-
clustersGet(filterName?: string, options?: any): AxiosPromise<ClusterList> {
586-
return ClustersApiFp(configuration).clustersGet(filterName, options).then((request) => request(axios, basePath));
605+
clustersGet(limit?: number, offset?: number, filterName?: string, options?: any): AxiosPromise<ClusterList> {
606+
return ClustersApiFp(configuration).clustersGet(limit, offset, filterName, options).then((request) => request(axios, basePath));
587607
},
588608
/**
589609
* Patch attributes of a PostgreSQL cluster.
@@ -666,6 +686,20 @@ export interface ClustersApiClustersFindByIdRequest {
666686
* @interface ClustersApiClustersGetRequest
667687
*/
668688
export interface ClustersApiClustersGetRequest {
689+
/**
690+
* The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination.
691+
* @type {number}
692+
* @memberof ClustersApiClustersGet
693+
*/
694+
readonly limit?: number
695+
696+
/**
697+
* The first element to return. Use together with \&#39;limit\&#39; for pagination.
698+
* @type {number}
699+
* @memberof ClustersApiClustersGet
700+
*/
701+
readonly offset?: number
702+
669703
/**
670704
* Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the \&#39;displayName\&#39; field.
671705
* @type {string}
@@ -761,7 +795,7 @@ export class ClustersApi extends BaseAPI {
761795
* @memberof ClustersApi
762796
*/
763797
public clustersGet(requestParameters: ClustersApiClustersGetRequest = {}, options?: any) {
764-
return ClustersApiFp(this.configuration).clustersGet(requestParameters.filterName, options).then((request) => request(this.axios, this.basePath));
798+
return ClustersApiFp(this.configuration).clustersGet(requestParameters.limit, requestParameters.offset, requestParameters.filterName, options).then((request) => request(this.axios, this.basePath));
765799
}
766800

767801
/**

configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class Configuration {
120120
this.maxRetries = DEFAULT_MAX_RETRIES;
121121
this.maxWaitTime = DEFAULT_MAX_WAIT_TIME;
122122
this.debug = false;
123-
this.setUserAgent('ionos-cloud-sdk-node-dbaas-postgres/v1.1.0');
123+
this.setUserAgent('ionos-cloud-sdk-node-dbaas-postgres/v1.1.1');
124124
}
125125

126126
static fromEnv(): Configuration {

docs/api/BackupsApi.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ All URIs are relative to *https://api.ionos.com/databases/postgresql*
1111

1212
## clusterBackupsGet
1313

14-
> <ClusterBackupList> clusterBackupsGet(clusterId)
14+
> <ClusterBackupList> clusterBackupsGet(clusterId, opts)
1515
1616
List backups of cluster
1717

@@ -31,7 +31,10 @@ const api_instance = new ionoscloud.BackupsApi(config);
3131
// List backups of cluster
3232
api_instance
3333
.clusterBackupsGet({
34-
clusterId: clusterId_example
34+
clusterId: clusterId_example,
35+
limit: 100,
36+
offset: 200,
37+
options: {}
3538
})
3639
.then((response) => console.log(response.data))
3740
.catch((error) => console.log(error.response.data));
@@ -42,6 +45,8 @@ api_instance
4245
| Name | Type | Description | Notes |
4346
| ---- | ---- | ----------- | ----- |
4447
| **clusterId** | **string** | The unique ID of the cluster. | [default to undefined] |
48+
| **limit** | **number** | The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination. | [optional][default to 100] |
49+
| **offset** | **number** | The first element to return. Use together with \&#39;limit\&#39; for pagination. | [optional][default to 0] |
4550

4651
### Return type
4752

@@ -107,7 +112,7 @@ basicAuth, tokenAuth
107112

108113
## clustersBackupsGet
109114

110-
> <ClusterBackupList> clustersBackupsGet
115+
> <ClusterBackupList> clustersBackupsGet(opts)
111116
112117
List cluster backups
113118

@@ -126,14 +131,21 @@ const config = new ionoscloud.Configuration({
126131
const api_instance = new ionoscloud.BackupsApi(config);
127132
// List cluster backups
128133
api_instance
129-
.clustersBackupsGet()
134+
.clustersBackupsGet({
135+
limit: 100,
136+
offset: 200
137+
options: {}
138+
})
130139
.then((response) => console.log(response.data))
131140
.catch((error) => console.log(error.response.data));
132141
```
133142

134143
### Parameters
135144

136-
This endpoint does not need any parameter.
145+
| Name | Type | Description | Notes |
146+
| ---- | ---- | ----------- | ----- |
147+
| **limit** | **number** | The maximum number of elements to return. Use together with \&#39;offset\&#39; for pagination. | [optional][default to 100] |
148+
| **offset** | **number** | The first element to return. Use together with \&#39;limit\&#39; for pagination. | [optional][default to 0] |
137149

138150
### Return type
139151

0 commit comments

Comments
 (0)