@scaleway/sdk-audit-trail 1.0.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/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ https://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2019 Scaleway.
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ https://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const index_gen = require("./v1alpha1/index.gen.cjs");
4
+ exports.AuditTrailv1alpha1 = index_gen;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated
3
+ * PLEASE DO NOT EDIT HERE
4
+ */
5
+ export * as AuditTrailv1alpha1 from './v1alpha1/index.gen';
@@ -0,0 +1,4 @@
1
+ import * as index_gen from "./v1alpha1/index.gen.js";
2
+ export {
3
+ index_gen as AuditTrailv1alpha1
4
+ };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const sdkClient = require("@scaleway/sdk-client");
4
+ const marshalling_gen = require("./marshalling.gen.cjs");
5
+ class API extends sdkClient.API {
6
+ /** Lists the available regions of the API. */
7
+ static LOCALITIES = ["fr-par", "nl-ams"];
8
+ /**
9
+ * 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`.
10
+ *
11
+ * @param request - The request {@link ListEventsRequest}
12
+ * @returns A Promise of ListEventsResponse
13
+ */
14
+ listEvents = (request = {}) => this.client.fetch(
15
+ {
16
+ method: "GET",
17
+ path: `/audit-trail/v1alpha1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/events`,
18
+ urlParams: sdkClient.urlParams(
19
+ ["method_name", request.methodName],
20
+ ["order_by", request.orderBy],
21
+ [
22
+ "organization_id",
23
+ request.organizationId ?? this.client.settings.defaultOrganizationId
24
+ ],
25
+ [
26
+ "page_size",
27
+ request.pageSize ?? this.client.settings.defaultPageSize
28
+ ],
29
+ ["page_token", request.pageToken],
30
+ ["product_name", request.productName],
31
+ ["project_id", request.projectId],
32
+ ["recorded_after", request.recordedAfter],
33
+ ["recorded_before", request.recordedBefore],
34
+ ["resource_type", request.resourceType],
35
+ ["service_name", request.serviceName],
36
+ ["status", request.status]
37
+ )
38
+ },
39
+ marshalling_gen.unmarshalListEventsResponse
40
+ );
41
+ /**
42
+ * Retrieve the list of Scaleway resources for which you have Audit Trail events.
43
+ *
44
+ * @param request - The request {@link ListProductsRequest}
45
+ * @returns A Promise of ListProductsResponse
46
+ */
47
+ listProducts = (request = {}) => this.client.fetch(
48
+ {
49
+ method: "GET",
50
+ path: `/audit-trail/v1alpha1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/products`,
51
+ urlParams: sdkClient.urlParams([
52
+ "organization_id",
53
+ request.organizationId ?? this.client.settings.defaultOrganizationId
54
+ ])
55
+ },
56
+ marshalling_gen.unmarshalListProductsResponse
57
+ );
58
+ }
59
+ exports.API = API;
@@ -0,0 +1,26 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { Region as ScwRegion } from '@scaleway/sdk-client';
3
+ import type { ListEventsRequest, ListEventsResponse, ListProductsRequest, ListProductsResponse } from './types.gen';
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
+ export declare class API extends ParentAPI {
10
+ /** Lists the available regions of the API. */
11
+ static readonly LOCALITIES: ScwRegion[];
12
+ /**
13
+ * 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`.
14
+ *
15
+ * @param request - The request {@link ListEventsRequest}
16
+ * @returns A Promise of ListEventsResponse
17
+ */
18
+ listEvents: (request?: Readonly<ListEventsRequest>) => Promise<ListEventsResponse>;
19
+ /**
20
+ * Retrieve the list of Scaleway resources for which you have Audit Trail events.
21
+ *
22
+ * @param request - The request {@link ListProductsRequest}
23
+ * @returns A Promise of ListProductsResponse
24
+ */
25
+ listProducts: (request?: Readonly<ListProductsRequest>) => Promise<ListProductsResponse>;
26
+ }
@@ -0,0 +1,59 @@
1
+ import { API as API$1, urlParams, validatePathParam } from "@scaleway/sdk-client";
2
+ import { unmarshalListEventsResponse, unmarshalListProductsResponse } from "./marshalling.gen.js";
3
+ class API extends API$1 {
4
+ /** Lists the available regions of the API. */
5
+ static LOCALITIES = ["fr-par", "nl-ams"];
6
+ /**
7
+ * 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`.
8
+ *
9
+ * @param request - The request {@link ListEventsRequest}
10
+ * @returns A Promise of ListEventsResponse
11
+ */
12
+ listEvents = (request = {}) => this.client.fetch(
13
+ {
14
+ method: "GET",
15
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/events`,
16
+ urlParams: urlParams(
17
+ ["method_name", request.methodName],
18
+ ["order_by", request.orderBy],
19
+ [
20
+ "organization_id",
21
+ request.organizationId ?? this.client.settings.defaultOrganizationId
22
+ ],
23
+ [
24
+ "page_size",
25
+ request.pageSize ?? this.client.settings.defaultPageSize
26
+ ],
27
+ ["page_token", request.pageToken],
28
+ ["product_name", request.productName],
29
+ ["project_id", request.projectId],
30
+ ["recorded_after", request.recordedAfter],
31
+ ["recorded_before", request.recordedBefore],
32
+ ["resource_type", request.resourceType],
33
+ ["service_name", request.serviceName],
34
+ ["status", request.status]
35
+ )
36
+ },
37
+ unmarshalListEventsResponse
38
+ );
39
+ /**
40
+ * Retrieve the list of Scaleway resources for which you have Audit Trail events.
41
+ *
42
+ * @param request - The request {@link ListProductsRequest}
43
+ * @returns A Promise of ListProductsResponse
44
+ */
45
+ listProducts = (request = {}) => this.client.fetch(
46
+ {
47
+ method: "GET",
48
+ path: `/audit-trail/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/products`,
49
+ urlParams: urlParams([
50
+ "organization_id",
51
+ request.organizationId ?? this.client.settings.defaultOrganizationId
52
+ ])
53
+ },
54
+ unmarshalListProductsResponse
55
+ );
56
+ }
57
+ export {
58
+ API
59
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const api_gen = require("./api.gen.cjs");
4
+ const marshalling_gen = require("./marshalling.gen.cjs");
5
+ const validationRules_gen = require("./validation-rules.gen.cjs");
6
+ exports.API = api_gen.API;
7
+ exports.unmarshalEvent = marshalling_gen.unmarshalEvent;
8
+ exports.unmarshalListEventsResponse = marshalling_gen.unmarshalListEventsResponse;
9
+ exports.unmarshalListProductsResponse = marshalling_gen.unmarshalListProductsResponse;
10
+ exports.unmarshalResource = marshalling_gen.unmarshalResource;
11
+ exports.ValidationRules = validationRules_gen;
@@ -0,0 +1,4 @@
1
+ export { API } from './api.gen';
2
+ export * from './marshalling.gen';
3
+ export type { Event, EventPrincipal, KeyManagerKeyInfo, KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, ListEventsRequest, ListEventsRequestOrderBy, ListEventsResponse, ListProductsRequest, ListProductsResponse, Product, ProductService, Resource, ResourceType, SecretManagerSecretInfo, SecretManagerSecretVersionInfo, } from './types.gen';
4
+ export * as ValidationRules from './validation-rules.gen';
@@ -0,0 +1,11 @@
1
+ import { API } from "./api.gen.js";
2
+ import { unmarshalEvent, unmarshalListEventsResponse, unmarshalListProductsResponse, unmarshalResource } from "./marshalling.gen.js";
3
+ import * as validationRules_gen from "./validation-rules.gen.js";
4
+ export {
5
+ API,
6
+ validationRules_gen as ValidationRules,
7
+ unmarshalEvent,
8
+ unmarshalListEventsResponse,
9
+ unmarshalListProductsResponse,
10
+ unmarshalResource
11
+ };
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const sdkClient = require("@scaleway/sdk-client");
4
+ const unmarshalKeyManagerKeyInfo = (data) => {
5
+ if (!sdkClient.isJSONObject(data)) {
6
+ throw new TypeError(
7
+ `Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`
8
+ );
9
+ }
10
+ return {};
11
+ };
12
+ const unmarshalKubernetesACLInfo = (data) => {
13
+ if (!sdkClient.isJSONObject(data)) {
14
+ throw new TypeError(
15
+ `Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`
16
+ );
17
+ }
18
+ return {};
19
+ };
20
+ const unmarshalKubernetesClusterInfo = (data) => {
21
+ if (!sdkClient.isJSONObject(data)) {
22
+ throw new TypeError(
23
+ `Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`
24
+ );
25
+ }
26
+ return {};
27
+ };
28
+ const unmarshalKubernetesNodeInfo = (data) => {
29
+ if (!sdkClient.isJSONObject(data)) {
30
+ throw new TypeError(
31
+ `Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`
32
+ );
33
+ }
34
+ return {
35
+ id: data.id,
36
+ name: data.name
37
+ };
38
+ };
39
+ const unmarshalKubernetesPoolInfo = (data) => {
40
+ if (!sdkClient.isJSONObject(data)) {
41
+ throw new TypeError(
42
+ `Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`
43
+ );
44
+ }
45
+ return {
46
+ id: data.id,
47
+ name: data.name
48
+ };
49
+ };
50
+ const unmarshalSecretManagerSecretInfo = (data) => {
51
+ if (!sdkClient.isJSONObject(data)) {
52
+ throw new TypeError(
53
+ `Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`
54
+ );
55
+ }
56
+ return {
57
+ path: data.path
58
+ };
59
+ };
60
+ const unmarshalSecretManagerSecretVersionInfo = (data) => {
61
+ if (!sdkClient.isJSONObject(data)) {
62
+ throw new TypeError(
63
+ `Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`
64
+ );
65
+ }
66
+ return {
67
+ revision: data.revision
68
+ };
69
+ };
70
+ const unmarshalEventPrincipal = (data) => {
71
+ if (!sdkClient.isJSONObject(data)) {
72
+ throw new TypeError(
73
+ `Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`
74
+ );
75
+ }
76
+ return {
77
+ id: data.id
78
+ };
79
+ };
80
+ const unmarshalResource = (data) => {
81
+ if (!sdkClient.isJSONObject(data)) {
82
+ throw new TypeError(
83
+ `Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
84
+ );
85
+ }
86
+ return {
87
+ createdAt: sdkClient.unmarshalDate(data.created_at),
88
+ deletedAt: sdkClient.unmarshalDate(data.deleted_at),
89
+ id: data.id,
90
+ keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
91
+ keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
92
+ kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
93
+ kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
94
+ kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
95
+ kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
96
+ name: data.name,
97
+ secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
98
+ secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
99
+ secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
100
+ secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(
101
+ data.secret_manager_version_info
102
+ ) : void 0,
103
+ type: data.type,
104
+ updatedAt: sdkClient.unmarshalDate(data.updated_at)
105
+ };
106
+ };
107
+ const unmarshalEvent = (data) => {
108
+ if (!sdkClient.isJSONObject(data)) {
109
+ throw new TypeError(
110
+ `Unmarshalling the type 'Event' failed as data isn't a dictionary.`
111
+ );
112
+ }
113
+ return {
114
+ id: data.id,
115
+ locality: data.locality,
116
+ methodName: data.method_name,
117
+ organizationId: data.organization_id,
118
+ principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
119
+ productName: data.product_name,
120
+ projectId: data.project_id,
121
+ recordedAt: sdkClient.unmarshalDate(data.recorded_at),
122
+ requestBody: data.request_body,
123
+ requestId: data.request_id,
124
+ resource: data.resource ? unmarshalResource(data.resource) : void 0,
125
+ resources: sdkClient.unmarshalArrayOfObject(data.resources, unmarshalResource),
126
+ serviceName: data.service_name,
127
+ sourceIp: data.source_ip,
128
+ statusCode: data.status_code,
129
+ userAgent: data.user_agent
130
+ };
131
+ };
132
+ const unmarshalListEventsResponse = (data) => {
133
+ if (!sdkClient.isJSONObject(data)) {
134
+ throw new TypeError(
135
+ `Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`
136
+ );
137
+ }
138
+ return {
139
+ events: sdkClient.unmarshalArrayOfObject(data.events, unmarshalEvent),
140
+ nextPageToken: data.next_page_token
141
+ };
142
+ };
143
+ const unmarshalProductService = (data) => {
144
+ if (!sdkClient.isJSONObject(data)) {
145
+ throw new TypeError(
146
+ `Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`
147
+ );
148
+ }
149
+ return {
150
+ methods: data.methods,
151
+ name: data.name
152
+ };
153
+ };
154
+ const unmarshalProduct = (data) => {
155
+ if (!sdkClient.isJSONObject(data)) {
156
+ throw new TypeError(
157
+ `Unmarshalling the type 'Product' failed as data isn't a dictionary.`
158
+ );
159
+ }
160
+ return {
161
+ name: data.name,
162
+ services: sdkClient.unmarshalArrayOfObject(data.services, unmarshalProductService),
163
+ title: data.title
164
+ };
165
+ };
166
+ const unmarshalListProductsResponse = (data) => {
167
+ if (!sdkClient.isJSONObject(data)) {
168
+ throw new TypeError(
169
+ `Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`
170
+ );
171
+ }
172
+ return {
173
+ products: sdkClient.unmarshalArrayOfObject(data.products, unmarshalProduct),
174
+ totalCount: data.total_count
175
+ };
176
+ };
177
+ exports.unmarshalEvent = unmarshalEvent;
178
+ exports.unmarshalListEventsResponse = unmarshalListEventsResponse;
179
+ exports.unmarshalListProductsResponse = unmarshalListProductsResponse;
180
+ exports.unmarshalResource = unmarshalResource;
@@ -0,0 +1,5 @@
1
+ import type { Event, ListEventsResponse, ListProductsResponse, Resource } from './types.gen';
2
+ export declare const unmarshalResource: (data: unknown) => Resource;
3
+ export declare const unmarshalEvent: (data: unknown) => Event;
4
+ export declare const unmarshalListEventsResponse: (data: unknown) => ListEventsResponse;
5
+ export declare const unmarshalListProductsResponse: (data: unknown) => ListProductsResponse;
@@ -0,0 +1,180 @@
1
+ import { isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
2
+ const unmarshalKeyManagerKeyInfo = (data) => {
3
+ if (!isJSONObject(data)) {
4
+ throw new TypeError(
5
+ `Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`
6
+ );
7
+ }
8
+ return {};
9
+ };
10
+ const unmarshalKubernetesACLInfo = (data) => {
11
+ if (!isJSONObject(data)) {
12
+ throw new TypeError(
13
+ `Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`
14
+ );
15
+ }
16
+ return {};
17
+ };
18
+ const unmarshalKubernetesClusterInfo = (data) => {
19
+ if (!isJSONObject(data)) {
20
+ throw new TypeError(
21
+ `Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`
22
+ );
23
+ }
24
+ return {};
25
+ };
26
+ const unmarshalKubernetesNodeInfo = (data) => {
27
+ if (!isJSONObject(data)) {
28
+ throw new TypeError(
29
+ `Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`
30
+ );
31
+ }
32
+ return {
33
+ id: data.id,
34
+ name: data.name
35
+ };
36
+ };
37
+ const unmarshalKubernetesPoolInfo = (data) => {
38
+ if (!isJSONObject(data)) {
39
+ throw new TypeError(
40
+ `Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`
41
+ );
42
+ }
43
+ return {
44
+ id: data.id,
45
+ name: data.name
46
+ };
47
+ };
48
+ const unmarshalSecretManagerSecretInfo = (data) => {
49
+ if (!isJSONObject(data)) {
50
+ throw new TypeError(
51
+ `Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`
52
+ );
53
+ }
54
+ return {
55
+ path: data.path
56
+ };
57
+ };
58
+ const unmarshalSecretManagerSecretVersionInfo = (data) => {
59
+ if (!isJSONObject(data)) {
60
+ throw new TypeError(
61
+ `Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`
62
+ );
63
+ }
64
+ return {
65
+ revision: data.revision
66
+ };
67
+ };
68
+ const unmarshalEventPrincipal = (data) => {
69
+ if (!isJSONObject(data)) {
70
+ throw new TypeError(
71
+ `Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`
72
+ );
73
+ }
74
+ return {
75
+ id: data.id
76
+ };
77
+ };
78
+ const unmarshalResource = (data) => {
79
+ if (!isJSONObject(data)) {
80
+ throw new TypeError(
81
+ `Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
82
+ );
83
+ }
84
+ return {
85
+ createdAt: unmarshalDate(data.created_at),
86
+ deletedAt: unmarshalDate(data.deleted_at),
87
+ id: data.id,
88
+ keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
89
+ keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
90
+ kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
91
+ kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
92
+ kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
93
+ kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
94
+ name: data.name,
95
+ secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
96
+ secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
97
+ secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
98
+ secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(
99
+ data.secret_manager_version_info
100
+ ) : void 0,
101
+ type: data.type,
102
+ updatedAt: unmarshalDate(data.updated_at)
103
+ };
104
+ };
105
+ const unmarshalEvent = (data) => {
106
+ if (!isJSONObject(data)) {
107
+ throw new TypeError(
108
+ `Unmarshalling the type 'Event' failed as data isn't a dictionary.`
109
+ );
110
+ }
111
+ return {
112
+ id: data.id,
113
+ locality: data.locality,
114
+ methodName: data.method_name,
115
+ organizationId: data.organization_id,
116
+ principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
117
+ productName: data.product_name,
118
+ projectId: data.project_id,
119
+ recordedAt: unmarshalDate(data.recorded_at),
120
+ requestBody: data.request_body,
121
+ requestId: data.request_id,
122
+ resource: data.resource ? unmarshalResource(data.resource) : void 0,
123
+ resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
124
+ serviceName: data.service_name,
125
+ sourceIp: data.source_ip,
126
+ statusCode: data.status_code,
127
+ userAgent: data.user_agent
128
+ };
129
+ };
130
+ const unmarshalListEventsResponse = (data) => {
131
+ if (!isJSONObject(data)) {
132
+ throw new TypeError(
133
+ `Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`
134
+ );
135
+ }
136
+ return {
137
+ events: unmarshalArrayOfObject(data.events, unmarshalEvent),
138
+ nextPageToken: data.next_page_token
139
+ };
140
+ };
141
+ const unmarshalProductService = (data) => {
142
+ if (!isJSONObject(data)) {
143
+ throw new TypeError(
144
+ `Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`
145
+ );
146
+ }
147
+ return {
148
+ methods: data.methods,
149
+ name: data.name
150
+ };
151
+ };
152
+ const unmarshalProduct = (data) => {
153
+ if (!isJSONObject(data)) {
154
+ throw new TypeError(
155
+ `Unmarshalling the type 'Product' failed as data isn't a dictionary.`
156
+ );
157
+ }
158
+ return {
159
+ name: data.name,
160
+ services: unmarshalArrayOfObject(data.services, unmarshalProductService),
161
+ title: data.title
162
+ };
163
+ };
164
+ const unmarshalListProductsResponse = (data) => {
165
+ if (!isJSONObject(data)) {
166
+ throw new TypeError(
167
+ `Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`
168
+ );
169
+ }
170
+ return {
171
+ products: unmarshalArrayOfObject(data.products, unmarshalProduct),
172
+ totalCount: data.total_count
173
+ };
174
+ };
175
+ export {
176
+ unmarshalEvent,
177
+ unmarshalListEventsResponse,
178
+ unmarshalListProductsResponse,
179
+ unmarshalResource
180
+ };
@@ -0,0 +1,246 @@
1
+ import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
+ export type ListEventsRequestOrderBy = 'recorded_at_desc' | 'recorded_at_asc';
3
+ export type ResourceType = 'unknown_type' | 'secm_secret' | 'secm_secret_version' | 'kube_cluster' | 'kube_pool' | 'kube_node' | 'kube_acl' | 'keym_key' | 'iam_user' | 'iam_application' | 'iam_group' | 'iam_policy' | 'iam_api_key' | 'iam_ssh_key' | 'iam_rule' | 'secret_manager_secret' | 'secret_manager_version' | 'key_manager_key';
4
+ export interface KeyManagerKeyInfo {
5
+ }
6
+ export interface KubernetesACLInfo {
7
+ }
8
+ export interface KubernetesClusterInfo {
9
+ }
10
+ export interface KubernetesNodeInfo {
11
+ id: string;
12
+ name: string;
13
+ }
14
+ export interface KubernetesPoolInfo {
15
+ id: string;
16
+ name: string;
17
+ }
18
+ export interface SecretManagerSecretInfo {
19
+ path: string;
20
+ }
21
+ export interface SecretManagerSecretVersionInfo {
22
+ revision: number;
23
+ }
24
+ export interface EventPrincipal {
25
+ id: string;
26
+ }
27
+ export interface Resource {
28
+ id: string;
29
+ type: ResourceType;
30
+ createdAt?: Date;
31
+ updatedAt?: Date;
32
+ deletedAt?: Date;
33
+ name?: string;
34
+ /**
35
+ * @deprecated
36
+ *
37
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
38
+ */
39
+ secmSecretInfo?: SecretManagerSecretInfo;
40
+ /**
41
+ * @deprecated
42
+ *
43
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
44
+ */
45
+ secmSecretVersionInfo?: SecretManagerSecretVersionInfo;
46
+ /**
47
+ *
48
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
49
+ */
50
+ kubeClusterInfo?: KubernetesClusterInfo;
51
+ /**
52
+ *
53
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
54
+ */
55
+ kubePoolInfo?: KubernetesPoolInfo;
56
+ /**
57
+ *
58
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
59
+ */
60
+ kubeNodeInfo?: KubernetesNodeInfo;
61
+ /**
62
+ *
63
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
64
+ */
65
+ kubeAclInfo?: KubernetesACLInfo;
66
+ /**
67
+ * @deprecated
68
+ *
69
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
70
+ */
71
+ keymKeyInfo?: KeyManagerKeyInfo;
72
+ /**
73
+ *
74
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
75
+ */
76
+ secretManagerSecretInfo?: SecretManagerSecretInfo;
77
+ /**
78
+ *
79
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
80
+ */
81
+ secretManagerVersionInfo?: SecretManagerSecretVersionInfo;
82
+ /**
83
+ *
84
+ * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo' could be set.
85
+ */
86
+ keyManagerKeyInfo?: KeyManagerKeyInfo;
87
+ }
88
+ export interface ProductService {
89
+ name: string;
90
+ methods: string[];
91
+ }
92
+ export interface Event {
93
+ /**
94
+ * ID of the event.
95
+ */
96
+ id: string;
97
+ /**
98
+ * Timestamp of the event.
99
+ */
100
+ recordedAt?: Date;
101
+ /**
102
+ * Locality of the resource attached to the event.
103
+ */
104
+ locality: string;
105
+ /**
106
+ * User or IAM application at the origin of the event.
107
+ */
108
+ principal?: EventPrincipal;
109
+ /**
110
+ * Organization ID containing the event.
111
+ */
112
+ organizationId: string;
113
+ /**
114
+ * (Optional) Project of the resource attached to the event.
115
+ */
116
+ projectId?: string;
117
+ /**
118
+ * IP address at the origin of the event.
119
+ */
120
+ sourceIp: string;
121
+ /**
122
+ * User Agent at the origin of the event.
123
+ */
124
+ userAgent?: string;
125
+ /**
126
+ * Product name of the resource attached to the event.
127
+ */
128
+ productName: string;
129
+ /**
130
+ * API name called to trigger the event.
131
+ */
132
+ serviceName: string;
133
+ /**
134
+ * API method called to trigger the event.
135
+ */
136
+ methodName: string;
137
+ /**
138
+ * @deprecated Resource attached to the event.
139
+ */
140
+ resource?: Resource;
141
+ /**
142
+ * Resources attached to the event.
143
+ */
144
+ resources: Resource[];
145
+ /**
146
+ * Unique identifier of the request at the origin of the event.
147
+ */
148
+ requestId: string;
149
+ /**
150
+ * Request at the origin of the event.
151
+ */
152
+ requestBody?: Record<string, unknown>;
153
+ /**
154
+ * HTTP status code resulting of the API call.
155
+ */
156
+ statusCode: number;
157
+ }
158
+ export interface Product {
159
+ /**
160
+ * Product title.
161
+ */
162
+ title: string;
163
+ /**
164
+ * Product name.
165
+ */
166
+ name: string;
167
+ /**
168
+ * Specifies the API versions of the products integrated with Audit Trail. Each version defines the methods logged by Audit Trail.
169
+ */
170
+ services: ProductService[];
171
+ }
172
+ export type ListEventsRequest = {
173
+ /**
174
+ * Region to target. If none is passed will use default region from the config.
175
+ */
176
+ region?: ScwRegion;
177
+ /**
178
+ * (Optional) ID of the Project containing the Audit Trail events.
179
+ */
180
+ projectId?: string;
181
+ /**
182
+ * ID of the Organization containing the Audit Trail events.
183
+ */
184
+ organizationId?: string;
185
+ /**
186
+ * (Optional) Returns a paginated list of Scaleway resources' features.
187
+ */
188
+ resourceType?: ResourceType;
189
+ /**
190
+ * (Optional) Name of the method of the API call performed.
191
+ */
192
+ methodName?: string;
193
+ /**
194
+ * (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied.
195
+ */
196
+ status?: number;
197
+ /**
198
+ * (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default.
199
+ */
200
+ recordedAfter?: Date;
201
+ /**
202
+ * (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns `now` by default.
203
+ */
204
+ recordedBefore?: Date;
205
+ orderBy?: ListEventsRequestOrderBy;
206
+ pageSize?: number;
207
+ pageToken?: string;
208
+ /**
209
+ * (Optional) Name of the Scaleway resource in a hyphenated format.
210
+ */
211
+ productName?: string;
212
+ /**
213
+ * (Optional) Name of the service of the API call performed.
214
+ */
215
+ serviceName?: string;
216
+ };
217
+ export interface ListEventsResponse {
218
+ /**
219
+ * Single page of events matching the requested criteria.
220
+ */
221
+ events: Event[];
222
+ /**
223
+ * Page token to use in following calls to keep listing.
224
+ */
225
+ nextPageToken?: string;
226
+ }
227
+ export type ListProductsRequest = {
228
+ /**
229
+ * Region to target. If none is passed will use default region from the config.
230
+ */
231
+ region?: ScwRegion;
232
+ /**
233
+ * ID of the Organization containing the Audit Trail events.
234
+ */
235
+ organizationId?: string;
236
+ };
237
+ export interface ListProductsResponse {
238
+ /**
239
+ * List of all products integrated with Audit Trail.
240
+ */
241
+ products: Product[];
242
+ /**
243
+ * Number of integrated products.
244
+ */
245
+ totalCount: number;
246
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ListEventsRequest = {
4
+ methodName: {
5
+ pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/
6
+ },
7
+ pageSize: {
8
+ greaterThanOrEqual: 1,
9
+ lessThanOrEqual: 1e3
10
+ },
11
+ productName: {
12
+ pattern: /^[a-z]+(-[a-z]+)*$/
13
+ },
14
+ serviceName: {
15
+ pattern: /^scaleway(\.[a-zA-Z0-9_-]*)*$/
16
+ },
17
+ status: {
18
+ greaterThanOrEqual: 200,
19
+ lessThan: 600
20
+ }
21
+ };
22
+ exports.ListEventsRequest = ListEventsRequest;
@@ -0,0 +1,19 @@
1
+ export declare const ListEventsRequest: {
2
+ methodName: {
3
+ pattern: RegExp;
4
+ };
5
+ pageSize: {
6
+ greaterThanOrEqual: number;
7
+ lessThanOrEqual: number;
8
+ };
9
+ productName: {
10
+ pattern: RegExp;
11
+ };
12
+ serviceName: {
13
+ pattern: RegExp;
14
+ };
15
+ status: {
16
+ greaterThanOrEqual: number;
17
+ lessThan: number;
18
+ };
19
+ };
@@ -0,0 +1,22 @@
1
+ const ListEventsRequest = {
2
+ methodName: {
3
+ pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/
4
+ },
5
+ pageSize: {
6
+ greaterThanOrEqual: 1,
7
+ lessThanOrEqual: 1e3
8
+ },
9
+ productName: {
10
+ pattern: /^[a-z]+(-[a-z]+)*$/
11
+ },
12
+ serviceName: {
13
+ pattern: /^scaleway(\.[a-zA-Z0-9_-]*)*$/
14
+ },
15
+ status: {
16
+ greaterThanOrEqual: 200,
17
+ lessThan: 600
18
+ }
19
+ };
20
+ export {
21
+ ListEventsRequest
22
+ };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@scaleway/sdk-audit-trail",
3
+ "version": "1.0.1",
4
+ "description": "Scaleway SDK audit-trail",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.gen.d.ts",
13
+ "import": "./dist/index.gen.js",
14
+ "require": "./dist/index.gen.cjs",
15
+ "default": "./dist/index.gen.js"
16
+ },
17
+ "./*": {
18
+ "types": "./dist/*/index.gen.d.ts",
19
+ "import": "./dist/*/index.gen.js",
20
+ "require": "./dist/*/index.gen.cjs",
21
+ "default": "./dist/*/index.gen.js"
22
+ }
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "directory": "packages_generated/audit-trail"
27
+ },
28
+ "engines": {
29
+ "node": ">=20.18.3"
30
+ },
31
+ "dependencies": {
32
+ "@scaleway/random-name": "5.1.1",
33
+ "@scaleway/sdk-std": "1.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "@scaleway/sdk-client": "^1.2.1"
37
+ },
38
+ "devDependencies": {
39
+ "@scaleway/sdk-client": "^1.2.1"
40
+ },
41
+ "bundledDependencies": [
42
+ "@scaleway/random-name"
43
+ ],
44
+ "scripts": {
45
+ "package:check": "pnpm publint",
46
+ "typecheck": "tsc --noEmit",
47
+ "type:generate": "tsc --declaration -p tsconfig.build.json",
48
+ "build": "vite build --config vite.config.ts && pnpm run type:generate",
49
+ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
50
+ }
51
+ }