@blues-inc/notehub-js 1.0.16 → 1.0.18
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 +9 -5
- package/dist/ApiClient.js +2 -2
- package/dist/api/AuthorizationApi.js +1 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +21 -21
- package/dist/api/DevicesApi.js +54 -1
- package/dist/api/EnvironmentVariablesApi.js +21 -21
- package/dist/api/EventApi.js +1 -1
- package/dist/api/FilesApi.js +1 -1
- package/dist/api/FleetApi.js +1 -1
- package/dist/api/NotesApi.js +1 -1
- package/dist/api/ProductApi.js +1 -1
- package/dist/api/ProjectApi.js +54 -1
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/RouteLogsApi.js +1 -1
- package/dist/index.js +14 -0
- package/dist/model/Aws.js +1 -1
- package/dist/model/Azure.js +1 -1
- package/dist/model/BillingAccount.js +1 -1
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +1 -1
- package/dist/model/Contact.js +1 -1
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateProductRequest.js +1 -1
- package/dist/model/CreateProjectRequest.js +1 -1
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +1 -1
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +1 -1
- package/dist/model/DeviceSession.js +1 -1
- package/dist/model/DeviceTowerInfo.js +1 -1
- package/dist/model/DeviceUsage.js +1 -1
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +1 -1
- package/dist/model/Event.js +1 -1
- package/dist/model/Fleet.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +1 -1
- package/dist/model/GetDeviceSessions200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
- package/dist/model/GetProjectFleets200Response.js +1 -1
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +1 -1
- package/dist/model/Google.js +1 -1
- package/dist/model/HandleNoteChanges200Response.js +1 -1
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +1 -1
- package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +1 -1
- package/dist/model/HttpFilter.js +1 -1
- package/dist/model/HttpTransform.js +1 -1
- package/dist/model/Location.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/Mqtt.js +1 -1
- package/dist/model/Note.js +1 -1
- package/dist/model/PostProvisionProjectDeviceRequest.js +119 -0
- package/dist/model/Product.js +1 -1
- package/dist/model/Project.js +1 -1
- package/dist/model/ProjectMember.js +1 -1
- package/dist/model/Proxy.js +1 -1
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +1 -1
- package/dist/model/Route.js +12 -2
- package/dist/model/RouteSchema.js +57 -9
- package/dist/model/Slack.js +209 -0
- package/dist/model/Snowflake.js +1 -1
- package/dist/model/SnowflakeTransform.js +1 -1
- package/dist/model/Thingworx.js +1 -1
- package/dist/model/TowerLocation.js +1 -1
- package/dist/model/Twilio.js +1 -1
- package/dist/model/UpdateFleetRequest.js +1 -1
- package/dist/model/UserDbRoute.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
10
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
+
/**
|
|
19
|
+
* The PostProvisionProjectDeviceRequest model module.
|
|
20
|
+
* @module model/PostProvisionProjectDeviceRequest
|
|
21
|
+
* @version 1.0.18
|
|
22
|
+
*/
|
|
23
|
+
var PostProvisionProjectDeviceRequest = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>PostProvisionProjectDeviceRequest</code>.
|
|
26
|
+
* @alias module:model/PostProvisionProjectDeviceRequest
|
|
27
|
+
* @param productUid {String} The ProductUID that the device should use.
|
|
28
|
+
*/
|
|
29
|
+
function PostProvisionProjectDeviceRequest(productUid) {
|
|
30
|
+
_classCallCheck(this, PostProvisionProjectDeviceRequest);
|
|
31
|
+
PostProvisionProjectDeviceRequest.initialize(this, productUid);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the fields of this object.
|
|
36
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
37
|
+
* Only for internal use.
|
|
38
|
+
*/
|
|
39
|
+
_createClass(PostProvisionProjectDeviceRequest, null, [{
|
|
40
|
+
key: "initialize",
|
|
41
|
+
value: function initialize(obj, productUid) {
|
|
42
|
+
obj["product_uid"] = productUid;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Constructs a <code>PostProvisionProjectDeviceRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
47
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
48
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
49
|
+
* @param {module:model/PostProvisionProjectDeviceRequest} obj Optional instance to populate.
|
|
50
|
+
* @return {module:model/PostProvisionProjectDeviceRequest} The populated <code>PostProvisionProjectDeviceRequest</code> instance.
|
|
51
|
+
*/
|
|
52
|
+
}, {
|
|
53
|
+
key: "constructFromObject",
|
|
54
|
+
value: function constructFromObject(data, obj) {
|
|
55
|
+
if (data) {
|
|
56
|
+
obj = obj || new PostProvisionProjectDeviceRequest();
|
|
57
|
+
if (data.hasOwnProperty("product_uid")) {
|
|
58
|
+
obj["product_uid"] = _ApiClient["default"].convertToType(data["product_uid"], "String");
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty("device_sn")) {
|
|
61
|
+
obj["device_sn"] = _ApiClient["default"].convertToType(data["device_sn"], "String");
|
|
62
|
+
}
|
|
63
|
+
} else if (data === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>PostProvisionProjectDeviceRequest</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PostProvisionProjectDeviceRequest</code>.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "validateJSON",
|
|
76
|
+
value: function validateJSON(data) {
|
|
77
|
+
// check to make sure all required properties are present in the JSON string
|
|
78
|
+
var _iterator = _createForOfIteratorHelper(PostProvisionProjectDeviceRequest.RequiredProperties),
|
|
79
|
+
_step;
|
|
80
|
+
try {
|
|
81
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
82
|
+
var property = _step.value;
|
|
83
|
+
if (!data[property]) {
|
|
84
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ensure the json data is a string
|
|
88
|
+
} catch (err) {
|
|
89
|
+
_iterator.e(err);
|
|
90
|
+
} finally {
|
|
91
|
+
_iterator.f();
|
|
92
|
+
}
|
|
93
|
+
if (data["product_uid"] && !(typeof data["product_uid"] === "string" || data["product_uid"] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data["product_uid"]);
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data["device_sn"] && !(typeof data["device_sn"] === "string" || data["device_sn"] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `device_sn` to be a primitive type in the JSON string but got " + data["device_sn"]);
|
|
99
|
+
}
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}]);
|
|
103
|
+
return PostProvisionProjectDeviceRequest;
|
|
104
|
+
}();
|
|
105
|
+
PostProvisionProjectDeviceRequest.RequiredProperties = ["product_uid"];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The ProductUID that the device should use.
|
|
109
|
+
* @member {String} product_uid
|
|
110
|
+
*/
|
|
111
|
+
PostProvisionProjectDeviceRequest.prototype["product_uid"] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The serial number to assign to the device.
|
|
115
|
+
* @member {String} device_sn
|
|
116
|
+
*/
|
|
117
|
+
PostProvisionProjectDeviceRequest.prototype["device_sn"] = undefined;
|
|
118
|
+
var _default = PostProvisionProjectDeviceRequest;
|
|
119
|
+
exports["default"] = _default;
|
package/dist/model/Product.js
CHANGED
package/dist/model/Project.js
CHANGED
|
@@ -19,7 +19,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
19
19
|
/**
|
|
20
20
|
* The ProjectMember model module.
|
|
21
21
|
* @module model/ProjectMember
|
|
22
|
-
* @version 1.0.
|
|
22
|
+
* @version 1.0.18
|
|
23
23
|
*/
|
|
24
24
|
var ProjectMember = /*#__PURE__*/function () {
|
|
25
25
|
/**
|
package/dist/model/Proxy.js
CHANGED
|
@@ -18,7 +18,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
18
18
|
/**
|
|
19
19
|
* The PutDeviceFleetsRequest model module.
|
|
20
20
|
* @module model/PutDeviceFleetsRequest
|
|
21
|
-
* @version 1.0.
|
|
21
|
+
* @version 1.0.18
|
|
22
22
|
*/
|
|
23
23
|
var PutDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
24
24
|
/**
|
package/dist/model/Route.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
16
16
|
/**
|
|
17
17
|
* The Route model module.
|
|
18
18
|
* @module model/Route
|
|
19
|
-
* @version 1.0.
|
|
19
|
+
* @version 1.0.18
|
|
20
20
|
*/
|
|
21
21
|
var Route = /*#__PURE__*/function () {
|
|
22
22
|
/**
|
|
@@ -239,7 +239,17 @@ Route["RouteTypeEnum"] = {
|
|
|
239
239
|
* value: "snowflake"
|
|
240
240
|
* @const
|
|
241
241
|
*/
|
|
242
|
-
snowflake: "snowflake"
|
|
242
|
+
snowflake: "snowflake",
|
|
243
|
+
/**
|
|
244
|
+
* value: "slack-bearer"
|
|
245
|
+
* @const
|
|
246
|
+
*/
|
|
247
|
+
"slack-bearer": "slack-bearer",
|
|
248
|
+
/**
|
|
249
|
+
* value: "slack-webhook"
|
|
250
|
+
* @const
|
|
251
|
+
*/
|
|
252
|
+
"slack-webhook": "slack-webhook"
|
|
243
253
|
};
|
|
244
254
|
var _default = Route;
|
|
245
255
|
exports["default"] = _default;
|
|
@@ -13,6 +13,7 @@ var _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
|
|
|
13
13
|
var _Mqtt = _interopRequireDefault(require("./Mqtt"));
|
|
14
14
|
var _Proxy = _interopRequireDefault(require("./Proxy"));
|
|
15
15
|
var _Radresponder = _interopRequireDefault(require("./Radresponder"));
|
|
16
|
+
var _Slack = _interopRequireDefault(require("./Slack"));
|
|
16
17
|
var _Snowflake = _interopRequireDefault(require("./Snowflake"));
|
|
17
18
|
var _SnowflakeTransform = _interopRequireDefault(require("./SnowflakeTransform"));
|
|
18
19
|
var _Thingworx = _interopRequireDefault(require("./Thingworx"));
|
|
@@ -27,13 +28,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
27
28
|
/**
|
|
28
29
|
* The RouteSchema model module.
|
|
29
30
|
* @module model/RouteSchema
|
|
30
|
-
* @version 1.0.
|
|
31
|
+
* @version 1.0.18
|
|
31
32
|
*/
|
|
32
33
|
var RouteSchema = /*#__PURE__*/function () {
|
|
33
34
|
/**
|
|
34
35
|
* Constructs a new <code>RouteSchema</code>.
|
|
35
36
|
* @alias module:model/RouteSchema
|
|
36
|
-
* @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} instance The actual instance to initialize RouteSchema.
|
|
37
|
+
* @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Slack|module:model/Snowflake|module:model/Thingworx)} instance The actual instance to initialize RouteSchema.
|
|
37
38
|
*/
|
|
38
39
|
function RouteSchema() {
|
|
39
40
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -182,11 +183,26 @@ var RouteSchema = /*#__PURE__*/function () {
|
|
|
182
183
|
// json data failed to deserialize into Snowflake
|
|
183
184
|
errorMessages.push("Failed to construct Snowflake: " + err);
|
|
184
185
|
}
|
|
186
|
+
try {
|
|
187
|
+
if (typeof instance === "Slack") {
|
|
188
|
+
this.actualInstance = instance;
|
|
189
|
+
} else {
|
|
190
|
+
// plain JS object
|
|
191
|
+
// validate the object
|
|
192
|
+
_Slack["default"].validateJSON(instance); // throw an exception if no match
|
|
193
|
+
// create Slack from JS object
|
|
194
|
+
this.actualInstance = _Slack["default"].constructFromObject(instance);
|
|
195
|
+
}
|
|
196
|
+
match++;
|
|
197
|
+
} catch (err) {
|
|
198
|
+
// json data failed to deserialize into Slack
|
|
199
|
+
errorMessages.push("Failed to construct Slack: " + err);
|
|
200
|
+
}
|
|
185
201
|
if (match > 1) {
|
|
186
|
-
throw new Error("Multiple matches found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Snowflake, Thingworx. Input: " + JSON.stringify(instance));
|
|
202
|
+
throw new Error("Multiple matches found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Input: " + JSON.stringify(instance));
|
|
187
203
|
} else if (match === 0) {
|
|
188
204
|
this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
189
|
-
throw new Error("No match found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Snowflake, Thingworx. Details: " + errorMessages.join(", "));
|
|
205
|
+
throw new Error("No match found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + errorMessages.join(", "));
|
|
190
206
|
} else {
|
|
191
207
|
// only 1 match
|
|
192
208
|
// the input is valid
|
|
@@ -204,16 +220,16 @@ var RouteSchema = /*#__PURE__*/function () {
|
|
|
204
220
|
key: "getActualInstance",
|
|
205
221
|
value:
|
|
206
222
|
/**
|
|
207
|
-
* Gets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Snowflake</code>, <code>Thingworx</code>.
|
|
208
|
-
* @return {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} The actual instance.
|
|
223
|
+
* Gets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Slack</code>, <code>Snowflake</code>, <code>Thingworx</code>.
|
|
224
|
+
* @return {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Slack|module:model/Snowflake|module:model/Thingworx)} The actual instance.
|
|
209
225
|
*/
|
|
210
226
|
function getActualInstance() {
|
|
211
227
|
return this.actualInstance;
|
|
212
228
|
}
|
|
213
229
|
|
|
214
230
|
/**
|
|
215
|
-
* Sets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Snowflake</code>, <code>Thingworx</code>.
|
|
216
|
-
* @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} obj The actual instance.
|
|
231
|
+
* Sets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Slack</code>, <code>Snowflake</code>, <code>Thingworx</code>.
|
|
232
|
+
* @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Slack|module:model/Snowflake|module:model/Thingworx)} obj The actual instance.
|
|
217
233
|
*/
|
|
218
234
|
}, {
|
|
219
235
|
key: "setActualInstance",
|
|
@@ -253,6 +269,7 @@ RouteSchema.prototype["filter"] = undefined;
|
|
|
253
269
|
RouteSchema.prototype["transform"] = undefined;
|
|
254
270
|
|
|
255
271
|
/**
|
|
272
|
+
* Minimum time between requests in Miliseconds
|
|
256
273
|
* @member {Number} throttle_ms
|
|
257
274
|
*/
|
|
258
275
|
RouteSchema.prototype["throttle_ms"] = undefined;
|
|
@@ -369,6 +386,7 @@ RouteSchema.prototype["message_group_id"] = undefined;
|
|
|
369
386
|
RouteSchema.prototype["message_deduplication_id"] = undefined;
|
|
370
387
|
|
|
371
388
|
/**
|
|
389
|
+
* The Channel ID for Bearer Token method, if the \"slack-bearer\" type is selected
|
|
372
390
|
* @member {String} channel
|
|
373
391
|
*/
|
|
374
392
|
RouteSchema.prototype["channel"] = undefined;
|
|
@@ -438,6 +456,36 @@ RouteSchema.prototype["user_name"] = undefined;
|
|
|
438
456
|
* @member {String} pem
|
|
439
457
|
*/
|
|
440
458
|
RouteSchema.prototype["pem"] = undefined;
|
|
441
|
-
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* The type of Slack message. Must be one of \"slack-bearer\" for Bearer Token or \"slack-webhook\" for Webhook messages
|
|
462
|
+
* @member {String} slack_type
|
|
463
|
+
*/
|
|
464
|
+
RouteSchema.prototype["slack_type"] = undefined;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* The Bearer Token for Slack messaging, if the \"slack-bearer\" type is selected
|
|
468
|
+
* @member {String} bearer
|
|
469
|
+
*/
|
|
470
|
+
RouteSchema.prototype["bearer"] = undefined;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* The Webhook URL for Slack Messaging if the \"slack-webhook\" type is selected
|
|
474
|
+
* @member {String} webhook_url
|
|
475
|
+
*/
|
|
476
|
+
RouteSchema.prototype["webhook_url"] = undefined;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* The simple text message to be sent, if the blocks message field is not in use. Placeholders are available for this field.
|
|
480
|
+
* @member {String} text
|
|
481
|
+
*/
|
|
482
|
+
RouteSchema.prototype["text"] = undefined;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* The Blocks message to be sent. If populated, this field overrides the text field within the Slack Messaging API. Placeholders are available for this field.
|
|
486
|
+
* @member {String} blocks
|
|
487
|
+
*/
|
|
488
|
+
RouteSchema.prototype["blocks"] = undefined;
|
|
489
|
+
RouteSchema.OneOf = ["Aws", "Azure", "Google", "Http", "Mqtt", "Proxy", "Radresponder", "Slack", "Snowflake", "Thingworx"];
|
|
442
490
|
var _default = RouteSchema;
|
|
443
491
|
exports["default"] = _default;
|
|
@@ -0,0 +1,209 @@
|
|
|
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 _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
|
|
9
|
+
var _SnowflakeTransform = _interopRequireDefault(require("./SnowflakeTransform"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
+
/**
|
|
18
|
+
* The Slack model module.
|
|
19
|
+
* @module model/Slack
|
|
20
|
+
* @version 1.0.18
|
|
21
|
+
*/
|
|
22
|
+
var Slack = /*#__PURE__*/function () {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new <code>Slack</code>.
|
|
25
|
+
* Route settings specific to Slack routes. Only used for Slack route types
|
|
26
|
+
* @alias module:model/Slack
|
|
27
|
+
*/
|
|
28
|
+
function Slack() {
|
|
29
|
+
_classCallCheck(this, Slack);
|
|
30
|
+
Slack.initialize(this);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Initializes the fields of this object.
|
|
35
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
36
|
+
* Only for internal use.
|
|
37
|
+
*/
|
|
38
|
+
_createClass(Slack, null, [{
|
|
39
|
+
key: "initialize",
|
|
40
|
+
value: function initialize(obj) {}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Constructs a <code>Slack</code> from a plain JavaScript object, optionally creating a new instance.
|
|
44
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
45
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
46
|
+
* @param {module:model/Slack} obj Optional instance to populate.
|
|
47
|
+
* @return {module:model/Slack} The populated <code>Slack</code> instance.
|
|
48
|
+
*/
|
|
49
|
+
}, {
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value: function constructFromObject(data, obj) {
|
|
52
|
+
if (data) {
|
|
53
|
+
obj = obj || new Slack();
|
|
54
|
+
if (data.hasOwnProperty("fleets")) {
|
|
55
|
+
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty("filter")) {
|
|
58
|
+
obj["filter"] = _HttpFilter["default"].constructFromObject(data["filter"]);
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty("transform")) {
|
|
61
|
+
obj["transform"] = _SnowflakeTransform["default"].constructFromObject(data["transform"]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty("throttle_ms")) {
|
|
64
|
+
obj["throttle_ms"] = _ApiClient["default"].convertToType(data["throttle_ms"], "Number");
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty("timeout")) {
|
|
67
|
+
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty("slack_type")) {
|
|
70
|
+
obj["slack_type"] = _ApiClient["default"].convertToType(data["slack_type"], "String");
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty("bearer")) {
|
|
73
|
+
obj["bearer"] = _ApiClient["default"].convertToType(data["bearer"], "String");
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty("channel")) {
|
|
76
|
+
obj["channel"] = _ApiClient["default"].convertToType(data["channel"], "String");
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty("webhook_url")) {
|
|
79
|
+
obj["webhook_url"] = _ApiClient["default"].convertToType(data["webhook_url"], "String");
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty("text")) {
|
|
82
|
+
obj["text"] = _ApiClient["default"].convertToType(data["text"], "String");
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty("blocks")) {
|
|
85
|
+
obj["blocks"] = _ApiClient["default"].convertToType(data["blocks"], "String");
|
|
86
|
+
}
|
|
87
|
+
} else if (data === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return obj;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Validates the JSON data with respect to <code>Slack</code>.
|
|
95
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
96
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Slack</code>.
|
|
97
|
+
*/
|
|
98
|
+
}, {
|
|
99
|
+
key: "validateJSON",
|
|
100
|
+
value: function validateJSON(data) {
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data["fleets"])) {
|
|
103
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `filter`
|
|
106
|
+
if (data["filter"]) {
|
|
107
|
+
// data not null
|
|
108
|
+
_HttpFilter["default"].validateJSON(data["filter"]);
|
|
109
|
+
}
|
|
110
|
+
// validate the optional field `transform`
|
|
111
|
+
if (data["transform"]) {
|
|
112
|
+
// data not null
|
|
113
|
+
_SnowflakeTransform["default"].validateJSON(data["transform"]);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data["slack_type"] && !(typeof data["slack_type"] === "string" || data["slack_type"] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `slack_type` to be a primitive type in the JSON string but got " + data["slack_type"]);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
if (data["bearer"] && !(typeof data["bearer"] === "string" || data["bearer"] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `bearer` to be a primitive type in the JSON string but got " + data["bearer"]);
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
if (data["channel"] && !(typeof data["channel"] === "string" || data["channel"] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `channel` to be a primitive type in the JSON string but got " + data["channel"]);
|
|
126
|
+
}
|
|
127
|
+
// ensure the json data is a string
|
|
128
|
+
if (data["webhook_url"] && !(typeof data["webhook_url"] === "string" || data["webhook_url"] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `webhook_url` to be a primitive type in the JSON string but got " + data["webhook_url"]);
|
|
130
|
+
}
|
|
131
|
+
// ensure the json data is a string
|
|
132
|
+
if (data["text"] && !(typeof data["text"] === "string" || data["text"] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data["text"]);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data["blocks"] && !(typeof data["blocks"] === "string" || data["blocks"] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `blocks` to be a primitive type in the JSON string but got " + data["blocks"]);
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
}]);
|
|
142
|
+
return Slack;
|
|
143
|
+
}();
|
|
144
|
+
/**
|
|
145
|
+
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
146
|
+
* @member {Array.<String>} fleets
|
|
147
|
+
*/
|
|
148
|
+
Slack.prototype["fleets"] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @member {module:model/HttpFilter} filter
|
|
152
|
+
*/
|
|
153
|
+
Slack.prototype["filter"] = undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @member {module:model/SnowflakeTransform} transform
|
|
157
|
+
*/
|
|
158
|
+
Slack.prototype["transform"] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Minimum time between requests in Miliseconds
|
|
162
|
+
* @member {Number} throttle_ms
|
|
163
|
+
*/
|
|
164
|
+
Slack.prototype["throttle_ms"] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Timeout in seconds for each request
|
|
168
|
+
* @member {Number} timeout
|
|
169
|
+
* @default 15
|
|
170
|
+
*/
|
|
171
|
+
Slack.prototype["timeout"] = 15;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The type of Slack message. Must be one of \"slack-bearer\" for Bearer Token or \"slack-webhook\" for Webhook messages
|
|
175
|
+
* @member {String} slack_type
|
|
176
|
+
*/
|
|
177
|
+
Slack.prototype["slack_type"] = undefined;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The Bearer Token for Slack messaging, if the \"slack-bearer\" type is selected
|
|
181
|
+
* @member {String} bearer
|
|
182
|
+
*/
|
|
183
|
+
Slack.prototype["bearer"] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The Channel ID for Bearer Token method, if the \"slack-bearer\" type is selected
|
|
187
|
+
* @member {String} channel
|
|
188
|
+
*/
|
|
189
|
+
Slack.prototype["channel"] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The Webhook URL for Slack Messaging if the \"slack-webhook\" type is selected
|
|
193
|
+
* @member {String} webhook_url
|
|
194
|
+
*/
|
|
195
|
+
Slack.prototype["webhook_url"] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The simple text message to be sent, if the blocks message field is not in use. Placeholders are available for this field.
|
|
199
|
+
* @member {String} text
|
|
200
|
+
*/
|
|
201
|
+
Slack.prototype["text"] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The Blocks message to be sent. If populated, this field overrides the text field within the Slack Messaging API. Placeholders are available for this field.
|
|
205
|
+
* @member {String} blocks
|
|
206
|
+
*/
|
|
207
|
+
Slack.prototype["blocks"] = undefined;
|
|
208
|
+
var _default = Slack;
|
|
209
|
+
exports["default"] = _default;
|
package/dist/model/Snowflake.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
/**
|
|
16
16
|
* The SnowflakeTransform model module.
|
|
17
17
|
* @module model/SnowflakeTransform
|
|
18
|
-
* @version 1.0.
|
|
18
|
+
* @version 1.0.18
|
|
19
19
|
*/
|
|
20
20
|
var SnowflakeTransform = /*#__PURE__*/function () {
|
|
21
21
|
/**
|
package/dist/model/Thingworx.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
/**
|
|
16
16
|
* The TowerLocation model module.
|
|
17
17
|
* @module model/TowerLocation
|
|
18
|
-
* @version 1.0.
|
|
18
|
+
* @version 1.0.18
|
|
19
19
|
*/
|
|
20
20
|
var TowerLocation = /*#__PURE__*/function () {
|
|
21
21
|
/**
|
package/dist/model/Twilio.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
/**
|
|
16
16
|
* The UpdateFleetRequest model module.
|
|
17
17
|
* @module model/UpdateFleetRequest
|
|
18
|
-
* @version 1.0.
|
|
18
|
+
* @version 1.0.18
|
|
19
19
|
*/
|
|
20
20
|
var UpdateFleetRequest = /*#__PURE__*/function () {
|
|
21
21
|
/**
|