@blues-inc/notehub-js 1.0.36 → 1.0.37

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 (133) hide show
  1. package/README.md +11 -11
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +1 -1
  4. package/dist/api/AuthorizationApi.js +3 -3
  5. package/dist/api/BillingAccountApi.js +1 -1
  6. package/dist/api/DeviceApi.js +1 -1
  7. package/dist/api/EventApi.js +1 -1
  8. package/dist/api/ExternalDevicesApi.js +1 -1
  9. package/dist/api/MonitorApi.js +1 -1
  10. package/dist/api/ProjectApi.js +1 -1
  11. package/dist/api/RouteApi.js +1 -1
  12. package/dist/api/WebhookApi.js +1 -1
  13. package/dist/index.js +70 -7
  14. package/dist/model/Alert.js +1 -1
  15. package/dist/model/AlertDataInner.js +1 -1
  16. package/dist/model/AlertNotificationsInner.js +1 -1
  17. package/dist/model/AnalyticsEventsData.js +130 -0
  18. package/dist/model/AnalyticsEventsResponse.js +131 -0
  19. package/dist/model/AnalyticsRouteLogsData.js +140 -0
  20. package/dist/model/AnalyticsRouteLogsResponse.js +131 -0
  21. package/dist/model/AnalyticsSessionsData.js +140 -0
  22. package/dist/model/AnalyticsSessionsResponse.js +131 -0
  23. package/dist/model/Aws.js +1 -1
  24. package/dist/model/Azure.js +1 -1
  25. package/dist/model/BillingAccount.js +1 -1
  26. package/dist/model/Body.js +1 -1
  27. package/dist/model/CloneProjectRequest.js +1 -1
  28. package/dist/model/Contact.js +1 -1
  29. package/dist/model/CreateFleetRequest.js +1 -1
  30. package/dist/model/CreateMonitor.js +1 -1
  31. package/dist/model/CreateProductRequest.js +1 -1
  32. package/dist/model/CreateProjectRequest.js +1 -1
  33. package/dist/model/CreateUpdateRepository.js +1 -1
  34. package/dist/model/CurrentFirmware.js +1 -1
  35. package/dist/model/DFUEnv.js +1 -1
  36. package/dist/model/DFUState.js +1 -1
  37. package/dist/model/DataField.js +1 -1
  38. package/dist/model/DataSet.js +1 -1
  39. package/dist/model/DataSetField.js +1 -1
  40. package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
  41. package/dist/model/Device.js +1 -1
  42. package/dist/model/DeviceDfuHistory.js +1 -1
  43. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  44. package/dist/model/DeviceDfuStateMachine.js +1 -1
  45. package/dist/model/DeviceDfuStateMachineNode.js +1 -1
  46. package/dist/model/DeviceDfuStatus.js +1 -1
  47. package/dist/model/DeviceDfuStatusCurrent.js +1 -1
  48. package/dist/model/DeviceDfuStatusPage.js +1 -1
  49. package/dist/model/DeviceSession.js +1 -1
  50. package/dist/model/DeviceTowerInfo.js +1 -1
  51. package/dist/model/DeviceUsage.js +1 -1
  52. package/dist/model/DfuActionRequest.js +1 -1
  53. package/dist/model/EmailNotification.js +1 -1
  54. package/dist/model/EnvTreeJsonNode.js +1 -1
  55. package/dist/model/EnvVar.js +1 -1
  56. package/dist/model/EnvironmentVariables.js +1 -1
  57. package/dist/model/Error.js +1 -1
  58. package/dist/model/Event.js +1 -1
  59. package/dist/model/Firmware.js +1 -1
  60. package/dist/model/FirmwareInfo.js +1 -1
  61. package/dist/model/Fleet.js +1 -1
  62. package/dist/model/GetAlerts200Response.js +1 -1
  63. package/dist/model/GetBillingAccounts200Response.js +1 -1
  64. package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
  65. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  66. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
  67. package/dist/model/GetDeviceLatest200Response.js +1 -1
  68. package/dist/model/GetDevicePublicKey200Response.js +1 -1
  69. package/dist/model/GetDeviceSessions200Response.js +1 -1
  70. package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
  71. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
  72. package/dist/model/GetProjectDevices200Response.js +1 -1
  73. package/dist/model/GetProjectEvents200Response.js +1 -1
  74. package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
  75. package/dist/model/GetProjectFleets200Response.js +1 -1
  76. package/dist/model/GetProjectMembers200Response.js +1 -1
  77. package/dist/model/GetProjectProducts200Response.js +1 -1
  78. package/dist/model/GetProjects200Response.js +1 -1
  79. package/dist/model/GetWebhooks200Response.js +1 -1
  80. package/dist/model/Google.js +1 -1
  81. package/dist/model/HandleNoteChanges200Response.js +1 -1
  82. package/dist/model/HandleNoteGet200Response.js +1 -1
  83. package/dist/model/HandleNoteSignal200Response.js +1 -1
  84. package/dist/model/HandleNotefileChanges200Response.js +1 -1
  85. package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
  86. package/dist/model/HandleNotefileDeleteRequest.js +1 -1
  87. package/dist/model/Http.js +1 -1
  88. package/dist/model/HttpFilter.js +1 -1
  89. package/dist/model/HttpTransform.js +1 -1
  90. package/dist/model/Location.js +1 -1
  91. package/dist/model/Login200Response.js +1 -1
  92. package/dist/model/LoginRequest.js +1 -1
  93. package/dist/model/Monitor.js +1 -1
  94. package/dist/model/MonitorAlertRoutesInner.js +1 -1
  95. package/dist/model/Mqtt.js +1 -1
  96. package/dist/model/Note.js +1 -1
  97. package/dist/model/NotefileSchema.js +1 -1
  98. package/dist/model/NotehubRoute.js +1 -1
  99. package/dist/model/NotehubRouteSchema.js +1 -1
  100. package/dist/model/PersonalAccessToken.js +168 -0
  101. package/dist/model/PersonalAccessTokenCreatedBy.js +116 -0
  102. package/dist/model/PersonalAccessTokenInfo.js +121 -0
  103. package/dist/model/PersonalAccessTokenSecret.js +105 -0
  104. package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
  105. package/dist/model/Product.js +1 -1
  106. package/dist/model/Project.js +1 -1
  107. package/dist/model/ProjectMember.js +1 -1
  108. package/dist/model/Proxy.js +1 -1
  109. package/dist/model/PutDeviceFleetsRequest.js +1 -1
  110. package/dist/model/QuestionDataResponseLineChart.js +1 -1
  111. package/dist/model/QuestionDataResponseMap.js +1 -1
  112. package/dist/model/Radresponder.js +1 -1
  113. package/dist/model/Repository.js +1 -1
  114. package/dist/model/RouteLog.js +1 -1
  115. package/dist/model/SchemaProperty.js +1 -1
  116. package/dist/model/SimUsage.js +1 -1
  117. package/dist/model/Slack.js +1 -1
  118. package/dist/model/SlackBearerNotification.js +1 -1
  119. package/dist/model/SlackWebHookNotification.js +1 -1
  120. package/dist/model/Snowflake.js +1 -1
  121. package/dist/model/SnowflakeTransform.js +1 -1
  122. package/dist/model/Thingworx.js +1 -1
  123. package/dist/model/TowerLocation.js +1 -1
  124. package/dist/model/Twilio.js +1 -1
  125. package/dist/model/UpdateFleetRequest.js +1 -1
  126. package/dist/model/UploadMetadata.js +1 -1
  127. package/dist/model/UserDbRoute.js +1 -1
  128. package/dist/model/UserDfuStateMachine.js +1 -1
  129. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  130. package/dist/model/UserFirmwareInfo.js +1 -1
  131. package/dist/model/WebhookSettings.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/api/RepositoryApi.js +0 -605
@@ -1,605 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _CreateUpdateRepository = _interopRequireDefault(require("../model/CreateUpdateRepository"));
9
- var _DataSet = _interopRequireDefault(require("../model/DataSet"));
10
- var _Error = _interopRequireDefault(require("../model/Error"));
11
- var _Repository = _interopRequireDefault(require("../model/Repository"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
14
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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
- * Notehub API
20
- * The OpenAPI definition for the Notehub.io API.
21
- *
22
- * The version of the OpenAPI document: 1.2.0
23
- * Contact: engineering@blues.io
24
- *
25
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
- * https://openapi-generator.tech
27
- * Do not edit the class manually.
28
- *
29
- */
30
- /**
31
- * Repository service.
32
- * @module api/RepositoryApi
33
- * @version 1.0.36
34
- */
35
- var RepositoryApi = exports["default"] = /*#__PURE__*/function () {
36
- /**
37
- * Constructs a new RepositoryApi.
38
- * @alias module:api/RepositoryApi
39
- * @class
40
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
- * default to {@link module:ApiClient#instance} if unspecified.
42
- */
43
- function RepositoryApi(apiClient) {
44
- _classCallCheck(this, RepositoryApi);
45
- this.apiClient = apiClient || _ApiClient["default"].instance;
46
- }
47
-
48
- /**
49
- * Create a new repository
50
- * @param {module:model/CreateUpdateRepository} createUpdateRepository
51
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Repository} and HTTP response
52
- */
53
- return _createClass(RepositoryApi, [{
54
- key: "createRepositoryWithHttpInfo",
55
- value: function createRepositoryWithHttpInfo(createUpdateRepository) {
56
- var postBody = createUpdateRepository;
57
- // verify the required parameter 'createUpdateRepository' is set
58
- if (createUpdateRepository === undefined || createUpdateRepository === null) {
59
- throw new _Error["default"]("Missing the required parameter 'createUpdateRepository' when calling createRepository");
60
- }
61
- var pathParams = {};
62
- var queryParams = {};
63
- var headerParams = {};
64
- var formParams = {};
65
- var authNames = ["api_key"];
66
- var contentTypes = ["application/json"];
67
- var accepts = ["application/json"];
68
- var returnType = _Repository["default"];
69
- return this.apiClient.callApi("/v1/repositories", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
70
- }
71
-
72
- /**
73
- * Create a new repository
74
- * @param {module:model/CreateUpdateRepository} createUpdateRepository
75
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Repository}
76
- */
77
- }, {
78
- key: "createRepository",
79
- value: function createRepository(createUpdateRepository) {
80
- return this.createRepositoryWithHttpInfo(createUpdateRepository).then(function (response_and_data) {
81
- return response_and_data.data;
82
- });
83
- }
84
-
85
- /**
86
- * Create a new dataset within a repository
87
- * @param {String} repositoryUID
88
- * @param {String} xRepositoryKey The secret key used to access this repository
89
- * @param {module:model/DataSet} dataSet
90
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataSet} and HTTP response
91
- */
92
- }, {
93
- key: "createRepositoryDatasetWithHttpInfo",
94
- value: function createRepositoryDatasetWithHttpInfo(repositoryUID, xRepositoryKey, dataSet) {
95
- var postBody = dataSet;
96
- // verify the required parameter 'repositoryUID' is set
97
- if (repositoryUID === undefined || repositoryUID === null) {
98
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling createRepositoryDataset");
99
- }
100
- // verify the required parameter 'xRepositoryKey' is set
101
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
102
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling createRepositoryDataset");
103
- }
104
- // verify the required parameter 'dataSet' is set
105
- if (dataSet === undefined || dataSet === null) {
106
- throw new _Error["default"]("Missing the required parameter 'dataSet' when calling createRepositoryDataset");
107
- }
108
- var pathParams = {
109
- repositoryUID: repositoryUID
110
- };
111
- var queryParams = {};
112
- var headerParams = {
113
- "X-Repository-Key": xRepositoryKey
114
- };
115
- var formParams = {};
116
- var authNames = ["api_key"];
117
- var contentTypes = ["application/json"];
118
- var accepts = ["application/json"];
119
- var returnType = _DataSet["default"];
120
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/datasets", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
121
- }
122
-
123
- /**
124
- * Create a new dataset within a repository
125
- * @param {String} repositoryUID
126
- * @param {String} xRepositoryKey The secret key used to access this repository
127
- * @param {module:model/DataSet} dataSet
128
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataSet}
129
- */
130
- }, {
131
- key: "createRepositoryDataset",
132
- value: function createRepositoryDataset(repositoryUID, xRepositoryKey, dataSet) {
133
- return this.createRepositoryDatasetWithHttpInfo(repositoryUID, xRepositoryKey, dataSet).then(function (response_and_data) {
134
- return response_and_data.data;
135
- });
136
- }
137
-
138
- /**
139
- * Delete a repository
140
- * @param {String} repositoryUID
141
- * @param {String} xRepositoryKey The secret key used to access this repository
142
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
143
- */
144
- }, {
145
- key: "deleteRepositoryWithHttpInfo",
146
- value: function deleteRepositoryWithHttpInfo(repositoryUID, xRepositoryKey) {
147
- var postBody = null;
148
- // verify the required parameter 'repositoryUID' is set
149
- if (repositoryUID === undefined || repositoryUID === null) {
150
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling deleteRepository");
151
- }
152
- // verify the required parameter 'xRepositoryKey' is set
153
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
154
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling deleteRepository");
155
- }
156
- var pathParams = {
157
- repositoryUID: repositoryUID
158
- };
159
- var queryParams = {};
160
- var headerParams = {
161
- "X-Repository-Key": xRepositoryKey
162
- };
163
- var formParams = {};
164
- var authNames = ["api_key"];
165
- var contentTypes = [];
166
- var accepts = ["application/json"];
167
- var returnType = null;
168
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
169
- }
170
-
171
- /**
172
- * Delete a repository
173
- * @param {String} repositoryUID
174
- * @param {String} xRepositoryKey The secret key used to access this repository
175
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
176
- */
177
- }, {
178
- key: "deleteRepository",
179
- value: function deleteRepository(repositoryUID, xRepositoryKey) {
180
- return this.deleteRepositoryWithHttpInfo(repositoryUID, xRepositoryKey).then(function (response_and_data) {
181
- return response_and_data.data;
182
- });
183
- }
184
-
185
- /**
186
- * Delete a dataset
187
- * @param {String} repositoryUID
188
- * @param {String} name The name of the data set
189
- * @param {String} xRepositoryKey The secret key used to access this repository
190
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
191
- */
192
- }, {
193
- key: "deleteRepositoryDatasetWithHttpInfo",
194
- value: function deleteRepositoryDatasetWithHttpInfo(repositoryUID, name, xRepositoryKey) {
195
- var postBody = null;
196
- // verify the required parameter 'repositoryUID' is set
197
- if (repositoryUID === undefined || repositoryUID === null) {
198
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling deleteRepositoryDataset");
199
- }
200
- // verify the required parameter 'name' is set
201
- if (name === undefined || name === null) {
202
- throw new _Error["default"]("Missing the required parameter 'name' when calling deleteRepositoryDataset");
203
- }
204
- // verify the required parameter 'xRepositoryKey' is set
205
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
206
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling deleteRepositoryDataset");
207
- }
208
- var pathParams = {
209
- repositoryUID: repositoryUID,
210
- name: name
211
- };
212
- var queryParams = {};
213
- var headerParams = {
214
- "X-Repository-Key": xRepositoryKey
215
- };
216
- var formParams = {};
217
- var authNames = ["api_key"];
218
- var contentTypes = [];
219
- var accepts = ["application/json"];
220
- var returnType = null;
221
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/datasets/{name}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
222
- }
223
-
224
- /**
225
- * Delete a dataset
226
- * @param {String} repositoryUID
227
- * @param {String} name The name of the data set
228
- * @param {String} xRepositoryKey The secret key used to access this repository
229
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
230
- */
231
- }, {
232
- key: "deleteRepositoryDataset",
233
- value: function deleteRepositoryDataset(repositoryUID, name, xRepositoryKey) {
234
- return this.deleteRepositoryDatasetWithHttpInfo(repositoryUID, name, xRepositoryKey).then(function (response_and_data) {
235
- return response_and_data.data;
236
- });
237
- }
238
-
239
- /**
240
- * Get repository information
241
- * @param {String} repositoryUID
242
- * @param {String} xRepositoryKey The secret key used to access this repository
243
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Repository} and HTTP response
244
- */
245
- }, {
246
- key: "getRepositoryWithHttpInfo",
247
- value: function getRepositoryWithHttpInfo(repositoryUID, xRepositoryKey) {
248
- var postBody = null;
249
- // verify the required parameter 'repositoryUID' is set
250
- if (repositoryUID === undefined || repositoryUID === null) {
251
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling getRepository");
252
- }
253
- // verify the required parameter 'xRepositoryKey' is set
254
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
255
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling getRepository");
256
- }
257
- var pathParams = {
258
- repositoryUID: repositoryUID
259
- };
260
- var queryParams = {};
261
- var headerParams = {
262
- "X-Repository-Key": xRepositoryKey
263
- };
264
- var formParams = {};
265
- var authNames = ["api_key"];
266
- var contentTypes = [];
267
- var accepts = ["application/json"];
268
- var returnType = _Repository["default"];
269
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
270
- }
271
-
272
- /**
273
- * Get repository information
274
- * @param {String} repositoryUID
275
- * @param {String} xRepositoryKey The secret key used to access this repository
276
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Repository}
277
- */
278
- }, {
279
- key: "getRepository",
280
- value: function getRepository(repositoryUID, xRepositoryKey) {
281
- return this.getRepositoryWithHttpInfo(repositoryUID, xRepositoryKey).then(function (response_and_data) {
282
- return response_and_data.data;
283
- });
284
- }
285
-
286
- /**
287
- * Get event and session data from a repository in NDJSON format.
288
- * @param {String} xRepositoryKey The secret key used to access this repository
289
- * @param {String} repositoryUID
290
- * @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
291
- * @param {Object} opts Optional parameters
292
- * @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
293
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
294
- */
295
- }, {
296
- key: "getRepositoryDataWithHttpInfo",
297
- value: function getRepositoryDataWithHttpInfo(xRepositoryKey, repositoryUID, start, opts) {
298
- opts = opts || {};
299
- var postBody = null;
300
- // verify the required parameter 'xRepositoryKey' is set
301
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
302
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling getRepositoryData");
303
- }
304
- // verify the required parameter 'repositoryUID' is set
305
- if (repositoryUID === undefined || repositoryUID === null) {
306
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling getRepositoryData");
307
- }
308
- // verify the required parameter 'start' is set
309
- if (start === undefined || start === null) {
310
- throw new _Error["default"]("Missing the required parameter 'start' when calling getRepositoryData");
311
- }
312
- var pathParams = {
313
- repositoryUID: repositoryUID
314
- };
315
- var queryParams = {
316
- start: start,
317
- end: opts["end"]
318
- };
319
- var headerParams = {
320
- "X-Repository-Key": xRepositoryKey
321
- };
322
- var formParams = {};
323
- var authNames = ["api_key"];
324
- var contentTypes = [];
325
- var accepts = ["text/csv", "application/json"];
326
- var returnType = File;
327
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/data", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
328
- }
329
-
330
- /**
331
- * Get event and session data from a repository in NDJSON format.
332
- * @param {String} xRepositoryKey The secret key used to access this repository
333
- * @param {String} repositoryUID
334
- * @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
335
- * @param {Object} opts Optional parameters
336
- * @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
337
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
338
- */
339
- }, {
340
- key: "getRepositoryData",
341
- value: function getRepositoryData(xRepositoryKey, repositoryUID, start, opts) {
342
- return this.getRepositoryDataWithHttpInfo(xRepositoryKey, repositoryUID, start, opts).then(function (response_and_data) {
343
- return response_and_data.data;
344
- });
345
- }
346
-
347
- /**
348
- * Get the details of a dataset
349
- * @param {String} repositoryUID
350
- * @param {String} name The name of the data set
351
- * @param {String} xRepositoryKey The secret key used to access this repository
352
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataSet} and HTTP response
353
- */
354
- }, {
355
- key: "getRepositoryDatasetWithHttpInfo",
356
- value: function getRepositoryDatasetWithHttpInfo(repositoryUID, name, xRepositoryKey) {
357
- var postBody = null;
358
- // verify the required parameter 'repositoryUID' is set
359
- if (repositoryUID === undefined || repositoryUID === null) {
360
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling getRepositoryDataset");
361
- }
362
- // verify the required parameter 'name' is set
363
- if (name === undefined || name === null) {
364
- throw new _Error["default"]("Missing the required parameter 'name' when calling getRepositoryDataset");
365
- }
366
- // verify the required parameter 'xRepositoryKey' is set
367
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
368
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling getRepositoryDataset");
369
- }
370
- var pathParams = {
371
- repositoryUID: repositoryUID,
372
- name: name
373
- };
374
- var queryParams = {};
375
- var headerParams = {
376
- "X-Repository-Key": xRepositoryKey
377
- };
378
- var formParams = {};
379
- var authNames = ["api_key"];
380
- var contentTypes = [];
381
- var accepts = ["application/json"];
382
- var returnType = _DataSet["default"];
383
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/datasets/{name}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
384
- }
385
-
386
- /**
387
- * Get the details of a dataset
388
- * @param {String} repositoryUID
389
- * @param {String} name The name of the data set
390
- * @param {String} xRepositoryKey The secret key used to access this repository
391
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataSet}
392
- */
393
- }, {
394
- key: "getRepositoryDataset",
395
- value: function getRepositoryDataset(repositoryUID, name, xRepositoryKey) {
396
- return this.getRepositoryDatasetWithHttpInfo(repositoryUID, name, xRepositoryKey).then(function (response_and_data) {
397
- return response_and_data.data;
398
- });
399
- }
400
-
401
- /**
402
- * Update a repository
403
- * @param {String} repositoryUID
404
- * @param {String} xRepositoryKey The secret key used to access this repository
405
- * @param {module:model/CreateUpdateRepository} createUpdateRepository
406
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Repository} and HTTP response
407
- */
408
- }, {
409
- key: "putRepositoryWithHttpInfo",
410
- value: function putRepositoryWithHttpInfo(repositoryUID, xRepositoryKey, createUpdateRepository) {
411
- var postBody = createUpdateRepository;
412
- // verify the required parameter 'repositoryUID' is set
413
- if (repositoryUID === undefined || repositoryUID === null) {
414
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling putRepository");
415
- }
416
- // verify the required parameter 'xRepositoryKey' is set
417
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
418
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling putRepository");
419
- }
420
- // verify the required parameter 'createUpdateRepository' is set
421
- if (createUpdateRepository === undefined || createUpdateRepository === null) {
422
- throw new _Error["default"]("Missing the required parameter 'createUpdateRepository' when calling putRepository");
423
- }
424
- var pathParams = {
425
- repositoryUID: repositoryUID
426
- };
427
- var queryParams = {};
428
- var headerParams = {
429
- "X-Repository-Key": xRepositoryKey
430
- };
431
- var formParams = {};
432
- var authNames = ["api_key"];
433
- var contentTypes = ["application/json"];
434
- var accepts = ["application/json"];
435
- var returnType = _Repository["default"];
436
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
437
- }
438
-
439
- /**
440
- * Update a repository
441
- * @param {String} repositoryUID
442
- * @param {String} xRepositoryKey The secret key used to access this repository
443
- * @param {module:model/CreateUpdateRepository} createUpdateRepository
444
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Repository}
445
- */
446
- }, {
447
- key: "putRepository",
448
- value: function putRepository(repositoryUID, xRepositoryKey, createUpdateRepository) {
449
- return this.putRepositoryWithHttpInfo(repositoryUID, xRepositoryKey, createUpdateRepository).then(function (response_and_data) {
450
- return response_and_data.data;
451
- });
452
- }
453
-
454
- /**
455
- * Query a dataset with support for time ranges, field selection, filtering, and location-based queries
456
- * @param {String} xRepositoryKey The secret key used to access this repository
457
- * @param {String} repositoryUID
458
- * @param {String} name The name of the data set
459
- * @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
460
- * @param {Object} opts Optional parameters
461
- * @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
462
- * @param {String} opts.select Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).
463
- * @param {String} opts.where Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))
464
- * @param {String} opts.aggregateWindow Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format
465
- * @param {String} opts.locationNear Latitude and Longitude for location-based filtering, location_near_radius must also be provided
466
- * @param {Number} opts.locationNearRadius Distance from location_near in meters, location_near must also be provided
467
- * @param {Number} opts.limit Limit the number of results returned
468
- * @param {String} opts.orderBy Order the results by a field
469
- * @param {Boolean} opts.distinct Return only distinct results
470
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
471
- */
472
- }, {
473
- key: "queryRepositoryDatasetWithHttpInfo",
474
- value: function queryRepositoryDatasetWithHttpInfo(xRepositoryKey, repositoryUID, name, start, opts) {
475
- opts = opts || {};
476
- var postBody = null;
477
- // verify the required parameter 'xRepositoryKey' is set
478
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
479
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling queryRepositoryDataset");
480
- }
481
- // verify the required parameter 'repositoryUID' is set
482
- if (repositoryUID === undefined || repositoryUID === null) {
483
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling queryRepositoryDataset");
484
- }
485
- // verify the required parameter 'name' is set
486
- if (name === undefined || name === null) {
487
- throw new _Error["default"]("Missing the required parameter 'name' when calling queryRepositoryDataset");
488
- }
489
- // verify the required parameter 'start' is set
490
- if (start === undefined || start === null) {
491
- throw new _Error["default"]("Missing the required parameter 'start' when calling queryRepositoryDataset");
492
- }
493
- var pathParams = {
494
- repositoryUID: repositoryUID,
495
- name: name
496
- };
497
- var queryParams = {
498
- start: start,
499
- end: opts["end"],
500
- select: opts["select"],
501
- where: opts["where"],
502
- aggregate_window: opts["aggregateWindow"],
503
- location_near: opts["locationNear"],
504
- location_near_radius: opts["locationNearRadius"],
505
- limit: opts["limit"],
506
- order_by: opts["orderBy"],
507
- distinct: opts["distinct"]
508
- };
509
- var headerParams = {
510
- "X-Repository-Key": xRepositoryKey
511
- };
512
- var formParams = {};
513
- var authNames = ["api_key"];
514
- var contentTypes = [];
515
- var accepts = ["text/csv", "application/json"];
516
- var returnType = File;
517
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/datasets/{name}/query", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
518
- }
519
-
520
- /**
521
- * Query a dataset with support for time ranges, field selection, filtering, and location-based queries
522
- * @param {String} xRepositoryKey The secret key used to access this repository
523
- * @param {String} repositoryUID
524
- * @param {String} name The name of the data set
525
- * @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
526
- * @param {Object} opts Optional parameters
527
- * @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
528
- * @param {String} opts.select Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).
529
- * @param {String} opts.where Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))
530
- * @param {String} opts.aggregateWindow Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format
531
- * @param {String} opts.locationNear Latitude and Longitude for location-based filtering, location_near_radius must also be provided
532
- * @param {Number} opts.locationNearRadius Distance from location_near in meters, location_near must also be provided
533
- * @param {Number} opts.limit Limit the number of results returned
534
- * @param {String} opts.orderBy Order the results by a field
535
- * @param {Boolean} opts.distinct Return only distinct results
536
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
537
- */
538
- }, {
539
- key: "queryRepositoryDataset",
540
- value: function queryRepositoryDataset(xRepositoryKey, repositoryUID, name, start, opts) {
541
- return this.queryRepositoryDatasetWithHttpInfo(xRepositoryKey, repositoryUID, name, start, opts).then(function (response_and_data) {
542
- return response_and_data.data;
543
- });
544
- }
545
-
546
- /**
547
- * Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format
548
- * @param {String} repositoryUID
549
- * @param {String} xRepositoryKey The secret key used to access this repository
550
- * @param {String} body Clickhouse-compatible SQL statement
551
- * @param {Object} opts Optional parameters
552
- * @param {String} opts.xClickHouseFormat Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`.
553
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
554
- */
555
- }, {
556
- key: "queryRepositorySqlWithHttpInfo",
557
- value: function queryRepositorySqlWithHttpInfo(repositoryUID, xRepositoryKey, body, opts) {
558
- opts = opts || {};
559
- var postBody = body;
560
- // verify the required parameter 'repositoryUID' is set
561
- if (repositoryUID === undefined || repositoryUID === null) {
562
- throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling queryRepositorySql");
563
- }
564
- // verify the required parameter 'xRepositoryKey' is set
565
- if (xRepositoryKey === undefined || xRepositoryKey === null) {
566
- throw new _Error["default"]("Missing the required parameter 'xRepositoryKey' when calling queryRepositorySql");
567
- }
568
- // verify the required parameter 'body' is set
569
- if (body === undefined || body === null) {
570
- throw new _Error["default"]("Missing the required parameter 'body' when calling queryRepositorySql");
571
- }
572
- var pathParams = {
573
- repositoryUID: repositoryUID
574
- };
575
- var queryParams = {};
576
- var headerParams = {
577
- "X-Repository-Key": xRepositoryKey,
578
- "X-ClickHouse-Format": opts["xClickHouseFormat"]
579
- };
580
- var formParams = {};
581
- var authNames = ["api_key"];
582
- var contentTypes = ["text/plain"];
583
- var accepts = ["text/plain", "application/json"];
584
- var returnType = File;
585
- return this.apiClient.callApi("/v1/repositories/{repositoryUID}/sql", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
586
- }
587
-
588
- /**
589
- * Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format
590
- * @param {String} repositoryUID
591
- * @param {String} xRepositoryKey The secret key used to access this repository
592
- * @param {String} body Clickhouse-compatible SQL statement
593
- * @param {Object} opts Optional parameters
594
- * @param {String} opts.xClickHouseFormat Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`.
595
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
596
- */
597
- }, {
598
- key: "queryRepositorySql",
599
- value: function queryRepositorySql(repositoryUID, xRepositoryKey, body, opts) {
600
- return this.queryRepositorySqlWithHttpInfo(repositoryUID, xRepositoryKey, body, opts).then(function (response_and_data) {
601
- return response_and_data.data;
602
- });
603
- }
604
- }]);
605
- }();