@scaleway/sdk-searchdb 1.1.0 → 1.2.0

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 Searchdb.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 Searchdbv1alpha1
4
- };
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as Searchdbv1alpha1 };
@@ -1,6 +1,6 @@
1
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
2
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
3
- import type { CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, Endpoint, GetDeploymentRequest, ListDeploymentsRequest, ListDeploymentsResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, UpdateDeploymentRequest, UpdateUserRequest, UpgradeDeploymentRequest, User } from './types.gen.js';
3
+ import type { CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, Endpoint, GetDeploymentCertificateAuthorityRequest, GetDeploymentRequest, ListDeploymentsRequest, ListDeploymentsResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, UpdateDeploymentRequest, UpdateUserRequest, UpgradeDeploymentRequest, User } from './types.gen.js';
4
4
  /**
5
5
  * Cloud Essentials for Opensearch API.
6
6
 
@@ -132,4 +132,5 @@ export declare class API extends ParentAPI {
132
132
  * @param request - The request {@link DeleteUserRequest}
133
133
  */
134
134
  deleteUser: (request: Readonly<DeleteUserRequest>) => Promise<void>;
135
+ getDeploymentCertificateAuthority: (request: Readonly<GetDeploymentCertificateAuthorityRequest>) => Promise<Blob>;
135
136
  }
@@ -1,274 +1,189 @@
1
- import { API as API$1, toApiLocality, validatePathParam, waitForResource, urlParams, enrichForPagination } from "@scaleway/sdk-client";
2
1
  import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { marshalCreateDeploymentRequest, unmarshalDeployment, marshalUpdateDeploymentRequest, marshalUpgradeDeploymentRequest, unmarshalListDeploymentsResponse, unmarshalListVersionsResponse, unmarshalListNodeTypesResponse, marshalCreateEndpointRequest, unmarshalEndpoint, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest } 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: ["fr-par"]
14
- });
15
- /**
16
- * Create a new Cloud Essentials for OpenSearch deployment.
17
- *
18
- * @param request - The request {@link CreateDeploymentRequest}
19
- * @returns A Promise of Deployment
20
- */
21
- createDeployment = (request) => this.client.fetch(
22
- {
23
- body: JSON.stringify(
24
- marshalCreateDeploymentRequest(request, this.client.settings)
25
- ),
26
- headers: jsonContentHeaders,
27
- method: "POST",
28
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`
29
- },
30
- unmarshalDeployment
31
- );
32
- /**
33
- * Update a Cloud Essentials for OpenSearch deployment.
34
- *
35
- * @param request - The request {@link UpdateDeploymentRequest}
36
- * @returns A Promise of Deployment
37
- */
38
- updateDeployment = (request) => this.client.fetch(
39
- {
40
- body: JSON.stringify(
41
- marshalUpdateDeploymentRequest(request, this.client.settings)
42
- ),
43
- headers: jsonContentHeaders,
44
- method: "PATCH",
45
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
46
- },
47
- unmarshalDeployment
48
- );
49
- /**
50
- * Upgrade a Cloud Essentials for OpenSearch deployment.
51
- *
52
- * @param request - The request {@link UpgradeDeploymentRequest}
53
- * @returns A Promise of Deployment
54
- */
55
- upgradeDeployment = (request) => this.client.fetch(
56
- {
57
- body: JSON.stringify(
58
- marshalUpgradeDeploymentRequest(request, this.client.settings)
59
- ),
60
- headers: jsonContentHeaders,
61
- method: "POST",
62
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/upgrade`
63
- },
64
- unmarshalDeployment
65
- );
66
- /**
67
- * Retrieve a specific Cloud Essentials for OpenSearch deployment.
68
- *
69
- * @param request - The request {@link GetDeploymentRequest}
70
- * @returns A Promise of Deployment
71
- */
72
- getDeployment = (request) => this.client.fetch(
73
- {
74
- method: "GET",
75
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
76
- },
77
- unmarshalDeployment
78
- );
79
- /**
80
- * Waits for {@link Deployment} to be in a final state.
81
- *
82
- * @param request - The request {@link GetDeploymentRequest}
83
- * @param options - The waiting options
84
- * @returns A Promise of Deployment
85
- */
86
- waitForDeployment = (request, options) => waitForResource(
87
- options?.stop ?? ((res) => Promise.resolve(
88
- !DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status)
89
- )),
90
- this.getDeployment,
91
- request,
92
- options
93
- );
94
- /**
95
- * Delete a Cloud Essentials for OpenSearch deployment.
96
- *
97
- * @param request - The request {@link DeleteDeploymentRequest}
98
- * @returns A Promise of Deployment
99
- */
100
- deleteDeployment = (request) => this.client.fetch(
101
- {
102
- method: "DELETE",
103
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
104
- },
105
- unmarshalDeployment
106
- );
107
- pageOfListDeployments = (request = {}) => this.client.fetch(
108
- {
109
- method: "GET",
110
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`,
111
- urlParams: urlParams(
112
- ["name", request.name],
113
- ["order_by", request.orderBy],
114
- ["organization_id", request.organizationId],
115
- ["page", request.page],
116
- [
117
- "page_size",
118
- request.pageSize ?? this.client.settings.defaultPageSize
119
- ],
120
- ["project_id", request.projectId],
121
- ["tags", request.tags],
122
- ["version", request.version]
123
- )
124
- },
125
- unmarshalListDeploymentsResponse
126
- );
127
- /**
128
- * Retrieve a list of Cloud Essentials for OpenSearch deployments.
129
- *
130
- * @param request - The request {@link ListDeploymentsRequest}
131
- * @returns A Promise of ListDeploymentsResponse
132
- */
133
- listDeployments = (request = {}) => enrichForPagination("deployments", this.pageOfListDeployments, request);
134
- pageOfListVersions = (request = {}) => this.client.fetch(
135
- {
136
- method: "GET",
137
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
138
- urlParams: urlParams(
139
- ["order_by", request.orderBy],
140
- ["page", request.page],
141
- [
142
- "page_size",
143
- request.pageSize ?? this.client.settings.defaultPageSize
144
- ],
145
- ["version", request.version]
146
- )
147
- },
148
- unmarshalListVersionsResponse
149
- );
150
- /**
151
- * List available Cloud Essentials for OpenSearch versions.
152
- *
153
- * @param request - The request {@link ListVersionsRequest}
154
- * @returns A Promise of ListVersionsResponse
155
- */
156
- listVersions = (request = {}) => enrichForPagination("versions", this.pageOfListVersions, request);
157
- pageOfListNodeTypes = (request = {}) => this.client.fetch(
158
- {
159
- method: "GET",
160
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
161
- urlParams: urlParams(
162
- ["order_by", request.orderBy],
163
- ["page", request.page],
164
- [
165
- "page_size",
166
- request.pageSize ?? this.client.settings.defaultPageSize
167
- ]
168
- )
169
- },
170
- unmarshalListNodeTypesResponse
171
- );
172
- /**
173
- * Retrieve a list of available node types.
174
- *
175
- * @param request - The request {@link ListNodeTypesRequest}
176
- * @returns A Promise of ListNodeTypesResponse
177
- */
178
- listNodeTypes = (request = {}) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
179
- /**
180
- * Create a new endpoint on a deployment.
181
- *
182
- * @param request - The request {@link CreateEndpointRequest}
183
- * @returns A Promise of Endpoint
184
- */
185
- createEndpoint = (request) => this.client.fetch(
186
- {
187
- body: JSON.stringify(
188
- marshalCreateEndpointRequest(request, this.client.settings)
189
- ),
190
- headers: jsonContentHeaders,
191
- method: "POST",
192
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
193
- },
194
- unmarshalEndpoint
195
- );
196
- /**
197
- * Delete an existing endpoint.
198
- *
199
- * @param request - The request {@link DeleteEndpointRequest}
200
- */
201
- deleteEndpoint = (request) => this.client.fetch({
202
- method: "DELETE",
203
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
204
- });
205
- pageOfListUsers = (request) => this.client.fetch(
206
- {
207
- method: "GET",
208
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`,
209
- urlParams: urlParams(
210
- ["name", request.name],
211
- ["order_by", request.orderBy],
212
- ["page", request.page],
213
- [
214
- "page_size",
215
- request.pageSize ?? this.client.settings.defaultPageSize
216
- ]
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
- * Create a new user.
230
- *
231
- * @param request - The request {@link CreateUserRequest}
232
- * @returns A Promise of User
233
- */
234
- createUser = (request) => this.client.fetch(
235
- {
236
- body: JSON.stringify(
237
- marshalCreateUserRequest(request, this.client.settings)
238
- ),
239
- headers: jsonContentHeaders,
240
- method: "POST",
241
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`
242
- },
243
- unmarshalUser
244
- );
245
- /**
246
- * Update an existing user.
247
- *
248
- * @param request - The request {@link UpdateUserRequest}
249
- * @returns A Promise of User
250
- */
251
- updateUser = (request) => this.client.fetch(
252
- {
253
- body: JSON.stringify(
254
- marshalUpdateUserRequest(request, this.client.settings)
255
- ),
256
- headers: jsonContentHeaders,
257
- method: "PATCH",
258
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("username", request.username)}`
259
- },
260
- unmarshalUser
261
- );
262
- /**
263
- * Delete an existing user.
264
- *
265
- * @param request - The request {@link DeleteUserRequest}
266
- */
267
- deleteUser = (request) => this.client.fetch({
268
- method: "DELETE",
269
- path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("username", request.username)}`
270
- });
271
- }
272
- export {
273
- API
2
+ import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, marshalUpgradeDeploymentRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, 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
+ * Cloud Essentials for Opensearch API.
7
+
8
+ The Cloud Essentials for Opensearch API allows you to manage your Opensearch resources.
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
+ /**
17
+ * Create a new Cloud Essentials for OpenSearch deployment.
18
+ *
19
+ * @param request - The request {@link CreateDeploymentRequest}
20
+ * @returns A Promise of Deployment
21
+ */
22
+ createDeployment = (request) => this.client.fetch({
23
+ body: JSON.stringify(marshalCreateDeploymentRequest(request, this.client.settings)),
24
+ headers: jsonContentHeaders,
25
+ method: "POST",
26
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`
27
+ }, unmarshalDeployment);
28
+ /**
29
+ * Update a Cloud Essentials for OpenSearch deployment.
30
+ *
31
+ * @param request - The request {@link UpdateDeploymentRequest}
32
+ * @returns A Promise of Deployment
33
+ */
34
+ updateDeployment = (request) => this.client.fetch({
35
+ body: JSON.stringify(marshalUpdateDeploymentRequest(request, this.client.settings)),
36
+ headers: jsonContentHeaders,
37
+ method: "PATCH",
38
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
39
+ }, unmarshalDeployment);
40
+ /**
41
+ * Upgrade a Cloud Essentials for OpenSearch deployment.
42
+ *
43
+ * @param request - The request {@link UpgradeDeploymentRequest}
44
+ * @returns A Promise of Deployment
45
+ */
46
+ upgradeDeployment = (request) => this.client.fetch({
47
+ body: JSON.stringify(marshalUpgradeDeploymentRequest(request, this.client.settings)),
48
+ headers: jsonContentHeaders,
49
+ method: "POST",
50
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/upgrade`
51
+ }, unmarshalDeployment);
52
+ /**
53
+ * Retrieve a specific Cloud Essentials for OpenSearch deployment.
54
+ *
55
+ * @param request - The request {@link GetDeploymentRequest}
56
+ * @returns A Promise of Deployment
57
+ */
58
+ getDeployment = (request) => this.client.fetch({
59
+ method: "GET",
60
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
61
+ }, unmarshalDeployment);
62
+ /**
63
+ * Waits for {@link Deployment} to be in a final state.
64
+ *
65
+ * @param request - The request {@link GetDeploymentRequest}
66
+ * @param options - The waiting options
67
+ * @returns A Promise of Deployment
68
+ */
69
+ waitForDeployment = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status))), this.getDeployment, request, options);
70
+ /**
71
+ * Delete a Cloud Essentials for OpenSearch deployment.
72
+ *
73
+ * @param request - The request {@link DeleteDeploymentRequest}
74
+ * @returns A Promise of Deployment
75
+ */
76
+ deleteDeployment = (request) => this.client.fetch({
77
+ method: "DELETE",
78
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
79
+ }, unmarshalDeployment);
80
+ pageOfListDeployments = (request = {}) => this.client.fetch({
81
+ method: "GET",
82
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`,
83
+ 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], ["version", request.version])
84
+ }, unmarshalListDeploymentsResponse);
85
+ /**
86
+ * Retrieve a list of Cloud Essentials for OpenSearch deployments.
87
+ *
88
+ * @param request - The request {@link ListDeploymentsRequest}
89
+ * @returns A Promise of ListDeploymentsResponse
90
+ */
91
+ listDeployments = (request = {}) => enrichForPagination("deployments", this.pageOfListDeployments, request);
92
+ pageOfListVersions = (request = {}) => this.client.fetch({
93
+ method: "GET",
94
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
95
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["version", request.version])
96
+ }, unmarshalListVersionsResponse);
97
+ /**
98
+ * List available Cloud Essentials for OpenSearch versions.
99
+ *
100
+ * @param request - The request {@link ListVersionsRequest}
101
+ * @returns A Promise of ListVersionsResponse
102
+ */
103
+ listVersions = (request = {}) => enrichForPagination("versions", this.pageOfListVersions, request);
104
+ pageOfListNodeTypes = (request = {}) => this.client.fetch({
105
+ method: "GET",
106
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
107
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
108
+ }, unmarshalListNodeTypesResponse);
109
+ /**
110
+ * Retrieve a list of available node types.
111
+ *
112
+ * @param request - The request {@link ListNodeTypesRequest}
113
+ * @returns A Promise of ListNodeTypesResponse
114
+ */
115
+ listNodeTypes = (request = {}) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
116
+ /**
117
+ * Create a new endpoint on a deployment.
118
+ *
119
+ * @param request - The request {@link CreateEndpointRequest}
120
+ * @returns A Promise of Endpoint
121
+ */
122
+ createEndpoint = (request) => this.client.fetch({
123
+ body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
124
+ headers: jsonContentHeaders,
125
+ method: "POST",
126
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
127
+ }, unmarshalEndpoint);
128
+ /**
129
+ * Delete an existing endpoint.
130
+ *
131
+ * @param request - The request {@link DeleteEndpointRequest}
132
+ */
133
+ deleteEndpoint = (request) => this.client.fetch({
134
+ method: "DELETE",
135
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
136
+ });
137
+ pageOfListUsers = (request) => this.client.fetch({
138
+ method: "GET",
139
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`,
140
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
141
+ }, unmarshalListUsersResponse);
142
+ /**
143
+ * Retrieve a list of deployment users.
144
+ *
145
+ * @param request - The request {@link ListUsersRequest}
146
+ * @returns A Promise of ListUsersResponse
147
+ */
148
+ listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
149
+ /**
150
+ * Create a new user.
151
+ *
152
+ * @param request - The request {@link CreateUserRequest}
153
+ * @returns A Promise of User
154
+ */
155
+ createUser = (request) => this.client.fetch({
156
+ body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
157
+ headers: jsonContentHeaders,
158
+ method: "POST",
159
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`
160
+ }, unmarshalUser);
161
+ /**
162
+ * Update an existing user.
163
+ *
164
+ * @param request - The request {@link UpdateUserRequest}
165
+ * @returns A Promise of User
166
+ */
167
+ updateUser = (request) => this.client.fetch({
168
+ body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
169
+ headers: jsonContentHeaders,
170
+ method: "PATCH",
171
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("username", request.username)}`
172
+ }, unmarshalUser);
173
+ /**
174
+ * Delete an existing user.
175
+ *
176
+ * @param request - The request {@link DeleteUserRequest}
177
+ */
178
+ deleteUser = (request) => this.client.fetch({
179
+ method: "DELETE",
180
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("username", request.username)}`
181
+ });
182
+ getDeploymentCertificateAuthority = (request) => this.client.fetch({
183
+ method: "GET",
184
+ path: `/searchdb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate-authority`,
185
+ urlParams: urlParams(["dl", 1]),
186
+ responseType: "blob"
187
+ });
274
188
  };
189
+ export { API$1 as API };
@@ -1,11 +1,10 @@
1
+ /** Lists transient statutes of the enum {@link DeploymentStatus}. */
1
2
  const DEPLOYMENT_TRANSIENT_STATUSES = [
2
- "creating",
3
- "initializing",
4
- "upgrading",
5
- "deleting",
6
- "locking",
7
- "unlocking"
3
+ "creating",
4
+ "initializing",
5
+ "upgrading",
6
+ "deleting",
7
+ "locking",
8
+ "unlocking"
8
9
  ];
9
- export {
10
- DEPLOYMENT_TRANSIENT_STATUSES
11
- };
10
+ export { DEPLOYMENT_TRANSIENT_STATUSES };
@@ -1,5 +1,5 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
- export type { CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointService, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetDeploymentRequest, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListNodeTypesRequest, ListNodeTypesRequestOrderBy, ListNodeTypesResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsRequestOrderBy, ListVersionsResponse, NodeType, NodeTypeStockStatus, NodeTypeVolumeType, UpdateDeploymentRequest, UpdateUserRequest, UpgradeDeploymentRequest, User, Version, Volume, VolumeType, } from './types.gen.js';
4
+ export type { CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointService, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetDeploymentCertificateAuthorityRequest, GetDeploymentRequest, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListNodeTypesRequest, ListNodeTypesRequestOrderBy, ListNodeTypesResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsRequestOrderBy, ListVersionsResponse, NodeType, NodeTypeStockStatus, NodeTypeVolumeType, UpdateDeploymentRequest, UpdateUserRequest, UpgradeDeploymentRequest, User, Version, Volume, VolumeType, } from './types.gen.js';
5
5
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,22 +1,24 @@
1
- import { API } from "./api.gen.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, marshalUpgradeDeploymentRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListNodeTypesResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser } from "./marshalling.gen.js";
4
- import * as validationRules_gen from "./validation-rules.gen.js";
5
- export {
6
- API,
7
- DEPLOYMENT_TRANSIENT_STATUSES,
8
- validationRules_gen as ValidationRules,
9
- marshalCreateDeploymentRequest,
10
- marshalCreateEndpointRequest,
11
- marshalCreateUserRequest,
12
- marshalUpdateDeploymentRequest,
13
- marshalUpdateUserRequest,
14
- marshalUpgradeDeploymentRequest,
15
- unmarshalDeployment,
16
- unmarshalEndpoint,
17
- unmarshalListDeploymentsResponse,
18
- unmarshalListNodeTypesResponse,
19
- unmarshalListUsersResponse,
20
- unmarshalListVersionsResponse,
21
- unmarshalUser
22
- };
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
+ DEPLOYMENT_TRANSIENT_STATUSES: () => DEPLOYMENT_TRANSIENT_STATUSES,
9
+ ValidationRules: () => validation_rules_gen_exports,
10
+ marshalCreateDeploymentRequest: () => marshalCreateDeploymentRequest,
11
+ marshalCreateEndpointRequest: () => marshalCreateEndpointRequest,
12
+ marshalCreateUserRequest: () => marshalCreateUserRequest,
13
+ marshalUpdateDeploymentRequest: () => marshalUpdateDeploymentRequest,
14
+ marshalUpdateUserRequest: () => marshalUpdateUserRequest,
15
+ marshalUpgradeDeploymentRequest: () => marshalUpgradeDeploymentRequest,
16
+ unmarshalDeployment: () => unmarshalDeployment,
17
+ unmarshalEndpoint: () => unmarshalEndpoint,
18
+ unmarshalListDeploymentsResponse: () => unmarshalListDeploymentsResponse,
19
+ unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
20
+ unmarshalListUsersResponse: () => unmarshalListUsersResponse,
21
+ unmarshalListVersionsResponse: () => unmarshalListVersionsResponse,
22
+ unmarshalUser: () => unmarshalUser
23
+ });
24
+ export { index_gen_exports };
@@ -1,251 +1,164 @@
1
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
2
- const unmarshalEndpointPrivateNetworkDetails = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- privateNetworkId: data.private_network_id
10
- };
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
+ var unmarshalEndpointPrivateNetworkDetails = (data) => {
3
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
4
+ return { privateNetworkId: data.private_network_id };
11
5
  };
12
- const unmarshalEndpointPublicDetails = (data) => {
13
- if (!isJSONObject(data)) {
14
- throw new TypeError(
15
- `Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`
16
- );
17
- }
18
- return {};
6
+ var unmarshalEndpointPublicDetails = (data) => {
7
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`);
8
+ return {};
19
9
  };
20
- const unmarshalEndpointService = (data) => {
21
- if (!isJSONObject(data)) {
22
- throw new TypeError(
23
- `Unmarshalling the type 'EndpointService' failed as data isn't a dictionary.`
24
- );
25
- }
26
- return {
27
- name: data.name,
28
- port: data.port,
29
- url: data.url
30
- };
10
+ var unmarshalEndpointService = (data) => {
11
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointService' failed as data isn't a dictionary.`);
12
+ return {
13
+ name: data.name,
14
+ port: data.port,
15
+ url: data.url
16
+ };
31
17
  };
32
18
  const unmarshalEndpoint = (data) => {
33
- if (!isJSONObject(data)) {
34
- throw new TypeError(
35
- `Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`
36
- );
37
- }
38
- return {
39
- dnsRecord: data.dns_record,
40
- id: data.id,
41
- privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
42
- public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0,
43
- services: unmarshalArrayOfObject(data.services, unmarshalEndpointService)
44
- };
19
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
20
+ return {
21
+ dnsRecord: data.dns_record,
22
+ id: data.id,
23
+ privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
24
+ public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0,
25
+ services: unmarshalArrayOfObject(data.services, unmarshalEndpointService)
26
+ };
45
27
  };
46
- const unmarshalVolume = (data) => {
47
- if (!isJSONObject(data)) {
48
- throw new TypeError(
49
- `Unmarshalling the type 'Volume' failed as data isn't a dictionary.`
50
- );
51
- }
52
- return {
53
- sizeBytes: data.size_bytes,
54
- type: data.type
55
- };
28
+ var unmarshalVolume = (data) => {
29
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
30
+ return {
31
+ sizeBytes: data.size_bytes,
32
+ type: data.type
33
+ };
56
34
  };
57
35
  const unmarshalDeployment = (data) => {
58
- if (!isJSONObject(data)) {
59
- throw new TypeError(
60
- `Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`
61
- );
62
- }
63
- return {
64
- createdAt: unmarshalDate(data.created_at),
65
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
66
- id: data.id,
67
- name: data.name,
68
- nodeAmount: data.node_amount,
69
- nodeType: data.node_type,
70
- organizationId: data.organization_id,
71
- projectId: data.project_id,
72
- region: data.region,
73
- status: data.status,
74
- tags: data.tags,
75
- updatedAt: unmarshalDate(data.updated_at),
76
- version: data.version,
77
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
78
- };
36
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`);
37
+ return {
38
+ createdAt: unmarshalDate(data.created_at),
39
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
40
+ id: data.id,
41
+ name: data.name,
42
+ nodeAmount: data.node_amount,
43
+ nodeType: data.node_type,
44
+ organizationId: data.organization_id,
45
+ projectId: data.project_id,
46
+ region: data.region,
47
+ status: data.status,
48
+ tags: data.tags,
49
+ updatedAt: unmarshalDate(data.updated_at),
50
+ version: data.version,
51
+ volume: data.volume ? unmarshalVolume(data.volume) : void 0
52
+ };
79
53
  };
80
54
  const unmarshalUser = (data) => {
81
- if (!isJSONObject(data)) {
82
- throw new TypeError(
83
- `Unmarshalling the type 'User' failed as data isn't a dictionary.`
84
- );
85
- }
86
- return {
87
- username: data.username
88
- };
55
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
56
+ return { username: data.username };
89
57
  };
90
58
  const unmarshalListDeploymentsResponse = (data) => {
91
- if (!isJSONObject(data)) {
92
- throw new TypeError(
93
- `Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`
94
- );
95
- }
96
- return {
97
- deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
98
- totalCount: data.total_count
99
- };
59
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`);
60
+ return {
61
+ deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
62
+ totalCount: data.total_count
63
+ };
100
64
  };
101
- const unmarshalNodeTypeVolumeType = (data) => {
102
- if (!isJSONObject(data)) {
103
- throw new TypeError(
104
- `Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`
105
- );
106
- }
107
- return {
108
- chunkSizeBytes: data.chunk_size_bytes,
109
- description: data.description,
110
- maxSizeBytes: data.max_size_bytes,
111
- minSizeBytes: data.min_size_bytes,
112
- type: data.type
113
- };
65
+ var unmarshalNodeTypeVolumeType = (data) => {
66
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
67
+ return {
68
+ chunkSizeBytes: data.chunk_size_bytes,
69
+ description: data.description,
70
+ maxSizeBytes: data.max_size_bytes,
71
+ minSizeBytes: data.min_size_bytes,
72
+ type: data.type
73
+ };
114
74
  };
115
- const unmarshalNodeType = (data) => {
116
- if (!isJSONObject(data)) {
117
- throw new TypeError(
118
- `Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`
119
- );
120
- }
121
- return {
122
- availableVolumeTypes: unmarshalArrayOfObject(
123
- data.available_volume_types,
124
- unmarshalNodeTypeVolumeType
125
- ),
126
- beta: data.beta,
127
- description: data.description,
128
- disabled: data.disabled,
129
- instanceRange: data.instance_range,
130
- memoryBytes: data.memory_bytes,
131
- name: data.name,
132
- stockStatus: data.stock_status,
133
- vcpus: data.vcpus
134
- };
75
+ var unmarshalNodeType = (data) => {
76
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
77
+ return {
78
+ availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
79
+ beta: data.beta,
80
+ description: data.description,
81
+ disabled: data.disabled,
82
+ instanceRange: data.instance_range,
83
+ memoryBytes: data.memory_bytes,
84
+ name: data.name,
85
+ stockStatus: data.stock_status,
86
+ vcpus: data.vcpus
87
+ };
135
88
  };
136
89
  const unmarshalListNodeTypesResponse = (data) => {
137
- if (!isJSONObject(data)) {
138
- throw new TypeError(
139
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
140
- );
141
- }
142
- return {
143
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
144
- totalCount: data.total_count
145
- };
90
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
91
+ return {
92
+ nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
93
+ totalCount: data.total_count
94
+ };
146
95
  };
147
96
  const unmarshalListUsersResponse = (data) => {
148
- if (!isJSONObject(data)) {
149
- throw new TypeError(
150
- `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`
151
- );
152
- }
153
- return {
154
- totalCount: data.total_count,
155
- users: unmarshalArrayOfObject(data.users, unmarshalUser)
156
- };
97
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
98
+ return {
99
+ totalCount: data.total_count,
100
+ users: unmarshalArrayOfObject(data.users, unmarshalUser)
101
+ };
157
102
  };
158
- const unmarshalVersion = (data) => {
159
- if (!isJSONObject(data)) {
160
- throw new TypeError(
161
- `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
162
- );
163
- }
164
- return {
165
- beta: data.beta,
166
- disabled: data.disabled,
167
- endOfLife: unmarshalDate(data.end_of_life),
168
- version: data.version
169
- };
103
+ var unmarshalVersion = (data) => {
104
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
105
+ return {
106
+ beta: data.beta,
107
+ disabled: data.disabled,
108
+ endOfLife: unmarshalDate(data.end_of_life),
109
+ version: data.version
110
+ };
170
111
  };
171
112
  const unmarshalListVersionsResponse = (data) => {
172
- if (!isJSONObject(data)) {
173
- throw new TypeError(
174
- `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
175
- );
176
- }
177
- return {
178
- totalCount: data.total_count,
179
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
180
- };
113
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
114
+ return {
115
+ totalCount: data.total_count,
116
+ versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
117
+ };
181
118
  };
182
- const marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({
183
- private_network_id: request.privateNetworkId
184
- });
185
- const marshalEndpointSpecPublicDetails = (request, defaults) => ({});
186
- const marshalEndpointSpec = (request, defaults) => ({
187
- ...resolveOneOf([
188
- {
189
- param: "public",
190
- value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public) : void 0
191
- },
192
- {
193
- param: "private_network",
194
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(
195
- request.privateNetwork
196
- ) : void 0
197
- }
198
- ])
199
- });
200
- const marshalVolume = (request, defaults) => ({
201
- size_bytes: request.sizeBytes,
202
- type: request.type
119
+ var marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({ private_network_id: request.privateNetworkId });
120
+ var marshalEndpointSpecPublicDetails = (request, defaults) => ({});
121
+ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
122
+ param: "public",
123
+ value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public, defaults) : void 0
124
+ }, {
125
+ param: "private_network",
126
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
127
+ }]) });
128
+ var marshalVolume = (request, defaults) => ({
129
+ size_bytes: request.sizeBytes,
130
+ type: request.type
203
131
  });
204
132
  const marshalCreateDeploymentRequest = (request, defaults) => ({
205
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
206
- name: request.name,
207
- node_amount: request.nodeAmount,
208
- node_type: request.nodeType,
209
- password: request.password,
210
- project_id: request.projectId ?? defaults.defaultProjectId,
211
- tags: request.tags,
212
- user_name: request.userName,
213
- version: request.version,
214
- volume: request.volume !== void 0 ? marshalVolume(request.volume) : void 0
133
+ endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
134
+ name: request.name,
135
+ node_amount: request.nodeAmount,
136
+ node_type: request.nodeType,
137
+ password: request.password,
138
+ project_id: request.projectId ?? defaults.defaultProjectId,
139
+ tags: request.tags,
140
+ user_name: request.userName,
141
+ version: request.version,
142
+ volume: request.volume !== void 0 ? marshalVolume(request.volume, defaults) : void 0
215
143
  });
216
144
  const marshalCreateEndpointRequest = (request, defaults) => ({
217
- deployment_id: request.deploymentId,
218
- endpoint_spec: request.endpointSpec !== void 0 ? marshalEndpointSpec(request.endpointSpec) : void 0
145
+ deployment_id: request.deploymentId,
146
+ endpoint_spec: request.endpointSpec !== void 0 ? marshalEndpointSpec(request.endpointSpec, defaults) : void 0
219
147
  });
220
148
  const marshalCreateUserRequest = (request, defaults) => ({
221
- password: request.password,
222
- username: request.username
149
+ password: request.password,
150
+ username: request.username
223
151
  });
224
152
  const marshalUpdateDeploymentRequest = (request, defaults) => ({
225
- name: request.name,
226
- tags: request.tags
227
- });
228
- const marshalUpdateUserRequest = (request, defaults) => ({
229
- password: request.password
153
+ name: request.name,
154
+ tags: request.tags
230
155
  });
231
- const marshalUpgradeDeploymentRequest = (request, defaults) => ({
232
- ...resolveOneOf([
233
- { param: "node_amount", value: request.nodeAmount },
234
- { param: "volume_size_bytes", value: request.volumeSizeBytes }
235
- ])
236
- });
237
- export {
238
- marshalCreateDeploymentRequest,
239
- marshalCreateEndpointRequest,
240
- marshalCreateUserRequest,
241
- marshalUpdateDeploymentRequest,
242
- marshalUpdateUserRequest,
243
- marshalUpgradeDeploymentRequest,
244
- unmarshalDeployment,
245
- unmarshalEndpoint,
246
- unmarshalListDeploymentsResponse,
247
- unmarshalListNodeTypesResponse,
248
- unmarshalListUsersResponse,
249
- unmarshalListVersionsResponse,
250
- unmarshalUser
251
- };
156
+ const marshalUpdateUserRequest = (request, defaults) => ({ password: request.password });
157
+ const marshalUpgradeDeploymentRequest = (request, defaults) => ({ ...resolveOneOf([{
158
+ param: "node_amount",
159
+ value: request.nodeAmount
160
+ }, {
161
+ param: "volume_size_bytes",
162
+ value: request.volumeSizeBytes
163
+ }]) });
164
+ export { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, marshalUpgradeDeploymentRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListNodeTypesResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser };
@@ -336,6 +336,13 @@ export type DeleteUserRequest = {
336
336
  */
337
337
  username: string;
338
338
  };
339
+ export type GetDeploymentCertificateAuthorityRequest = {
340
+ /**
341
+ * Region to target. If none is passed will use default region from the config.
342
+ */
343
+ region?: ScwRegion;
344
+ deploymentId: string;
345
+ };
339
346
  /**
340
347
  * Retrieve a deployment specified by the ID.
341
348
  */
@@ -1,129 +1,115 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
+ CreateDeploymentRequest: () => CreateDeploymentRequest,
4
+ CreateUserRequest: () => CreateUserRequest,
5
+ DeleteUserRequest: () => DeleteUserRequest,
6
+ ListDeploymentsRequest: () => ListDeploymentsRequest,
7
+ ListNodeTypesRequest: () => ListNodeTypesRequest,
8
+ ListUsersRequest: () => ListUsersRequest,
9
+ ListVersionsRequest: () => ListVersionsRequest,
10
+ UpdateDeploymentRequest: () => UpdateDeploymentRequest,
11
+ UpdateUserRequest: () => UpdateUserRequest,
12
+ Volume: () => Volume
13
+ });
1
14
  const CreateDeploymentRequest = {
2
- name: {
3
- maxLength: 255,
4
- minLength: 1,
5
- pattern: /^[A-Za-z0-9\-_]+$/
6
- },
7
- nodeType: {
8
- maxLength: 128,
9
- minLength: 1,
10
- pattern: /^[A-Za-z0-9\-_]+$/
11
- },
12
- password: {
13
- maxLength: 128,
14
- minLength: 12
15
- },
16
- userName: {
17
- maxLength: 63,
18
- minLength: 1,
19
- pattern: /^[a-zA-Z0-9_\-]*$/
20
- },
21
- version: {
22
- maxLength: 128,
23
- minLength: 1,
24
- pattern: /^[0-9]+\.[0-9]+$/
25
- }
15
+ name: {
16
+ maxLength: 255,
17
+ minLength: 1,
18
+ pattern: /^[A-Za-z0-9\-_]+$/
19
+ },
20
+ nodeType: {
21
+ maxLength: 128,
22
+ minLength: 1,
23
+ pattern: /^[A-Za-z0-9\-_]+$/
24
+ },
25
+ password: {
26
+ maxLength: 128,
27
+ minLength: 12
28
+ },
29
+ userName: {
30
+ maxLength: 63,
31
+ minLength: 1,
32
+ pattern: /^[a-zA-Z0-9_\-]*$/
33
+ },
34
+ version: {
35
+ maxLength: 128,
36
+ minLength: 1,
37
+ pattern: /^[0-9]+\.[0-9]+$/
38
+ }
26
39
  };
27
40
  const CreateUserRequest = {
28
- password: {
29
- maxLength: 128,
30
- minLength: 8
31
- },
32
- username: {
33
- maxLength: 63,
34
- minLength: 1,
35
- pattern: /^[a-zA-Z0-9_\-]*$/
36
- }
37
- };
38
- const DeleteUserRequest = {
39
- username: {
40
- maxLength: 63,
41
- minLength: 1,
42
- pattern: /^[a-zA-Z0-9_\-]*$/
43
- }
41
+ password: {
42
+ maxLength: 128,
43
+ minLength: 8
44
+ },
45
+ username: {
46
+ maxLength: 63,
47
+ minLength: 1,
48
+ pattern: /^[a-zA-Z0-9_\-]*$/
49
+ }
44
50
  };
51
+ const DeleteUserRequest = { username: {
52
+ maxLength: 63,
53
+ minLength: 1,
54
+ pattern: /^[a-zA-Z0-9_\-]*$/
55
+ } };
45
56
  const ListDeploymentsRequest = {
46
- name: {
47
- maxLength: 255,
48
- minLength: 1,
49
- pattern: /^[A-Za-z0-9\-_]+$/
50
- },
51
- page: {
52
- greaterThanOrEqual: 1
53
- },
54
- pageSize: {
55
- greaterThanOrEqual: 1,
56
- lessThanOrEqual: 100
57
- },
58
- version: {
59
- maxLength: 128,
60
- minLength: 1,
61
- pattern: /^[A-Za-z0-9\-_]+$/
62
- }
57
+ name: {
58
+ maxLength: 255,
59
+ minLength: 1,
60
+ pattern: /^[A-Za-z0-9\-_]+$/
61
+ },
62
+ page: { greaterThanOrEqual: 1 },
63
+ pageSize: {
64
+ greaterThanOrEqual: 1,
65
+ lessThanOrEqual: 100
66
+ },
67
+ version: {
68
+ maxLength: 128,
69
+ minLength: 1,
70
+ pattern: /^[A-Za-z0-9\-_]+$/
71
+ }
63
72
  };
64
73
  const ListNodeTypesRequest = {
65
- page: {
66
- greaterThanOrEqual: 1
67
- },
68
- pageSize: {
69
- greaterThanOrEqual: 1,
70
- lessThanOrEqual: 100
71
- }
74
+ page: { greaterThanOrEqual: 1 },
75
+ pageSize: {
76
+ greaterThanOrEqual: 1,
77
+ lessThanOrEqual: 100
78
+ }
72
79
  };
73
80
  const ListUsersRequest = {
74
- name: {
75
- maxLength: 63,
76
- minLength: 1,
77
- pattern: /^[a-zA-Z0-9_\-]*$/
78
- },
79
- page: {
80
- greaterThanOrEqual: 1
81
- },
82
- pageSize: {
83
- greaterThanOrEqual: 1,
84
- lessThanOrEqual: 100
85
- }
81
+ name: {
82
+ maxLength: 63,
83
+ minLength: 1,
84
+ pattern: /^[a-zA-Z0-9_\-]*$/
85
+ },
86
+ page: { greaterThanOrEqual: 1 },
87
+ pageSize: {
88
+ greaterThanOrEqual: 1,
89
+ lessThanOrEqual: 100
90
+ }
86
91
  };
87
92
  const ListVersionsRequest = {
88
- page: {
89
- greaterThanOrEqual: 1
90
- },
91
- pageSize: {
92
- greaterThanOrEqual: 1,
93
- lessThanOrEqual: 100
94
- }
95
- };
96
- const UpdateDeploymentRequest = {
97
- name: {
98
- maxLength: 255,
99
- minLength: 1
100
- }
93
+ page: { greaterThanOrEqual: 1 },
94
+ pageSize: {
95
+ greaterThanOrEqual: 1,
96
+ lessThanOrEqual: 100
97
+ }
101
98
  };
99
+ const UpdateDeploymentRequest = { name: {
100
+ maxLength: 255,
101
+ minLength: 1
102
+ } };
102
103
  const UpdateUserRequest = {
103
- password: {
104
- maxLength: 128,
105
- minLength: 8
106
- },
107
- username: {
108
- maxLength: 63,
109
- minLength: 1,
110
- pattern: /^[a-zA-Z0-9_\-]*$/
111
- }
112
- };
113
- const Volume = {
114
- sizeBytes: {
115
- greaterThanOrEqual: 1e9
116
- }
117
- };
118
- export {
119
- CreateDeploymentRequest,
120
- CreateUserRequest,
121
- DeleteUserRequest,
122
- ListDeploymentsRequest,
123
- ListNodeTypesRequest,
124
- ListUsersRequest,
125
- ListVersionsRequest,
126
- UpdateDeploymentRequest,
127
- UpdateUserRequest,
128
- Volume
104
+ password: {
105
+ maxLength: 128,
106
+ minLength: 8
107
+ },
108
+ username: {
109
+ maxLength: 63,
110
+ minLength: 1,
111
+ pattern: /^[a-zA-Z0-9_\-]*$/
112
+ }
129
113
  };
114
+ const Volume = { sizeBytes: { greaterThanOrEqual: 1e9 } };
115
+ export { validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-searchdb",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Scaleway SDK searchdb",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.18.3"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.1",
30
- "@scaleway/sdk-std": "2.1.0"
29
+ "@scaleway/random-name": "5.1.2",
30
+ "@scaleway/sdk-std": "2.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.0"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",