@scaleway/sdk 1.34.0 → 2.0.0-alpha.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.
- package/dist/api/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ const jsonContentHeaders = {
|
|
|
14
14
|
/**
|
|
15
15
|
* IoT Hub API.
|
|
16
16
|
*
|
|
17
|
-
* This API allows you to manage IoT hubs and devices.
|
|
17
|
+
* This API allows you to manage IoT hubs and devices.
|
|
18
18
|
*/
|
|
19
19
|
class API extends API$1 {
|
|
20
20
|
/** Lists the available regions of the API. */
|
|
@@ -28,7 +28,7 @@ class API extends API$1 {
|
|
|
28
28
|
return _this.client.fetch({
|
|
29
29
|
method: 'GET',
|
|
30
30
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/hubs`,
|
|
31
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
31
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
32
32
|
}, unmarshalListHubsResponse);
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
@@ -58,12 +58,20 @@ class API extends API$1 {
|
|
|
58
58
|
* @param request - The request {@link CreateHubRequest}
|
|
59
59
|
* @returns A Promise of Hub
|
|
60
60
|
*/
|
|
61
|
-
createHub =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
createHub = (() => {
|
|
62
|
+
var _this3 = this;
|
|
63
|
+
return function (request) {
|
|
64
|
+
if (request === void 0) {
|
|
65
|
+
request = {};
|
|
66
|
+
}
|
|
67
|
+
return _this3.client.fetch({
|
|
68
|
+
body: JSON.stringify(marshalCreateHubRequest(request, _this3.client.settings)),
|
|
69
|
+
headers: jsonContentHeaders,
|
|
70
|
+
method: 'POST',
|
|
71
|
+
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/hubs`
|
|
72
|
+
}, unmarshalHub);
|
|
73
|
+
};
|
|
74
|
+
})();
|
|
67
75
|
|
|
68
76
|
/**
|
|
69
77
|
* Get a hub. Retrieve information about an existing IoT Hub, specified by its
|
|
@@ -179,15 +187,15 @@ class API extends API$1 {
|
|
|
179
187
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/ca`
|
|
180
188
|
}, unmarshalGetHubCAResponse);
|
|
181
189
|
pageOfListDevices = (() => {
|
|
182
|
-
var
|
|
190
|
+
var _this4 = this;
|
|
183
191
|
return function (request) {
|
|
184
192
|
if (request === void 0) {
|
|
185
193
|
request = {};
|
|
186
194
|
}
|
|
187
|
-
return
|
|
195
|
+
return _this4.client.fetch({
|
|
188
196
|
method: 'GET',
|
|
189
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ??
|
|
190
|
-
urlParams: urlParams(['allow_insecure', request.allowInsecure], ['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy
|
|
197
|
+
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/devices`,
|
|
198
|
+
urlParams: urlParams(['allow_insecure', request.allowInsecure], ['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['status', request.status])
|
|
191
199
|
}, unmarshalListDevicesResponse);
|
|
192
200
|
};
|
|
193
201
|
})();
|
|
@@ -201,12 +209,12 @@ class API extends API$1 {
|
|
|
201
209
|
* @returns A Promise of ListDevicesResponse
|
|
202
210
|
*/
|
|
203
211
|
listDevices = (() => {
|
|
204
|
-
var
|
|
212
|
+
var _this5 = this;
|
|
205
213
|
return function (request) {
|
|
206
214
|
if (request === void 0) {
|
|
207
215
|
request = {};
|
|
208
216
|
}
|
|
209
|
-
return enrichForPagination('devices',
|
|
217
|
+
return enrichForPagination('devices', _this5.pageOfListDevices, request);
|
|
210
218
|
};
|
|
211
219
|
})();
|
|
212
220
|
|
|
@@ -342,15 +350,15 @@ class API extends API$1 {
|
|
|
342
350
|
urlParams: urlParams(['start_date', request.startDate])
|
|
343
351
|
}, unmarshalGetDeviceMetricsResponse);
|
|
344
352
|
pageOfListRoutes = (() => {
|
|
345
|
-
var
|
|
353
|
+
var _this6 = this;
|
|
346
354
|
return function (request) {
|
|
347
355
|
if (request === void 0) {
|
|
348
356
|
request = {};
|
|
349
357
|
}
|
|
350
|
-
return
|
|
358
|
+
return _this6.client.fetch({
|
|
351
359
|
method: 'GET',
|
|
352
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ??
|
|
353
|
-
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy
|
|
360
|
+
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/routes`,
|
|
361
|
+
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
|
|
354
362
|
}, unmarshalListRoutesResponse);
|
|
355
363
|
};
|
|
356
364
|
})();
|
|
@@ -364,12 +372,12 @@ class API extends API$1 {
|
|
|
364
372
|
* @returns A Promise of ListRoutesResponse
|
|
365
373
|
*/
|
|
366
374
|
listRoutes = (() => {
|
|
367
|
-
var
|
|
375
|
+
var _this7 = this;
|
|
368
376
|
return function (request) {
|
|
369
377
|
if (request === void 0) {
|
|
370
378
|
request = {};
|
|
371
379
|
}
|
|
372
|
-
return enrichForPagination('routes',
|
|
380
|
+
return enrichForPagination('routes', _this7.pageOfListRoutes, request);
|
|
373
381
|
};
|
|
374
382
|
})();
|
|
375
383
|
|
|
@@ -382,7 +390,7 @@ class API extends API$1 {
|
|
|
382
390
|
* MQTT messages.
|
|
383
391
|
* - S3 Routes. Create a route that will put subscribed MQTT messages into an S3
|
|
384
392
|
* bucket. You need to create the bucket yourself and grant write access.
|
|
385
|
-
* Granting can be done with s3cmd (`s3cmd setacl s3
|
|
393
|
+
* Granting can be done with s3cmd (`s3cmd setacl s3://<my-bucket>
|
|
386
394
|
* --acl-grant=write:555c69c3-87d0-4bf8-80f1-99a2f757d031:555c69c3-87d0-4bf8-80f1-99a2f757d031`).
|
|
387
395
|
*
|
|
388
396
|
* @param request - The request {@link CreateRouteRequest}
|
|
@@ -433,15 +441,15 @@ class API extends API$1 {
|
|
|
433
441
|
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
434
442
|
});
|
|
435
443
|
pageOfListNetworks = (() => {
|
|
436
|
-
var
|
|
444
|
+
var _this8 = this;
|
|
437
445
|
return function (request) {
|
|
438
446
|
if (request === void 0) {
|
|
439
447
|
request = {};
|
|
440
448
|
}
|
|
441
|
-
return
|
|
449
|
+
return _this8.client.fetch({
|
|
442
450
|
method: 'GET',
|
|
443
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ??
|
|
444
|
-
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy
|
|
451
|
+
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/networks`,
|
|
452
|
+
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['topic_prefix', request.topicPrefix])
|
|
445
453
|
}, unmarshalListNetworksResponse);
|
|
446
454
|
};
|
|
447
455
|
})();
|
|
@@ -453,12 +461,12 @@ class API extends API$1 {
|
|
|
453
461
|
* @returns A Promise of ListNetworksResponse
|
|
454
462
|
*/
|
|
455
463
|
listNetworks = (() => {
|
|
456
|
-
var
|
|
464
|
+
var _this9 = this;
|
|
457
465
|
return function (request) {
|
|
458
466
|
if (request === void 0) {
|
|
459
467
|
request = {};
|
|
460
468
|
}
|
|
461
|
-
return enrichForPagination('networks',
|
|
469
|
+
return enrichForPagination('networks', _this9.pageOfListNetworks, request);
|
|
462
470
|
};
|
|
463
471
|
})();
|
|
464
472
|
|
|
@@ -11,7 +11,7 @@ const unmarshalDeviceMessageFiltersRule = data => {
|
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
policy: data.policy,
|
|
14
|
-
topics: data.topics
|
|
14
|
+
topics: data.topics ? data.topics : undefined
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const unmarshalDeviceMessageFilters = data => {
|
|
@@ -19,25 +19,8 @@ const unmarshalDeviceMessageFilters = data => {
|
|
|
19
19
|
throw new TypeError(`Unmarshalling the type 'DeviceMessageFilters' failed as data isn't a dictionary.`);
|
|
20
20
|
}
|
|
21
21
|
return {
|
|
22
|
-
publish:
|
|
23
|
-
subscribe:
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const unmarshalHubTwinsGraphiteConfig = data => {
|
|
27
|
-
if (!isJSONObject(data)) {
|
|
28
|
-
throw new TypeError(`Unmarshalling the type 'HubTwinsGraphiteConfig' failed as data isn't a dictionary.`);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
pushUri: data.push_uri
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
const unmarshalCertificate = data => {
|
|
35
|
-
if (!isJSONObject(data)) {
|
|
36
|
-
throw new TypeError(`Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`);
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
crt: data.crt,
|
|
40
|
-
key: data.key
|
|
22
|
+
publish: unmarshalDeviceMessageFiltersRule(data.publish),
|
|
23
|
+
subscribe: unmarshalDeviceMessageFiltersRule(data.subscribe)
|
|
41
24
|
};
|
|
42
25
|
};
|
|
43
26
|
const unmarshalDevice = data => {
|
|
@@ -54,45 +37,12 @@ const unmarshalDevice = data => {
|
|
|
54
37
|
id: data.id,
|
|
55
38
|
isConnected: data.is_connected,
|
|
56
39
|
lastActivityAt: unmarshalDate(data.last_activity_at),
|
|
57
|
-
messageFilters:
|
|
40
|
+
messageFilters: unmarshalDeviceMessageFilters(data.message_filters),
|
|
58
41
|
name: data.name,
|
|
59
42
|
status: data.status,
|
|
60
43
|
updatedAt: unmarshalDate(data.updated_at)
|
|
61
44
|
};
|
|
62
45
|
};
|
|
63
|
-
const unmarshalHub = data => {
|
|
64
|
-
if (!isJSONObject(data)) {
|
|
65
|
-
throw new TypeError(`Unmarshalling the type 'Hub' failed as data isn't a dictionary.`);
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
connectedDeviceCount: data.connected_device_count,
|
|
69
|
-
createdAt: unmarshalDate(data.created_at),
|
|
70
|
-
deviceCount: data.device_count,
|
|
71
|
-
disableEvents: data.disable_events,
|
|
72
|
-
enabled: data.enabled,
|
|
73
|
-
enableDeviceAutoProvisioning: data.enable_device_auto_provisioning,
|
|
74
|
-
endpoint: data.endpoint,
|
|
75
|
-
eventsTopicPrefix: data.events_topic_prefix,
|
|
76
|
-
hasCustomCa: data.has_custom_ca,
|
|
77
|
-
id: data.id,
|
|
78
|
-
name: data.name,
|
|
79
|
-
organizationId: data.organization_id,
|
|
80
|
-
productPlan: data.product_plan,
|
|
81
|
-
projectId: data.project_id,
|
|
82
|
-
region: data.region,
|
|
83
|
-
status: data.status,
|
|
84
|
-
twinsGraphiteConfig: data.twins_graphite_config ? unmarshalHubTwinsGraphiteConfig(data.twins_graphite_config) : undefined,
|
|
85
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
const unmarshalListTwinDocumentsResponseDocumentSummary = data => {
|
|
89
|
-
if (!isJSONObject(data)) {
|
|
90
|
-
throw new TypeError(`Unmarshalling the type 'ListTwinDocumentsResponseDocumentSummary' failed as data isn't a dictionary.`);
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
documentName: data.document_name
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
46
|
const unmarshalNetwork = data => {
|
|
97
47
|
if (!isJSONObject(data)) {
|
|
98
48
|
throw new TypeError(`Unmarshalling the type 'Network' failed as data isn't a dictionary.`);
|
|
@@ -107,53 +57,46 @@ const unmarshalNetwork = data => {
|
|
|
107
57
|
type: data.type
|
|
108
58
|
};
|
|
109
59
|
};
|
|
110
|
-
const
|
|
111
|
-
if (!isJSONObject(data)) {
|
|
112
|
-
throw new TypeError(`Unmarshalling the type 'RouteDatabaseConfig' failed as data isn't a dictionary.`);
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
dbname: data.dbname,
|
|
116
|
-
engine: data.engine,
|
|
117
|
-
host: data.host,
|
|
118
|
-
password: data.password,
|
|
119
|
-
port: data.port,
|
|
120
|
-
query: data.query,
|
|
121
|
-
username: data.username
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
const unmarshalRouteRestConfig = data => {
|
|
60
|
+
const unmarshalHubTwinsGraphiteConfig = data => {
|
|
125
61
|
if (!isJSONObject(data)) {
|
|
126
|
-
throw new TypeError(`Unmarshalling the type '
|
|
62
|
+
throw new TypeError(`Unmarshalling the type 'HubTwinsGraphiteConfig' failed as data isn't a dictionary.`);
|
|
127
63
|
}
|
|
128
64
|
return {
|
|
129
|
-
|
|
130
|
-
uri: data.uri,
|
|
131
|
-
verb: data.verb
|
|
65
|
+
pushUri: data.push_uri
|
|
132
66
|
};
|
|
133
67
|
};
|
|
134
|
-
const
|
|
68
|
+
const unmarshalHub = data => {
|
|
135
69
|
if (!isJSONObject(data)) {
|
|
136
|
-
throw new TypeError(`Unmarshalling the type '
|
|
70
|
+
throw new TypeError(`Unmarshalling the type 'Hub' failed as data isn't a dictionary.`);
|
|
137
71
|
}
|
|
138
72
|
return {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
73
|
+
connectedDeviceCount: data.connected_device_count,
|
|
74
|
+
createdAt: unmarshalDate(data.created_at),
|
|
75
|
+
deviceCount: data.device_count,
|
|
76
|
+
disableEvents: data.disable_events,
|
|
77
|
+
enableDeviceAutoProvisioning: data.enable_device_auto_provisioning,
|
|
78
|
+
enabled: data.enabled,
|
|
79
|
+
endpoint: data.endpoint,
|
|
80
|
+
eventsTopicPrefix: data.events_topic_prefix,
|
|
81
|
+
hasCustomCa: data.has_custom_ca,
|
|
82
|
+
id: data.id,
|
|
83
|
+
name: data.name,
|
|
84
|
+
organizationId: data.organization_id,
|
|
85
|
+
productPlan: data.product_plan,
|
|
86
|
+
projectId: data.project_id,
|
|
87
|
+
region: data.region,
|
|
88
|
+
status: data.status,
|
|
89
|
+
twinsGraphiteConfig: data.twins_graphite_config ? unmarshalHubTwinsGraphiteConfig(data.twins_graphite_config) : undefined,
|
|
90
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
143
91
|
};
|
|
144
92
|
};
|
|
145
|
-
const
|
|
93
|
+
const unmarshalCertificate = data => {
|
|
146
94
|
if (!isJSONObject(data)) {
|
|
147
|
-
throw new TypeError(`Unmarshalling the type '
|
|
95
|
+
throw new TypeError(`Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`);
|
|
148
96
|
}
|
|
149
97
|
return {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
id: data.id,
|
|
153
|
-
name: data.name,
|
|
154
|
-
topic: data.topic,
|
|
155
|
-
type: data.type,
|
|
156
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
98
|
+
crt: data.crt,
|
|
99
|
+
key: data.key
|
|
157
100
|
};
|
|
158
101
|
};
|
|
159
102
|
const unmarshalCreateDeviceResponse = data => {
|
|
@@ -161,8 +104,8 @@ const unmarshalCreateDeviceResponse = data => {
|
|
|
161
104
|
throw new TypeError(`Unmarshalling the type 'CreateDeviceResponse' failed as data isn't a dictionary.`);
|
|
162
105
|
}
|
|
163
106
|
return {
|
|
164
|
-
certificate:
|
|
165
|
-
device:
|
|
107
|
+
certificate: unmarshalCertificate(data.certificate),
|
|
108
|
+
device: unmarshalDevice(data.device)
|
|
166
109
|
};
|
|
167
110
|
};
|
|
168
111
|
const unmarshalCreateNetworkResponse = data => {
|
|
@@ -170,7 +113,7 @@ const unmarshalCreateNetworkResponse = data => {
|
|
|
170
113
|
throw new TypeError(`Unmarshalling the type 'CreateNetworkResponse' failed as data isn't a dictionary.`);
|
|
171
114
|
}
|
|
172
115
|
return {
|
|
173
|
-
network:
|
|
116
|
+
network: unmarshalNetwork(data.network),
|
|
174
117
|
secret: data.secret
|
|
175
118
|
};
|
|
176
119
|
};
|
|
@@ -180,7 +123,7 @@ const unmarshalGetDeviceCertificateResponse = data => {
|
|
|
180
123
|
}
|
|
181
124
|
return {
|
|
182
125
|
certificatePem: data.certificate_pem,
|
|
183
|
-
device:
|
|
126
|
+
device: unmarshalDevice(data.device)
|
|
184
127
|
};
|
|
185
128
|
};
|
|
186
129
|
const unmarshalGetDeviceMetricsResponse = data => {
|
|
@@ -234,6 +177,20 @@ const unmarshalListNetworksResponse = data => {
|
|
|
234
177
|
totalCount: data.total_count
|
|
235
178
|
};
|
|
236
179
|
};
|
|
180
|
+
const unmarshalRouteSummary = data => {
|
|
181
|
+
if (!isJSONObject(data)) {
|
|
182
|
+
throw new TypeError(`Unmarshalling the type 'RouteSummary' failed as data isn't a dictionary.`);
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
createdAt: unmarshalDate(data.created_at),
|
|
186
|
+
hubId: data.hub_id,
|
|
187
|
+
id: data.id,
|
|
188
|
+
name: data.name,
|
|
189
|
+
topic: data.topic,
|
|
190
|
+
type: data.type,
|
|
191
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
192
|
+
};
|
|
193
|
+
};
|
|
237
194
|
const unmarshalListRoutesResponse = data => {
|
|
238
195
|
if (!isJSONObject(data)) {
|
|
239
196
|
throw new TypeError(`Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`);
|
|
@@ -243,6 +200,14 @@ const unmarshalListRoutesResponse = data => {
|
|
|
243
200
|
totalCount: data.total_count
|
|
244
201
|
};
|
|
245
202
|
};
|
|
203
|
+
const unmarshalListTwinDocumentsResponseDocumentSummary = data => {
|
|
204
|
+
if (!isJSONObject(data)) {
|
|
205
|
+
throw new TypeError(`Unmarshalling the type 'ListTwinDocumentsResponseDocumentSummary' failed as data isn't a dictionary.`);
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
documentName: data.document_name
|
|
209
|
+
};
|
|
210
|
+
};
|
|
246
211
|
const unmarshalListTwinDocumentsResponse = data => {
|
|
247
212
|
if (!isJSONObject(data)) {
|
|
248
213
|
throw new TypeError(`Unmarshalling the type 'ListTwinDocumentsResponse' failed as data isn't a dictionary.`);
|
|
@@ -256,8 +221,43 @@ const unmarshalRenewDeviceCertificateResponse = data => {
|
|
|
256
221
|
throw new TypeError(`Unmarshalling the type 'RenewDeviceCertificateResponse' failed as data isn't a dictionary.`);
|
|
257
222
|
}
|
|
258
223
|
return {
|
|
259
|
-
certificate:
|
|
260
|
-
device:
|
|
224
|
+
certificate: unmarshalCertificate(data.certificate),
|
|
225
|
+
device: unmarshalDevice(data.device)
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
const unmarshalRouteRestConfig = data => {
|
|
229
|
+
if (!isJSONObject(data)) {
|
|
230
|
+
throw new TypeError(`Unmarshalling the type 'RouteRestConfig' failed as data isn't a dictionary.`);
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
headers: data.headers,
|
|
234
|
+
uri: data.uri,
|
|
235
|
+
verb: data.verb
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
const unmarshalRouteDatabaseConfig = data => {
|
|
239
|
+
if (!isJSONObject(data)) {
|
|
240
|
+
throw new TypeError(`Unmarshalling the type 'RouteDatabaseConfig' failed as data isn't a dictionary.`);
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
dbname: data.dbname,
|
|
244
|
+
engine: data.engine,
|
|
245
|
+
host: data.host,
|
|
246
|
+
password: data.password,
|
|
247
|
+
port: data.port,
|
|
248
|
+
query: data.query,
|
|
249
|
+
username: data.username
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
const unmarshalRouteS3Config = data => {
|
|
253
|
+
if (!isJSONObject(data)) {
|
|
254
|
+
throw new TypeError(`Unmarshalling the type 'RouteS3Config' failed as data isn't a dictionary.`);
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
bucketName: data.bucket_name,
|
|
258
|
+
bucketRegion: data.bucket_region,
|
|
259
|
+
objectPrefix: data.object_prefix,
|
|
260
|
+
strategy: data.strategy
|
|
261
261
|
};
|
|
262
262
|
};
|
|
263
263
|
const unmarshalRoute = data => {
|
|
@@ -283,7 +283,7 @@ const unmarshalSetDeviceCertificateResponse = data => {
|
|
|
283
283
|
}
|
|
284
284
|
return {
|
|
285
285
|
certificatePem: data.certificate_pem,
|
|
286
|
-
device:
|
|
286
|
+
device: unmarshalDevice(data.device)
|
|
287
287
|
};
|
|
288
288
|
};
|
|
289
289
|
const unmarshalTwinDocument = data => {
|
|
@@ -291,69 +291,18 @@ const unmarshalTwinDocument = data => {
|
|
|
291
291
|
throw new TypeError(`Unmarshalling the type 'TwinDocument' failed as data isn't a dictionary.`);
|
|
292
292
|
}
|
|
293
293
|
return {
|
|
294
|
-
data: data.data,
|
|
294
|
+
data: data.data ? data.data : undefined,
|
|
295
295
|
documentName: data.document_name,
|
|
296
296
|
twinId: data.twin_id,
|
|
297
297
|
version: data.version
|
|
298
298
|
};
|
|
299
299
|
};
|
|
300
|
-
const marshalDeviceMessageFiltersRule = (request, defaults) => ({
|
|
301
|
-
policy: request.policy,
|
|
302
|
-
topics: request.topics
|
|
303
|
-
});
|
|
304
|
-
const marshalCreateRouteRequestDatabaseConfig = (request, defaults) => ({
|
|
305
|
-
dbname: request.dbname,
|
|
306
|
-
engine: request.engine,
|
|
307
|
-
host: request.host,
|
|
308
|
-
password: request.password,
|
|
309
|
-
port: request.port,
|
|
310
|
-
query: request.query,
|
|
311
|
-
username: request.username
|
|
312
|
-
});
|
|
313
|
-
const marshalCreateRouteRequestRestConfig = (request, defaults) => ({
|
|
314
|
-
headers: request.headers,
|
|
315
|
-
uri: request.uri,
|
|
316
|
-
verb: request.verb
|
|
317
|
-
});
|
|
318
|
-
const marshalCreateRouteRequestS3Config = (request, defaults) => ({
|
|
319
|
-
bucket_name: request.bucketName,
|
|
320
|
-
bucket_region: request.bucketRegion,
|
|
321
|
-
object_prefix: request.objectPrefix,
|
|
322
|
-
strategy: request.strategy
|
|
323
|
-
});
|
|
324
|
-
const marshalDeviceMessageFilters = (request, defaults) => ({
|
|
325
|
-
publish: request.publish ? marshalDeviceMessageFiltersRule(request.publish) : undefined,
|
|
326
|
-
subscribe: request.subscribe ? marshalDeviceMessageFiltersRule(request.subscribe) : undefined
|
|
327
|
-
});
|
|
328
|
-
const marshalHubTwinsGraphiteConfig = (request, defaults) => ({
|
|
329
|
-
push_uri: request.pushUri
|
|
330
|
-
});
|
|
331
|
-
const marshalUpdateRouteRequestDatabaseConfig = (request, defaults) => ({
|
|
332
|
-
dbname: request.dbname,
|
|
333
|
-
engine: request.engine,
|
|
334
|
-
host: request.host,
|
|
335
|
-
password: request.password,
|
|
336
|
-
port: request.port,
|
|
337
|
-
query: request.query,
|
|
338
|
-
username: request.username
|
|
339
|
-
});
|
|
340
|
-
const marshalUpdateRouteRequestRestConfig = (request, defaults) => ({
|
|
341
|
-
headers: request.headers,
|
|
342
|
-
uri: request.uri,
|
|
343
|
-
verb: request.verb
|
|
344
|
-
});
|
|
345
|
-
const marshalUpdateRouteRequestS3Config = (request, defaults) => ({
|
|
346
|
-
bucket_name: request.bucketName,
|
|
347
|
-
bucket_region: request.bucketRegion,
|
|
348
|
-
object_prefix: request.objectPrefix,
|
|
349
|
-
strategy: request.strategy
|
|
350
|
-
});
|
|
351
300
|
const marshalCreateDeviceRequest = (request, defaults) => ({
|
|
352
301
|
allow_insecure: request.allowInsecure,
|
|
353
302
|
allow_multiple_connections: request.allowMultipleConnections,
|
|
354
303
|
description: request.description,
|
|
355
304
|
hub_id: request.hubId,
|
|
356
|
-
message_filters: request.messageFilters
|
|
305
|
+
message_filters: request.messageFilters,
|
|
357
306
|
name: request.name || randomName('device')
|
|
358
307
|
});
|
|
359
308
|
const marshalCreateHubRequest = (request, defaults) => ({
|
|
@@ -364,7 +313,7 @@ const marshalCreateHubRequest = (request, defaults) => ({
|
|
|
364
313
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
365
314
|
...resolveOneOf([{
|
|
366
315
|
param: 'twins_graphite_config',
|
|
367
|
-
value: request.twinsGraphiteConfig
|
|
316
|
+
value: request.twinsGraphiteConfig
|
|
368
317
|
}])
|
|
369
318
|
});
|
|
370
319
|
const marshalCreateNetworkRequest = (request, defaults) => ({
|
|
@@ -378,14 +327,14 @@ const marshalCreateRouteRequest = (request, defaults) => ({
|
|
|
378
327
|
name: request.name || randomName('route'),
|
|
379
328
|
topic: request.topic,
|
|
380
329
|
...resolveOneOf([{
|
|
381
|
-
param: 's3_config',
|
|
382
|
-
value: request.s3Config ? marshalCreateRouteRequestS3Config(request.s3Config) : undefined
|
|
383
|
-
}, {
|
|
384
330
|
param: 'db_config',
|
|
385
|
-
value: request.dbConfig
|
|
331
|
+
value: request.dbConfig
|
|
386
332
|
}, {
|
|
387
333
|
param: 'rest_config',
|
|
388
|
-
value: request.restConfig
|
|
334
|
+
value: request.restConfig
|
|
335
|
+
}, {
|
|
336
|
+
param: 's3_config',
|
|
337
|
+
value: request.s3Config
|
|
389
338
|
}])
|
|
390
339
|
});
|
|
391
340
|
const marshalPatchTwinDocumentRequest = (request, defaults) => ({
|
|
@@ -408,31 +357,31 @@ const marshalUpdateDeviceRequest = (request, defaults) => ({
|
|
|
408
357
|
allow_multiple_connections: request.allowMultipleConnections,
|
|
409
358
|
description: request.description,
|
|
410
359
|
hub_id: request.hubId,
|
|
411
|
-
message_filters: request.messageFilters
|
|
360
|
+
message_filters: request.messageFilters
|
|
412
361
|
});
|
|
413
362
|
const marshalUpdateHubRequest = (request, defaults) => ({
|
|
414
363
|
disable_events: request.disableEvents,
|
|
415
364
|
enable_device_auto_provisioning: request.enableDeviceAutoProvisioning,
|
|
416
365
|
events_topic_prefix: request.eventsTopicPrefix,
|
|
417
366
|
name: request.name,
|
|
418
|
-
product_plan: request.productPlan
|
|
367
|
+
product_plan: request.productPlan,
|
|
419
368
|
...resolveOneOf([{
|
|
420
369
|
param: 'twins_graphite_config',
|
|
421
|
-
value: request.twinsGraphiteConfig
|
|
370
|
+
value: request.twinsGraphiteConfig
|
|
422
371
|
}])
|
|
423
372
|
});
|
|
424
373
|
const marshalUpdateRouteRequest = (request, defaults) => ({
|
|
425
374
|
name: request.name,
|
|
426
375
|
topic: request.topic,
|
|
427
376
|
...resolveOneOf([{
|
|
428
|
-
param: 's3_config',
|
|
429
|
-
value: request.s3Config ? marshalUpdateRouteRequestS3Config(request.s3Config) : undefined
|
|
430
|
-
}, {
|
|
431
377
|
param: 'db_config',
|
|
432
|
-
value: request.dbConfig
|
|
378
|
+
value: request.dbConfig
|
|
433
379
|
}, {
|
|
434
380
|
param: 'rest_config',
|
|
435
|
-
value: request.restConfig
|
|
381
|
+
value: request.restConfig
|
|
382
|
+
}, {
|
|
383
|
+
param: 's3_config',
|
|
384
|
+
value: request.s3Config
|
|
436
385
|
}])
|
|
437
386
|
});
|
|
438
387
|
|
|
@@ -53,7 +53,7 @@ class API extends API$1 {
|
|
|
53
53
|
return _this.client.fetch({
|
|
54
54
|
method: 'GET',
|
|
55
55
|
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/volumes`,
|
|
56
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
56
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId])
|
|
57
57
|
}, unmarshalListVolumesResponse);
|
|
58
58
|
};
|
|
59
59
|
})();
|
|
@@ -168,7 +168,7 @@ class API extends API$1 {
|
|
|
168
168
|
pageOfListPins = request => this.client.fetch({
|
|
169
169
|
method: 'GET',
|
|
170
170
|
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins`,
|
|
171
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
171
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status], ['volume_id', request.volumeId])
|
|
172
172
|
}, unmarshalListPinsResponse);
|
|
173
173
|
|
|
174
174
|
/**
|