@scaleway/sdk-kafka 2.2.1 → 2.3.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 Kafka.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
 
@@ -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 Kafkav1alpha1
4
- };
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as Kafkav1alpha1 };
@@ -1,248 +1,173 @@
1
- import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
2
1
  import { CLUSTER_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { unmarshalListNodeTypesResponse, unmarshalListVersionsResponse, unmarshalListClustersResponse, unmarshalCluster, marshalCreateClusterRequest, marshalUpdateClusterRequest, marshalCreateEndpointRequest, unmarshalEndpoint, unmarshalListUsersResponse, marshalUpdateUserRequest, unmarshalUser } from "./marshalling.gen.js";
4
- const jsonContentHeaders = {
5
- "Content-Type": "application/json; charset=utf-8"
6
- };
7
- class API extends API$1 {
8
- /**
9
- * Locality of this API.
10
- * type ∈ {'zone','region','global','unspecified'}
11
- */
12
- static LOCALITY = toApiLocality({
13
- regions: [
14
- "fr-par"
15
- ]
16
- });
17
- pageOfListNodeTypes = (request = {}) => this.client.fetch(
18
- {
19
- method: "GET",
20
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
21
- urlParams: urlParams(
22
- ["include_disabled_types", request.includeDisabledTypes],
23
- ["page", request.page],
24
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
25
- )
26
- },
27
- unmarshalListNodeTypesResponse
28
- );
29
- /**
30
- * List available node types.
31
- *
32
- * @param request - The request {@link ListNodeTypesRequest}
33
- * @returns A Promise of ListNodeTypesResponse
34
- */
35
- listNodeTypes = (request = {}) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
36
- pageOfListVersions = (request = {}) => this.client.fetch(
37
- {
38
- method: "GET",
39
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
40
- urlParams: urlParams(
41
- ["page", request.page],
42
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
43
- ["version", request.version]
44
- )
45
- },
46
- unmarshalListVersionsResponse
47
- );
48
- /**
49
- * List Kafka versions. List all available versions of Kafka at the current time.
50
- *
51
- * @param request - The request {@link ListVersionsRequest}
52
- * @returns A Promise of ListVersionsResponse
53
- */
54
- listVersions = (request = {}) => enrichForPagination("versions", this.pageOfListVersions, request);
55
- pageOfListClusters = (request = {}) => this.client.fetch(
56
- {
57
- method: "GET",
58
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters`,
59
- urlParams: urlParams(
60
- ["name", request.name],
61
- ["order_by", request.orderBy],
62
- ["organization_id", request.organizationId],
63
- ["page", request.page],
64
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
65
- ["project_id", request.projectId],
66
- ["tags", request.tags]
67
- )
68
- },
69
- unmarshalListClustersResponse
70
- );
71
- /**
72
- * List Kafka clusters. List all Kafka clusters in the specified region. By default, the clusters returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
73
- *
74
- * @param request - The request {@link ListClustersRequest}
75
- * @returns A Promise of ListClustersResponse
76
- */
77
- listClusters = (request = {}) => enrichForPagination("clusters", this.pageOfListClusters, request);
78
- /**
79
- * Get a Kafka cluster. Retrieve information about a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Its full details, including name, status, IP address and port, are returned in the response object.
80
- *
81
- * @param request - The request {@link GetClusterRequest}
82
- * @returns A Promise of Cluster
83
- */
84
- getCluster = (request) => this.client.fetch(
85
- {
86
- method: "GET",
87
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
88
- },
89
- unmarshalCluster
90
- );
91
- /**
92
- * Waits for {@link Cluster} to be in a final state.
93
- *
94
- * @param request - The request {@link GetClusterRequest}
95
- * @param options - The waiting options
96
- * @returns A Promise of Cluster
97
- */
98
- waitForCluster = (request, options) => waitForResource(
99
- options?.stop ?? ((res) => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
100
- this.getCluster,
101
- request,
102
- options
103
- );
104
- /**
105
- * Create a Kafka cluster. Create a new Kafka cluster.
106
- *
107
- * @param request - The request {@link CreateClusterRequest}
108
- * @returns A Promise of Cluster
109
- */
110
- createCluster = (request) => this.client.fetch(
111
- {
112
- body: JSON.stringify(
113
- marshalCreateClusterRequest(request, this.client.settings)
114
- ),
115
- headers: jsonContentHeaders,
116
- method: "POST",
117
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters`
118
- },
119
- unmarshalCluster
120
- );
121
- /**
122
- * Update a Kafka cluster. Update the parameters of a Kafka cluster.
123
- *
124
- * @param request - The request {@link UpdateClusterRequest}
125
- * @returns A Promise of Cluster
126
- */
127
- updateCluster = (request) => this.client.fetch(
128
- {
129
- body: JSON.stringify(
130
- marshalUpdateClusterRequest(request, this.client.settings)
131
- ),
132
- headers: jsonContentHeaders,
133
- method: "PATCH",
134
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
135
- },
136
- unmarshalCluster
137
- );
138
- /**
139
- * Delete a Kafka cluster. Delete a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Deleting a Kafka cluster is permanent, and cannot be undone. Note that upon deletion all your data will be lost.
140
- *
141
- * @param request - The request {@link DeleteClusterRequest}
142
- * @returns A Promise of Cluster
143
- */
144
- deleteCluster = (request) => this.client.fetch(
145
- {
146
- method: "DELETE",
147
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
148
- },
149
- unmarshalCluster
150
- );
151
- /**
152
- * Get a Kafka cluster's certificate authority. Retrieve certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The response object contains the certificate in PEM format. The certificate is required to validate the sever from the client side during TLS connection.
153
- *
154
- * @param request - The request {@link GetClusterCertificateAuthorityRequest}
155
- * @returns A Promise of Blob
156
- */
157
- getClusterCertificateAuthority = (request) => this.client.fetch(
158
- {
159
- method: "GET",
160
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/certificate-authority`,
161
- urlParams: urlParams(
162
- ["dl", 1]
163
- ),
164
- responseType: "blob"
165
- }
166
- );
167
- /**
168
- * Renew the Kafka cluster's certificate authority. Request to renew the certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The certificate authority will be renewed within a few minutes.
169
- *
170
- * @param request - The request {@link RenewClusterCertificateAuthorityRequest}
171
- */
172
- renewClusterCertificateAuthority = (request) => this.client.fetch(
173
- {
174
- body: "{}",
175
- headers: jsonContentHeaders,
176
- method: "POST",
177
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/renew-certificate-authority`
178
- }
179
- );
180
- /**
181
- * Delete a Kafka cluster endpoint. Delete the endpoint of a Kafka cluster. You must specify the `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.
182
- *
183
- * @param request - The request {@link DeleteEndpointRequest}
184
- */
185
- deleteEndpoint = (request) => this.client.fetch(
186
- {
187
- method: "DELETE",
188
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
189
- }
190
- );
191
- /**
192
- * Create a new Kafka cluster endpoint. Create a new endpoint for a Kafka cluster. You can add `public_network` or `private_network` specifications to the body of the request. Note that currently only `private_network` is supported.
193
- *
194
- * @param request - The request {@link CreateEndpointRequest}
195
- * @returns A Promise of Endpoint
196
- */
197
- createEndpoint = (request) => this.client.fetch(
198
- {
199
- body: JSON.stringify(
200
- marshalCreateEndpointRequest(request, this.client.settings)
201
- ),
202
- headers: jsonContentHeaders,
203
- method: "POST",
204
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
205
- },
206
- unmarshalEndpoint
207
- );
208
- pageOfListUsers = (request) => this.client.fetch(
209
- {
210
- method: "GET",
211
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/users`,
212
- urlParams: urlParams(
213
- ["name", request.name],
214
- ["order_by", request.orderBy],
215
- ["page", request.page],
216
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
217
- )
218
- },
219
- unmarshalListUsersResponse
220
- );
221
- /**
222
- * Retrieve a list of deployment users.
223
- *
224
- * @param request - The request {@link ListUsersRequest}
225
- * @returns A Promise of ListUsersResponse
226
- */
227
- listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
228
- /**
229
- * Update an existing user.
230
- *
231
- * @param request - The request {@link UpdateUserRequest}
232
- * @returns A Promise of User
233
- */
234
- updateUser = (request) => this.client.fetch(
235
- {
236
- body: JSON.stringify(
237
- marshalUpdateUserRequest(request, this.client.settings)
238
- ),
239
- headers: jsonContentHeaders,
240
- method: "PATCH",
241
- path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/users/${validatePathParam("username", request.username)}`
242
- },
243
- unmarshalUser
244
- );
245
- }
246
- export {
247
- API
2
+ import { marshalCreateClusterRequest, marshalCreateEndpointRequest, marshalUpdateClusterRequest, marshalUpdateUserRequest, unmarshalCluster, unmarshalEndpoint, unmarshalListClustersResponse, unmarshalListNodeTypesResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser } from "./marshalling.gen.js";
3
+ import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
+ /**
6
+ * Clusters for Apache Kafka®.
7
+
8
+ This API allows you to manage your Clusters for Apache Kafka®. This product is currently in Public Beta.
9
+ */
10
+ var API$1 = class extends API {
11
+ /**
12
+ * Locality of this API.
13
+ * type ∈ {'zone','region','global','unspecified'}
14
+ */
15
+ static LOCALITY = toApiLocality({ regions: ["fr-par"] });
16
+ pageOfListNodeTypes = (request = {}) => this.client.fetch({
17
+ method: "GET",
18
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
19
+ urlParams: urlParams(["include_disabled_types", request.includeDisabledTypes], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
20
+ }, unmarshalListNodeTypesResponse);
21
+ /**
22
+ * List available node types.
23
+ *
24
+ * @param request - The request {@link ListNodeTypesRequest}
25
+ * @returns A Promise of ListNodeTypesResponse
26
+ */
27
+ listNodeTypes = (request = {}) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
28
+ pageOfListVersions = (request = {}) => this.client.fetch({
29
+ method: "GET",
30
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
31
+ urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["version", request.version])
32
+ }, unmarshalListVersionsResponse);
33
+ /**
34
+ * List Kafka versions. List all available versions of Kafka at the current time.
35
+ *
36
+ * @param request - The request {@link ListVersionsRequest}
37
+ * @returns A Promise of ListVersionsResponse
38
+ */
39
+ listVersions = (request = {}) => enrichForPagination("versions", this.pageOfListVersions, request);
40
+ pageOfListClusters = (request = {}) => this.client.fetch({
41
+ method: "GET",
42
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters`,
43
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
44
+ }, unmarshalListClustersResponse);
45
+ /**
46
+ * List Kafka clusters. List all Kafka clusters in the specified region. By default, the clusters returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
47
+ *
48
+ * @param request - The request {@link ListClustersRequest}
49
+ * @returns A Promise of ListClustersResponse
50
+ */
51
+ listClusters = (request = {}) => enrichForPagination("clusters", this.pageOfListClusters, request);
52
+ /**
53
+ * Get a Kafka cluster. Retrieve information about a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Its full details, including name, status, IP address and port, are returned in the response object.
54
+ *
55
+ * @param request - The request {@link GetClusterRequest}
56
+ * @returns A Promise of Cluster
57
+ */
58
+ getCluster = (request) => this.client.fetch({
59
+ method: "GET",
60
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
61
+ }, unmarshalCluster);
62
+ /**
63
+ * Waits for {@link Cluster} to be in a final state.
64
+ *
65
+ * @param request - The request {@link GetClusterRequest}
66
+ * @param options - The waiting options
67
+ * @returns A Promise of Cluster
68
+ */
69
+ waitForCluster = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
70
+ /**
71
+ * Create a Kafka cluster. Create a new Kafka cluster.
72
+ *
73
+ * @param request - The request {@link CreateClusterRequest}
74
+ * @returns A Promise of Cluster
75
+ */
76
+ createCluster = (request) => this.client.fetch({
77
+ body: JSON.stringify(marshalCreateClusterRequest(request, this.client.settings)),
78
+ headers: jsonContentHeaders,
79
+ method: "POST",
80
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters`
81
+ }, unmarshalCluster);
82
+ /**
83
+ * Update a Kafka cluster. Update the parameters of a Kafka cluster.
84
+ *
85
+ * @param request - The request {@link UpdateClusterRequest}
86
+ * @returns A Promise of Cluster
87
+ */
88
+ updateCluster = (request) => this.client.fetch({
89
+ body: JSON.stringify(marshalUpdateClusterRequest(request, this.client.settings)),
90
+ headers: jsonContentHeaders,
91
+ method: "PATCH",
92
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
93
+ }, unmarshalCluster);
94
+ /**
95
+ * Delete a Kafka cluster. Delete a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Deleting a Kafka cluster is permanent, and cannot be undone. Note that upon deletion all your data will be lost.
96
+ *
97
+ * @param request - The request {@link DeleteClusterRequest}
98
+ * @returns A Promise of Cluster
99
+ */
100
+ deleteCluster = (request) => this.client.fetch({
101
+ method: "DELETE",
102
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`
103
+ }, unmarshalCluster);
104
+ /**
105
+ * Get a Kafka cluster's certificate authority. Retrieve certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The response object contains the certificate in PEM format. The certificate is required to validate the sever from the client side during TLS connection.
106
+ *
107
+ * @param request - The request {@link GetClusterCertificateAuthorityRequest}
108
+ * @returns A Promise of Blob
109
+ */
110
+ getClusterCertificateAuthority = (request) => this.client.fetch({
111
+ method: "GET",
112
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/certificate-authority`,
113
+ urlParams: urlParams(["dl", 1]),
114
+ responseType: "blob"
115
+ });
116
+ /**
117
+ * Renew the Kafka cluster's certificate authority. Request to renew the certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The certificate authority will be renewed within a few minutes.
118
+ *
119
+ * @param request - The request {@link RenewClusterCertificateAuthorityRequest}
120
+ */
121
+ renewClusterCertificateAuthority = (request) => this.client.fetch({
122
+ body: "{}",
123
+ headers: jsonContentHeaders,
124
+ method: "POST",
125
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/renew-certificate-authority`
126
+ });
127
+ /**
128
+ * Delete a Kafka cluster endpoint. Delete the endpoint of a Kafka cluster. You must specify the `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.
129
+ *
130
+ * @param request - The request {@link DeleteEndpointRequest}
131
+ */
132
+ deleteEndpoint = (request) => this.client.fetch({
133
+ method: "DELETE",
134
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
135
+ });
136
+ /**
137
+ * Create a new Kafka cluster endpoint. Create a new endpoint for a Kafka cluster. You can add `public_network` or `private_network` specifications to the body of the request. Note that currently only `private_network` is supported.
138
+ *
139
+ * @param request - The request {@link CreateEndpointRequest}
140
+ * @returns A Promise of Endpoint
141
+ */
142
+ createEndpoint = (request) => this.client.fetch({
143
+ body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
144
+ headers: jsonContentHeaders,
145
+ method: "POST",
146
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
147
+ }, unmarshalEndpoint);
148
+ pageOfListUsers = (request) => this.client.fetch({
149
+ method: "GET",
150
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/users`,
151
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
152
+ }, unmarshalListUsersResponse);
153
+ /**
154
+ * Retrieve a list of deployment users.
155
+ *
156
+ * @param request - The request {@link ListUsersRequest}
157
+ * @returns A Promise of ListUsersResponse
158
+ */
159
+ listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
160
+ /**
161
+ * Update an existing user.
162
+ *
163
+ * @param request - The request {@link UpdateUserRequest}
164
+ * @returns A Promise of User
165
+ */
166
+ updateUser = (request) => this.client.fetch({
167
+ body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
168
+ headers: jsonContentHeaders,
169
+ method: "PATCH",
170
+ path: `/kafka/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/users/${validatePathParam("username", request.username)}`
171
+ }, unmarshalUser);
248
172
  };
173
+ export { API$1 as API };
@@ -1,8 +1,7 @@
1
+ /** Lists transient statutes of the enum {@link ClusterStatus}. */
1
2
  const CLUSTER_TRANSIENT_STATUSES = [
2
- "creating",
3
- "configuring",
4
- "deleting"
3
+ "creating",
4
+ "configuring",
5
+ "deleting"
5
6
  ];
6
- export {
7
- CLUSTER_TRANSIENT_STATUSES
8
- };
7
+ export { CLUSTER_TRANSIENT_STATUSES };
@@ -1,20 +1,22 @@
1
- import { API } from "./api.gen.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { CLUSTER_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalCreateClusterRequest, marshalCreateEndpointRequest, marshalUpdateClusterRequest, marshalUpdateUserRequest, unmarshalCluster, unmarshalEndpoint, unmarshalListClustersResponse, unmarshalListNodeTypesResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser } from "./marshalling.gen.js";
4
- import * as validationRules_gen from "./validation-rules.gen.js";
5
- export {
6
- API,
7
- CLUSTER_TRANSIENT_STATUSES,
8
- validationRules_gen as ValidationRules,
9
- marshalCreateClusterRequest,
10
- marshalCreateEndpointRequest,
11
- marshalUpdateClusterRequest,
12
- marshalUpdateUserRequest,
13
- unmarshalCluster,
14
- unmarshalEndpoint,
15
- unmarshalListClustersResponse,
16
- unmarshalListNodeTypesResponse,
17
- unmarshalListUsersResponse,
18
- unmarshalListVersionsResponse,
19
- unmarshalUser
20
- };
4
+ import { API } from "./api.gen.js";
5
+ import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
7
+ API: () => API,
8
+ CLUSTER_TRANSIENT_STATUSES: () => CLUSTER_TRANSIENT_STATUSES,
9
+ ValidationRules: () => validation_rules_gen_exports,
10
+ marshalCreateClusterRequest: () => marshalCreateClusterRequest,
11
+ marshalCreateEndpointRequest: () => marshalCreateEndpointRequest,
12
+ marshalUpdateClusterRequest: () => marshalUpdateClusterRequest,
13
+ marshalUpdateUserRequest: () => marshalUpdateUserRequest,
14
+ unmarshalCluster: () => unmarshalCluster,
15
+ unmarshalEndpoint: () => unmarshalEndpoint,
16
+ unmarshalListClustersResponse: () => unmarshalListClustersResponse,
17
+ unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
18
+ unmarshalListUsersResponse: () => unmarshalListUsersResponse,
19
+ unmarshalListVersionsResponse: () => unmarshalListVersionsResponse,
20
+ unmarshalUser: () => unmarshalUser
21
+ });
22
+ export { index_gen_exports };
@@ -1,300 +1,197 @@
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
1
2
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
3
- const unmarshalEndpointPrivateNetworkDetails = (data) => {
4
- if (!isJSONObject(data)) {
5
- throw new TypeError(
6
- `Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`
7
- );
8
- }
9
- return {
10
- privateNetworkId: data.private_network_id
11
- };
3
+ var unmarshalEndpointPrivateNetworkDetails = (data) => {
4
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
5
+ return { privateNetworkId: data.private_network_id };
12
6
  };
13
- const unmarshalEndpointPublicDetails = (data) => {
14
- if (!isJSONObject(data)) {
15
- throw new TypeError(
16
- `Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`
17
- );
18
- }
19
- return {};
7
+ var unmarshalEndpointPublicDetails = (data) => {
8
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`);
9
+ return {};
20
10
  };
21
11
  const unmarshalEndpoint = (data) => {
22
- if (!isJSONObject(data)) {
23
- throw new TypeError(
24
- `Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`
25
- );
26
- }
27
- return {
28
- dnsRecords: data.dns_records,
29
- id: data.id,
30
- port: data.port,
31
- privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
32
- publicNetwork: data.public_network ? unmarshalEndpointPublicDetails(data.public_network) : void 0
33
- };
34
- };
35
- const unmarshalClusterSetting = (data) => {
36
- if (!isJSONObject(data)) {
37
- throw new TypeError(
38
- `Unmarshalling the type 'ClusterSetting' failed as data isn't a dictionary.`
39
- );
40
- }
41
- return {
42
- boolValue: data.bool_value,
43
- floatValue: data.float_value,
44
- intValue: data.int_value,
45
- name: data.name,
46
- stringValue: data.string_value
47
- };
48
- };
49
- const unmarshalVolume = (data) => {
50
- if (!isJSONObject(data)) {
51
- throw new TypeError(
52
- `Unmarshalling the type 'Volume' failed as data isn't a dictionary.`
53
- );
54
- }
55
- return {
56
- sizeBytes: data.size_bytes,
57
- type: data.type
58
- };
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
13
+ return {
14
+ dnsRecords: data.dns_records,
15
+ id: data.id,
16
+ port: data.port,
17
+ privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
18
+ publicNetwork: data.public_network ? unmarshalEndpointPublicDetails(data.public_network) : void 0
19
+ };
20
+ };
21
+ var unmarshalClusterSetting = (data) => {
22
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterSetting' failed as data isn't a dictionary.`);
23
+ return {
24
+ boolValue: data.bool_value,
25
+ floatValue: data.float_value,
26
+ intValue: data.int_value,
27
+ name: data.name,
28
+ stringValue: data.string_value
29
+ };
30
+ };
31
+ var unmarshalVolume = (data) => {
32
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
33
+ return {
34
+ sizeBytes: data.size_bytes,
35
+ type: data.type
36
+ };
59
37
  };
60
38
  const unmarshalCluster = (data) => {
61
- if (!isJSONObject(data)) {
62
- throw new TypeError(
63
- `Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`
64
- );
65
- }
66
- return {
67
- createdAt: unmarshalDate(data.created_at),
68
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
69
- id: data.id,
70
- name: data.name,
71
- nodeAmount: data.node_amount,
72
- nodeType: data.node_type,
73
- organizationId: data.organization_id,
74
- projectId: data.project_id,
75
- region: data.region,
76
- settings: unmarshalArrayOfObject(data.settings, unmarshalClusterSetting),
77
- status: data.status,
78
- tags: data.tags,
79
- updatedAt: unmarshalDate(data.updated_at),
80
- version: data.version,
81
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
82
- };
39
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
40
+ return {
41
+ createdAt: unmarshalDate(data.created_at),
42
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
43
+ id: data.id,
44
+ name: data.name,
45
+ nodeAmount: data.node_amount,
46
+ nodeType: data.node_type,
47
+ organizationId: data.organization_id,
48
+ projectId: data.project_id,
49
+ region: data.region,
50
+ settings: unmarshalArrayOfObject(data.settings, unmarshalClusterSetting),
51
+ status: data.status,
52
+ tags: data.tags,
53
+ updatedAt: unmarshalDate(data.updated_at),
54
+ version: data.version,
55
+ volume: data.volume ? unmarshalVolume(data.volume) : void 0
56
+ };
83
57
  };
84
58
  const unmarshalUser = (data) => {
85
- if (!isJSONObject(data)) {
86
- throw new TypeError(
87
- `Unmarshalling the type 'User' failed as data isn't a dictionary.`
88
- );
89
- }
90
- return {
91
- username: data.username
92
- };
59
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
60
+ return { username: data.username };
93
61
  };
94
62
  const unmarshalListClustersResponse = (data) => {
95
- if (!isJSONObject(data)) {
96
- throw new TypeError(
97
- `Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`
98
- );
99
- }
100
- return {
101
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
102
- totalCount: data.total_count
103
- };
104
- };
105
- const unmarshalNodeTypeVolumeType = (data) => {
106
- if (!isJSONObject(data)) {
107
- throw new TypeError(
108
- `Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`
109
- );
110
- }
111
- return {
112
- chunkSizeBytes: data.chunk_size_bytes,
113
- description: data.description,
114
- maxSizeBytes: data.max_size_bytes,
115
- minSizeBytes: data.min_size_bytes,
116
- type: data.type
117
- };
118
- };
119
- const unmarshalNodeType = (data) => {
120
- if (!isJSONObject(data)) {
121
- throw new TypeError(
122
- `Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`
123
- );
124
- }
125
- return {
126
- availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
127
- beta: data.beta,
128
- clusterRange: data.cluster_range,
129
- description: data.description,
130
- disabled: data.disabled,
131
- memoryBytes: data.memory_bytes,
132
- name: data.name,
133
- stockStatus: data.stock_status,
134
- vcpus: data.vcpus
135
- };
63
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
64
+ return {
65
+ clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
66
+ totalCount: data.total_count
67
+ };
68
+ };
69
+ var unmarshalNodeTypeVolumeType = (data) => {
70
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
71
+ return {
72
+ chunkSizeBytes: data.chunk_size_bytes,
73
+ description: data.description,
74
+ maxSizeBytes: data.max_size_bytes,
75
+ minSizeBytes: data.min_size_bytes,
76
+ type: data.type
77
+ };
78
+ };
79
+ var unmarshalNodeType = (data) => {
80
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
81
+ return {
82
+ availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
83
+ beta: data.beta,
84
+ clusterRange: data.cluster_range,
85
+ description: data.description,
86
+ disabled: data.disabled,
87
+ memoryBytes: data.memory_bytes,
88
+ name: data.name,
89
+ stockStatus: data.stock_status,
90
+ vcpus: data.vcpus
91
+ };
136
92
  };
137
93
  const unmarshalListNodeTypesResponse = (data) => {
138
- if (!isJSONObject(data)) {
139
- throw new TypeError(
140
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
141
- );
142
- }
143
- return {
144
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
145
- totalCount: data.total_count
146
- };
94
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
95
+ return {
96
+ nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
97
+ totalCount: data.total_count
98
+ };
147
99
  };
148
100
  const unmarshalListUsersResponse = (data) => {
149
- if (!isJSONObject(data)) {
150
- throw new TypeError(
151
- `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`
152
- );
153
- }
154
- return {
155
- totalCount: data.total_count,
156
- users: unmarshalArrayOfObject(data.users, unmarshalUser)
157
- };
158
- };
159
- const unmarshalVersionAvailableSettingBooleanProperty = (data) => {
160
- if (!isJSONObject(data)) {
161
- throw new TypeError(
162
- `Unmarshalling the type 'VersionAvailableSettingBooleanProperty' failed as data isn't a dictionary.`
163
- );
164
- }
165
- return {
166
- defaultValue: data.default_value
167
- };
168
- };
169
- const unmarshalVersionAvailableSettingFloatProperty = (data) => {
170
- if (!isJSONObject(data)) {
171
- throw new TypeError(
172
- `Unmarshalling the type 'VersionAvailableSettingFloatProperty' failed as data isn't a dictionary.`
173
- );
174
- }
175
- return {
176
- defaultValue: data.default_value,
177
- max: data.max,
178
- min: data.min,
179
- unit: data.unit
180
- };
181
- };
182
- const unmarshalVersionAvailableSettingIntegerProperty = (data) => {
183
- if (!isJSONObject(data)) {
184
- throw new TypeError(
185
- `Unmarshalling the type 'VersionAvailableSettingIntegerProperty' failed as data isn't a dictionary.`
186
- );
187
- }
188
- return {
189
- defaultValue: data.default_value,
190
- max: data.max,
191
- min: data.min,
192
- unit: data.unit
193
- };
194
- };
195
- const unmarshalVersionAvailableSettingStringProperty = (data) => {
196
- if (!isJSONObject(data)) {
197
- throw new TypeError(
198
- `Unmarshalling the type 'VersionAvailableSettingStringProperty' failed as data isn't a dictionary.`
199
- );
200
- }
201
- return {
202
- defaultValue: data.default_value,
203
- stringConstraint: data.string_constraint
204
- };
205
- };
206
- const unmarshalVersionAvailableSetting = (data) => {
207
- if (!isJSONObject(data)) {
208
- throw new TypeError(
209
- `Unmarshalling the type 'VersionAvailableSetting' failed as data isn't a dictionary.`
210
- );
211
- }
212
- return {
213
- boolProperty: data.bool_property ? unmarshalVersionAvailableSettingBooleanProperty(data.bool_property) : void 0,
214
- description: data.description,
215
- floatProperty: data.float_property ? unmarshalVersionAvailableSettingFloatProperty(data.float_property) : void 0,
216
- hotConfigurable: data.hot_configurable,
217
- intProperty: data.int_property ? unmarshalVersionAvailableSettingIntegerProperty(data.int_property) : void 0,
218
- name: data.name,
219
- stringProperty: data.string_property ? unmarshalVersionAvailableSettingStringProperty(data.string_property) : void 0
220
- };
221
- };
222
- const unmarshalVersion = (data) => {
223
- if (!isJSONObject(data)) {
224
- throw new TypeError(
225
- `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
226
- );
227
- }
228
- return {
229
- availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalVersionAvailableSetting),
230
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
231
- version: data.version
232
- };
101
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
102
+ return {
103
+ totalCount: data.total_count,
104
+ users: unmarshalArrayOfObject(data.users, unmarshalUser)
105
+ };
106
+ };
107
+ var unmarshalVersionAvailableSettingBooleanProperty = (data) => {
108
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VersionAvailableSettingBooleanProperty' failed as data isn't a dictionary.`);
109
+ return { defaultValue: data.default_value };
110
+ };
111
+ var unmarshalVersionAvailableSettingFloatProperty = (data) => {
112
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VersionAvailableSettingFloatProperty' failed as data isn't a dictionary.`);
113
+ return {
114
+ defaultValue: data.default_value,
115
+ max: data.max,
116
+ min: data.min,
117
+ unit: data.unit
118
+ };
119
+ };
120
+ var unmarshalVersionAvailableSettingIntegerProperty = (data) => {
121
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VersionAvailableSettingIntegerProperty' failed as data isn't a dictionary.`);
122
+ return {
123
+ defaultValue: data.default_value,
124
+ max: data.max,
125
+ min: data.min,
126
+ unit: data.unit
127
+ };
128
+ };
129
+ var unmarshalVersionAvailableSettingStringProperty = (data) => {
130
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VersionAvailableSettingStringProperty' failed as data isn't a dictionary.`);
131
+ return {
132
+ defaultValue: data.default_value,
133
+ stringConstraint: data.string_constraint
134
+ };
135
+ };
136
+ var unmarshalVersionAvailableSetting = (data) => {
137
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VersionAvailableSetting' failed as data isn't a dictionary.`);
138
+ return {
139
+ boolProperty: data.bool_property ? unmarshalVersionAvailableSettingBooleanProperty(data.bool_property) : void 0,
140
+ description: data.description,
141
+ floatProperty: data.float_property ? unmarshalVersionAvailableSettingFloatProperty(data.float_property) : void 0,
142
+ hotConfigurable: data.hot_configurable,
143
+ intProperty: data.int_property ? unmarshalVersionAvailableSettingIntegerProperty(data.int_property) : void 0,
144
+ name: data.name,
145
+ stringProperty: data.string_property ? unmarshalVersionAvailableSettingStringProperty(data.string_property) : void 0
146
+ };
147
+ };
148
+ var unmarshalVersion = (data) => {
149
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
150
+ return {
151
+ availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalVersionAvailableSetting),
152
+ endOfLifeAt: unmarshalDate(data.end_of_life_at),
153
+ version: data.version
154
+ };
233
155
  };
234
156
  const unmarshalListVersionsResponse = (data) => {
235
- if (!isJSONObject(data)) {
236
- throw new TypeError(
237
- `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
238
- );
239
- }
240
- return {
241
- totalCount: data.total_count,
242
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
243
- };
244
- };
245
- const marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({
246
- private_network_id: request.privateNetworkId
247
- });
248
- const marshalEndpointSpecPublicDetails = (request, defaults) => ({});
249
- const marshalCreateClusterRequestVolumeSpec = (request, defaults) => ({
250
- size_bytes: request.sizeBytes,
251
- type: request.type
252
- });
253
- const marshalEndpointSpec = (request, defaults) => ({
254
- ...resolveOneOf([
255
- {
256
- param: "public_network",
257
- value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicDetails(request.publicNetwork) : void 0
258
- },
259
- {
260
- param: "private_network",
261
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork) : void 0
262
- }
263
- ])
157
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
158
+ return {
159
+ totalCount: data.total_count,
160
+ versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
161
+ };
162
+ };
163
+ var marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({ private_network_id: request.privateNetworkId });
164
+ var marshalEndpointSpecPublicDetails = (request, defaults) => ({});
165
+ var marshalCreateClusterRequestVolumeSpec = (request, defaults) => ({
166
+ size_bytes: request.sizeBytes,
167
+ type: request.type
264
168
  });
169
+ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
170
+ param: "public_network",
171
+ value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicDetails(request.publicNetwork, defaults) : void 0
172
+ }, {
173
+ param: "private_network",
174
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
175
+ }]) });
265
176
  const marshalCreateClusterRequest = (request, defaults) => ({
266
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
267
- name: request.name || randomName("kafk"),
268
- node_amount: request.nodeAmount,
269
- node_type: request.nodeType,
270
- password: request.password,
271
- project_id: request.projectId ?? defaults.defaultProjectId,
272
- tags: request.tags,
273
- user_name: request.userName,
274
- version: request.version,
275
- volume: request.volume !== void 0 ? marshalCreateClusterRequestVolumeSpec(request.volume) : void 0
177
+ endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
178
+ name: request.name || randomName("kafk"),
179
+ node_amount: request.nodeAmount,
180
+ node_type: request.nodeType,
181
+ password: request.password,
182
+ project_id: request.projectId ?? defaults.defaultProjectId,
183
+ tags: request.tags,
184
+ user_name: request.userName,
185
+ version: request.version,
186
+ volume: request.volume !== void 0 ? marshalCreateClusterRequestVolumeSpec(request.volume, defaults) : void 0
276
187
  });
277
188
  const marshalCreateEndpointRequest = (request, defaults) => ({
278
- cluster_id: request.clusterId,
279
- endpoint: marshalEndpointSpec(request.endpoint)
189
+ cluster_id: request.clusterId,
190
+ endpoint: marshalEndpointSpec(request.endpoint, defaults)
280
191
  });
281
192
  const marshalUpdateClusterRequest = (request, defaults) => ({
282
- name: request.name,
283
- tags: request.tags
284
- });
285
- const marshalUpdateUserRequest = (request, defaults) => ({
286
- password: request.password
193
+ name: request.name,
194
+ tags: request.tags
287
195
  });
288
- export {
289
- marshalCreateClusterRequest,
290
- marshalCreateEndpointRequest,
291
- marshalUpdateClusterRequest,
292
- marshalUpdateUserRequest,
293
- unmarshalCluster,
294
- unmarshalEndpoint,
295
- unmarshalListClustersResponse,
296
- unmarshalListNodeTypesResponse,
297
- unmarshalListUsersResponse,
298
- unmarshalListVersionsResponse,
299
- unmarshalUser
300
- };
196
+ const marshalUpdateUserRequest = (request, defaults) => ({ password: request.password });
197
+ export { marshalCreateClusterRequest, marshalCreateEndpointRequest, marshalUpdateClusterRequest, marshalUpdateUserRequest, unmarshalCluster, unmarshalEndpoint, unmarshalListClustersResponse, unmarshalListNodeTypesResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser };
@@ -1,104 +1,92 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
+ CreateClusterRequest: () => CreateClusterRequest,
4
+ ListClustersRequest: () => ListClustersRequest,
5
+ ListNodeTypesRequest: () => ListNodeTypesRequest,
6
+ ListUsersRequest: () => ListUsersRequest,
7
+ ListVersionsRequest: () => ListVersionsRequest,
8
+ UpdateClusterRequest: () => UpdateClusterRequest,
9
+ UpdateUserRequest: () => UpdateUserRequest
10
+ });
1
11
  const CreateClusterRequest = {
2
- name: {
3
- maxLength: 255,
4
- minLength: 1,
5
- pattern: /^[A-Za-z0-9\-_]+$/
6
- },
7
- nodeAmount: {
8
- greaterThanOrEqual: 1,
9
- lessThanOrEqual: 30
10
- },
11
- nodeType: {
12
- maxLength: 128,
13
- minLength: 1,
14
- pattern: /^[A-Za-z0-9\-_]+$/
15
- },
16
- password: {
17
- maxLength: 128,
18
- minLength: 12
19
- },
20
- userName: {
21
- maxLength: 63,
22
- minLength: 1,
23
- pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
24
- },
25
- version: {
26
- pattern: /^[0-9]+\.[0-9]+\.[0-9]+$/
27
- }
12
+ name: {
13
+ maxLength: 255,
14
+ minLength: 1,
15
+ pattern: /^[A-Za-z0-9\-_]+$/
16
+ },
17
+ nodeAmount: {
18
+ greaterThanOrEqual: 1,
19
+ lessThanOrEqual: 30
20
+ },
21
+ nodeType: {
22
+ maxLength: 128,
23
+ minLength: 1,
24
+ pattern: /^[A-Za-z0-9\-_]+$/
25
+ },
26
+ password: {
27
+ maxLength: 128,
28
+ minLength: 12
29
+ },
30
+ userName: {
31
+ maxLength: 63,
32
+ minLength: 1,
33
+ pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
34
+ },
35
+ version: { pattern: /^[0-9]+\.[0-9]+\.[0-9]+$/ }
28
36
  };
29
37
  const ListClustersRequest = {
30
- name: {
31
- maxLength: 255,
32
- minLength: 1,
33
- pattern: /^[A-Za-z0-9\-_]+$/
34
- },
35
- page: {
36
- greaterThanOrEqual: 1
37
- },
38
- pageSize: {
39
- greaterThanOrEqual: 1,
40
- lessThanOrEqual: 100
41
- }
38
+ name: {
39
+ maxLength: 255,
40
+ minLength: 1,
41
+ pattern: /^[A-Za-z0-9\-_]+$/
42
+ },
43
+ page: { greaterThanOrEqual: 1 },
44
+ pageSize: {
45
+ greaterThanOrEqual: 1,
46
+ lessThanOrEqual: 100
47
+ }
42
48
  };
43
49
  const ListNodeTypesRequest = {
44
- page: {
45
- greaterThanOrEqual: 1
46
- },
47
- pageSize: {
48
- greaterThanOrEqual: 1,
49
- lessThanOrEqual: 100
50
- }
50
+ page: { greaterThanOrEqual: 1 },
51
+ pageSize: {
52
+ greaterThanOrEqual: 1,
53
+ lessThanOrEqual: 100
54
+ }
51
55
  };
52
56
  const ListUsersRequest = {
53
- name: {
54
- maxLength: 63,
55
- minLength: 1,
56
- pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
57
- },
58
- page: {
59
- greaterThanOrEqual: 1
60
- },
61
- pageSize: {
62
- greaterThanOrEqual: 1,
63
- lessThanOrEqual: 100
64
- }
57
+ name: {
58
+ maxLength: 63,
59
+ minLength: 1,
60
+ pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
61
+ },
62
+ page: { greaterThanOrEqual: 1 },
63
+ pageSize: {
64
+ greaterThanOrEqual: 1,
65
+ lessThanOrEqual: 100
66
+ }
65
67
  };
66
68
  const ListVersionsRequest = {
67
- page: {
68
- greaterThanOrEqual: 1
69
- },
70
- pageSize: {
71
- greaterThanOrEqual: 1,
72
- lessThanOrEqual: 100
73
- },
74
- version: {
75
- pattern: /^[0-9]+\.[0-9]+\.[0-9]+$/
76
- }
77
- };
78
- const UpdateClusterRequest = {
79
- name: {
80
- maxLength: 255,
81
- minLength: 1,
82
- pattern: /^[A-Za-z0-9\-_]+$/
83
- }
69
+ page: { greaterThanOrEqual: 1 },
70
+ pageSize: {
71
+ greaterThanOrEqual: 1,
72
+ lessThanOrEqual: 100
73
+ },
74
+ version: { pattern: /^[0-9]+\.[0-9]+\.[0-9]+$/ }
84
75
  };
76
+ const UpdateClusterRequest = { name: {
77
+ maxLength: 255,
78
+ minLength: 1,
79
+ pattern: /^[A-Za-z0-9\-_]+$/
80
+ } };
85
81
  const UpdateUserRequest = {
86
- password: {
87
- maxLength: 128,
88
- minLength: 8
89
- },
90
- username: {
91
- maxLength: 63,
92
- minLength: 1,
93
- pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
94
- }
95
- };
96
- export {
97
- CreateClusterRequest,
98
- ListClustersRequest,
99
- ListNodeTypesRequest,
100
- ListUsersRequest,
101
- ListVersionsRequest,
102
- UpdateClusterRequest,
103
- UpdateUserRequest
82
+ password: {
83
+ maxLength: 128,
84
+ minLength: 8
85
+ },
86
+ username: {
87
+ maxLength: 63,
88
+ minLength: 1,
89
+ pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/
90
+ }
104
91
  };
92
+ export { validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-kafka",
3
- "version": "2.2.1",
3
+ "version": "2.3.1",
4
4
  "description": "Scaleway SDK kafka",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.1"
30
+ "@scaleway/sdk-std": "2.2.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.1"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",