@scaleway/sdk-audit-trail 1.5.0 → 2.1.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 +96 -0
- package/dist/v1alpha1/api.gen.d.ts +1 -1
- package/dist/v1alpha1/api.gen.js +21 -41
- package/dist/v1alpha1/index.gen.d.ts +2 -2
- package/dist/v1alpha1/marshalling.gen.js +129 -10
- package/dist/v1alpha1/types.gen.d.ts +116 -26
- package/dist/v1alpha1/validation-rules.gen.js +1 -1
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1alpha1/api.gen.cjs +0 -168
- package/dist/v1alpha1/index.gen.cjs +0 -16
- package/dist/v1alpha1/marshalling.gen.cjs +0 -504
- package/dist/v1alpha1/validation-rules.gen.cjs +0 -63
|
@@ -1,504 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
-
const unmarshalExportJobS3 = (data) => {
|
|
5
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
6
|
-
throw new TypeError(
|
|
7
|
-
`Unmarshalling the type 'ExportJobS3' failed as data isn't a dictionary.`
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
bucket: data.bucket,
|
|
12
|
-
prefix: data.prefix,
|
|
13
|
-
projectId: data.project_id,
|
|
14
|
-
region: data.region
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
const unmarshalExportJobStatus = (data) => {
|
|
18
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
19
|
-
throw new TypeError(
|
|
20
|
-
`Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary.`
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
code: data.code,
|
|
25
|
-
message: data.message
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
const unmarshalExportJob = (data) => {
|
|
29
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
30
|
-
throw new TypeError(
|
|
31
|
-
`Unmarshalling the type 'ExportJob' failed as data isn't a dictionary.`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
36
|
-
id: data.id,
|
|
37
|
-
lastRunAt: sdkClient.unmarshalDate(data.last_run_at),
|
|
38
|
-
lastStatus: data.last_status ? unmarshalExportJobStatus(data.last_status) : void 0,
|
|
39
|
-
name: data.name,
|
|
40
|
-
organizationId: data.organization_id,
|
|
41
|
-
s3: data.s3 ? unmarshalExportJobS3(data.s3) : void 0,
|
|
42
|
-
tags: data.tags
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
const unmarshalAccountOrganizationInfo = (data) => {
|
|
46
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
47
|
-
throw new TypeError(
|
|
48
|
-
`Unmarshalling the type 'AccountOrganizationInfo' failed as data isn't a dictionary.`
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
return {};
|
|
52
|
-
};
|
|
53
|
-
const unmarshalAccountProjectInfo = (data) => {
|
|
54
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
55
|
-
throw new TypeError(
|
|
56
|
-
`Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary.`
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
description: data.description
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
const unmarshalAccountUserInfo = (data) => {
|
|
64
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
65
|
-
throw new TypeError(
|
|
66
|
-
`Unmarshalling the type 'AccountUserInfo' failed as data isn't a dictionary.`
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
email: data.email,
|
|
71
|
-
phoneNumber: data.phone_number
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
const unmarshalAppleSiliconServerInfo = (data) => {
|
|
75
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
76
|
-
throw new TypeError(
|
|
77
|
-
`Unmarshalling the type 'AppleSiliconServerInfo' failed as data isn't a dictionary.`
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
id: data.id,
|
|
82
|
-
name: data.name
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const unmarshalBaremetalServerInfo = (data) => {
|
|
86
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
87
|
-
throw new TypeError(
|
|
88
|
-
`Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary.`
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
description: data.description,
|
|
93
|
-
tags: data.tags
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const unmarshalBaremetalSettingInfo = (data) => {
|
|
97
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
98
|
-
throw new TypeError(
|
|
99
|
-
`Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary.`
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
type: data.type
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
const unmarshalInstanceServerInfo = (data) => {
|
|
107
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
108
|
-
throw new TypeError(
|
|
109
|
-
`Unmarshalling the type 'InstanceServerInfo' failed as data isn't a dictionary.`
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
name: data.name
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
const unmarshalIpamIpInfo = (data) => {
|
|
117
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
118
|
-
throw new TypeError(
|
|
119
|
-
`Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary.`
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
address: data.address
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
const unmarshalKeyManagerKeyInfo = (data) => {
|
|
127
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
128
|
-
throw new TypeError(
|
|
129
|
-
`Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
return {};
|
|
133
|
-
};
|
|
134
|
-
const unmarshalKubernetesACLInfo = (data) => {
|
|
135
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
136
|
-
throw new TypeError(
|
|
137
|
-
`Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
return {};
|
|
141
|
-
};
|
|
142
|
-
const unmarshalKubernetesClusterInfo = (data) => {
|
|
143
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
144
|
-
throw new TypeError(
|
|
145
|
-
`Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
return {};
|
|
149
|
-
};
|
|
150
|
-
const unmarshalKubernetesNodeInfo = (data) => {
|
|
151
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
152
|
-
throw new TypeError(
|
|
153
|
-
`Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
id: data.id,
|
|
158
|
-
name: data.name
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
const unmarshalKubernetesPoolInfo = (data) => {
|
|
162
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
163
|
-
throw new TypeError(
|
|
164
|
-
`Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
id: data.id,
|
|
169
|
-
name: data.name
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
const unmarshalLoadBalancerAclInfo = (data) => {
|
|
173
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
174
|
-
throw new TypeError(
|
|
175
|
-
`Unmarshalling the type 'LoadBalancerAclInfo' failed as data isn't a dictionary.`
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
return {
|
|
179
|
-
frontendId: data.frontend_id
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
const unmarshalLoadBalancerBackendInfo = (data) => {
|
|
183
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
184
|
-
throw new TypeError(
|
|
185
|
-
`Unmarshalling the type 'LoadBalancerBackendInfo' failed as data isn't a dictionary.`
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
lbId: data.lb_id,
|
|
190
|
-
name: data.name
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
const unmarshalLoadBalancerCertificateInfo = (data) => {
|
|
194
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
195
|
-
throw new TypeError(
|
|
196
|
-
`Unmarshalling the type 'LoadBalancerCertificateInfo' failed as data isn't a dictionary.`
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
lbId: data.lb_id,
|
|
201
|
-
name: data.name
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
const unmarshalLoadBalancerFrontendInfo = (data) => {
|
|
205
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
206
|
-
throw new TypeError(
|
|
207
|
-
`Unmarshalling the type 'LoadBalancerFrontendInfo' failed as data isn't a dictionary.`
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
return {
|
|
211
|
-
lbId: data.lb_id,
|
|
212
|
-
name: data.name
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
const unmarshalLoadBalancerIpInfo = (data) => {
|
|
216
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
217
|
-
throw new TypeError(
|
|
218
|
-
`Unmarshalling the type 'LoadBalancerIpInfo' failed as data isn't a dictionary.`
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
return {
|
|
222
|
-
ipAddress: data.ip_address,
|
|
223
|
-
lbId: data.lb_id
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
const unmarshalLoadBalancerLbInfo = (data) => {
|
|
227
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
228
|
-
throw new TypeError(
|
|
229
|
-
`Unmarshalling the type 'LoadBalancerLbInfo' failed as data isn't a dictionary.`
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
return {
|
|
233
|
-
name: data.name
|
|
234
|
-
};
|
|
235
|
-
};
|
|
236
|
-
const unmarshalLoadBalancerRouteInfo = (data) => {
|
|
237
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
238
|
-
throw new TypeError(
|
|
239
|
-
`Unmarshalling the type 'LoadBalancerRouteInfo' failed as data isn't a dictionary.`
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
return {
|
|
243
|
-
backendId: data.backend_id,
|
|
244
|
-
frontendId: data.frontend_id
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
const unmarshalSecretManagerSecretInfo = (data) => {
|
|
248
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
249
|
-
throw new TypeError(
|
|
250
|
-
`Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
return {
|
|
254
|
-
keyId: data.key_id,
|
|
255
|
-
path: data.path
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
const unmarshalSecretManagerSecretVersionInfo = (data) => {
|
|
259
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
260
|
-
throw new TypeError(
|
|
261
|
-
`Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
return {
|
|
265
|
-
revision: data.revision
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
const unmarshalResource = (data) => {
|
|
269
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
270
|
-
throw new TypeError(
|
|
271
|
-
`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
return {
|
|
275
|
-
accountOrganizationInfo: data.account_organization_info ? unmarshalAccountOrganizationInfo(data.account_organization_info) : void 0,
|
|
276
|
-
accountProjectInfo: data.account_project_info ? unmarshalAccountProjectInfo(data.account_project_info) : void 0,
|
|
277
|
-
accountUserInfo: data.account_user_info ? unmarshalAccountUserInfo(data.account_user_info) : void 0,
|
|
278
|
-
appleSiliconServerInfo: data.apple_silicon_server_info ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) : void 0,
|
|
279
|
-
baremetalServerInfo: data.baremetal_server_info ? unmarshalBaremetalServerInfo(data.baremetal_server_info) : void 0,
|
|
280
|
-
baremetalSettingInfo: data.baremetal_setting_info ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) : void 0,
|
|
281
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
282
|
-
deletedAt: sdkClient.unmarshalDate(data.deleted_at),
|
|
283
|
-
id: data.id,
|
|
284
|
-
instanceServerInfo: data.instance_server_info ? unmarshalInstanceServerInfo(data.instance_server_info) : void 0,
|
|
285
|
-
ipamIpInfo: data.ipam_ip_info ? unmarshalIpamIpInfo(data.ipam_ip_info) : void 0,
|
|
286
|
-
keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
|
|
287
|
-
keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
|
|
288
|
-
kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
|
|
289
|
-
kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
|
|
290
|
-
kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
|
|
291
|
-
kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
|
|
292
|
-
loadBalancerAclInfo: data.load_balancer_acl_info ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) : void 0,
|
|
293
|
-
loadBalancerBackendInfo: data.load_balancer_backend_info ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) : void 0,
|
|
294
|
-
loadBalancerCertificateInfo: data.load_balancer_certificate_info ? unmarshalLoadBalancerCertificateInfo(
|
|
295
|
-
data.load_balancer_certificate_info
|
|
296
|
-
) : void 0,
|
|
297
|
-
loadBalancerFrontendInfo: data.load_balancer_frontend_info ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) : void 0,
|
|
298
|
-
loadBalancerIpInfo: data.load_balancer_ip_info ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) : void 0,
|
|
299
|
-
loadBalancerLbInfo: data.load_balancer_lb_info ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) : void 0,
|
|
300
|
-
loadBalancerRouteInfo: data.load_balancer_route_info ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) : void 0,
|
|
301
|
-
name: data.name,
|
|
302
|
-
secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
|
|
303
|
-
secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
|
|
304
|
-
secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
|
|
305
|
-
secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(
|
|
306
|
-
data.secret_manager_version_info
|
|
307
|
-
) : void 0,
|
|
308
|
-
type: data.type,
|
|
309
|
-
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
const unmarshalAuthenticationEvent = (data) => {
|
|
313
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
314
|
-
throw new TypeError(
|
|
315
|
-
`Unmarshalling the type 'AuthenticationEvent' failed as data isn't a dictionary.`
|
|
316
|
-
);
|
|
317
|
-
}
|
|
318
|
-
return {
|
|
319
|
-
countryCode: data.country_code ? data.country_code : void 0,
|
|
320
|
-
failureReason: data.failure_reason ? data.failure_reason : void 0,
|
|
321
|
-
id: data.id,
|
|
322
|
-
method: data.method,
|
|
323
|
-
mfaType: data.mfa_type ? data.mfa_type : void 0,
|
|
324
|
-
organizationId: data.organization_id,
|
|
325
|
-
origin: data.origin,
|
|
326
|
-
recordedAt: sdkClient.unmarshalDate(data.recorded_at),
|
|
327
|
-
resources: sdkClient.unmarshalArrayOfObject(data.resources, unmarshalResource),
|
|
328
|
-
result: data.result,
|
|
329
|
-
sourceIp: data.source_ip,
|
|
330
|
-
userAgent: data.user_agent
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
const unmarshalListAuthenticationEventsResponse = (data) => {
|
|
334
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
335
|
-
throw new TypeError(
|
|
336
|
-
`Unmarshalling the type 'ListAuthenticationEventsResponse' failed as data isn't a dictionary.`
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
return {
|
|
340
|
-
events: sdkClient.unmarshalArrayOfObject(data.events, unmarshalAuthenticationEvent),
|
|
341
|
-
nextPageToken: data.next_page_token
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
|
-
const unmarshalEventPrincipal = (data) => {
|
|
345
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
346
|
-
throw new TypeError(
|
|
347
|
-
`Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
return {
|
|
351
|
-
id: data.id
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
const unmarshalEvent = (data) => {
|
|
355
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
356
|
-
throw new TypeError(
|
|
357
|
-
`Unmarshalling the type 'Event' failed as data isn't a dictionary.`
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
return {
|
|
361
|
-
id: data.id,
|
|
362
|
-
locality: data.locality,
|
|
363
|
-
methodName: data.method_name,
|
|
364
|
-
organizationId: data.organization_id,
|
|
365
|
-
principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
|
|
366
|
-
productName: data.product_name,
|
|
367
|
-
projectId: data.project_id,
|
|
368
|
-
recordedAt: sdkClient.unmarshalDate(data.recorded_at),
|
|
369
|
-
requestBody: data.request_body,
|
|
370
|
-
requestId: data.request_id,
|
|
371
|
-
resources: sdkClient.unmarshalArrayOfObject(data.resources, unmarshalResource),
|
|
372
|
-
serviceName: data.service_name,
|
|
373
|
-
sourceIp: data.source_ip,
|
|
374
|
-
statusCode: data.status_code,
|
|
375
|
-
userAgent: data.user_agent
|
|
376
|
-
};
|
|
377
|
-
};
|
|
378
|
-
const unmarshalSystemEvent = (data) => {
|
|
379
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
380
|
-
throw new TypeError(
|
|
381
|
-
`Unmarshalling the type 'SystemEvent' failed as data isn't a dictionary.`
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
return {
|
|
385
|
-
id: data.id,
|
|
386
|
-
kind: data.kind,
|
|
387
|
-
locality: data.locality,
|
|
388
|
-
organizationId: data.organization_id,
|
|
389
|
-
productName: data.product_name,
|
|
390
|
-
projectId: data.project_id,
|
|
391
|
-
recordedAt: sdkClient.unmarshalDate(data.recorded_at),
|
|
392
|
-
resources: sdkClient.unmarshalArrayOfObject(data.resources, unmarshalResource),
|
|
393
|
-
source: data.source,
|
|
394
|
-
systemName: data.system_name
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
const unmarshalListCombinedEventsResponseCombinedEvent = (data) => {
|
|
398
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
399
|
-
throw new TypeError(
|
|
400
|
-
`Unmarshalling the type 'ListCombinedEventsResponseCombinedEvent' failed as data isn't a dictionary.`
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
return {
|
|
404
|
-
api: data.api ? unmarshalEvent(data.api) : void 0,
|
|
405
|
-
auth: data.auth ? unmarshalAuthenticationEvent(data.auth) : void 0,
|
|
406
|
-
system: data.system ? unmarshalSystemEvent(data.system) : void 0
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
const unmarshalListCombinedEventsResponse = (data) => {
|
|
410
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
411
|
-
throw new TypeError(
|
|
412
|
-
`Unmarshalling the type 'ListCombinedEventsResponse' failed as data isn't a dictionary.`
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
return {
|
|
416
|
-
events: sdkClient.unmarshalArrayOfObject(
|
|
417
|
-
data.events,
|
|
418
|
-
unmarshalListCombinedEventsResponseCombinedEvent
|
|
419
|
-
),
|
|
420
|
-
nextPageToken: data.next_page_token
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
const unmarshalListEventsResponse = (data) => {
|
|
424
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
425
|
-
throw new TypeError(
|
|
426
|
-
`Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`
|
|
427
|
-
);
|
|
428
|
-
}
|
|
429
|
-
return {
|
|
430
|
-
events: sdkClient.unmarshalArrayOfObject(data.events, unmarshalEvent),
|
|
431
|
-
nextPageToken: data.next_page_token
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
const unmarshalListExportJobsResponse = (data) => {
|
|
435
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
436
|
-
throw new TypeError(
|
|
437
|
-
`Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`
|
|
438
|
-
);
|
|
439
|
-
}
|
|
440
|
-
return {
|
|
441
|
-
exportJobs: sdkClient.unmarshalArrayOfObject(data.export_jobs, unmarshalExportJob),
|
|
442
|
-
totalCount: data.total_count
|
|
443
|
-
};
|
|
444
|
-
};
|
|
445
|
-
const unmarshalProductService = (data) => {
|
|
446
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
447
|
-
throw new TypeError(
|
|
448
|
-
`Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
|
-
return {
|
|
452
|
-
methods: data.methods,
|
|
453
|
-
name: data.name
|
|
454
|
-
};
|
|
455
|
-
};
|
|
456
|
-
const unmarshalProduct = (data) => {
|
|
457
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
458
|
-
throw new TypeError(
|
|
459
|
-
`Unmarshalling the type 'Product' failed as data isn't a dictionary.`
|
|
460
|
-
);
|
|
461
|
-
}
|
|
462
|
-
return {
|
|
463
|
-
name: data.name,
|
|
464
|
-
services: sdkClient.unmarshalArrayOfObject(data.services, unmarshalProductService),
|
|
465
|
-
title: data.title
|
|
466
|
-
};
|
|
467
|
-
};
|
|
468
|
-
const unmarshalListProductsResponse = (data) => {
|
|
469
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
470
|
-
throw new TypeError(
|
|
471
|
-
`Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
return {
|
|
475
|
-
products: sdkClient.unmarshalArrayOfObject(data.products, unmarshalProduct),
|
|
476
|
-
totalCount: data.total_count
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
const marshalExportJobS3 = (request, defaults) => ({
|
|
480
|
-
bucket: request.bucket,
|
|
481
|
-
prefix: request.prefix,
|
|
482
|
-
project_id: request.projectId,
|
|
483
|
-
region: request.region
|
|
484
|
-
});
|
|
485
|
-
const marshalCreateExportJobRequest = (request, defaults) => ({
|
|
486
|
-
name: request.name,
|
|
487
|
-
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
488
|
-
tags: request.tags,
|
|
489
|
-
...sdkClient.resolveOneOf([
|
|
490
|
-
{
|
|
491
|
-
param: "s3",
|
|
492
|
-
value: request.s3 !== void 0 ? marshalExportJobS3(request.s3) : void 0
|
|
493
|
-
}
|
|
494
|
-
])
|
|
495
|
-
});
|
|
496
|
-
exports.marshalCreateExportJobRequest = marshalCreateExportJobRequest;
|
|
497
|
-
exports.unmarshalEvent = unmarshalEvent;
|
|
498
|
-
exports.unmarshalExportJob = unmarshalExportJob;
|
|
499
|
-
exports.unmarshalListAuthenticationEventsResponse = unmarshalListAuthenticationEventsResponse;
|
|
500
|
-
exports.unmarshalListCombinedEventsResponse = unmarshalListCombinedEventsResponse;
|
|
501
|
-
exports.unmarshalListEventsResponse = unmarshalListEventsResponse;
|
|
502
|
-
exports.unmarshalListExportJobsResponse = unmarshalListExportJobsResponse;
|
|
503
|
-
exports.unmarshalListProductsResponse = unmarshalListProductsResponse;
|
|
504
|
-
exports.unmarshalResource = unmarshalResource;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const CreateExportJobRequest = {
|
|
4
|
-
name: {
|
|
5
|
-
maxLength: 255,
|
|
6
|
-
minLength: 1,
|
|
7
|
-
pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
const ExportJobS3 = {
|
|
11
|
-
bucket: {
|
|
12
|
-
maxLength: 63,
|
|
13
|
-
minLength: 3,
|
|
14
|
-
pattern: /^[a-z0-9][a-z0-9.-]{2,}$/
|
|
15
|
-
},
|
|
16
|
-
prefix: {
|
|
17
|
-
maxLength: 255,
|
|
18
|
-
pattern: /^[a-zA-Z0-9\._\-]+(?:\/[a-zA-Z0-9\._\-]+)*$/
|
|
19
|
-
},
|
|
20
|
-
region: {
|
|
21
|
-
pattern: /^[a-z]{2}-[a-z]{3}$/
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const ListAuthenticationEventsRequest = {
|
|
25
|
-
pageSize: {
|
|
26
|
-
greaterThanOrEqual: 1,
|
|
27
|
-
lessThanOrEqual: 1e3
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const ListCombinedEventsRequest = {
|
|
31
|
-
pageSize: {
|
|
32
|
-
greaterThanOrEqual: 1,
|
|
33
|
-
lessThanOrEqual: 1e3
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const ListEventsRequest = {
|
|
37
|
-
methodName: {
|
|
38
|
-
pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/
|
|
39
|
-
},
|
|
40
|
-
pageSize: {
|
|
41
|
-
greaterThanOrEqual: 1,
|
|
42
|
-
lessThanOrEqual: 1e3
|
|
43
|
-
},
|
|
44
|
-
productName: {
|
|
45
|
-
pattern: /^[a-z]+(-[a-z]+)*$/
|
|
46
|
-
},
|
|
47
|
-
resourceId: {
|
|
48
|
-
maxLength: 100,
|
|
49
|
-
pattern: /^[a-zA-Z0-9._-]+$/
|
|
50
|
-
},
|
|
51
|
-
serviceName: {
|
|
52
|
-
pattern: /^scaleway(\.[a-zA-Z0-9_-]*)*$/
|
|
53
|
-
},
|
|
54
|
-
status: {
|
|
55
|
-
greaterThanOrEqual: 200,
|
|
56
|
-
lessThan: 600
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
exports.CreateExportJobRequest = CreateExportJobRequest;
|
|
60
|
-
exports.ExportJobS3 = ExportJobS3;
|
|
61
|
-
exports.ListAuthenticationEventsRequest = ListAuthenticationEventsRequest;
|
|
62
|
-
exports.ListCombinedEventsRequest = ListCombinedEventsRequest;
|
|
63
|
-
exports.ListEventsRequest = ListEventsRequest;
|