@scaleway/sdk-block 1.0.5 → 1.1.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/dist/v1/api.gen.cjs +6 -4
- package/dist/v1/api.gen.d.ts +6 -6
- package/dist/v1/api.gen.js +6 -4
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.d.ts +1 -1
- package/dist/v1/types.gen.d.ts +8 -0
- package/dist/v1alpha1/api.gen.d.ts +2 -2
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/marshalling.gen.d.ts +1 -1
- package/package.json +6 -6
package/dist/v1/api.gen.cjs
CHANGED
|
@@ -45,11 +45,12 @@ class API extends sdkClient.API {
|
|
|
45
45
|
* @returns A Promise of ListVolumeTypesResponse
|
|
46
46
|
*/
|
|
47
47
|
listVolumeTypes = (request = {}) => sdkClient.enrichForPagination("volumeTypes", this.pageOfListVolumeTypes, request);
|
|
48
|
-
pageOfListVolumes = (request
|
|
48
|
+
pageOfListVolumes = (request) => this.client.fetch(
|
|
49
49
|
{
|
|
50
50
|
method: "GET",
|
|
51
51
|
path: `/block/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes`,
|
|
52
52
|
urlParams: sdkClient.urlParams(
|
|
53
|
+
["include_deleted", request.includeDeleted],
|
|
53
54
|
["name", request.name],
|
|
54
55
|
["order_by", request.orderBy],
|
|
55
56
|
["organization_id", request.organizationId],
|
|
@@ -71,7 +72,7 @@ class API extends sdkClient.API {
|
|
|
71
72
|
* @param request - The request {@link ListVolumesRequest}
|
|
72
73
|
* @returns A Promise of ListVolumesResponse
|
|
73
74
|
*/
|
|
74
|
-
listVolumes = (request
|
|
75
|
+
listVolumes = (request) => sdkClient.enrichForPagination("volumes", this.pageOfListVolumes, request);
|
|
75
76
|
/**
|
|
76
77
|
* Create a volume. To create a new volume from scratch, you must specify `from_empty` and the `size`.
|
|
77
78
|
To create a volume from an existing snapshot, specify `from_snapshot` and the `snapshot_id` in the request payload instead, size is optional and can be specified if you need to extend the original size. The volume will take on the same volume class and underlying IOPS limitations as the original snapshot.
|
|
@@ -145,11 +146,12 @@ class API extends sdkClient.API {
|
|
|
145
146
|
},
|
|
146
147
|
marshalling_gen.unmarshalVolume
|
|
147
148
|
);
|
|
148
|
-
pageOfListSnapshots = (request
|
|
149
|
+
pageOfListSnapshots = (request) => this.client.fetch(
|
|
149
150
|
{
|
|
150
151
|
method: "GET",
|
|
151
152
|
path: `/block/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots`,
|
|
152
153
|
urlParams: sdkClient.urlParams(
|
|
154
|
+
["include_deleted", request.includeDeleted],
|
|
153
155
|
["name", request.name],
|
|
154
156
|
["order_by", request.orderBy],
|
|
155
157
|
["organization_id", request.organizationId],
|
|
@@ -171,7 +173,7 @@ class API extends sdkClient.API {
|
|
|
171
173
|
* @param request - The request {@link ListSnapshotsRequest}
|
|
172
174
|
* @returns A Promise of ListSnapshotsResponse
|
|
173
175
|
*/
|
|
174
|
-
listSnapshots = (request
|
|
176
|
+
listSnapshots = (request) => sdkClient.enrichForPagination("snapshots", this.pageOfListSnapshots, request);
|
|
175
177
|
/**
|
|
176
178
|
* Get a snapshot. Retrieve technical information about a specific snapshot. Details such as size, volume type, and status are returned in the response.
|
|
177
179
|
*
|
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
-
import
|
|
2
|
+
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
+
import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Block Storage API.
|
|
6
6
|
|
|
@@ -23,14 +23,14 @@ export declare class API extends ParentAPI {
|
|
|
23
23
|
all: () => Promise<import("./types.gen").VolumeType[]>;
|
|
24
24
|
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").VolumeType[], void, void>;
|
|
25
25
|
};
|
|
26
|
-
protected pageOfListVolumes: (request
|
|
26
|
+
protected pageOfListVolumes: (request: Readonly<ListVolumesRequest>) => Promise<ListVolumesResponse>;
|
|
27
27
|
/**
|
|
28
28
|
* List volumes. List all existing volumes in a specified zone. By default, the volumes listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
29
29
|
*
|
|
30
30
|
* @param request - The request {@link ListVolumesRequest}
|
|
31
31
|
* @returns A Promise of ListVolumesResponse
|
|
32
32
|
*/
|
|
33
|
-
listVolumes: (request
|
|
33
|
+
listVolumes: (request: Readonly<ListVolumesRequest>) => Promise<ListVolumesResponse> & {
|
|
34
34
|
all: () => Promise<Volume[]>;
|
|
35
35
|
[Symbol.asyncIterator]: () => AsyncGenerator<Volume[], void, void>;
|
|
36
36
|
};
|
|
@@ -71,14 +71,14 @@ export declare class API extends ParentAPI {
|
|
|
71
71
|
* @returns A Promise of Volume
|
|
72
72
|
*/
|
|
73
73
|
updateVolume: (request: Readonly<UpdateVolumeRequest>) => Promise<Volume>;
|
|
74
|
-
protected pageOfListSnapshots: (request
|
|
74
|
+
protected pageOfListSnapshots: (request: Readonly<ListSnapshotsRequest>) => Promise<ListSnapshotsResponse>;
|
|
75
75
|
/**
|
|
76
76
|
* List all snapshots. List all available snapshots in a specified zone. By default, the snapshots listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
77
77
|
*
|
|
78
78
|
* @param request - The request {@link ListSnapshotsRequest}
|
|
79
79
|
* @returns A Promise of ListSnapshotsResponse
|
|
80
80
|
*/
|
|
81
|
-
listSnapshots: (request
|
|
81
|
+
listSnapshots: (request: Readonly<ListSnapshotsRequest>) => Promise<ListSnapshotsResponse> & {
|
|
82
82
|
all: () => Promise<Snapshot[]>;
|
|
83
83
|
[Symbol.asyncIterator]: () => AsyncGenerator<Snapshot[], void, void>;
|
|
84
84
|
};
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -43,11 +43,12 @@ class API extends API$1 {
|
|
|
43
43
|
* @returns A Promise of ListVolumeTypesResponse
|
|
44
44
|
*/
|
|
45
45
|
listVolumeTypes = (request = {}) => enrichForPagination("volumeTypes", this.pageOfListVolumeTypes, request);
|
|
46
|
-
pageOfListVolumes = (request
|
|
46
|
+
pageOfListVolumes = (request) => this.client.fetch(
|
|
47
47
|
{
|
|
48
48
|
method: "GET",
|
|
49
49
|
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes`,
|
|
50
50
|
urlParams: urlParams(
|
|
51
|
+
["include_deleted", request.includeDeleted],
|
|
51
52
|
["name", request.name],
|
|
52
53
|
["order_by", request.orderBy],
|
|
53
54
|
["organization_id", request.organizationId],
|
|
@@ -69,7 +70,7 @@ class API extends API$1 {
|
|
|
69
70
|
* @param request - The request {@link ListVolumesRequest}
|
|
70
71
|
* @returns A Promise of ListVolumesResponse
|
|
71
72
|
*/
|
|
72
|
-
listVolumes = (request
|
|
73
|
+
listVolumes = (request) => enrichForPagination("volumes", this.pageOfListVolumes, request);
|
|
73
74
|
/**
|
|
74
75
|
* Create a volume. To create a new volume from scratch, you must specify `from_empty` and the `size`.
|
|
75
76
|
To create a volume from an existing snapshot, specify `from_snapshot` and the `snapshot_id` in the request payload instead, size is optional and can be specified if you need to extend the original size. The volume will take on the same volume class and underlying IOPS limitations as the original snapshot.
|
|
@@ -143,11 +144,12 @@ class API extends API$1 {
|
|
|
143
144
|
},
|
|
144
145
|
unmarshalVolume
|
|
145
146
|
);
|
|
146
|
-
pageOfListSnapshots = (request
|
|
147
|
+
pageOfListSnapshots = (request) => this.client.fetch(
|
|
147
148
|
{
|
|
148
149
|
method: "GET",
|
|
149
150
|
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots`,
|
|
150
151
|
urlParams: urlParams(
|
|
152
|
+
["include_deleted", request.includeDeleted],
|
|
151
153
|
["name", request.name],
|
|
152
154
|
["order_by", request.orderBy],
|
|
153
155
|
["organization_id", request.organizationId],
|
|
@@ -169,7 +171,7 @@ class API extends API$1 {
|
|
|
169
171
|
* @param request - The request {@link ListSnapshotsRequest}
|
|
170
172
|
* @returns A Promise of ListSnapshotsResponse
|
|
171
173
|
*/
|
|
172
|
-
listSnapshots = (request
|
|
174
|
+
listSnapshots = (request) => enrichForPagination("snapshots", this.pageOfListSnapshots, request);
|
|
173
175
|
/**
|
|
174
176
|
* Get a snapshot. Retrieve technical information about a specific snapshot. Details such as size, volume type, and status are returned in the response.
|
|
175
177
|
*
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
3
|
export * from './marshalling.gen';
|
|
4
|
-
export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse,
|
|
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';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CreateSnapshotRequest, CreateVolumeRequest, ExportSnapshotToObjectStorageRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsResponse,
|
|
2
|
+
import type { CreateSnapshotRequest, CreateVolumeRequest, ExportSnapshotToObjectStorageRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsResponse, ListVolumesResponse, ListVolumeTypesResponse, Reference, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
|
|
3
3
|
export declare const unmarshalReference: (data: unknown) => Reference;
|
|
4
4
|
export declare const unmarshalSnapshot: (data: unknown) => Snapshot;
|
|
5
5
|
export declare const unmarshalVolume: (data: unknown) => Volume;
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -386,6 +386,10 @@ export type ListSnapshotsRequest = {
|
|
|
386
386
|
* Filter by tags. Only snapshots with one or more matching tags will be returned.
|
|
387
387
|
*/
|
|
388
388
|
tags?: string[];
|
|
389
|
+
/**
|
|
390
|
+
* Display deleted snapshots not erased yet.
|
|
391
|
+
*/
|
|
392
|
+
includeDeleted: boolean;
|
|
389
393
|
};
|
|
390
394
|
export interface ListSnapshotsResponse {
|
|
391
395
|
/**
|
|
@@ -458,6 +462,10 @@ export type ListVolumesRequest = {
|
|
|
458
462
|
* Filter by tags. Only volumes with one or more matching tags will be returned.
|
|
459
463
|
*/
|
|
460
464
|
tags?: string[];
|
|
465
|
+
/**
|
|
466
|
+
* Display deleted volumes not erased yet.
|
|
467
|
+
*/
|
|
468
|
+
includeDeleted: boolean;
|
|
461
469
|
};
|
|
462
470
|
export interface ListVolumesResponse {
|
|
463
471
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
-
import
|
|
2
|
+
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
+
import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Block Storage API.
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
3
|
export * from './marshalling.gen';
|
|
4
|
-
export type { CreateSnapshotRequest, CreateVolumeRequest, CreateVolumeRequestFromEmpty, CreateVolumeRequestFromSnapshot, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse,
|
|
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';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CreateSnapshotRequest, CreateVolumeRequest, ExportSnapshotToObjectStorageRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsResponse,
|
|
2
|
+
import type { CreateSnapshotRequest, CreateVolumeRequest, ExportSnapshotToObjectStorageRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsResponse, ListVolumesResponse, ListVolumeTypesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
|
|
3
3
|
export declare const unmarshalSnapshot: (data: unknown) => Snapshot;
|
|
4
4
|
export declare const unmarshalVolume: (data: unknown) => Volume;
|
|
5
5
|
export declare const unmarshalListSnapshotsResponse: (data: unknown) => ListSnapshotsResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-block",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Scaleway SDK block",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"directory": "packages_generated/block"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=20.19.
|
|
29
|
+
"node": ">=20.19.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scaleway/random-name": "5.1.
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
32
|
+
"@scaleway/random-name": "5.1.2",
|
|
33
|
+
"@scaleway/sdk-std": "1.0.6"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|