@scaleway/sdk-iot 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,8 +7,13 @@ const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
9
9
  class API extends sdkClient.API {
10
- /** Lists the available regions of the API. */
11
- static LOCALITIES = ["fr-par"];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static LOCALITY = sdkClient.toApiLocality({
15
+ regions: ["fr-par"]
16
+ });
12
17
  pageOfListHubs = (request = {}) => this.client.fetch(
13
18
  {
14
19
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client';
2
+ import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
3
  import type { CreateDeviceRequest, CreateDeviceResponse, CreateHubRequest, CreateNetworkRequest, CreateNetworkResponse, CreateRouteRequest, DeleteDeviceRequest, DeleteHubRequest, DeleteNetworkRequest, DeleteRouteRequest, DeleteTwinDocumentRequest, DeleteTwinDocumentsRequest, Device, DisableDeviceRequest, DisableHubRequest, EnableDeviceRequest, EnableHubRequest, GetDeviceCertificateRequest, GetDeviceCertificateResponse, GetDeviceMetricsRequest, GetDeviceMetricsResponse, GetDeviceRequest, GetHubCARequest, GetHubCAResponse, GetHubMetricsRequest, GetHubMetricsResponse, GetHubRequest, GetNetworkRequest, GetRouteRequest, GetTwinDocumentRequest, Hub, ListDevicesRequest, ListDevicesResponse, ListHubsRequest, ListHubsResponse, ListNetworksRequest, ListNetworksResponse, ListRoutesRequest, ListRoutesResponse, ListTwinDocumentsRequest, ListTwinDocumentsResponse, Network, PatchTwinDocumentRequest, PutTwinDocumentRequest, RenewDeviceCertificateRequest, RenewDeviceCertificateResponse, Route, SetDeviceCertificateRequest, SetDeviceCertificateResponse, SetHubCARequest, TwinDocument, UpdateDeviceRequest, UpdateHubRequest, UpdateRouteRequest } from './types.gen';
4
4
  /**
5
5
  * IoT Hub API.
@@ -7,8 +7,11 @@ import type { CreateDeviceRequest, CreateDeviceResponse, CreateHubRequest, Creat
7
7
  This API allows you to manage your IoT hubs and devices.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
- /** Lists the available regions of the API. */
11
- static readonly LOCALITIES: ScwRegion[];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
12
15
  protected pageOfListHubs: (request?: Readonly<ListHubsRequest>) => Promise<ListHubsResponse>;
13
16
  /**
14
17
  * List hubs. List all Hubs in the specified zone. By default, returned Hubs are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
@@ -1,12 +1,17 @@
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 { HUB_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { unmarshalListHubsResponse, marshalCreateHubRequest, unmarshalHub, marshalUpdateHubRequest, unmarshalGetHubMetricsResponse, marshalSetHubCARequest, unmarshalGetHubCAResponse, unmarshalListDevicesResponse, marshalCreateDeviceRequest, unmarshalCreateDeviceResponse, unmarshalDevice, marshalUpdateDeviceRequest, unmarshalRenewDeviceCertificateResponse, marshalSetDeviceCertificateRequest, unmarshalSetDeviceCertificateResponse, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalListRoutesResponse, marshalCreateRouteRequest, unmarshalRoute, marshalUpdateRouteRequest, unmarshalListNetworksResponse, marshalCreateNetworkRequest, unmarshalCreateNetworkResponse, unmarshalNetwork, unmarshalTwinDocument, marshalPutTwinDocumentRequest, marshalPatchTwinDocumentRequest, unmarshalListTwinDocumentsResponse } 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 regions of the API. */
9
- static LOCALITIES = ["fr-par"];
8
+ /**
9
+ * Locality of this API.
10
+ * type ∈ {'zone','region','global','unspecified'}
11
+ */
12
+ static LOCALITY = toApiLocality({
13
+ regions: ["fr-par"]
14
+ });
10
15
  pageOfListHubs = (request = {}) => this.client.fetch(
11
16
  {
12
17
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject, unmarshalTimeSeries } from "@scaleway/sdk-client";
2
+ import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries } from "@scaleway/sdk-client";
3
3
  const unmarshalDeviceMessageFiltersRule = (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-iot",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Scaleway SDK iot",
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",