@scaleway/sdk-block 2.3.0 → 2.3.2
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/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1/api.gen.js +5 -3
- package/dist/v1/content.gen.js +5 -3
- package/dist/v1/index.gen.js +3 -1
- package/dist/v1/marshalling.gen.js +14 -12
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.js +10 -8
- package/dist/v1alpha1/api.gen.js +5 -3
- package/dist/v1alpha1/content.gen.js +5 -3
- package/dist/v1alpha1/index.gen.js +3 -1
- package/dist/v1alpha1/marshalling.gen.js +14 -12
- package/dist/v1alpha1/types.gen.js +0 -0
- package/dist/v1alpha1/validation-rules.gen.js +11 -9
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll };
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Block Storage API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Block Storage volumes.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -191,4 +192,5 @@ var API$1 = class extends API {
|
|
|
191
192
|
path: `/block/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
192
193
|
}, unmarshalSnapshot);
|
|
193
194
|
};
|
|
194
|
-
|
|
195
|
+
//#endregion
|
|
196
|
+
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
//#region src/v1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link ReferenceStatus}. */
|
|
2
|
-
|
|
3
|
+
var REFERENCE_TRANSIENT_STATUSES = [
|
|
3
4
|
"attaching",
|
|
4
5
|
"detaching",
|
|
5
6
|
"creating"
|
|
6
7
|
];
|
|
7
8
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
8
|
-
|
|
9
|
+
var SNAPSHOT_TRANSIENT_STATUSES = [
|
|
9
10
|
"creating",
|
|
10
11
|
"deleting",
|
|
11
12
|
"exporting"
|
|
12
13
|
];
|
|
13
14
|
/** Lists transient statutes of the enum {@link VolumeStatus}. */
|
|
14
|
-
|
|
15
|
+
var VOLUME_TRANSIENT_STATUSES = [
|
|
15
16
|
"creating",
|
|
16
17
|
"deleting",
|
|
17
18
|
"resizing",
|
|
18
19
|
"snapshotting",
|
|
19
20
|
"updating"
|
|
20
21
|
];
|
|
22
|
+
//#endregion
|
|
21
23
|
export { REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -3,6 +3,7 @@ import { REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANS
|
|
|
3
3
|
import { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalReference, unmarshalSnapshot, unmarshalVolume } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
REFERENCE_TRANSIENT_STATUSES: () => REFERENCE_TRANSIENT_STATUSES,
|
|
@@ -22,4 +23,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
22
23
|
unmarshalSnapshot: () => unmarshalSnapshot,
|
|
23
24
|
unmarshalVolume: () => unmarshalVolume
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
export { API, REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalReference, unmarshalSnapshot, unmarshalVolume };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
-
|
|
3
|
+
//#region src/v1/marshalling.gen.ts
|
|
4
|
+
var unmarshalReference = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Reference' failed as data isn't a dictionary.`);
|
|
5
6
|
return {
|
|
6
7
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -20,7 +21,7 @@ var unmarshalSnapshotParentVolume = (data) => {
|
|
|
20
21
|
type: data.type
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
var unmarshalSnapshot = (data) => {
|
|
24
25
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
25
26
|
return {
|
|
26
27
|
class: data.class,
|
|
@@ -44,7 +45,7 @@ var unmarshalVolumeSpecifications = (data) => {
|
|
|
44
45
|
perfIops: data.perf_iops
|
|
45
46
|
};
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
var unmarshalVolume = (data) => {
|
|
48
49
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
49
50
|
return {
|
|
50
51
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -63,7 +64,7 @@ const unmarshalVolume = (data) => {
|
|
|
63
64
|
zone: data.zone
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
var unmarshalListSnapshotsResponse = (data) => {
|
|
67
68
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
68
69
|
return {
|
|
69
70
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
@@ -79,21 +80,21 @@ var unmarshalVolumeType = (data) => {
|
|
|
79
80
|
type: data.type
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
+
var unmarshalListVolumeTypesResponse = (data) => {
|
|
83
84
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVolumeTypesResponse' failed as data isn't a dictionary.`);
|
|
84
85
|
return {
|
|
85
86
|
totalCount: data.total_count,
|
|
86
87
|
volumeTypes: unmarshalArrayOfObject(data.volume_types, unmarshalVolumeType)
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
+
var unmarshalListVolumesResponse = (data) => {
|
|
90
91
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`);
|
|
91
92
|
return {
|
|
92
93
|
totalCount: data.total_count,
|
|
93
94
|
volumes: unmarshalArrayOfObject(data.volumes, unmarshalVolume)
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
+
var marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
97
98
|
name: request.name || randomName("snp"),
|
|
98
99
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
99
100
|
tags: request.tags,
|
|
@@ -104,7 +105,7 @@ var marshalCreateVolumeRequestFromSnapshot = (request, defaults) => ({
|
|
|
104
105
|
size: request.size,
|
|
105
106
|
snapshot_id: request.snapshotId
|
|
106
107
|
});
|
|
107
|
-
|
|
108
|
+
var marshalCreateVolumeRequest = (request, defaults) => ({
|
|
108
109
|
name: request.name || randomName("vol"),
|
|
109
110
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
110
111
|
tags: request.tags,
|
|
@@ -120,11 +121,11 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
120
121
|
value: request.perfIops
|
|
121
122
|
}])
|
|
122
123
|
});
|
|
123
|
-
|
|
124
|
+
var marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
124
125
|
bucket: request.bucket,
|
|
125
126
|
key: request.key
|
|
126
127
|
});
|
|
127
|
-
|
|
128
|
+
var marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
|
|
128
129
|
bucket: request.bucket,
|
|
129
130
|
key: request.key,
|
|
130
131
|
name: request.name,
|
|
@@ -132,14 +133,15 @@ const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
|
|
|
132
133
|
size: request.size,
|
|
133
134
|
tags: request.tags
|
|
134
135
|
});
|
|
135
|
-
|
|
136
|
+
var marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
136
137
|
name: request.name,
|
|
137
138
|
tags: request.tags
|
|
138
139
|
});
|
|
139
|
-
|
|
140
|
+
var marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
140
141
|
name: request.name,
|
|
141
142
|
perf_iops: request.perfIops,
|
|
142
143
|
size: request.size,
|
|
143
144
|
tags: request.tags
|
|
144
145
|
});
|
|
146
|
+
//#endregion
|
|
145
147
|
export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalReference, unmarshalSnapshot, unmarshalVolume };
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
CreateSnapshotRequest: () => CreateSnapshotRequest,
|
|
4
5
|
CreateVolumeRequest: () => CreateVolumeRequest,
|
|
@@ -8,29 +9,30 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
9
|
ListVolumesRequest: () => ListVolumesRequest,
|
|
9
10
|
Reference: () => Reference
|
|
10
11
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var CreateSnapshotRequest = { name: { minLength: 1 } };
|
|
13
|
+
var CreateVolumeRequest = { name: { minLength: 1 } };
|
|
14
|
+
var ImportSnapshotFromObjectStorageRequest = { name: { minLength: 1 } };
|
|
15
|
+
var ListSnapshotsRequest = {
|
|
15
16
|
page: { greaterThan: 0 },
|
|
16
17
|
pageSize: {
|
|
17
18
|
greaterThan: 0,
|
|
18
19
|
lessThanOrEqual: 100
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
var ListVolumeTypesRequest = {
|
|
22
23
|
page: { greaterThan: 0 },
|
|
23
24
|
pageSize: {
|
|
24
25
|
greaterThan: 0,
|
|
25
26
|
lessThanOrEqual: 100
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
var ListVolumesRequest = {
|
|
29
30
|
page: { greaterThan: 0 },
|
|
30
31
|
pageSize: {
|
|
31
32
|
greaterThan: 0,
|
|
32
33
|
lessThanOrEqual: 100
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
var Reference = { productResourceType: { minLength: 1 } };
|
|
37
|
+
//#endregion
|
|
38
|
+
export { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest, Reference, validation_rules_gen_exports };
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1alpha1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Block Storage API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Block Storage volumes.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -206,4 +207,5 @@ var API$1 = class extends API {
|
|
|
206
207
|
path: `/block/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
207
208
|
}, unmarshalSnapshot);
|
|
208
209
|
};
|
|
209
|
-
|
|
210
|
+
//#endregion
|
|
211
|
+
export { API };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
//#region src/v1alpha1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link ReferenceStatus}. */
|
|
2
|
-
|
|
3
|
+
var REFERENCE_TRANSIENT_STATUSES = [
|
|
3
4
|
"attaching",
|
|
4
5
|
"detaching",
|
|
5
6
|
"creating"
|
|
6
7
|
];
|
|
7
8
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
8
|
-
|
|
9
|
+
var SNAPSHOT_TRANSIENT_STATUSES = [
|
|
9
10
|
"creating",
|
|
10
11
|
"deleting",
|
|
11
12
|
"exporting"
|
|
12
13
|
];
|
|
13
14
|
/** Lists transient statutes of the enum {@link VolumeStatus}. */
|
|
14
|
-
|
|
15
|
+
var VOLUME_TRANSIENT_STATUSES = [
|
|
15
16
|
"creating",
|
|
16
17
|
"deleting",
|
|
17
18
|
"resizing",
|
|
18
19
|
"snapshotting",
|
|
19
20
|
"updating"
|
|
20
21
|
];
|
|
22
|
+
//#endregion
|
|
21
23
|
export { REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
|
|
@@ -3,6 +3,7 @@ import { REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANS
|
|
|
3
3
|
import { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1alpha1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
REFERENCE_TRANSIENT_STATUSES: () => REFERENCE_TRANSIENT_STATUSES,
|
|
@@ -22,4 +23,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
22
23
|
unmarshalSnapshot: () => unmarshalSnapshot,
|
|
23
24
|
unmarshalVolume: () => unmarshalVolume
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
export { API, REFERENCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
+
//#region src/v1alpha1/marshalling.gen.ts
|
|
3
4
|
var unmarshalReference = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Reference' failed as data isn't a dictionary.`);
|
|
5
6
|
return {
|
|
@@ -20,7 +21,7 @@ var unmarshalSnapshotParentVolume = (data) => {
|
|
|
20
21
|
type: data.type
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
var unmarshalSnapshot = (data) => {
|
|
24
25
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
25
26
|
return {
|
|
26
27
|
class: data.class,
|
|
@@ -44,7 +45,7 @@ var unmarshalVolumeSpecifications = (data) => {
|
|
|
44
45
|
perfIops: data.perf_iops
|
|
45
46
|
};
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
var unmarshalVolume = (data) => {
|
|
48
49
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
49
50
|
return {
|
|
50
51
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -63,7 +64,7 @@ const unmarshalVolume = (data) => {
|
|
|
63
64
|
zone: data.zone
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
var unmarshalListSnapshotsResponse = (data) => {
|
|
67
68
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
68
69
|
return {
|
|
69
70
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
@@ -79,21 +80,21 @@ var unmarshalVolumeType = (data) => {
|
|
|
79
80
|
type: data.type
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
+
var unmarshalListVolumeTypesResponse = (data) => {
|
|
83
84
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVolumeTypesResponse' failed as data isn't a dictionary.`);
|
|
84
85
|
return {
|
|
85
86
|
totalCount: data.total_count,
|
|
86
87
|
volumeTypes: unmarshalArrayOfObject(data.volume_types, unmarshalVolumeType)
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
+
var unmarshalListVolumesResponse = (data) => {
|
|
90
91
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`);
|
|
91
92
|
return {
|
|
92
93
|
totalCount: data.total_count,
|
|
93
94
|
volumes: unmarshalArrayOfObject(data.volumes, unmarshalVolume)
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
+
var marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
97
98
|
name: request.name || randomName("snp"),
|
|
98
99
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
99
100
|
tags: request.tags,
|
|
@@ -104,7 +105,7 @@ var marshalCreateVolumeRequestFromSnapshot = (request, defaults) => ({
|
|
|
104
105
|
size: request.size,
|
|
105
106
|
snapshot_id: request.snapshotId
|
|
106
107
|
});
|
|
107
|
-
|
|
108
|
+
var marshalCreateVolumeRequest = (request, defaults) => ({
|
|
108
109
|
name: request.name || randomName("vol"),
|
|
109
110
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
110
111
|
tags: request.tags,
|
|
@@ -120,11 +121,11 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
120
121
|
value: request.perfIops
|
|
121
122
|
}])
|
|
122
123
|
});
|
|
123
|
-
|
|
124
|
+
var marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
|
|
124
125
|
bucket: request.bucket,
|
|
125
126
|
key: request.key
|
|
126
127
|
});
|
|
127
|
-
|
|
128
|
+
var marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
|
|
128
129
|
bucket: request.bucket,
|
|
129
130
|
key: request.key,
|
|
130
131
|
name: request.name,
|
|
@@ -132,7 +133,7 @@ const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
|
|
|
132
133
|
size: request.size,
|
|
133
134
|
tags: request.tags
|
|
134
135
|
});
|
|
135
|
-
|
|
136
|
+
var marshalImportSnapshotFromS3Request = (request, defaults) => ({
|
|
136
137
|
bucket: request.bucket,
|
|
137
138
|
key: request.key,
|
|
138
139
|
name: request.name,
|
|
@@ -140,14 +141,15 @@ const marshalImportSnapshotFromS3Request = (request, defaults) => ({
|
|
|
140
141
|
size: request.size,
|
|
141
142
|
tags: request.tags
|
|
142
143
|
});
|
|
143
|
-
|
|
144
|
+
var marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
144
145
|
name: request.name,
|
|
145
146
|
tags: request.tags
|
|
146
147
|
});
|
|
147
|
-
|
|
148
|
+
var marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
148
149
|
name: request.name,
|
|
149
150
|
perf_iops: request.perfIops,
|
|
150
151
|
size: request.size,
|
|
151
152
|
tags: request.tags
|
|
152
153
|
});
|
|
154
|
+
//#endregion
|
|
153
155
|
export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotToObjectStorageRequest, marshalImportSnapshotFromObjectStorageRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1alpha1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
CreateSnapshotRequest: () => CreateSnapshotRequest,
|
|
4
5
|
CreateVolumeRequest: () => CreateVolumeRequest,
|
|
@@ -9,30 +10,31 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
10
|
ListVolumesRequest: () => ListVolumesRequest,
|
|
10
11
|
Reference: () => Reference
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var CreateSnapshotRequest = { name: { minLength: 1 } };
|
|
14
|
+
var CreateVolumeRequest = { name: { minLength: 1 } };
|
|
15
|
+
var ImportSnapshotFromObjectStorageRequest = { name: { minLength: 1 } };
|
|
16
|
+
var ImportSnapshotFromS3Request = { name: { minLength: 1 } };
|
|
17
|
+
var ListSnapshotsRequest = {
|
|
17
18
|
page: { greaterThan: 0 },
|
|
18
19
|
pageSize: {
|
|
19
20
|
greaterThan: 0,
|
|
20
21
|
lessThanOrEqual: 100
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
var ListVolumeTypesRequest = {
|
|
24
25
|
page: { greaterThan: 0 },
|
|
25
26
|
pageSize: {
|
|
26
27
|
greaterThan: 0,
|
|
27
28
|
lessThanOrEqual: 100
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
|
-
|
|
31
|
+
var ListVolumesRequest = {
|
|
31
32
|
page: { greaterThan: 0 },
|
|
32
33
|
pageSize: {
|
|
33
34
|
greaterThan: 0,
|
|
34
35
|
lessThanOrEqual: 100
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
var Reference = { productResourceType: { minLength: 1 } };
|
|
39
|
+
//#endregion
|
|
40
|
+
export { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest, Reference, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-block",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Scaleway SDK block",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=20.19.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@scaleway/random-name": "5.1.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
29
|
+
"@scaleway/random-name": "5.1.4",
|
|
30
|
+
"@scaleway/sdk-std": "2.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|