Skip to content

Commit b8f5170

Browse files
committed
feat: update generated APIs
1 parent 984ecd0 commit b8f5170

File tree

4 files changed

+228
-297
lines changed

4 files changed

+228
-297
lines changed

packages_generated/audit_trail/src/v1alpha1/api.gen.ts

Lines changed: 39 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6-
toApiLocality,
76
urlParams,
87
validatePathParam,
8+
toApiLocality,
99
} from '@scaleway/sdk-client'
10-
import type { ApiLocality } from '@scaleway/sdk-client'
10+
import type { ApiLocality,} from '@scaleway/sdk-client'
1111
import {
1212
marshalCreateExportJobRequest,
1313
unmarshalExportJob,
@@ -47,10 +47,14 @@ export class API extends ParentAPI {
4747
* Locality of this API.
4848
* type ∈ {'zone','region','global','unspecified'}
4949
*/
50-
public static readonly LOCALITY: ApiLocality = toApiLocality({
51-
regions: ['fr-par', 'nl-ams'],
52-
})
53-
50+
public static readonly LOCALITY: ApiLocality =
51+
toApiLocality({
52+
regions: [
53+
'fr-par',
54+
'nl-ams',
55+
],
56+
})
57+
5458
/**
5559
* List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`.
5660
*
@@ -65,15 +69,8 @@ export class API extends ParentAPI {
6569
urlParams: urlParams(
6670
['method_name', request.methodName],
6771
['order_by', request.orderBy],
68-
[
69-
'organization_id',
70-
request.organizationId ??
71-
this.client.settings.defaultOrganizationId,
72-
],
73-
[
74-
'page_size',
75-
request.pageSize ?? this.client.settings.defaultPageSize,
76-
],
72+
['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId],
73+
['page_size', request.pageSize ?? this.client.settings.defaultPageSize],
7774
['page_token', request.pageToken],
7875
['principal_id', request.principalId],
7976
['product_name', request.productName],
@@ -90,30 +87,22 @@ export class API extends ParentAPI {
9087
unmarshalListEventsResponse,
9188
)
9289

90+
9391
/**
9492
* List authentication events. Retrieve the list of Audit Trail authentication events for a Scaleway Organization. You must specify the `organization_id`.
9593
*
9694
* @param request - The request {@link ListAuthenticationEventsRequest}
9795
* @returns A Promise of ListAuthenticationEventsResponse
9896
*/
99-
listAuthenticationEvents = (
100-
request: Readonly<ListAuthenticationEventsRequest> = {},
101-
) =>
97+
listAuthenticationEvents = (request: Readonly<ListAuthenticationEventsRequest> = {}) =>
10298
this.client.fetch<ListAuthenticationEventsResponse>(
10399
{
104100
method: 'GET',
105101
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/authentication-events`,
106102
urlParams: urlParams(
107103
['order_by', request.orderBy],
108-
[
109-
'organization_id',
110-
request.organizationId ??
111-
this.client.settings.defaultOrganizationId,
112-
],
113-
[
114-
'page_size',
115-
request.pageSize ?? this.client.settings.defaultPageSize,
116-
],
104+
['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId],
105+
['page_size', request.pageSize ?? this.client.settings.defaultPageSize],
117106
['page_token', request.pageToken],
118107
['recorded_after', request.recordedAfter],
119108
['recorded_before', request.recordedBefore],
@@ -122,22 +111,16 @@ export class API extends ParentAPI {
122111
unmarshalListAuthenticationEventsResponse,
123112
)
124113

114+
125115
listCombinedEvents = (request: Readonly<ListCombinedEventsRequest> = {}) =>
126116
this.client.fetch<ListCombinedEventsResponse>(
127117
{
128118
method: 'GET',
129119
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/combined-events`,
130120
urlParams: urlParams(
131121
['order_by', request.orderBy],
132-
[
133-
'organization_id',
134-
request.organizationId ??
135-
this.client.settings.defaultOrganizationId,
136-
],
137-
[
138-
'page_size',
139-
request.pageSize ?? this.client.settings.defaultPageSize,
140-
],
122+
['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId],
123+
['page_size', request.pageSize ?? this.client.settings.defaultPageSize],
141124
['page_token', request.pageToken],
142125
['project_id', request.projectId],
143126
['recorded_after', request.recordedAfter],
@@ -148,6 +131,7 @@ export class API extends ParentAPI {
148131
unmarshalListCombinedEventsResponse,
149132
)
150133

134+
151135
/**
152136
* Retrieve the list of Scaleway resources for which you have Audit Trail events.
153137
*
@@ -159,14 +143,14 @@ export class API extends ParentAPI {
159143
{
160144
method: 'GET',
161145
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/products`,
162-
urlParams: urlParams([
163-
'organization_id',
164-
request.organizationId ?? this.client.settings.defaultOrganizationId,
165-
]),
146+
urlParams: urlParams(
147+
['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId],
148+
),
166149
},
167150
unmarshalListProductsResponse,
168151
)
169152

153+
170154
/**
171155
* Create an export job. Create an export job for a specified organization. This allows you to export audit trail events to a destination, such as an S3 bucket. The request requires the organization ID, a name for the export, and a destination configuration.
172156
*
@@ -186,43 +170,41 @@ export class API extends ParentAPI {
186170
unmarshalExportJob,
187171
)
188172

173+
189174
/**
190175
* Delete an export job. Deletes an export job for a specified id.
191176
*
192177
* @param request - The request {@link DeleteExportJobRequest}
193178
*/
194179
deleteExportJob = (request: Readonly<DeleteExportJobRequest>) =>
195-
this.client.fetch<void>({
196-
method: 'DELETE',
197-
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam('exportJobId', request.exportJobId)}`,
198-
})
180+
this.client.fetch<void>(
181+
{
182+
method: 'DELETE',
183+
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam('exportJobId', request.exportJobId)}`,
184+
},
185+
)
199186

200-
protected pageOfListExportJobs = (
201-
request: Readonly<ListExportJobsRequest> = {},
202-
) =>
187+
188+
protected pageOfListExportJobs = (request: Readonly<ListExportJobsRequest> = {}) =>
203189
this.client.fetch<ListExportJobsResponse>(
204190
{
205191
method: 'GET',
206192
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs`,
207193
urlParams: urlParams(
208194
['name', request.name],
209195
['order_by', request.orderBy],
210-
[
211-
'organization_id',
212-
request.organizationId ??
213-
this.client.settings.defaultOrganizationId,
214-
],
196+
['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId],
215197
['page', request.page],
216-
[
217-
'page_size',
218-
request.pageSize ?? this.client.settings.defaultPageSize,
219-
],
198+
['page_size', request.pageSize ?? this.client.settings.defaultPageSize],
220199
['tags', request.tags],
221200
),
222201
},
223202
unmarshalListExportJobsResponse,
224203
)
225-
204+
226205
listExportJobs = (request: Readonly<ListExportJobsRequest> = {}) =>
227206
enrichForPagination('exportJobs', this.pageOfListExportJobs, request)
207+
208+
228209
}
210+

packages_generated/audit_trail/src/v1alpha1/index.gen.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
export { API } from './api.gen.js'
3+
export {
4+
API,
5+
} from './api.gen.js'
46
export * from './marshalling.gen.js'
57
export type {
68
AccountOrganizationInfo,

0 commit comments

Comments
 (0)