@blues-inc/notehub-js 1.0.4
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 +297 -0
- package/dist/ApiClient.js +699 -0
- package/dist/api/AuthorizationApi.js +74 -0
- package/dist/api/BillingAccountApi.js +68 -0
- package/dist/api/DeviceApi.js +784 -0
- package/dist/api/DevicesApi.js +293 -0
- package/dist/api/EnvironmentVariablesApi.js +567 -0
- package/dist/api/EventApi.js +284 -0
- package/dist/api/FilesApi.js +193 -0
- package/dist/api/FleetApi.js +715 -0
- package/dist/api/NotesApi.js +435 -0
- package/dist/api/ProductApi.js +163 -0
- package/dist/api/ProjectApi.js +716 -0
- package/dist/api/RouteApi.js +266 -0
- package/dist/index.js +566 -0
- package/dist/model/Aws.js +233 -0
- package/dist/model/Azure.js +166 -0
- package/dist/model/BillingAccount.js +130 -0
- package/dist/model/BillingAccountRole.js +42 -0
- package/dist/model/Body.js +78 -0
- package/dist/model/Contact.js +118 -0
- package/dist/model/CreateFleetRequest.js +83 -0
- package/dist/model/CreateProductRequest.js +142 -0
- package/dist/model/CreateProjectRequest.js +119 -0
- package/dist/model/DFUEnv.js +97 -0
- package/dist/model/DFUState.js +276 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +106 -0
- package/dist/model/Device.js +267 -0
- package/dist/model/DeviceSession.js +537 -0
- package/dist/model/DeviceTowerInfo.js +102 -0
- package/dist/model/DeviceUsage.js +150 -0
- package/dist/model/EnvironmentVariables.js +103 -0
- package/dist/model/Error.js +164 -0
- package/dist/model/Event.js +676 -0
- package/dist/model/Fleet.js +129 -0
- package/dist/model/GetBillingAccounts200Response.js +103 -0
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +117 -0
- package/dist/model/GetDeviceHealthLog200Response.js +123 -0
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +125 -0
- package/dist/model/GetDeviceLatest200Response.js +104 -0
- package/dist/model/GetDevicePublicKey200Response.js +119 -0
- package/dist/model/GetDeviceSessions200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +94 -0
- package/dist/model/GetProjectDevices200Response.js +133 -0
- package/dist/model/GetProjectEvents200Response.js +149 -0
- package/dist/model/GetProjectEventsByCursor200Response.js +149 -0
- package/dist/model/GetProjectFleets200Response.js +123 -0
- package/dist/model/GetProjectMembers200Response.js +123 -0
- package/dist/model/GetProjectProducts200Response.js +103 -0
- package/dist/model/GetProjects200Response.js +103 -0
- package/dist/model/Google.js +142 -0
- package/dist/model/HandleNoteChanges200Response.js +97 -0
- package/dist/model/HandleNoteGet200Response.js +101 -0
- package/dist/model/HandleNoteSignal200Response.js +79 -0
- package/dist/model/HandleNotefileChanges200Response.js +97 -0
- package/dist/model/HandleNotefileChangesPending200Response.js +106 -0
- package/dist/model/HandleNotefileDeleteRequest.js +83 -0
- package/dist/model/Http.js +163 -0
- package/dist/model/HttpFilter.js +128 -0
- package/dist/model/HttpTransform.js +139 -0
- package/dist/model/Location.js +167 -0
- package/dist/model/Login200Response.js +82 -0
- package/dist/model/LoginRequest.js +94 -0
- package/dist/model/Mqtt.js +240 -0
- package/dist/model/Note.js +90 -0
- package/dist/model/Product.js +141 -0
- package/dist/model/Project.js +165 -0
- package/dist/model/ProjectMember.js +131 -0
- package/dist/model/Proxy.js +128 -0
- package/dist/model/PutDeviceFleetsRequest.js +106 -0
- package/dist/model/Radresponder.js +130 -0
- package/dist/model/Role.js +43 -0
- package/dist/model/Route.js +245 -0
- package/dist/model/RouteSchema.js +427 -0
- package/dist/model/Snowflake.js +185 -0
- package/dist/model/SnowflakeTransform.js +97 -0
- package/dist/model/Thingworx.js +154 -0
- package/dist/model/TowerLocation.js +204 -0
- package/dist/model/Twilio.js +181 -0
- package/dist/model/UpdateFleetRequest.js +109 -0
- package/dist/model/UserDbRoute.js +131 -0
- package/package.json +49 -0
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
/**
|
|
17
|
+
* The Twilio model module.
|
|
18
|
+
* @module model/Twilio
|
|
19
|
+
* @version 1.0.4
|
|
20
|
+
*/
|
|
21
|
+
var Twilio = /*#__PURE__*/function () {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new <code>Twilio</code>.
|
|
24
|
+
* Route settings specific to Twilio routes. Only used for Twilio route types
|
|
25
|
+
* @alias module:model/Twilio
|
|
26
|
+
*/
|
|
27
|
+
function Twilio() {
|
|
28
|
+
_classCallCheck(this, Twilio);
|
|
29
|
+
Twilio.initialize(this);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initializes the fields of this object.
|
|
34
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
35
|
+
* Only for internal use.
|
|
36
|
+
*/
|
|
37
|
+
_createClass(Twilio, null, [{
|
|
38
|
+
key: "initialize",
|
|
39
|
+
value: function initialize(obj) {}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Constructs a <code>Twilio</code> from a plain JavaScript object, optionally creating a new instance.
|
|
43
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
44
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
45
|
+
* @param {module:model/Twilio} obj Optional instance to populate.
|
|
46
|
+
* @return {module:model/Twilio} The populated <code>Twilio</code> instance.
|
|
47
|
+
*/
|
|
48
|
+
}, {
|
|
49
|
+
key: "constructFromObject",
|
|
50
|
+
value: function constructFromObject(data, obj) {
|
|
51
|
+
if (data) {
|
|
52
|
+
obj = obj || new Twilio();
|
|
53
|
+
if (data.hasOwnProperty('fleets')) {
|
|
54
|
+
obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
|
|
55
|
+
}
|
|
56
|
+
if (data.hasOwnProperty('filter')) {
|
|
57
|
+
obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
|
|
58
|
+
}
|
|
59
|
+
if (data.hasOwnProperty('timeout')) {
|
|
60
|
+
obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('account_sid')) {
|
|
63
|
+
obj['account_sid'] = _ApiClient["default"].convertToType(data['account_sid'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('auth_token')) {
|
|
66
|
+
obj['auth_token'] = _ApiClient["default"].convertToType(data['auth_token'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('to')) {
|
|
69
|
+
obj['to'] = _ApiClient["default"].convertToType(data['to'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('from')) {
|
|
72
|
+
obj['from'] = _ApiClient["default"].convertToType(data['from'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('message')) {
|
|
75
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('throttle_ms')) {
|
|
78
|
+
obj['throttle_ms'] = _ApiClient["default"].convertToType(data['throttle_ms'], 'Number');
|
|
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>Twilio</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>Twilio</code>.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "validateJSON",
|
|
93
|
+
value: function validateJSON(data) {
|
|
94
|
+
// ensure the json data is an array
|
|
95
|
+
if (!Array.isArray(data['fleets'])) {
|
|
96
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
|
|
97
|
+
}
|
|
98
|
+
// validate the optional field `filter`
|
|
99
|
+
if (data['filter']) {
|
|
100
|
+
// data not null
|
|
101
|
+
_HttpFilter["default"].validateJSON(data['filter']);
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
if (data['account_sid'] && !(typeof data['account_sid'] === 'string' || data['account_sid'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `account_sid` to be a primitive type in the JSON string but got " + data['account_sid']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['auth_token'] && !(typeof data['auth_token'] === 'string' || data['auth_token'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `auth_token` to be a primitive type in the JSON string but got " + data['auth_token']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is a string
|
|
112
|
+
if (data['to'] && !(typeof data['to'] === 'string' || data['to'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `to` to be a primitive type in the JSON string but got " + data['to']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['from'] && !(typeof data['from'] === 'string' || data['from'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `from` to be a primitive type in the JSON string but got " + data['from']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}]);
|
|
126
|
+
return Twilio;
|
|
127
|
+
}();
|
|
128
|
+
/**
|
|
129
|
+
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
130
|
+
* @member {Array.<String>} fleets
|
|
131
|
+
*/
|
|
132
|
+
Twilio.prototype['fleets'] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @member {module:model/HttpFilter} filter
|
|
136
|
+
*/
|
|
137
|
+
Twilio.prototype['filter'] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Timeout in seconds for each request
|
|
141
|
+
* @member {Number} timeout
|
|
142
|
+
* @default 15
|
|
143
|
+
*/
|
|
144
|
+
Twilio.prototype['timeout'] = 15;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Twilio Account SID
|
|
148
|
+
* @member {String} account_sid
|
|
149
|
+
*/
|
|
150
|
+
Twilio.prototype['account_sid'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Twilio Auth Token
|
|
154
|
+
* @member {String} auth_token
|
|
155
|
+
*/
|
|
156
|
+
Twilio.prototype['auth_token'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Phone number to send SMS to, leave blank to use notefile, must use E.164 format
|
|
160
|
+
* @member {String} to
|
|
161
|
+
*/
|
|
162
|
+
Twilio.prototype['to'] = undefined;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Phone number to send SMS from, leave blank to use notefile, must use E.164 format
|
|
166
|
+
* @member {String} from
|
|
167
|
+
*/
|
|
168
|
+
Twilio.prototype['from'] = undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Message to send, leave blank to use notefile.
|
|
172
|
+
* @member {String} message
|
|
173
|
+
*/
|
|
174
|
+
Twilio.prototype['message'] = undefined;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @member {Number} throttle_ms
|
|
178
|
+
*/
|
|
179
|
+
Twilio.prototype['throttle_ms'] = undefined;
|
|
180
|
+
var _default = Twilio;
|
|
181
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
15
|
+
/**
|
|
16
|
+
* The UpdateFleetRequest model module.
|
|
17
|
+
* @module model/UpdateFleetRequest
|
|
18
|
+
* @version 1.0.4
|
|
19
|
+
*/
|
|
20
|
+
var UpdateFleetRequest = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>UpdateFleetRequest</code>.
|
|
23
|
+
* @alias module:model/UpdateFleetRequest
|
|
24
|
+
*/
|
|
25
|
+
function UpdateFleetRequest() {
|
|
26
|
+
_classCallCheck(this, UpdateFleetRequest);
|
|
27
|
+
UpdateFleetRequest.initialize(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Initializes the fields of this object.
|
|
32
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
+
* Only for internal use.
|
|
34
|
+
*/
|
|
35
|
+
_createClass(UpdateFleetRequest, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>UpdateFleetRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
41
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
42
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
43
|
+
* @param {module:model/UpdateFleetRequest} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/UpdateFleetRequest} The populated <code>UpdateFleetRequest</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new UpdateFleetRequest();
|
|
51
|
+
if (data.hasOwnProperty('label')) {
|
|
52
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty('addDevices')) {
|
|
55
|
+
obj['addDevices'] = _ApiClient["default"].convertToType(data['addDevices'], ['String']);
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty('removeDevices')) {
|
|
58
|
+
obj['removeDevices'] = _ApiClient["default"].convertToType(data['removeDevices'], ['String']);
|
|
59
|
+
}
|
|
60
|
+
} else if (data === null) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>UpdateFleetRequest</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateFleetRequest</code>.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "validateJSON",
|
|
73
|
+
value: function validateJSON(data) {
|
|
74
|
+
// ensure the json data is a string
|
|
75
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
76
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
77
|
+
}
|
|
78
|
+
// ensure the json data is an array
|
|
79
|
+
if (!Array.isArray(data['addDevices'])) {
|
|
80
|
+
throw new Error("Expected the field `addDevices` to be an array in the JSON data but got " + data['addDevices']);
|
|
81
|
+
}
|
|
82
|
+
// ensure the json data is an array
|
|
83
|
+
if (!Array.isArray(data['removeDevices'])) {
|
|
84
|
+
throw new Error("Expected the field `removeDevices` to be an array in the JSON data but got " + data['removeDevices']);
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}]);
|
|
89
|
+
return UpdateFleetRequest;
|
|
90
|
+
}();
|
|
91
|
+
/**
|
|
92
|
+
* The label for the Fleet.
|
|
93
|
+
* @member {String} label
|
|
94
|
+
*/
|
|
95
|
+
UpdateFleetRequest.prototype['label'] = undefined;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* List of DeviceUIDs to add to fleet
|
|
99
|
+
* @member {Array.<String>} addDevices
|
|
100
|
+
*/
|
|
101
|
+
UpdateFleetRequest.prototype['addDevices'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* List of DeviceUIDs to remove from fleet
|
|
105
|
+
* @member {Array.<String>} removeDevices
|
|
106
|
+
*/
|
|
107
|
+
UpdateFleetRequest.prototype['removeDevices'] = undefined;
|
|
108
|
+
var _default = UpdateFleetRequest;
|
|
109
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,131 @@
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
15
|
+
/**
|
|
16
|
+
* The UserDbRoute model module.
|
|
17
|
+
* @module model/UserDbRoute
|
|
18
|
+
* @version 1.0.4
|
|
19
|
+
*/
|
|
20
|
+
var UserDbRoute = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>UserDbRoute</code>.
|
|
23
|
+
* @alias module:model/UserDbRoute
|
|
24
|
+
*/
|
|
25
|
+
function UserDbRoute() {
|
|
26
|
+
_classCallCheck(this, UserDbRoute);
|
|
27
|
+
UserDbRoute.initialize(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Initializes the fields of this object.
|
|
32
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
+
* Only for internal use.
|
|
34
|
+
*/
|
|
35
|
+
_createClass(UserDbRoute, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>UserDbRoute</code> from a plain JavaScript object, optionally creating a new instance.
|
|
41
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
42
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
43
|
+
* @param {module:model/UserDbRoute} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/UserDbRoute} The populated <code>UserDbRoute</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new UserDbRoute();
|
|
51
|
+
if (data.hasOwnProperty('uid')) {
|
|
52
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty('label')) {
|
|
55
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty('type')) {
|
|
58
|
+
obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty('modified')) {
|
|
61
|
+
obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('disabled')) {
|
|
64
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
} else if (data === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>UserDbRoute</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>UserDbRoute</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// ensure the json data is a string
|
|
81
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
82
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
83
|
+
}
|
|
84
|
+
// ensure the json data is a string
|
|
85
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
86
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
87
|
+
}
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['modified'] && !(typeof data['modified'] === 'string' || data['modified'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `modified` to be a primitive type in the JSON string but got " + data['modified']);
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
}]);
|
|
99
|
+
return UserDbRoute;
|
|
100
|
+
}();
|
|
101
|
+
/**
|
|
102
|
+
* @member {String} uid
|
|
103
|
+
* @default 'route:8d65a087d5d290ce5bdf03aeff2becc0'
|
|
104
|
+
*/
|
|
105
|
+
UserDbRoute.prototype['uid'] = 'route:8d65a087d5d290ce5bdf03aeff2becc0';
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @member {String} label
|
|
109
|
+
* @default 'success route'
|
|
110
|
+
*/
|
|
111
|
+
UserDbRoute.prototype['label'] = 'success route';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @member {String} type
|
|
115
|
+
* @default 'http'
|
|
116
|
+
*/
|
|
117
|
+
UserDbRoute.prototype['type'] = 'http';
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {String} modified
|
|
121
|
+
* @default '2020-03-09T17:58:37Z'
|
|
122
|
+
*/
|
|
123
|
+
UserDbRoute.prototype['modified'] = '2020-03-09T17:58:37Z';
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @member {Boolean} disabled
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
UserDbRoute.prototype['disabled'] = false;
|
|
130
|
+
var _default = UserDbRoute;
|
|
131
|
+
exports["default"] = _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blues-inc/notehub-js",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "The OpenAPI definition for the Notehub.io API. ",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "babel src -d dist",
|
|
9
|
+
"prepare": "npm run build",
|
|
10
|
+
"test": "mocha --require @babel/register --recursive"
|
|
11
|
+
},
|
|
12
|
+
"browser": {
|
|
13
|
+
"fs": false
|
|
14
|
+
},
|
|
15
|
+
"publishConfig":{
|
|
16
|
+
"registry":"https://registry.npmjs.org"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@babel/cli": "^7.0.0",
|
|
20
|
+
"superagent": "^5.3.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.0.0",
|
|
24
|
+
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
|
25
|
+
"@babel/plugin-proposal-decorators": "^7.0.0",
|
|
26
|
+
"@babel/plugin-proposal-do-expressions": "^7.0.0",
|
|
27
|
+
"@babel/plugin-proposal-export-default-from": "^7.0.0",
|
|
28
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
|
|
29
|
+
"@babel/plugin-proposal-function-bind": "^7.0.0",
|
|
30
|
+
"@babel/plugin-proposal-function-sent": "^7.0.0",
|
|
31
|
+
"@babel/plugin-proposal-json-strings": "^7.0.0",
|
|
32
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
|
|
33
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
|
|
34
|
+
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
|
|
35
|
+
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
|
|
36
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
|
|
37
|
+
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
|
|
38
|
+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
|
39
|
+
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
|
40
|
+
"@babel/preset-env": "^7.0.0",
|
|
41
|
+
"@babel/register": "^7.0.0",
|
|
42
|
+
"expect.js": "^0.3.1",
|
|
43
|
+
"mocha": "^8.0.1",
|
|
44
|
+
"sinon": "^7.2.0"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist"
|
|
48
|
+
]
|
|
49
|
+
}
|