diff --git a/packages/clients/src/api/mnq/index.ts b/packages/clients/src/api/mnq/index.ts index e49bded05..9198262d6 100644 --- a/packages/clients/src/api/mnq/index.ts +++ b/packages/clients/src/api/mnq/index.ts @@ -1 +1,2 @@ export * as v1alpha1 from './v1alpha1/index.gen' +export * as v1beta1 from './v1beta1/index.gen' diff --git a/packages/clients/src/api/mnq/v1beta1/api.gen.ts b/packages/clients/src/api/mnq/v1beta1/api.gen.ts new file mode 100644 index 000000000..e84ba5b92 --- /dev/null +++ b/packages/clients/src/api/mnq/v1beta1/api.gen.ts @@ -0,0 +1,780 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +import { + API as ParentAPI, + enrichForPagination, + urlParams, + validatePathParam, +} from '../../../bridge' +import type { Region } from '../../../bridge' +import { + marshalNatsApiCreateNatsAccountRequest, + marshalNatsApiCreateNatsCredentialsRequest, + marshalNatsApiUpdateNatsAccountRequest, + marshalSnsApiActivateSnsRequest, + marshalSnsApiCreateSnsCredentialsRequest, + marshalSnsApiDeactivateSnsRequest, + marshalSnsApiUpdateSnsCredentialsRequest, + marshalSqsApiActivateSqsRequest, + marshalSqsApiCreateSqsCredentialsRequest, + marshalSqsApiDeactivateSqsRequest, + marshalSqsApiUpdateSqsCredentialsRequest, + unmarshalListNatsAccountsResponse, + unmarshalListNatsCredentialsResponse, + unmarshalListSnsCredentialsResponse, + unmarshalListSqsCredentialsResponse, + unmarshalNatsAccount, + unmarshalNatsCredentials, + unmarshalSnsCredentials, + unmarshalSnsInfo, + unmarshalSqsCredentials, + unmarshalSqsInfo, +} from './marshalling.gen' +import type { + ListNatsAccountsResponse, + ListNatsCredentialsResponse, + ListSnsCredentialsResponse, + ListSqsCredentialsResponse, + NatsAccount, + NatsApiCreateNatsAccountRequest, + NatsApiCreateNatsCredentialsRequest, + NatsApiDeleteNatsAccountRequest, + NatsApiDeleteNatsCredentialsRequest, + NatsApiGetNatsAccountRequest, + NatsApiGetNatsCredentialsRequest, + NatsApiListNatsAccountsRequest, + NatsApiListNatsCredentialsRequest, + NatsApiUpdateNatsAccountRequest, + NatsCredentials, + SnsApiActivateSnsRequest, + SnsApiCreateSnsCredentialsRequest, + SnsApiDeactivateSnsRequest, + SnsApiDeleteSnsCredentialsRequest, + SnsApiGetSnsCredentialsRequest, + SnsApiGetSnsInfoRequest, + SnsApiListSnsCredentialsRequest, + SnsApiUpdateSnsCredentialsRequest, + SnsCredentials, + SnsInfo, + SqsApiActivateSqsRequest, + SqsApiCreateSqsCredentialsRequest, + SqsApiDeactivateSqsRequest, + SqsApiDeleteSqsCredentialsRequest, + SqsApiGetSqsCredentialsRequest, + SqsApiGetSqsInfoRequest, + SqsApiListSqsCredentialsRequest, + SqsApiUpdateSqsCredentialsRequest, + SqsCredentials, + SqsInfo, +} from './types.gen' + +const jsonContentHeaders = { + 'Content-Type': 'application/json; charset=utf-8', +} + +/** + * Messaging and Queuing NATS API. + * + * This API allows you to manage Scaleway Messaging and Queueing NATS accounts. + * Messaging and Queuing NATS API. + */ +export class NatsAPI extends ParentAPI { + /** Lists the available regions of the API. */ + public static readonly LOCALITIES: Region[] = ['fr-par'] + + /** + * Create a NATS account. Create a NATS account associated with a Project. + * + * @param request - The request {@link NatsApiCreateNatsAccountRequest} + * @returns A Promise of NatsAccount + */ + createNatsAccount = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalNatsApiCreateNatsAccountRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-accounts`, + }, + unmarshalNatsAccount, + ) + + /** + * Delete a NATS account. Delete a NATS account, specified by its NATS account + * ID. Note that deleting a NATS account is irreversible, and any credentials, + * streams, consumer and stored messages belonging to this NATS account will + * also be deleted. + * + * @param request - The request {@link NatsApiDeleteNatsAccountRequest} + */ + deleteNatsAccount = (request: Readonly) => + this.client.fetch({ + method: 'DELETE', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-accounts/${validatePathParam( + 'natsAccountId', + request.natsAccountId, + )}`, + }) + + /** + * Update the name of a NATS account. Update the name of a NATS account, + * specified by its NATS account ID. + * + * @param request - The request {@link NatsApiUpdateNatsAccountRequest} + * @returns A Promise of NatsAccount + */ + updateNatsAccount = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalNatsApiUpdateNatsAccountRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'PATCH', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-accounts/${validatePathParam( + 'natsAccountId', + request.natsAccountId, + )}`, + }, + unmarshalNatsAccount, + ) + + /** + * Get a NATS account. Retrieve information about an existing NATS account + * identified by its NATS account ID. Its full details, including name and + * endpoint, are returned in the response. + * + * @param request - The request {@link NatsApiGetNatsAccountRequest} + * @returns A Promise of NatsAccount + */ + getNatsAccount = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-accounts/${validatePathParam( + 'natsAccountId', + request.natsAccountId, + )}`, + }, + unmarshalNatsAccount, + ) + + protected pageOfListNatsAccounts = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-accounts`, + urlParams: urlParams( + ['order_by', request.orderBy ?? 'created_at_asc'], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ['project_id', request.projectId], + ), + }, + unmarshalListNatsAccountsResponse, + ) + + /** + * List NATS accounts. List all NATS accounts in the specified region, for a + * Scaleway Organization or Project. By default, the NATS accounts returned in + * the list are ordered by creation date in ascending order, though this can + * be modified via the `order_by` field. + * + * @param request - The request {@link NatsApiListNatsAccountsRequest} + * @returns A Promise of ListNatsAccountsResponse + */ + listNatsAccounts = (request: Readonly = {}) => + enrichForPagination('natsAccounts', this.pageOfListNatsAccounts, request) + + /** + * Create NATS credentials. Create a set of credentials for a NATS account, + * specified by its NATS account ID. + * + * @param request - The request {@link NatsApiCreateNatsCredentialsRequest} + * @returns A Promise of NatsCredentials + */ + createNatsCredentials = ( + request: Readonly, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalNatsApiCreateNatsCredentialsRequest( + request, + this.client.settings, + ), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-credentials`, + }, + unmarshalNatsCredentials, + ) + + /** + * Delete NATS credentials. Delete a set of credentials, specified by their + * credentials ID. Deleting credentials is irreversible and cannot be undone. + * The credentials can no longer be used to access the NATS account, and + * active connections using this credentials will be closed. + * + * @param request - The request {@link NatsApiDeleteNatsCredentialsRequest} + */ + deleteNatsCredentials = ( + request: Readonly, + ) => + this.client.fetch({ + method: 'DELETE', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-credentials/${validatePathParam( + 'natsCredentialsId', + request.natsCredentialsId, + )}`, + }) + + /** + * Get NATS credentials. Retrieve an existing set of credentials, identified + * by the `nats_credentials_id`. The credentials themselves are NOT returned, + * only their metadata (NATS account ID, credentials name, etc), are returned + * in the response. + * + * @param request - The request {@link NatsApiGetNatsCredentialsRequest} + * @returns A Promise of NatsCredentials + */ + getNatsCredentials = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-credentials/${validatePathParam( + 'natsCredentialsId', + request.natsCredentialsId, + )}`, + }, + unmarshalNatsCredentials, + ) + + protected pageOfListNatsCredentials = ( + request: Readonly, + ) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/nats-credentials`, + urlParams: urlParams( + ['nats_account_id', request.natsAccountId], + ['order_by', request.orderBy ?? 'created_at_asc'], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ), + }, + unmarshalListNatsCredentialsResponse, + ) + + /** + * List NATS credentials. List existing credentials in the specified NATS + * account. The response contains only the metadata for the credentials, not + * the credentials themselves, which are only returned after a **Create + * Credentials** call. + * + * @param request - The request {@link NatsApiListNatsCredentialsRequest} + * @returns A Promise of ListNatsCredentialsResponse + */ + listNatsCredentials = ( + request: Readonly, + ) => + enrichForPagination( + 'natsCredentials', + this.pageOfListNatsCredentials, + request, + ) +} + +/** + * Messaging and Queuing SNS API. + * + * This API allows you to manage Scaleway Messaging and Queueing SNS brokers. + * Messaging and Queuing SNS API. + */ +export class SnsAPI extends ParentAPI { + /** Lists the available regions of the API. */ + public static readonly LOCALITIES: Region[] = ['fr-par'] + + /** + * Activate SNS. Activate SNS for the specified Project ID. SNS must be + * activated before any usage. Activating SNS does not trigger any billing, + * and you can deactivate at any time. + * + * @param request - The request {@link SnsApiActivateSnsRequest} + * @returns A Promise of SnsInfo + */ + activateSns = (request: Readonly = {}) => + this.client.fetch( + { + body: JSON.stringify( + marshalSnsApiActivateSnsRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/activate-sns`, + }, + unmarshalSnsInfo, + ) + + /** + * Get SNS info. Retrieve the SNS information of the specified Project ID. + * Informations include the activation status and the SNS API endpoint URL. + * + * @param request - The request {@link SnsApiGetSnsInfoRequest} + * @returns A Promise of SnsInfo + */ + getSnsInfo = (request: Readonly = {}) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-info`, + urlParams: urlParams([ + 'project_id', + request.projectId ?? this.client.settings.defaultProjectId, + ]), + }, + unmarshalSnsInfo, + ) + + /** + * Deactivate SNS. Deactivate SNS for the specified Project ID.You must delete + * all topics and credentials before this call or you need to set the + * force_delete parameter. + * + * @param request - The request {@link SnsApiDeactivateSnsRequest} + * @returns A Promise of SnsInfo + */ + deactivateSns = (request: Readonly = {}) => + this.client.fetch( + { + body: JSON.stringify( + marshalSnsApiDeactivateSnsRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/deactivate-sns`, + }, + unmarshalSnsInfo, + ) + + /** + * Create SNS credentials. Create a set of credentials for SNS, specified by a + * Project ID. Credentials give the bearer access to topics, and the level of + * permissions can be defined granularly. + * + * @param request - The request {@link SnsApiCreateSnsCredentialsRequest} + * @returns A Promise of SnsCredentials + */ + createSnsCredentials = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalSnsApiCreateSnsCredentialsRequest( + request, + this.client.settings, + ), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-credentials`, + }, + unmarshalSnsCredentials, + ) + + /** + * Delete SNS credentials. Delete a set of SNS credentials, specified by their + * credentials ID. Deleting credentials is irreversible and cannot be undone. + * The credentials can then no longer be used to access SNS. + * + * @param request - The request {@link SnsApiDeleteSnsCredentialsRequest} + */ + deleteSnsCredentials = ( + request: Readonly, + ) => + this.client.fetch({ + method: 'DELETE', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-credentials/${validatePathParam( + 'snsCredentialsId', + request.snsCredentialsId, + )}`, + }) + + /** + * Update SNS credentials. Update a set of SNS credentials. You can update the + * credentials' name, or their permissions. + * + * @param request - The request {@link SnsApiUpdateSnsCredentialsRequest} + * @returns A Promise of SnsCredentials + */ + updateSnsCredentials = ( + request: Readonly, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalSnsApiUpdateSnsCredentialsRequest( + request, + this.client.settings, + ), + ), + headers: jsonContentHeaders, + method: 'PATCH', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-credentials/${validatePathParam( + 'snsCredentialsId', + request.snsCredentialsId, + )}`, + }, + unmarshalSnsCredentials, + ) + + /** + * Get SNS credentials. Retrieve an existing set of credentials, identified by + * the `credentials_id`. The credentials themselves, as well as their metadata + * (name, project ID etc), are returned in the response. + * + * @param request - The request {@link SnsApiGetSnsCredentialsRequest} + * @returns A Promise of SnsCredentials + */ + getSnsCredentials = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-credentials/${validatePathParam( + 'snsCredentialsId', + request.snsCredentialsId, + )}`, + }, + unmarshalSnsCredentials, + ) + + protected pageOfListSnsCredentials = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sns-credentials`, + urlParams: urlParams( + ['order_by', request.orderBy ?? 'created_at_asc'], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ['project_id', request.projectId], + ), + }, + unmarshalListSnsCredentialsResponse, + ) + + /** + * List SNS credentials. List existing SNS credentials in the specified + * region. The response contains only the metadata for the credentials, not + * the credentials themselves. + * + * @param request - The request {@link SnsApiListSnsCredentialsRequest} + * @returns A Promise of ListSnsCredentialsResponse + */ + listSnsCredentials = ( + request: Readonly = {}, + ) => + enrichForPagination( + 'snsCredentials', + this.pageOfListSnsCredentials, + request, + ) +} + +/** + * Messaging and Queuing SQS API. + * + * This API allows you to manage Scaleway Messaging and Queueing SQS brokers. + * Messaging and Queuing SQS API. + */ +export class SqsAPI extends ParentAPI { + /** Lists the available regions of the API. */ + public static readonly LOCALITIES: Region[] = ['fr-par'] + + /** + * Activate SQS. Activate SQS for the specified Project ID. SQS must be + * activated before any usage such as creating credentials and queues. + * Activating SQS does not trigger any billing, and you can deactivate at any + * time. + * + * @param request - The request {@link SqsApiActivateSqsRequest} + * @returns A Promise of SqsInfo + */ + activateSqs = (request: Readonly = {}) => + this.client.fetch( + { + body: JSON.stringify( + marshalSqsApiActivateSqsRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/activate-sqs`, + }, + unmarshalSqsInfo, + ) + + /** + * Get SQS info. Retrieve the SQS information of the specified Project ID. + * Informations include the activation status and the SQS API endpoint URL. + * + * @param request - The request {@link SqsApiGetSqsInfoRequest} + * @returns A Promise of SqsInfo + */ + getSqsInfo = (request: Readonly = {}) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-info`, + urlParams: urlParams([ + 'project_id', + request.projectId ?? this.client.settings.defaultProjectId, + ]), + }, + unmarshalSqsInfo, + ) + + /** + * Deactivate SQS. Deactivate SQS for the specified Project ID. You must + * delete all queues and credentials before this call or you need to set the + * force_delete parameter. + * + * @param request - The request {@link SqsApiDeactivateSqsRequest} + * @returns A Promise of SqsInfo + */ + deactivateSqs = (request: Readonly = {}) => + this.client.fetch( + { + body: JSON.stringify( + marshalSqsApiDeactivateSqsRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/deactivate-sqs`, + }, + unmarshalSqsInfo, + ) + + /** + * Create SQS credentials. Create a set of credentials for SQS, specified by a + * Project ID. Credentials give the bearer access to queues, and the level of + * permissions can be defined granularly. + * + * @param request - The request {@link SqsApiCreateSqsCredentialsRequest} + * @returns A Promise of SqsCredentials + */ + createSqsCredentials = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalSqsApiCreateSqsCredentialsRequest( + request, + this.client.settings, + ), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-credentials`, + }, + unmarshalSqsCredentials, + ) + + /** + * Delete SQS credentials. Delete a set of SQS credentials, specified by their + * credentials ID. Deleting credentials is irreversible and cannot be undone. + * The credentials can then no longer be used to access SQS. + * + * @param request - The request {@link SqsApiDeleteSqsCredentialsRequest} + */ + deleteSqsCredentials = ( + request: Readonly, + ) => + this.client.fetch({ + method: 'DELETE', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-credentials/${validatePathParam( + 'sqsCredentialsId', + request.sqsCredentialsId, + )}`, + }) + + /** + * Update SQS credentials. Update a set of SQS credentials. You can update the + * credentials' name, or their permissions. + * + * @param request - The request {@link SqsApiUpdateSqsCredentialsRequest} + * @returns A Promise of SqsCredentials + */ + updateSqsCredentials = ( + request: Readonly, + ) => + this.client.fetch( + { + body: JSON.stringify( + marshalSqsApiUpdateSqsCredentialsRequest( + request, + this.client.settings, + ), + ), + headers: jsonContentHeaders, + method: 'PATCH', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-credentials/${validatePathParam( + 'sqsCredentialsId', + request.sqsCredentialsId, + )}`, + }, + unmarshalSqsCredentials, + ) + + /** + * Get SQS credentials. Retrieve an existing set of credentials, identified by + * the `credentials_id`. The credentials themselves, as well as their metadata + * (name, project ID etc), are returned in the response. + * + * @param request - The request {@link SqsApiGetSqsCredentialsRequest} + * @returns A Promise of SqsCredentials + */ + getSqsCredentials = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-credentials/${validatePathParam( + 'sqsCredentialsId', + request.sqsCredentialsId, + )}`, + }, + unmarshalSqsCredentials, + ) + + protected pageOfListSqsCredentials = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + method: 'GET', + path: `/mnq/v1beta1/regions/${validatePathParam( + 'region', + request.region ?? this.client.settings.defaultRegion, + )}/sqs-credentials`, + urlParams: urlParams( + ['order_by', request.orderBy ?? 'created_at_asc'], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ['project_id', request.projectId], + ), + }, + unmarshalListSqsCredentialsResponse, + ) + + /** + * List SQS credentials. List existing SQS credentials in the specified + * region. The response contains only the metadata for the credentials, not + * the credentials themselves. + * + * @param request - The request {@link SqsApiListSqsCredentialsRequest} + * @returns A Promise of ListSqsCredentialsResponse + */ + listSqsCredentials = ( + request: Readonly = {}, + ) => + enrichForPagination( + 'sqsCredentials', + this.pageOfListSqsCredentials, + request, + ) +} diff --git a/packages/clients/src/api/mnq/v1beta1/index.gen.ts b/packages/clients/src/api/mnq/v1beta1/index.gen.ts new file mode 100644 index 000000000..0bc8b8f72 --- /dev/null +++ b/packages/clients/src/api/mnq/v1beta1/index.gen.ts @@ -0,0 +1,50 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +export { NatsAPI, SnsAPI, SqsAPI } from './api.gen' +export type { + File, + ListNatsAccountsRequestOrderBy, + ListNatsAccountsResponse, + ListNatsCredentialsRequestOrderBy, + ListNatsCredentialsResponse, + ListSnsCredentialsRequestOrderBy, + ListSnsCredentialsResponse, + ListSqsCredentialsRequestOrderBy, + ListSqsCredentialsResponse, + NatsAccount, + NatsApiCreateNatsAccountRequest, + NatsApiCreateNatsCredentialsRequest, + NatsApiDeleteNatsAccountRequest, + NatsApiDeleteNatsCredentialsRequest, + NatsApiGetNatsAccountRequest, + NatsApiGetNatsCredentialsRequest, + NatsApiListNatsAccountsRequest, + NatsApiListNatsCredentialsRequest, + NatsApiUpdateNatsAccountRequest, + NatsCredentials, + SnsApiActivateSnsRequest, + SnsApiCreateSnsCredentialsRequest, + SnsApiDeactivateSnsRequest, + SnsApiDeleteSnsCredentialsRequest, + SnsApiGetSnsCredentialsRequest, + SnsApiGetSnsInfoRequest, + SnsApiListSnsCredentialsRequest, + SnsApiUpdateSnsCredentialsRequest, + SnsCredentials, + SnsInfo, + SnsInfoStatus, + SnsPermissions, + SqsApiActivateSqsRequest, + SqsApiCreateSqsCredentialsRequest, + SqsApiDeactivateSqsRequest, + SqsApiDeleteSqsCredentialsRequest, + SqsApiGetSqsCredentialsRequest, + SqsApiGetSqsInfoRequest, + SqsApiListSqsCredentialsRequest, + SqsApiUpdateSqsCredentialsRequest, + SqsCredentials, + SqsInfo, + SqsInfoStatus, + SqsPermissions, +} from './types.gen' +export * as ValidationRules from './validation-rules.gen' diff --git a/packages/clients/src/api/mnq/v1beta1/marshalling.gen.ts b/packages/clients/src/api/mnq/v1beta1/marshalling.gen.ts new file mode 100644 index 000000000..b05118866 --- /dev/null +++ b/packages/clients/src/api/mnq/v1beta1/marshalling.gen.ts @@ -0,0 +1,364 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +import randomName from '@scaleway/random-name' +import { + isJSONObject, + unmarshalArrayOfObject, + unmarshalDate, +} from '../../../bridge' +import type { DefaultValues } from '../../../bridge' +import type { + File, + ListNatsAccountsResponse, + ListNatsCredentialsResponse, + ListSnsCredentialsResponse, + ListSqsCredentialsResponse, + NatsAccount, + NatsApiCreateNatsAccountRequest, + NatsApiCreateNatsCredentialsRequest, + NatsApiUpdateNatsAccountRequest, + NatsCredentials, + SnsApiActivateSnsRequest, + SnsApiCreateSnsCredentialsRequest, + SnsApiDeactivateSnsRequest, + SnsApiUpdateSnsCredentialsRequest, + SnsCredentials, + SnsInfo, + SnsPermissions, + SqsApiActivateSqsRequest, + SqsApiCreateSqsCredentialsRequest, + SqsApiDeactivateSqsRequest, + SqsApiUpdateSqsCredentialsRequest, + SqsCredentials, + SqsInfo, + SqsPermissions, +} from './types.gen' + +const unmarshalFile = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'File' failed as data isn't a dictionary.`, + ) + } + + return { content: data.content, name: data.name } as File +} + +const unmarshalSnsPermissions = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SnsPermissions' failed as data isn't a dictionary.`, + ) + } + + return { + canManage: data.can_manage, + canPublish: data.can_publish, + canReceive: data.can_receive, + } as SnsPermissions +} + +const unmarshalSqsPermissions = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SqsPermissions' failed as data isn't a dictionary.`, + ) + } + + return { + canManage: data.can_manage, + canPublish: data.can_publish, + canReceive: data.can_receive, + } as SqsPermissions +} + +export const unmarshalNatsAccount = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'NatsAccount' failed as data isn't a dictionary.`, + ) + } + + return { + createdAt: unmarshalDate(data.created_at), + endpoint: data.endpoint, + id: data.id, + name: data.name, + projectId: data.project_id, + region: data.region, + updatedAt: unmarshalDate(data.updated_at), + } as NatsAccount +} + +export const unmarshalNatsCredentials = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'NatsCredentials' failed as data isn't a dictionary.`, + ) + } + + return { + checksum: data.checksum, + createdAt: unmarshalDate(data.created_at), + credentials: data.credentials ? unmarshalFile(data.credentials) : undefined, + id: data.id, + name: data.name, + natsAccountId: data.nats_account_id, + updatedAt: unmarshalDate(data.updated_at), + } as NatsCredentials +} + +export const unmarshalSnsCredentials = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SnsCredentials' failed as data isn't a dictionary.`, + ) + } + + return { + accessKey: data.access_key, + createdAt: unmarshalDate(data.created_at), + id: data.id, + name: data.name, + permissions: data.permissions + ? unmarshalSnsPermissions(data.permissions) + : undefined, + projectId: data.project_id, + region: data.region, + secretChecksum: data.secret_checksum, + secretKey: data.secret_key, + updatedAt: unmarshalDate(data.updated_at), + } as SnsCredentials +} + +export const unmarshalSqsCredentials = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SqsCredentials' failed as data isn't a dictionary.`, + ) + } + + return { + accessKey: data.access_key, + createdAt: unmarshalDate(data.created_at), + id: data.id, + name: data.name, + permissions: data.permissions + ? unmarshalSqsPermissions(data.permissions) + : undefined, + projectId: data.project_id, + region: data.region, + secretChecksum: data.secret_checksum, + secretKey: data.secret_key, + updatedAt: unmarshalDate(data.updated_at), + } as SqsCredentials +} + +export const unmarshalListNatsAccountsResponse = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListNatsAccountsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + natsAccounts: unmarshalArrayOfObject( + data.nats_accounts, + unmarshalNatsAccount, + ), + totalCount: data.total_count, + } as ListNatsAccountsResponse +} + +export const unmarshalListNatsCredentialsResponse = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListNatsCredentialsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + natsCredentials: unmarshalArrayOfObject( + data.nats_credentials, + unmarshalNatsCredentials, + ), + totalCount: data.total_count, + } as ListNatsCredentialsResponse +} + +export const unmarshalListSnsCredentialsResponse = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListSnsCredentialsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + snsCredentials: unmarshalArrayOfObject( + data.sns_credentials, + unmarshalSnsCredentials, + ), + totalCount: data.total_count, + } as ListSnsCredentialsResponse +} + +export const unmarshalListSqsCredentialsResponse = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListSqsCredentialsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + sqsCredentials: unmarshalArrayOfObject( + data.sqs_credentials, + unmarshalSqsCredentials, + ), + totalCount: data.total_count, + } as ListSqsCredentialsResponse +} + +export const unmarshalSnsInfo = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SnsInfo' failed as data isn't a dictionary.`, + ) + } + + return { + createdAt: unmarshalDate(data.created_at), + projectId: data.project_id, + region: data.region, + snsEndpointUrl: data.sns_endpoint_url, + status: data.status, + updatedAt: unmarshalDate(data.updated_at), + } as SnsInfo +} + +export const unmarshalSqsInfo = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'SqsInfo' failed as data isn't a dictionary.`, + ) + } + + return { + createdAt: unmarshalDate(data.created_at), + projectId: data.project_id, + region: data.region, + sqsEndpointUrl: data.sqs_endpoint_url, + status: data.status, + updatedAt: unmarshalDate(data.updated_at), + } as SqsInfo +} + +const marshalSnsPermissions = ( + request: SnsPermissions, + defaults: DefaultValues, +): Record => ({ + can_manage: request.canManage, + can_publish: request.canPublish, + can_receive: request.canReceive, +}) + +const marshalSqsPermissions = ( + request: SqsPermissions, + defaults: DefaultValues, +): Record => ({ + can_manage: request.canManage, + can_publish: request.canPublish, + can_receive: request.canReceive, +}) + +export const marshalNatsApiCreateNatsAccountRequest = ( + request: NatsApiCreateNatsAccountRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name || randomName('mnq'), + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalNatsApiCreateNatsCredentialsRequest = ( + request: NatsApiCreateNatsCredentialsRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name || randomName('mnq'), + nats_account_id: request.natsAccountId, +}) + +export const marshalNatsApiUpdateNatsAccountRequest = ( + request: NatsApiUpdateNatsAccountRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name, +}) + +export const marshalSnsApiActivateSnsRequest = ( + request: SnsApiActivateSnsRequest, + defaults: DefaultValues, +): Record => ({ + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSnsApiCreateSnsCredentialsRequest = ( + request: SnsApiCreateSnsCredentialsRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name || randomName('mnq_sns'), + permissions: request.permissions + ? marshalSnsPermissions(request.permissions, defaults) + : undefined, + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSnsApiDeactivateSnsRequest = ( + request: SnsApiDeactivateSnsRequest, + defaults: DefaultValues, +): Record => ({ + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSnsApiUpdateSnsCredentialsRequest = ( + request: SnsApiUpdateSnsCredentialsRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name, + permissions: request.permissions + ? marshalSnsPermissions(request.permissions, defaults) + : undefined, +}) + +export const marshalSqsApiActivateSqsRequest = ( + request: SqsApiActivateSqsRequest, + defaults: DefaultValues, +): Record => ({ + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSqsApiCreateSqsCredentialsRequest = ( + request: SqsApiCreateSqsCredentialsRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name || randomName('mnq_sqs'), + permissions: request.permissions + ? marshalSqsPermissions(request.permissions, defaults) + : undefined, + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSqsApiDeactivateSqsRequest = ( + request: SqsApiDeactivateSqsRequest, + defaults: DefaultValues, +): Record => ({ + project_id: request.projectId ?? defaults.defaultProjectId, +}) + +export const marshalSqsApiUpdateSqsCredentialsRequest = ( + request: SqsApiUpdateSqsCredentialsRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name, + permissions: request.permissions + ? marshalSqsPermissions(request.permissions, defaults) + : undefined, +}) diff --git a/packages/clients/src/api/mnq/v1beta1/types.gen.ts b/packages/clients/src/api/mnq/v1beta1/types.gen.ts new file mode 100644 index 000000000..e65584175 --- /dev/null +++ b/packages/clients/src/api/mnq/v1beta1/types.gen.ts @@ -0,0 +1,532 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +import type { Region } from '../../../bridge' + +export type ListNatsAccountsRequestOrderBy = + | 'created_at_asc' + | 'created_at_desc' + | 'updated_at_asc' + | 'updated_at_desc' + | 'name_asc' + | 'name_desc' + +export type ListNatsCredentialsRequestOrderBy = + | 'created_at_asc' + | 'created_at_desc' + | 'updated_at_asc' + | 'updated_at_desc' + | 'name_asc' + | 'name_desc' + +export type ListSnsCredentialsRequestOrderBy = + | 'created_at_asc' + | 'created_at_desc' + | 'updated_at_asc' + | 'updated_at_desc' + | 'name_asc' + | 'name_desc' + +export type ListSqsCredentialsRequestOrderBy = + | 'created_at_asc' + | 'created_at_desc' + | 'updated_at_asc' + | 'updated_at_desc' + | 'name_asc' + | 'name_desc' + +export type SnsInfoStatus = 'unknown_status' | 'enabled' | 'disabled' + +export type SqsInfoStatus = 'unknown_status' | 'enabled' | 'disabled' + +/** File. */ +export interface File { + /** File name. */ + name: string + /** File content. */ + content: string +} + +/** List nats accounts response. */ +export interface ListNatsAccountsResponse { + /** Total count of existing NATS accounts (matching any filters specified). */ + totalCount: number + /** NATS accounts on this page. */ + natsAccounts: NatsAccount[] +} + +/** List nats credentials response. */ +export interface ListNatsCredentialsResponse { + /** Total count of existing credentials (matching any filters specified). */ + totalCount: number + /** Credentials on this page. */ + natsCredentials: NatsCredentials[] +} + +/** List sns credentials response. */ +export interface ListSnsCredentialsResponse { + /** Total count of existing credentials (matching any filters specified). */ + totalCount: number + /** SNS credentials on this page. */ + snsCredentials: SnsCredentials[] +} + +/** List sqs credentials response. */ +export interface ListSqsCredentialsResponse { + /** Total count of existing credentials (matching any filters specified). */ + totalCount: number + /** SQS credentials on this page. */ + sqsCredentials: SqsCredentials[] +} + +/** Nats account. */ +export interface NatsAccount { + /** NATS account ID. */ + id: string + /** NATS account name. */ + name: string + /** Endpoint of the NATS service for this account. */ + endpoint: string + /** Project ID of the Project containing the NATS account. */ + projectId: string + /** Region where the NATS account is deployed. */ + region: Region + /** NATS account creation date. */ + createdAt?: Date + /** NATS account last modification date. */ + updatedAt?: Date +} + +/** Nats credentials. */ +export interface NatsCredentials { + /** ID of the credentials. */ + id: string + /** Name of the credentials. */ + name: string + /** NATS account containing the credentials. */ + natsAccountId: string + /** NATS credentials creation date. */ + createdAt?: Date + /** NATS credentials last modification date. */ + updatedAt?: Date + /** + * Object containing the credentials file (Only returned by **Create Nats + * Credentials** call). + */ + credentials?: File + /** Checksum of the credentials file. */ + checksum: string +} + +/** Sns credentials. */ +export interface SnsCredentials { + /** ID of the credentials. */ + id: string + /** Name of the credentials. */ + name: string + /** Project ID of the Project containing the credentials. */ + projectId: string + /** Region where the credentials exists. */ + region: Region + /** Credentials creation date. */ + createdAt?: Date + /** Credentials last modification date. */ + updatedAt?: Date + /** Access key ID. */ + accessKey: string + /** Secret key ID (Only returned by **Create SNS Credentials** call). */ + secretKey: string + /** Checksum of the Secret key. */ + secretChecksum: string + /** Permissions associated with these credentials. */ + permissions?: SnsPermissions +} + +/** Sns info. */ +export interface SnsInfo { + /** Project ID of the Project containing the service. */ + projectId: string + /** Region of the service. */ + region: Region + /** SNS creation date. */ + createdAt?: Date + /** SNS last modification date. */ + updatedAt?: Date + /** SNS activation status. */ + status: SnsInfoStatus + /** Endpoint of the SNS service for this region and project. */ + snsEndpointUrl: string +} + +/** Sns permissions. */ +export interface SnsPermissions { + /** + * Defines whether the credentials bearer can publish messages to the service + * (publish to SNS topics). + */ + canPublish?: boolean + /** + * Defines whether the credentials bearer can receive messages from the + * service (configure subscriptions). + */ + canReceive?: boolean + /** + * Defines whether the credentials bearer can manage the associated SNS topics + * or subscriptions. + */ + canManage?: boolean +} + +/** Sqs credentials. */ +export interface SqsCredentials { + /** ID of the credentials. */ + id: string + /** Name of the credentials. */ + name: string + /** Project ID of the Project containing the credentials. */ + projectId: string + /** Region where the credentials exists. */ + region: Region + /** Credentials creation date. */ + createdAt?: Date + /** Credentials last modification date. */ + updatedAt?: Date + /** Access key ID. */ + accessKey: string + /** Secret key ID (Only returned by **Create SQS Credentials** call). */ + secretKey: string + /** Checksum of the Secret key. */ + secretChecksum: string + /** Permissions associated with these credentials. */ + permissions?: SqsPermissions +} + +/** Sqs info. */ +export interface SqsInfo { + /** Project ID of the Project containing the service. */ + projectId: string + /** Region of the service. */ + region: Region + /** SQS creation date. */ + createdAt?: Date + /** SQS last modification date. */ + updatedAt?: Date + /** SQS activation status. */ + status: SqsInfoStatus + /** Endpoint of the SQS service for this region and project. */ + sqsEndpointUrl: string +} + +/** Sqs permissions. */ +export interface SqsPermissions { + /** + * Defines whether the credentials bearer can publish messages to the service + * (send messages to SQS queues). + */ + canPublish?: boolean + /** + * Defines whether the credentials bearer can receive messages from SQS + * queues. + */ + canReceive?: boolean + /** + * Defines whether the credentials bearer can manage the associated SQS + * queues. + */ + canManage?: boolean +} + +export type NatsApiCreateNatsAccountRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** NATS account name. */ + name?: string + /** Project containing the NATS account. */ + projectId?: string +} + +export type NatsApiDeleteNatsAccountRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the NATS account to delete. */ + natsAccountId: string +} + +export type NatsApiUpdateNatsAccountRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the NATS account to update. */ + natsAccountId: string + /** NATS account name. */ + name?: string +} + +export type NatsApiGetNatsAccountRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the NATS account to get. */ + natsAccountId: string +} + +export type NatsApiListNatsAccountsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Include only NATS accounts in this Project. */ + projectId?: string + /** Page number to return. */ + page?: number + /** Maximum number of NATS accounts to return per page. */ + pageSize?: number + /** Order in which to return results. */ + orderBy?: ListNatsAccountsRequestOrderBy +} + +export type NatsApiCreateNatsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** NATS account containing the credentials. */ + natsAccountId: string + /** Name of the credentials. */ + name?: string +} + +export type NatsApiDeleteNatsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the credentials to delete. */ + natsCredentialsId: string +} + +export type NatsApiGetNatsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the credentials to get. */ + natsCredentialsId: string +} + +export type NatsApiListNatsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Include only credentials for this NATS account. */ + natsAccountId: string + /** Page number to return. */ + page?: number + /** Maximum number of credentials to return per page. */ + pageSize?: number + /** Order in which to return results. */ + orderBy?: ListNatsCredentialsRequestOrderBy +} + +export type SnsApiActivateSnsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project on which to activate the SNS service. */ + projectId?: string +} + +export type SnsApiGetSnsInfoRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project to retrieve SNS info from. */ + projectId?: string +} + +export type SnsApiDeactivateSnsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project on which to deactivate the SNS service. */ + projectId?: string +} + +export type SnsApiCreateSnsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project containing the SNS credentials. */ + projectId?: string + /** Name of the credentials. */ + name?: string + /** Permissions associated with these credentials. */ + permissions?: SnsPermissions +} + +export type SnsApiDeleteSnsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the credentials to delete. */ + snsCredentialsId: string +} + +export type SnsApiUpdateSnsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the SNS credentials to update. */ + snsCredentialsId: string + /** Name of the credentials. */ + name?: string + /** Permissions associated with these credentials. */ + permissions?: SnsPermissions +} + +export type SnsApiGetSnsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the SNS credentials to get. */ + snsCredentialsId: string +} + +export type SnsApiListSnsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Include only SNS credentials in this Project. */ + projectId?: string + /** Page number to return. */ + page?: number + /** Maximum number of credentials to return per page. */ + pageSize?: number + /** Order in which to return results. */ + orderBy?: ListSnsCredentialsRequestOrderBy +} + +export type SqsApiActivateSqsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project on which to activate the SQS service. */ + projectId?: string +} + +export type SqsApiGetSqsInfoRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project to retrieve SQS info from. */ + projectId?: string +} + +export type SqsApiDeactivateSqsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project on which to deactivate the SQS service. */ + projectId?: string +} + +export type SqsApiCreateSqsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Project containing the SQS credentials. */ + projectId?: string + /** Name of the credentials. */ + name?: string + /** Permissions associated with these credentials. */ + permissions?: SqsPermissions +} + +export type SqsApiDeleteSqsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the credentials to delete. */ + sqsCredentialsId: string +} + +export type SqsApiUpdateSqsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the SQS credentials to update. */ + sqsCredentialsId: string + /** Name of the credentials. */ + name?: string + /** Permissions associated with these credentials. */ + permissions?: SqsPermissions +} + +export type SqsApiGetSqsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** ID of the SQS credentials to get. */ + sqsCredentialsId: string +} + +export type SqsApiListSqsCredentialsRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** Include only SQS credentials in this Project. */ + projectId?: string + /** Page number to return. */ + page?: number + /** Maximum number of credentials to return per page. */ + pageSize?: number + /** Order in which to return results. */ + orderBy?: ListSqsCredentialsRequestOrderBy +} diff --git a/packages/clients/src/api/mnq/v1beta1/validation-rules.gen.ts b/packages/clients/src/api/mnq/v1beta1/validation-rules.gen.ts new file mode 100644 index 000000000..7a708b885 --- /dev/null +++ b/packages/clients/src/api/mnq/v1beta1/validation-rules.gen.ts @@ -0,0 +1,51 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +export const NatsApiCreateNatsAccountRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const NatsApiCreateNatsCredentialsRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const NatsApiUpdateNatsAccountRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const SnsApiCreateSnsCredentialsRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const SnsApiUpdateSnsCredentialsRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const SqsApiCreateSqsCredentialsRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +} + +export const SqsApiUpdateSqsCredentialsRequest = { + name: { + maxLength: 64, + minLength: 1, + }, +}