@blues-inc/notehub-js 6.2.0-beta.46 → 6.2.0-beta.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -301
- package/dist/ApiClient.js +150 -150
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +28 -28
- package/dist/api/DeviceApi.js +385 -385
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/JobsApi.js +141 -87
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +433 -433
- package/dist/api/RouteApi.js +83 -83
- package/dist/api/UsageApi.js +67 -67
- package/dist/api/WebhookApi.js +108 -108
- package/dist/index.js +42 -0
- package/dist/model/AWSRoleConfig.js +14 -14
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +36 -36
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +70 -70
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BatchJobRequests.js +228 -0
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CancelJobRun200Response.js +6 -6
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +20 -20
- package/dist/model/CreateJob201Response.js +8 -8
- package/dist/model/CreateLegacyWebhookEventRequest.js +17 -17
- package/dist/model/CreateMonitor.js +144 -143
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteJob200Response.js +6 -6
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +107 -106
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +25 -24
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +69 -67
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +68 -68
- package/dist/model/Fleet.js +38 -38
- package/dist/model/FleetConnectivityAssurance.js +5 -5
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccount200Response.js +25 -25
- package/dist/model/GetBillingAccount200ResponsePlan.js +22 -22
- package/dist/model/GetBillingAccountBalanceHistory200Response.js +10 -9
- package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +17 -17
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDataUsage200Response.js +13 -12
- package/dist/model/GetDataUsage200ResponseDataInner.js +44 -43
- package/dist/model/GetDbNote200Response.js +13 -13
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceJourney200Response.js +21 -21
- package/dist/model/GetDeviceJourney200ResponseJourney.js +17 -16
- package/dist/model/GetDeviceJourneys200Response.js +17 -16
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +16 -16
- package/dist/model/GetDeviceLatestEvents200Response.js +10 -9
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetDevices200Response.js +17 -16
- package/dist/model/GetEvents200Response.js +21 -20
- package/dist/model/GetEventsByCursor200Response.js +24 -23
- package/dist/model/GetJobRuns200Response.js +12 -11
- package/dist/model/GetJobs200Response.js +12 -11
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetRouteLogsUsage200Response.js +15 -14
- package/dist/model/GetSessionsUsage200Response.js +16 -15
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/Job.js +53 -33
- package/dist/model/JobDefinition.js +146 -0
- package/dist/model/JobDefinitionReportOptions.js +155 -0
- package/dist/model/JobDefinitionSelect.js +140 -0
- package/dist/model/JobDetail.js +252 -0
- package/dist/model/JobDetailAllOf.js +93 -0
- package/dist/model/JobRun.js +57 -57
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +115 -114
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +31 -31
- package/dist/model/NoteInput.js +9 -9
- package/dist/model/Notefile.js +23 -22
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +103 -103
- package/dist/model/NotehubRouteSummary.js +23 -23
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/RepositoryListResponse.js +12 -11
- package/dist/model/RepositoryTokenRequest.js +14 -14
- package/dist/model/RepositoryTokenResponse.js +38 -38
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/RunJob200Response.js +8 -8
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatelliteDataUsage.js +18 -18
- package/dist/model/SatellitePlan.js +29 -29
- package/dist/model/SchemaProperty.js +38 -36
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +60 -60
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +33 -33
- package/dist/model/UpdateHostFirmwareRequest.js +17 -17
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +33 -33
- package/dist/model/UsageEventsData.js +49 -49
- package/dist/model/UsageEventsResponse.js +15 -14
- package/dist/model/UsageRouteLogsData.js +30 -30
- package/dist/model/UsageSessionsData.js +43 -43
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
|
@@ -0,0 +1,252 @@
|
|
|
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 _Job = _interopRequireDefault(require("./Job"));
|
|
9
|
+
var _JobDefinition = _interopRequireDefault(require("./JobDefinition"));
|
|
10
|
+
var _JobDetailAllOf = _interopRequireDefault(require("./JobDetailAllOf"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
13
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /**
|
|
21
|
+
* Notehub API
|
|
22
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document: 1.2.0
|
|
25
|
+
* Contact: engineering@blues.io
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The JobDetail model module.
|
|
34
|
+
* @module model/JobDetail
|
|
35
|
+
* @version 6.2.0-beta.48
|
|
36
|
+
*/
|
|
37
|
+
var JobDetail = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>JobDetail</code>.
|
|
40
|
+
* Batch job with full definition
|
|
41
|
+
* @alias module:model/JobDetail
|
|
42
|
+
* @implements module:model/Job
|
|
43
|
+
* @implements module:model/JobDetailAllOf
|
|
44
|
+
* @param created {Number} Unix timestamp when job was created
|
|
45
|
+
* @param createdBy {String} User who created the job
|
|
46
|
+
* @param jobUid {String} Unique identifier for the job
|
|
47
|
+
* @param name {String} Human-readable job name
|
|
48
|
+
*/
|
|
49
|
+
function JobDetail(created, createdBy, jobUid, name) {
|
|
50
|
+
_classCallCheck(this, JobDetail);
|
|
51
|
+
_Job["default"].initialize(this, created, createdBy, jobUid, name);
|
|
52
|
+
_JobDetailAllOf["default"].initialize(this);
|
|
53
|
+
JobDetail.initialize(this, created, createdBy, jobUid, name);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the fields of this object.
|
|
58
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
59
|
+
* Only for internal use.
|
|
60
|
+
*/
|
|
61
|
+
return _createClass(JobDetail, null, [{
|
|
62
|
+
key: "initialize",
|
|
63
|
+
value: function initialize(obj, created, createdBy, jobUid, name) {
|
|
64
|
+
obj['created'] = created;
|
|
65
|
+
obj['created_by'] = createdBy;
|
|
66
|
+
obj['job_uid'] = jobUid;
|
|
67
|
+
obj['name'] = name;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Constructs a <code>JobDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
72
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
73
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
+
* @param {module:model/JobDetail} obj Optional instance to populate.
|
|
75
|
+
* @return {module:model/JobDetail} The populated <code>JobDetail</code> instance.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "constructFromObject",
|
|
79
|
+
value: function constructFromObject(data, obj) {
|
|
80
|
+
if (data) {
|
|
81
|
+
obj = obj || new JobDetail();
|
|
82
|
+
_Job["default"].constructFromObject(data, obj);
|
|
83
|
+
_JobDetailAllOf["default"].constructFromObject(data, obj);
|
|
84
|
+
if (data.hasOwnProperty('created')) {
|
|
85
|
+
obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Number');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('created_by')) {
|
|
88
|
+
obj['created_by'] = _ApiClient["default"].convertToType(data['created_by'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('job_uid')) {
|
|
91
|
+
obj['job_uid'] = _ApiClient["default"].convertToType(data['job_uid'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('last_run_completed')) {
|
|
94
|
+
obj['last_run_completed'] = _ApiClient["default"].convertToType(data['last_run_completed'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('last_run_status')) {
|
|
97
|
+
obj['last_run_status'] = _ApiClient["default"].convertToType(data['last_run_status'], 'String');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('last_run_submitted')) {
|
|
100
|
+
obj['last_run_submitted'] = _ApiClient["default"].convertToType(data['last_run_submitted'], 'Number');
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('name')) {
|
|
103
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('definition')) {
|
|
106
|
+
obj['definition'] = _JobDefinition["default"].constructFromObject(data['definition']);
|
|
107
|
+
}
|
|
108
|
+
} else if (data === null) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return obj;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Validates the JSON data with respect to <code>JobDetail</code>.
|
|
116
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
117
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>JobDetail</code>.
|
|
118
|
+
*/
|
|
119
|
+
}, {
|
|
120
|
+
key: "validateJSON",
|
|
121
|
+
value: function validateJSON(data) {
|
|
122
|
+
// check to make sure all required properties are present in the JSON string
|
|
123
|
+
var _iterator = _createForOfIteratorHelper(JobDetail.RequiredProperties),
|
|
124
|
+
_step;
|
|
125
|
+
try {
|
|
126
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
127
|
+
var property = _step.value;
|
|
128
|
+
if (!data[property]) {
|
|
129
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
} catch (err) {
|
|
134
|
+
_iterator.e(err);
|
|
135
|
+
} finally {
|
|
136
|
+
_iterator.f();
|
|
137
|
+
}
|
|
138
|
+
if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']);
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
if (data['job_uid'] && !(typeof data['job_uid'] === 'string' || data['job_uid'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `job_uid` to be a primitive type in the JSON string but got " + data['job_uid']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['last_run_status'] && !(typeof data['last_run_status'] === 'string' || data['last_run_status'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `last_run_status` to be a primitive type in the JSON string but got " + data['last_run_status']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
152
|
+
}
|
|
153
|
+
// validate the optional field `definition`
|
|
154
|
+
if (data['definition']) {
|
|
155
|
+
// data not null
|
|
156
|
+
_JobDefinition["default"].validateJSON(data['definition']);
|
|
157
|
+
}
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
}]);
|
|
161
|
+
}();
|
|
162
|
+
JobDetail.RequiredProperties = ["created", "created_by", "job_uid", "name"];
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Unix timestamp when job was created
|
|
166
|
+
* @member {Number} created
|
|
167
|
+
*/
|
|
168
|
+
JobDetail.prototype['created'] = undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* User who created the job
|
|
172
|
+
* @member {String} created_by
|
|
173
|
+
*/
|
|
174
|
+
JobDetail.prototype['created_by'] = undefined;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Unique identifier for the job
|
|
178
|
+
* @member {String} job_uid
|
|
179
|
+
*/
|
|
180
|
+
JobDetail.prototype['job_uid'] = undefined;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Unix timestamp when the most recent run completed (0 if still in progress)
|
|
184
|
+
* @member {Number} last_run_completed
|
|
185
|
+
*/
|
|
186
|
+
JobDetail.prototype['last_run_completed'] = undefined;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Status of the most recent job run. Terminal values are: \"submitted\", \"completed successfully\", \"dry run completed successfully\", \"completed with errors\", \"cancelled\". While a job is running, intermediate per-device progress updates may appear (e.g. \"dev:000000000000000 completed\", \"dev:000000000000000 updated: ...\").
|
|
190
|
+
* @member {String} last_run_status
|
|
191
|
+
*/
|
|
192
|
+
JobDetail.prototype['last_run_status'] = undefined;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Unix timestamp when the most recent run was submitted
|
|
196
|
+
* @member {Number} last_run_submitted
|
|
197
|
+
*/
|
|
198
|
+
JobDetail.prototype['last_run_submitted'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Human-readable job name
|
|
202
|
+
* @member {String} name
|
|
203
|
+
*/
|
|
204
|
+
JobDetail.prototype['name'] = undefined;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @member {module:model/JobDefinition} definition
|
|
208
|
+
*/
|
|
209
|
+
JobDetail.prototype['definition'] = undefined;
|
|
210
|
+
|
|
211
|
+
// Implement Job interface:
|
|
212
|
+
/**
|
|
213
|
+
* Unix timestamp when job was created
|
|
214
|
+
* @member {Number} created
|
|
215
|
+
*/
|
|
216
|
+
_Job["default"].prototype['created'] = undefined;
|
|
217
|
+
/**
|
|
218
|
+
* User who created the job
|
|
219
|
+
* @member {String} created_by
|
|
220
|
+
*/
|
|
221
|
+
_Job["default"].prototype['created_by'] = undefined;
|
|
222
|
+
/**
|
|
223
|
+
* Unique identifier for the job
|
|
224
|
+
* @member {String} job_uid
|
|
225
|
+
*/
|
|
226
|
+
_Job["default"].prototype['job_uid'] = undefined;
|
|
227
|
+
/**
|
|
228
|
+
* Unix timestamp when the most recent run completed (0 if still in progress)
|
|
229
|
+
* @member {Number} last_run_completed
|
|
230
|
+
*/
|
|
231
|
+
_Job["default"].prototype['last_run_completed'] = undefined;
|
|
232
|
+
/**
|
|
233
|
+
* Status of the most recent job run. Terminal values are: \"submitted\", \"completed successfully\", \"dry run completed successfully\", \"completed with errors\", \"cancelled\". While a job is running, intermediate per-device progress updates may appear (e.g. \"dev:000000000000000 completed\", \"dev:000000000000000 updated: ...\").
|
|
234
|
+
* @member {String} last_run_status
|
|
235
|
+
*/
|
|
236
|
+
_Job["default"].prototype['last_run_status'] = undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Unix timestamp when the most recent run was submitted
|
|
239
|
+
* @member {Number} last_run_submitted
|
|
240
|
+
*/
|
|
241
|
+
_Job["default"].prototype['last_run_submitted'] = undefined;
|
|
242
|
+
/**
|
|
243
|
+
* Human-readable job name
|
|
244
|
+
* @member {String} name
|
|
245
|
+
*/
|
|
246
|
+
_Job["default"].prototype['name'] = undefined;
|
|
247
|
+
// Implement JobDetailAllOf interface:
|
|
248
|
+
/**
|
|
249
|
+
* @member {module:model/JobDefinition} definition
|
|
250
|
+
*/
|
|
251
|
+
_JobDetailAllOf["default"].prototype['definition'] = undefined;
|
|
252
|
+
var _default = exports["default"] = JobDetail;
|
|
@@ -0,0 +1,93 @@
|
|
|
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 _JobDefinition = _interopRequireDefault(require("./JobDefinition"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Notehub API
|
|
17
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document: 1.2.0
|
|
20
|
+
* Contact: engineering@blues.io
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The JobDetailAllOf model module.
|
|
29
|
+
* @module model/JobDetailAllOf
|
|
30
|
+
* @version 6.2.0-beta.48
|
|
31
|
+
*/
|
|
32
|
+
var JobDetailAllOf = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>JobDetailAllOf</code>.
|
|
35
|
+
* @alias module:model/JobDetailAllOf
|
|
36
|
+
*/
|
|
37
|
+
function JobDetailAllOf() {
|
|
38
|
+
_classCallCheck(this, JobDetailAllOf);
|
|
39
|
+
JobDetailAllOf.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(JobDetailAllOf, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>JobDetailAllOf</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/JobDetailAllOf} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/JobDetailAllOf} The populated <code>JobDetailAllOf</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new JobDetailAllOf();
|
|
63
|
+
if (data.hasOwnProperty('definition')) {
|
|
64
|
+
obj['definition'] = _JobDefinition["default"].constructFromObject(data['definition']);
|
|
65
|
+
}
|
|
66
|
+
} else if (data === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>JobDetailAllOf</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>JobDetailAllOf</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// validate the optional field `definition`
|
|
81
|
+
if (data['definition']) {
|
|
82
|
+
// data not null
|
|
83
|
+
_JobDefinition["default"].validateJSON(data['definition']);
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}]);
|
|
88
|
+
}();
|
|
89
|
+
/**
|
|
90
|
+
* @member {module:model/JobDefinition} definition
|
|
91
|
+
*/
|
|
92
|
+
JobDetailAllOf.prototype['definition'] = undefined;
|
|
93
|
+
var _default = exports["default"] = JobDetailAllOf;
|
package/dist/model/JobRun.js
CHANGED
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
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); } /**
|
|
18
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The JobRun model module.
|
|
31
31
|
* @module model/JobRun
|
|
32
|
-
* @version 6.2.0-beta.
|
|
32
|
+
* @version 6.2.0-beta.48
|
|
33
33
|
*/
|
|
34
34
|
var JobRun = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -57,14 +57,14 @@ var JobRun = /*#__PURE__*/function () {
|
|
|
57
57
|
return _createClass(JobRun, null, [{
|
|
58
58
|
key: "initialize",
|
|
59
59
|
value: function initialize(obj, dryRun, jobName, jobUid, reportUid, status, submitted, submittedBy, updated) {
|
|
60
|
-
obj[
|
|
61
|
-
obj[
|
|
62
|
-
obj[
|
|
63
|
-
obj[
|
|
64
|
-
obj[
|
|
65
|
-
obj[
|
|
66
|
-
obj[
|
|
67
|
-
obj[
|
|
60
|
+
obj['dry_run'] = dryRun;
|
|
61
|
+
obj['job_name'] = jobName;
|
|
62
|
+
obj['job_uid'] = jobUid;
|
|
63
|
+
obj['report_uid'] = reportUid;
|
|
64
|
+
obj['status'] = status;
|
|
65
|
+
obj['submitted'] = submitted;
|
|
66
|
+
obj['submitted_by'] = submittedBy;
|
|
67
|
+
obj['updated'] = updated;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -79,43 +79,43 @@ var JobRun = /*#__PURE__*/function () {
|
|
|
79
79
|
value: function constructFromObject(data, obj) {
|
|
80
80
|
if (data) {
|
|
81
81
|
obj = obj || new JobRun();
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty('cancel')) {
|
|
83
|
+
obj['cancel'] = _ApiClient["default"].convertToType(data['cancel'], 'Boolean');
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty('completed')) {
|
|
86
|
+
obj['completed'] = _ApiClient["default"].convertToType(data['completed'], 'Number');
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty('dry_run')) {
|
|
89
|
+
obj['dry_run'] = _ApiClient["default"].convertToType(data['dry_run'], 'Boolean');
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty('job_name')) {
|
|
92
|
+
obj['job_name'] = _ApiClient["default"].convertToType(data['job_name'], 'String');
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty('job_uid')) {
|
|
95
|
+
obj['job_uid'] = _ApiClient["default"].convertToType(data['job_uid'], 'String');
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty('report_uid')) {
|
|
98
|
+
obj['report_uid'] = _ApiClient["default"].convertToType(data['report_uid'], 'String');
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
102
|
-
String: Object
|
|
100
|
+
if (data.hasOwnProperty('results')) {
|
|
101
|
+
obj['results'] = _ApiClient["default"].convertToType(data['results'], {
|
|
102
|
+
'String': Object
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
if (data.hasOwnProperty(
|
|
106
|
-
obj[
|
|
105
|
+
if (data.hasOwnProperty('started')) {
|
|
106
|
+
obj['started'] = _ApiClient["default"].convertToType(data['started'], 'Number');
|
|
107
107
|
}
|
|
108
|
-
if (data.hasOwnProperty(
|
|
109
|
-
obj[
|
|
108
|
+
if (data.hasOwnProperty('status')) {
|
|
109
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
110
110
|
}
|
|
111
|
-
if (data.hasOwnProperty(
|
|
112
|
-
obj[
|
|
111
|
+
if (data.hasOwnProperty('submitted')) {
|
|
112
|
+
obj['submitted'] = _ApiClient["default"].convertToType(data['submitted'], 'Number');
|
|
113
113
|
}
|
|
114
|
-
if (data.hasOwnProperty(
|
|
115
|
-
obj[
|
|
114
|
+
if (data.hasOwnProperty('submitted_by')) {
|
|
115
|
+
obj['submitted_by'] = _ApiClient["default"].convertToType(data['submitted_by'], 'String');
|
|
116
116
|
}
|
|
117
|
-
if (data.hasOwnProperty(
|
|
118
|
-
obj[
|
|
117
|
+
if (data.hasOwnProperty('updated')) {
|
|
118
|
+
obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'Number');
|
|
119
119
|
}
|
|
120
120
|
} else if (data === null) {
|
|
121
121
|
return null;
|
|
@@ -147,24 +147,24 @@ var JobRun = /*#__PURE__*/function () {
|
|
|
147
147
|
} finally {
|
|
148
148
|
_iterator.f();
|
|
149
149
|
}
|
|
150
|
-
if (data[
|
|
151
|
-
throw new Error("Expected the field `job_name` to be a primitive type in the JSON string but got " + data[
|
|
150
|
+
if (data['job_name'] && !(typeof data['job_name'] === 'string' || data['job_name'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `job_name` to be a primitive type in the JSON string but got " + data['job_name']);
|
|
152
152
|
}
|
|
153
153
|
// ensure the json data is a string
|
|
154
|
-
if (data[
|
|
155
|
-
throw new Error("Expected the field `job_uid` to be a primitive type in the JSON string but got " + data[
|
|
154
|
+
if (data['job_uid'] && !(typeof data['job_uid'] === 'string' || data['job_uid'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `job_uid` to be a primitive type in the JSON string but got " + data['job_uid']);
|
|
156
156
|
}
|
|
157
157
|
// ensure the json data is a string
|
|
158
|
-
if (data[
|
|
159
|
-
throw new Error("Expected the field `report_uid` to be a primitive type in the JSON string but got " + data[
|
|
158
|
+
if (data['report_uid'] && !(typeof data['report_uid'] === 'string' || data['report_uid'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `report_uid` to be a primitive type in the JSON string but got " + data['report_uid']);
|
|
160
160
|
}
|
|
161
161
|
// ensure the json data is a string
|
|
162
|
-
if (data[
|
|
163
|
-
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data[
|
|
162
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
164
164
|
}
|
|
165
165
|
// ensure the json data is a string
|
|
166
|
-
if (data[
|
|
167
|
-
throw new Error("Expected the field `submitted_by` to be a primitive type in the JSON string but got " + data[
|
|
166
|
+
if (data['submitted_by'] && !(typeof data['submitted_by'] === 'string' || data['submitted_by'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `submitted_by` to be a primitive type in the JSON string but got " + data['submitted_by']);
|
|
168
168
|
}
|
|
169
169
|
return true;
|
|
170
170
|
}
|
|
@@ -176,71 +176,71 @@ JobRun.RequiredProperties = ["dry_run", "job_name", "job_uid", "report_uid", "st
|
|
|
176
176
|
* Whether cancellation was requested
|
|
177
177
|
* @member {Boolean} cancel
|
|
178
178
|
*/
|
|
179
|
-
JobRun.prototype[
|
|
179
|
+
JobRun.prototype['cancel'] = undefined;
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Unix timestamp when completed
|
|
183
183
|
* @member {Number} completed
|
|
184
184
|
*/
|
|
185
|
-
JobRun.prototype[
|
|
185
|
+
JobRun.prototype['completed'] = undefined;
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Whether this was a dry run
|
|
189
189
|
* @member {Boolean} dry_run
|
|
190
190
|
*/
|
|
191
|
-
JobRun.prototype[
|
|
191
|
+
JobRun.prototype['dry_run'] = undefined;
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* Name of the job
|
|
195
195
|
* @member {String} job_name
|
|
196
196
|
*/
|
|
197
|
-
JobRun.prototype[
|
|
197
|
+
JobRun.prototype['job_name'] = undefined;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Unique identifier for the job
|
|
201
201
|
* @member {String} job_uid
|
|
202
202
|
*/
|
|
203
|
-
JobRun.prototype[
|
|
203
|
+
JobRun.prototype['job_uid'] = undefined;
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
* Unique identifier for this run
|
|
207
207
|
* @member {String} report_uid
|
|
208
208
|
*/
|
|
209
|
-
JobRun.prototype[
|
|
209
|
+
JobRun.prototype['report_uid'] = undefined;
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* Full results (only in detail view)
|
|
213
213
|
* @member {Object.<String, Object>} results
|
|
214
214
|
*/
|
|
215
|
-
JobRun.prototype[
|
|
215
|
+
JobRun.prototype['results'] = undefined;
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Unix timestamp when started
|
|
219
219
|
* @member {Number} started
|
|
220
220
|
*/
|
|
221
|
-
JobRun.prototype[
|
|
221
|
+
JobRun.prototype['started'] = undefined;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* Current status (submitted, running, completed, cancelled, failed)
|
|
225
225
|
* @member {String} status
|
|
226
226
|
*/
|
|
227
|
-
JobRun.prototype[
|
|
227
|
+
JobRun.prototype['status'] = undefined;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Unix timestamp when submitted
|
|
231
231
|
* @member {Number} submitted
|
|
232
232
|
*/
|
|
233
|
-
JobRun.prototype[
|
|
233
|
+
JobRun.prototype['submitted'] = undefined;
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
236
|
* User who submitted the run
|
|
237
237
|
* @member {String} submitted_by
|
|
238
238
|
*/
|
|
239
|
-
JobRun.prototype[
|
|
239
|
+
JobRun.prototype['submitted_by'] = undefined;
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
242
|
* Unix timestamp of last update
|
|
243
243
|
* @member {Number} updated
|
|
244
244
|
*/
|
|
245
|
-
JobRun.prototype[
|
|
245
|
+
JobRun.prototype['updated'] = undefined;
|
|
246
246
|
var _default = exports["default"] = JobRun;
|