@scaleway/sdk-datawarehouse 2.3.0 → 2.4.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.
@@ -10,7 +10,9 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: ["fr-par"]
13
+ regions: [
14
+ "fr-par"
15
+ ]
14
16
  });
15
17
  pageOfListPresets = (request = {}) => this.client.fetch(
16
18
  {
@@ -18,10 +20,7 @@ class API extends API$1 {
18
20
  path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/presets`,
19
21
  urlParams: urlParams(
20
22
  ["page", request.page],
21
- [
22
- "page_size",
23
- request.pageSize ?? this.client.settings.defaultPageSize
24
- ]
23
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
25
24
  )
26
25
  },
27
26
  unmarshalListPresetsResponse
@@ -39,10 +38,7 @@ class API extends API$1 {
39
38
  path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
40
39
  urlParams: urlParams(
41
40
  ["page", request.page],
42
- [
43
- "page_size",
44
- request.pageSize ?? this.client.settings.defaultPageSize
45
- ],
41
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
46
42
  ["version", request.version]
47
43
  )
48
44
  },
@@ -64,10 +60,7 @@ class API extends API$1 {
64
60
  ["order_by", request.orderBy],
65
61
  ["organization_id", request.organizationId],
66
62
  ["page", request.page],
67
- [
68
- "page_size",
69
- request.pageSize ?? this.client.settings.defaultPageSize
70
- ],
63
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
71
64
  ["project_id", request.projectId],
72
65
  ["tags", request.tags]
73
66
  )
@@ -102,9 +95,7 @@ class API extends API$1 {
102
95
  * @returns A Promise of Deployment
103
96
  */
104
97
  waitForDeployment = (request, options) => waitForResource(
105
- options?.stop ?? ((res) => Promise.resolve(
106
- !DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status)
107
- )),
98
+ options?.stop ?? ((res) => Promise.resolve(!DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status))),
108
99
  this.getDeployment,
109
100
  request,
110
101
  options
@@ -162,12 +153,16 @@ class API extends API$1 {
162
153
  * @param request - The request {@link GetDeploymentCertificateRequest}
163
154
  * @returns A Promise of Blob
164
155
  */
165
- getDeploymentCertificate = (request) => this.client.fetch({
166
- method: "GET",
167
- path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate`,
168
- urlParams: urlParams(["dl", 1]),
169
- responseType: "blob"
170
- });
156
+ getDeploymentCertificate = (request) => this.client.fetch(
157
+ {
158
+ method: "GET",
159
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate`,
160
+ urlParams: urlParams(
161
+ ["dl", 1]
162
+ ),
163
+ responseType: "blob"
164
+ }
165
+ );
171
166
  /**
172
167
  * Start a deployment. Start a stopped deployment.
173
168
  *
@@ -206,10 +201,7 @@ class API extends API$1 {
206
201
  ["name", request.name],
207
202
  ["order_by", request.orderBy],
208
203
  ["page", request.page],
209
- [
210
- "page_size",
211
- request.pageSize ?? this.client.settings.defaultPageSize
212
- ]
204
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
213
205
  )
214
206
  },
215
207
  unmarshalListUsersResponse
@@ -260,21 +252,25 @@ class API extends API$1 {
260
252
  *
261
253
  * @param request - The request {@link DeleteUserRequest}
262
254
  */
263
- deleteUser = (request) => this.client.fetch({
264
- body: "{}",
265
- headers: jsonContentHeaders,
266
- method: "DELETE",
267
- path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
268
- });
255
+ deleteUser = (request) => this.client.fetch(
256
+ {
257
+ body: "{}",
258
+ headers: jsonContentHeaders,
259
+ method: "DELETE",
260
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
261
+ }
262
+ );
269
263
  /**
270
264
  * Delete an endpoint from a deployment.
271
265
  *
272
266
  * @param request - The request {@link DeleteEndpointRequest}
273
267
  */
274
- deleteEndpoint = (request) => this.client.fetch({
275
- method: "DELETE",
276
- path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
277
- });
268
+ deleteEndpoint = (request) => this.client.fetch(
269
+ {
270
+ method: "DELETE",
271
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
272
+ }
273
+ );
278
274
  /**
279
275
  * Create a new endpoint for a deployment.
280
276
  *
@@ -300,10 +296,7 @@ class API extends API$1 {
300
296
  ["name", request.name],
301
297
  ["order_by", request.orderBy],
302
298
  ["page", request.page],
303
- [
304
- "page_size",
305
- request.pageSize ?? this.client.settings.defaultPageSize
306
- ]
299
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
307
300
  )
308
301
  },
309
302
  unmarshalListDatabasesResponse
@@ -337,10 +330,12 @@ class API extends API$1 {
337
330
  *
338
331
  * @param request - The request {@link DeleteDatabaseRequest}
339
332
  */
340
- deleteDatabase = (request) => this.client.fetch({
341
- method: "DELETE",
342
- path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases/${validatePathParam("name", request.name)}`
343
- });
333
+ deleteDatabase = (request) => this.client.fetch(
334
+ {
335
+ method: "DELETE",
336
+ path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases/${validatePathParam("name", request.name)}`
337
+ }
338
+ );
344
339
  }
345
340
  export {
346
341
  API
@@ -1,4 +1,4 @@
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
4
  export type { CreateDatabaseRequest, CreateDeploymentRequest, CreateEndpointRequest, CreateUserRequest, Database, DeleteDatabaseRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteUserRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointService, EndpointServiceProtocol, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetDeploymentCertificateRequest, GetDeploymentRequest, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListPresetsRequest, ListPresetsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, Preset, StartDeploymentRequest, StopDeploymentRequest, UpdateDeploymentRequest, UpdateUserRequest, User, Version, } from './types.gen.js';
@@ -71,6 +71,7 @@ const unmarshalDeployment = (data) => {
71
71
  ramPerCpu: data.ram_per_cpu,
72
72
  region: data.region,
73
73
  replicaCount: data.replica_count,
74
+ shardCount: data.shard_count,
74
75
  status: data.status,
75
76
  tags: data.tags,
76
77
  updatedAt: unmarshalDate(data.updated_at),
@@ -122,7 +123,8 @@ const unmarshalPreset = (data) => {
122
123
  cpuMin: data.cpu_min,
123
124
  name: data.name,
124
125
  ramPerCpu: data.ram_per_cpu,
125
- replicaCount: data.replica_count
126
+ replicaCount: data.replica_count,
127
+ shardCount: data.shard_count
126
128
  };
127
129
  };
128
130
  const unmarshalListPresetsResponse = (data) => {
@@ -184,9 +186,7 @@ const marshalEndpointSpec = (request, defaults) => ({
184
186
  },
185
187
  {
186
188
  param: "private_network",
187
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(
188
- request.privateNetwork
189
- ) : void 0
189
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork) : void 0
190
190
  }
191
191
  ])
192
192
  });
@@ -199,6 +199,7 @@ const marshalCreateDeploymentRequest = (request, defaults) => ({
199
199
  project_id: request.projectId ?? defaults.defaultProjectId,
200
200
  ram_per_cpu: request.ramPerCpu,
201
201
  replica_count: request.replicaCount,
202
+ shard_count: request.shardCount,
202
203
  tags: request.tags,
203
204
  version: request.version
204
205
  });
@@ -110,6 +110,10 @@ export interface Deployment {
110
110
  * Number of replicas for the deployment.
111
111
  */
112
112
  replicaCount: number;
113
+ /**
114
+ * Number of shards for the deployment.
115
+ */
116
+ shardCount: number;
113
117
  /**
114
118
  * Minimum CPU count for the deployment.
115
119
  */
@@ -156,6 +160,10 @@ export interface Preset {
156
160
  * Number of replicas for the preset.
157
161
  */
158
162
  replicaCount: number;
163
+ /**
164
+ * Number of shards for the preset.
165
+ */
166
+ shardCount: number;
159
167
  }
160
168
  export interface User {
161
169
  /**
@@ -216,6 +224,10 @@ export type CreateDeploymentRequest = {
216
224
  * Number of replicas for the deployment.
217
225
  */
218
226
  replicaCount: number;
227
+ /**
228
+ * Number of shard for the deployment.
229
+ */
230
+ shardCount?: number;
219
231
  /**
220
232
  * Password for the initial user.
221
233
  */
@@ -27,6 +27,10 @@ export declare const CreateDeploymentRequest: {
27
27
  greaterThanOrEqual: number;
28
28
  lessThanOrEqual: number;
29
29
  };
30
+ shardCount: {
31
+ greaterThanOrEqual: number;
32
+ lessThanOrEqual: number;
33
+ };
30
34
  version: {
31
35
  maxLength: number;
32
36
  minLength: number;
@@ -27,6 +27,10 @@ const CreateDeploymentRequest = {
27
27
  greaterThanOrEqual: 1,
28
28
  lessThanOrEqual: 6
29
29
  },
30
+ shardCount: {
31
+ greaterThanOrEqual: 1,
32
+ lessThanOrEqual: 6
33
+ },
30
34
  version: {
31
35
  maxLength: 10,
32
36
  minLength: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-datawarehouse",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK datawarehouse",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"