@blues-inc/notehub-js 6.7.0 → 7.0.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 (192) hide show
  1. package/README.md +154 -150
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +12 -7
  4. package/dist/api/AuthorizationApi.js +11 -50
  5. package/dist/api/DescriptionApi.js +49 -33
  6. package/dist/api/DeviceApi.js +277 -134
  7. package/dist/api/EventApi.js +67 -200
  8. package/dist/api/ExternalDevicesApi.js +19 -13
  9. package/dist/api/JobsApi.js +57 -39
  10. package/dist/api/MonitorApi.js +27 -17
  11. package/dist/api/OrganizationApi.js +25 -19
  12. package/dist/api/ProjectApi.js +259 -165
  13. package/dist/api/RouteApi.js +54 -39
  14. package/dist/api/SkillsApi.js +279 -0
  15. package/dist/api/UsageApi.js +73 -63
  16. package/dist/api/WebhookApi.js +67 -45
  17. package/dist/index.js +91 -63
  18. package/dist/model/AWSRoleConfig.js +1 -1
  19. package/dist/model/AddDeviceToFleetsRequest.js +3 -3
  20. package/dist/model/Alert.js +14 -9
  21. package/dist/model/AlertDataInner.js +9 -4
  22. package/dist/model/AlertNotificationsInner.js +14 -4
  23. package/dist/model/ArchiveStats.js +1 -1
  24. package/dist/model/AwsRoute.js +1 -1
  25. package/dist/model/AzureRoute.js +1 -1
  26. package/dist/model/BatchJobNoteRequest.js +1 -1
  27. package/dist/model/BatchJobRequests.js +5 -5
  28. package/dist/model/BillingAccount.js +1 -1
  29. package/dist/model/BlynkRoute.js +1 -1
  30. package/dist/model/Body.js +2 -1
  31. package/dist/model/CancelJobRun200Response.js +1 -1
  32. package/dist/model/CellularPlan.js +3 -2
  33. package/dist/model/CloneProjectRequest.js +7 -7
  34. package/dist/model/Contact.js +1 -1
  35. package/dist/model/CreateFleetRequest.js +4 -3
  36. package/dist/model/CreateJob201Response.js +1 -1
  37. package/dist/model/CreateMonitor.js +37 -25
  38. package/dist/model/CreateProductRequest.js +7 -6
  39. package/dist/model/CreateProjectRequest.js +5 -5
  40. package/dist/model/CreateProjectSecretRequest.js +5 -5
  41. package/dist/model/CreateUpdateRepository.js +3 -1
  42. package/dist/model/CreatedRepository.js +5 -5
  43. package/dist/model/CurrentFirmware.js +1 -1
  44. package/dist/model/DFUEnv.js +1 -1
  45. package/dist/model/DFUState.js +1 -1
  46. package/dist/model/DataField.js +1 -1
  47. package/dist/model/DataSet.js +4 -4
  48. package/dist/model/DataSetField.js +2 -2
  49. package/dist/model/DataUsage.js +1 -1
  50. package/dist/model/DatacakeRoute.js +1 -1
  51. package/dist/model/DatasetReloadProgress.js +1 -1
  52. package/dist/model/DeleteDeviceFromFleetsRequest.js +3 -3
  53. package/dist/model/DeleteJob200Response.js +1 -1
  54. package/dist/model/DeleteNotefilesRequest.js +2 -2
  55. package/dist/model/DescriptionRecord.js +6 -6
  56. package/dist/model/DescriptionRecordList.js +1 -1
  57. package/dist/model/Device.js +36 -8
  58. package/dist/model/DeviceDfuHistory.js +12 -2
  59. package/dist/model/DeviceDfuHistoryCurrent.js +2 -2
  60. package/dist/model/DeviceDfuHistoryPage.js +14 -1
  61. package/dist/model/DeviceDfuStateMachine.js +2 -1
  62. package/dist/model/DeviceDfuStateMachineNode.js +2 -2
  63. package/dist/model/DeviceDfuStatus.js +12 -3
  64. package/dist/model/DeviceDfuStatusPage.js +14 -1
  65. package/dist/model/DeviceSensor.js +1 -1
  66. package/dist/model/DeviceSession.js +5 -5
  67. package/dist/model/DeviceTowerInfo.js +6 -1
  68. package/dist/model/DeviceUsage.js +1 -1
  69. package/dist/model/DfuActionRequest.js +2 -2
  70. package/dist/model/EmailNotification.js +29 -6
  71. package/dist/model/EnvTreeJsonNode.js +1 -1
  72. package/dist/model/EnvVar.js +1 -1
  73. package/dist/model/EnvironmentVariables.js +1 -1
  74. package/dist/model/Error.js +1 -1
  75. package/dist/model/Event.js +16 -7
  76. package/dist/model/Filter.js +1 -1
  77. package/dist/model/Firmware.js +1 -1
  78. package/dist/model/FirmwareInfo.js +6 -6
  79. package/dist/model/Fleet.js +11 -10
  80. package/dist/model/FleetConnectivityAssurance.js +1 -1
  81. package/dist/model/GetAlerts200Response.js +14 -1
  82. package/dist/model/GetApiUsage200Response.js +2 -2
  83. package/dist/model/GetDataUsage200Response.js +2 -2
  84. package/dist/model/GetDataUsage200ResponseDataInner.js +3 -3
  85. package/dist/model/GetDbNote200Response.js +1 -1
  86. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
  87. package/dist/model/GetDeviceFleets200Response.js +1 -1
  88. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  89. package/dist/model/GetDeviceJourney200Response.js +1 -1
  90. package/dist/model/GetDeviceJourney200ResponseJourney.js +1 -1
  91. package/dist/model/GetDeviceJourneys200Response.js +1 -1
  92. package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +1 -1
  93. package/dist/model/GetDeviceLatestEvents200Response.js +2 -2
  94. package/dist/model/GetDevicePlans200Response.js +2 -1
  95. package/dist/model/GetDevicePublicKey200Response.js +5 -3
  96. package/dist/model/GetDevicePublicKeys200Response.js +14 -1
  97. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -1
  98. package/dist/model/GetDeviceSessions200Response.js +14 -1
  99. package/dist/model/GetDevices200Response.js +14 -1
  100. package/dist/model/GetEvents200Response.js +14 -1
  101. package/dist/model/GetJobRuns200Response.js +1 -1
  102. package/dist/model/GetJobs200Response.js +1 -1
  103. package/dist/model/GetNotefile200Response.js +1 -1
  104. package/dist/model/{GetBillingAccount200Response.js → GetOrganization200Response.js} +28 -28
  105. package/dist/model/{GetBillingAccount200ResponsePlan.js → GetOrganization200ResponsePlan.js} +24 -24
  106. package/dist/model/{GetBillingAccountBalanceHistory200Response.js → GetOrganizationBalanceHistory200Response.js} +22 -22
  107. package/dist/model/{GetBillingAccountBalanceHistory200ResponseDataInner.js → GetOrganizationBalanceHistory200ResponseDataInner.js} +22 -22
  108. package/dist/model/GetOrganizations200Response.js +1 -1
  109. package/dist/model/GetProducts200Response.js +1 -1
  110. package/dist/model/GetProjectMembers200Response.js +1 -1
  111. package/dist/model/GetProjectSecretsResponse.js +1 -1
  112. package/dist/model/GetProjects200Response.js +1 -1
  113. package/dist/model/GetRouteLogsUsage200Response.js +2 -2
  114. package/dist/model/GetSessionsUsage200Response.js +3 -3
  115. package/dist/model/GetWebhooks200Response.js +1 -1
  116. package/dist/model/GoogleRoute.js +1 -1
  117. package/dist/model/HealthLog.js +7 -4
  118. package/dist/model/HttpRoute.js +1 -1
  119. package/dist/model/Job.js +1 -1
  120. package/dist/model/JobDefinition.js +2 -2
  121. package/dist/model/JobDefinitionReportOptions.js +1 -1
  122. package/dist/model/JobDefinitionSelect.js +3 -3
  123. package/dist/model/JobDetail.js +1 -1
  124. package/dist/model/JobDetailAllOf.js +1 -1
  125. package/dist/model/JobRun.js +1 -1
  126. package/dist/model/Location.js +13 -7
  127. package/dist/model/Monitor.js +18 -12
  128. package/dist/model/MonitorAlertRoutesInner.js +60 -14
  129. package/dist/model/MqttRoute.js +1 -1
  130. package/dist/model/Note.js +2 -2
  131. package/dist/model/NoteInput.js +1 -1
  132. package/dist/model/Notefile.js +2 -1
  133. package/dist/model/NotefileSchema.js +5 -3
  134. package/dist/model/NotehubRoute.js +7 -3
  135. package/dist/model/NotehubRouteSummary.js +6 -1
  136. package/dist/model/OAuth2Error.js +1 -1
  137. package/dist/model/OAuth2TokenResponse.js +1 -1
  138. package/dist/model/Organization.js +5 -3
  139. package/dist/model/Product.js +8 -4
  140. package/dist/model/Project.js +7 -4
  141. package/dist/model/ProjectMember.js +5 -4
  142. package/dist/model/ProjectSecret.js +7 -7
  143. package/dist/model/ProvisionDeviceRequest.js +5 -5
  144. package/dist/model/ProxyRoute.js +1 -1
  145. package/dist/model/QubitroRoute.js +1 -1
  146. package/dist/model/RadRoute.js +1 -1
  147. package/dist/model/Repository.js +3 -3
  148. package/dist/model/RepositoryListResponse.js +1 -1
  149. package/dist/model/{Login200Response.js → RepositoryRecord.js} +52 -24
  150. package/dist/model/RepositoryTokenRequest.js +1 -1
  151. package/dist/model/RepositoryTokenResponse.js +1 -1
  152. package/dist/model/RouteLog.js +9 -9
  153. package/dist/model/RouteTransformSettings.js +1 -1
  154. package/dist/model/RunJob200Response.js +1 -1
  155. package/dist/model/S3ArchiveRoute.js +1 -1
  156. package/dist/model/SatelliteDataUsage.js +1 -1
  157. package/dist/model/SatellitePlan.js +1 -1
  158. package/dist/model/SchemaProperty.js +6 -4
  159. package/dist/model/SignalDevice200Response.js +2 -2
  160. package/dist/model/SimUsage.js +1 -1
  161. package/dist/model/Skill.js +207 -0
  162. package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +59 -40
  163. package/dist/model/{GetEventsByCursor200Response.js → SkillSet.js} +75 -51
  164. package/dist/model/SkillSummary.js +205 -0
  165. package/dist/model/SkillWrite.js +128 -0
  166. package/dist/model/SkillWriteResult.js +153 -0
  167. package/dist/model/SlackBearerNotification.js +31 -8
  168. package/dist/model/SlackRoute.js +1 -1
  169. package/dist/model/SlackWebHookNotification.js +31 -8
  170. package/dist/model/SnowflakeRoute.js +1 -1
  171. package/dist/model/SnowpipeStreamingRoute.js +1 -1
  172. package/dist/model/ThingworxRoute.js +1 -1
  173. package/dist/model/TowerLocation.js +1 -1
  174. package/dist/model/TwilioNotification.js +167 -0
  175. package/dist/model/TwilioRoute.js +1 -1
  176. package/dist/model/UpdateFleetRequest.js +7 -6
  177. package/dist/model/UpdateHostFirmwareRequest.js +4 -4
  178. package/dist/model/UpdateProjectSecretRequest.js +3 -3
  179. package/dist/model/UploadMetadata.js +1 -1
  180. package/dist/model/UsageApiData.js +1 -1
  181. package/dist/model/UsageData.js +1 -1
  182. package/dist/model/UsageEventsData.js +1 -1
  183. package/dist/model/UsageEventsResponse.js +2 -2
  184. package/dist/model/UsageRouteLogsData.js +2 -2
  185. package/dist/model/UsageSessionsData.js +1 -1
  186. package/dist/model/UserDfuStateMachine.js +1 -1
  187. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  188. package/dist/model/UserFirmwareInfo.js +1 -1
  189. package/dist/model/WebhookSettings.js +4 -4
  190. package/package.json +1 -1
  191. package/dist/api/BillingAccountApi.js +0 -167
  192. package/dist/model/LoginRequest.js +0 -103
@@ -7,7 +7,6 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Error = _interopRequireDefault(require("../model/Error"));
9
9
  var _GetEvents200Response = _interopRequireDefault(require("../model/GetEvents200Response"));
10
- var _GetEventsByCursor200Response = _interopRequireDefault(require("../model/GetEventsByCursor200Response"));
11
10
  var _RouteLog = _interopRequireDefault(require("../model/RouteLog"));
12
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
12
  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); }
@@ -30,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
29
  /**
31
30
  * Event service.
32
31
  * @module api/EventApi
33
- * @version 6.7.0
32
+ * @version 7.0.0
34
33
  */
35
34
  var EventApi = exports["default"] = /*#__PURE__*/function () {
36
35
  /**
@@ -46,26 +45,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
46
45
  }
47
46
 
48
47
  /**
49
- * Get Events of a Project
48
+ * List events in a project
49
+ * List a project's events, filtered by device, notefile, date, fleet, session and more. Use `cursor` to read events in the order Notehub stored them and to poll for new ones. Set `format=csv` for CSV. For one fleet, use `GetFleetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
50
50
  * @param {String} projectOrProductUID
51
51
  * @param {Object} opts Optional parameters
52
- * @param {Number} opts.pageSize (default to 50)
52
+ * @param {Number} opts.pageSize (default to 1000)
53
53
  * @param {Number} opts.pageNum (default to 1)
54
- * @param {Array.<String>} opts.deviceUID A Device UID.
55
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
54
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
55
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
56
+ * @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
56
57
  * @param {module:model/String} opts.sortBy (default to 'captured')
57
58
  * @param {module:model/String} opts.sortOrder (default to 'asc')
58
59
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
59
60
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
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')
61
- * @param {Boolean} opts.systemFilesOnly
62
- * @param {String} opts.files
63
- * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
64
- * @param {Array.<String>} opts.serialNumber Filter by Serial Number
65
- * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
66
- * @param {Array.<String>} opts.sessionUID Filter by Session UID
67
- * @param {Array.<String>} opts.eventUID Filter by Event UID
68
- * @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.
61
+ * @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
62
+ * @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
63
+ * @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
64
+ * @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
65
+ * @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
66
+ * @param {Array.<String>} opts.fleetUID Filter by FleetUID
67
+ * @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
68
+ * @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
69
+ * @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
69
70
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
70
71
  */
71
72
  return _createClass(EventApi, [{
@@ -83,6 +84,7 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
83
84
  var queryParams = {
84
85
  pageSize: opts["pageSize"],
85
86
  pageNum: opts["pageNum"],
87
+ cursor: opts["cursor"],
86
88
  deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
87
89
  sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
88
90
  sortBy: opts["sortBy"],
@@ -109,26 +111,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
109
111
  }
110
112
 
111
113
  /**
112
- * Get Events of a Project
114
+ * List events in a project
115
+ * List a project's events, filtered by device, notefile, date, fleet, session and more. Use `cursor` to read events in the order Notehub stored them and to poll for new ones. Set `format=csv` for CSV. For one fleet, use `GetFleetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
113
116
  * @param {String} projectOrProductUID
114
117
  * @param {Object} opts Optional parameters
115
- * @param {Number} opts.pageSize (default to 50)
118
+ * @param {Number} opts.pageSize (default to 1000)
116
119
  * @param {Number} opts.pageNum (default to 1)
117
- * @param {Array.<String>} opts.deviceUID A Device UID.
118
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
120
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
121
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
122
+ * @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
119
123
  * @param {module:model/String} opts.sortBy (default to 'captured')
120
124
  * @param {module:model/String} opts.sortOrder (default to 'asc')
121
125
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
122
126
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
123
- * @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')
124
- * @param {Boolean} opts.systemFilesOnly
125
- * @param {String} opts.files
126
- * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
127
- * @param {Array.<String>} opts.serialNumber Filter by Serial Number
128
- * @param {Array.<String>} opts.fleetUID Filter by Fleet UID
129
- * @param {Array.<String>} opts.sessionUID Filter by Session UID
130
- * @param {Array.<String>} opts.eventUID Filter by Event UID
131
- * @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.
127
+ * @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
128
+ * @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
129
+ * @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
130
+ * @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
131
+ * @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
132
+ * @param {Array.<String>} opts.fleetUID Filter by FleetUID
133
+ * @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
134
+ * @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
135
+ * @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
132
136
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
133
137
  */
134
138
  }, {
@@ -140,93 +144,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
140
144
  }
141
145
 
142
146
  /**
143
- * Get Events of a Project by cursor
144
- * @param {String} projectOrProductUID
145
- * @param {Object} opts Optional parameters
146
- * @param {Number} opts.limit (default to 50)
147
- * @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.
148
- * @param {module:model/String} opts.sortOrder (default to 'asc')
149
- * @param {Boolean} opts.systemFilesOnly
150
- * @param {String} opts.files
151
- * @param {String} opts.fleetUID
152
- * @param {Array.<String>} opts.deviceUID A Device UID.
153
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
154
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
155
- */
156
- }, {
157
- key: "getEventsByCursorWithHttpInfo",
158
- value: function getEventsByCursorWithHttpInfo(projectOrProductUID, opts) {
159
- opts = opts || {};
160
- var postBody = null;
161
- // verify the required parameter 'projectOrProductUID' is set
162
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
163
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getEventsByCursor");
164
- }
165
- var pathParams = {
166
- projectOrProductUID: projectOrProductUID
167
- };
168
- var queryParams = {
169
- limit: opts["limit"],
170
- cursor: opts["cursor"],
171
- sortOrder: opts["sortOrder"],
172
- systemFilesOnly: opts["systemFilesOnly"],
173
- files: opts["files"],
174
- fleetUID: opts["fleetUID"],
175
- deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
176
- sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi")
177
- };
178
- var headerParams = {};
179
- var formParams = {};
180
- var authNames = ["personalAccessToken"];
181
- var contentTypes = [];
182
- var accepts = ["application/json"];
183
- var returnType = _GetEventsByCursor200Response["default"];
184
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
185
- }
186
-
187
- /**
188
- * Get Events of a Project by cursor
189
- * @param {String} projectOrProductUID
190
- * @param {Object} opts Optional parameters
191
- * @param {Number} opts.limit (default to 50)
192
- * @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.
193
- * @param {module:model/String} opts.sortOrder (default to 'asc')
194
- * @param {Boolean} opts.systemFilesOnly
195
- * @param {String} opts.files
196
- * @param {String} opts.fleetUID
197
- * @param {Array.<String>} opts.deviceUID A Device UID.
198
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
199
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
200
- */
201
- }, {
202
- key: "getEventsByCursor",
203
- value: function getEventsByCursor(projectOrProductUID, opts) {
204
- return this.getEventsByCursorWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
205
- return response_and_data.data;
206
- });
207
- }
208
-
209
- /**
210
- * Get Events of a Fleet
147
+ * List events in a fleet
148
+ * List the events from one fleet, with the same filters, `cursor` and CSV output as `GetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
211
149
  * @param {String} projectOrProductUID
212
150
  * @param {String} fleetUID
213
151
  * @param {Object} opts Optional parameters
214
- * @param {Number} opts.pageSize (default to 50)
152
+ * @param {Number} opts.pageSize (default to 1000)
215
153
  * @param {Number} opts.pageNum (default to 1)
216
- * @param {Array.<String>} opts.deviceUID A Device UID.
217
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
154
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
155
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
156
+ * @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
218
157
  * @param {module:model/String} opts.sortBy (default to 'captured')
219
158
  * @param {module:model/String} opts.sortOrder (default to 'asc')
220
159
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
221
160
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
222
- * @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')
223
- * @param {Boolean} opts.systemFilesOnly
224
- * @param {String} opts.files
225
- * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
226
- * @param {Array.<String>} opts.serialNumber Filter by Serial Number
227
- * @param {Array.<String>} opts.sessionUID Filter by Session UID
228
- * @param {Array.<String>} opts.eventUID Filter by Event UID
229
- * @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.
161
+ * @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
162
+ * @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
163
+ * @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
164
+ * @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
165
+ * @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
166
+ * @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
167
+ * @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
168
+ * @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
230
169
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
231
170
  */
232
171
  }, {
@@ -249,6 +188,7 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
249
188
  var queryParams = {
250
189
  pageSize: opts["pageSize"],
251
190
  pageNum: opts["pageNum"],
191
+ cursor: opts["cursor"],
252
192
  deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
253
193
  sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
254
194
  sortBy: opts["sortBy"],
@@ -274,26 +214,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
274
214
  }
275
215
 
276
216
  /**
277
- * Get Events of a Fleet
217
+ * List events in a fleet
218
+ * List the events from one fleet, with the same filters, `cursor` and CSV output as `GetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
278
219
  * @param {String} projectOrProductUID
279
220
  * @param {String} fleetUID
280
221
  * @param {Object} opts Optional parameters
281
- * @param {Number} opts.pageSize (default to 50)
222
+ * @param {Number} opts.pageSize (default to 1000)
282
223
  * @param {Number} opts.pageNum (default to 1)
283
- * @param {Array.<String>} opts.deviceUID A Device UID.
284
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
224
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
225
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
226
+ * @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
285
227
  * @param {module:model/String} opts.sortBy (default to 'captured')
286
228
  * @param {module:model/String} opts.sortOrder (default to 'asc')
287
229
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
288
230
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
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')
290
- * @param {Boolean} opts.systemFilesOnly
291
- * @param {String} opts.files
292
- * @param {module:model/String} opts.format Response format (JSON or CSV) (default to 'json')
293
- * @param {Array.<String>} opts.serialNumber Filter by Serial Number
294
- * @param {Array.<String>} opts.sessionUID Filter by Session UID
295
- * @param {Array.<String>} opts.eventUID Filter by Event UID
296
- * @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.
231
+ * @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
232
+ * @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
233
+ * @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
234
+ * @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
235
+ * @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
236
+ * @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
237
+ * @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
238
+ * @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
297
239
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
298
240
  */
299
241
  }, {
@@ -305,86 +247,10 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
305
247
  }
306
248
 
307
249
  /**
308
- * Get Events of a Fleet by cursor
309
- * @param {String} projectOrProductUID
310
- * @param {String} fleetUID
311
- * @param {Object} opts Optional parameters
312
- * @param {Number} opts.limit (default to 50)
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.
314
- * @param {module:model/String} opts.sortOrder (default to 'asc')
315
- * @param {Boolean} opts.systemFilesOnly
316
- * @param {String} opts.files
317
- * @param {Array.<String>} opts.deviceUID A Device UID.
318
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
319
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
320
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
321
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
322
- */
323
- }, {
324
- key: "getFleetEventsByCursorWithHttpInfo",
325
- value: function getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts) {
326
- opts = opts || {};
327
- var postBody = null;
328
- // verify the required parameter 'projectOrProductUID' is set
329
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
330
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEventsByCursor");
331
- }
332
- // verify the required parameter 'fleetUID' is set
333
- if (fleetUID === undefined || fleetUID === null) {
334
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
335
- }
336
- var pathParams = {
337
- projectOrProductUID: projectOrProductUID,
338
- fleetUID: fleetUID
339
- };
340
- var queryParams = {
341
- limit: opts["limit"],
342
- cursor: opts["cursor"],
343
- sortOrder: opts["sortOrder"],
344
- systemFilesOnly: opts["systemFilesOnly"],
345
- files: opts["files"],
346
- deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
347
- sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
348
- startDate: opts["startDate"],
349
- endDate: opts["endDate"]
350
- };
351
- var headerParams = {};
352
- var formParams = {};
353
- var authNames = ["personalAccessToken"];
354
- var contentTypes = [];
355
- var accepts = ["application/json"];
356
- var returnType = _GetEventsByCursor200Response["default"];
357
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
358
- }
359
-
360
- /**
361
- * Get Events of a Fleet by cursor
362
- * @param {String} projectOrProductUID
363
- * @param {String} fleetUID
364
- * @param {Object} opts Optional parameters
365
- * @param {Number} opts.limit (default to 50)
366
- * @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.
367
- * @param {module:model/String} opts.sortOrder (default to 'asc')
368
- * @param {Boolean} opts.systemFilesOnly
369
- * @param {String} opts.files
370
- * @param {Array.<String>} opts.deviceUID A Device UID.
371
- * @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
372
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
373
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
374
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
375
- */
376
- }, {
377
- key: "getFleetEventsByCursor",
378
- value: function getFleetEventsByCursor(projectOrProductUID, fleetUID, opts) {
379
- return this.getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
380
- return response_and_data.data;
381
- });
382
- }
383
-
384
- /**
385
- * Get Route Logs by Event UID
250
+ * Get an event's route logs
251
+ * Get the log of every attempt to send one event to each route, with the response status, body and duration. For a route's logs across events, use `GetRouteLogsByRoute`. Returns 404 if the event doesn't exist.
386
252
  * @param {String} projectOrProductUID
387
- * @param {String} eventUID
253
+ * @param {String} eventUID EventUID, e.g. `4506f411-dea6-44a0-9743-1130f57d7747`.
388
254
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RouteLog>} and HTTP response
389
255
  */
390
256
  }, {
@@ -414,9 +280,10 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
414
280
  }
415
281
 
416
282
  /**
417
- * Get Route Logs by Event UID
283
+ * Get an event's route logs
284
+ * Get the log of every attempt to send one event to each route, with the response status, body and duration. For a route's logs across events, use `GetRouteLogsByRoute`. Returns 404 if the event doesn't exist.
418
285
  * @param {String} projectOrProductUID
419
- * @param {String} eventUID
286
+ * @param {String} eventUID EventUID, e.g. `4506f411-dea6-44a0-9743-1130f57d7747`.
420
287
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RouteLog>}
421
288
  */
422
289
  }, {
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * ExternalDevices service.
31
31
  * @module api/ExternalDevicesApi
32
- * @version 6.7.0
32
+ * @version 7.0.0
33
33
  */
34
34
  var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
35
35
  /**
@@ -45,10 +45,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
45
45
  }
46
46
 
47
47
  /**
48
- * Creates an event using specified webhook
48
+ * Add an event from an external device
49
+ * Add an event from a device that isn't a Notecard, adding the device to the project if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:123` becomes `dev:ext:123`. Notehub sets `when` to the current time and adds `.qo` to a `file` with no extension. Requires the Owner or Developer role.
49
50
  * @param {String} productUID
50
51
  * @param {String} deviceUID
51
- * @param {module:model/Event} event Event Object
52
+ * @param {module:model/Event} event The event. `file`, `body` and `payload` are the usual fields.
52
53
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
53
54
  */
54
55
  return _createClass(ExternalDevicesApi, [{
@@ -82,10 +83,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
82
83
  }
83
84
 
84
85
  /**
85
- * Creates an event using specified webhook
86
+ * Add an event from an external device
87
+ * Add an event from a device that isn't a Notecard, adding the device to the project if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:123` becomes `dev:ext:123`. Notehub sets `when` to the current time and adds `.qo` to a `file` with no extension. Requires the Owner or Developer role.
86
88
  * @param {String} productUID
87
89
  * @param {String} deviceUID
88
- * @param {module:model/Event} event Event Object
90
+ * @param {module:model/Event} event The event. `file`, `body` and `payload` are the usual fields.
89
91
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
90
92
  */
91
93
  }, {
@@ -97,10 +99,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
97
99
  }
98
100
 
99
101
  /**
100
- * Closes the session for the specified device if open
102
+ * Close an external device's session
103
+ * Close an external device's session, if one is open, adding the device if it's new. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role.
101
104
  * @param {String} productUID
102
105
  * @param {String} deviceUID
103
- * @param {module:model/DeviceSession} deviceSession Session Object
106
+ * @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
104
107
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
105
108
  */
106
109
  }, {
@@ -134,10 +137,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
134
137
  }
135
138
 
136
139
  /**
137
- * Closes the session for the specified device if open
140
+ * Close an external device's session
141
+ * Close an external device's session, if one is open, adding the device if it's new. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role.
138
142
  * @param {String} productUID
139
143
  * @param {String} deviceUID
140
- * @param {module:model/DeviceSession} deviceSession Session Object
144
+ * @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
141
145
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
142
146
  */
143
147
  }, {
@@ -149,10 +153,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
149
153
  }
150
154
 
151
155
  /**
152
- * Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened.
156
+ * Open an external device's session
157
+ * Open a session for an external device, adding the device if it's new. An open session is closed first, with `why_session_closed` as the reason. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role. Returns 500 if webhooks are disabled for the project.
153
158
  * @param {String} productUID
154
159
  * @param {String} deviceUID
155
- * @param {module:model/DeviceSession} deviceSession Session Object
160
+ * @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
156
161
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
157
162
  */
158
163
  }, {
@@ -186,10 +191,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
186
191
  }
187
192
 
188
193
  /**
189
- * Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened.
194
+ * Open an external device's session
195
+ * Open a session for an external device, adding the device if it's new. An open session is closed first, with `why_session_closed` as the reason. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role. Returns 500 if webhooks are disabled for the project.
190
196
  * @param {String} productUID
191
197
  * @param {String} deviceUID
192
- * @param {module:model/DeviceSession} deviceSession Session Object
198
+ * @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
193
199
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
194
200
  */
195
201
  }, {