From 58478a0ba452ec9464caf5a5c011e13f9cab861f Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 27 Feb 2023 15:06:36 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../src/api/applesilicon/v1alpha1/api.gen.ts | 11 +-- .../clients/src/api/baremetal/v1/api.gen.ts | 22 ++---- .../src/api/container/v1beta1/api.gen.ts | 22 ++---- .../clients/src/api/domain/v2beta1/api.gen.ts | 70 ++++--------------- .../src/api/domain/v2beta1/marshalling.gen.ts | 4 +- .../src/api/flexibleip/v1alpha1/api.gen.ts | 11 +-- .../src/api/function/v1beta1/api.gen.ts | 22 ++---- .../clients/src/api/iam/v1alpha1/api.gen.ts | 17 +---- .../clients/src/api/instance/v1/api.gen.ts | 66 ++++++----------- packages/clients/src/api/iot/v1/api.gen.ts | 11 +-- packages/clients/src/api/k8s/v1/api.gen.ts | 11 +-- packages/clients/src/api/lb/v1/api.gen.ts | 66 ++++------------- .../clients/src/api/marketplace/v1/api.gen.ts | 2 +- .../clients/src/api/mnq/v1alpha1/api.gen.ts | 11 +-- packages/clients/src/api/rdb/v1/api.gen.ts | 33 ++------- packages/clients/src/api/redis/v1/api.gen.ts | 11 +-- .../clients/src/api/registry/v1/api.gen.ts | 22 ++---- .../src/api/secret/v1alpha1/api.gen.ts | 11 +-- .../clients/src/api/tem/v1alpha1/api.gen.ts | 21 ++---- packages/clients/src/api/test/v1/api.gen.ts | 11 +-- packages/clients/src/api/vpc/v1/api.gen.ts | 11 +-- packages/clients/src/api/vpcgw/v1/api.gen.ts | 33 ++------- 22 files changed, 102 insertions(+), 397 deletions(-) diff --git a/packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts b/packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts index a7ba623b0..667821e97 100644 --- a/packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts @@ -136,20 +136,13 @@ export class API extends ParentAPI { )}/servers`, urlParams: urlParams( ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListServersResponse, diff --git a/packages/clients/src/api/baremetal/v1/api.gen.ts b/packages/clients/src/api/baremetal/v1/api.gen.ts index ac0ec50b3..5e7dc17a4 100644 --- a/packages/clients/src/api/baremetal/v1/api.gen.ts +++ b/packages/clients/src/api/baremetal/v1/api.gen.ts @@ -117,20 +117,13 @@ export class API extends ParentAPI { ['name', request.name], ['option_id', request.optionId], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['status', request.status], ['tags', request.tags], ), @@ -810,21 +803,14 @@ export class PrivateNetworkAPI extends ParentAPI { )}/server-private-networks`, urlParams: urlParams( ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], ['private_network_id', request.privateNetworkId], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['server_id', request.serverId], ), }, diff --git a/packages/clients/src/api/container/v1beta1/api.gen.ts b/packages/clients/src/api/container/v1beta1/api.gen.ts index d617f4505..5716fb892 100644 --- a/packages/clients/src/api/container/v1beta1/api.gen.ts +++ b/packages/clients/src/api/container/v1beta1/api.gen.ts @@ -103,20 +103,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListNamespacesResponse, @@ -243,20 +236,13 @@ export class API extends ParentAPI { ['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListContainersResponse, diff --git a/packages/clients/src/api/domain/v2beta1/api.gen.ts b/packages/clients/src/api/domain/v2beta1/api.gen.ts index dd131644b..0107b28f6 100644 --- a/packages/clients/src/api/domain/v2beta1/api.gen.ts +++ b/packages/clients/src/api/domain/v2beta1/api.gen.ts @@ -173,20 +173,13 @@ export class API extends ParentAPI { ['dns_zone', request.dnsZone], ['domain', request.domain], ['order_by', request.orderBy ?? 'domain_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListDNSZonesResponse, @@ -306,10 +299,7 @@ export class API extends ParentAPI { 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['type', request.type ?? 'unknown'], ), }, @@ -379,10 +369,7 @@ export class API extends ParentAPI { 'dnsZone', request.dnsZone, )}/nameservers`, - urlParams: urlParams([ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ]), + urlParams: urlParams(['project_id', request.projectId]), }, unmarshalListDNSZoneNameserversResponse, ) @@ -696,10 +683,7 @@ export class API extends ParentAPI { 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListSSLCertificatesResponse, @@ -781,20 +765,13 @@ export class RegistrarAPI extends ParentAPI { urlParams: urlParams( ['domain', request.domain], ['order_by', request.orderBy ?? 'domain_desc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['statuses', request.statuses], ['types', request.types], ), @@ -978,20 +955,13 @@ export class RegistrarAPI extends ParentAPI { path: `/domain/v2beta1/contacts`, urlParams: urlParams( ['domain', request.domain], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListContactsResponse, @@ -1062,20 +1032,13 @@ export class RegistrarAPI extends ParentAPI { ['domain', request.domain], ['is_external', request.isExternal], ['order_by', request.orderBy ?? 'domain_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['registrar', request.registrar], ['status', request.status ?? 'status_unknown'], ), @@ -1101,20 +1064,13 @@ export class RegistrarAPI extends ParentAPI { path: `/domain/v2beta1/renewable-domains`, urlParams: urlParams( ['order_by', request.orderBy ?? 'domain_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListRenewableDomainsResponse, diff --git a/packages/clients/src/api/domain/v2beta1/marshalling.gen.ts b/packages/clients/src/api/domain/v2beta1/marshalling.gen.ts index 9c2529d1c..f18b550ca 100644 --- a/packages/clients/src/api/domain/v2beta1/marshalling.gen.ts +++ b/packages/clients/src/api/domain/v2beta1/marshalling.gen.ts @@ -1667,7 +1667,7 @@ export const marshalCloneDNSZoneRequest = ( ): Record => ({ dest_dns_zone: request.destDnsZone, overwrite: request.overwrite, - project_id: request.projectId ?? defaults.defaultProjectId, + project_id: request.projectId, }) export const marshalCreateDNSZoneRequest = ( @@ -1862,7 +1862,7 @@ export const marshalRegistrarApiTradeDomainRequest = ( request: RegistrarApiTradeDomainRequest, defaults: DefaultValues, ): Record => ({ - project_id: request.projectId ?? defaults.defaultProjectId, + project_id: request.projectId, ...resolveOneOf([ { param: 'new_owner_contact_id', diff --git a/packages/clients/src/api/flexibleip/v1alpha1/api.gen.ts b/packages/clients/src/api/flexibleip/v1alpha1/api.gen.ts index fee43c79a..202d2e97e 100644 --- a/packages/clients/src/api/flexibleip/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/flexibleip/v1alpha1/api.gen.ts @@ -127,20 +127,13 @@ export class API extends ParentAPI { )}/fips`, urlParams: urlParams( ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['server_ids', request.serverIds], ['status', request.status], ['tags', request.tags], diff --git a/packages/clients/src/api/function/v1beta1/api.gen.ts b/packages/clients/src/api/function/v1beta1/api.gen.ts index c361a1333..471f9baf4 100644 --- a/packages/clients/src/api/function/v1beta1/api.gen.ts +++ b/packages/clients/src/api/function/v1beta1/api.gen.ts @@ -124,20 +124,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListNamespacesResponse, @@ -264,20 +257,13 @@ export class API extends ParentAPI { ['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListFunctionsResponse, diff --git a/packages/clients/src/api/iam/v1alpha1/api.gen.ts b/packages/clients/src/api/iam/v1alpha1/api.gen.ts index f5abe1f76..5554cb58f 100644 --- a/packages/clients/src/api/iam/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/api.gen.ts @@ -106,20 +106,13 @@ export class API extends ParentAPI { ['disabled', request.disabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListSSHKeysResponse, @@ -390,11 +383,7 @@ export class API extends ParentAPI { ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', diff --git a/packages/clients/src/api/instance/v1/api.gen.ts b/packages/clients/src/api/instance/v1/api.gen.ts index a09918a62..6c89b5a01 100644 --- a/packages/clients/src/api/instance/v1/api.gen.ts +++ b/packages/clients/src/api/instance/v1/api.gen.ts @@ -241,7 +241,7 @@ export class API extends ParentAPI { )}/products/servers/availability`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ), }, unmarshalGetServerTypesAvailabilityResponse, @@ -263,7 +263,7 @@ export class API extends ParentAPI { )}/products/servers`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ), }, unmarshalListServersTypesResponse, @@ -285,7 +285,7 @@ export class API extends ParentAPI { )}/products/volumes`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ), }, unmarshalListVolumesTypesResponse, @@ -303,12 +303,9 @@ export class API extends ParentAPI { ['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['project', request.project ?? this.client.settings.defaultProjectId], @@ -508,12 +505,9 @@ export class API extends ParentAPI { urlParams: urlParams( ['arch', request.arch], ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], ['public', request.public], ['tags', request.tags], @@ -613,12 +607,9 @@ export class API extends ParentAPI { )}/snapshots`, urlParams: urlParams( ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], ['tags', request.tags], ), @@ -740,12 +731,9 @@ export class API extends ParentAPI { )}/volumes`, urlParams: urlParams( ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], [ 'tags', @@ -858,12 +846,9 @@ export class API extends ParentAPI { )}/security_groups`, urlParams: urlParams( ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], ['project_default', request.projectDefault], [ @@ -1001,7 +986,7 @@ export class API extends ParentAPI { )}/rules`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ), }, unmarshalListSecurityGroupRulesResponse, @@ -1152,12 +1137,9 @@ export class API extends ParentAPI { )}/placement_groups`, urlParams: urlParams( ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], [ 'tags', @@ -1385,12 +1367,9 @@ export class API extends ParentAPI { )}/ips`, urlParams: urlParams( ['name', request.name], - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['project', request.project ?? this.client.settings.defaultProjectId], [ 'tags', @@ -1503,7 +1482,7 @@ export class API extends ParentAPI { )}/private_nics`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], [ 'tags', request.tags && request.tags.length > 0 @@ -1635,7 +1614,7 @@ export class API extends ParentAPI { ['arch', request.arch], ['default', request.default], ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ['public', request.public], ['title', request.title], ), @@ -1684,10 +1663,7 @@ export class API extends ParentAPI { request.zone ?? this.client.settings.defaultZone, )}/dashboard`, urlParams: urlParams( - [ - 'organization', - request.organization ?? this.client.settings.defaultOrganizationId, - ], + ['organization', request.organization], ['project', request.project ?? this.client.settings.defaultProjectId], ), }, diff --git a/packages/clients/src/api/iot/v1/api.gen.ts b/packages/clients/src/api/iot/v1/api.gen.ts index 31c330d87..823a21d41 100644 --- a/packages/clients/src/api/iot/v1/api.gen.ts +++ b/packages/clients/src/api/iot/v1/api.gen.ts @@ -121,20 +121,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListHubsResponse, diff --git a/packages/clients/src/api/k8s/v1/api.gen.ts b/packages/clients/src/api/k8s/v1/api.gen.ts index 63744c4fd..5c0b5ce32 100644 --- a/packages/clients/src/api/k8s/v1/api.gen.ts +++ b/packages/clients/src/api/k8s/v1/api.gen.ts @@ -89,20 +89,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['status', request.status ?? 'unknown'], ['type', request.type], ), diff --git a/packages/clients/src/api/lb/v1/api.gen.ts b/packages/clients/src/api/lb/v1/api.gen.ts index 6bff0a31d..4cb74232a 100644 --- a/packages/clients/src/api/lb/v1/api.gen.ts +++ b/packages/clients/src/api/lb/v1/api.gen.ts @@ -241,20 +241,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListLbsResponse, @@ -397,20 +390,13 @@ export class API extends ParentAPI { )}/ips`, urlParams: urlParams( ['ip_address', request.ipAddress], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListIpsResponse, @@ -1300,20 +1286,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListSubscriberResponse, @@ -1523,20 +1502,13 @@ export class ZonedAPI extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListLbsResponse, @@ -1679,20 +1651,13 @@ export class ZonedAPI extends ParentAPI { )}/ips`, urlParams: urlParams( ['ip_address', request.ipAddress], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListIpsResponse, @@ -2637,20 +2602,13 @@ export class ZonedAPI extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListSubscriberResponse, diff --git a/packages/clients/src/api/marketplace/v1/api.gen.ts b/packages/clients/src/api/marketplace/v1/api.gen.ts index 30593be22..e7ef7f110 100644 --- a/packages/clients/src/api/marketplace/v1/api.gen.ts +++ b/packages/clients/src/api/marketplace/v1/api.gen.ts @@ -32,7 +32,7 @@ export class API extends ParentAPI { path: `/marketplace/v1/images`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['per_page', request.perPage], ), }, unmarshalListImagesResponse, diff --git a/packages/clients/src/api/mnq/v1alpha1/api.gen.ts b/packages/clients/src/api/mnq/v1alpha1/api.gen.ts index 6cf27b62f..8d3c8f292 100644 --- a/packages/clients/src/api/mnq/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/mnq/v1alpha1/api.gen.ts @@ -59,20 +59,13 @@ export class API extends ParentAPI { )}/namespaces`, urlParams: urlParams( ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListNamespacesResponse, diff --git a/packages/clients/src/api/rdb/v1/api.gen.ts b/packages/clients/src/api/rdb/v1/api.gen.ts index 051a4bbcc..89e875005 100644 --- a/packages/clients/src/api/rdb/v1/api.gen.ts +++ b/packages/clients/src/api/rdb/v1/api.gen.ts @@ -240,20 +240,13 @@ export class API extends ParentAPI { ['instance_id', request.instanceId], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListDatabaseBackupsResponse, @@ -470,20 +463,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['tags', request.tags], ), }, @@ -1422,20 +1408,13 @@ export class API extends ParentAPI { ['instance_id', request.instanceId], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListSnapshotsResponse, diff --git a/packages/clients/src/api/redis/v1/api.gen.ts b/packages/clients/src/api/redis/v1/api.gen.ts index 9789f9ad6..d6ffb2ce3 100644 --- a/packages/clients/src/api/redis/v1/api.gen.ts +++ b/packages/clients/src/api/redis/v1/api.gen.ts @@ -182,20 +182,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['tags', request.tags], ['version', request.version], ), diff --git a/packages/clients/src/api/registry/v1/api.gen.ts b/packages/clients/src/api/registry/v1/api.gen.ts index 9f85c453c..18b9d14c8 100644 --- a/packages/clients/src/api/registry/v1/api.gen.ts +++ b/packages/clients/src/api/registry/v1/api.gen.ts @@ -71,20 +71,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListNamespacesResponse, @@ -211,20 +204,13 @@ export class API extends ParentAPI { ['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListImagesResponse, diff --git a/packages/clients/src/api/secret/v1alpha1/api.gen.ts b/packages/clients/src/api/secret/v1alpha1/api.gen.ts index 38621d46a..58d1ee35b 100644 --- a/packages/clients/src/api/secret/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/secret/v1alpha1/api.gen.ts @@ -124,20 +124,13 @@ export class API extends ParentAPI { )}/secrets`, urlParams: urlParams( ['order_by', request.orderBy ?? 'name_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['tags', request.tags], ), }, diff --git a/packages/clients/src/api/tem/v1alpha1/api.gen.ts b/packages/clients/src/api/tem/v1alpha1/api.gen.ts index cdc6c5936..1e6ce9739 100644 --- a/packages/clients/src/api/tem/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/api.gen.ts @@ -132,10 +132,7 @@ export class API extends ParentAPI { 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['until', request.until], @@ -171,10 +168,7 @@ export class API extends ParentAPI { urlParams: urlParams( ['domain_id', request.domainId], ['mail_from', request.mailFrom], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['since', request.since], ['until', request.until], ), @@ -272,20 +266,13 @@ export class API extends ParentAPI { )}/domains`, urlParams: urlParams( ['name', request.name], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['status', request.status], ), }, diff --git a/packages/clients/src/api/test/v1/api.gen.ts b/packages/clients/src/api/test/v1/api.gen.ts index c4ff164c1..4e22bb1ad 100644 --- a/packages/clients/src/api/test/v1/api.gen.ts +++ b/packages/clients/src/api/test/v1/api.gen.ts @@ -80,20 +80,13 @@ export class API extends ParentAPI { path: `/test/v1/humans`, urlParams: urlParams( ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListHumansResponse, diff --git a/packages/clients/src/api/vpc/v1/api.gen.ts b/packages/clients/src/api/vpc/v1/api.gen.ts index 0f0c09299..1be4df84a 100644 --- a/packages/clients/src/api/vpc/v1/api.gen.ts +++ b/packages/clients/src/api/vpc/v1/api.gen.ts @@ -53,21 +53,14 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], ['private_network_ids', request.privateNetworkIds], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['tags', request.tags], ), }, diff --git a/packages/clients/src/api/vpcgw/v1/api.gen.ts b/packages/clients/src/api/vpcgw/v1/api.gen.ts index 98f7224c1..64a00e112 100644 --- a/packages/clients/src/api/vpcgw/v1/api.gen.ts +++ b/packages/clients/src/api/vpcgw/v1/api.gen.ts @@ -125,21 +125,14 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], ['private_network_id', request.privateNetworkId], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['status', request.status ?? 'unknown'], ['tags', request.tags], ['type', request.type], @@ -437,20 +430,13 @@ export class API extends ParentAPI { ['address', request.address], ['has_address', request.hasAddress], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ), }, unmarshalListDHCPsResponse, @@ -847,20 +833,13 @@ export class API extends ParentAPI { urlParams: urlParams( ['is_free', request.isFree], ['order_by', request.orderBy ?? 'created_at_asc'], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId], ['page', request.page], [ 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['project_id', request.projectId], ['reverse', request.reverse], ['tags', request.tags], ), From 9dfcf8bb57b5f1435f4d6ef55c0cf41ea589a5c7 Mon Sep 17 00:00:00 2001 From: Vincent Germain Date: Mon, 27 Feb 2023 18:37:56 +0100 Subject: [PATCH 2/2] fix: solve per_page issue --- .../clients/src/api/instance/v1/api.gen.ts | 42 +++++++++---------- .../clients/src/api/marketplace/v1/api.gen.ts | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/clients/src/api/instance/v1/api.gen.ts b/packages/clients/src/api/instance/v1/api.gen.ts index 6c89b5a01..efbdd47e5 100644 --- a/packages/clients/src/api/instance/v1/api.gen.ts +++ b/packages/clients/src/api/instance/v1/api.gen.ts @@ -241,7 +241,7 @@ export class API extends ParentAPI { )}/products/servers/availability`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ), }, unmarshalGetServerTypesAvailabilityResponse, @@ -263,7 +263,7 @@ export class API extends ParentAPI { )}/products/servers`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ), }, unmarshalListServersTypesResponse, @@ -285,7 +285,7 @@ export class API extends ParentAPI { )}/products/volumes`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ), }, unmarshalListVolumesTypesResponse, @@ -305,10 +305,10 @@ export class API extends ParentAPI { ['order', request.order], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['project', request.project], ['state', request.state], [ 'tags', @@ -507,8 +507,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], ['public', request.public], ['tags', request.tags], ), @@ -609,8 +609,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], ['tags', request.tags], ), }, @@ -733,8 +733,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], [ 'tags', request.tags && request.tags.length > 0 @@ -848,8 +848,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], ['project_default', request.projectDefault], [ 'tags', @@ -986,7 +986,7 @@ export class API extends ParentAPI { )}/rules`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ), }, unmarshalListSecurityGroupRulesResponse, @@ -1139,8 +1139,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], [ 'tags', request.tags && request.tags.length > 0 @@ -1369,8 +1369,8 @@ export class API extends ParentAPI { ['name', request.name], ['organization', request.organization], ['page', request.page], - ['per_page', request.perPage], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], + ['project', request.project], [ 'tags', request.tags && request.tags.length > 0 @@ -1482,7 +1482,7 @@ export class API extends ParentAPI { )}/private_nics`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], [ 'tags', request.tags && request.tags.length > 0 @@ -1614,7 +1614,7 @@ export class API extends ParentAPI { ['arch', request.arch], ['default', request.default], ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['public', request.public], ['title', request.title], ), @@ -1664,7 +1664,7 @@ export class API extends ParentAPI { )}/dashboard`, urlParams: urlParams( ['organization', request.organization], - ['project', request.project ?? this.client.settings.defaultProjectId], + ['project', request.project], ), }, unmarshalGetDashboardResponse, diff --git a/packages/clients/src/api/marketplace/v1/api.gen.ts b/packages/clients/src/api/marketplace/v1/api.gen.ts index e7ef7f110..30593be22 100644 --- a/packages/clients/src/api/marketplace/v1/api.gen.ts +++ b/packages/clients/src/api/marketplace/v1/api.gen.ts @@ -32,7 +32,7 @@ export class API extends ParentAPI { path: `/marketplace/v1/images`, urlParams: urlParams( ['page', request.page], - ['per_page', request.perPage], + ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ), }, unmarshalListImagesResponse,