@scaleway/sdk-audit-trail 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -83,6 +83,7 @@ const api = new AuditTrail.v1.API(client)
83
83
  ## Support
84
84
 
85
85
  We love feedback! Feel free to reach us on:
86
+
86
87
  - [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
87
88
  - [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
88
89
 
@@ -93,4 +94,3 @@ This repository is at its early stage and is still in active development. If you
93
94
  ## License
94
95
 
95
96
  This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
96
-
@@ -0,0 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __exportAll = (all, no_symbols) => {
3
+ let target = {};
4
+ for (var name in all) __defProp(target, name, {
5
+ get: all[name],
6
+ enumerable: true
7
+ });
8
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
+ return target;
10
+ };
11
+ export { __exportAll };
package/dist/index.gen.js CHANGED
@@ -1,4 +1,2 @@
1
- import * as index_gen from "./v1alpha1/index.gen.js";
2
- export {
3
- index_gen as AuditTrailv1alpha1
4
- };
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as AuditTrailv1alpha1 };
@@ -1,6 +1,6 @@
1
1
  import type { ApiLocality } from '@scaleway/sdk-client';
2
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
3
- import type { CreateExportJobRequest, DeleteExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EnableAlertRulesRequest, EnableAlertRulesResponse, ExportJob, ListAlertRulesRequest, ListAlertRulesResponse, ListAuthenticationEventsRequest, ListAuthenticationEventsResponse, ListCombinedEventsRequest, ListCombinedEventsResponse, ListEventsRequest, ListEventsResponse, ListExportJobsRequest, ListExportJobsResponse, ListProductsRequest, ListProductsResponse, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse } from './types.gen.js';
3
+ import type { CreateExportJobRequest, DeleteExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EnableAlertRulesRequest, EnableAlertRulesResponse, ExportJob, ListAlertRulesRequest, ListAlertRulesResponse, ListAuthenticationEventsRequest, ListAuthenticationEventsResponse, ListCombinedEventsRequest, ListCombinedEventsResponse, ListEventsRequest, ListEventsResponse, ListExportJobsRequest, ListExportJobsResponse, ListProductsRequest, ListProductsResponse, ListSystemEventsRequest, ListSystemEventsResponse, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse } from './types.gen.js';
4
4
  /**
5
5
  * Audit Trail API.
6
6
 
@@ -26,6 +26,13 @@ export declare class API extends ParentAPI {
26
26
  * @returns A Promise of ListAuthenticationEventsResponse
27
27
  */
28
28
  listAuthenticationEvents: (request?: Readonly<ListAuthenticationEventsRequest>) => Promise<ListAuthenticationEventsResponse>;
29
+ /**
30
+ * List system events. Retrieve the list of Audit Trail system events for a Scaleway Organization. You must specify the `organization_id`.
31
+ *
32
+ * @param request - The request {@link ListSystemEventsRequest}
33
+ * @returns A Promise of ListSystemEventsResponse
34
+ */
35
+ listSystemEvents: (request?: Readonly<ListSystemEventsRequest>) => Promise<ListSystemEventsResponse>;
29
36
  listCombinedEvents: (request?: Readonly<ListCombinedEventsRequest>) => Promise<ListCombinedEventsResponse>;
30
37
  /**
31
38
  * Retrieve the list of Scaleway resources for which you have Audit Trail events.
@@ -1,219 +1,140 @@
1
- import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination } from "@scaleway/sdk-client";
2
- import { unmarshalListEventsResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListProductsResponse, marshalCreateExportJobRequest, unmarshalExportJob, unmarshalListExportJobsResponse, unmarshalListAlertRulesResponse, marshalEnableAlertRulesRequest, unmarshalEnableAlertRulesResponse, marshalDisableAlertRulesRequest, unmarshalDisableAlertRulesResponse, marshalSetEnabledAlertRulesRequest, unmarshalSetEnabledAlertRulesResponse } from "./marshalling.gen.js";
3
- const jsonContentHeaders = {
4
- "Content-Type": "application/json; charset=utf-8"
5
- };
6
- class API extends API$1 {
7
- /**
8
- * Locality of this API.
9
- * type {'zone','region','global','unspecified'}
10
- */
11
- static LOCALITY = toApiLocality({
12
- regions: [
13
- "fr-par",
14
- "nl-ams"
15
- ]
16
- });
17
- /**
18
- * 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`.
19
- *
20
- * @param request - The request {@link ListEventsRequest}
21
- * @returns A Promise of ListEventsResponse
22
- */
23
- listEvents = (request = {}) => this.client.fetch(
24
- {
25
- method: "GET",
26
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/events`,
27
- urlParams: urlParams(
28
- ["method_name", request.methodName],
29
- ["order_by", request.orderBy],
30
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
31
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
32
- ["page_token", request.pageToken],
33
- ["principal_id", request.principalId],
34
- ["product_name", request.productName],
35
- ["project_id", request.projectId],
36
- ["recorded_after", request.recordedAfter],
37
- ["recorded_before", request.recordedBefore],
38
- ["resource_id", request.resourceId],
39
- ["resource_type", request.resourceType],
40
- ["service_name", request.serviceName],
41
- ["source_ip", request.sourceIp],
42
- ["status", request.status]
43
- )
44
- },
45
- unmarshalListEventsResponse
46
- );
47
- /**
48
- * List authentication events. Retrieve the list of Audit Trail authentication events for a Scaleway Organization. You must specify the `organization_id`.
49
- *
50
- * @param request - The request {@link ListAuthenticationEventsRequest}
51
- * @returns A Promise of ListAuthenticationEventsResponse
52
- */
53
- listAuthenticationEvents = (request = {}) => this.client.fetch(
54
- {
55
- method: "GET",
56
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/authentication-events`,
57
- urlParams: urlParams(
58
- ["order_by", request.orderBy],
59
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
60
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
61
- ["page_token", request.pageToken],
62
- ["recorded_after", request.recordedAfter],
63
- ["recorded_before", request.recordedBefore]
64
- )
65
- },
66
- unmarshalListAuthenticationEventsResponse
67
- );
68
- listCombinedEvents = (request = {}) => this.client.fetch(
69
- {
70
- method: "GET",
71
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/combined-events`,
72
- urlParams: urlParams(
73
- ["order_by", request.orderBy],
74
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
75
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
76
- ["page_token", request.pageToken],
77
- ["project_id", request.projectId],
78
- ["recorded_after", request.recordedAfter],
79
- ["recorded_before", request.recordedBefore],
80
- ["resource_type", request.resourceType]
81
- )
82
- },
83
- unmarshalListCombinedEventsResponse
84
- );
85
- /**
86
- * Retrieve the list of Scaleway resources for which you have Audit Trail events.
87
- *
88
- * @param request - The request {@link ListProductsRequest}
89
- * @returns A Promise of ListProductsResponse
90
- */
91
- listProducts = (request = {}) => this.client.fetch(
92
- {
93
- method: "GET",
94
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/products`,
95
- urlParams: urlParams(
96
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId]
97
- )
98
- },
99
- unmarshalListProductsResponse
100
- );
101
- /**
102
- * 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.
103
- *
104
- * @param request - The request {@link CreateExportJobRequest}
105
- * @returns A Promise of ExportJob
106
- */
107
- createExportJob = (request) => this.client.fetch(
108
- {
109
- body: JSON.stringify(
110
- marshalCreateExportJobRequest(request, this.client.settings)
111
- ),
112
- headers: jsonContentHeaders,
113
- method: "POST",
114
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs`
115
- },
116
- unmarshalExportJob
117
- );
118
- /**
119
- * Delete an export job. Deletes an export job for a specified id.
120
- *
121
- * @param request - The request {@link DeleteExportJobRequest}
122
- */
123
- deleteExportJob = (request) => this.client.fetch(
124
- {
125
- method: "DELETE",
126
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam("exportJobId", request.exportJobId)}`
127
- }
128
- );
129
- pageOfListExportJobs = (request = {}) => this.client.fetch(
130
- {
131
- method: "GET",
132
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs`,
133
- urlParams: urlParams(
134
- ["name", request.name],
135
- ["order_by", request.orderBy],
136
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
137
- ["page", request.page],
138
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
139
- ["tags", request.tags]
140
- )
141
- },
142
- unmarshalListExportJobsResponse
143
- );
144
- listExportJobs = (request = {}) => enrichForPagination("exportJobs", this.pageOfListExportJobs, request);
145
- pageOfListAlertRules = (request = {}) => this.client.fetch(
146
- {
147
- method: "GET",
148
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-rules`,
149
- urlParams: urlParams(
150
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
151
- ["page", request.page],
152
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
153
- ["status", request.status]
154
- )
155
- },
156
- unmarshalListAlertRulesResponse
157
- );
158
- /**
159
- * List alert rules for a specified organization and their current status (enabled or disabled).
160
- *
161
- * @param request - The request {@link ListAlertRulesRequest}
162
- * @returns A Promise of ListAlertRulesResponse
163
- */
164
- listAlertRules = (request = {}) => enrichForPagination("alertRules", this.pageOfListAlertRules, request);
165
- /**
166
- * Enable alert rules. Enable alert rules for a specified organization. Enabled rules will trigger alerts when matching events occur.
167
- *
168
- * @param request - The request {@link EnableAlertRulesRequest}
169
- * @returns A Promise of EnableAlertRulesResponse
170
- */
171
- enableAlertRules = (request = {}) => this.client.fetch(
172
- {
173
- body: JSON.stringify(
174
- marshalEnableAlertRulesRequest(request, this.client.settings)
175
- ),
176
- headers: jsonContentHeaders,
177
- method: "POST",
178
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/enable-alert-rules`
179
- },
180
- unmarshalEnableAlertRulesResponse
181
- );
182
- /**
183
- * Disable alert rules. Disable alert rules for a specified organization. Disabled rules will no longer trigger alerts when matching events occur.
184
- *
185
- * @param request - The request {@link DisableAlertRulesRequest}
186
- * @returns A Promise of DisableAlertRulesResponse
187
- */
188
- disableAlertRules = (request = {}) => this.client.fetch(
189
- {
190
- body: JSON.stringify(
191
- marshalDisableAlertRulesRequest(request, this.client.settings)
192
- ),
193
- headers: jsonContentHeaders,
194
- method: "POST",
195
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/disable-alert-rules`
196
- },
197
- unmarshalDisableAlertRulesResponse
198
- );
199
- /**
200
- * Set the alert rules to enabled. Set the alert rules to enabled by replacing the set of enabled alert rules for a specified organization. The provided list defines the complete set of rules that should be enabled. Any previously enabled rule not included in the request will be disabled.
201
- *
202
- * @param request - The request {@link SetEnabledAlertRulesRequest}
203
- * @returns A Promise of SetEnabledAlertRulesResponse
204
- */
205
- setEnabledAlertRules = (request = {}) => this.client.fetch(
206
- {
207
- body: JSON.stringify(
208
- marshalSetEnabledAlertRulesRequest(request, this.client.settings)
209
- ),
210
- headers: jsonContentHeaders,
211
- method: "PATCH",
212
- path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-rules`
213
- },
214
- unmarshalSetEnabledAlertRulesResponse
215
- );
216
- }
217
- export {
218
- API
1
+ import { marshalCreateExportJobRequest, marshalDisableAlertRulesRequest, marshalEnableAlertRulesRequest, marshalSetEnabledAlertRulesRequest, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalExportJob, unmarshalListAlertRulesResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListEventsResponse, unmarshalListExportJobsResponse, unmarshalListProductsResponse, unmarshalListSystemEventsResponse, unmarshalSetEnabledAlertRulesResponse } from "./marshalling.gen.js";
2
+ import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
+ /**
5
+ * Audit Trail API.
6
+
7
+ This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
8
+ */
9
+ var API$1 = class extends API {
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static LOCALITY = toApiLocality({ regions: ["fr-par", "nl-ams"] });
15
+ /**
16
+ * 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`.
17
+ *
18
+ * @param request - The request {@link ListEventsRequest}
19
+ * @returns A Promise of ListEventsResponse
20
+ */
21
+ listEvents = (request = {}) => this.client.fetch({
22
+ method: "GET",
23
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/events`,
24
+ urlParams: urlParams(["method_name", request.methodName], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["principal_id", request.principalId], ["product_name", request.productName], ["project_id", request.projectId], ["recorded_after", request.recordedAfter], ["recorded_before", request.recordedBefore], ["resource_id", request.resourceId], ["resource_type", request.resourceType], ["service_name", request.serviceName], ["source_ip", request.sourceIp], ["status", request.status])
25
+ }, unmarshalListEventsResponse);
26
+ /**
27
+ * List authentication events. Retrieve the list of Audit Trail authentication events for a Scaleway Organization. You must specify the `organization_id`.
28
+ *
29
+ * @param request - The request {@link ListAuthenticationEventsRequest}
30
+ * @returns A Promise of ListAuthenticationEventsResponse
31
+ */
32
+ listAuthenticationEvents = (request = {}) => this.client.fetch({
33
+ method: "GET",
34
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/authentication-events`,
35
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["recorded_after", request.recordedAfter], ["recorded_before", request.recordedBefore])
36
+ }, unmarshalListAuthenticationEventsResponse);
37
+ /**
38
+ * List system events. Retrieve the list of Audit Trail system events for a Scaleway Organization. You must specify the `organization_id`.
39
+ *
40
+ * @param request - The request {@link ListSystemEventsRequest}
41
+ * @returns A Promise of ListSystemEventsResponse
42
+ */
43
+ listSystemEvents = (request = {}) => this.client.fetch({
44
+ method: "GET",
45
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/system-events`,
46
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["recorded_after", request.recordedAfter], ["recorded_before", request.recordedBefore])
47
+ }, unmarshalListSystemEventsResponse);
48
+ listCombinedEvents = (request = {}) => this.client.fetch({
49
+ method: "GET",
50
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/combined-events`,
51
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["project_id", request.projectId], ["recorded_after", request.recordedAfter], ["recorded_before", request.recordedBefore], ["resource_type", request.resourceType])
52
+ }, unmarshalListCombinedEventsResponse);
53
+ /**
54
+ * Retrieve the list of Scaleway resources for which you have Audit Trail events.
55
+ *
56
+ * @param request - The request {@link ListProductsRequest}
57
+ * @returns A Promise of ListProductsResponse
58
+ */
59
+ listProducts = (request = {}) => this.client.fetch({
60
+ method: "GET",
61
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/products`,
62
+ urlParams: urlParams(["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId])
63
+ }, unmarshalListProductsResponse);
64
+ /**
65
+ * 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.
66
+ *
67
+ * @param request - The request {@link CreateExportJobRequest}
68
+ * @returns A Promise of ExportJob
69
+ */
70
+ createExportJob = (request) => this.client.fetch({
71
+ body: JSON.stringify(marshalCreateExportJobRequest(request, this.client.settings)),
72
+ headers: jsonContentHeaders,
73
+ method: "POST",
74
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs`
75
+ }, unmarshalExportJob);
76
+ /**
77
+ * Delete an export job. Deletes an export job for a specified id.
78
+ *
79
+ * @param request - The request {@link DeleteExportJobRequest}
80
+ */
81
+ deleteExportJob = (request) => this.client.fetch({
82
+ method: "DELETE",
83
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam("exportJobId", request.exportJobId)}`
84
+ });
85
+ pageOfListExportJobs = (request = {}) => this.client.fetch({
86
+ method: "GET",
87
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/export-jobs`,
88
+ 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])
89
+ }, unmarshalListExportJobsResponse);
90
+ listExportJobs = (request = {}) => enrichForPagination("exportJobs", this.pageOfListExportJobs, request);
91
+ pageOfListAlertRules = (request = {}) => this.client.fetch({
92
+ method: "GET",
93
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-rules`,
94
+ urlParams: urlParams(["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["status", request.status])
95
+ }, unmarshalListAlertRulesResponse);
96
+ /**
97
+ * List alert rules for a specified organization and their current status (enabled or disabled).
98
+ *
99
+ * @param request - The request {@link ListAlertRulesRequest}
100
+ * @returns A Promise of ListAlertRulesResponse
101
+ */
102
+ listAlertRules = (request = {}) => enrichForPagination("alertRules", this.pageOfListAlertRules, request);
103
+ /**
104
+ * Enable alert rules. Enable alert rules for a specified organization. Enabled rules will trigger alerts when matching events occur.
105
+ *
106
+ * @param request - The request {@link EnableAlertRulesRequest}
107
+ * @returns A Promise of EnableAlertRulesResponse
108
+ */
109
+ enableAlertRules = (request = {}) => this.client.fetch({
110
+ body: JSON.stringify(marshalEnableAlertRulesRequest(request, this.client.settings)),
111
+ headers: jsonContentHeaders,
112
+ method: "POST",
113
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/enable-alert-rules`
114
+ }, unmarshalEnableAlertRulesResponse);
115
+ /**
116
+ * Disable alert rules. Disable alert rules for a specified organization. Disabled rules will no longer trigger alerts when matching events occur.
117
+ *
118
+ * @param request - The request {@link DisableAlertRulesRequest}
119
+ * @returns A Promise of DisableAlertRulesResponse
120
+ */
121
+ disableAlertRules = (request = {}) => this.client.fetch({
122
+ body: JSON.stringify(marshalDisableAlertRulesRequest(request, this.client.settings)),
123
+ headers: jsonContentHeaders,
124
+ method: "POST",
125
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/disable-alert-rules`
126
+ }, unmarshalDisableAlertRulesResponse);
127
+ /**
128
+ * Set the alert rules to enabled. Set the alert rules to enabled by replacing the set of enabled alert rules for a specified organization. The provided list defines the complete set of rules that should be enabled. Any previously enabled rule not included in the request will be disabled.
129
+ *
130
+ * @param request - The request {@link SetEnabledAlertRulesRequest}
131
+ * @returns A Promise of SetEnabledAlertRulesResponse
132
+ */
133
+ setEnabledAlertRules = (request = {}) => this.client.fetch({
134
+ body: JSON.stringify(marshalSetEnabledAlertRulesRequest(request, this.client.settings)),
135
+ headers: jsonContentHeaders,
136
+ method: "PATCH",
137
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alert-rules`
138
+ }, unmarshalSetEnabledAlertRulesResponse);
219
139
  };
140
+ export { API$1 as API };
@@ -1,7 +1,3 @@
1
- const ALERT_RULE_TRANSIENT_STATUSES = [
2
- "enabling",
3
- "disabling"
4
- ];
5
- export {
6
- ALERT_RULE_TRANSIENT_STATUSES
7
- };
1
+ /** Lists transient statutes of the enum {@link AlertRuleStatus}. */
2
+ const ALERT_RULE_TRANSIENT_STATUSES = ["enabling", "disabling"];
3
+ export { ALERT_RULE_TRANSIENT_STATUSES };
@@ -1,5 +1,5 @@
1
1
  export { API, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
- export type { AccountContractSignatureInfo, AccountContractSignatureInfoAccountContractInfo, AccountOrganizationInfo, AccountProjectInfo, AccountUserInfo, AlertRule, AlertRuleStatus, AppleSiliconServerInfo, AuditTrailExportJobInfo, AuthenticationEvent, AuthenticationEventFailureReason, AuthenticationEventMethod, AuthenticationEventMFAType, AuthenticationEventOrigin, AuthenticationEventResult, BaremetalServerInfo, BaremetalSettingInfo, CreateExportJobRequest, DeleteExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EdgeServicesBackendStageInfo, EdgeServicesCacheStageInfo, EdgeServicesDNSStageInfo, EdgeServicesPipelineInfo, EdgeServicesPlanInfo, EdgeServicesRouteRulesInfo, EdgeServicesRouteStageInfo, EdgeServicesTLSStageInfo, EdgeServicesWAFStageInfo, EnableAlertRulesRequest, EnableAlertRulesResponse, Event, EventPrincipal, ExportJob, ExportJobS3, ExportJobStatus, ExportJobStatusCode, InstanceServerInfo, IpamIpInfo, KeyManagerKeyInfo, KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, ListAlertRulesRequest, ListAlertRulesResponse, ListAuthenticationEventsRequest, ListAuthenticationEventsRequestOrderBy, ListAuthenticationEventsResponse, ListCombinedEventsRequest, ListCombinedEventsRequestOrderBy, ListCombinedEventsResponse, ListCombinedEventsResponseCombinedEvent, ListEventsRequest, ListEventsRequestOrderBy, ListEventsResponse, ListExportJobsRequest, ListExportJobsRequestOrderBy, ListExportJobsResponse, ListProductsRequest, ListProductsResponse, LoadBalancerAclInfo, LoadBalancerBackendInfo, LoadBalancerCertificateInfo, LoadBalancerFrontendInfo, LoadBalancerIpInfo, LoadBalancerLbInfo, LoadBalancerRouteInfo, Product, ProductService, Resource, ResourceType, SecretManagerSecretInfo, SecretManagerSecretVersionInfo, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse, SystemEvent, SystemEventKind, VpcGwGatewayInfo, VpcGwGatewayNetworkInfo, VpcPrivateNetworkInfo, VpcRouteInfo, VpcSubnetInfo, } from './types.gen.js';
4
+ export type { AccountContractSignatureInfo, AccountContractSignatureInfoAccountContractInfo, AccountOrganizationInfo, AccountProjectInfo, AccountUserInfo, AlertRule, AlertRuleStatus, AppleSiliconRunnerInfo, AppleSiliconServerInfo, AuditTrailExportJobInfo, AuthenticationEvent, AuthenticationEventFailureReason, AuthenticationEventMethod, AuthenticationEventMFAType, AuthenticationEventOrigin, AuthenticationEventResult, BaremetalServerInfo, BaremetalSettingInfo, CreateExportJobRequest, DeleteExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EdgeServicesBackendStageInfo, EdgeServicesCacheStageInfo, EdgeServicesDNSStageInfo, EdgeServicesPipelineInfo, EdgeServicesPlanInfo, EdgeServicesRouteRulesInfo, EdgeServicesRouteStageInfo, EdgeServicesTLSStageInfo, EdgeServicesWAFStageInfo, EnableAlertRulesRequest, EnableAlertRulesResponse, Event, EventPrincipal, ExportJob, ExportJobS3, ExportJobStatus, ExportJobStatusCode, InstanceServerInfo, IpamIpInfo, KeyManagerKeyInfo, KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, ListAlertRulesRequest, ListAlertRulesResponse, ListAuthenticationEventsRequest, ListAuthenticationEventsRequestOrderBy, ListAuthenticationEventsResponse, ListCombinedEventsRequest, ListCombinedEventsRequestOrderBy, ListCombinedEventsResponse, ListCombinedEventsResponseCombinedEvent, ListEventsRequest, ListEventsRequestOrderBy, ListEventsResponse, ListExportJobsRequest, ListExportJobsRequestOrderBy, ListExportJobsResponse, ListProductsRequest, ListProductsResponse, ListSystemEventsRequest, ListSystemEventsRequestOrderBy, ListSystemEventsResponse, LoadBalancerAclInfo, LoadBalancerBackendInfo, LoadBalancerCertificateInfo, LoadBalancerFrontendInfo, LoadBalancerIpInfo, LoadBalancerLbInfo, LoadBalancerRouteInfo, Product, ProductService, Resource, ResourceType, SecretManagerSecretInfo, SecretManagerSecretVersionInfo, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse, SystemEvent, SystemEventKind, VpcGwGatewayInfo, VpcGwGatewayNetworkInfo, VpcPrivateNetworkInfo, VpcRouteInfo, VpcSubnetInfo, } from './types.gen.js';
5
5
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,25 +1,28 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { marshalCreateExportJobRequest, marshalDisableAlertRulesRequest, marshalEnableAlertRulesRequest, marshalSetEnabledAlertRulesRequest, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalEvent, unmarshalExportJob, unmarshalListAlertRulesResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListEventsResponse, unmarshalListExportJobsResponse, unmarshalListProductsResponse, unmarshalListSystemEventsResponse, unmarshalResource, unmarshalSetEnabledAlertRulesResponse } from "./marshalling.gen.js";
1
3
  import { API } from "./api.gen.js";
2
4
  import { ALERT_RULE_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { marshalCreateExportJobRequest, marshalDisableAlertRulesRequest, marshalEnableAlertRulesRequest, marshalSetEnabledAlertRulesRequest, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalEvent, unmarshalExportJob, unmarshalListAlertRulesResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListEventsResponse, unmarshalListExportJobsResponse, unmarshalListProductsResponse, unmarshalResource, unmarshalSetEnabledAlertRulesResponse } from "./marshalling.gen.js";
4
- import * as validationRules_gen from "./validation-rules.gen.js";
5
- export {
6
- ALERT_RULE_TRANSIENT_STATUSES,
7
- API,
8
- validationRules_gen as ValidationRules,
9
- marshalCreateExportJobRequest,
10
- marshalDisableAlertRulesRequest,
11
- marshalEnableAlertRulesRequest,
12
- marshalSetEnabledAlertRulesRequest,
13
- unmarshalDisableAlertRulesResponse,
14
- unmarshalEnableAlertRulesResponse,
15
- unmarshalEvent,
16
- unmarshalExportJob,
17
- unmarshalListAlertRulesResponse,
18
- unmarshalListAuthenticationEventsResponse,
19
- unmarshalListCombinedEventsResponse,
20
- unmarshalListEventsResponse,
21
- unmarshalListExportJobsResponse,
22
- unmarshalListProductsResponse,
23
- unmarshalResource,
24
- unmarshalSetEnabledAlertRulesResponse
25
- };
5
+ import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
7
+ ALERT_RULE_TRANSIENT_STATUSES: () => ALERT_RULE_TRANSIENT_STATUSES,
8
+ API: () => API,
9
+ ValidationRules: () => validation_rules_gen_exports,
10
+ marshalCreateExportJobRequest: () => marshalCreateExportJobRequest,
11
+ marshalDisableAlertRulesRequest: () => marshalDisableAlertRulesRequest,
12
+ marshalEnableAlertRulesRequest: () => marshalEnableAlertRulesRequest,
13
+ marshalSetEnabledAlertRulesRequest: () => marshalSetEnabledAlertRulesRequest,
14
+ unmarshalDisableAlertRulesResponse: () => unmarshalDisableAlertRulesResponse,
15
+ unmarshalEnableAlertRulesResponse: () => unmarshalEnableAlertRulesResponse,
16
+ unmarshalEvent: () => unmarshalEvent,
17
+ unmarshalExportJob: () => unmarshalExportJob,
18
+ unmarshalListAlertRulesResponse: () => unmarshalListAlertRulesResponse,
19
+ unmarshalListAuthenticationEventsResponse: () => unmarshalListAuthenticationEventsResponse,
20
+ unmarshalListCombinedEventsResponse: () => unmarshalListCombinedEventsResponse,
21
+ unmarshalListEventsResponse: () => unmarshalListEventsResponse,
22
+ unmarshalListExportJobsResponse: () => unmarshalListExportJobsResponse,
23
+ unmarshalListProductsResponse: () => unmarshalListProductsResponse,
24
+ unmarshalListSystemEventsResponse: () => unmarshalListSystemEventsResponse,
25
+ unmarshalResource: () => unmarshalResource,
26
+ unmarshalSetEnabledAlertRulesResponse: () => unmarshalSetEnabledAlertRulesResponse
27
+ });
28
+ export { index_gen_exports };
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { CreateExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EnableAlertRulesRequest, EnableAlertRulesResponse, Event, ExportJob, ListAlertRulesResponse, ListAuthenticationEventsResponse, ListCombinedEventsResponse, ListEventsResponse, ListExportJobsResponse, ListProductsResponse, Resource, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse } from './types.gen.js';
2
+ import type { CreateExportJobRequest, DisableAlertRulesRequest, DisableAlertRulesResponse, EnableAlertRulesRequest, EnableAlertRulesResponse, Event, ExportJob, ListAlertRulesResponse, ListAuthenticationEventsResponse, ListCombinedEventsResponse, ListEventsResponse, ListExportJobsResponse, ListProductsResponse, ListSystemEventsResponse, Resource, SetEnabledAlertRulesRequest, SetEnabledAlertRulesResponse } from './types.gen.js';
3
3
  export declare const unmarshalExportJob: (data: unknown) => ExportJob;
4
4
  export declare const unmarshalDisableAlertRulesResponse: (data: unknown) => DisableAlertRulesResponse;
5
5
  export declare const unmarshalEnableAlertRulesResponse: (data: unknown) => EnableAlertRulesResponse;
@@ -11,6 +11,7 @@ export declare const unmarshalListCombinedEventsResponse: (data: unknown) => Lis
11
11
  export declare const unmarshalListEventsResponse: (data: unknown) => ListEventsResponse;
12
12
  export declare const unmarshalListExportJobsResponse: (data: unknown) => ListExportJobsResponse;
13
13
  export declare const unmarshalListProductsResponse: (data: unknown) => ListProductsResponse;
14
+ export declare const unmarshalListSystemEventsResponse: (data: unknown) => ListSystemEventsResponse;
14
15
  export declare const unmarshalSetEnabledAlertRulesResponse: (data: unknown) => SetEnabledAlertRulesResponse;
15
16
  export declare const marshalCreateExportJobRequest: (request: CreateExportJobRequest, defaults: DefaultValues) => Record<string, unknown>;
16
17
  export declare const marshalDisableAlertRulesRequest: (request: DisableAlertRulesRequest, defaults: DefaultValues) => Record<string, unknown>;