@scaleway/sdk-block 1.0.4 → 1.0.5

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.
@@ -7,18 +7,23 @@ const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
9
9
  class API extends sdkClient.API {
10
- /** Lists the available zones of the API. */
11
- static LOCALITIES = [
12
- "fr-par-1",
13
- "fr-par-2",
14
- "fr-par-3",
15
- "nl-ams-1",
16
- "nl-ams-2",
17
- "nl-ams-3",
18
- "pl-waw-1",
19
- "pl-waw-2",
20
- "pl-waw-3"
21
- ];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static LOCALITY = sdkClient.toApiLocality({
15
+ zones: [
16
+ "fr-par-1",
17
+ "fr-par-2",
18
+ "fr-par-3",
19
+ "nl-ams-1",
20
+ "nl-ams-2",
21
+ "nl-ams-3",
22
+ "pl-waw-1",
23
+ "pl-waw-2",
24
+ "pl-waw-3"
25
+ ]
26
+ });
22
27
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
23
28
  {
24
29
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client';
2
+ import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
3
  import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
4
4
  /**
5
5
  * Block Storage API.
@@ -7,8 +7,11 @@ import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest,
7
7
  This API allows you to manage your Block Storage volumes.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
- /** Lists the available zones of the API. */
11
- static readonly LOCALITIES: ScwZone[];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
12
15
  protected pageOfListVolumeTypes: (request?: Readonly<ListVolumeTypesRequest>) => Promise<ListVolumeTypesResponse>;
13
16
  /**
14
17
  * List volume types. List all available volume types in a specified zone. The volume types listed are ordered by name in ascending order.
@@ -1,22 +1,27 @@
1
- import { API as API$1, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
2
2
  import { VOLUME_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromObjectStorageRequest, marshalExportSnapshotToObjectStorageRequest, marshalUpdateSnapshotRequest } from "./marshalling.gen.js";
4
4
  const jsonContentHeaders = {
5
5
  "Content-Type": "application/json; charset=utf-8"
6
6
  };
7
7
  class API extends API$1 {
8
- /** Lists the available zones of the API. */
9
- static LOCALITIES = [
10
- "fr-par-1",
11
- "fr-par-2",
12
- "fr-par-3",
13
- "nl-ams-1",
14
- "nl-ams-2",
15
- "nl-ams-3",
16
- "pl-waw-1",
17
- "pl-waw-2",
18
- "pl-waw-3"
19
- ];
8
+ /**
9
+ * Locality of this API.
10
+ * type ∈ {'zone','region','global','unspecified'}
11
+ */
12
+ static LOCALITY = toApiLocality({
13
+ zones: [
14
+ "fr-par-1",
15
+ "fr-par-2",
16
+ "fr-par-3",
17
+ "nl-ams-1",
18
+ "nl-ams-2",
19
+ "nl-ams-3",
20
+ "pl-waw-1",
21
+ "pl-waw-2",
22
+ "pl-waw-3"
23
+ ]
24
+ });
20
25
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
21
26
  {
22
27
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject, unmarshalMoney } from "@scaleway/sdk-client";
2
+ import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
3
3
  const unmarshalReference = (data) => {
4
4
  if (!isJSONObject(data)) {
5
5
  throw new TypeError(
@@ -7,18 +7,23 @@ const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
9
9
  class API extends sdkClient.API {
10
- /** Lists the available zones of the API. */
11
- static LOCALITIES = [
12
- "fr-par-1",
13
- "fr-par-2",
14
- "fr-par-3",
15
- "nl-ams-1",
16
- "nl-ams-2",
17
- "nl-ams-3",
18
- "pl-waw-1",
19
- "pl-waw-2",
20
- "pl-waw-3"
21
- ];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static LOCALITY = sdkClient.toApiLocality({
15
+ zones: [
16
+ "fr-par-1",
17
+ "fr-par-2",
18
+ "fr-par-3",
19
+ "nl-ams-1",
20
+ "nl-ams-2",
21
+ "nl-ams-3",
22
+ "pl-waw-1",
23
+ "pl-waw-2",
24
+ "pl-waw-3"
25
+ ]
26
+ });
22
27
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
23
28
  {
24
29
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client';
2
+ import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
3
  import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest, DeleteVolumeRequest, ExportSnapshotToObjectStorageRequest, GetSnapshotRequest, GetVolumeRequest, ImportSnapshotFromObjectStorageRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumeTypesRequest, ListVolumeTypesResponse, ListVolumesRequest, ListVolumesResponse, Snapshot, UpdateSnapshotRequest, UpdateVolumeRequest, Volume } from './types.gen';
4
4
  /**
5
5
  * Block Storage API.
@@ -7,8 +7,11 @@ import type { CreateSnapshotRequest, CreateVolumeRequest, DeleteSnapshotRequest,
7
7
  This API allows you to manage your Block Storage volumes.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
- /** Lists the available zones of the API. */
11
- static readonly LOCALITIES: ScwZone[];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
12
15
  protected pageOfListVolumeTypes: (request?: Readonly<ListVolumeTypesRequest>) => Promise<ListVolumeTypesResponse>;
13
16
  /**
14
17
  * List volume types. List all available volume types in a specified zone. The volume types listed are ordered by name in ascending order.
@@ -1,22 +1,27 @@
1
- import { API as API$1, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
2
2
  import { VOLUME_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromS3Request, marshalImportSnapshotFromObjectStorageRequest, marshalExportSnapshotToObjectStorageRequest, marshalUpdateSnapshotRequest } from "./marshalling.gen.js";
4
4
  const jsonContentHeaders = {
5
5
  "Content-Type": "application/json; charset=utf-8"
6
6
  };
7
7
  class API extends API$1 {
8
- /** Lists the available zones of the API. */
9
- static LOCALITIES = [
10
- "fr-par-1",
11
- "fr-par-2",
12
- "fr-par-3",
13
- "nl-ams-1",
14
- "nl-ams-2",
15
- "nl-ams-3",
16
- "pl-waw-1",
17
- "pl-waw-2",
18
- "pl-waw-3"
19
- ];
8
+ /**
9
+ * Locality of this API.
10
+ * type ∈ {'zone','region','global','unspecified'}
11
+ */
12
+ static LOCALITY = toApiLocality({
13
+ zones: [
14
+ "fr-par-1",
15
+ "fr-par-2",
16
+ "fr-par-3",
17
+ "nl-ams-1",
18
+ "nl-ams-2",
19
+ "nl-ams-3",
20
+ "pl-waw-1",
21
+ "pl-waw-2",
22
+ "pl-waw-3"
23
+ ]
24
+ });
20
25
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
21
26
  {
22
27
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject, unmarshalMoney } from "@scaleway/sdk-client";
2
+ import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
3
3
  const unmarshalReference = (data) => {
4
4
  if (!isJSONObject(data)) {
5
5
  throw new TypeError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-block",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Scaleway SDK block",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.4"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.3"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.3"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",