@scaleway/sdk-block 2.3.1 → 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.
@@ -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 };
@@ -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$1 = class extends 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
- export { API$1 as API };
195
+ //#endregion
196
+ export { API };
@@ -1,21 +1,23 @@
1
+ //#region src/v1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link ReferenceStatus}. */
2
- const REFERENCE_TRANSIENT_STATUSES = [
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
- const SNAPSHOT_TRANSIENT_STATUSES = [
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
- const VOLUME_TRANSIENT_STATUSES = [
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, 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
- export { index_gen_exports };
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
- const unmarshalReference = (data) => {
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
- const unmarshalSnapshot = (data) => {
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
- const unmarshalVolume = (data) => {
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
- const unmarshalListSnapshotsResponse = (data) => {
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
- const unmarshalListVolumeTypesResponse = (data) => {
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
- const unmarshalListVolumesResponse = (data) => {
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
- const marshalCreateSnapshotRequest = (request, defaults) => ({
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
- const marshalCreateVolumeRequest = (request, defaults) => ({
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
- const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
124
+ var marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
124
125
  bucket: request.bucket,
125
126
  key: request.key
126
127
  });
127
- const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
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
- const marshalUpdateSnapshotRequest = (request, defaults) => ({
136
+ var marshalUpdateSnapshotRequest = (request, defaults) => ({
136
137
  name: request.name,
137
138
  tags: request.tags
138
139
  });
139
- const marshalUpdateVolumeRequest = (request, defaults) => ({
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 };
@@ -0,0 +1,61 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "block";
3
+ readonly version: "v1";
4
+ readonly folderName: "blockv1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listVolumeTypes";
9
+ readonly protoName: "ListVolumeTypes";
10
+ readonly paramsType: "ListVolumeTypesRequest";
11
+ readonly returnType: "ListVolumeTypesResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "VolumeType";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "listVolumes";
20
+ readonly protoName: "ListVolumes";
21
+ readonly paramsType: "ListVolumesRequest";
22
+ readonly returnType: "ListVolumesResponse";
23
+ readonly isList: true;
24
+ readonly paginationType: "offset";
25
+ readonly pageParamKey: "page";
26
+ readonly listItemType: "Volume";
27
+ readonly isPrivate: false;
28
+ readonly description: "\"";
29
+ }, {
30
+ readonly methodName: "getVolume";
31
+ readonly protoName: "GetVolume";
32
+ readonly paramsType: "GetVolumeRequest";
33
+ readonly returnType: "Volume";
34
+ readonly isList: false;
35
+ readonly paginationType: "none";
36
+ readonly isPrivate: false;
37
+ readonly description: "\"";
38
+ }, {
39
+ readonly methodName: "listSnapshots";
40
+ readonly protoName: "ListSnapshots";
41
+ readonly paramsType: "ListSnapshotsRequest";
42
+ readonly returnType: "ListSnapshotsResponse";
43
+ readonly isList: true;
44
+ readonly paginationType: "offset";
45
+ readonly pageParamKey: "page";
46
+ readonly listItemType: "Snapshot";
47
+ readonly isPrivate: false;
48
+ readonly description: "\"";
49
+ }, {
50
+ readonly methodName: "getSnapshot";
51
+ readonly protoName: "GetSnapshot";
52
+ readonly paramsType: "GetSnapshotRequest";
53
+ readonly returnType: "Snapshot";
54
+ readonly isList: false;
55
+ readonly paginationType: "none";
56
+ readonly isPrivate: false;
57
+ readonly description: "\"";
58
+ }];
59
+ }];
60
+ };
61
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,69 @@
1
+ //#region src/v1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "block",
4
+ version: "v1",
5
+ folderName: "blockv1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "listVolumeTypes",
11
+ protoName: "ListVolumeTypes",
12
+ paramsType: "ListVolumeTypesRequest",
13
+ returnType: "ListVolumeTypesResponse",
14
+ isList: true,
15
+ paginationType: "offset",
16
+ pageParamKey: "page",
17
+ listItemType: "VolumeType",
18
+ isPrivate: false,
19
+ description: "\""
20
+ },
21
+ {
22
+ methodName: "listVolumes",
23
+ protoName: "ListVolumes",
24
+ paramsType: "ListVolumesRequest",
25
+ returnType: "ListVolumesResponse",
26
+ isList: true,
27
+ paginationType: "offset",
28
+ pageParamKey: "page",
29
+ listItemType: "Volume",
30
+ isPrivate: false,
31
+ description: "\""
32
+ },
33
+ {
34
+ methodName: "getVolume",
35
+ protoName: "GetVolume",
36
+ paramsType: "GetVolumeRequest",
37
+ returnType: "Volume",
38
+ isList: false,
39
+ paginationType: "none",
40
+ isPrivate: false,
41
+ description: "\""
42
+ },
43
+ {
44
+ methodName: "listSnapshots",
45
+ protoName: "ListSnapshots",
46
+ paramsType: "ListSnapshotsRequest",
47
+ returnType: "ListSnapshotsResponse",
48
+ isList: true,
49
+ paginationType: "offset",
50
+ pageParamKey: "page",
51
+ listItemType: "Snapshot",
52
+ isPrivate: false,
53
+ description: "\""
54
+ },
55
+ {
56
+ methodName: "getSnapshot",
57
+ protoName: "GetSnapshot",
58
+ paramsType: "GetSnapshotRequest",
59
+ returnType: "Snapshot",
60
+ isList: false,
61
+ paginationType: "none",
62
+ isPrivate: false,
63
+ description: "\""
64
+ }
65
+ ]
66
+ }]
67
+ };
68
+ //#endregion
69
+ export { queriesMetadata };
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
- const CreateSnapshotRequest = { name: { minLength: 1 } };
12
- const CreateVolumeRequest = { name: { minLength: 1 } };
13
- const ImportSnapshotFromObjectStorageRequest = { name: { minLength: 1 } };
14
- const ListSnapshotsRequest = {
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
- const ListVolumeTypesRequest = {
22
+ var ListVolumeTypesRequest = {
22
23
  page: { greaterThan: 0 },
23
24
  pageSize: {
24
25
  greaterThan: 0,
25
26
  lessThanOrEqual: 100
26
27
  }
27
28
  };
28
- const ListVolumesRequest = {
29
+ var ListVolumesRequest = {
29
30
  page: { greaterThan: 0 },
30
31
  pageSize: {
31
32
  greaterThan: 0,
32
33
  lessThanOrEqual: 100
33
34
  }
34
35
  };
35
- const Reference = { productResourceType: { minLength: 1 } };
36
- export { validation_rules_gen_exports };
36
+ var Reference = { productResourceType: { minLength: 1 } };
37
+ //#endregion
38
+ export { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest, Reference, validation_rules_gen_exports };
@@ -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$1 = class extends 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
- export { API$1 as API };
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
- const REFERENCE_TRANSIENT_STATUSES = [
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
- const SNAPSHOT_TRANSIENT_STATUSES = [
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
- const VOLUME_TRANSIENT_STATUSES = [
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
- export { index_gen_exports };
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
- const unmarshalSnapshot = (data) => {
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
- const unmarshalVolume = (data) => {
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
- const unmarshalListSnapshotsResponse = (data) => {
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
- const unmarshalListVolumeTypesResponse = (data) => {
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
- const unmarshalListVolumesResponse = (data) => {
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
- const marshalCreateSnapshotRequest = (request, defaults) => ({
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
- const marshalCreateVolumeRequest = (request, defaults) => ({
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
- const marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
124
+ var marshalExportSnapshotToObjectStorageRequest = (request, defaults) => ({
124
125
  bucket: request.bucket,
125
126
  key: request.key
126
127
  });
127
- const marshalImportSnapshotFromObjectStorageRequest = (request, defaults) => ({
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
- const marshalImportSnapshotFromS3Request = (request, defaults) => ({
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
- const marshalUpdateSnapshotRequest = (request, defaults) => ({
144
+ var marshalUpdateSnapshotRequest = (request, defaults) => ({
144
145
  name: request.name,
145
146
  tags: request.tags
146
147
  });
147
- const marshalUpdateVolumeRequest = (request, defaults) => ({
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 };
@@ -0,0 +1,61 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "block";
3
+ readonly version: "v1alpha1";
4
+ readonly folderName: "blockv1alpha1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listVolumeTypes";
9
+ readonly protoName: "ListVolumeTypes";
10
+ readonly paramsType: "ListVolumeTypesRequest";
11
+ readonly returnType: "ListVolumeTypesResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "VolumeType";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "listVolumes";
20
+ readonly protoName: "ListVolumes";
21
+ readonly paramsType: "ListVolumesRequest";
22
+ readonly returnType: "ListVolumesResponse";
23
+ readonly isList: true;
24
+ readonly paginationType: "offset";
25
+ readonly pageParamKey: "page";
26
+ readonly listItemType: "Volume";
27
+ readonly isPrivate: false;
28
+ readonly description: "\"";
29
+ }, {
30
+ readonly methodName: "getVolume";
31
+ readonly protoName: "GetVolume";
32
+ readonly paramsType: "GetVolumeRequest";
33
+ readonly returnType: "Volume";
34
+ readonly isList: false;
35
+ readonly paginationType: "none";
36
+ readonly isPrivate: false;
37
+ readonly description: "\"";
38
+ }, {
39
+ readonly methodName: "listSnapshots";
40
+ readonly protoName: "ListSnapshots";
41
+ readonly paramsType: "ListSnapshotsRequest";
42
+ readonly returnType: "ListSnapshotsResponse";
43
+ readonly isList: true;
44
+ readonly paginationType: "offset";
45
+ readonly pageParamKey: "page";
46
+ readonly listItemType: "Snapshot";
47
+ readonly isPrivate: false;
48
+ readonly description: "\"";
49
+ }, {
50
+ readonly methodName: "getSnapshot";
51
+ readonly protoName: "GetSnapshot";
52
+ readonly paramsType: "GetSnapshotRequest";
53
+ readonly returnType: "Snapshot";
54
+ readonly isList: false;
55
+ readonly paginationType: "none";
56
+ readonly isPrivate: false;
57
+ readonly description: "\"";
58
+ }];
59
+ }];
60
+ };
61
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,69 @@
1
+ //#region src/v1alpha1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "block",
4
+ version: "v1alpha1",
5
+ folderName: "blockv1alpha1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "listVolumeTypes",
11
+ protoName: "ListVolumeTypes",
12
+ paramsType: "ListVolumeTypesRequest",
13
+ returnType: "ListVolumeTypesResponse",
14
+ isList: true,
15
+ paginationType: "offset",
16
+ pageParamKey: "page",
17
+ listItemType: "VolumeType",
18
+ isPrivate: false,
19
+ description: "\""
20
+ },
21
+ {
22
+ methodName: "listVolumes",
23
+ protoName: "ListVolumes",
24
+ paramsType: "ListVolumesRequest",
25
+ returnType: "ListVolumesResponse",
26
+ isList: true,
27
+ paginationType: "offset",
28
+ pageParamKey: "page",
29
+ listItemType: "Volume",
30
+ isPrivate: false,
31
+ description: "\""
32
+ },
33
+ {
34
+ methodName: "getVolume",
35
+ protoName: "GetVolume",
36
+ paramsType: "GetVolumeRequest",
37
+ returnType: "Volume",
38
+ isList: false,
39
+ paginationType: "none",
40
+ isPrivate: false,
41
+ description: "\""
42
+ },
43
+ {
44
+ methodName: "listSnapshots",
45
+ protoName: "ListSnapshots",
46
+ paramsType: "ListSnapshotsRequest",
47
+ returnType: "ListSnapshotsResponse",
48
+ isList: true,
49
+ paginationType: "offset",
50
+ pageParamKey: "page",
51
+ listItemType: "Snapshot",
52
+ isPrivate: false,
53
+ description: "\""
54
+ },
55
+ {
56
+ methodName: "getSnapshot",
57
+ protoName: "GetSnapshot",
58
+ paramsType: "GetSnapshotRequest",
59
+ returnType: "Snapshot",
60
+ isList: false,
61
+ paginationType: "none",
62
+ isPrivate: false,
63
+ description: "\""
64
+ }
65
+ ]
66
+ }]
67
+ };
68
+ //#endregion
69
+ export { queriesMetadata };
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
- const CreateSnapshotRequest = { name: { minLength: 1 } };
13
- const CreateVolumeRequest = { name: { minLength: 1 } };
14
- const ImportSnapshotFromObjectStorageRequest = { name: { minLength: 1 } };
15
- const ImportSnapshotFromS3Request = { name: { minLength: 1 } };
16
- const ListSnapshotsRequest = {
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
- const ListVolumeTypesRequest = {
24
+ var ListVolumeTypesRequest = {
24
25
  page: { greaterThan: 0 },
25
26
  pageSize: {
26
27
  greaterThan: 0,
27
28
  lessThanOrEqual: 100
28
29
  }
29
30
  };
30
- const ListVolumesRequest = {
31
+ var ListVolumesRequest = {
31
32
  page: { greaterThan: 0 },
32
33
  pageSize: {
33
34
  greaterThan: 0,
34
35
  lessThanOrEqual: 100
35
36
  }
36
37
  };
37
- const Reference = { productResourceType: { minLength: 1 } };
38
- export { validation_rules_gen_exports };
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.1",
3
+ "version": "2.4.0",
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.2",
30
- "@scaleway/sdk-std": "2.2.1"
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.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",