@blues-inc/notehub-js 1.0.37-beta.7 → 1.0.37-beta.9
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 +10 -10
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +64 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +8 -8
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +1 -1
- package/dist/api/MonitorApi.js +10 -10
- package/dist/api/ProjectApi.js +14 -14
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/WebhookApi.js +1 -1
- package/dist/index.js +52 -59
- package/dist/model/Alert.js +91 -91
- package/dist/model/AlertDataInner.js +10 -10
- package/dist/model/AlertNotificationsInner.js +10 -10
- package/dist/model/AnalyticsEventsData.js +14 -14
- package/dist/model/AnalyticsEventsResponse.js +1 -1
- package/dist/model/AnalyticsRouteLogsData.js +15 -15
- package/dist/model/AnalyticsRouteLogsResponse.js +1 -1
- package/dist/model/AnalyticsSessionsData.js +14 -14
- package/dist/model/AnalyticsSessionsResponse.js +1 -1
- package/dist/model/Aws.js +86 -86
- package/dist/model/{HttpFilter.js → AwsFilter.js} +32 -32
- package/dist/model/{HttpTransform.js → AwsTransform.js} +21 -21
- package/dist/model/Azure.js +51 -51
- package/dist/model/BillingAccount.js +19 -19
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +25 -25
- package/dist/model/Contact.js +19 -19
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +186 -186
- package/dist/model/CreateProductRequest.js +30 -30
- package/dist/model/CreateProjectRequest.js +20 -20
- package/dist/model/CreateUpdateRepository.js +18 -18
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +60 -60
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSetField.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +134 -134
- package/dist/model/DeviceDfuHistory.js +15 -15
- package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +52 -52
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +14 -14
- package/dist/model/DeviceDfuStateMachineNode.js +27 -27
- package/dist/model/DeviceDfuStatus.js +15 -15
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +278 -278
- package/dist/model/DeviceTowerInfo.js +15 -15
- package/dist/model/DeviceUsage.js +36 -36
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvTreeJsonNode.js +76 -76
- package/dist/model/EnvVar.js +9 -9
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +38 -38
- package/dist/model/Event.js +340 -340
- package/dist/model/Firmware.js +45 -45
- package/dist/model/FirmwareInfo.js +71 -71
- package/dist/model/Fleet.js +31 -31
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +30 -30
- package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +20 -20
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +15 -15
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +18 -18
- package/dist/model/GetDeviceSessions200Response.js +14 -14
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +16 -16
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetWebhooks200Response.js +1 -1
- package/dist/model/Google.js +35 -35
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +43 -43
- package/dist/model/Location.js +38 -38
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +135 -135
- package/dist/model/MonitorAlertRoutesInner.js +12 -12
- package/dist/model/Mqtt.js +91 -91
- package/dist/model/Note.js +1 -1
- package/dist/model/NotefileSchema.js +1 -1
- package/dist/model/NotehubRoute.js +30 -30
- package/dist/model/NotehubRouteSchema.js +80 -80
- package/dist/model/{QuestionDataResponseMap.js → OAuth2Error.js} +65 -42
- package/dist/model/{DataSet.js → OAuth2TokenResponse.js} +67 -77
- package/dist/model/PersonalAccessToken.js +37 -37
- package/dist/model/PersonalAccessTokenCreatedBy.js +13 -13
- package/dist/model/PersonalAccessTokenInfo.js +13 -13
- package/dist/model/PersonalAccessTokenSecret.js +14 -14
- package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
- package/dist/model/Product.js +29 -29
- package/dist/model/Project.js +35 -35
- package/dist/model/ProjectMember.js +19 -19
- package/dist/model/Proxy.js +21 -21
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +28 -28
- package/dist/model/Repository.js +22 -22
- package/dist/model/RouteLog.js +28 -28
- package/dist/model/SchemaProperty.js +34 -36
- package/dist/model/SimUsage.js +16 -69
- package/dist/model/Slack.js +71 -71
- package/dist/model/SlackBearerNotification.js +14 -14
- package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +19 -19
- package/dist/model/SlackWebHookNotification.js +14 -14
- package/dist/model/Snowflake.js +57 -57
- package/dist/model/Thingworx.js +36 -36
- package/dist/model/TowerLocation.js +58 -58
- package/dist/model/Twilio.js +46 -46
- package/dist/model/UpdateFleetRequest.js +14 -14
- package/dist/model/UploadMetadata.js +68 -68
- package/dist/model/UserDbRoute.js +26 -26
- package/dist/model/UserDfuStateMachine.js +14 -14
- package/dist/model/UserDfuStateMachineStatus.js +9 -9
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/WebhookSettings.js +1 -1
- package/package.json +1 -1
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _DataSetField = _interopRequireDefault(require("./DataSetField"));
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
9
|
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
10
|
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; } } }; }
|
|
@@ -28,18 +27,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
27
|
*
|
|
29
28
|
*/
|
|
30
29
|
/**
|
|
31
|
-
* The
|
|
32
|
-
* @module model/
|
|
33
|
-
* @version 1.0.37-beta.
|
|
30
|
+
* The OAuth2TokenResponse model module.
|
|
31
|
+
* @module model/OAuth2TokenResponse
|
|
32
|
+
* @version 1.0.37-beta.9
|
|
34
33
|
*/
|
|
35
|
-
var
|
|
34
|
+
var OAuth2TokenResponse = /*#__PURE__*/function () {
|
|
36
35
|
/**
|
|
37
|
-
* Constructs a new <code>
|
|
38
|
-
* @alias module:model/
|
|
36
|
+
* Constructs a new <code>OAuth2TokenResponse</code>.
|
|
37
|
+
* @alias module:model/OAuth2TokenResponse
|
|
38
|
+
* @param accessToken {String} The issued access token
|
|
39
|
+
* @param expiresIn {Number} Lifetime in seconds of the access token.
|
|
40
|
+
* @param tokenType {String} Usually 'bearer'
|
|
39
41
|
*/
|
|
40
|
-
function
|
|
41
|
-
_classCallCheck(this,
|
|
42
|
-
|
|
42
|
+
function OAuth2TokenResponse(accessToken, expiresIn, tokenType) {
|
|
43
|
+
_classCallCheck(this, OAuth2TokenResponse);
|
|
44
|
+
OAuth2TokenResponse.initialize(this, accessToken, expiresIn, tokenType);
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
/**
|
|
@@ -47,36 +49,37 @@ var DataSet = /*#__PURE__*/function () {
|
|
|
47
49
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
50
|
* Only for internal use.
|
|
49
51
|
*/
|
|
50
|
-
return _createClass(
|
|
52
|
+
return _createClass(OAuth2TokenResponse, null, [{
|
|
51
53
|
key: "initialize",
|
|
52
|
-
value: function initialize(obj) {
|
|
54
|
+
value: function initialize(obj, accessToken, expiresIn, tokenType) {
|
|
55
|
+
obj['access_token'] = accessToken;
|
|
56
|
+
obj['expires_in'] = expiresIn;
|
|
57
|
+
obj['token_type'] = tokenType;
|
|
58
|
+
}
|
|
53
59
|
|
|
54
60
|
/**
|
|
55
|
-
* Constructs a <code>
|
|
61
|
+
* Constructs a <code>OAuth2TokenResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
62
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
63
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
-
* @param {module:model/
|
|
59
|
-
* @return {module:model/
|
|
64
|
+
* @param {module:model/OAuth2TokenResponse} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/OAuth2TokenResponse} The populated <code>OAuth2TokenResponse</code> instance.
|
|
60
66
|
*/
|
|
61
67
|
}, {
|
|
62
68
|
key: "constructFromObject",
|
|
63
69
|
value: function constructFromObject(data, obj) {
|
|
64
70
|
if (data) {
|
|
65
|
-
obj = obj || new
|
|
66
|
-
if (data.hasOwnProperty('
|
|
67
|
-
obj['
|
|
68
|
-
}
|
|
69
|
-
if (data.hasOwnProperty('time')) {
|
|
70
|
-
obj['time'] = _ApiClient["default"].convertToType(data['time'], 'String');
|
|
71
|
+
obj = obj || new OAuth2TokenResponse();
|
|
72
|
+
if (data.hasOwnProperty('access_token')) {
|
|
73
|
+
obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
|
|
71
74
|
}
|
|
72
|
-
if (data.hasOwnProperty('
|
|
73
|
-
obj['
|
|
75
|
+
if (data.hasOwnProperty('expires_in')) {
|
|
76
|
+
obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
|
|
74
77
|
}
|
|
75
|
-
if (data.hasOwnProperty('
|
|
76
|
-
obj['
|
|
78
|
+
if (data.hasOwnProperty('scope')) {
|
|
79
|
+
obj['scope'] = _ApiClient["default"].convertToType(data['scope'], 'String');
|
|
77
80
|
}
|
|
78
|
-
if (data.hasOwnProperty('
|
|
79
|
-
obj['
|
|
81
|
+
if (data.hasOwnProperty('token_type')) {
|
|
82
|
+
obj['token_type'] = _ApiClient["default"].convertToType(data['token_type'], 'String');
|
|
80
83
|
}
|
|
81
84
|
} else if (data === null) {
|
|
82
85
|
return null;
|
|
@@ -85,80 +88,67 @@ var DataSet = /*#__PURE__*/function () {
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
/**
|
|
88
|
-
* Validates the JSON data with respect to <code>
|
|
91
|
+
* Validates the JSON data with respect to <code>OAuth2TokenResponse</code>.
|
|
89
92
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
93
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OAuth2TokenResponse</code>.
|
|
91
94
|
*/
|
|
92
95
|
}, {
|
|
93
96
|
key: "validateJSON",
|
|
94
97
|
value: function validateJSON(data) {
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
// check to make sure all required properties are present in the JSON string
|
|
99
|
+
var _iterator = _createForOfIteratorHelper(OAuth2TokenResponse.RequiredProperties),
|
|
100
|
+
_step;
|
|
101
|
+
try {
|
|
102
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103
|
+
var property = _step.value;
|
|
104
|
+
if (!data[property]) {
|
|
105
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// ensure the json data is a string
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator.f();
|
|
98
113
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
throw new Error("Expected the field `time` to be a primitive type in the JSON string but got " + data['time']);
|
|
114
|
+
if (data['access_token'] && !(typeof data['access_token'] === 'string' || data['access_token'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `access_token` to be a primitive type in the JSON string but got " + data['access_token']);
|
|
102
116
|
}
|
|
103
117
|
// ensure the json data is a string
|
|
104
|
-
if (data['
|
|
105
|
-
throw new Error("Expected the field `
|
|
118
|
+
if (data['scope'] && !(typeof data['scope'] === 'string' || data['scope'] instanceof String)) {
|
|
119
|
+
throw new Error("Expected the field `scope` to be a primitive type in the JSON string but got " + data['scope']);
|
|
106
120
|
}
|
|
107
121
|
// ensure the json data is a string
|
|
108
|
-
if (data['
|
|
109
|
-
throw new Error("Expected the field `
|
|
110
|
-
}
|
|
111
|
-
if (data['fields']) {
|
|
112
|
-
// data not null
|
|
113
|
-
// ensure the json data is an array
|
|
114
|
-
if (!Array.isArray(data['fields'])) {
|
|
115
|
-
throw new Error("Expected the field `fields` to be an array in the JSON data but got " + data['fields']);
|
|
116
|
-
}
|
|
117
|
-
// validate the optional field `fields` (array)
|
|
118
|
-
var _iterator = _createForOfIteratorHelper(data['fields']),
|
|
119
|
-
_step;
|
|
120
|
-
try {
|
|
121
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
122
|
-
var item = _step.value;
|
|
123
|
-
_DataSetField["default"].validateJsonObject(item);
|
|
124
|
-
}
|
|
125
|
-
} catch (err) {
|
|
126
|
-
_iterator.e(err);
|
|
127
|
-
} finally {
|
|
128
|
-
_iterator.f();
|
|
129
|
-
}
|
|
130
|
-
;
|
|
122
|
+
if (data['token_type'] && !(typeof data['token_type'] === 'string' || data['token_type'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `token_type` to be a primitive type in the JSON string but got " + data['token_type']);
|
|
131
124
|
}
|
|
132
125
|
return true;
|
|
133
126
|
}
|
|
134
127
|
}]);
|
|
135
128
|
}();
|
|
136
|
-
|
|
137
|
-
* The name of the data set
|
|
138
|
-
* @member {String} name
|
|
139
|
-
*/
|
|
140
|
-
DataSet.prototype['name'] = undefined;
|
|
129
|
+
OAuth2TokenResponse.RequiredProperties = ["access_token", "expires_in", "token_type"];
|
|
141
130
|
|
|
142
131
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @member {String}
|
|
132
|
+
* The issued access token
|
|
133
|
+
* @member {String} access_token
|
|
145
134
|
*/
|
|
146
|
-
|
|
135
|
+
OAuth2TokenResponse.prototype['access_token'] = undefined;
|
|
147
136
|
|
|
148
137
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @member {
|
|
138
|
+
* Lifetime in seconds of the access token.
|
|
139
|
+
* @member {Number} expires_in
|
|
151
140
|
*/
|
|
152
|
-
|
|
141
|
+
OAuth2TokenResponse.prototype['expires_in'] = undefined;
|
|
153
142
|
|
|
154
143
|
/**
|
|
155
|
-
*
|
|
156
|
-
* @member {String}
|
|
144
|
+
* Granted scopes (space-delimited).
|
|
145
|
+
* @member {String} scope
|
|
157
146
|
*/
|
|
158
|
-
|
|
147
|
+
OAuth2TokenResponse.prototype['scope'] = undefined;
|
|
159
148
|
|
|
160
149
|
/**
|
|
161
|
-
*
|
|
150
|
+
* Usually 'bearer'
|
|
151
|
+
* @member {String} token_type
|
|
162
152
|
*/
|
|
163
|
-
|
|
164
|
-
var _default = exports["default"] =
|
|
153
|
+
OAuth2TokenResponse.prototype['token_type'] = undefined;
|
|
154
|
+
var _default = exports["default"] = OAuth2TokenResponse;
|
|
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
27
|
/**
|
|
28
28
|
* The PersonalAccessToken model module.
|
|
29
29
|
* @module model/PersonalAccessToken
|
|
30
|
-
* @version 1.0.37-beta.
|
|
30
|
+
* @version 1.0.37-beta.9
|
|
31
31
|
*/
|
|
32
32
|
var PersonalAccessToken = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
@@ -60,30 +60,30 @@ var PersonalAccessToken = /*#__PURE__*/function () {
|
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
62
|
obj = obj || new PersonalAccessToken();
|
|
63
|
-
if (data.hasOwnProperty('
|
|
64
|
-
obj['
|
|
63
|
+
if (data.hasOwnProperty('created_at')) {
|
|
64
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty('
|
|
67
|
-
obj['
|
|
66
|
+
if (data.hasOwnProperty('created_by')) {
|
|
67
|
+
obj['created_by'] = _PersonalAccessTokenCreatedBy["default"].constructFromObject(data['created_by']);
|
|
68
68
|
}
|
|
69
69
|
if (data.hasOwnProperty('description')) {
|
|
70
70
|
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty('created_by')) {
|
|
73
|
-
obj['created_by'] = _PersonalAccessTokenCreatedBy["default"].constructFromObject(data['created_by']);
|
|
74
|
-
}
|
|
75
72
|
if (data.hasOwnProperty('expires_at')) {
|
|
76
73
|
obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
|
|
77
74
|
}
|
|
78
|
-
if (data.hasOwnProperty('created_at')) {
|
|
79
|
-
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
80
|
-
}
|
|
81
75
|
if (data.hasOwnProperty('last_used')) {
|
|
82
76
|
obj['last_used'] = _ApiClient["default"].convertToType(data['last_used'], 'Date');
|
|
83
77
|
}
|
|
78
|
+
if (data.hasOwnProperty('name')) {
|
|
79
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
80
|
+
}
|
|
84
81
|
if (data.hasOwnProperty('suspended')) {
|
|
85
82
|
obj['suspended'] = _ApiClient["default"].convertToType(data['suspended'], 'Boolean');
|
|
86
83
|
}
|
|
84
|
+
if (data.hasOwnProperty('uid')) {
|
|
85
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
86
|
+
}
|
|
87
87
|
} else if (data === null) {
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
@@ -98,38 +98,37 @@ var PersonalAccessToken = /*#__PURE__*/function () {
|
|
|
98
98
|
}, {
|
|
99
99
|
key: "validateJSON",
|
|
100
100
|
value: function validateJSON(data) {
|
|
101
|
+
// validate the optional field `created_by`
|
|
102
|
+
if (data['created_by']) {
|
|
103
|
+
// data not null
|
|
104
|
+
_PersonalAccessTokenCreatedBy["default"].validateJSON(data['created_by']);
|
|
105
|
+
}
|
|
101
106
|
// ensure the json data is a string
|
|
102
|
-
if (data['
|
|
103
|
-
throw new Error("Expected the field `
|
|
107
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
104
109
|
}
|
|
105
110
|
// ensure the json data is a string
|
|
106
111
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
107
112
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
108
113
|
}
|
|
109
114
|
// ensure the json data is a string
|
|
110
|
-
if (data['
|
|
111
|
-
throw new Error("Expected the field `
|
|
112
|
-
}
|
|
113
|
-
// validate the optional field `created_by`
|
|
114
|
-
if (data['created_by']) {
|
|
115
|
-
// data not null
|
|
116
|
-
_PersonalAccessTokenCreatedBy["default"].validateJSON(data['created_by']);
|
|
115
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
117
117
|
}
|
|
118
118
|
return true;
|
|
119
119
|
}
|
|
120
120
|
}]);
|
|
121
121
|
}();
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
124
|
-
* @member {
|
|
123
|
+
* When the key was created
|
|
124
|
+
* @member {Date} created_at
|
|
125
125
|
*/
|
|
126
|
-
PersonalAccessToken.prototype['
|
|
126
|
+
PersonalAccessToken.prototype['created_at'] = undefined;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @member {String} name
|
|
129
|
+
* @member {module:model/PersonalAccessTokenCreatedBy} created_by
|
|
131
130
|
*/
|
|
132
|
-
PersonalAccessToken.prototype['
|
|
131
|
+
PersonalAccessToken.prototype['created_by'] = undefined;
|
|
133
132
|
|
|
134
133
|
/**
|
|
135
134
|
* Optional description for this API Key
|
|
@@ -137,32 +136,33 @@ PersonalAccessToken.prototype['name'] = undefined;
|
|
|
137
136
|
*/
|
|
138
137
|
PersonalAccessToken.prototype['description'] = undefined;
|
|
139
138
|
|
|
140
|
-
/**
|
|
141
|
-
* @member {module:model/PersonalAccessTokenCreatedBy} created_by
|
|
142
|
-
*/
|
|
143
|
-
PersonalAccessToken.prototype['created_by'] = undefined;
|
|
144
|
-
|
|
145
139
|
/**
|
|
146
140
|
* When the key expires
|
|
147
141
|
* @member {Date} expires_at
|
|
148
142
|
*/
|
|
149
143
|
PersonalAccessToken.prototype['expires_at'] = undefined;
|
|
150
144
|
|
|
151
|
-
/**
|
|
152
|
-
* When the key was created
|
|
153
|
-
* @member {Date} created_at
|
|
154
|
-
*/
|
|
155
|
-
PersonalAccessToken.prototype['created_at'] = undefined;
|
|
156
|
-
|
|
157
145
|
/**
|
|
158
146
|
* When it was last used, if ever
|
|
159
147
|
* @member {Date} last_used
|
|
160
148
|
*/
|
|
161
149
|
PersonalAccessToken.prototype['last_used'] = undefined;
|
|
162
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Name for this API Key
|
|
153
|
+
* @member {String} name
|
|
154
|
+
*/
|
|
155
|
+
PersonalAccessToken.prototype['name'] = undefined;
|
|
156
|
+
|
|
163
157
|
/**
|
|
164
158
|
* if true, this token cannot be used
|
|
165
159
|
* @member {Boolean} suspended
|
|
166
160
|
*/
|
|
167
161
|
PersonalAccessToken.prototype['suspended'] = undefined;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Unique and public identifier
|
|
165
|
+
* @member {String} uid
|
|
166
|
+
*/
|
|
167
|
+
PersonalAccessToken.prototype['uid'] = undefined;
|
|
168
168
|
var _default = exports["default"] = PersonalAccessToken;
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The PersonalAccessTokenCreatedBy model module.
|
|
28
28
|
* @module model/PersonalAccessTokenCreatedBy
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.9
|
|
30
30
|
*/
|
|
31
31
|
var PersonalAccessTokenCreatedBy = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -60,15 +60,15 @@ var PersonalAccessTokenCreatedBy = /*#__PURE__*/function () {
|
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
62
|
obj = obj || new PersonalAccessTokenCreatedBy();
|
|
63
|
-
if (data.hasOwnProperty('uid')) {
|
|
64
|
-
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
65
|
-
}
|
|
66
63
|
if (data.hasOwnProperty('email')) {
|
|
67
64
|
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
68
65
|
}
|
|
69
66
|
if (data.hasOwnProperty('name')) {
|
|
70
67
|
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
71
68
|
}
|
|
69
|
+
if (data.hasOwnProperty('uid')) {
|
|
70
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
71
|
+
}
|
|
72
72
|
} else if (data === null) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
@@ -83,10 +83,6 @@ var PersonalAccessTokenCreatedBy = /*#__PURE__*/function () {
|
|
|
83
83
|
}, {
|
|
84
84
|
key: "validateJSON",
|
|
85
85
|
value: function validateJSON(data) {
|
|
86
|
-
// ensure the json data is a string
|
|
87
|
-
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
88
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
89
|
-
}
|
|
90
86
|
// ensure the json data is a string
|
|
91
87
|
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
92
88
|
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
@@ -95,15 +91,14 @@ var PersonalAccessTokenCreatedBy = /*#__PURE__*/function () {
|
|
|
95
91
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
96
92
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
97
93
|
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
97
|
+
}
|
|
98
98
|
return true;
|
|
99
99
|
}
|
|
100
100
|
}]);
|
|
101
101
|
}();
|
|
102
|
-
/**
|
|
103
|
-
* @member {String} uid
|
|
104
|
-
*/
|
|
105
|
-
PersonalAccessTokenCreatedBy.prototype['uid'] = undefined;
|
|
106
|
-
|
|
107
102
|
/**
|
|
108
103
|
* @member {String} email
|
|
109
104
|
*/
|
|
@@ -113,4 +108,9 @@ PersonalAccessTokenCreatedBy.prototype['email'] = undefined;
|
|
|
113
108
|
* @member {String} name
|
|
114
109
|
*/
|
|
115
110
|
PersonalAccessTokenCreatedBy.prototype['name'] = undefined;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @member {String} uid
|
|
114
|
+
*/
|
|
115
|
+
PersonalAccessTokenCreatedBy.prototype['uid'] = undefined;
|
|
116
116
|
var _default = exports["default"] = PersonalAccessTokenCreatedBy;
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The PersonalAccessTokenInfo model module.
|
|
28
28
|
* @module model/PersonalAccessTokenInfo
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.9
|
|
30
30
|
*/
|
|
31
31
|
var PersonalAccessTokenInfo = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,15 +59,15 @@ var PersonalAccessTokenInfo = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new PersonalAccessTokenInfo();
|
|
62
|
-
if (data.hasOwnProperty('name')) {
|
|
63
|
-
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
64
|
-
}
|
|
65
62
|
if (data.hasOwnProperty('description')) {
|
|
66
63
|
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
67
64
|
}
|
|
68
65
|
if (data.hasOwnProperty('expires_at')) {
|
|
69
66
|
obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
|
|
70
67
|
}
|
|
68
|
+
if (data.hasOwnProperty('name')) {
|
|
69
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
70
|
+
}
|
|
71
71
|
if (data.hasOwnProperty('suspended')) {
|
|
72
72
|
obj['suspended'] = _ApiClient["default"].convertToType(data['suspended'], 'Boolean');
|
|
73
73
|
}
|
|
@@ -85,23 +85,18 @@ var PersonalAccessTokenInfo = /*#__PURE__*/function () {
|
|
|
85
85
|
}, {
|
|
86
86
|
key: "validateJSON",
|
|
87
87
|
value: function validateJSON(data) {
|
|
88
|
-
// ensure the json data is a string
|
|
89
|
-
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
90
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
91
|
-
}
|
|
92
88
|
// ensure the json data is a string
|
|
93
89
|
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
94
90
|
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
95
91
|
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
95
|
+
}
|
|
96
96
|
return true;
|
|
97
97
|
}
|
|
98
98
|
}]);
|
|
99
99
|
}();
|
|
100
|
-
/**
|
|
101
|
-
* @member {String} name
|
|
102
|
-
*/
|
|
103
|
-
PersonalAccessTokenInfo.prototype['name'] = undefined;
|
|
104
|
-
|
|
105
100
|
/**
|
|
106
101
|
* @member {String} description
|
|
107
102
|
*/
|
|
@@ -113,6 +108,11 @@ PersonalAccessTokenInfo.prototype['description'] = undefined;
|
|
|
113
108
|
*/
|
|
114
109
|
PersonalAccessTokenInfo.prototype['expires_at'] = undefined;
|
|
115
110
|
|
|
111
|
+
/**
|
|
112
|
+
* @member {String} name
|
|
113
|
+
*/
|
|
114
|
+
PersonalAccessTokenInfo.prototype['name'] = undefined;
|
|
115
|
+
|
|
116
116
|
/**
|
|
117
117
|
* if true, the token is temporarily suspended
|
|
118
118
|
* @member {Boolean} suspended
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The PersonalAccessTokenSecret model module.
|
|
28
28
|
* @module model/PersonalAccessTokenSecret
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.9
|
|
30
30
|
*/
|
|
31
31
|
var PersonalAccessTokenSecret = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,12 +59,12 @@ var PersonalAccessTokenSecret = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new PersonalAccessTokenSecret();
|
|
62
|
-
if (data.hasOwnProperty('uid')) {
|
|
63
|
-
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
64
|
-
}
|
|
65
62
|
if (data.hasOwnProperty('secret')) {
|
|
66
63
|
obj['secret'] = _ApiClient["default"].convertToType(data['secret'], 'String');
|
|
67
64
|
}
|
|
65
|
+
if (data.hasOwnProperty('uid')) {
|
|
66
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
67
|
+
}
|
|
68
68
|
} else if (data === null) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
@@ -79,27 +79,27 @@ var PersonalAccessTokenSecret = /*#__PURE__*/function () {
|
|
|
79
79
|
}, {
|
|
80
80
|
key: "validateJSON",
|
|
81
81
|
value: function validateJSON(data) {
|
|
82
|
-
// ensure the json data is a string
|
|
83
|
-
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
84
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
85
|
-
}
|
|
86
82
|
// ensure the json data is a string
|
|
87
83
|
if (data['secret'] && !(typeof data['secret'] === 'string' || data['secret'] instanceof String)) {
|
|
88
84
|
throw new Error("Expected the field `secret` to be a primitive type in the JSON string but got " + data['secret']);
|
|
89
85
|
}
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
89
|
+
}
|
|
90
90
|
return true;
|
|
91
91
|
}
|
|
92
92
|
}]);
|
|
93
93
|
}();
|
|
94
|
-
/**
|
|
95
|
-
* Unique and public identifier
|
|
96
|
-
* @member {String} uid
|
|
97
|
-
*/
|
|
98
|
-
PersonalAccessTokenSecret.prototype['uid'] = undefined;
|
|
99
|
-
|
|
100
94
|
/**
|
|
101
95
|
* The secret
|
|
102
96
|
* @member {String} secret
|
|
103
97
|
*/
|
|
104
98
|
PersonalAccessTokenSecret.prototype['secret'] = undefined;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Unique and public identifier
|
|
102
|
+
* @member {String} uid
|
|
103
|
+
*/
|
|
104
|
+
PersonalAccessTokenSecret.prototype['uid'] = undefined;
|
|
105
105
|
var _default = exports["default"] = PersonalAccessTokenSecret;
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The PostProvisionProjectDeviceRequest model module.
|
|
31
31
|
* @module model/PostProvisionProjectDeviceRequest
|
|
32
|
-
* @version 1.0.37-beta.
|
|
32
|
+
* @version 1.0.37-beta.9
|
|
33
33
|
*/
|
|
34
34
|
var PostProvisionProjectDeviceRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -65,15 +65,15 @@ var PostProvisionProjectDeviceRequest = /*#__PURE__*/function () {
|
|
|
65
65
|
value: function constructFromObject(data, obj) {
|
|
66
66
|
if (data) {
|
|
67
67
|
obj = obj || new PostProvisionProjectDeviceRequest();
|
|
68
|
-
if (data.hasOwnProperty('product_uid')) {
|
|
69
|
-
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
70
|
-
}
|
|
71
68
|
if (data.hasOwnProperty('device_sn')) {
|
|
72
69
|
obj['device_sn'] = _ApiClient["default"].convertToType(data['device_sn'], 'String');
|
|
73
70
|
}
|
|
74
71
|
if (data.hasOwnProperty('fleet_uids')) {
|
|
75
72
|
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
76
73
|
}
|
|
74
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
75
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
76
|
+
}
|
|
77
77
|
} else if (data === null) {
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
@@ -104,10 +104,6 @@ var PostProvisionProjectDeviceRequest = /*#__PURE__*/function () {
|
|
|
104
104
|
} finally {
|
|
105
105
|
_iterator.f();
|
|
106
106
|
}
|
|
107
|
-
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
108
|
-
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
109
|
-
}
|
|
110
|
-
// ensure the json data is a string
|
|
111
107
|
if (data['device_sn'] && !(typeof data['device_sn'] === 'string' || data['device_sn'] instanceof String)) {
|
|
112
108
|
throw new Error("Expected the field `device_sn` to be a primitive type in the JSON string but got " + data['device_sn']);
|
|
113
109
|
}
|
|
@@ -115,18 +111,16 @@ var PostProvisionProjectDeviceRequest = /*#__PURE__*/function () {
|
|
|
115
111
|
if (!Array.isArray(data['fleet_uids'])) {
|
|
116
112
|
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
117
113
|
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
117
|
+
}
|
|
118
118
|
return true;
|
|
119
119
|
}
|
|
120
120
|
}]);
|
|
121
121
|
}();
|
|
122
122
|
PostProvisionProjectDeviceRequest.RequiredProperties = ["product_uid"];
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* The ProductUID that the device should use.
|
|
126
|
-
* @member {String} product_uid
|
|
127
|
-
*/
|
|
128
|
-
PostProvisionProjectDeviceRequest.prototype['product_uid'] = undefined;
|
|
129
|
-
|
|
130
124
|
/**
|
|
131
125
|
* The serial number to assign to the device.
|
|
132
126
|
* @member {String} device_sn
|
|
@@ -138,4 +132,10 @@ PostProvisionProjectDeviceRequest.prototype['device_sn'] = undefined;
|
|
|
138
132
|
* @member {Array.<String>} fleet_uids
|
|
139
133
|
*/
|
|
140
134
|
PostProvisionProjectDeviceRequest.prototype['fleet_uids'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The ProductUID that the device should use.
|
|
138
|
+
* @member {String} product_uid
|
|
139
|
+
*/
|
|
140
|
+
PostProvisionProjectDeviceRequest.prototype['product_uid'] = undefined;
|
|
141
141
|
var _default = exports["default"] = PostProvisionProjectDeviceRequest;
|