Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages_generated/account/src/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* PLEASE DO NOT EDIT HERE
*/

export * as Accountv3 from './v3/index.gen'
export * as Accountv3 from './v3/index.gen.js'
4 changes: 2 additions & 2 deletions packages_generated/account/src/v3/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
unmarshalListProjectsResponse,
unmarshalProject,
unmarshalProjectQualification,
} from './marshalling.gen'
} from './marshalling.gen.js'
import type {
CheckContractSignatureResponse,
ContractApiCheckContractSignatureRequest,
Expand All @@ -37,7 +37,7 @@ import type {
ProjectApiSetProjectQualificationRequest,
ProjectApiUpdateProjectRequest,
ProjectQualification,
} from './types.gen'
} from './types.gen.js'

const jsonContentHeaders = {
'Content-Type': 'application/json; charset=utf-8',
Expand Down
8 changes: 4 additions & 4 deletions packages_generated/account/src/v3/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
export {
ContractAPI,
ProjectAPI,
} from './api.gen'
export * from './marshalling.gen'
} from './api.gen.js'
export * from './marshalling.gen.js'
export type {
CheckContractSignatureResponse,
Contract,
Expand Down Expand Up @@ -47,5 +47,5 @@ export type {
QualificationSetScalewayEnvironmentSubUseCase,
QualificationShareData,
QualificationShareDataSubUseCase,
} from './types.gen'
export * as ValidationRules from './validation-rules.gen'
} from './types.gen.js'
export * as ValidationRules from './validation-rules.gen.js'
2 changes: 1 addition & 1 deletion packages_generated/account/src/v3/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import type {
QualificationOtherUseCase,
QualificationSetScalewayEnvironment,
QualificationShareData,
} from './types.gen'
} from './types.gen.js'

const unmarshalContract = (data: unknown): Contract => {
if (!isJSONObject(data)) {
Expand Down
2 changes: 1 addition & 1 deletion packages_generated/applesilicon/src/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* PLEASE DO NOT EDIT HERE
*/

export * as Applesiliconv1alpha1 from './v1alpha1/index.gen'
export * as Applesiliconv1alpha1 from './v1alpha1/index.gen.js'
6 changes: 3 additions & 3 deletions packages_generated/applesilicon/src/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import {
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES as SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES_APPLESILICON,
SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_APPLESILICON,
} from './content.gen'
} from './content.gen.js'
import {
marshalBatchCreateServersRequest,
marshalCreateServerRequest,
Expand All @@ -34,7 +34,7 @@ import {
unmarshalServerType,
unmarshalSetServerPrivateNetworksResponse,
unmarshalStartConnectivityDiagnosticResponse,
} from './marshalling.gen'
} from './marshalling.gen.js'
import type {
BatchCreateServersRequest,
BatchCreateServersResponse,
Expand Down Expand Up @@ -67,7 +67,7 @@ import type {
StartConnectivityDiagnosticRequest,
StartConnectivityDiagnosticResponse,
UpdateServerRequest,
} from './types.gen'
} from './types.gen.js'

const jsonContentHeaders = {
'Content-Type': 'application/json; charset=utf-8',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
ServerPrivateNetworkServerStatus,
ServerPrivateNetworkStatus,
ServerStatus,
} from './types.gen'
} from './types.gen.js'

/** Lists transient statutes of the enum {@link ServerPrivateNetworkServerStatus}. */
export const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES: ServerPrivateNetworkServerStatus[] =
Expand Down
8 changes: 4 additions & 4 deletions packages_generated/applesilicon/src/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
export {
API,
PrivateNetworkAPI,
} from './api.gen'
export * from './content.gen'
export * from './marshalling.gen'
} from './api.gen.js'
export * from './content.gen.js'
export * from './marshalling.gen.js'
export type {
BatchCreateServersRequest,
BatchCreateServersRequestBatchInnerCreateServerRequest,
Expand Down Expand Up @@ -60,4 +60,4 @@ export type {
StartConnectivityDiagnosticRequest,
StartConnectivityDiagnosticResponse,
UpdateServerRequest,
} from './types.gen'
} from './types.gen.js'
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import type {
StartConnectivityDiagnosticRequest,
StartConnectivityDiagnosticResponse,
UpdateServerRequest,
} from './types.gen'
} from './types.gen.js'

const unmarshalOSSupportedServerType = (
data: unknown,
Expand Down
2 changes: 1 addition & 1 deletion packages_generated/audit_trail/src/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* PLEASE DO NOT EDIT HERE
*/

export * as AuditTrailv1alpha1 from './v1alpha1/index.gen'
export * as AuditTrailv1alpha1 from './v1alpha1/index.gen.js'
44 changes: 42 additions & 2 deletions packages_generated/audit_trail/src/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import type { ApiLocality } from '@scaleway/sdk-client'
import {
enrichForPagination,
API as ParentAPI,
toApiLocality,
urlParams,
Expand All @@ -14,8 +15,9 @@ import {
unmarshalListAuthenticationEventsResponse,
unmarshalListCombinedEventsResponse,
unmarshalListEventsResponse,
unmarshalListExportJobsResponse,
unmarshalListProductsResponse,
} from './marshalling.gen'
} from './marshalling.gen.js'
import type {
CreateExportJobRequest,
DeleteExportJobRequest,
Expand All @@ -26,9 +28,11 @@ import type {
ListCombinedEventsResponse,
ListEventsRequest,
ListEventsResponse,
ListExportJobsRequest,
ListExportJobsResponse,
ListProductsRequest,
ListProductsResponse,
} from './types.gen'
} from './types.gen.js'

const jsonContentHeaders = {
'Content-Type': 'application/json; charset=utf-8',
Expand Down Expand Up @@ -193,4 +197,40 @@ export class API extends ParentAPI {
method: 'DELETE',
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam('exportJobId', request.exportJobId)}`,
})

protected pageOfListExportJobs = (
request: Readonly<ListExportJobsRequest> = {},
) =>
this.client.fetch<ListExportJobsResponse>(
{
method: 'GET',
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs`,
urlParams: urlParams(
['name', request.name],
['order_by', request.orderBy],
[
'organization_id',
request.organizationId ??
this.client.settings.defaultOrganizationId,
],
['page', request.page],
[
'page_size',
request.pageSize ?? this.client.settings.defaultPageSize,
],
[
'tags',
request.tags
? Object.entries(request.tags).map(
([key, value]) => `${key}:${value}`,
)
: undefined,
],
),
},
unmarshalListExportJobsResponse,
)

listExportJobs = (request: Readonly<ListExportJobsRequest> = {}) =>
enrichForPagination('exportJobs', this.pageOfListExportJobs, request)
}
11 changes: 7 additions & 4 deletions packages_generated/audit_trail/src/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
export { API } from './api.gen'
export * from './marshalling.gen'
export { API } from './api.gen.js'
export * from './marshalling.gen.js'
export type {
AccountOrganizationInfo,
AccountProjectInfo,
Expand Down Expand Up @@ -38,6 +38,9 @@ export type {
ListEventsRequest,
ListEventsRequestOrderBy,
ListEventsResponse,
ListExportJobsRequest,
ListExportJobsRequestOrderBy,
ListExportJobsResponse,
ListProductsRequest,
ListProductsResponse,
LoadBalancerAclInfo,
Expand All @@ -55,5 +58,5 @@ export type {
SecretManagerSecretVersionInfo,
SystemEvent,
SystemEventKind,
} from './types.gen'
export * as ValidationRules from './validation-rules.gen'
} from './types.gen.js'
export * as ValidationRules from './validation-rules.gen.js'
18 changes: 17 additions & 1 deletion packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
ListCombinedEventsResponse,
ListCombinedEventsResponseCombinedEvent,
ListEventsResponse,
ListExportJobsResponse,
ListProductsResponse,
LoadBalancerAclInfo,
LoadBalancerBackendInfo,
Expand All @@ -46,7 +47,7 @@ import type {
SecretManagerSecretInfo,
SecretManagerSecretVersionInfo,
SystemEvent,
} from './types.gen'
} from './types.gen.js'

const unmarshalExportJobS3 = (data: unknown): ExportJobS3 => {
if (!isJSONObject(data)) {
Expand Down Expand Up @@ -610,6 +611,21 @@ export const unmarshalListEventsResponse = (
} as ListEventsResponse
}

export const unmarshalListExportJobsResponse = (
data: unknown,
): ListExportJobsResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`,
)
}

return {
exportJobs: unmarshalArrayOfObject(data.export_jobs, unmarshalExportJob),
totalCount: data.total_count,
} as ListExportJobsResponse
}

const unmarshalProductService = (data: unknown): ProductService => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down
Loading
Loading