@scaleway/sdk-iot 2.3.1 → 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.
@@ -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 { HUB_TRANSIENT_STATUSES } from "./content.gen.js";
2
2
  import { marshalCreateDeviceRequest, marshalCreateHubRequest, marshalCreateNetworkRequest, marshalCreateRouteRequest, marshalPatchTwinDocumentRequest, marshalPutTwinDocumentRequest, marshalSetDeviceCertificateRequest, marshalSetHubCARequest, marshalUpdateDeviceRequest, marshalUpdateHubRequest, marshalUpdateRouteRequest, unmarshalCreateDeviceResponse, unmarshalCreateNetworkResponse, unmarshalDevice, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalGetHubCAResponse, unmarshalGetHubMetricsResponse, unmarshalHub, unmarshalListDevicesResponse, unmarshalListHubsResponse, unmarshalListNetworksResponse, unmarshalListRoutesResponse, unmarshalListTwinDocumentsResponse, unmarshalNetwork, unmarshalRenewDeviceCertificateResponse, unmarshalRoute, unmarshalSetDeviceCertificateResponse, unmarshalTwinDocument } 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
  * IoT Hub API.
7
8
 
8
9
  This API allows you to manage your IoT hubs and devices.
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'}
@@ -430,4 +431,5 @@ var API$1 = class extends API {
430
431
  path: `/iot/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam("twinId", request.twinId)}`
431
432
  });
432
433
  };
433
- export { API$1 as API };
434
+ //#endregion
435
+ export { API };
@@ -1,3 +1,5 @@
1
+ //#region src/v1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link HubStatus}. */
2
- const HUB_TRANSIENT_STATUSES = ["enabling", "disabling"];
3
+ var HUB_TRANSIENT_STATUSES = ["enabling", "disabling"];
4
+ //#endregion
3
5
  export { HUB_TRANSIENT_STATUSES };
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { HUB_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalCreateDeviceRequest, marshalCreateHubRequest, marshalCreateNetworkRequest, marshalCreateRouteRequest, marshalPatchTwinDocumentRequest, marshalPutTwinDocumentRequest, marshalSetDeviceCertificateRequest, marshalSetHubCARequest, marshalUpdateDeviceRequest, marshalUpdateHubRequest, marshalUpdateRouteRequest, unmarshalCreateDeviceResponse, unmarshalCreateNetworkResponse, unmarshalDevice, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalGetHubCAResponse, unmarshalGetHubMetricsResponse, unmarshalHub, unmarshalListDevicesResponse, unmarshalListHubsResponse, unmarshalListNetworksResponse, unmarshalListRoutesResponse, unmarshalListTwinDocumentsResponse, unmarshalNetwork, unmarshalRenewDeviceCertificateResponse, unmarshalRoute, unmarshalSetDeviceCertificateResponse, unmarshalTwinDocument } from "./marshalling.gen.js";
4
4
  import { API } from "./api.gen.js";
5
+ //#region src/v1/index.gen.ts
5
6
  var index_gen_exports = /* @__PURE__ */ __exportAll({
6
7
  API: () => API,
7
8
  HUB_TRANSIENT_STATUSES: () => HUB_TRANSIENT_STATUSES,
@@ -35,4 +36,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
35
36
  unmarshalSetDeviceCertificateResponse: () => unmarshalSetDeviceCertificateResponse,
36
37
  unmarshalTwinDocument: () => unmarshalTwinDocument
37
38
  });
38
- export { index_gen_exports };
39
+ //#endregion
40
+ export { API, HUB_TRANSIENT_STATUSES, index_gen_exports, marshalCreateDeviceRequest, marshalCreateHubRequest, marshalCreateNetworkRequest, marshalCreateRouteRequest, marshalPatchTwinDocumentRequest, marshalPutTwinDocumentRequest, marshalSetDeviceCertificateRequest, marshalSetHubCARequest, marshalUpdateDeviceRequest, marshalUpdateHubRequest, marshalUpdateRouteRequest, unmarshalCreateDeviceResponse, unmarshalCreateNetworkResponse, unmarshalDevice, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalGetHubCAResponse, unmarshalGetHubMetricsResponse, unmarshalHub, unmarshalListDevicesResponse, unmarshalListHubsResponse, unmarshalListNetworksResponse, unmarshalListRoutesResponse, unmarshalListTwinDocumentsResponse, unmarshalNetwork, unmarshalRenewDeviceCertificateResponse, unmarshalRoute, unmarshalSetDeviceCertificateResponse, unmarshalTwinDocument };
@@ -1,5 +1,6 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
+ //#region src/v1/marshalling.gen.ts
3
4
  var unmarshalDeviceMessageFiltersRule = (data) => {
4
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeviceMessageFiltersRule' failed as data isn't a dictionary.`);
5
6
  return {
@@ -14,7 +15,7 @@ var unmarshalDeviceMessageFilters = (data) => {
14
15
  subscribe: data.subscribe ? unmarshalDeviceMessageFiltersRule(data.subscribe) : void 0
15
16
  };
16
17
  };
17
- const unmarshalDevice = (data) => {
18
+ var unmarshalDevice = (data) => {
18
19
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Device' failed as data isn't a dictionary.`);
19
20
  return {
20
21
  allowInsecure: data.allow_insecure,
@@ -33,7 +34,7 @@ const unmarshalDevice = (data) => {
33
34
  updatedAt: unmarshalDate(data.updated_at)
34
35
  };
35
36
  };
36
- const unmarshalNetwork = (data) => {
37
+ var unmarshalNetwork = (data) => {
37
38
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Network' failed as data isn't a dictionary.`);
38
39
  return {
39
40
  createdAt: unmarshalDate(data.created_at),
@@ -50,7 +51,7 @@ var unmarshalHubTwinsGraphiteConfig = (data) => {
50
51
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HubTwinsGraphiteConfig' failed as data isn't a dictionary.`);
51
52
  return { pushUri: data.push_uri };
52
53
  };
53
- const unmarshalHub = (data) => {
54
+ var unmarshalHub = (data) => {
54
55
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Hub' failed as data isn't a dictionary.`);
55
56
  return {
56
57
  connectedDeviceCount: data.connected_device_count,
@@ -80,54 +81,54 @@ var unmarshalCertificate = (data) => {
80
81
  key: data.key
81
82
  };
82
83
  };
83
- const unmarshalCreateDeviceResponse = (data) => {
84
+ var unmarshalCreateDeviceResponse = (data) => {
84
85
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateDeviceResponse' failed as data isn't a dictionary.`);
85
86
  return {
86
87
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : void 0,
87
88
  device: data.device ? unmarshalDevice(data.device) : void 0
88
89
  };
89
90
  };
90
- const unmarshalCreateNetworkResponse = (data) => {
91
+ var unmarshalCreateNetworkResponse = (data) => {
91
92
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateNetworkResponse' failed as data isn't a dictionary.`);
92
93
  return {
93
94
  network: data.network ? unmarshalNetwork(data.network) : void 0,
94
95
  secret: data.secret
95
96
  };
96
97
  };
97
- const unmarshalGetDeviceCertificateResponse = (data) => {
98
+ var unmarshalGetDeviceCertificateResponse = (data) => {
98
99
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDeviceCertificateResponse' failed as data isn't a dictionary.`);
99
100
  return {
100
101
  certificatePem: data.certificate_pem,
101
102
  device: data.device ? unmarshalDevice(data.device) : void 0
102
103
  };
103
104
  };
104
- const unmarshalGetDeviceMetricsResponse = (data) => {
105
+ var unmarshalGetDeviceMetricsResponse = (data) => {
105
106
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDeviceMetricsResponse' failed as data isn't a dictionary.`);
106
107
  return { metrics: unmarshalArrayOfObject(data.metrics, unmarshalTimeSeries) };
107
108
  };
108
- const unmarshalGetHubCAResponse = (data) => {
109
+ var unmarshalGetHubCAResponse = (data) => {
109
110
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetHubCAResponse' failed as data isn't a dictionary.`);
110
111
  return { caCertPem: data.ca_cert_pem };
111
112
  };
112
- const unmarshalGetHubMetricsResponse = (data) => {
113
+ var unmarshalGetHubMetricsResponse = (data) => {
113
114
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetHubMetricsResponse' failed as data isn't a dictionary.`);
114
115
  return { metrics: unmarshalArrayOfObject(data.metrics, unmarshalTimeSeries) };
115
116
  };
116
- const unmarshalListDevicesResponse = (data) => {
117
+ var unmarshalListDevicesResponse = (data) => {
117
118
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDevicesResponse' failed as data isn't a dictionary.`);
118
119
  return {
119
120
  devices: unmarshalArrayOfObject(data.devices, unmarshalDevice),
120
121
  totalCount: data.total_count
121
122
  };
122
123
  };
123
- const unmarshalListHubsResponse = (data) => {
124
+ var unmarshalListHubsResponse = (data) => {
124
125
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListHubsResponse' failed as data isn't a dictionary.`);
125
126
  return {
126
127
  hubs: unmarshalArrayOfObject(data.hubs, unmarshalHub),
127
128
  totalCount: data.total_count
128
129
  };
129
130
  };
130
- const unmarshalListNetworksResponse = (data) => {
131
+ var unmarshalListNetworksResponse = (data) => {
131
132
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNetworksResponse' failed as data isn't a dictionary.`);
132
133
  return {
133
134
  networks: unmarshalArrayOfObject(data.networks, unmarshalNetwork),
@@ -147,7 +148,7 @@ var unmarshalRouteSummary = (data) => {
147
148
  updatedAt: unmarshalDate(data.updated_at)
148
149
  };
149
150
  };
150
- const unmarshalListRoutesResponse = (data) => {
151
+ var unmarshalListRoutesResponse = (data) => {
151
152
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`);
152
153
  return {
153
154
  routes: unmarshalArrayOfObject(data.routes, unmarshalRouteSummary),
@@ -158,11 +159,11 @@ var unmarshalListTwinDocumentsResponseDocumentSummary = (data) => {
158
159
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTwinDocumentsResponseDocumentSummary' failed as data isn't a dictionary.`);
159
160
  return { documentName: data.document_name };
160
161
  };
161
- const unmarshalListTwinDocumentsResponse = (data) => {
162
+ var unmarshalListTwinDocumentsResponse = (data) => {
162
163
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTwinDocumentsResponse' failed as data isn't a dictionary.`);
163
164
  return { documents: unmarshalArrayOfObject(data.documents, unmarshalListTwinDocumentsResponseDocumentSummary) };
164
165
  };
165
- const unmarshalRenewDeviceCertificateResponse = (data) => {
166
+ var unmarshalRenewDeviceCertificateResponse = (data) => {
166
167
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RenewDeviceCertificateResponse' failed as data isn't a dictionary.`);
167
168
  return {
168
169
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : void 0,
@@ -198,7 +199,7 @@ var unmarshalRouteS3Config = (data) => {
198
199
  strategy: data.strategy
199
200
  };
200
201
  };
201
- const unmarshalRoute = (data) => {
202
+ var unmarshalRoute = (data) => {
202
203
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
203
204
  return {
204
205
  createdAt: unmarshalDate(data.created_at),
@@ -214,14 +215,14 @@ const unmarshalRoute = (data) => {
214
215
  updatedAt: unmarshalDate(data.updated_at)
215
216
  };
216
217
  };
217
- const unmarshalSetDeviceCertificateResponse = (data) => {
218
+ var unmarshalSetDeviceCertificateResponse = (data) => {
218
219
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetDeviceCertificateResponse' failed as data isn't a dictionary.`);
219
220
  return {
220
221
  certificatePem: data.certificate_pem,
221
222
  device: data.device ? unmarshalDevice(data.device) : void 0
222
223
  };
223
224
  };
224
- const unmarshalTwinDocument = (data) => {
225
+ var unmarshalTwinDocument = (data) => {
225
226
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TwinDocument' failed as data isn't a dictionary.`);
226
227
  return {
227
228
  data: data.data,
@@ -238,7 +239,7 @@ var marshalDeviceMessageFilters = (request, defaults) => ({
238
239
  publish: request.publish !== void 0 ? marshalDeviceMessageFiltersRule(request.publish, defaults) : void 0,
239
240
  subscribe: request.subscribe !== void 0 ? marshalDeviceMessageFiltersRule(request.subscribe, defaults) : void 0
240
241
  });
241
- const marshalCreateDeviceRequest = (request, defaults) => ({
242
+ var marshalCreateDeviceRequest = (request, defaults) => ({
242
243
  allow_insecure: request.allowInsecure,
243
244
  allow_multiple_connections: request.allowMultipleConnections,
244
245
  description: request.description,
@@ -247,7 +248,7 @@ const marshalCreateDeviceRequest = (request, defaults) => ({
247
248
  name: request.name || randomName("device")
248
249
  });
249
250
  var marshalHubTwinsGraphiteConfig = (request, defaults) => ({ push_uri: request.pushUri });
250
- const marshalCreateHubRequest = (request, defaults) => ({
251
+ var marshalCreateHubRequest = (request, defaults) => ({
251
252
  disable_events: request.disableEvents,
252
253
  events_topic_prefix: request.eventsTopicPrefix,
253
254
  name: request.name || randomName("hub"),
@@ -258,7 +259,7 @@ const marshalCreateHubRequest = (request, defaults) => ({
258
259
  value: request.twinsGraphiteConfig !== void 0 ? marshalHubTwinsGraphiteConfig(request.twinsGraphiteConfig, defaults) : void 0
259
260
  }])
260
261
  });
261
- const marshalCreateNetworkRequest = (request, defaults) => ({
262
+ var marshalCreateNetworkRequest = (request, defaults) => ({
262
263
  hub_id: request.hubId,
263
264
  name: request.name || randomName("network"),
264
265
  topic_prefix: request.topicPrefix,
@@ -284,7 +285,7 @@ var marshalCreateRouteRequestS3Config = (request, defaults) => ({
284
285
  object_prefix: request.objectPrefix,
285
286
  strategy: request.strategy
286
287
  });
287
- const marshalCreateRouteRequest = (request, defaults) => ({
288
+ var marshalCreateRouteRequest = (request, defaults) => ({
288
289
  hub_id: request.hubId,
289
290
  name: request.name || randomName("route"),
290
291
  topic: request.topic,
@@ -303,27 +304,27 @@ const marshalCreateRouteRequest = (request, defaults) => ({
303
304
  }
304
305
  ])
305
306
  });
306
- const marshalPatchTwinDocumentRequest = (request, defaults) => ({
307
+ var marshalPatchTwinDocumentRequest = (request, defaults) => ({
307
308
  data: request.data,
308
309
  version: request.version
309
310
  });
310
- const marshalPutTwinDocumentRequest = (request, defaults) => ({
311
+ var marshalPutTwinDocumentRequest = (request, defaults) => ({
311
312
  data: request.data,
312
313
  version: request.version
313
314
  });
314
- const marshalSetDeviceCertificateRequest = (request, defaults) => ({ certificate_pem: request.certificatePem });
315
- const marshalSetHubCARequest = (request, defaults) => ({
315
+ var marshalSetDeviceCertificateRequest = (request, defaults) => ({ certificate_pem: request.certificatePem });
316
+ var marshalSetHubCARequest = (request, defaults) => ({
316
317
  ca_cert_pem: request.caCertPem,
317
318
  challenge_cert_pem: request.challengeCertPem
318
319
  });
319
- const marshalUpdateDeviceRequest = (request, defaults) => ({
320
+ var marshalUpdateDeviceRequest = (request, defaults) => ({
320
321
  allow_insecure: request.allowInsecure,
321
322
  allow_multiple_connections: request.allowMultipleConnections,
322
323
  description: request.description,
323
324
  hub_id: request.hubId,
324
325
  message_filters: request.messageFilters !== void 0 ? marshalDeviceMessageFilters(request.messageFilters, defaults) : void 0
325
326
  });
326
- const marshalUpdateHubRequest = (request, defaults) => ({
327
+ var marshalUpdateHubRequest = (request, defaults) => ({
327
328
  disable_events: request.disableEvents,
328
329
  enable_device_auto_provisioning: request.enableDeviceAutoProvisioning,
329
330
  events_topic_prefix: request.eventsTopicPrefix,
@@ -354,7 +355,7 @@ var marshalUpdateRouteRequestS3Config = (request, defaults) => ({
354
355
  object_prefix: request.objectPrefix,
355
356
  strategy: request.strategy
356
357
  });
357
- const marshalUpdateRouteRequest = (request, defaults) => ({
358
+ var marshalUpdateRouteRequest = (request, defaults) => ({
358
359
  name: request.name,
359
360
  topic: request.topic,
360
361
  ...resolveOneOf([
@@ -372,4 +373,5 @@ const marshalUpdateRouteRequest = (request, defaults) => ({
372
373
  }
373
374
  ])
374
375
  });
376
+ //#endregion
375
377
  export { marshalCreateDeviceRequest, marshalCreateHubRequest, marshalCreateNetworkRequest, marshalCreateRouteRequest, marshalPatchTwinDocumentRequest, marshalPutTwinDocumentRequest, marshalSetDeviceCertificateRequest, marshalSetHubCARequest, marshalUpdateDeviceRequest, marshalUpdateHubRequest, marshalUpdateRouteRequest, unmarshalCreateDeviceResponse, unmarshalCreateNetworkResponse, unmarshalDevice, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalGetHubCAResponse, unmarshalGetHubMetricsResponse, unmarshalHub, unmarshalListDevicesResponse, unmarshalListHubsResponse, unmarshalListNetworksResponse, unmarshalListRoutesResponse, unmarshalListTwinDocumentsResponse, unmarshalNetwork, unmarshalRenewDeviceCertificateResponse, unmarshalRoute, unmarshalSetDeviceCertificateResponse, unmarshalTwinDocument };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-iot",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Scaleway SDK iot",
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",