@blues-inc/notehub-js 1.0.34 → 1.0.35-beta.2
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 +236 -222
- package/dist/ApiClient.js +156 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/ApiAccessApi.js +161 -0
- package/dist/api/AuthorizationApi.js +16 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +351 -351
- package/dist/api/EventApi.js +122 -122
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +355 -355
- package/dist/api/RepositoryApi.js +103 -103
- package/dist/api/RouteApi.js +85 -82
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +28 -7
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/ApiKey.js +145 -0
- package/dist/model/Aws.js +65 -65
- package/dist/model/Azure.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +126 -125
- 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/DataSet.js +30 -29
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +102 -101
- package/dist/model/DeviceDfuHistory.js +20 -19
- 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/DeviceDfuStatusCurrent.js +32 -32
- 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/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +27 -27
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +16 -16
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
- package/dist/model/GetProjectFleets200Response.js +12 -11
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectProducts200Response.js +10 -9
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/Google.js +33 -33
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +35 -35
- package/dist/model/HttpFilter.js +19 -19
- package/dist/model/HttpTransform.js +20 -20
- 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 +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +45 -46
- package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/Proxy.js +24 -24
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/QuestionDataResponseLineChart.js +39 -39
- package/dist/model/QuestionDataResponseMap.js +16 -16
- package/dist/model/Radresponder.js +25 -25
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/{GetRouteLogsByRoute200ResponseInner.js → RouteLog.js} +52 -52
- package/dist/model/SchemaProperty.js +40 -38
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/SnowflakeTransform.js +12 -12
- package/dist/model/Thingworx.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/Twilio.js +43 -43
- package/dist/model/UpdateApiKeyRequest.js +111 -0
- package/dist/model/UpdateFleetRequest.js +22 -22
- package/dist/model/UploadMetadata.js +59 -59
- package/dist/model/UserDbRoute.js +25 -25
- 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
|
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
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); } /**
|
|
15
15
|
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
17
|
*
|
|
18
18
|
* The version of the OpenAPI document: 1.2.0
|
|
19
19
|
* Contact: engineering@blues.io
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The AlertNotificationsInner model module.
|
|
28
28
|
* @module model/AlertNotificationsInner
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.35-beta.2
|
|
30
30
|
*/
|
|
31
31
|
var AlertNotificationsInner = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,14 +59,14 @@ var AlertNotificationsInner = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new AlertNotificationsInner();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty('notification_type')) {
|
|
63
|
+
obj['notification_type'] = _ApiClient["default"].convertToType(data['notification_type'], 'String');
|
|
64
64
|
}
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty('status')) {
|
|
66
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'Number');
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty('recipients')) {
|
|
69
|
+
obj['recipients'] = _ApiClient["default"].convertToType(data['recipients'], 'String');
|
|
70
70
|
}
|
|
71
71
|
} else if (data === null) {
|
|
72
72
|
return null;
|
|
@@ -83,12 +83,12 @@ var AlertNotificationsInner = /*#__PURE__*/function () {
|
|
|
83
83
|
key: "validateJSON",
|
|
84
84
|
value: function validateJSON(data) {
|
|
85
85
|
// ensure the json data is a string
|
|
86
|
-
if (data[
|
|
87
|
-
throw new Error("Expected the field `notification_type` to be a primitive type in the JSON string but got " + data[
|
|
86
|
+
if (data['notification_type'] && !(typeof data['notification_type'] === 'string' || data['notification_type'] instanceof String)) {
|
|
87
|
+
throw new Error("Expected the field `notification_type` to be a primitive type in the JSON string but got " + data['notification_type']);
|
|
88
88
|
}
|
|
89
89
|
// ensure the json data is a string
|
|
90
|
-
if (data[
|
|
91
|
-
throw new Error("Expected the field `recipients` to be a primitive type in the JSON string but got " + data[
|
|
90
|
+
if (data['recipients'] && !(typeof data['recipients'] === 'string' || data['recipients'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `recipients` to be a primitive type in the JSON string but got " + data['recipients']);
|
|
92
92
|
}
|
|
93
93
|
return true;
|
|
94
94
|
}
|
|
@@ -98,35 +98,35 @@ var AlertNotificationsInner = /*#__PURE__*/function () {
|
|
|
98
98
|
* The type of notification
|
|
99
99
|
* @member {module:model/AlertNotificationsInner.NotificationTypeEnum} notification_type
|
|
100
100
|
*/
|
|
101
|
-
AlertNotificationsInner.prototype[
|
|
101
|
+
AlertNotificationsInner.prototype['notification_type'] = undefined;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* The status of the notification
|
|
105
105
|
* @member {Number} status
|
|
106
106
|
*/
|
|
107
|
-
AlertNotificationsInner.prototype[
|
|
107
|
+
AlertNotificationsInner.prototype['status'] = undefined;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* The recipients of the notification
|
|
111
111
|
* @member {String} recipients
|
|
112
112
|
*/
|
|
113
|
-
AlertNotificationsInner.prototype[
|
|
113
|
+
AlertNotificationsInner.prototype['recipients'] = undefined;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Allowed values for the <code>notification_type</code> property.
|
|
117
117
|
* @enum {String}
|
|
118
118
|
* @readonly
|
|
119
119
|
*/
|
|
120
|
-
AlertNotificationsInner[
|
|
120
|
+
AlertNotificationsInner['NotificationTypeEnum'] = {
|
|
121
121
|
/**
|
|
122
122
|
* value: "email"
|
|
123
123
|
* @const
|
|
124
124
|
*/
|
|
125
|
-
email: "email",
|
|
125
|
+
"email": "email",
|
|
126
126
|
/**
|
|
127
127
|
* value: "slack"
|
|
128
128
|
* @const
|
|
129
129
|
*/
|
|
130
|
-
slack: "slack"
|
|
130
|
+
"slack": "slack"
|
|
131
131
|
};
|
|
132
132
|
var _default = exports["default"] = AlertNotificationsInner;
|
|
@@ -0,0 +1,145 @@
|
|
|
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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); } /**
|
|
15
|
+
* Notehub API
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 1.2.0
|
|
19
|
+
* Contact: engineering@blues.io
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The ApiKey model module.
|
|
28
|
+
* @module model/ApiKey
|
|
29
|
+
* @version 1.0.35-beta.2
|
|
30
|
+
*/
|
|
31
|
+
var ApiKey = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ApiKey</code>.
|
|
34
|
+
* @alias module:model/ApiKey
|
|
35
|
+
*/
|
|
36
|
+
function ApiKey() {
|
|
37
|
+
_classCallCheck(this, ApiKey);
|
|
38
|
+
ApiKey.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(ApiKey, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>ApiKey</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/ApiKey} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/ApiKey} The populated <code>ApiKey</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new ApiKey();
|
|
62
|
+
if (data.hasOwnProperty('uid')) {
|
|
63
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('created_by_account_uid')) {
|
|
66
|
+
obj['created_by_account_uid'] = _ApiClient["default"].convertToType(data['created_by_account_uid'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('billing_account_uid')) {
|
|
69
|
+
obj['billing_account_uid'] = _ApiClient["default"].convertToType(data['billing_account_uid'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('expires_at')) {
|
|
72
|
+
obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('created_at')) {
|
|
75
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('last_used')) {
|
|
78
|
+
obj['last_used'] = _ApiClient["default"].convertToType(data['last_used'], 'Date');
|
|
79
|
+
}
|
|
80
|
+
} else if (data === null) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Validates the JSON data with respect to <code>ApiKey</code>.
|
|
88
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
89
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApiKey</code>.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "validateJSON",
|
|
93
|
+
value: function validateJSON(data) {
|
|
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
|
+
// ensure the json data is a string
|
|
99
|
+
if (data['created_by_account_uid'] && !(typeof data['created_by_account_uid'] === 'string' || data['created_by_account_uid'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `created_by_account_uid` to be a primitive type in the JSON string but got " + data['created_by_account_uid']);
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is a string
|
|
103
|
+
if (data['billing_account_uid'] && !(typeof data['billing_account_uid'] === 'string' || data['billing_account_uid'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `billing_account_uid` to be a primitive type in the JSON string but got " + data['billing_account_uid']);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}]);
|
|
109
|
+
}();
|
|
110
|
+
/**
|
|
111
|
+
* Unique and public identifier
|
|
112
|
+
* @member {String} uid
|
|
113
|
+
*/
|
|
114
|
+
ApiKey.prototype['uid'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The user that created this key
|
|
118
|
+
* @member {String} created_by_account_uid
|
|
119
|
+
*/
|
|
120
|
+
ApiKey.prototype['created_by_account_uid'] = undefined;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Optional billing account for keys defined at the billing account level
|
|
124
|
+
* @member {String} billing_account_uid
|
|
125
|
+
*/
|
|
126
|
+
ApiKey.prototype['billing_account_uid'] = undefined;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* When the key expires
|
|
130
|
+
* @member {Date} expires_at
|
|
131
|
+
*/
|
|
132
|
+
ApiKey.prototype['expires_at'] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* When the key was created
|
|
136
|
+
* @member {Date} created_at
|
|
137
|
+
*/
|
|
138
|
+
ApiKey.prototype['created_at'] = undefined;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* When it was last used, if ever
|
|
142
|
+
* @member {Date} last_used
|
|
143
|
+
*/
|
|
144
|
+
ApiKey.prototype['last_used'] = undefined;
|
|
145
|
+
var _default = exports["default"] = ApiKey;
|
package/dist/model/Aws.js
CHANGED
|
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
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); } /**
|
|
17
17
|
* Notehub API
|
|
18
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
18
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
19
19
|
*
|
|
20
20
|
* The version of the OpenAPI document: 1.2.0
|
|
21
21
|
* Contact: engineering@blues.io
|
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
/**
|
|
29
29
|
* The Aws model module.
|
|
30
30
|
* @module model/Aws
|
|
31
|
-
* @version 1.0.
|
|
31
|
+
* @version 1.0.35-beta.2
|
|
32
32
|
*/
|
|
33
33
|
var Aws = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -62,49 +62,49 @@ var Aws = /*#__PURE__*/function () {
|
|
|
62
62
|
value: function constructFromObject(data, obj) {
|
|
63
63
|
if (data) {
|
|
64
64
|
obj = obj || new Aws();
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty('fleets')) {
|
|
66
|
+
obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty('filter')) {
|
|
69
|
+
obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty('transform')) {
|
|
72
|
+
obj['transform'] = _HttpTransform["default"].constructFromObject(data['transform']);
|
|
73
73
|
}
|
|
74
|
-
if (data.hasOwnProperty(
|
|
75
|
-
obj[
|
|
74
|
+
if (data.hasOwnProperty('throttle_ms')) {
|
|
75
|
+
obj['throttle_ms'] = _ApiClient["default"].convertToType(data['throttle_ms'], 'Number');
|
|
76
76
|
}
|
|
77
|
-
if (data.hasOwnProperty(
|
|
78
|
-
obj[
|
|
77
|
+
if (data.hasOwnProperty('url')) {
|
|
78
|
+
obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
|
|
79
79
|
}
|
|
80
|
-
if (data.hasOwnProperty(
|
|
81
|
-
obj[
|
|
82
|
-
String:
|
|
80
|
+
if (data.hasOwnProperty('http_headers')) {
|
|
81
|
+
obj['http_headers'] = _ApiClient["default"].convertToType(data['http_headers'], {
|
|
82
|
+
'String': 'String'
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty('disable_http_headers')) {
|
|
86
|
+
obj['disable_http_headers'] = _ApiClient["default"].convertToType(data['disable_http_headers'], 'Boolean');
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty('timeout')) {
|
|
89
|
+
obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty('region')) {
|
|
92
|
+
obj['region'] = _ApiClient["default"].convertToType(data['region'], 'String');
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty('access_key_id')) {
|
|
95
|
+
obj['access_key_id'] = _ApiClient["default"].convertToType(data['access_key_id'], 'String');
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty('access_key_secret')) {
|
|
98
|
+
obj['access_key_secret'] = _ApiClient["default"].convertToType(data['access_key_secret'], 'String');
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty('message_group_id')) {
|
|
101
|
+
obj['message_group_id'] = _ApiClient["default"].convertToType(data['message_group_id'], 'String');
|
|
102
102
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty('message_deduplication_id')) {
|
|
104
|
+
obj['message_deduplication_id'] = _ApiClient["default"].convertToType(data['message_deduplication_id'], 'String');
|
|
105
105
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty('channel')) {
|
|
107
|
+
obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'String');
|
|
108
108
|
}
|
|
109
109
|
} else if (data === null) {
|
|
110
110
|
return null;
|
|
@@ -121,46 +121,46 @@ var Aws = /*#__PURE__*/function () {
|
|
|
121
121
|
key: "validateJSON",
|
|
122
122
|
value: function validateJSON(data) {
|
|
123
123
|
// ensure the json data is an array
|
|
124
|
-
if (!Array.isArray(data[
|
|
125
|
-
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data[
|
|
124
|
+
if (!Array.isArray(data['fleets'])) {
|
|
125
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
|
|
126
126
|
}
|
|
127
127
|
// validate the optional field `filter`
|
|
128
|
-
if (data[
|
|
128
|
+
if (data['filter']) {
|
|
129
129
|
// data not null
|
|
130
|
-
_HttpFilter["default"].validateJSON(data[
|
|
130
|
+
_HttpFilter["default"].validateJSON(data['filter']);
|
|
131
131
|
}
|
|
132
132
|
// validate the optional field `transform`
|
|
133
|
-
if (data[
|
|
133
|
+
if (data['transform']) {
|
|
134
134
|
// data not null
|
|
135
|
-
_HttpTransform["default"].validateJSON(data[
|
|
135
|
+
_HttpTransform["default"].validateJSON(data['transform']);
|
|
136
136
|
}
|
|
137
137
|
// ensure the json data is a string
|
|
138
|
-
if (data[
|
|
139
|
-
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data[
|
|
138
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
140
140
|
}
|
|
141
141
|
// ensure the json data is a string
|
|
142
|
-
if (data[
|
|
143
|
-
throw new Error("Expected the field `region` to be a primitive type in the JSON string but got " + data[
|
|
142
|
+
if (data['region'] && !(typeof data['region'] === 'string' || data['region'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `region` to be a primitive type in the JSON string but got " + data['region']);
|
|
144
144
|
}
|
|
145
145
|
// ensure the json data is a string
|
|
146
|
-
if (data[
|
|
147
|
-
throw new Error("Expected the field `access_key_id` to be a primitive type in the JSON string but got " + data[
|
|
146
|
+
if (data['access_key_id'] && !(typeof data['access_key_id'] === 'string' || data['access_key_id'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `access_key_id` to be a primitive type in the JSON string but got " + data['access_key_id']);
|
|
148
148
|
}
|
|
149
149
|
// ensure the json data is a string
|
|
150
|
-
if (data[
|
|
151
|
-
throw new Error("Expected the field `access_key_secret` to be a primitive type in the JSON string but got " + data[
|
|
150
|
+
if (data['access_key_secret'] && !(typeof data['access_key_secret'] === 'string' || data['access_key_secret'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `access_key_secret` to be a primitive type in the JSON string but got " + data['access_key_secret']);
|
|
152
152
|
}
|
|
153
153
|
// ensure the json data is a string
|
|
154
|
-
if (data[
|
|
155
|
-
throw new Error("Expected the field `message_group_id` to be a primitive type in the JSON string but got " + data[
|
|
154
|
+
if (data['message_group_id'] && !(typeof data['message_group_id'] === 'string' || data['message_group_id'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `message_group_id` to be a primitive type in the JSON string but got " + data['message_group_id']);
|
|
156
156
|
}
|
|
157
157
|
// ensure the json data is a string
|
|
158
|
-
if (data[
|
|
159
|
-
throw new Error("Expected the field `message_deduplication_id` to be a primitive type in the JSON string but got " + data[
|
|
158
|
+
if (data['message_deduplication_id'] && !(typeof data['message_deduplication_id'] === 'string' || data['message_deduplication_id'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `message_deduplication_id` to be a primitive type in the JSON string but got " + data['message_deduplication_id']);
|
|
160
160
|
}
|
|
161
161
|
// ensure the json data is a string
|
|
162
|
-
if (data[
|
|
163
|
-
throw new Error("Expected the field `channel` to be a primitive type in the JSON string but got " + data[
|
|
162
|
+
if (data['channel'] && !(typeof data['channel'] === 'string' || data['channel'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `channel` to be a primitive type in the JSON string but got " + data['channel']);
|
|
164
164
|
}
|
|
165
165
|
return true;
|
|
166
166
|
}
|
|
@@ -170,74 +170,74 @@ var Aws = /*#__PURE__*/function () {
|
|
|
170
170
|
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
171
171
|
* @member {Array.<String>} fleets
|
|
172
172
|
*/
|
|
173
|
-
Aws.prototype[
|
|
173
|
+
Aws.prototype['fleets'] = undefined;
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* @member {module:model/HttpFilter} filter
|
|
177
177
|
*/
|
|
178
|
-
Aws.prototype[
|
|
178
|
+
Aws.prototype['filter'] = undefined;
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
181
|
* @member {module:model/HttpTransform} transform
|
|
182
182
|
*/
|
|
183
|
-
Aws.prototype[
|
|
183
|
+
Aws.prototype['transform'] = undefined;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* @member {Number} throttle_ms
|
|
187
187
|
*/
|
|
188
|
-
Aws.prototype[
|
|
188
|
+
Aws.prototype['throttle_ms'] = undefined;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* @member {String} url
|
|
192
192
|
*/
|
|
193
|
-
Aws.prototype[
|
|
193
|
+
Aws.prototype['url'] = undefined;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* @member {Object.<String, String>} http_headers
|
|
197
197
|
*/
|
|
198
|
-
Aws.prototype[
|
|
198
|
+
Aws.prototype['http_headers'] = undefined;
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
201
|
* @member {Boolean} disable_http_headers
|
|
202
202
|
* @default false
|
|
203
203
|
*/
|
|
204
|
-
Aws.prototype[
|
|
204
|
+
Aws.prototype['disable_http_headers'] = false;
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* Timeout in seconds for each request
|
|
208
208
|
* @member {Number} timeout
|
|
209
209
|
* @default 15
|
|
210
210
|
*/
|
|
211
|
-
Aws.prototype[
|
|
211
|
+
Aws.prototype['timeout'] = 15;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* @member {String} region
|
|
215
215
|
*/
|
|
216
|
-
Aws.prototype[
|
|
216
|
+
Aws.prototype['region'] = undefined;
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* @member {String} access_key_id
|
|
220
220
|
*/
|
|
221
|
-
Aws.prototype[
|
|
221
|
+
Aws.prototype['access_key_id'] = undefined;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* This value is input-only and will be omitted from the response and replaced with a placeholder
|
|
225
225
|
* @member {String} access_key_secret
|
|
226
226
|
*/
|
|
227
|
-
Aws.prototype[
|
|
227
|
+
Aws.prototype['access_key_secret'] = undefined;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* @member {String} message_group_id
|
|
231
231
|
*/
|
|
232
|
-
Aws.prototype[
|
|
232
|
+
Aws.prototype['message_group_id'] = undefined;
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* @member {String} message_deduplication_id
|
|
236
236
|
*/
|
|
237
|
-
Aws.prototype[
|
|
237
|
+
Aws.prototype['message_deduplication_id'] = undefined;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
240
|
* @member {String} channel
|
|
241
241
|
*/
|
|
242
|
-
Aws.prototype[
|
|
242
|
+
Aws.prototype['channel'] = undefined;
|
|
243
243
|
var _default = exports["default"] = Aws;
|