@blues-inc/notehub-js 1.0.23 → 1.0.24
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/README.md +24 -12
- package/dist/ApiClient.js +3 -3
- package/dist/api/AlertApi.js +5 -5
- package/dist/api/AuthorizationApi.js +2 -2
- package/dist/api/BillingAccountApi.js +2 -2
- package/dist/api/DeviceApi.js +2 -2
- package/dist/api/EventApi.js +19 -9
- package/dist/api/MonitorApi.js +2 -2
- package/dist/api/ProjectApi.js +377 -108
- package/dist/api/RouteApi.js +30 -30
- package/dist/index.js +102 -39
- package/dist/model/Alert.js +46 -2
- package/dist/model/AlertDataInner.js +2 -2
- package/dist/model/AlertNotificationsInner.js +2 -2
- package/dist/model/Aws.js +2 -2
- package/dist/model/Azure.js +2 -2
- package/dist/model/BillingAccount.js +2 -2
- package/dist/model/BillingAccountRole.js +1 -1
- package/dist/model/Body.js +2 -2
- package/dist/model/CloneProjectRequest.js +2 -2
- package/dist/model/Contact.js +2 -2
- package/dist/model/CreateFleetRequest.js +2 -2
- package/dist/model/CreateMonitor.js +2 -2
- package/dist/model/CreateProductRequest.js +2 -2
- package/dist/model/CreateProjectRequest.js +2 -2
- package/dist/model/CurrentFirmware.js +105 -0
- package/dist/model/DFUEnv.js +2 -2
- package/dist/model/DFUState.js +2 -2
- package/dist/model/DeleteDeviceFleetsRequest.js +2 -2
- package/dist/model/Device.js +2 -2
- package/dist/model/DeviceDfuHistory.js +138 -0
- package/dist/model/DeviceDfuHistoryPage.js +120 -0
- package/dist/model/DeviceDfuStateMachine.js +151 -0
- package/dist/model/DeviceDfuStateMachineNode.js +132 -0
- package/dist/model/DeviceDfuStatus.js +129 -0
- package/dist/model/{FirmwareStatus.js → DeviceDfuStatusCurrent.js} +42 -28
- package/dist/model/{OTAStatusList.js → DeviceDfuStatusPage.js} +25 -25
- package/dist/model/DeviceSession.js +2 -2
- package/dist/model/DeviceTowerInfo.js +2 -2
- package/dist/model/DeviceUsage.js +2 -2
- package/dist/model/DfuActionRequest.js +92 -0
- package/dist/model/EmailNotification.js +2 -2
- package/dist/model/EnvironmentVariables.js +2 -2
- package/dist/model/Error.js +2 -2
- package/dist/model/Event.js +2 -2
- package/dist/model/Firmware.js +195 -0
- package/dist/model/FirmwareInfo.js +2 -2
- package/dist/model/Fleet.js +2 -2
- package/dist/model/GetAlerts200Response.js +2 -2
- package/dist/model/GetBillingAccounts200Response.js +2 -2
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +2 -2
- package/dist/model/GetDeviceLatest200Response.js +2 -2
- package/dist/model/GetDevicePublicKey200Response.js +2 -2
- package/dist/model/GetDeviceSessions200Response.js +2 -2
- package/dist/model/GetProjectDevicePublicKeys200Response.js +2 -2
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +2 -2
- package/dist/model/GetProjectDevices200Response.js +2 -2
- package/dist/model/GetProjectEvents200Response.js +2 -2
- package/dist/model/GetProjectEventsByCursor200Response.js +2 -2
- package/dist/model/GetProjectFleets200Response.js +2 -2
- package/dist/model/GetProjectMembers200Response.js +2 -2
- package/dist/model/GetProjectProducts200Response.js +2 -2
- package/dist/model/GetProjects200Response.js +2 -2
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +2 -2
- package/dist/model/Google.js +2 -2
- package/dist/model/HandleNoteChanges200Response.js +2 -2
- package/dist/model/HandleNoteGet200Response.js +2 -2
- package/dist/model/HandleNoteSignal200Response.js +2 -2
- package/dist/model/HandleNotefileChanges200Response.js +2 -2
- package/dist/model/HandleNotefileChangesPending200Response.js +2 -2
- package/dist/model/HandleNotefileDeleteRequest.js +2 -2
- package/dist/model/Http.js +2 -2
- package/dist/model/HttpFilter.js +2 -2
- package/dist/model/HttpTransform.js +2 -2
- package/dist/model/Location.js +2 -2
- package/dist/model/Login200Response.js +2 -2
- package/dist/model/LoginRequest.js +2 -2
- package/dist/model/Monitor.js +2 -2
- package/dist/model/MonitorAlertRoutesInner.js +2 -2
- package/dist/model/Mqtt.js +2 -2
- package/dist/model/Note.js +2 -2
- package/dist/model/{Route.js → NotehubRoute.js} +30 -30
- package/dist/model/{RouteSchema.js → NotehubRouteSchema.js} +68 -68
- package/dist/model/PostProvisionProjectDeviceRequest.js +2 -2
- package/dist/model/Product.js +2 -2
- package/dist/model/Project.js +2 -2
- package/dist/model/ProjectMember.js +2 -2
- package/dist/model/Proxy.js +2 -2
- package/dist/model/PutDeviceFleetsRequest.js +2 -2
- package/dist/model/Radresponder.js +2 -2
- package/dist/model/Role.js +1 -1
- package/dist/model/Slack.js +2 -2
- package/dist/model/SlackBearerNotification.js +2 -2
- package/dist/model/SlackWebHookNotification.js +2 -2
- package/dist/model/Snowflake.js +2 -2
- package/dist/model/SnowflakeTransform.js +2 -2
- package/dist/model/Thingworx.js +2 -2
- package/dist/model/TowerLocation.js +2 -2
- package/dist/model/Twilio.js +2 -2
- package/dist/model/UpdateFleetRequest.js +2 -2
- package/dist/model/UploadMetadata.js +221 -0
- package/dist/model/UserDbRoute.js +2 -2
- package/dist/model/UserDfuStateMachine.js +127 -0
- package/dist/model/{OTAUpdateStatus.js → UserDfuStateMachineStatus.js} +46 -41
- package/dist/model/UserFirmwareInfo.js +107 -0
- package/package.json +1 -1
- package/dist/model/OTAStatus.js +0 -306
- package/dist/model/OTAUpdateRequest.js +0 -214
package/dist/api/ProjectApi.js
CHANGED
|
@@ -10,6 +10,11 @@ var _CreateFleetRequest = _interopRequireDefault(require("../model/CreateFleetRe
|
|
|
10
10
|
var _CreateProductRequest = _interopRequireDefault(require("../model/CreateProductRequest"));
|
|
11
11
|
var _CreateProjectRequest = _interopRequireDefault(require("../model/CreateProjectRequest"));
|
|
12
12
|
var _DeleteDeviceFleetsRequest = _interopRequireDefault(require("../model/DeleteDeviceFleetsRequest"));
|
|
13
|
+
var _DeviceDfuHistory = _interopRequireDefault(require("../model/DeviceDfuHistory"));
|
|
14
|
+
var _DeviceDfuHistoryPage = _interopRequireDefault(require("../model/DeviceDfuHistoryPage"));
|
|
15
|
+
var _DeviceDfuStatus = _interopRequireDefault(require("../model/DeviceDfuStatus"));
|
|
16
|
+
var _DeviceDfuStatusPage = _interopRequireDefault(require("../model/DeviceDfuStatusPage"));
|
|
17
|
+
var _DfuActionRequest = _interopRequireDefault(require("../model/DfuActionRequest"));
|
|
13
18
|
var _EnvironmentVariables = _interopRequireDefault(require("../model/EnvironmentVariables"));
|
|
14
19
|
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
15
20
|
var _FirmwareInfo = _interopRequireDefault(require("../model/FirmwareInfo"));
|
|
@@ -18,9 +23,6 @@ var _GetProjectFleets200Response = _interopRequireDefault(require("../model/GetP
|
|
|
18
23
|
var _GetProjectMembers200Response = _interopRequireDefault(require("../model/GetProjectMembers200Response"));
|
|
19
24
|
var _GetProjectProducts200Response = _interopRequireDefault(require("../model/GetProjectProducts200Response"));
|
|
20
25
|
var _GetProjects200Response = _interopRequireDefault(require("../model/GetProjects200Response"));
|
|
21
|
-
var _OTAStatusList = _interopRequireDefault(require("../model/OTAStatusList"));
|
|
22
|
-
var _OTAUpdateRequest = _interopRequireDefault(require("../model/OTAUpdateRequest"));
|
|
23
|
-
var _OTAUpdateStatus = _interopRequireDefault(require("../model/OTAUpdateStatus"));
|
|
24
26
|
var _Product = _interopRequireDefault(require("../model/Product"));
|
|
25
27
|
var _Project = _interopRequireDefault(require("../model/Project"));
|
|
26
28
|
var _PutDeviceFleetsRequest = _interopRequireDefault(require("../model/PutDeviceFleetsRequest"));
|
|
@@ -35,7 +37,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
35
37
|
* Notehub API
|
|
36
38
|
* The OpenAPI definition for the Notehub.io API.
|
|
37
39
|
*
|
|
38
|
-
* The version of the OpenAPI document: 1.
|
|
40
|
+
* The version of the OpenAPI document: 1.2.0
|
|
39
41
|
* Contact: engineering@blues.io
|
|
40
42
|
*
|
|
41
43
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -46,7 +48,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
46
48
|
/**
|
|
47
49
|
* Project service.
|
|
48
50
|
* @module api/ProjectApi
|
|
49
|
-
* @version 1.0.
|
|
51
|
+
* @version 1.0.24
|
|
50
52
|
*/
|
|
51
53
|
var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
52
54
|
/**
|
|
@@ -469,6 +471,92 @@ var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
469
471
|
});
|
|
470
472
|
}
|
|
471
473
|
|
|
474
|
+
/**
|
|
475
|
+
* Update/cancel host or notecard firmware updates
|
|
476
|
+
* @param {String} projectUID
|
|
477
|
+
* @param {module:model/String} firmwareType
|
|
478
|
+
* @param {module:model/String} action
|
|
479
|
+
* @param {Object} opts Optional parameters
|
|
480
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
481
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
482
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
483
|
+
* @param {String} opts.fleetUID
|
|
484
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
485
|
+
* @param {Array.<String>} opts.location Location filter
|
|
486
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
487
|
+
* @param {Array.<String>} opts.productUID
|
|
488
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
489
|
+
* @param {module:model/DfuActionRequest} opts.dfuActionRequest Which firmware in the case of an update action
|
|
490
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
491
|
+
*/
|
|
492
|
+
}, {
|
|
493
|
+
key: "dfuActionWithHttpInfo",
|
|
494
|
+
value: function dfuActionWithHttpInfo(projectUID, firmwareType, action, opts) {
|
|
495
|
+
opts = opts || {};
|
|
496
|
+
var postBody = opts["dfuActionRequest"];
|
|
497
|
+
// verify the required parameter 'projectUID' is set
|
|
498
|
+
if (projectUID === undefined || projectUID === null) {
|
|
499
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling dfuAction");
|
|
500
|
+
}
|
|
501
|
+
// verify the required parameter 'firmwareType' is set
|
|
502
|
+
if (firmwareType === undefined || firmwareType === null) {
|
|
503
|
+
throw new _Error["default"]("Missing the required parameter 'firmwareType' when calling dfuAction");
|
|
504
|
+
}
|
|
505
|
+
// verify the required parameter 'action' is set
|
|
506
|
+
if (action === undefined || action === null) {
|
|
507
|
+
throw new _Error["default"]("Missing the required parameter 'action' when calling dfuAction");
|
|
508
|
+
}
|
|
509
|
+
var pathParams = {
|
|
510
|
+
projectUID: projectUID,
|
|
511
|
+
firmwareType: firmwareType,
|
|
512
|
+
action: action
|
|
513
|
+
};
|
|
514
|
+
var queryParams = {
|
|
515
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
516
|
+
tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
|
|
517
|
+
serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
|
|
518
|
+
fleetUID: opts["fleetUID"],
|
|
519
|
+
notecardFirmware: this.apiClient.buildCollectionParam(opts["notecardFirmware"], "multi"),
|
|
520
|
+
location: this.apiClient.buildCollectionParam(opts["location"], "multi"),
|
|
521
|
+
hostFirmware: this.apiClient.buildCollectionParam(opts["hostFirmware"], "multi"),
|
|
522
|
+
productUID: this.apiClient.buildCollectionParam(opts["productUID"], "multi"),
|
|
523
|
+
sku: this.apiClient.buildCollectionParam(opts["sku"], "multi")
|
|
524
|
+
};
|
|
525
|
+
var headerParams = {};
|
|
526
|
+
var formParams = {};
|
|
527
|
+
var authNames = ["api_key"];
|
|
528
|
+
var contentTypes = ["application/json"];
|
|
529
|
+
var accepts = ["application/json"];
|
|
530
|
+
var returnType = null;
|
|
531
|
+
return this.apiClient.callApi("/v1/projects/{projectUID}/dfu/{firmwareType}/{action}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Update/cancel host or notecard firmware updates
|
|
536
|
+
* @param {String} projectUID
|
|
537
|
+
* @param {module:model/String} firmwareType
|
|
538
|
+
* @param {module:model/String} action
|
|
539
|
+
* @param {Object} opts Optional parameters
|
|
540
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
541
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
542
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
543
|
+
* @param {String} opts.fleetUID
|
|
544
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
545
|
+
* @param {Array.<String>} opts.location Location filter
|
|
546
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
547
|
+
* @param {Array.<String>} opts.productUID
|
|
548
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
549
|
+
* @param {module:model/DfuActionRequest} opts.dfuActionRequest Which firmware in the case of an update action
|
|
550
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
551
|
+
*/
|
|
552
|
+
}, {
|
|
553
|
+
key: "dfuAction",
|
|
554
|
+
value: function dfuAction(projectUID, firmwareType, action, opts) {
|
|
555
|
+
return this.dfuActionWithHttpInfo(projectUID, firmwareType, action, opts).then(function (response_and_data) {
|
|
556
|
+
return response_and_data.data;
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
|
|
472
560
|
/**
|
|
473
561
|
* Disable the project-level event JSONata transformation
|
|
474
562
|
* @param {String} projectUID
|
|
@@ -547,6 +635,112 @@ var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
547
635
|
});
|
|
548
636
|
}
|
|
549
637
|
|
|
638
|
+
/**
|
|
639
|
+
* Get device DFU history for host or Notecard firmware
|
|
640
|
+
* @param {String} projectUID
|
|
641
|
+
* @param {String} deviceUID
|
|
642
|
+
* @param {module:model/String} firmwareType
|
|
643
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeviceDfuHistory} and HTTP response
|
|
644
|
+
*/
|
|
645
|
+
}, {
|
|
646
|
+
key: "getDeviceDfuHistoryWithHttpInfo",
|
|
647
|
+
value: function getDeviceDfuHistoryWithHttpInfo(projectUID, deviceUID, firmwareType) {
|
|
648
|
+
var postBody = null;
|
|
649
|
+
// verify the required parameter 'projectUID' is set
|
|
650
|
+
if (projectUID === undefined || projectUID === null) {
|
|
651
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDeviceDfuHistory");
|
|
652
|
+
}
|
|
653
|
+
// verify the required parameter 'deviceUID' is set
|
|
654
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
655
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceDfuHistory");
|
|
656
|
+
}
|
|
657
|
+
// verify the required parameter 'firmwareType' is set
|
|
658
|
+
if (firmwareType === undefined || firmwareType === null) {
|
|
659
|
+
throw new _Error["default"]("Missing the required parameter 'firmwareType' when calling getDeviceDfuHistory");
|
|
660
|
+
}
|
|
661
|
+
var pathParams = {
|
|
662
|
+
projectUID: projectUID,
|
|
663
|
+
deviceUID: deviceUID,
|
|
664
|
+
firmwareType: firmwareType
|
|
665
|
+
};
|
|
666
|
+
var queryParams = {};
|
|
667
|
+
var headerParams = {};
|
|
668
|
+
var formParams = {};
|
|
669
|
+
var authNames = ["api_key"];
|
|
670
|
+
var contentTypes = [];
|
|
671
|
+
var accepts = ["application/json"];
|
|
672
|
+
var returnType = _DeviceDfuHistory["default"];
|
|
673
|
+
return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Get device DFU history for host or Notecard firmware
|
|
678
|
+
* @param {String} projectUID
|
|
679
|
+
* @param {String} deviceUID
|
|
680
|
+
* @param {module:model/String} firmwareType
|
|
681
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeviceDfuHistory}
|
|
682
|
+
*/
|
|
683
|
+
}, {
|
|
684
|
+
key: "getDeviceDfuHistory",
|
|
685
|
+
value: function getDeviceDfuHistory(projectUID, deviceUID, firmwareType) {
|
|
686
|
+
return this.getDeviceDfuHistoryWithHttpInfo(projectUID, deviceUID, firmwareType).then(function (response_and_data) {
|
|
687
|
+
return response_and_data.data;
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Get device DFU history for host or Notecard firmware
|
|
693
|
+
* @param {String} projectUID
|
|
694
|
+
* @param {String} deviceUID
|
|
695
|
+
* @param {module:model/String} firmwareType
|
|
696
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeviceDfuStatus} and HTTP response
|
|
697
|
+
*/
|
|
698
|
+
}, {
|
|
699
|
+
key: "getDeviceDfuStatusWithHttpInfo",
|
|
700
|
+
value: function getDeviceDfuStatusWithHttpInfo(projectUID, deviceUID, firmwareType) {
|
|
701
|
+
var postBody = null;
|
|
702
|
+
// verify the required parameter 'projectUID' is set
|
|
703
|
+
if (projectUID === undefined || projectUID === null) {
|
|
704
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDeviceDfuStatus");
|
|
705
|
+
}
|
|
706
|
+
// verify the required parameter 'deviceUID' is set
|
|
707
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
708
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceDfuStatus");
|
|
709
|
+
}
|
|
710
|
+
// verify the required parameter 'firmwareType' is set
|
|
711
|
+
if (firmwareType === undefined || firmwareType === null) {
|
|
712
|
+
throw new _Error["default"]("Missing the required parameter 'firmwareType' when calling getDeviceDfuStatus");
|
|
713
|
+
}
|
|
714
|
+
var pathParams = {
|
|
715
|
+
projectUID: projectUID,
|
|
716
|
+
deviceUID: deviceUID,
|
|
717
|
+
firmwareType: firmwareType
|
|
718
|
+
};
|
|
719
|
+
var queryParams = {};
|
|
720
|
+
var headerParams = {};
|
|
721
|
+
var formParams = {};
|
|
722
|
+
var authNames = ["api_key"];
|
|
723
|
+
var contentTypes = [];
|
|
724
|
+
var accepts = ["application/json"];
|
|
725
|
+
var returnType = _DeviceDfuStatus["default"];
|
|
726
|
+
return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Get device DFU history for host or Notecard firmware
|
|
731
|
+
* @param {String} projectUID
|
|
732
|
+
* @param {String} deviceUID
|
|
733
|
+
* @param {module:model/String} firmwareType
|
|
734
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeviceDfuStatus}
|
|
735
|
+
*/
|
|
736
|
+
}, {
|
|
737
|
+
key: "getDeviceDfuStatus",
|
|
738
|
+
value: function getDeviceDfuStatus(projectUID, deviceUID, firmwareType) {
|
|
739
|
+
return this.getDeviceDfuStatusWithHttpInfo(projectUID, deviceUID, firmwareType).then(function (response_and_data) {
|
|
740
|
+
return response_and_data.data;
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
|
|
550
744
|
/**
|
|
551
745
|
* Get Device Fleets
|
|
552
746
|
* @param {String} projectUID
|
|
@@ -593,6 +787,184 @@ var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
593
787
|
});
|
|
594
788
|
}
|
|
595
789
|
|
|
790
|
+
/**
|
|
791
|
+
* Get host or Notecard DFU history for all devices that match the filter criteria
|
|
792
|
+
* @param {String} projectUID
|
|
793
|
+
* @param {module:model/String} firmwareType
|
|
794
|
+
* @param {Object} opts Optional parameters
|
|
795
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
796
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
797
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
798
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
799
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
800
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
801
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
802
|
+
* @param {String} opts.fleetUID
|
|
803
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
804
|
+
* @param {Array.<String>} opts.location Location filter
|
|
805
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
806
|
+
* @param {Array.<String>} opts.productUID
|
|
807
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
808
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeviceDfuHistoryPage} and HTTP response
|
|
809
|
+
*/
|
|
810
|
+
}, {
|
|
811
|
+
key: "getDevicesDfuHistoryWithHttpInfo",
|
|
812
|
+
value: function getDevicesDfuHistoryWithHttpInfo(projectUID, firmwareType, opts) {
|
|
813
|
+
opts = opts || {};
|
|
814
|
+
var postBody = null;
|
|
815
|
+
// verify the required parameter 'projectUID' is set
|
|
816
|
+
if (projectUID === undefined || projectUID === null) {
|
|
817
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDevicesDfuHistory");
|
|
818
|
+
}
|
|
819
|
+
// verify the required parameter 'firmwareType' is set
|
|
820
|
+
if (firmwareType === undefined || firmwareType === null) {
|
|
821
|
+
throw new _Error["default"]("Missing the required parameter 'firmwareType' when calling getDevicesDfuHistory");
|
|
822
|
+
}
|
|
823
|
+
var pathParams = {
|
|
824
|
+
projectUID: projectUID,
|
|
825
|
+
firmwareType: firmwareType
|
|
826
|
+
};
|
|
827
|
+
var queryParams = {
|
|
828
|
+
pageSize: opts["pageSize"],
|
|
829
|
+
pageNum: opts["pageNum"],
|
|
830
|
+
sortBy: opts["sortBy"],
|
|
831
|
+
sortOrder: opts["sortOrder"],
|
|
832
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
833
|
+
tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
|
|
834
|
+
serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
|
|
835
|
+
fleetUID: opts["fleetUID"],
|
|
836
|
+
notecardFirmware: this.apiClient.buildCollectionParam(opts["notecardFirmware"], "multi"),
|
|
837
|
+
location: this.apiClient.buildCollectionParam(opts["location"], "multi"),
|
|
838
|
+
hostFirmware: this.apiClient.buildCollectionParam(opts["hostFirmware"], "multi"),
|
|
839
|
+
productUID: this.apiClient.buildCollectionParam(opts["productUID"], "multi"),
|
|
840
|
+
sku: this.apiClient.buildCollectionParam(opts["sku"], "multi")
|
|
841
|
+
};
|
|
842
|
+
var headerParams = {};
|
|
843
|
+
var formParams = {};
|
|
844
|
+
var authNames = ["api_key"];
|
|
845
|
+
var contentTypes = [];
|
|
846
|
+
var accepts = ["application/json"];
|
|
847
|
+
var returnType = _DeviceDfuHistoryPage["default"];
|
|
848
|
+
return this.apiClient.callApi("/v1/projects/{projectUID}/dfu/{firmwareType}/history", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Get host or Notecard DFU history for all devices that match the filter criteria
|
|
853
|
+
* @param {String} projectUID
|
|
854
|
+
* @param {module:model/String} firmwareType
|
|
855
|
+
* @param {Object} opts Optional parameters
|
|
856
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
857
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
858
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
859
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
860
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
861
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
862
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
863
|
+
* @param {String} opts.fleetUID
|
|
864
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
865
|
+
* @param {Array.<String>} opts.location Location filter
|
|
866
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
867
|
+
* @param {Array.<String>} opts.productUID
|
|
868
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
869
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeviceDfuHistoryPage}
|
|
870
|
+
*/
|
|
871
|
+
}, {
|
|
872
|
+
key: "getDevicesDfuHistory",
|
|
873
|
+
value: function getDevicesDfuHistory(projectUID, firmwareType, opts) {
|
|
874
|
+
return this.getDevicesDfuHistoryWithHttpInfo(projectUID, firmwareType, opts).then(function (response_and_data) {
|
|
875
|
+
return response_and_data.data;
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Get host or Notecard DFU history for all devices that match the filter criteria
|
|
881
|
+
* @param {String} projectUID
|
|
882
|
+
* @param {module:model/String} firmwareType
|
|
883
|
+
* @param {Object} opts Optional parameters
|
|
884
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
885
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
886
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
887
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
888
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
889
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
890
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
891
|
+
* @param {String} opts.fleetUID
|
|
892
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
893
|
+
* @param {Array.<String>} opts.location Location filter
|
|
894
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
895
|
+
* @param {Array.<String>} opts.productUID
|
|
896
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
897
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeviceDfuStatusPage} and HTTP response
|
|
898
|
+
*/
|
|
899
|
+
}, {
|
|
900
|
+
key: "getDevicesDfuStatusWithHttpInfo",
|
|
901
|
+
value: function getDevicesDfuStatusWithHttpInfo(projectUID, firmwareType, opts) {
|
|
902
|
+
opts = opts || {};
|
|
903
|
+
var postBody = null;
|
|
904
|
+
// verify the required parameter 'projectUID' is set
|
|
905
|
+
if (projectUID === undefined || projectUID === null) {
|
|
906
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDevicesDfuStatus");
|
|
907
|
+
}
|
|
908
|
+
// verify the required parameter 'firmwareType' is set
|
|
909
|
+
if (firmwareType === undefined || firmwareType === null) {
|
|
910
|
+
throw new _Error["default"]("Missing the required parameter 'firmwareType' when calling getDevicesDfuStatus");
|
|
911
|
+
}
|
|
912
|
+
var pathParams = {
|
|
913
|
+
projectUID: projectUID,
|
|
914
|
+
firmwareType: firmwareType
|
|
915
|
+
};
|
|
916
|
+
var queryParams = {
|
|
917
|
+
pageSize: opts["pageSize"],
|
|
918
|
+
pageNum: opts["pageNum"],
|
|
919
|
+
sortBy: opts["sortBy"],
|
|
920
|
+
sortOrder: opts["sortOrder"],
|
|
921
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
922
|
+
tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
|
|
923
|
+
serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
|
|
924
|
+
fleetUID: opts["fleetUID"],
|
|
925
|
+
notecardFirmware: this.apiClient.buildCollectionParam(opts["notecardFirmware"], "multi"),
|
|
926
|
+
location: this.apiClient.buildCollectionParam(opts["location"], "multi"),
|
|
927
|
+
hostFirmware: this.apiClient.buildCollectionParam(opts["hostFirmware"], "multi"),
|
|
928
|
+
productUID: this.apiClient.buildCollectionParam(opts["productUID"], "multi"),
|
|
929
|
+
sku: this.apiClient.buildCollectionParam(opts["sku"], "multi")
|
|
930
|
+
};
|
|
931
|
+
var headerParams = {};
|
|
932
|
+
var formParams = {};
|
|
933
|
+
var authNames = ["api_key"];
|
|
934
|
+
var contentTypes = [];
|
|
935
|
+
var accepts = ["application/json"];
|
|
936
|
+
var returnType = _DeviceDfuStatusPage["default"];
|
|
937
|
+
return this.apiClient.callApi("/v1/projects/{projectUID}/dfu/{firmwareType}/status", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Get host or Notecard DFU history for all devices that match the filter criteria
|
|
942
|
+
* @param {String} projectUID
|
|
943
|
+
* @param {module:model/String} firmwareType
|
|
944
|
+
* @param {Object} opts Optional parameters
|
|
945
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
946
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
947
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
948
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
949
|
+
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
950
|
+
* @param {Array.<String>} opts.tag Tag filter
|
|
951
|
+
* @param {Array.<String>} opts.serialNumber Serial number filter
|
|
952
|
+
* @param {String} opts.fleetUID
|
|
953
|
+
* @param {Array.<String>} opts.notecardFirmware Firmware version filter
|
|
954
|
+
* @param {Array.<String>} opts.location Location filter
|
|
955
|
+
* @param {Array.<String>} opts.hostFirmware Host firmware filter
|
|
956
|
+
* @param {Array.<String>} opts.productUID
|
|
957
|
+
* @param {Array.<String>} opts.sku SKU filter
|
|
958
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeviceDfuStatusPage}
|
|
959
|
+
*/
|
|
960
|
+
}, {
|
|
961
|
+
key: "getDevicesDfuStatus",
|
|
962
|
+
value: function getDevicesDfuStatus(projectUID, firmwareType, opts) {
|
|
963
|
+
return this.getDevicesDfuStatusWithHttpInfo(projectUID, firmwareType, opts).then(function (response_and_data) {
|
|
964
|
+
return response_and_data.data;
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
|
|
596
968
|
/**
|
|
597
969
|
* Get Available Firmware Information
|
|
598
970
|
* @param {String} projectUID
|
|
@@ -898,64 +1270,6 @@ var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
898
1270
|
});
|
|
899
1271
|
}
|
|
900
1272
|
|
|
901
|
-
/**
|
|
902
|
-
* Get Project OTA Status
|
|
903
|
-
* @param {String} projectUID
|
|
904
|
-
* @param {Object} opts Optional parameters
|
|
905
|
-
* @param {Array.<String>} opts.deviceUIDs An array of Device UIDs.
|
|
906
|
-
* @param {Array.<String>} opts.fleetUIDs
|
|
907
|
-
* @param {Array.<String>} opts.deviceTags
|
|
908
|
-
* @param {Number} opts.pageSize (default to 50)
|
|
909
|
-
* @param {Number} opts.pageNum (default to 1)
|
|
910
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/OTAStatusList>} and HTTP response
|
|
911
|
-
*/
|
|
912
|
-
}, {
|
|
913
|
-
key: "getProjectOTAStatusWithHttpInfo",
|
|
914
|
-
value: function getProjectOTAStatusWithHttpInfo(projectUID, opts) {
|
|
915
|
-
opts = opts || {};
|
|
916
|
-
var postBody = null;
|
|
917
|
-
// verify the required parameter 'projectUID' is set
|
|
918
|
-
if (projectUID === undefined || projectUID === null) {
|
|
919
|
-
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectOTAStatus");
|
|
920
|
-
}
|
|
921
|
-
var pathParams = {
|
|
922
|
-
projectUID: projectUID
|
|
923
|
-
};
|
|
924
|
-
var queryParams = {
|
|
925
|
-
deviceUIDs: this.apiClient.buildCollectionParam(opts["deviceUIDs"], "multi"),
|
|
926
|
-
fleetUIDs: this.apiClient.buildCollectionParam(opts["fleetUIDs"], "multi"),
|
|
927
|
-
deviceTags: this.apiClient.buildCollectionParam(opts["deviceTags"], "multi"),
|
|
928
|
-
pageSize: opts["pageSize"],
|
|
929
|
-
pageNum: opts["pageNum"]
|
|
930
|
-
};
|
|
931
|
-
var headerParams = {};
|
|
932
|
-
var formParams = {};
|
|
933
|
-
var authNames = ["api_key"];
|
|
934
|
-
var contentTypes = [];
|
|
935
|
-
var accepts = ["application/json"];
|
|
936
|
-
var returnType = [_OTAStatusList["default"]];
|
|
937
|
-
return this.apiClient.callApi("/v1/projects/{projectUID}/ota/status", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
/**
|
|
941
|
-
* Get Project OTA Status
|
|
942
|
-
* @param {String} projectUID
|
|
943
|
-
* @param {Object} opts Optional parameters
|
|
944
|
-
* @param {Array.<String>} opts.deviceUIDs An array of Device UIDs.
|
|
945
|
-
* @param {Array.<String>} opts.fleetUIDs
|
|
946
|
-
* @param {Array.<String>} opts.deviceTags
|
|
947
|
-
* @param {Number} opts.pageSize (default to 50)
|
|
948
|
-
* @param {Number} opts.pageNum (default to 1)
|
|
949
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/OTAStatusList>}
|
|
950
|
-
*/
|
|
951
|
-
}, {
|
|
952
|
-
key: "getProjectOTAStatus",
|
|
953
|
-
value: function getProjectOTAStatus(projectUID, opts) {
|
|
954
|
-
return this.getProjectOTAStatusWithHttpInfo(projectUID, opts).then(function (response_and_data) {
|
|
955
|
-
return response_and_data.data;
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
|
|
959
1273
|
/**
|
|
960
1274
|
* Get Products within a Project
|
|
961
1275
|
* @param {String} projectUID
|
|
@@ -1270,50 +1584,5 @@ var ProjectApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1270
1584
|
return response_and_data.data;
|
|
1271
1585
|
});
|
|
1272
1586
|
}
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* Update Project Firmware
|
|
1276
|
-
* @param {String} projectUID
|
|
1277
|
-
* @param {module:model/OTAUpdateRequest} oTAUpdateRequest Body or payload of firmware update
|
|
1278
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/OTAUpdateStatus>} and HTTP response
|
|
1279
|
-
*/
|
|
1280
|
-
}, {
|
|
1281
|
-
key: "updateProjectFirmwareWithHttpInfo",
|
|
1282
|
-
value: function updateProjectFirmwareWithHttpInfo(projectUID, oTAUpdateRequest) {
|
|
1283
|
-
var postBody = oTAUpdateRequest;
|
|
1284
|
-
// verify the required parameter 'projectUID' is set
|
|
1285
|
-
if (projectUID === undefined || projectUID === null) {
|
|
1286
|
-
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling updateProjectFirmware");
|
|
1287
|
-
}
|
|
1288
|
-
// verify the required parameter 'oTAUpdateRequest' is set
|
|
1289
|
-
if (oTAUpdateRequest === undefined || oTAUpdateRequest === null) {
|
|
1290
|
-
throw new _Error["default"]("Missing the required parameter 'oTAUpdateRequest' when calling updateProjectFirmware");
|
|
1291
|
-
}
|
|
1292
|
-
var pathParams = {
|
|
1293
|
-
projectUID: projectUID
|
|
1294
|
-
};
|
|
1295
|
-
var queryParams = {};
|
|
1296
|
-
var headerParams = {};
|
|
1297
|
-
var formParams = {};
|
|
1298
|
-
var authNames = ["api_key"];
|
|
1299
|
-
var contentTypes = ["application/json"];
|
|
1300
|
-
var accepts = ["application/json"];
|
|
1301
|
-
var returnType = [_OTAUpdateStatus["default"]];
|
|
1302
|
-
return this.apiClient.callApi("/v1/projects/{projectUID}/ota/update", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
/**
|
|
1306
|
-
* Update Project Firmware
|
|
1307
|
-
* @param {String} projectUID
|
|
1308
|
-
* @param {module:model/OTAUpdateRequest} oTAUpdateRequest Body or payload of firmware update
|
|
1309
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/OTAUpdateStatus>}
|
|
1310
|
-
*/
|
|
1311
|
-
}, {
|
|
1312
|
-
key: "updateProjectFirmware",
|
|
1313
|
-
value: function updateProjectFirmware(projectUID, oTAUpdateRequest) {
|
|
1314
|
-
return this.updateProjectFirmwareWithHttpInfo(projectUID, oTAUpdateRequest).then(function (response_and_data) {
|
|
1315
|
-
return response_and_data.data;
|
|
1316
|
-
});
|
|
1317
|
-
}
|
|
1318
1587
|
}]);
|
|
1319
1588
|
}();
|