@blues-inc/notehub-js 6.0.0-beta.9 → 6.1.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 (160) hide show
  1. package/README.md +268 -250
  2. package/dist/ApiClient.js +150 -150
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +106 -16
  6. package/dist/api/DeviceApi.js +397 -341
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/JobsApi.js +438 -0
  10. package/dist/api/MonitorApi.js +52 -52
  11. package/dist/api/ProjectApi.js +403 -403
  12. package/dist/api/RouteApi.js +83 -83
  13. package/dist/api/UsageApi.js +67 -67
  14. package/dist/api/WebhookApi.js +51 -51
  15. package/dist/index.js +91 -0
  16. package/dist/model/AWSRoleConfig.js +14 -14
  17. package/dist/model/AddDeviceToFleetsRequest.js +8 -8
  18. package/dist/model/Alert.js +74 -76
  19. package/dist/model/AlertDataInner.js +36 -36
  20. package/dist/model/AlertNotificationsInner.js +18 -18
  21. package/dist/model/AwsRoute.js +70 -70
  22. package/dist/model/AzureRoute.js +43 -43
  23. package/dist/model/BillingAccount.js +21 -21
  24. package/dist/model/BillingAccountRole.js +9 -9
  25. package/dist/model/BlynkRoute.js +28 -28
  26. package/dist/model/Body.js +5 -5
  27. package/dist/model/CancelJobRun200Response.js +111 -0
  28. package/dist/model/CellularPlan.js +34 -34
  29. package/dist/model/CloneProjectRequest.js +20 -20
  30. package/dist/model/Contact.js +22 -22
  31. package/dist/model/CreateFleetRequest.js +20 -20
  32. package/dist/model/CreateJob201Response.js +115 -0
  33. package/dist/model/CreateMonitor.js +127 -128
  34. package/dist/model/CreateProductRequest.js +22 -22
  35. package/dist/model/CreateProjectRequest.js +16 -16
  36. package/dist/model/CreateUpdateRepository.js +17 -17
  37. package/dist/model/CurrentFirmware.js +12 -12
  38. package/dist/model/DFUEnv.js +12 -12
  39. package/dist/model/DFUState.js +65 -65
  40. package/dist/model/DataField.js +7 -7
  41. package/dist/model/DataSetField.js +19 -19
  42. package/dist/model/DataUsage.js +14 -14
  43. package/dist/model/DatacakeRoute.js +35 -35
  44. package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
  45. package/dist/model/DeleteJob200Response.js +111 -0
  46. package/dist/model/DeleteNotefilesRequest.js +7 -7
  47. package/dist/model/Device.js +106 -107
  48. package/dist/model/DeviceDfuHistory.js +19 -20
  49. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  50. package/dist/model/DeviceDfuHistoryPage.js +12 -13
  51. package/dist/model/DeviceDfuStateMachine.js +24 -25
  52. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  53. package/dist/model/DeviceDfuStatus.js +20 -20
  54. package/dist/model/DeviceDfuStatusPage.js +12 -13
  55. package/dist/model/DeviceSession.js +221 -221
  56. package/dist/model/DeviceTowerInfo.js +14 -14
  57. package/dist/model/DeviceUsage.js +32 -32
  58. package/dist/model/DfuActionRequest.js +7 -7
  59. package/dist/model/EmailNotification.js +7 -7
  60. package/dist/model/EnvTreeJsonNode.js +67 -69
  61. package/dist/model/EnvVar.js +18 -18
  62. package/dist/model/EnvironmentVariables.js +8 -8
  63. package/dist/model/Error.js +31 -31
  64. package/dist/model/Event.js +248 -248
  65. package/dist/model/Filter.js +16 -16
  66. package/dist/model/Firmware.js +49 -49
  67. package/dist/model/FirmwareInfo.js +82 -60
  68. package/dist/model/Fleet.js +38 -38
  69. package/dist/model/FleetConnectivityAssurance.js +5 -5
  70. package/dist/model/GetAlerts200Response.js +14 -15
  71. package/dist/model/GetBillingAccount200Response.js +137 -0
  72. package/dist/model/GetBillingAccount200ResponsePlan.js +141 -0
  73. package/dist/model/GetBillingAccountBalanceHistory200Response.js +111 -0
  74. package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +130 -0
  75. package/dist/model/GetBillingAccounts200Response.js +9 -10
  76. package/dist/model/GetDataUsage200Response.js +12 -13
  77. package/dist/model/GetDataUsage200ResponseDataInner.js +43 -44
  78. package/dist/model/GetDbNote200Response.js +13 -13
  79. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  80. package/dist/model/GetDeviceFleets200Response.js +11 -12
  81. package/dist/model/GetDeviceHealthLog200Response.js +11 -12
  82. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  83. package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
  84. package/dist/model/GetDevicePlans200Response.js +9 -10
  85. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  86. package/dist/model/GetDevicePublicKeys200Response.js +16 -17
  87. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  88. package/dist/model/GetDeviceSessions200Response.js +16 -17
  89. package/dist/model/GetDevices200Response.js +16 -17
  90. package/dist/model/GetEvents200Response.js +20 -21
  91. package/dist/model/GetEventsByCursor200Response.js +23 -24
  92. package/dist/model/GetJobRuns200Response.js +131 -0
  93. package/dist/model/GetJobs200Response.js +131 -0
  94. package/dist/model/GetNotefile200Response.js +11 -11
  95. package/dist/model/GetProducts200Response.js +9 -10
  96. package/dist/model/GetProjectMembers200Response.js +11 -12
  97. package/dist/model/GetProjects200Response.js +9 -10
  98. package/dist/model/GetRouteLogsUsage200Response.js +14 -15
  99. package/dist/model/GetSessionsUsage200Response.js +15 -16
  100. package/dist/model/GetWebhooks200Response.js +9 -10
  101. package/dist/model/GoogleRoute.js +33 -33
  102. package/dist/model/HttpRoute.js +35 -35
  103. package/dist/model/Job.js +167 -0
  104. package/dist/model/JobRun.js +246 -0
  105. package/dist/model/Location.js +40 -40
  106. package/dist/model/Login200Response.js +7 -7
  107. package/dist/model/LoginRequest.js +12 -12
  108. package/dist/model/Monitor.js +101 -102
  109. package/dist/model/MonitorAlertRoutesInner.js +10 -9
  110. package/dist/model/MqttRoute.js +68 -68
  111. package/dist/model/Note.js +31 -31
  112. package/dist/model/NoteInput.js +9 -9
  113. package/dist/model/Notefile.js +22 -23
  114. package/dist/model/NotefileSchema.js +18 -19
  115. package/dist/model/NotehubRoute.js +103 -103
  116. package/dist/model/NotehubRouteSummary.js +23 -23
  117. package/dist/model/OAuth2Error.js +20 -20
  118. package/dist/model/OAuth2TokenResponse.js +23 -23
  119. package/dist/model/PersonalAccessToken.js +34 -34
  120. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  121. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  122. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  123. package/dist/model/Product.js +26 -26
  124. package/dist/model/Project.js +34 -34
  125. package/dist/model/ProjectMember.js +22 -22
  126. package/dist/model/ProvisionDeviceRequest.js +18 -18
  127. package/dist/model/ProxyRoute.js +29 -29
  128. package/dist/model/QubitroRoute.js +33 -33
  129. package/dist/model/RadRoute.js +31 -31
  130. package/dist/model/Repository.js +22 -22
  131. package/dist/model/Role.js +9 -9
  132. package/dist/model/RouteLog.js +38 -38
  133. package/dist/model/RouteTransformSettings.js +18 -18
  134. package/dist/model/RunJob200Response.js +115 -0
  135. package/dist/model/S3ArchiveRoute.js +79 -79
  136. package/dist/model/SatelliteDataUsage.js +18 -18
  137. package/dist/model/SatellitePlan.js +29 -29
  138. package/dist/model/SchemaProperty.js +36 -38
  139. package/dist/model/SignalDevice200Response.js +5 -5
  140. package/dist/model/SimUsage.js +19 -19
  141. package/dist/model/SlackBearerNotification.js +25 -25
  142. package/dist/model/SlackRoute.js +48 -48
  143. package/dist/model/SlackWebHookNotification.js +20 -20
  144. package/dist/model/SnowflakeRoute.js +45 -45
  145. package/dist/model/SnowpipeStreamingRoute.js +60 -60
  146. package/dist/model/ThingworxRoute.js +33 -33
  147. package/dist/model/TowerLocation.js +54 -54
  148. package/dist/model/TwilioRoute.js +43 -43
  149. package/dist/model/UpdateFleetRequest.js +33 -33
  150. package/dist/model/UploadMetadata.js +64 -64
  151. package/dist/model/UsageData.js +33 -33
  152. package/dist/model/UsageEventsData.js +61 -43
  153. package/dist/model/UsageEventsResponse.js +14 -15
  154. package/dist/model/UsageRouteLogsData.js +36 -27
  155. package/dist/model/UsageSessionsData.js +67 -36
  156. package/dist/model/UserDfuStateMachine.js +20 -20
  157. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  158. package/dist/model/UserFirmwareInfo.js +12 -12
  159. package/dist/model/WebhookSettings.js +15 -15
  160. package/package.json +3 -3
@@ -0,0 +1,438 @@
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 _CancelJobRun200Response = _interopRequireDefault(require("../model/CancelJobRun200Response"));
9
+ var _CreateJob201Response = _interopRequireDefault(require("../model/CreateJob201Response"));
10
+ var _DeleteJob200Response = _interopRequireDefault(require("../model/DeleteJob200Response"));
11
+ var _Error = _interopRequireDefault(require("../model/Error"));
12
+ var _GetJobRuns200Response = _interopRequireDefault(require("../model/GetJobRuns200Response"));
13
+ var _GetJobs200Response = _interopRequireDefault(require("../model/GetJobs200Response"));
14
+ var _Job = _interopRequireDefault(require("../model/Job"));
15
+ var _JobRun = _interopRequireDefault(require("../model/JobRun"));
16
+ var _RunJob200Response = _interopRequireDefault(require("../model/RunJob200Response"));
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
18
+ 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); }
19
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
20
+ 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); } }
21
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
+ 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); } /**
24
+ * Notehub API
25
+ * The OpenAPI definition for the Notehub.io API.
26
+ *
27
+ * The version of the OpenAPI document: 1.2.0
28
+ * Contact: engineering@blues.io
29
+ *
30
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
31
+ * https://openapi-generator.tech
32
+ * Do not edit the class manually.
33
+ *
34
+ */
35
+ /**
36
+ * Jobs service.
37
+ * @module api/JobsApi
38
+ * @version 6.1.0
39
+ */
40
+ var JobsApi = exports["default"] = /*#__PURE__*/function () {
41
+ /**
42
+ * Constructs a new JobsApi.
43
+ * @alias module:api/JobsApi
44
+ * @class
45
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
46
+ * default to {@link module:ApiClient#instance} if unspecified.
47
+ */
48
+ function JobsApi(apiClient) {
49
+ _classCallCheck(this, JobsApi);
50
+ this.apiClient = apiClient || _ApiClient["default"].instance;
51
+ }
52
+
53
+ /**
54
+ * Cancel a running job execution
55
+ * @param {String} projectOrProductUID
56
+ * @param {String} reportUID Unique identifier for a job run report
57
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelJobRun200Response} and HTTP response
58
+ */
59
+ return _createClass(JobsApi, [{
60
+ key: "cancelJobRunWithHttpInfo",
61
+ value: function cancelJobRunWithHttpInfo(projectOrProductUID, reportUID) {
62
+ var postBody = null;
63
+ // verify the required parameter 'projectOrProductUID' is set
64
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
65
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling cancelJobRun");
66
+ }
67
+ // verify the required parameter 'reportUID' is set
68
+ if (reportUID === undefined || reportUID === null) {
69
+ throw new _Error["default"]("Missing the required parameter 'reportUID' when calling cancelJobRun");
70
+ }
71
+ var pathParams = {
72
+ projectOrProductUID: projectOrProductUID,
73
+ reportUID: reportUID
74
+ };
75
+ var queryParams = {};
76
+ var headerParams = {};
77
+ var formParams = {};
78
+ var authNames = ["personalAccessToken"];
79
+ var contentTypes = [];
80
+ var accepts = ["application/json"];
81
+ var returnType = _CancelJobRun200Response["default"];
82
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
83
+ }
84
+
85
+ /**
86
+ * Cancel a running job execution
87
+ * @param {String} projectOrProductUID
88
+ * @param {String} reportUID Unique identifier for a job run report
89
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelJobRun200Response}
90
+ */
91
+ }, {
92
+ key: "cancelJobRun",
93
+ value: function cancelJobRun(projectOrProductUID, reportUID) {
94
+ return this.cancelJobRunWithHttpInfo(projectOrProductUID, reportUID).then(function (response_and_data) {
95
+ return response_and_data.data;
96
+ });
97
+ }
98
+
99
+ /**
100
+ * Create a new batch job with an optional name
101
+ * @param {String} projectOrProductUID
102
+ * @param {String} name Name for the job
103
+ * @param {Object.<String, Object>} body The job definition as raw JSON
104
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateJob201Response} and HTTP response
105
+ */
106
+ }, {
107
+ key: "createJobWithHttpInfo",
108
+ value: function createJobWithHttpInfo(projectOrProductUID, name, body) {
109
+ var postBody = body;
110
+ // verify the required parameter 'projectOrProductUID' is set
111
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
112
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling createJob");
113
+ }
114
+ // verify the required parameter 'name' is set
115
+ if (name === undefined || name === null) {
116
+ throw new _Error["default"]("Missing the required parameter 'name' when calling createJob");
117
+ }
118
+ // verify the required parameter 'body' is set
119
+ if (body === undefined || body === null) {
120
+ throw new _Error["default"]("Missing the required parameter 'body' when calling createJob");
121
+ }
122
+ var pathParams = {
123
+ projectOrProductUID: projectOrProductUID
124
+ };
125
+ var queryParams = {
126
+ name: name
127
+ };
128
+ var headerParams = {};
129
+ var formParams = {};
130
+ var authNames = ["personalAccessToken"];
131
+ var contentTypes = ["application/json"];
132
+ var accepts = ["application/json"];
133
+ var returnType = _CreateJob201Response["default"];
134
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
135
+ }
136
+
137
+ /**
138
+ * Create a new batch job with an optional name
139
+ * @param {String} projectOrProductUID
140
+ * @param {String} name Name for the job
141
+ * @param {Object.<String, Object>} body The job definition as raw JSON
142
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateJob201Response}
143
+ */
144
+ }, {
145
+ key: "createJob",
146
+ value: function createJob(projectOrProductUID, name, body) {
147
+ return this.createJobWithHttpInfo(projectOrProductUID, name, body).then(function (response_and_data) {
148
+ return response_and_data.data;
149
+ });
150
+ }
151
+
152
+ /**
153
+ * Delete a batch job
154
+ * @param {String} projectOrProductUID
155
+ * @param {String} jobUID Unique identifier for a batch job
156
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteJob200Response} and HTTP response
157
+ */
158
+ }, {
159
+ key: "deleteJobWithHttpInfo",
160
+ value: function deleteJobWithHttpInfo(projectOrProductUID, jobUID) {
161
+ var postBody = null;
162
+ // verify the required parameter 'projectOrProductUID' is set
163
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
164
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteJob");
165
+ }
166
+ // verify the required parameter 'jobUID' is set
167
+ if (jobUID === undefined || jobUID === null) {
168
+ throw new _Error["default"]("Missing the required parameter 'jobUID' when calling deleteJob");
169
+ }
170
+ var pathParams = {
171
+ projectOrProductUID: projectOrProductUID,
172
+ jobUID: jobUID
173
+ };
174
+ var queryParams = {};
175
+ var headerParams = {};
176
+ var formParams = {};
177
+ var authNames = ["personalAccessToken"];
178
+ var contentTypes = [];
179
+ var accepts = ["application/json"];
180
+ var returnType = _DeleteJob200Response["default"];
181
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/{jobUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
182
+ }
183
+
184
+ /**
185
+ * Delete a batch job
186
+ * @param {String} projectOrProductUID
187
+ * @param {String} jobUID Unique identifier for a batch job
188
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteJob200Response}
189
+ */
190
+ }, {
191
+ key: "deleteJob",
192
+ value: function deleteJob(projectOrProductUID, jobUID) {
193
+ return this.deleteJobWithHttpInfo(projectOrProductUID, jobUID).then(function (response_and_data) {
194
+ return response_and_data.data;
195
+ });
196
+ }
197
+
198
+ /**
199
+ * Get a specific batch job definition
200
+ * @param {String} projectOrProductUID
201
+ * @param {String} jobUID Unique identifier for a batch job
202
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response
203
+ */
204
+ }, {
205
+ key: "getJobWithHttpInfo",
206
+ value: function getJobWithHttpInfo(projectOrProductUID, jobUID) {
207
+ var postBody = null;
208
+ // verify the required parameter 'projectOrProductUID' is set
209
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
210
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getJob");
211
+ }
212
+ // verify the required parameter 'jobUID' is set
213
+ if (jobUID === undefined || jobUID === null) {
214
+ throw new _Error["default"]("Missing the required parameter 'jobUID' when calling getJob");
215
+ }
216
+ var pathParams = {
217
+ projectOrProductUID: projectOrProductUID,
218
+ jobUID: jobUID
219
+ };
220
+ var queryParams = {};
221
+ var headerParams = {};
222
+ var formParams = {};
223
+ var authNames = ["personalAccessToken"];
224
+ var contentTypes = [];
225
+ var accepts = ["application/json"];
226
+ var returnType = _Job["default"];
227
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/{jobUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
228
+ }
229
+
230
+ /**
231
+ * Get a specific batch job definition
232
+ * @param {String} projectOrProductUID
233
+ * @param {String} jobUID Unique identifier for a batch job
234
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
235
+ */
236
+ }, {
237
+ key: "getJob",
238
+ value: function getJob(projectOrProductUID, jobUID) {
239
+ return this.getJobWithHttpInfo(projectOrProductUID, jobUID).then(function (response_and_data) {
240
+ return response_and_data.data;
241
+ });
242
+ }
243
+
244
+ /**
245
+ * Get the result of a job execution
246
+ * @param {String} projectOrProductUID
247
+ * @param {String} reportUID Unique identifier for a job run report
248
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/JobRun} and HTTP response
249
+ */
250
+ }, {
251
+ key: "getJobRunWithHttpInfo",
252
+ value: function getJobRunWithHttpInfo(projectOrProductUID, reportUID) {
253
+ var postBody = null;
254
+ // verify the required parameter 'projectOrProductUID' is set
255
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
256
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getJobRun");
257
+ }
258
+ // verify the required parameter 'reportUID' is set
259
+ if (reportUID === undefined || reportUID === null) {
260
+ throw new _Error["default"]("Missing the required parameter 'reportUID' when calling getJobRun");
261
+ }
262
+ var pathParams = {
263
+ projectOrProductUID: projectOrProductUID,
264
+ reportUID: reportUID
265
+ };
266
+ var queryParams = {};
267
+ var headerParams = {};
268
+ var formParams = {};
269
+ var authNames = ["personalAccessToken"];
270
+ var contentTypes = [];
271
+ var accepts = ["application/json"];
272
+ var returnType = _JobRun["default"];
273
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
274
+ }
275
+
276
+ /**
277
+ * Get the result of a job execution
278
+ * @param {String} projectOrProductUID
279
+ * @param {String} reportUID Unique identifier for a job run report
280
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/JobRun}
281
+ */
282
+ }, {
283
+ key: "getJobRun",
284
+ value: function getJobRun(projectOrProductUID, reportUID) {
285
+ return this.getJobRunWithHttpInfo(projectOrProductUID, reportUID).then(function (response_and_data) {
286
+ return response_and_data.data;
287
+ });
288
+ }
289
+
290
+ /**
291
+ * List all runs for a specific job
292
+ * @param {String} projectOrProductUID
293
+ * @param {String} jobUID Unique identifier for a batch job
294
+ * @param {Object} opts Optional parameters
295
+ * @param {String} opts.status Filter runs by status
296
+ * @param {Boolean} opts.dryRun Filter runs by dry run flag
297
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetJobRuns200Response} and HTTP response
298
+ */
299
+ }, {
300
+ key: "getJobRunsWithHttpInfo",
301
+ value: function getJobRunsWithHttpInfo(projectOrProductUID, jobUID, opts) {
302
+ opts = opts || {};
303
+ var postBody = null;
304
+ // verify the required parameter 'projectOrProductUID' is set
305
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
306
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getJobRuns");
307
+ }
308
+ // verify the required parameter 'jobUID' is set
309
+ if (jobUID === undefined || jobUID === null) {
310
+ throw new _Error["default"]("Missing the required parameter 'jobUID' when calling getJobRuns");
311
+ }
312
+ var pathParams = {
313
+ projectOrProductUID: projectOrProductUID,
314
+ jobUID: jobUID
315
+ };
316
+ var queryParams = {
317
+ status: opts["status"],
318
+ dry_run: opts["dryRun"]
319
+ };
320
+ var headerParams = {};
321
+ var formParams = {};
322
+ var authNames = ["personalAccessToken"];
323
+ var contentTypes = [];
324
+ var accepts = ["application/json"];
325
+ var returnType = _GetJobRuns200Response["default"];
326
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
327
+ }
328
+
329
+ /**
330
+ * List all runs for a specific job
331
+ * @param {String} projectOrProductUID
332
+ * @param {String} jobUID Unique identifier for a batch job
333
+ * @param {Object} opts Optional parameters
334
+ * @param {String} opts.status Filter runs by status
335
+ * @param {Boolean} opts.dryRun Filter runs by dry run flag
336
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetJobRuns200Response}
337
+ */
338
+ }, {
339
+ key: "getJobRuns",
340
+ value: function getJobRuns(projectOrProductUID, jobUID, opts) {
341
+ return this.getJobRunsWithHttpInfo(projectOrProductUID, jobUID, opts).then(function (response_and_data) {
342
+ return response_and_data.data;
343
+ });
344
+ }
345
+
346
+ /**
347
+ * List all batch jobs for a project
348
+ * @param {String} projectOrProductUID
349
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetJobs200Response} and HTTP response
350
+ */
351
+ }, {
352
+ key: "getJobsWithHttpInfo",
353
+ value: function getJobsWithHttpInfo(projectOrProductUID) {
354
+ var postBody = null;
355
+ // verify the required parameter 'projectOrProductUID' is set
356
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
357
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getJobs");
358
+ }
359
+ var pathParams = {
360
+ projectOrProductUID: projectOrProductUID
361
+ };
362
+ var queryParams = {};
363
+ var headerParams = {};
364
+ var formParams = {};
365
+ var authNames = ["personalAccessToken"];
366
+ var contentTypes = [];
367
+ var accepts = ["application/json"];
368
+ var returnType = _GetJobs200Response["default"];
369
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
370
+ }
371
+
372
+ /**
373
+ * List all batch jobs for a project
374
+ * @param {String} projectOrProductUID
375
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetJobs200Response}
376
+ */
377
+ }, {
378
+ key: "getJobs",
379
+ value: function getJobs(projectOrProductUID) {
380
+ return this.getJobsWithHttpInfo(projectOrProductUID).then(function (response_and_data) {
381
+ return response_and_data.data;
382
+ });
383
+ }
384
+
385
+ /**
386
+ * Execute a batch job
387
+ * @param {String} projectOrProductUID
388
+ * @param {String} jobUID Unique identifier for a batch job
389
+ * @param {Object} opts Optional parameters
390
+ * @param {Boolean} opts.dryRun Run job in dry-run mode without making actual changes (default to false)
391
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RunJob200Response} and HTTP response
392
+ */
393
+ }, {
394
+ key: "runJobWithHttpInfo",
395
+ value: function runJobWithHttpInfo(projectOrProductUID, jobUID, opts) {
396
+ opts = opts || {};
397
+ var postBody = null;
398
+ // verify the required parameter 'projectOrProductUID' is set
399
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
400
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling runJob");
401
+ }
402
+ // verify the required parameter 'jobUID' is set
403
+ if (jobUID === undefined || jobUID === null) {
404
+ throw new _Error["default"]("Missing the required parameter 'jobUID' when calling runJob");
405
+ }
406
+ var pathParams = {
407
+ projectOrProductUID: projectOrProductUID,
408
+ jobUID: jobUID
409
+ };
410
+ var queryParams = {
411
+ dry_run: opts["dryRun"]
412
+ };
413
+ var headerParams = {};
414
+ var formParams = {};
415
+ var authNames = ["personalAccessToken"];
416
+ var contentTypes = [];
417
+ var accepts = ["application/json"];
418
+ var returnType = _RunJob200Response["default"];
419
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
420
+ }
421
+
422
+ /**
423
+ * Execute a batch job
424
+ * @param {String} projectOrProductUID
425
+ * @param {String} jobUID Unique identifier for a batch job
426
+ * @param {Object} opts Optional parameters
427
+ * @param {Boolean} opts.dryRun Run job in dry-run mode without making actual changes (default to false)
428
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RunJob200Response}
429
+ */
430
+ }, {
431
+ key: "runJob",
432
+ value: function runJob(projectOrProductUID, jobUID, opts) {
433
+ return this.runJobWithHttpInfo(projectOrProductUID, jobUID, opts).then(function (response_and_data) {
434
+ return response_and_data.data;
435
+ });
436
+ }
437
+ }]);
438
+ }();