@blues-inc/notehub-js 2.2.1-beta.3 → 2.3.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.
Files changed (144) hide show
  1. package/README.md +241 -249
  2. package/dist/ApiClient.js +154 -154
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +962 -974
  7. package/dist/api/EventApi.js +178 -178
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/MonitorApi.js +52 -52
  10. package/dist/api/ProjectApi.js +601 -601
  11. package/dist/api/RouteApi.js +77 -77
  12. package/dist/api/UsageApi.js +44 -44
  13. package/dist/api/WebhookApi.js +51 -51
  14. package/dist/index.js +77 -77
  15. package/dist/model/Alert.js +74 -76
  16. package/dist/model/AlertDataInner.js +35 -35
  17. package/dist/model/AlertNotificationsInner.js +18 -18
  18. package/dist/model/AwsRoute.js +65 -65
  19. package/dist/model/AzureRoute.js +43 -43
  20. package/dist/model/BillingAccount.js +21 -21
  21. package/dist/model/BillingAccountRole.js +9 -9
  22. package/dist/model/BlynkRoute.js +28 -28
  23. package/dist/model/Body.js +5 -5
  24. package/dist/model/CellularPlan.js +34 -34
  25. package/dist/model/CloneProjectRequest.js +20 -20
  26. package/dist/model/Contact.js +22 -22
  27. package/dist/model/CreateFleetRequest.js +17 -17
  28. package/dist/model/CreateMonitor.js +125 -126
  29. package/dist/model/CreateProductRequest.js +22 -22
  30. package/dist/model/CreateProjectRequest.js +16 -16
  31. package/dist/model/CreateUpdateRepository.js +17 -17
  32. package/dist/model/CurrentFirmware.js +12 -12
  33. package/dist/model/DFUEnv.js +12 -12
  34. package/dist/model/DFUState.js +65 -65
  35. package/dist/model/DataField.js +7 -7
  36. package/dist/model/DataSetField.js +19 -19
  37. package/dist/model/DataUsage.js +14 -14
  38. package/dist/model/DatacakeRoute.js +35 -35
  39. package/dist/model/{DeleteDeviceFromFleetsRequest.js → DeleteDeviceFleetsRequest.js} +26 -26
  40. package/dist/model/Device.js +101 -102
  41. package/dist/model/DeviceDfuHistory.js +19 -20
  42. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  43. package/dist/model/DeviceDfuHistoryPage.js +12 -13
  44. package/dist/model/DeviceDfuStateMachine.js +24 -25
  45. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  46. package/dist/model/DeviceDfuStatus.js +20 -20
  47. package/dist/model/DeviceDfuStatusPage.js +12 -13
  48. package/dist/model/DeviceSession.js +221 -221
  49. package/dist/model/DeviceTowerInfo.js +14 -14
  50. package/dist/model/DeviceUsage.js +32 -32
  51. package/dist/model/DfuActionRequest.js +7 -7
  52. package/dist/model/EmailNotification.js +7 -7
  53. package/dist/model/EnvTreeJsonNode.js +67 -69
  54. package/dist/model/EnvVar.js +18 -18
  55. package/dist/model/EnvironmentVariables.js +8 -8
  56. package/dist/model/Error.js +31 -31
  57. package/dist/model/Event.js +248 -248
  58. package/dist/model/Filter.js +16 -16
  59. package/dist/model/Firmware.js +49 -49
  60. package/dist/model/FirmwareInfo.js +60 -60
  61. package/dist/model/Fleet.js +35 -35
  62. package/dist/model/FleetConnectivityAssurance.js +6 -6
  63. package/dist/model/GetAlerts200Response.js +14 -15
  64. package/dist/model/GetBillingAccounts200Response.js +9 -10
  65. package/dist/model/GetDataUsage200Response.js +9 -10
  66. package/dist/model/GetDataUsage200ResponseDataInner.js +40 -41
  67. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  68. package/dist/model/GetDeviceFleets200Response.js +11 -12
  69. package/dist/model/GetDeviceHealthLog200Response.js +11 -12
  70. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  71. package/dist/model/{GetDeviceLatestEvents200Response.js → GetDeviceLatest200Response.js} +25 -26
  72. package/dist/model/GetDevicePlans200Response.js +9 -10
  73. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  74. package/dist/model/GetDeviceSessions200Response.js +16 -17
  75. package/dist/model/GetProducts200Response.js +9 -10
  76. package/dist/model/{GetDevicePublicKeys200Response.js → GetProjectDevicePublicKeys200Response.js} +37 -38
  77. package/dist/model/{GetDevicePublicKeys200ResponseDevicePublicKeysInner.js → GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js} +28 -28
  78. package/dist/model/{GetDevices200Response.js → GetProjectDevices200Response.js} +34 -35
  79. package/dist/model/{GetEvents200Response.js → GetProjectEvents200Response.js} +38 -39
  80. package/dist/model/{GetEventsByCursor200Response.js → GetProjectEventsByCursor200Response.js} +41 -42
  81. package/dist/model/GetProjectMembers200Response.js +11 -12
  82. package/dist/model/GetProjects200Response.js +9 -10
  83. package/dist/model/GetSessionsUsage200Response.js +11 -12
  84. package/dist/model/GetWebhooks200Response.js +9 -10
  85. package/dist/model/GoogleRoute.js +33 -33
  86. package/dist/model/{GetNotefile200Response.js → HandleNoteChanges200Response.js} +27 -27
  87. package/dist/model/{GetDbNote200Response.js → HandleNoteGet200Response.js} +29 -29
  88. package/dist/model/{SignalDevice200Response.js → HandleNoteSignal200Response.js} +21 -21
  89. package/dist/model/{ListPendingNotefiles200Response.js → HandleNotefileChanges200Response.js} +27 -36
  90. package/dist/model/HandleNotefileChangesPending200Response.js +115 -0
  91. package/dist/model/{DeleteNotefilesRequest.js → HandleNotefileDeleteRequest.js} +24 -24
  92. package/dist/model/HttpRoute.js +35 -35
  93. package/dist/model/Location.js +40 -40
  94. package/dist/model/Login200Response.js +7 -7
  95. package/dist/model/LoginRequest.js +12 -12
  96. package/dist/model/Monitor.js +99 -100
  97. package/dist/model/MonitorAlertRoutesInner.js +10 -9
  98. package/dist/model/MqttRoute.js +68 -68
  99. package/dist/model/Note.js +15 -95
  100. package/dist/model/NotefileSchema.js +18 -19
  101. package/dist/model/NotehubRoute.js +98 -98
  102. package/dist/model/NotehubRouteSummary.js +23 -23
  103. package/dist/model/OAuth2Error.js +20 -20
  104. package/dist/model/OAuth2TokenResponse.js +23 -23
  105. package/dist/model/PersonalAccessToken.js +34 -34
  106. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  107. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  108. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  109. package/dist/model/{ProvisionDeviceRequest.js → PostProvisionProjectDeviceRequest.js} +36 -36
  110. package/dist/model/Product.js +26 -26
  111. package/dist/model/Project.js +34 -34
  112. package/dist/model/ProjectMember.js +22 -22
  113. package/dist/model/ProxyRoute.js +29 -29
  114. package/dist/model/{AddDeviceToFleetsRequest.js → PutDeviceFleetsRequest.js} +26 -26
  115. package/dist/model/QubitroRoute.js +33 -33
  116. package/dist/model/RadRoute.js +31 -31
  117. package/dist/model/Repository.js +22 -22
  118. package/dist/model/Role.js +9 -9
  119. package/dist/model/RouteLog.js +38 -38
  120. package/dist/model/RouteTransformSettings.js +18 -18
  121. package/dist/model/S3ArchiveRoute.js +79 -79
  122. package/dist/model/SatellitePlan.js +26 -26
  123. package/dist/model/SchemaProperty.js +36 -38
  124. package/dist/model/SimUsage.js +19 -19
  125. package/dist/model/SlackBearerNotification.js +25 -25
  126. package/dist/model/SlackRoute.js +48 -48
  127. package/dist/model/SlackWebHookNotification.js +20 -20
  128. package/dist/model/SnowflakeRoute.js +45 -45
  129. package/dist/model/ThingworxRoute.js +33 -33
  130. package/dist/model/TowerLocation.js +54 -54
  131. package/dist/model/TwilioRoute.js +43 -43
  132. package/dist/model/UpdateFleetRequest.js +30 -30
  133. package/dist/model/UploadMetadata.js +64 -64
  134. package/dist/model/UsageData.js +18 -18
  135. package/dist/model/UsageEventsData.js +29 -29
  136. package/dist/model/UsageEventsResponse.js +11 -12
  137. package/dist/model/UsageRouteLogsData.js +27 -27
  138. package/dist/model/UsageSessionsData.js +27 -27
  139. package/dist/model/UserDfuStateMachine.js +20 -20
  140. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  141. package/dist/model/UserFirmwareInfo.js +12 -12
  142. package/dist/model/WebhookSettings.js +15 -15
  143. package/package.json +3 -3
  144. package/dist/model/Notefile.js +0 -147
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Error = _interopRequireDefault(require("../model/Error"));
9
- var _GetEvents200Response = _interopRequireDefault(require("../model/GetEvents200Response"));
10
- var _GetEventsByCursor200Response = _interopRequireDefault(require("../model/GetEventsByCursor200Response"));
9
+ var _GetProjectEvents200Response = _interopRequireDefault(require("../model/GetProjectEvents200Response"));
10
+ var _GetProjectEventsByCursor200Response = _interopRequireDefault(require("../model/GetProjectEventsByCursor200Response"));
11
11
  var _RouteLog = _interopRequireDefault(require("../model/RouteLog"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
13
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
19
  * Notehub API
20
- * The OpenAPI definition for the Notehub.io API.
20
+ * The OpenAPI definition for the Notehub.io API.
21
21
  *
22
22
  * The version of the OpenAPI document: 1.2.0
23
23
  * Contact: engineering@blues.io
@@ -28,26 +28,27 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * Event service.
32
- * @module api/EventApi
33
- * @version 2.2.1-beta.3
34
- */
31
+ * Event service.
32
+ * @module api/EventApi
33
+ * @version 2.3.0
34
+ */
35
35
  var EventApi = exports["default"] = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new EventApi.
38
- * @alias module:api/EventApi
39
- * @class
40
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
- * default to {@link module:ApiClient#instance} if unspecified.
42
- */
37
+ * Constructs a new EventApi.
38
+ * @alias module:api/EventApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
43
  function EventApi(apiClient) {
44
44
  _classCallCheck(this, EventApi);
45
45
  this.apiClient = apiClient || _ApiClient["default"].instance;
46
46
  }
47
47
 
48
48
  /**
49
- * Get Events of a Project
50
- * @param {String} projectOrProductUID
49
+ * Get Events of a Fleet
50
+ * @param {String} projectOrProductUID
51
+ * @param {String} fleetUID
51
52
  * @param {Object} opts Optional parameters
52
53
  * @param {Number} opts.pageSize (default to 50)
53
54
  * @param {Number} opts.pageNum (default to 1)
@@ -57,58 +58,62 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
57
58
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
58
59
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
59
60
  * @param {module:model/String} opts.dateType Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (default to 'captured')
60
- * @param {Boolean} opts.systemFilesOnly
61
- * @param {String} opts.files
61
+ * @param {Boolean} opts.systemFilesOnly
62
+ * @param {String} opts.files
62
63
  * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
63
64
  * @param {Array.<String>} opts.serialNumber Filter by Serial Number
64
- * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
65
65
  * @param {Array.<String>} opts.sessionUID Filter by Session UID
66
66
  * @param {Array.<String>} opts.eventUID Filter by Event UID
67
67
  * @param {String} opts.selectFields Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
68
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
68
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
69
69
  */
70
70
  return _createClass(EventApi, [{
71
- key: "getEventsWithHttpInfo",
72
- value: function getEventsWithHttpInfo(projectOrProductUID, opts) {
71
+ key: "getFleetEventsWithHttpInfo",
72
+ value: function getFleetEventsWithHttpInfo(projectOrProductUID, fleetUID, opts) {
73
73
  opts = opts || {};
74
74
  var postBody = null;
75
75
  // verify the required parameter 'projectOrProductUID' is set
76
76
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
77
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getEvents");
77
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEvents");
78
+ }
79
+ // verify the required parameter 'fleetUID' is set
80
+ if (fleetUID === undefined || fleetUID === null) {
81
+ throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEvents");
78
82
  }
79
83
  var pathParams = {
80
- 'projectOrProductUID': projectOrProductUID
84
+ projectOrProductUID: projectOrProductUID,
85
+ fleetUID: fleetUID
81
86
  };
82
87
  var queryParams = {
83
- 'pageSize': opts['pageSize'],
84
- 'pageNum': opts['pageNum'],
85
- 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
86
- 'sortBy': opts['sortBy'],
87
- 'sortOrder': opts['sortOrder'],
88
- 'startDate': opts['startDate'],
89
- 'endDate': opts['endDate'],
90
- 'dateType': opts['dateType'],
91
- 'systemFilesOnly': opts['systemFilesOnly'],
92
- 'files': opts['files'],
93
- 'format': opts['format'],
94
- 'serialNumber': this.apiClient.buildCollectionParam(opts['serialNumber'], 'multi'),
95
- 'fleetUID': this.apiClient.buildCollectionParam(opts['fleetUID'], 'multi'),
96
- 'sessionUID': this.apiClient.buildCollectionParam(opts['sessionUID'], 'multi'),
97
- 'eventUID': this.apiClient.buildCollectionParam(opts['eventUID'], 'multi'),
98
- 'selectFields': opts['selectFields']
88
+ pageSize: opts["pageSize"],
89
+ pageNum: opts["pageNum"],
90
+ deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
91
+ sortBy: opts["sortBy"],
92
+ sortOrder: opts["sortOrder"],
93
+ startDate: opts["startDate"],
94
+ endDate: opts["endDate"],
95
+ dateType: opts["dateType"],
96
+ systemFilesOnly: opts["systemFilesOnly"],
97
+ files: opts["files"],
98
+ format: opts["format"],
99
+ serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
100
+ sessionUID: this.apiClient.buildCollectionParam(opts["sessionUID"], "multi"),
101
+ eventUID: this.apiClient.buildCollectionParam(opts["eventUID"], "multi"),
102
+ selectFields: opts["selectFields"]
99
103
  };
100
104
  var headerParams = {};
101
105
  var formParams = {};
102
- var authNames = ['personalAccessToken'];
106
+ var authNames = ["personalAccessToken"];
103
107
  var contentTypes = [];
104
- var accepts = ['application/json', 'text/csv'];
105
- var returnType = _GetEvents200Response["default"];
106
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
108
+ var accepts = ["application/json", "text/csv"];
109
+ var returnType = _GetProjectEvents200Response["default"];
110
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
107
111
  }
108
112
 
109
113
  /**
110
- * Get Events of a Project
111
- * @param {String} projectOrProductUID
114
+ * Get Events of a Fleet
115
+ * @param {String} projectOrProductUID
116
+ * @param {String} fleetUID
112
117
  * @param {Object} opts Optional parameters
113
118
  * @param {Number} opts.pageSize (default to 50)
114
119
  * @param {Number} opts.pageNum (default to 1)
@@ -118,92 +123,100 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
118
123
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
119
124
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
120
125
  * @param {module:model/String} opts.dateType Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (default to 'captured')
121
- * @param {Boolean} opts.systemFilesOnly
122
- * @param {String} opts.files
126
+ * @param {Boolean} opts.systemFilesOnly
127
+ * @param {String} opts.files
123
128
  * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
124
129
  * @param {Array.<String>} opts.serialNumber Filter by Serial Number
125
- * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
126
130
  * @param {Array.<String>} opts.sessionUID Filter by Session UID
127
131
  * @param {Array.<String>} opts.eventUID Filter by Event UID
128
132
  * @param {String} opts.selectFields Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
129
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
133
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
130
134
  */
131
135
  }, {
132
- key: "getEvents",
133
- value: function getEvents(projectOrProductUID, opts) {
134
- return this.getEventsWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
136
+ key: "getFleetEvents",
137
+ value: function getFleetEvents(projectOrProductUID, fleetUID, opts) {
138
+ return this.getFleetEventsWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
135
139
  return response_and_data.data;
136
140
  });
137
141
  }
138
142
 
139
143
  /**
140
- * Get Events of a Project by cursor
141
- * @param {String} projectOrProductUID
144
+ * Get Events of a Fleet by cursor
145
+ * @param {String} projectOrProductUID
146
+ * @param {String} fleetUID
142
147
  * @param {Object} opts Optional parameters
143
148
  * @param {Number} opts.limit (default to 50)
144
- * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
149
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
145
150
  * @param {module:model/String} opts.sortOrder (default to 'asc')
146
- * @param {Boolean} opts.systemFilesOnly
147
- * @param {String} opts.files
148
- * @param {String} opts.fleetUID
151
+ * @param {Boolean} opts.systemFilesOnly
152
+ * @param {String} opts.files
149
153
  * @param {Array.<String>} opts.deviceUID A Device UID.
150
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
154
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
155
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
156
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
151
157
  */
152
158
  }, {
153
- key: "getEventsByCursorWithHttpInfo",
154
- value: function getEventsByCursorWithHttpInfo(projectOrProductUID, opts) {
159
+ key: "getFleetEventsByCursorWithHttpInfo",
160
+ value: function getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts) {
155
161
  opts = opts || {};
156
162
  var postBody = null;
157
163
  // verify the required parameter 'projectOrProductUID' is set
158
164
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
159
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getEventsByCursor");
165
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEventsByCursor");
166
+ }
167
+ // verify the required parameter 'fleetUID' is set
168
+ if (fleetUID === undefined || fleetUID === null) {
169
+ throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
160
170
  }
161
171
  var pathParams = {
162
- 'projectOrProductUID': projectOrProductUID
172
+ projectOrProductUID: projectOrProductUID,
173
+ fleetUID: fleetUID
163
174
  };
164
175
  var queryParams = {
165
- 'limit': opts['limit'],
166
- 'cursor': opts['cursor'],
167
- 'sortOrder': opts['sortOrder'],
168
- 'systemFilesOnly': opts['systemFilesOnly'],
169
- 'files': opts['files'],
170
- 'fleetUID': opts['fleetUID'],
171
- 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi')
176
+ limit: opts["limit"],
177
+ cursor: opts["cursor"],
178
+ sortOrder: opts["sortOrder"],
179
+ systemFilesOnly: opts["systemFilesOnly"],
180
+ files: opts["files"],
181
+ deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
182
+ startDate: opts["startDate"],
183
+ endDate: opts["endDate"]
172
184
  };
173
185
  var headerParams = {};
174
186
  var formParams = {};
175
- var authNames = ['personalAccessToken'];
187
+ var authNames = ["personalAccessToken"];
176
188
  var contentTypes = [];
177
- var accepts = ['application/json'];
178
- var returnType = _GetEventsByCursor200Response["default"];
179
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/events-cursor', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
189
+ var accepts = ["application/json"];
190
+ var returnType = _GetProjectEventsByCursor200Response["default"];
191
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
180
192
  }
181
193
 
182
194
  /**
183
- * Get Events of a Project by cursor
184
- * @param {String} projectOrProductUID
195
+ * Get Events of a Fleet by cursor
196
+ * @param {String} projectOrProductUID
197
+ * @param {String} fleetUID
185
198
  * @param {Object} opts Optional parameters
186
199
  * @param {Number} opts.limit (default to 50)
187
- * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
200
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
188
201
  * @param {module:model/String} opts.sortOrder (default to 'asc')
189
- * @param {Boolean} opts.systemFilesOnly
190
- * @param {String} opts.files
191
- * @param {String} opts.fleetUID
202
+ * @param {Boolean} opts.systemFilesOnly
203
+ * @param {String} opts.files
192
204
  * @param {Array.<String>} opts.deviceUID A Device UID.
193
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
205
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
206
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
207
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
194
208
  */
195
209
  }, {
196
- key: "getEventsByCursor",
197
- value: function getEventsByCursor(projectOrProductUID, opts) {
198
- return this.getEventsByCursorWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
210
+ key: "getFleetEventsByCursor",
211
+ value: function getFleetEventsByCursor(projectOrProductUID, fleetUID, opts) {
212
+ return this.getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
199
213
  return response_and_data.data;
200
214
  });
201
215
  }
202
216
 
203
217
  /**
204
- * Get Events of a Fleet
205
- * @param {String} projectOrProductUID
206
- * @param {String} fleetUID
218
+ * Get Events of a Project
219
+ * @param {String} projectOrProductUID
207
220
  * @param {Object} opts Optional parameters
208
221
  * @param {Number} opts.pageSize (default to 50)
209
222
  * @param {Number} opts.pageNum (default to 1)
@@ -213,62 +226,58 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
213
226
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
214
227
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
215
228
  * @param {module:model/String} opts.dateType Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (default to 'captured')
216
- * @param {Boolean} opts.systemFilesOnly
217
- * @param {String} opts.files
229
+ * @param {Boolean} opts.systemFilesOnly
230
+ * @param {String} opts.files
218
231
  * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
219
232
  * @param {Array.<String>} opts.serialNumber Filter by Serial Number
233
+ * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
220
234
  * @param {Array.<String>} opts.sessionUID Filter by Session UID
221
235
  * @param {Array.<String>} opts.eventUID Filter by Event UID
222
236
  * @param {String} opts.selectFields Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
223
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
237
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
224
238
  */
225
239
  }, {
226
- key: "getFleetEventsWithHttpInfo",
227
- value: function getFleetEventsWithHttpInfo(projectOrProductUID, fleetUID, opts) {
240
+ key: "getProjectEventsWithHttpInfo",
241
+ value: function getProjectEventsWithHttpInfo(projectOrProductUID, opts) {
228
242
  opts = opts || {};
229
243
  var postBody = null;
230
244
  // verify the required parameter 'projectOrProductUID' is set
231
245
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
232
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEvents");
233
- }
234
- // verify the required parameter 'fleetUID' is set
235
- if (fleetUID === undefined || fleetUID === null) {
236
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEvents");
246
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectEvents");
237
247
  }
238
248
  var pathParams = {
239
- 'projectOrProductUID': projectOrProductUID,
240
- 'fleetUID': fleetUID
249
+ projectOrProductUID: projectOrProductUID
241
250
  };
242
251
  var queryParams = {
243
- 'pageSize': opts['pageSize'],
244
- 'pageNum': opts['pageNum'],
245
- 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
246
- 'sortBy': opts['sortBy'],
247
- 'sortOrder': opts['sortOrder'],
248
- 'startDate': opts['startDate'],
249
- 'endDate': opts['endDate'],
250
- 'dateType': opts['dateType'],
251
- 'systemFilesOnly': opts['systemFilesOnly'],
252
- 'files': opts['files'],
253
- 'format': opts['format'],
254
- 'serialNumber': this.apiClient.buildCollectionParam(opts['serialNumber'], 'multi'),
255
- 'sessionUID': this.apiClient.buildCollectionParam(opts['sessionUID'], 'multi'),
256
- 'eventUID': this.apiClient.buildCollectionParam(opts['eventUID'], 'multi'),
257
- 'selectFields': opts['selectFields']
252
+ pageSize: opts["pageSize"],
253
+ pageNum: opts["pageNum"],
254
+ deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
255
+ sortBy: opts["sortBy"],
256
+ sortOrder: opts["sortOrder"],
257
+ startDate: opts["startDate"],
258
+ endDate: opts["endDate"],
259
+ dateType: opts["dateType"],
260
+ systemFilesOnly: opts["systemFilesOnly"],
261
+ files: opts["files"],
262
+ format: opts["format"],
263
+ serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
264
+ fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi"),
265
+ sessionUID: this.apiClient.buildCollectionParam(opts["sessionUID"], "multi"),
266
+ eventUID: this.apiClient.buildCollectionParam(opts["eventUID"], "multi"),
267
+ selectFields: opts["selectFields"]
258
268
  };
259
269
  var headerParams = {};
260
270
  var formParams = {};
261
- var authNames = ['personalAccessToken'];
271
+ var authNames = ["personalAccessToken"];
262
272
  var contentTypes = [];
263
- var accepts = ['application/json', 'text/csv'];
264
- var returnType = _GetEvents200Response["default"];
265
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
273
+ var accepts = ["application/json", "text/csv"];
274
+ var returnType = _GetProjectEvents200Response["default"];
275
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/events", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
266
276
  }
267
277
 
268
278
  /**
269
- * Get Events of a Fleet
270
- * @param {String} projectOrProductUID
271
- * @param {String} fleetUID
279
+ * Get Events of a Project
280
+ * @param {String} projectOrProductUID
272
281
  * @param {Object} opts Optional parameters
273
282
  * @param {Number} opts.pageSize (default to 50)
274
283
  * @param {Number} opts.pageNum (default to 1)
@@ -278,101 +287,92 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
278
287
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
279
288
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
280
289
  * @param {module:model/String} opts.dateType Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (default to 'captured')
281
- * @param {Boolean} opts.systemFilesOnly
282
- * @param {String} opts.files
290
+ * @param {Boolean} opts.systemFilesOnly
291
+ * @param {String} opts.files
283
292
  * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
284
293
  * @param {Array.<String>} opts.serialNumber Filter by Serial Number
294
+ * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
285
295
  * @param {Array.<String>} opts.sessionUID Filter by Session UID
286
296
  * @param {Array.<String>} opts.eventUID Filter by Event UID
287
297
  * @param {String} opts.selectFields Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
288
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
298
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
289
299
  */
290
300
  }, {
291
- key: "getFleetEvents",
292
- value: function getFleetEvents(projectOrProductUID, fleetUID, opts) {
293
- return this.getFleetEventsWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
301
+ key: "getProjectEvents",
302
+ value: function getProjectEvents(projectOrProductUID, opts) {
303
+ return this.getProjectEventsWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
294
304
  return response_and_data.data;
295
305
  });
296
306
  }
297
307
 
298
308
  /**
299
- * Get Events of a Fleet by cursor
300
- * @param {String} projectOrProductUID
301
- * @param {String} fleetUID
309
+ * Get Events of a Project by cursor
310
+ * @param {String} projectOrProductUID
302
311
  * @param {Object} opts Optional parameters
303
312
  * @param {Number} opts.limit (default to 50)
304
- * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
313
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
305
314
  * @param {module:model/String} opts.sortOrder (default to 'asc')
306
- * @param {Boolean} opts.systemFilesOnly
307
- * @param {String} opts.files
315
+ * @param {Boolean} opts.systemFilesOnly
316
+ * @param {String} opts.files
317
+ * @param {String} opts.fleetUID
308
318
  * @param {Array.<String>} opts.deviceUID A Device UID.
309
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
310
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
311
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
319
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
312
320
  */
313
321
  }, {
314
- key: "getFleetEventsByCursorWithHttpInfo",
315
- value: function getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts) {
322
+ key: "getProjectEventsByCursorWithHttpInfo",
323
+ value: function getProjectEventsByCursorWithHttpInfo(projectOrProductUID, opts) {
316
324
  opts = opts || {};
317
325
  var postBody = null;
318
326
  // verify the required parameter 'projectOrProductUID' is set
319
327
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
320
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEventsByCursor");
321
- }
322
- // verify the required parameter 'fleetUID' is set
323
- if (fleetUID === undefined || fleetUID === null) {
324
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
328
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectEventsByCursor");
325
329
  }
326
330
  var pathParams = {
327
- 'projectOrProductUID': projectOrProductUID,
328
- 'fleetUID': fleetUID
331
+ projectOrProductUID: projectOrProductUID
329
332
  };
330
333
  var queryParams = {
331
- 'limit': opts['limit'],
332
- 'cursor': opts['cursor'],
333
- 'sortOrder': opts['sortOrder'],
334
- 'systemFilesOnly': opts['systemFilesOnly'],
335
- 'files': opts['files'],
336
- 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
337
- 'startDate': opts['startDate'],
338
- 'endDate': opts['endDate']
334
+ limit: opts["limit"],
335
+ cursor: opts["cursor"],
336
+ sortOrder: opts["sortOrder"],
337
+ systemFilesOnly: opts["systemFilesOnly"],
338
+ files: opts["files"],
339
+ fleetUID: opts["fleetUID"],
340
+ deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi")
339
341
  };
340
342
  var headerParams = {};
341
343
  var formParams = {};
342
- var authNames = ['personalAccessToken'];
344
+ var authNames = ["personalAccessToken"];
343
345
  var contentTypes = [];
344
- var accepts = ['application/json'];
345
- var returnType = _GetEventsByCursor200Response["default"];
346
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
346
+ var accepts = ["application/json"];
347
+ var returnType = _GetProjectEventsByCursor200Response["default"];
348
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
347
349
  }
348
350
 
349
351
  /**
350
- * Get Events of a Fleet by cursor
351
- * @param {String} projectOrProductUID
352
- * @param {String} fleetUID
352
+ * Get Events of a Project by cursor
353
+ * @param {String} projectOrProductUID
353
354
  * @param {Object} opts Optional parameters
354
355
  * @param {Number} opts.limit (default to 50)
355
- * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
356
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
356
357
  * @param {module:model/String} opts.sortOrder (default to 'asc')
357
- * @param {Boolean} opts.systemFilesOnly
358
- * @param {String} opts.files
358
+ * @param {Boolean} opts.systemFilesOnly
359
+ * @param {String} opts.files
360
+ * @param {String} opts.fleetUID
359
361
  * @param {Array.<String>} opts.deviceUID A Device UID.
360
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
361
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
362
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
362
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
363
363
  */
364
364
  }, {
365
- key: "getFleetEventsByCursor",
366
- value: function getFleetEventsByCursor(projectOrProductUID, fleetUID, opts) {
367
- return this.getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
365
+ key: "getProjectEventsByCursor",
366
+ value: function getProjectEventsByCursor(projectOrProductUID, opts) {
367
+ return this.getProjectEventsByCursorWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
368
368
  return response_and_data.data;
369
369
  });
370
370
  }
371
371
 
372
372
  /**
373
373
  * Get Route Logs by Event UID
374
- * @param {String} projectOrProductUID
375
- * @param {String} eventUID
374
+ * @param {String} projectOrProductUID
375
+ * @param {String} eventUID
376
376
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RouteLog>} and HTTP response
377
377
  */
378
378
  }, {
@@ -388,23 +388,23 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
388
388
  throw new _Error["default"]("Missing the required parameter 'eventUID' when calling getRouteLogsByEvent");
389
389
  }
390
390
  var pathParams = {
391
- 'projectOrProductUID': projectOrProductUID,
392
- 'eventUID': eventUID
391
+ projectOrProductUID: projectOrProductUID,
392
+ eventUID: eventUID
393
393
  };
394
394
  var queryParams = {};
395
395
  var headerParams = {};
396
396
  var formParams = {};
397
- var authNames = ['personalAccessToken'];
397
+ var authNames = ["personalAccessToken"];
398
398
  var contentTypes = [];
399
- var accepts = ['application/json'];
399
+ var accepts = ["application/json"];
400
400
  var returnType = [_RouteLog["default"]];
401
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
401
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
402
402
  }
403
403
 
404
404
  /**
405
405
  * Get Route Logs by Event UID
406
- * @param {String} projectOrProductUID
407
- * @param {String} eventUID
406
+ * @param {String} projectOrProductUID
407
+ * @param {String} eventUID
408
408
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RouteLog>}
409
409
  */
410
410
  }, {