From d0e563caf8bb6b5eccd3e1982f0cd500a5d7539c Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 6 Mar 2025 13:28:39 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../src/api/block/v1alpha1/marshalling.gen.ts | 2 +- .../edge_services/v1beta1/marshalling.gen.ts | 2 +- .../api/edge_services/v1beta1/types.gen.ts | 104 ++++++------ .../clients/src/api/iam/v1alpha1/api.gen.ts | 12 +- .../clients/src/api/iam/v1alpha1/index.gen.ts | 10 +- .../src/api/iam/v1alpha1/marshalling.gen.ts | 148 +++++++++--------- .../clients/src/api/iam/v1alpha1/types.gen.ts | 58 +++---- packages/clients/src/api/lb/v1/types.gen.ts | 2 +- 8 files changed, 169 insertions(+), 169 deletions(-) diff --git a/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts index 3aff55dec..d60c7d43e 100644 --- a/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts @@ -30,7 +30,7 @@ import type { VolumeType, } from './types.gen' -export const unmarshalReference = (data: unknown): Reference => { +const unmarshalReference = (data: unknown): Reference => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'Reference' failed as data isn't a dictionary.`, diff --git a/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts b/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts index dcc6e4979..48d151776 100644 --- a/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts +++ b/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts @@ -773,7 +773,7 @@ const marshalRuleHttpMatch = ( : undefined, }) -const marshalSetRouteRulesRequestRouteRule = ( +export const marshalSetRouteRulesRequestRouteRule = ( request: SetRouteRulesRequestRouteRule, defaults: DefaultValues, ): Record => ({ diff --git a/packages/clients/src/api/edge_services/v1beta1/types.gen.ts b/packages/clients/src/api/edge_services/v1beta1/types.gen.ts index b85b803c6..76605513d 100644 --- a/packages/clients/src/api/edge_services/v1beta1/types.gen.ts +++ b/packages/clients/src/api/edge_services/v1beta1/types.gen.ts @@ -520,7 +520,7 @@ export interface TLSSecretsConfig { tlsSecrets: TLSSecret[] } -export interface AddRouteRulesRequest { +export type AddRouteRulesRequest = { /** ID of the route stage to update. */ routeStageId: string /** @@ -556,7 +556,7 @@ export interface AddRouteRulesResponse { routeRules: RouteRule[] } -export interface CheckDomainRequest { +export type CheckDomainRequest = { projectId?: string fqdn: string cname: string @@ -566,7 +566,7 @@ export interface CheckDomainResponse { isValid: boolean } -export interface CheckLbOriginRequest { +export type CheckLbOriginRequest = { lb?: ScalewayLb } @@ -575,7 +575,7 @@ export interface CheckLbOriginResponse { errorType: LbOriginError } -export interface CheckPEMChainRequest { +export type CheckPEMChainRequest = { projectId?: string fqdn: string /** One-of ('chain'): at most one of 'secret', 'raw' could be set. */ @@ -588,7 +588,7 @@ export interface CheckPEMChainResponse { isValid: boolean } -export interface CreateBackendStageRequest { +export type CreateBackendStageRequest = { /** Pipeline ID the Backend stage belongs to. */ pipelineId: string /** @@ -607,7 +607,7 @@ export interface CreateBackendStageRequest { scalewayLb?: ScalewayLbBackendConfig } -export interface CreateCacheStageRequest { +export type CreateCacheStageRequest = { /** Pipeline ID the Cache stage belongs to. */ pipelineId: string /** Time To Live (TTL) in seconds. Defines how long content is cached. */ @@ -631,7 +631,7 @@ export interface CreateCacheStageRequest { routeStageId?: string } -export interface CreateDNSStageRequest { +export type CreateDNSStageRequest = { /** Pipeline ID the DNS stage belongs to. */ pipelineId: string /** @@ -662,7 +662,7 @@ export interface CreateDNSStageRequest { backendStageId?: string } -export interface CreatePipelineRequest { +export type CreatePipelineRequest = { /** Project ID in which the pipeline will be created. */ projectId?: string /** Name of the pipeline. */ @@ -671,7 +671,7 @@ export interface CreatePipelineRequest { description: string } -export interface CreatePurgeRequestRequest { +export type CreatePurgeRequestRequest = { /** Pipeline ID in which the purge request will be created. */ pipelineId: string /** @@ -688,7 +688,7 @@ export interface CreatePurgeRequestRequest { all?: boolean } -export interface CreateRouteStageRequest { +export type CreateRouteStageRequest = { /** Pipeline ID the route stage belongs to. */ pipelineId: string /** @@ -700,7 +700,7 @@ export interface CreateRouteStageRequest { wafStageId?: string } -export interface CreateTLSStageRequest { +export type CreateTLSStageRequest = { /** Pipeline ID the TLS stage belongs to. */ pipelineId: string /** Secret (from Scaleway Secret Manager) containing your custom certificate. */ @@ -736,7 +736,7 @@ export interface CreateTLSStageRequest { wafStageId?: string } -export interface CreateWafStageRequest { +export type CreateWafStageRequest = { /** Pipeline ID the WAF stage belongs to. */ pipelineId: string /** Mode defining WAF behavior (`disable`/`log_only`/`enable`). */ @@ -756,51 +756,51 @@ export interface CreateWafStageRequest { backendStageId?: string } -export interface DeleteBackendStageRequest { +export type DeleteBackendStageRequest = { /** ID of the backend stage to delete. */ backendStageId: string } -export interface DeleteCacheStageRequest { +export type DeleteCacheStageRequest = { /** ID of the cache stage to delete. */ cacheStageId: string } -export interface DeleteCurrentPlanRequest { +export type DeleteCurrentPlanRequest = { projectId?: string } -export interface DeleteDNSStageRequest { +export type DeleteDNSStageRequest = { /** ID of the DNS stage to delete. */ dnsStageId: string } -export interface DeletePipelineRequest { +export type DeletePipelineRequest = { /** ID of the pipeline to delete. */ pipelineId: string } -export interface DeleteRouteStageRequest { +export type DeleteRouteStageRequest = { /** ID of the route stage to delete. */ routeStageId: string } -export interface DeleteTLSStageRequest { +export type DeleteTLSStageRequest = { /** ID of the TLS stage to delete. */ tlsStageId: string } -export interface DeleteWafStageRequest { +export type DeleteWafStageRequest = { /** ID of the WAF stage to delete. */ wafStageId: string } -export interface GetBackendStageRequest { +export type GetBackendStageRequest = { /** ID of the requested backend stage. */ backendStageId: string } -export interface GetBillingRequest { +export type GetBillingRequest = { projectId?: string } @@ -871,41 +871,41 @@ export interface GetBillingResponse { totalCost?: Money } -export interface GetCacheStageRequest { +export type GetCacheStageRequest = { /** ID of the requested cache stage. */ cacheStageId: string } -export interface GetCurrentPlanRequest { +export type GetCurrentPlanRequest = { projectId?: string } -export interface GetDNSStageRequest { +export type GetDNSStageRequest = { /** ID of the requested DNS stage. */ dnsStageId: string } -export interface GetPipelineRequest { +export type GetPipelineRequest = { /** ID of the requested pipeline. */ pipelineId: string } -export interface GetPurgeRequestRequest { +export type GetPurgeRequestRequest = { /** ID of the requested purge request. */ purgeRequestId: string } -export interface GetRouteStageRequest { +export type GetRouteStageRequest = { /** ID of the requested route stage. */ routeStageId: string } -export interface GetTLSStageRequest { +export type GetTLSStageRequest = { /** ID of the requested TLS stage. */ tlsStageId: string } -export interface GetWafStageRequest { +export type GetWafStageRequest = { /** ID of the requested WAF stage. */ wafStageId: string } @@ -915,7 +915,7 @@ export interface HeadStageResponse { headStage?: HeadStageResponseHeadStage } -export interface ListBackendStagesRequest { +export type ListBackendStagesRequest = { /** * Pipeline ID to filter for. Only backend stages from this pipeline will be * returned. @@ -951,7 +951,7 @@ export interface ListBackendStagesResponse { totalCount: number } -export interface ListCacheStagesRequest { +export type ListCacheStagesRequest = { /** * Pipeline ID to filter for. Only cache stages from this pipeline will be * returned. @@ -972,7 +972,7 @@ export interface ListCacheStagesResponse { totalCount: number } -export interface ListDNSStagesRequest { +export type ListDNSStagesRequest = { /** * Pipeline ID to filter for. Only DNS stages from this pipeline will be * returned. @@ -998,7 +998,7 @@ export interface ListDNSStagesResponse { totalCount: number } -export interface ListHeadStagesRequest { +export type ListHeadStagesRequest = { /** ID of the pipeline to update. */ pipelineId: string /** Page number to return, from the paginated results. */ @@ -1014,7 +1014,7 @@ export interface ListHeadStagesResponse { totalCount: number } -export interface ListPipelinesRequest { +export type ListPipelinesRequest = { /** Sort order of pipelines in the response. */ orderBy?: ListPipelinesRequestOrderBy /** Page number to return, from the paginated results. */ @@ -1050,7 +1050,7 @@ export interface ListPipelinesResponse { totalCount: number } -export interface ListPipelinesWithStagesRequest { +export type ListPipelinesWithStagesRequest = { orderBy?: ListPipelinesWithStagesRequestOrderBy page?: number pageSize?: number @@ -1069,7 +1069,7 @@ export interface ListPlansResponse { plans: PlanDetails[] } -export interface ListPurgeRequestsRequest { +export type ListPurgeRequestsRequest = { /** Sort order of purge requests in the response. */ orderBy?: ListPurgeRequestsRequestOrderBy /** Page number to return, from the paginated results. */ @@ -1100,7 +1100,7 @@ export interface ListPurgeRequestsResponse { totalCount: number } -export interface ListRouteRulesRequest { +export type ListRouteRulesRequest = { /** * Route stage ID to filter for. Only route rules from this route stage will * be returned. @@ -1118,7 +1118,7 @@ export interface ListRouteRulesResponse { routeRules: RouteRule[] } -export interface ListRouteStagesRequest { +export type ListRouteStagesRequest = { /** * Pipeline ID to filter for. Only route stages from this pipeline will be * returned. @@ -1139,7 +1139,7 @@ export interface ListRouteStagesResponse { totalCount: number } -export interface ListTLSStagesRequest { +export type ListTLSStagesRequest = { /** * Pipeline ID to filter for. Only TLS stages from this pipeline will be * returned. @@ -1170,7 +1170,7 @@ export interface ListTLSStagesResponse { totalCount: number } -export interface ListWafStagesRequest { +export type ListWafStagesRequest = { /** * Pipeline ID to filter for. Only WAF stages from this pipeline will be * returned. @@ -1195,7 +1195,7 @@ export interface Plan { planName: PlanName } -export interface SearchBackendStagesRequest { +export type SearchBackendStagesRequest = { orderBy?: SearchBackendStagesRequestOrderBy page?: number pageSize?: number @@ -1205,12 +1205,12 @@ export interface SearchBackendStagesRequest { lbId?: string } -export interface SelectPlanRequest { +export type SelectPlanRequest = { projectId?: string planName?: PlanName } -export interface SetHeadStageRequest { +export type SetHeadStageRequest = { /** ID of the pipeline to update. */ pipelineId: string /** @@ -1236,7 +1236,7 @@ export interface SetHeadStageRequest { swapHeadStage?: SetHeadStageRequestSwapHeadStage } -export interface SetRouteRulesRequest { +export type SetRouteRulesRequest = { /** ID of the route stage to update. */ routeStageId: string /** @@ -1258,7 +1258,7 @@ export interface SetRouteRulesResponse { routeRules: RouteRule[] } -export interface UpdateBackendStageRequest { +export type UpdateBackendStageRequest = { /** ID of the backend stage to update. */ backendStageId: string /** @@ -1279,7 +1279,7 @@ export interface UpdateBackendStageRequest { pipelineId: string } -export interface UpdateCacheStageRequest { +export type UpdateCacheStageRequest = { /** ID of the cache stage to update. */ cacheStageId: string /** Time To Live (TTL) in seconds. Defines how long content is cached. */ @@ -1303,7 +1303,7 @@ export interface UpdateCacheStageRequest { routeStageId?: string } -export interface UpdateDNSStageRequest { +export type UpdateDNSStageRequest = { /** ID of the DNS stage to update. */ dnsStageId: string /** @@ -1334,7 +1334,7 @@ export interface UpdateDNSStageRequest { backendStageId?: string } -export interface UpdatePipelineRequest { +export type UpdatePipelineRequest = { /** ID of the pipeline to update. */ pipelineId: string /** Name of the pipeline. */ @@ -1343,7 +1343,7 @@ export interface UpdatePipelineRequest { description?: string } -export interface UpdateRouteStageRequest { +export type UpdateRouteStageRequest = { /** ID of the route stage to update. */ routeStageId: string /** @@ -1355,7 +1355,7 @@ export interface UpdateRouteStageRequest { wafStageId?: string } -export interface UpdateTLSStageRequest { +export type UpdateTLSStageRequest = { /** ID of the TLS stage to update. */ tlsStageId: string /** Secret (from Scaleway Secret-Manager) containing your custom certificate. */ @@ -1391,7 +1391,7 @@ export interface UpdateTLSStageRequest { wafStageId?: string } -export interface UpdateWafStageRequest { +export type UpdateWafStageRequest = { /** ID of the WAF stage to update. */ wafStageId: string /** Mode defining WAF behavior (`disable`/`log_only`/`enable`). */ diff --git a/packages/clients/src/api/iam/v1alpha1/api.gen.ts b/packages/clients/src/api/iam/v1alpha1/api.gen.ts index f82fa31d0..60376a8a4 100644 --- a/packages/clients/src/api/iam/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/api.gen.ts @@ -33,6 +33,7 @@ import { unmarshalAPIKey, unmarshalApplication, unmarshalEncodedJWT, + unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, @@ -46,7 +47,6 @@ import { unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, - unmarshalListUserConnectionsResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, @@ -90,6 +90,8 @@ import type { GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, + GetUserConnectionsRequest, + GetUserConnectionsResponse, GetUserRequest, Group, JWT, @@ -115,8 +117,6 @@ import type { ListRulesResponse, ListSSHKeysRequest, ListSSHKeysResponse, - ListUserConnectionsRequest, - ListUserConnectionsResponse, ListUsersRequest, ListUsersResponse, LockUserRequest, @@ -512,13 +512,13 @@ export class API extends ParentAPI { unmarshalListGracePeriodsResponse, ) - listUserConnections = (request: Readonly) => - this.client.fetch( + getUserConnections = (request: Readonly) => + this.client.fetch( { method: 'GET', path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}/connections`, }, - unmarshalListUserConnectionsResponse, + unmarshalGetUserConnectionsResponse, ) protected pageOfListApplications = ( diff --git a/packages/clients/src/api/iam/v1alpha1/index.gen.ts b/packages/clients/src/api/iam/v1alpha1/index.gen.ts index 56b026385..b985b44ca 100644 --- a/packages/clients/src/api/iam/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/index.gen.ts @@ -35,6 +35,11 @@ export type { GetPolicyRequest, GetQuotumRequest, GetSSHKeyRequest, + GetUserConnectionsRequest, + GetUserConnectionsResponse, + GetUserConnectionsResponseConnection, + GetUserConnectionsResponseConnectionConnectedOrganization, + GetUserConnectionsResponseConnectionConnectedUser, GetUserRequest, GracePeriod, GracePeriodType, @@ -71,11 +76,6 @@ export type { ListSSHKeysRequest, ListSSHKeysRequestOrderBy, ListSSHKeysResponse, - ListUserConnectionsRequest, - ListUserConnectionsResponse, - ListUserConnectionsResponseConnection, - ListUserConnectionsResponseConnectionConnectedOrganization, - ListUserConnectionsResponseConnectionConnectedUser, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, diff --git a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts index 81fa27f4d..fd48b13c5 100644 --- a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts @@ -22,6 +22,10 @@ import type { CreateUserRequest, CreateUserRequestMember, EncodedJWT, + GetUserConnectionsResponse, + GetUserConnectionsResponseConnection, + GetUserConnectionsResponseConnectionConnectedOrganization, + GetUserConnectionsResponseConnectionConnectedUser, GracePeriod, Group, JWT, @@ -36,10 +40,6 @@ import type { ListQuotaResponse, ListRulesResponse, ListSSHKeysResponse, - ListUserConnectionsResponse, - ListUserConnectionsResponseConnection, - ListUserConnectionsResponseConnectionConnectedOrganization, - ListUserConnectionsResponseConnectionConnectedUser, ListUsersResponse, Log, MFAOTP, @@ -300,6 +300,76 @@ export const unmarshalEncodedJWT = (data: unknown): EncodedJWT => { } as EncodedJWT } +const unmarshalGetUserConnectionsResponseConnectionConnectedOrganization = ( + data: unknown, +): GetUserConnectionsResponseConnectionConnectedOrganization => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary.`, + ) + } + + return { + id: data.id, + locked: data.locked, + name: data.name, + } as GetUserConnectionsResponseConnectionConnectedOrganization +} + +const unmarshalGetUserConnectionsResponseConnectionConnectedUser = ( + data: unknown, +): GetUserConnectionsResponseConnectionConnectedUser => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary.`, + ) + } + + return { + id: data.id, + type: data.type, + username: data.username, + } as GetUserConnectionsResponseConnectionConnectedUser +} + +const unmarshalGetUserConnectionsResponseConnection = ( + data: unknown, +): GetUserConnectionsResponseConnection => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary.`, + ) + } + + return { + organization: data.organization + ? unmarshalGetUserConnectionsResponseConnectionConnectedOrganization( + data.organization, + ) + : undefined, + user: data.user + ? unmarshalGetUserConnectionsResponseConnectionConnectedUser(data.user) + : undefined, + } as GetUserConnectionsResponseConnection +} + +export const unmarshalGetUserConnectionsResponse = ( + data: unknown, +): GetUserConnectionsResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'GetUserConnectionsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + connections: unmarshalArrayOfObject( + data.connections, + unmarshalGetUserConnectionsResponseConnection, + ), + } as GetUserConnectionsResponse +} + export const unmarshalListAPIKeysResponse = ( data: unknown, ): ListAPIKeysResponse => { @@ -517,76 +587,6 @@ export const unmarshalListSSHKeysResponse = ( } as ListSSHKeysResponse } -const unmarshalListUserConnectionsResponseConnectionConnectedOrganization = ( - data: unknown, -): ListUserConnectionsResponseConnectionConnectedOrganization => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ListUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary.`, - ) - } - - return { - id: data.id, - locked: data.locked, - name: data.name, - } as ListUserConnectionsResponseConnectionConnectedOrganization -} - -const unmarshalListUserConnectionsResponseConnectionConnectedUser = ( - data: unknown, -): ListUserConnectionsResponseConnectionConnectedUser => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ListUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary.`, - ) - } - - return { - id: data.id, - type: data.type, - username: data.username, - } as ListUserConnectionsResponseConnectionConnectedUser -} - -const unmarshalListUserConnectionsResponseConnection = ( - data: unknown, -): ListUserConnectionsResponseConnection => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ListUserConnectionsResponseConnection' failed as data isn't a dictionary.`, - ) - } - - return { - organization: data.organization - ? unmarshalListUserConnectionsResponseConnectionConnectedOrganization( - data.organization, - ) - : undefined, - user: data.user - ? unmarshalListUserConnectionsResponseConnectionConnectedUser(data.user) - : undefined, - } as ListUserConnectionsResponseConnection -} - -export const unmarshalListUserConnectionsResponse = ( - data: unknown, -): ListUserConnectionsResponse => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ListUserConnectionsResponse' failed as data isn't a dictionary.`, - ) - } - - return { - connections: unmarshalArrayOfObject( - data.connections, - unmarshalListUserConnectionsResponseConnection, - ), - } as ListUserConnectionsResponse -} - export const unmarshalListUsersResponse = ( data: unknown, ): ListUsersResponse => { diff --git a/packages/clients/src/api/iam/v1alpha1/types.gen.ts b/packages/clients/src/api/iam/v1alpha1/types.gen.ts index 5315eaf29..53591809d 100644 --- a/packages/clients/src/api/iam/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/types.gen.ts @@ -99,6 +99,18 @@ export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated' export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member' +export interface GetUserConnectionsResponseConnectionConnectedOrganization { + id: string + name: string + locked: boolean +} + +export interface GetUserConnectionsResponseConnectionConnectedUser { + id: string + username: string + type: UserType +} + export interface QuotumLimit { /** * Whether or not the limit is applied globally. @@ -135,18 +147,6 @@ export interface QuotumLimit { unlimited?: boolean } -export interface ListUserConnectionsResponseConnectionConnectedOrganization { - id: string - name: string - locked: boolean -} - -export interface ListUserConnectionsResponseConnectionConnectedUser { - id: string - username: string - type: UserType -} - export interface JWT { /** JWT ID. */ jti: string @@ -203,6 +203,13 @@ export interface CreateUserRequestMember { password: string } +export interface GetUserConnectionsResponseConnection { + /** Information about the connected organization. */ + organization?: GetUserConnectionsResponseConnectionConnectedOrganization + /** Information about the connected user. */ + user?: GetUserConnectionsResponseConnectionConnectedUser +} + export interface APIKey { /** Access key of the API key. */ accessKey: string @@ -475,13 +482,6 @@ export interface SSHKey { disabled: boolean } -export interface ListUserConnectionsResponseConnection { - /** Information about the connected organization. */ - organization?: ListUserConnectionsResponseConnectionConnectedOrganization - /** Information about the connected user. */ - user?: ListUserConnectionsResponseConnectionConnectedUser -} - export interface User { /** ID of user. */ id: string @@ -770,6 +770,16 @@ export type GetSSHKeyRequest = { sshKeyId: string } +export type GetUserConnectionsRequest = { + /** ID of the user to list connections for. */ + userId: string +} + +export interface GetUserConnectionsResponse { + /** List of connections. */ + connections: GetUserConnectionsResponseConnection[] +} + export type GetUserRequest = { /** ID of the user to find. */ userId: string @@ -1041,16 +1051,6 @@ export interface ListSSHKeysResponse { totalCount: number } -export type ListUserConnectionsRequest = { - /** ID of the user to list connections for. */ - userId: string -} - -export interface ListUserConnectionsResponse { - /** List of connections. */ - connections: ListUserConnectionsResponseConnection[] -} - export type ListUsersRequest = { /** Criteria for sorting results. */ orderBy?: ListUsersRequestOrderBy diff --git a/packages/clients/src/api/lb/v1/types.gen.ts b/packages/clients/src/api/lb/v1/types.gen.ts index c57888b37..f1f45d9e3 100644 --- a/packages/clients/src/api/lb/v1/types.gen.ts +++ b/packages/clients/src/api/lb/v1/types.gen.ts @@ -595,7 +595,7 @@ export interface RouteMatch { */ sni?: string /** - * Value to match in the HTTP Host request header from an incoming connection. + * Value to match in the HTTP Host request header from an incoming request. * This field should be set for routes on HTTP Load Balancers. * * One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set. From 3aaa0110f04f91c879bf3440e87533eb220e4b42 Mon Sep 17 00:00:00 2001 From: devtools-ci-cd Date: Thu, 6 Mar 2025 14:30:56 +0100 Subject: [PATCH 2/2] Fix --- .../src/api/block/v1alpha1/marshalling.gen.ts | 2 +- .../edge_services/v1beta1/marshalling.gen.ts | 2 +- .../api/edge_services/v1beta1/types.gen.ts | 104 +++++++++--------- packages/clients/src/api/lb/v1/types.gen.ts | 2 +- 4 files changed, 55 insertions(+), 55 deletions(-) diff --git a/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts index d60c7d43e..3aff55dec 100644 --- a/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/block/v1alpha1/marshalling.gen.ts @@ -30,7 +30,7 @@ import type { VolumeType, } from './types.gen' -const unmarshalReference = (data: unknown): Reference => { +export const unmarshalReference = (data: unknown): Reference => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'Reference' failed as data isn't a dictionary.`, diff --git a/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts b/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts index 48d151776..dcc6e4979 100644 --- a/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts +++ b/packages/clients/src/api/edge_services/v1beta1/marshalling.gen.ts @@ -773,7 +773,7 @@ const marshalRuleHttpMatch = ( : undefined, }) -export const marshalSetRouteRulesRequestRouteRule = ( +const marshalSetRouteRulesRequestRouteRule = ( request: SetRouteRulesRequestRouteRule, defaults: DefaultValues, ): Record => ({ diff --git a/packages/clients/src/api/edge_services/v1beta1/types.gen.ts b/packages/clients/src/api/edge_services/v1beta1/types.gen.ts index 76605513d..b85b803c6 100644 --- a/packages/clients/src/api/edge_services/v1beta1/types.gen.ts +++ b/packages/clients/src/api/edge_services/v1beta1/types.gen.ts @@ -520,7 +520,7 @@ export interface TLSSecretsConfig { tlsSecrets: TLSSecret[] } -export type AddRouteRulesRequest = { +export interface AddRouteRulesRequest { /** ID of the route stage to update. */ routeStageId: string /** @@ -556,7 +556,7 @@ export interface AddRouteRulesResponse { routeRules: RouteRule[] } -export type CheckDomainRequest = { +export interface CheckDomainRequest { projectId?: string fqdn: string cname: string @@ -566,7 +566,7 @@ export interface CheckDomainResponse { isValid: boolean } -export type CheckLbOriginRequest = { +export interface CheckLbOriginRequest { lb?: ScalewayLb } @@ -575,7 +575,7 @@ export interface CheckLbOriginResponse { errorType: LbOriginError } -export type CheckPEMChainRequest = { +export interface CheckPEMChainRequest { projectId?: string fqdn: string /** One-of ('chain'): at most one of 'secret', 'raw' could be set. */ @@ -588,7 +588,7 @@ export interface CheckPEMChainResponse { isValid: boolean } -export type CreateBackendStageRequest = { +export interface CreateBackendStageRequest { /** Pipeline ID the Backend stage belongs to. */ pipelineId: string /** @@ -607,7 +607,7 @@ export type CreateBackendStageRequest = { scalewayLb?: ScalewayLbBackendConfig } -export type CreateCacheStageRequest = { +export interface CreateCacheStageRequest { /** Pipeline ID the Cache stage belongs to. */ pipelineId: string /** Time To Live (TTL) in seconds. Defines how long content is cached. */ @@ -631,7 +631,7 @@ export type CreateCacheStageRequest = { routeStageId?: string } -export type CreateDNSStageRequest = { +export interface CreateDNSStageRequest { /** Pipeline ID the DNS stage belongs to. */ pipelineId: string /** @@ -662,7 +662,7 @@ export type CreateDNSStageRequest = { backendStageId?: string } -export type CreatePipelineRequest = { +export interface CreatePipelineRequest { /** Project ID in which the pipeline will be created. */ projectId?: string /** Name of the pipeline. */ @@ -671,7 +671,7 @@ export type CreatePipelineRequest = { description: string } -export type CreatePurgeRequestRequest = { +export interface CreatePurgeRequestRequest { /** Pipeline ID in which the purge request will be created. */ pipelineId: string /** @@ -688,7 +688,7 @@ export type CreatePurgeRequestRequest = { all?: boolean } -export type CreateRouteStageRequest = { +export interface CreateRouteStageRequest { /** Pipeline ID the route stage belongs to. */ pipelineId: string /** @@ -700,7 +700,7 @@ export type CreateRouteStageRequest = { wafStageId?: string } -export type CreateTLSStageRequest = { +export interface CreateTLSStageRequest { /** Pipeline ID the TLS stage belongs to. */ pipelineId: string /** Secret (from Scaleway Secret Manager) containing your custom certificate. */ @@ -736,7 +736,7 @@ export type CreateTLSStageRequest = { wafStageId?: string } -export type CreateWafStageRequest = { +export interface CreateWafStageRequest { /** Pipeline ID the WAF stage belongs to. */ pipelineId: string /** Mode defining WAF behavior (`disable`/`log_only`/`enable`). */ @@ -756,51 +756,51 @@ export type CreateWafStageRequest = { backendStageId?: string } -export type DeleteBackendStageRequest = { +export interface DeleteBackendStageRequest { /** ID of the backend stage to delete. */ backendStageId: string } -export type DeleteCacheStageRequest = { +export interface DeleteCacheStageRequest { /** ID of the cache stage to delete. */ cacheStageId: string } -export type DeleteCurrentPlanRequest = { +export interface DeleteCurrentPlanRequest { projectId?: string } -export type DeleteDNSStageRequest = { +export interface DeleteDNSStageRequest { /** ID of the DNS stage to delete. */ dnsStageId: string } -export type DeletePipelineRequest = { +export interface DeletePipelineRequest { /** ID of the pipeline to delete. */ pipelineId: string } -export type DeleteRouteStageRequest = { +export interface DeleteRouteStageRequest { /** ID of the route stage to delete. */ routeStageId: string } -export type DeleteTLSStageRequest = { +export interface DeleteTLSStageRequest { /** ID of the TLS stage to delete. */ tlsStageId: string } -export type DeleteWafStageRequest = { +export interface DeleteWafStageRequest { /** ID of the WAF stage to delete. */ wafStageId: string } -export type GetBackendStageRequest = { +export interface GetBackendStageRequest { /** ID of the requested backend stage. */ backendStageId: string } -export type GetBillingRequest = { +export interface GetBillingRequest { projectId?: string } @@ -871,41 +871,41 @@ export interface GetBillingResponse { totalCost?: Money } -export type GetCacheStageRequest = { +export interface GetCacheStageRequest { /** ID of the requested cache stage. */ cacheStageId: string } -export type GetCurrentPlanRequest = { +export interface GetCurrentPlanRequest { projectId?: string } -export type GetDNSStageRequest = { +export interface GetDNSStageRequest { /** ID of the requested DNS stage. */ dnsStageId: string } -export type GetPipelineRequest = { +export interface GetPipelineRequest { /** ID of the requested pipeline. */ pipelineId: string } -export type GetPurgeRequestRequest = { +export interface GetPurgeRequestRequest { /** ID of the requested purge request. */ purgeRequestId: string } -export type GetRouteStageRequest = { +export interface GetRouteStageRequest { /** ID of the requested route stage. */ routeStageId: string } -export type GetTLSStageRequest = { +export interface GetTLSStageRequest { /** ID of the requested TLS stage. */ tlsStageId: string } -export type GetWafStageRequest = { +export interface GetWafStageRequest { /** ID of the requested WAF stage. */ wafStageId: string } @@ -915,7 +915,7 @@ export interface HeadStageResponse { headStage?: HeadStageResponseHeadStage } -export type ListBackendStagesRequest = { +export interface ListBackendStagesRequest { /** * Pipeline ID to filter for. Only backend stages from this pipeline will be * returned. @@ -951,7 +951,7 @@ export interface ListBackendStagesResponse { totalCount: number } -export type ListCacheStagesRequest = { +export interface ListCacheStagesRequest { /** * Pipeline ID to filter for. Only cache stages from this pipeline will be * returned. @@ -972,7 +972,7 @@ export interface ListCacheStagesResponse { totalCount: number } -export type ListDNSStagesRequest = { +export interface ListDNSStagesRequest { /** * Pipeline ID to filter for. Only DNS stages from this pipeline will be * returned. @@ -998,7 +998,7 @@ export interface ListDNSStagesResponse { totalCount: number } -export type ListHeadStagesRequest = { +export interface ListHeadStagesRequest { /** ID of the pipeline to update. */ pipelineId: string /** Page number to return, from the paginated results. */ @@ -1014,7 +1014,7 @@ export interface ListHeadStagesResponse { totalCount: number } -export type ListPipelinesRequest = { +export interface ListPipelinesRequest { /** Sort order of pipelines in the response. */ orderBy?: ListPipelinesRequestOrderBy /** Page number to return, from the paginated results. */ @@ -1050,7 +1050,7 @@ export interface ListPipelinesResponse { totalCount: number } -export type ListPipelinesWithStagesRequest = { +export interface ListPipelinesWithStagesRequest { orderBy?: ListPipelinesWithStagesRequestOrderBy page?: number pageSize?: number @@ -1069,7 +1069,7 @@ export interface ListPlansResponse { plans: PlanDetails[] } -export type ListPurgeRequestsRequest = { +export interface ListPurgeRequestsRequest { /** Sort order of purge requests in the response. */ orderBy?: ListPurgeRequestsRequestOrderBy /** Page number to return, from the paginated results. */ @@ -1100,7 +1100,7 @@ export interface ListPurgeRequestsResponse { totalCount: number } -export type ListRouteRulesRequest = { +export interface ListRouteRulesRequest { /** * Route stage ID to filter for. Only route rules from this route stage will * be returned. @@ -1118,7 +1118,7 @@ export interface ListRouteRulesResponse { routeRules: RouteRule[] } -export type ListRouteStagesRequest = { +export interface ListRouteStagesRequest { /** * Pipeline ID to filter for. Only route stages from this pipeline will be * returned. @@ -1139,7 +1139,7 @@ export interface ListRouteStagesResponse { totalCount: number } -export type ListTLSStagesRequest = { +export interface ListTLSStagesRequest { /** * Pipeline ID to filter for. Only TLS stages from this pipeline will be * returned. @@ -1170,7 +1170,7 @@ export interface ListTLSStagesResponse { totalCount: number } -export type ListWafStagesRequest = { +export interface ListWafStagesRequest { /** * Pipeline ID to filter for. Only WAF stages from this pipeline will be * returned. @@ -1195,7 +1195,7 @@ export interface Plan { planName: PlanName } -export type SearchBackendStagesRequest = { +export interface SearchBackendStagesRequest { orderBy?: SearchBackendStagesRequestOrderBy page?: number pageSize?: number @@ -1205,12 +1205,12 @@ export type SearchBackendStagesRequest = { lbId?: string } -export type SelectPlanRequest = { +export interface SelectPlanRequest { projectId?: string planName?: PlanName } -export type SetHeadStageRequest = { +export interface SetHeadStageRequest { /** ID of the pipeline to update. */ pipelineId: string /** @@ -1236,7 +1236,7 @@ export type SetHeadStageRequest = { swapHeadStage?: SetHeadStageRequestSwapHeadStage } -export type SetRouteRulesRequest = { +export interface SetRouteRulesRequest { /** ID of the route stage to update. */ routeStageId: string /** @@ -1258,7 +1258,7 @@ export interface SetRouteRulesResponse { routeRules: RouteRule[] } -export type UpdateBackendStageRequest = { +export interface UpdateBackendStageRequest { /** ID of the backend stage to update. */ backendStageId: string /** @@ -1279,7 +1279,7 @@ export type UpdateBackendStageRequest = { pipelineId: string } -export type UpdateCacheStageRequest = { +export interface UpdateCacheStageRequest { /** ID of the cache stage to update. */ cacheStageId: string /** Time To Live (TTL) in seconds. Defines how long content is cached. */ @@ -1303,7 +1303,7 @@ export type UpdateCacheStageRequest = { routeStageId?: string } -export type UpdateDNSStageRequest = { +export interface UpdateDNSStageRequest { /** ID of the DNS stage to update. */ dnsStageId: string /** @@ -1334,7 +1334,7 @@ export type UpdateDNSStageRequest = { backendStageId?: string } -export type UpdatePipelineRequest = { +export interface UpdatePipelineRequest { /** ID of the pipeline to update. */ pipelineId: string /** Name of the pipeline. */ @@ -1343,7 +1343,7 @@ export type UpdatePipelineRequest = { description?: string } -export type UpdateRouteStageRequest = { +export interface UpdateRouteStageRequest { /** ID of the route stage to update. */ routeStageId: string /** @@ -1355,7 +1355,7 @@ export type UpdateRouteStageRequest = { wafStageId?: string } -export type UpdateTLSStageRequest = { +export interface UpdateTLSStageRequest { /** ID of the TLS stage to update. */ tlsStageId: string /** Secret (from Scaleway Secret-Manager) containing your custom certificate. */ @@ -1391,7 +1391,7 @@ export type UpdateTLSStageRequest = { wafStageId?: string } -export type UpdateWafStageRequest = { +export interface UpdateWafStageRequest { /** ID of the WAF stage to update. */ wafStageId: string /** Mode defining WAF behavior (`disable`/`log_only`/`enable`). */ diff --git a/packages/clients/src/api/lb/v1/types.gen.ts b/packages/clients/src/api/lb/v1/types.gen.ts index f1f45d9e3..c57888b37 100644 --- a/packages/clients/src/api/lb/v1/types.gen.ts +++ b/packages/clients/src/api/lb/v1/types.gen.ts @@ -595,7 +595,7 @@ export interface RouteMatch { */ sni?: string /** - * Value to match in the HTTP Host request header from an incoming request. + * Value to match in the HTTP Host request header from an incoming connection. * This field should be set for routes on HTTP Load Balancers. * * One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set.