@scaleway/sdk-vpcgw 1.0.3 → 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,17 +7,22 @@ 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
- "nl-ams-1",
15
- "nl-ams-2",
16
- "nl-ams-3",
17
- "pl-waw-1",
18
- "pl-waw-2",
19
- "pl-waw-3"
20
- ];
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
+ "nl-ams-1",
19
+ "nl-ams-2",
20
+ "nl-ams-3",
21
+ "pl-waw-1",
22
+ "pl-waw-2",
23
+ "pl-waw-3"
24
+ ]
25
+ });
21
26
  pageOfListGateways = (request = {}) => this.client.fetch(
22
27
  {
23
28
  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 { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, ListDHCPEntriesRequest, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPATRulesRequest, ListPATRulesResponse, MigrateToV2Request, PATRule, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
4
4
  /**
5
5
  * Public Gateways API.
@@ -7,8 +7,11 @@ import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkReq
7
7
  This API allows you to manage your Public Gateways.
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 pageOfListGateways: (request?: Readonly<ListGatewaysRequest>) => Promise<ListGatewaysResponse>;
13
16
  /**
14
17
  * List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
@@ -1,21 +1,26 @@
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 { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListDHCPsResponse, unmarshalDHCP, marshalCreateDHCPRequest, marshalUpdateDHCPRequest, unmarshalListDHCPEntriesResponse, unmarshalDHCPEntry, marshalCreateDHCPEntryRequest, marshalUpdateDHCPEntryRequest, marshalSetDHCPEntriesRequest, unmarshalSetDHCPEntriesResponse, unmarshalListPATRulesResponse, unmarshalPATRule, marshalCreatePATRuleRequest, marshalUpdatePATRuleRequest, marshalSetPATRulesRequest, unmarshalSetPATRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } 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
- "nl-ams-1",
13
- "nl-ams-2",
14
- "nl-ams-3",
15
- "pl-waw-1",
16
- "pl-waw-2",
17
- "pl-waw-3"
18
- ];
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
+ "nl-ams-1",
17
+ "nl-ams-2",
18
+ "nl-ams-3",
19
+ "pl-waw-1",
20
+ "pl-waw-2",
21
+ "pl-waw-3"
22
+ ]
23
+ });
19
24
  pageOfListGateways = (request = {}) => this.client.fetch(
20
25
  {
21
26
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
2
+ import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
3
3
  const unmarshalDHCP = (data) => {
4
4
  if (!isJSONObject(data)) {
5
5
  throw new TypeError(
@@ -7,17 +7,22 @@ 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
- "nl-ams-1",
15
- "nl-ams-2",
16
- "nl-ams-3",
17
- "pl-waw-1",
18
- "pl-waw-2",
19
- "pl-waw-3"
20
- ];
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
+ "nl-ams-1",
19
+ "nl-ams-2",
20
+ "nl-ams-3",
21
+ "pl-waw-1",
22
+ "pl-waw-2",
23
+ "pl-waw-3"
24
+ ]
25
+ });
21
26
  pageOfListGateways = (request = {}) => this.client.fetch(
22
27
  {
23
28
  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 { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPatRulesRequest, ListPatRulesResponse, PatRule, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
4
4
  /**
5
5
  * Public Gateways API.
@@ -7,8 +7,11 @@ import type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateG
7
7
  This API allows you to manage your Public Gateways.
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 pageOfListGateways: (request?: Readonly<ListGatewaysRequest>) => Promise<ListGatewaysResponse>;
13
16
  /**
14
17
  * List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
@@ -1,21 +1,26 @@
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 { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest, marshalAddBastionAllowedIPsRequest, unmarshalAddBastionAllowedIPsResponse, marshalSetBastionAllowedIPsRequest, unmarshalSetBastionAllowedIPsResponse } 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
- "nl-ams-1",
13
- "nl-ams-2",
14
- "nl-ams-3",
15
- "pl-waw-1",
16
- "pl-waw-2",
17
- "pl-waw-3"
18
- ];
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
+ "nl-ams-1",
17
+ "nl-ams-2",
18
+ "nl-ams-3",
19
+ "pl-waw-1",
20
+ "pl-waw-2",
21
+ "pl-waw-3"
22
+ ]
23
+ });
19
24
  pageOfListGateways = (request = {}) => this.client.fetch(
20
25
  {
21
26
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import randomName from "@scaleway/random-name";
2
- import { isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
2
+ import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
3
3
  const unmarshalGatewayNetwork = (data) => {
4
4
  if (!isJSONObject(data)) {
5
5
  throw new TypeError(
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-vpcgw",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Scaleway SDK vpcgw",
5
- "types": "dist/index.d.ts",
5
+ "license": "Apache-2.0",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.3"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.2"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.2"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",