@scaleway/sdk-block 2.1.1 → 2.2.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/dist/v1/api.gen.js +34 -19
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +4 -7
- package/dist/v1/types.gen.d.ts +0 -1
- package/dist/v1alpha1/api.gen.js +34 -19
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/marshalling.gen.js +4 -7
- package/dist/v1alpha1/types.gen.d.ts +0 -1
- package/package.json +1 -1
package/dist/v1/api.gen.js
CHANGED
|
@@ -28,7 +28,10 @@ class API extends API$1 {
|
|
|
28
28
|
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volume-types`,
|
|
29
29
|
urlParams: urlParams(
|
|
30
30
|
["page", request.page],
|
|
31
|
-
[
|
|
31
|
+
[
|
|
32
|
+
"page_size",
|
|
33
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
34
|
+
]
|
|
32
35
|
)
|
|
33
36
|
},
|
|
34
37
|
unmarshalListVolumeTypesResponse
|
|
@@ -50,7 +53,10 @@ class API extends API$1 {
|
|
|
50
53
|
["order_by", request.orderBy],
|
|
51
54
|
["organization_id", request.organizationId],
|
|
52
55
|
["page", request.page],
|
|
53
|
-
[
|
|
56
|
+
[
|
|
57
|
+
"page_size",
|
|
58
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
59
|
+
],
|
|
54
60
|
["product_resource_id", request.productResourceId],
|
|
55
61
|
["project_id", request.projectId],
|
|
56
62
|
["tags", request.tags],
|
|
@@ -105,7 +111,9 @@ class API extends API$1 {
|
|
|
105
111
|
* @returns A Promise of Volume
|
|
106
112
|
*/
|
|
107
113
|
waitForVolume = (request, options) => waitForResource(
|
|
108
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
114
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
115
|
+
!VOLUME_TRANSIENT_STATUSES.includes(res.status)
|
|
116
|
+
)),
|
|
109
117
|
this.getVolume,
|
|
110
118
|
request,
|
|
111
119
|
options
|
|
@@ -115,12 +123,10 @@ class API extends API$1 {
|
|
|
115
123
|
*
|
|
116
124
|
* @param request - The request {@link DeleteVolumeRequest}
|
|
117
125
|
*/
|
|
118
|
-
deleteVolume = (request) => this.client.fetch(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
);
|
|
126
|
+
deleteVolume = (request) => this.client.fetch({
|
|
127
|
+
method: "DELETE",
|
|
128
|
+
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam("volumeId", request.volumeId)}`
|
|
129
|
+
});
|
|
124
130
|
/**
|
|
125
131
|
* Update a volume. Update the technical details of a volume, such as its name, tags, or its new size and `volume_type` (within the same Block Storage class).
|
|
126
132
|
You can only resize a volume to a larger size. It is currently not possible to change your Block Storage Class.
|
|
@@ -149,7 +155,10 @@ class API extends API$1 {
|
|
|
149
155
|
["order_by", request.orderBy],
|
|
150
156
|
["organization_id", request.organizationId],
|
|
151
157
|
["page", request.page],
|
|
152
|
-
[
|
|
158
|
+
[
|
|
159
|
+
"page_size",
|
|
160
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
161
|
+
],
|
|
153
162
|
["project_id", request.projectId],
|
|
154
163
|
["tags", request.tags],
|
|
155
164
|
["volume_id", request.volumeId]
|
|
@@ -185,7 +194,9 @@ class API extends API$1 {
|
|
|
185
194
|
* @returns A Promise of Snapshot
|
|
186
195
|
*/
|
|
187
196
|
waitForSnapshot = (request, options) => waitForResource(
|
|
188
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
197
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
198
|
+
!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
|
|
199
|
+
)),
|
|
189
200
|
this.getSnapshot,
|
|
190
201
|
request,
|
|
191
202
|
options
|
|
@@ -218,7 +229,10 @@ class API extends API$1 {
|
|
|
218
229
|
importSnapshotFromObjectStorage = (request) => this.client.fetch(
|
|
219
230
|
{
|
|
220
231
|
body: JSON.stringify(
|
|
221
|
-
marshalImportSnapshotFromObjectStorageRequest(
|
|
232
|
+
marshalImportSnapshotFromObjectStorageRequest(
|
|
233
|
+
request,
|
|
234
|
+
this.client.settings
|
|
235
|
+
)
|
|
222
236
|
),
|
|
223
237
|
headers: jsonContentHeaders,
|
|
224
238
|
method: "POST",
|
|
@@ -236,7 +250,10 @@ class API extends API$1 {
|
|
|
236
250
|
exportSnapshotToObjectStorage = (request) => this.client.fetch(
|
|
237
251
|
{
|
|
238
252
|
body: JSON.stringify(
|
|
239
|
-
marshalExportSnapshotToObjectStorageRequest(
|
|
253
|
+
marshalExportSnapshotToObjectStorageRequest(
|
|
254
|
+
request,
|
|
255
|
+
this.client.settings
|
|
256
|
+
)
|
|
240
257
|
),
|
|
241
258
|
headers: jsonContentHeaders,
|
|
242
259
|
method: "POST",
|
|
@@ -249,12 +266,10 @@ class API extends API$1 {
|
|
|
249
266
|
*
|
|
250
267
|
* @param request - The request {@link DeleteSnapshotRequest}
|
|
251
268
|
*/
|
|
252
|
-
deleteSnapshot = (request) => this.client.fetch(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
);
|
|
269
|
+
deleteSnapshot = (request) => this.client.fetch({
|
|
270
|
+
method: "DELETE",
|
|
271
|
+
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
272
|
+
});
|
|
258
273
|
/**
|
|
259
274
|
* Update a snapshot. Update the name or tags of the snapshot.
|
|
260
275
|
*
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
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 { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen.js';
|
|
@@ -153,15 +153,12 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
param: "from_snapshot",
|
|
156
|
-
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
156
|
+
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
157
|
+
request.fromSnapshot
|
|
158
|
+
) : void 0
|
|
157
159
|
}
|
|
158
160
|
]),
|
|
159
|
-
...resolveOneOf([
|
|
160
|
-
{
|
|
161
|
-
param: "perf_iops",
|
|
162
|
-
value: request.perfIops
|
|
163
|
-
}
|
|
164
|
-
])
|
|
161
|
+
...resolveOneOf([{ param: "perf_iops", value: request.perfIops }])
|
|
165
162
|
});
|
|
166
163
|
const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
167
164
|
bucket: request.bucket,
|
package/dist/v1/types.gen.d.ts
CHANGED
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -28,7 +28,10 @@ class API extends API$1 {
|
|
|
28
28
|
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volume-types`,
|
|
29
29
|
urlParams: urlParams(
|
|
30
30
|
["page", request.page],
|
|
31
|
-
[
|
|
31
|
+
[
|
|
32
|
+
"page_size",
|
|
33
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
34
|
+
]
|
|
32
35
|
)
|
|
33
36
|
},
|
|
34
37
|
unmarshalListVolumeTypesResponse
|
|
@@ -49,7 +52,10 @@ class API extends API$1 {
|
|
|
49
52
|
["order_by", request.orderBy],
|
|
50
53
|
["organization_id", request.organizationId],
|
|
51
54
|
["page", request.page],
|
|
52
|
-
[
|
|
55
|
+
[
|
|
56
|
+
"page_size",
|
|
57
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
58
|
+
],
|
|
53
59
|
["product_resource_id", request.productResourceId],
|
|
54
60
|
["project_id", request.projectId],
|
|
55
61
|
["tags", request.tags]
|
|
@@ -103,7 +109,9 @@ class API extends API$1 {
|
|
|
103
109
|
* @returns A Promise of Volume
|
|
104
110
|
*/
|
|
105
111
|
waitForVolume = (request, options) => waitForResource(
|
|
106
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
112
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
113
|
+
!VOLUME_TRANSIENT_STATUSES.includes(res.status)
|
|
114
|
+
)),
|
|
107
115
|
this.getVolume,
|
|
108
116
|
request,
|
|
109
117
|
options
|
|
@@ -113,12 +121,10 @@ class API extends API$1 {
|
|
|
113
121
|
*
|
|
114
122
|
* @param request - The request {@link DeleteVolumeRequest}
|
|
115
123
|
*/
|
|
116
|
-
deleteVolume = (request) => this.client.fetch(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
);
|
|
124
|
+
deleteVolume = (request) => this.client.fetch({
|
|
125
|
+
method: "DELETE",
|
|
126
|
+
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam("volumeId", request.volumeId)}`
|
|
127
|
+
});
|
|
122
128
|
/**
|
|
123
129
|
* Update a volume. Update the technical details of a volume, such as its name, tags, or its new size and `volume_type` (within the same Block Storage class).
|
|
124
130
|
You can only resize a volume to a larger size. It is currently not possible to change your Block Storage Class.
|
|
@@ -146,7 +152,10 @@ class API extends API$1 {
|
|
|
146
152
|
["order_by", request.orderBy],
|
|
147
153
|
["organization_id", request.organizationId],
|
|
148
154
|
["page", request.page],
|
|
149
|
-
[
|
|
155
|
+
[
|
|
156
|
+
"page_size",
|
|
157
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
158
|
+
],
|
|
150
159
|
["project_id", request.projectId],
|
|
151
160
|
["tags", request.tags],
|
|
152
161
|
["volume_id", request.volumeId]
|
|
@@ -182,7 +191,9 @@ class API extends API$1 {
|
|
|
182
191
|
* @returns A Promise of Snapshot
|
|
183
192
|
*/
|
|
184
193
|
waitForSnapshot = (request, options) => waitForResource(
|
|
185
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
194
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
195
|
+
!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
|
|
196
|
+
)),
|
|
186
197
|
this.getSnapshot,
|
|
187
198
|
request,
|
|
188
199
|
options
|
|
@@ -235,7 +246,10 @@ class API extends API$1 {
|
|
|
235
246
|
importSnapshotFromObjectStorage = (request) => this.client.fetch(
|
|
236
247
|
{
|
|
237
248
|
body: JSON.stringify(
|
|
238
|
-
marshalImportSnapshotFromObjectStorageRequest(
|
|
249
|
+
marshalImportSnapshotFromObjectStorageRequest(
|
|
250
|
+
request,
|
|
251
|
+
this.client.settings
|
|
252
|
+
)
|
|
239
253
|
),
|
|
240
254
|
headers: jsonContentHeaders,
|
|
241
255
|
method: "POST",
|
|
@@ -253,7 +267,10 @@ class API extends API$1 {
|
|
|
253
267
|
exportSnapshotToObjectStorage = (request) => this.client.fetch(
|
|
254
268
|
{
|
|
255
269
|
body: JSON.stringify(
|
|
256
|
-
marshalExportSnapshotToObjectStorageRequest(
|
|
270
|
+
marshalExportSnapshotToObjectStorageRequest(
|
|
271
|
+
request,
|
|
272
|
+
this.client.settings
|
|
273
|
+
)
|
|
257
274
|
),
|
|
258
275
|
headers: jsonContentHeaders,
|
|
259
276
|
method: "POST",
|
|
@@ -266,12 +283,10 @@ class API extends API$1 {
|
|
|
266
283
|
*
|
|
267
284
|
* @param request - The request {@link DeleteSnapshotRequest}
|
|
268
285
|
*/
|
|
269
|
-
deleteSnapshot = (request) => this.client.fetch(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
);
|
|
286
|
+
deleteSnapshot = (request) => this.client.fetch({
|
|
287
|
+
method: "DELETE",
|
|
288
|
+
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
289
|
+
});
|
|
275
290
|
/**
|
|
276
291
|
* Update a snapshot. Update the name or tags of the snapshot.
|
|
277
292
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
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 { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListVolumesRequest, ListVolumesRequestOrderBy, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Reference, ReferenceStatus, ReferenceType, Snapshot, SnapshotParentVolume, SnapshotStatus, StorageClass, UpdateSnapshotRequest, UpdateVolumeRequest, Volume, VolumeSpecifications, VolumeStatus, VolumeType, } from './types.gen.js';
|
|
@@ -153,15 +153,12 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
param: "from_snapshot",
|
|
156
|
-
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
156
|
+
value: request.fromSnapshot !== void 0 ? marshalCreateVolumeRequestFromSnapshot(
|
|
157
|
+
request.fromSnapshot
|
|
158
|
+
) : void 0
|
|
157
159
|
}
|
|
158
160
|
]),
|
|
159
|
-
...resolveOneOf([
|
|
160
|
-
{
|
|
161
|
-
param: "perf_iops",
|
|
162
|
-
value: request.perfIops
|
|
163
|
-
}
|
|
164
|
-
])
|
|
161
|
+
...resolveOneOf([{ param: "perf_iops", value: request.perfIops }])
|
|
165
162
|
});
|
|
166
163
|
const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
167
164
|
bucket: request.bucket,
|