files.com 1.2.249 → 1.2.251
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/_VERSION +1 -1
- package/docs/models/User.md +4 -1
- package/lib/Api.js +72 -71
- package/lib/Files.js +1 -1
- package/lib/isomorphic/File.node.js +5 -5
- package/lib/models/ActionNotificationExport.js +38 -38
- package/lib/models/ActionNotificationExportResult.js +14 -14
- package/lib/models/ApiKey.js +100 -100
- package/lib/models/ApiRequestLog.js +8 -8
- package/lib/models/App.js +8 -8
- package/lib/models/As2IncomingMessage.js +10 -10
- package/lib/models/As2OutgoingMessage.js +10 -10
- package/lib/models/As2Partner.js +101 -101
- package/lib/models/As2Station.js +81 -81
- package/lib/models/Automation.js +167 -167
- package/lib/models/AutomationLog.js +8 -8
- package/lib/models/AutomationRun.js +24 -24
- package/lib/models/BandwidthSnapshot.js +8 -8
- package/lib/models/Behavior.js +106 -106
- package/lib/models/Bundle.js +143 -143
- package/lib/models/BundleAction.js +10 -10
- package/lib/models/BundleDownload.js +12 -12
- package/lib/models/BundleNotification.js +69 -69
- package/lib/models/BundleRecipient.js +40 -40
- package/lib/models/BundleRegistration.js +12 -12
- package/lib/models/Clickwrap.js +79 -79
- package/lib/models/DnsRecord.js +8 -8
- package/lib/models/EmailIncomingMessage.js +8 -8
- package/lib/models/EmailLog.js +8 -8
- package/lib/models/ExavaultApiRequestLog.js +8 -8
- package/lib/models/ExternalEvent.js +36 -36
- package/lib/models/File.js +269 -269
- package/lib/models/FileComment.js +70 -70
- package/lib/models/FileCommentReaction.js +34 -34
- package/lib/models/FileMigration.js +10 -10
- package/lib/models/FileMigrationLog.js +8 -8
- package/lib/models/Folder.js +36 -36
- package/lib/models/FormFieldSet.js +71 -71
- package/lib/models/FtpActionLog.js +8 -8
- package/lib/models/GpgKey.js +81 -81
- package/lib/models/Group.js +83 -83
- package/lib/models/GroupUser.js +89 -89
- package/lib/models/History.js +88 -88
- package/lib/models/HistoryExport.js +64 -64
- package/lib/models/HistoryExportResult.js +14 -14
- package/lib/models/InboxRecipient.js +36 -36
- package/lib/models/InboxRegistration.js +10 -10
- package/lib/models/InboxUpload.js +8 -8
- package/lib/models/Invoice.js +18 -18
- package/lib/models/IpAddress.js +32 -32
- package/lib/models/Lock.js +51 -51
- package/lib/models/Message.js +100 -100
- package/lib/models/MessageComment.js +78 -78
- package/lib/models/MessageCommentReaction.js +54 -54
- package/lib/models/MessageReaction.js +54 -54
- package/lib/models/Notification.js +91 -91
- package/lib/models/OutboundConnectionLog.js +8 -8
- package/lib/models/Payment.js +18 -18
- package/lib/models/Permission.js +54 -54
- package/lib/models/Priority.js +14 -14
- package/lib/models/Project.js +70 -70
- package/lib/models/PublicHostingRequestLog.js +8 -8
- package/lib/models/PublicKey.js +78 -78
- package/lib/models/RemoteBandwidthSnapshot.js +8 -8
- package/lib/models/RemoteServer.js +362 -362
- package/lib/models/Request.js +60 -60
- package/lib/models/Restore.js +24 -24
- package/lib/models/Session.js +21 -21
- package/lib/models/SettingsChange.js +8 -8
- package/lib/models/SftpActionLog.js +8 -8
- package/lib/models/SftpHostKey.js +67 -67
- package/lib/models/ShareGroup.js +79 -79
- package/lib/models/SiemHttpDestination.js +158 -158
- package/lib/models/Site.js +150 -150
- package/lib/models/Snapshot.js +85 -85
- package/lib/models/SsoStrategy.js +32 -32
- package/lib/models/Style.js +48 -48
- package/lib/models/SyncLog.js +8 -8
- package/lib/models/UsageDailySnapshot.js +8 -8
- package/lib/models/UsageSnapshot.js +8 -8
- package/lib/models/User.js +223 -215
- package/lib/models/UserCipherUse.js +10 -10
- package/lib/models/UserLifecycleRule.js +92 -92
- package/lib/models/UserRequest.js +56 -56
- package/lib/models/UserSftpClientUse.js +10 -10
- package/lib/models/WebDavActionLog.js +8 -8
- package/lib/models/WebhookTest.js +24 -24
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/User.js +6 -0
|
@@ -93,31 +93,31 @@ _AutomationLog = AutomationLog;
|
|
|
93
93
|
options,
|
|
94
94
|
response,
|
|
95
95
|
_args = arguments;
|
|
96
|
-
return _regenerator.default.wrap(function
|
|
96
|
+
return _regenerator.default.wrap(function (_context) {
|
|
97
97
|
while (1) switch (_context.prev = _context.next) {
|
|
98
98
|
case 0:
|
|
99
99
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
100
100
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
101
101
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
102
|
-
_context.next =
|
|
102
|
+
_context.next = 1;
|
|
103
103
|
break;
|
|
104
104
|
}
|
|
105
105
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
106
|
-
case
|
|
106
|
+
case 1:
|
|
107
107
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
108
|
-
_context.next =
|
|
108
|
+
_context.next = 2;
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
112
|
-
case
|
|
113
|
-
_context.next =
|
|
112
|
+
case 2:
|
|
113
|
+
_context.next = 3;
|
|
114
114
|
return _Api.default.sendRequest('/automation_logs', 'GET', params, options);
|
|
115
|
-
case
|
|
115
|
+
case 3:
|
|
116
116
|
response = _context.sent;
|
|
117
117
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
118
118
|
return new _AutomationLog(obj, options);
|
|
119
119
|
})) || []);
|
|
120
|
-
case
|
|
120
|
+
case 4:
|
|
121
121
|
case "end":
|
|
122
122
|
return _context.stop();
|
|
123
123
|
}
|
|
@@ -111,49 +111,49 @@ _AutomationRun = AutomationRun;
|
|
|
111
111
|
options,
|
|
112
112
|
response,
|
|
113
113
|
_args = arguments;
|
|
114
|
-
return _regenerator.default.wrap(function
|
|
114
|
+
return _regenerator.default.wrap(function (_context) {
|
|
115
115
|
while (1) switch (_context.prev = _context.next) {
|
|
116
116
|
case 0:
|
|
117
117
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
118
118
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
119
119
|
if (params.automation_id) {
|
|
120
|
-
_context.next =
|
|
120
|
+
_context.next = 1;
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
throw new errors.MissingParameterError('Parameter missing: automation_id');
|
|
124
|
-
case
|
|
124
|
+
case 1:
|
|
125
125
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
126
|
-
_context.next =
|
|
126
|
+
_context.next = 2;
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
130
|
-
case
|
|
130
|
+
case 2:
|
|
131
131
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
132
|
-
_context.next =
|
|
132
|
+
_context.next = 3;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
135
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
136
|
-
case
|
|
136
|
+
case 3:
|
|
137
137
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
138
|
-
_context.next =
|
|
138
|
+
_context.next = 4;
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
141
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
142
|
-
case
|
|
142
|
+
case 4:
|
|
143
143
|
if (!(params.automation_id && !(0, _utils.isInt)(params.automation_id))) {
|
|
144
|
-
_context.next =
|
|
144
|
+
_context.next = 5;
|
|
145
145
|
break;
|
|
146
146
|
}
|
|
147
147
|
throw new errors.InvalidParameterError("Bad parameter: automation_id must be of type Int, received ".concat((0, _utils.getType)(params.automation_id)));
|
|
148
|
-
case
|
|
149
|
-
_context.next =
|
|
148
|
+
case 5:
|
|
149
|
+
_context.next = 6;
|
|
150
150
|
return _Api.default.sendRequest('/automation_runs', 'GET', params, options);
|
|
151
|
-
case
|
|
151
|
+
case 6:
|
|
152
152
|
response = _context.sent;
|
|
153
153
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
154
154
|
return new _AutomationRun(obj, options);
|
|
155
155
|
})) || []);
|
|
156
|
-
case
|
|
156
|
+
case 7:
|
|
157
157
|
case "end":
|
|
158
158
|
return _context.stop();
|
|
159
159
|
}
|
|
@@ -172,36 +172,36 @@ _AutomationRun = AutomationRun;
|
|
|
172
172
|
options,
|
|
173
173
|
response,
|
|
174
174
|
_args2 = arguments;
|
|
175
|
-
return _regenerator.default.wrap(function
|
|
175
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
176
176
|
while (1) switch (_context2.prev = _context2.next) {
|
|
177
177
|
case 0:
|
|
178
178
|
params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
179
179
|
options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
|
|
180
180
|
if ((0, _utils.isObject)(params)) {
|
|
181
|
-
_context2.next =
|
|
181
|
+
_context2.next = 1;
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
185
|
-
case
|
|
185
|
+
case 1:
|
|
186
186
|
params.id = id;
|
|
187
187
|
if (params.id) {
|
|
188
|
-
_context2.next =
|
|
188
|
+
_context2.next = 2;
|
|
189
189
|
break;
|
|
190
190
|
}
|
|
191
191
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
192
|
-
case
|
|
192
|
+
case 2:
|
|
193
193
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
194
|
-
_context2.next =
|
|
194
|
+
_context2.next = 3;
|
|
195
195
|
break;
|
|
196
196
|
}
|
|
197
197
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
198
|
-
case
|
|
199
|
-
_context2.next =
|
|
198
|
+
case 3:
|
|
199
|
+
_context2.next = 4;
|
|
200
200
|
return _Api.default.sendRequest("/automation_runs/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
201
|
-
case
|
|
201
|
+
case 4:
|
|
202
202
|
response = _context2.sent;
|
|
203
203
|
return _context2.abrupt("return", new _AutomationRun(response === null || response === void 0 ? void 0 : response.data, options));
|
|
204
|
-
case
|
|
204
|
+
case 5:
|
|
205
205
|
case "end":
|
|
206
206
|
return _context2.stop();
|
|
207
207
|
}
|
|
@@ -97,31 +97,31 @@ _BandwidthSnapshot = BandwidthSnapshot;
|
|
|
97
97
|
options,
|
|
98
98
|
response,
|
|
99
99
|
_args = arguments;
|
|
100
|
-
return _regenerator.default.wrap(function
|
|
100
|
+
return _regenerator.default.wrap(function (_context) {
|
|
101
101
|
while (1) switch (_context.prev = _context.next) {
|
|
102
102
|
case 0:
|
|
103
103
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
104
104
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
105
105
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
106
|
-
_context.next =
|
|
106
|
+
_context.next = 1;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
110
|
-
case
|
|
110
|
+
case 1:
|
|
111
111
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
112
|
-
_context.next =
|
|
112
|
+
_context.next = 2;
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
116
|
-
case
|
|
117
|
-
_context.next =
|
|
116
|
+
case 2:
|
|
117
|
+
_context.next = 3;
|
|
118
118
|
return _Api.default.sendRequest('/bandwidth_snapshots', 'GET', params, options);
|
|
119
|
-
case
|
|
119
|
+
case 3:
|
|
120
120
|
response = _context.sent;
|
|
121
121
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
122
122
|
return new _BandwidthSnapshot(obj, options);
|
|
123
123
|
})) || []);
|
|
124
|
-
case
|
|
124
|
+
case 4:
|
|
125
125
|
case "end":
|
|
126
126
|
return _context.stop();
|
|
127
127
|
}
|
package/lib/models/Behavior.js
CHANGED
|
@@ -121,67 +121,67 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
|
121
121
|
var params,
|
|
122
122
|
response,
|
|
123
123
|
_args = arguments;
|
|
124
|
-
return _regenerator.default.wrap(function
|
|
124
|
+
return _regenerator.default.wrap(function (_context) {
|
|
125
125
|
while (1) switch (_context.prev = _context.next) {
|
|
126
126
|
case 0:
|
|
127
127
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
128
128
|
if (_this.attributes.id) {
|
|
129
|
-
_context.next =
|
|
129
|
+
_context.next = 1;
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
133
|
-
case
|
|
133
|
+
case 1:
|
|
134
134
|
if ((0, _utils.isObject)(params)) {
|
|
135
|
-
_context.next =
|
|
135
|
+
_context.next = 2;
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
139
|
-
case
|
|
139
|
+
case 2:
|
|
140
140
|
params.id = _this.attributes.id;
|
|
141
141
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
142
|
-
_context.next =
|
|
142
|
+
_context.next = 3;
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
146
|
-
case
|
|
146
|
+
case 3:
|
|
147
147
|
if (!(params.value && !(0, _utils.isString)(params.value))) {
|
|
148
|
-
_context.next =
|
|
148
|
+
_context.next = 4;
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
|
|
152
|
-
case
|
|
152
|
+
case 4:
|
|
153
153
|
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
154
|
-
_context.next =
|
|
154
|
+
_context.next = 5;
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
158
|
-
case
|
|
158
|
+
case 5:
|
|
159
159
|
if (!(params.description && !(0, _utils.isString)(params.description))) {
|
|
160
|
-
_context.next =
|
|
160
|
+
_context.next = 6;
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
|
|
164
|
-
case
|
|
164
|
+
case 6:
|
|
165
165
|
if (params.id) {
|
|
166
|
-
_context.next =
|
|
166
|
+
_context.next = 8;
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
169
|
if (!_this.attributes.id) {
|
|
170
|
-
_context.next =
|
|
170
|
+
_context.next = 7;
|
|
171
171
|
break;
|
|
172
172
|
}
|
|
173
173
|
params.id = _this.id;
|
|
174
|
-
_context.next =
|
|
174
|
+
_context.next = 8;
|
|
175
175
|
break;
|
|
176
|
-
case
|
|
176
|
+
case 7:
|
|
177
177
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
178
|
-
case
|
|
179
|
-
_context.next =
|
|
178
|
+
case 8:
|
|
179
|
+
_context.next = 9;
|
|
180
180
|
return _Api.default.sendRequest("/behaviors/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
181
|
-
case
|
|
181
|
+
case 9:
|
|
182
182
|
response = _context.sent;
|
|
183
183
|
return _context.abrupt("return", new Behavior(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
184
|
-
case
|
|
184
|
+
case 10:
|
|
185
185
|
case "end":
|
|
186
186
|
return _context.stop();
|
|
187
187
|
}
|
|
@@ -190,46 +190,46 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
|
190
190
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
191
191
|
var params,
|
|
192
192
|
_args2 = arguments;
|
|
193
|
-
return _regenerator.default.wrap(function
|
|
193
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
194
194
|
while (1) switch (_context2.prev = _context2.next) {
|
|
195
195
|
case 0:
|
|
196
196
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
197
197
|
if (_this.attributes.id) {
|
|
198
|
-
_context2.next =
|
|
198
|
+
_context2.next = 1;
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
202
|
-
case
|
|
202
|
+
case 1:
|
|
203
203
|
if ((0, _utils.isObject)(params)) {
|
|
204
|
-
_context2.next =
|
|
204
|
+
_context2.next = 2;
|
|
205
205
|
break;
|
|
206
206
|
}
|
|
207
207
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
208
|
-
case
|
|
208
|
+
case 2:
|
|
209
209
|
params.id = _this.attributes.id;
|
|
210
210
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
211
|
-
_context2.next =
|
|
211
|
+
_context2.next = 3;
|
|
212
212
|
break;
|
|
213
213
|
}
|
|
214
214
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
215
|
-
case
|
|
215
|
+
case 3:
|
|
216
216
|
if (params.id) {
|
|
217
|
-
_context2.next =
|
|
217
|
+
_context2.next = 5;
|
|
218
218
|
break;
|
|
219
219
|
}
|
|
220
220
|
if (!_this.attributes.id) {
|
|
221
|
-
_context2.next =
|
|
221
|
+
_context2.next = 4;
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
params.id = _this.id;
|
|
225
|
-
_context2.next =
|
|
225
|
+
_context2.next = 5;
|
|
226
226
|
break;
|
|
227
|
-
case
|
|
227
|
+
case 4:
|
|
228
228
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
229
|
-
case
|
|
230
|
-
_context2.next =
|
|
229
|
+
case 5:
|
|
230
|
+
_context2.next = 6;
|
|
231
231
|
return _Api.default.sendRequest("/behaviors/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
232
|
-
case
|
|
232
|
+
case 6:
|
|
233
233
|
case "end":
|
|
234
234
|
return _context2.stop();
|
|
235
235
|
}
|
|
@@ -241,27 +241,27 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
|
241
241
|
});
|
|
242
242
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
243
243
|
var _newObject, newObject;
|
|
244
|
-
return _regenerator.default.wrap(function
|
|
244
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
245
245
|
while (1) switch (_context3.prev = _context3.next) {
|
|
246
246
|
case 0:
|
|
247
247
|
if (!_this.attributes.id) {
|
|
248
|
-
_context3.next =
|
|
248
|
+
_context3.next = 2;
|
|
249
249
|
break;
|
|
250
250
|
}
|
|
251
|
-
_context3.next =
|
|
251
|
+
_context3.next = 1;
|
|
252
252
|
return _this.update(_this.attributes);
|
|
253
|
-
case
|
|
253
|
+
case 1:
|
|
254
254
|
_newObject = _context3.sent;
|
|
255
255
|
_this.attributes = _objectSpread({}, _newObject.attributes);
|
|
256
256
|
return _context3.abrupt("return", true);
|
|
257
|
-
case
|
|
258
|
-
_context3.next =
|
|
257
|
+
case 2:
|
|
258
|
+
_context3.next = 3;
|
|
259
259
|
return Behavior.create(_this.attributes, _this.options);
|
|
260
|
-
case
|
|
260
|
+
case 3:
|
|
261
261
|
newObject = _context3.sent;
|
|
262
262
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
263
263
|
return _context3.abrupt("return", true);
|
|
264
|
-
case
|
|
264
|
+
case 4:
|
|
265
265
|
case "end":
|
|
266
266
|
return _context3.stop();
|
|
267
267
|
}
|
|
@@ -293,31 +293,31 @@ _Behavior = Behavior;
|
|
|
293
293
|
options,
|
|
294
294
|
response,
|
|
295
295
|
_args4 = arguments;
|
|
296
|
-
return _regenerator.default.wrap(function
|
|
296
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
297
297
|
while (1) switch (_context4.prev = _context4.next) {
|
|
298
298
|
case 0:
|
|
299
299
|
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
300
300
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
301
301
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
302
|
-
_context4.next =
|
|
302
|
+
_context4.next = 1;
|
|
303
303
|
break;
|
|
304
304
|
}
|
|
305
305
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
306
|
-
case
|
|
306
|
+
case 1:
|
|
307
307
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
308
|
-
_context4.next =
|
|
308
|
+
_context4.next = 2;
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
311
311
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
312
|
-
case
|
|
313
|
-
_context4.next =
|
|
312
|
+
case 2:
|
|
313
|
+
_context4.next = 3;
|
|
314
314
|
return _Api.default.sendRequest('/behaviors', 'GET', params, options);
|
|
315
|
-
case
|
|
315
|
+
case 3:
|
|
316
316
|
response = _context4.sent;
|
|
317
317
|
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
318
318
|
return new _Behavior(obj, options);
|
|
319
319
|
})) || []);
|
|
320
|
-
case
|
|
320
|
+
case 4:
|
|
321
321
|
case "end":
|
|
322
322
|
return _context4.stop();
|
|
323
323
|
}
|
|
@@ -336,36 +336,36 @@ _Behavior = Behavior;
|
|
|
336
336
|
options,
|
|
337
337
|
response,
|
|
338
338
|
_args5 = arguments;
|
|
339
|
-
return _regenerator.default.wrap(function
|
|
339
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
340
340
|
while (1) switch (_context5.prev = _context5.next) {
|
|
341
341
|
case 0:
|
|
342
342
|
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
343
343
|
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
|
344
344
|
if ((0, _utils.isObject)(params)) {
|
|
345
|
-
_context5.next =
|
|
345
|
+
_context5.next = 1;
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
348
348
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
349
|
-
case
|
|
349
|
+
case 1:
|
|
350
350
|
params.id = id;
|
|
351
351
|
if (params.id) {
|
|
352
|
-
_context5.next =
|
|
352
|
+
_context5.next = 2;
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
355
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
356
|
-
case
|
|
356
|
+
case 2:
|
|
357
357
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
358
|
-
_context5.next =
|
|
358
|
+
_context5.next = 3;
|
|
359
359
|
break;
|
|
360
360
|
}
|
|
361
361
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
362
|
-
case
|
|
363
|
-
_context5.next =
|
|
362
|
+
case 3:
|
|
363
|
+
_context5.next = 4;
|
|
364
364
|
return _Api.default.sendRequest("/behaviors/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
365
|
-
case
|
|
365
|
+
case 4:
|
|
366
366
|
response = _context5.sent;
|
|
367
367
|
return _context5.abrupt("return", new _Behavior(response === null || response === void 0 ? void 0 : response.data, options));
|
|
368
|
-
case
|
|
368
|
+
case 5:
|
|
369
369
|
case "end":
|
|
370
370
|
return _context5.stop();
|
|
371
371
|
}
|
|
@@ -395,50 +395,50 @@ _Behavior = Behavior;
|
|
|
395
395
|
options,
|
|
396
396
|
response,
|
|
397
397
|
_args6 = arguments;
|
|
398
|
-
return _regenerator.default.wrap(function
|
|
398
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
399
399
|
while (1) switch (_context6.prev = _context6.next) {
|
|
400
400
|
case 0:
|
|
401
401
|
params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
402
402
|
options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
|
|
403
403
|
if ((0, _utils.isObject)(params)) {
|
|
404
|
-
_context6.next =
|
|
404
|
+
_context6.next = 1;
|
|
405
405
|
break;
|
|
406
406
|
}
|
|
407
407
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
408
|
-
case
|
|
408
|
+
case 1:
|
|
409
409
|
params.path = path;
|
|
410
410
|
if (params.path) {
|
|
411
|
-
_context6.next =
|
|
411
|
+
_context6.next = 2;
|
|
412
412
|
break;
|
|
413
413
|
}
|
|
414
414
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
415
|
-
case
|
|
415
|
+
case 2:
|
|
416
416
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
417
|
-
_context6.next =
|
|
417
|
+
_context6.next = 3;
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
421
|
-
case
|
|
421
|
+
case 3:
|
|
422
422
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
423
|
-
_context6.next =
|
|
423
|
+
_context6.next = 4;
|
|
424
424
|
break;
|
|
425
425
|
}
|
|
426
426
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
427
|
-
case
|
|
427
|
+
case 4:
|
|
428
428
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
429
|
-
_context6.next =
|
|
429
|
+
_context6.next = 5;
|
|
430
430
|
break;
|
|
431
431
|
}
|
|
432
432
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
433
|
-
case
|
|
434
|
-
_context6.next =
|
|
433
|
+
case 5:
|
|
434
|
+
_context6.next = 6;
|
|
435
435
|
return _Api.default.sendRequest("/behaviors/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
|
436
|
-
case
|
|
436
|
+
case 6:
|
|
437
437
|
response = _context6.sent;
|
|
438
438
|
return _context6.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
|
|
439
439
|
return new _Behavior(obj, options);
|
|
440
440
|
})) || []);
|
|
441
|
-
case
|
|
441
|
+
case 7:
|
|
442
442
|
case "end":
|
|
443
443
|
return _context6.stop();
|
|
444
444
|
}
|
|
@@ -462,59 +462,59 @@ _Behavior = Behavior;
|
|
|
462
462
|
options,
|
|
463
463
|
response,
|
|
464
464
|
_args7 = arguments;
|
|
465
|
-
return _regenerator.default.wrap(function
|
|
465
|
+
return _regenerator.default.wrap(function (_context7) {
|
|
466
466
|
while (1) switch (_context7.prev = _context7.next) {
|
|
467
467
|
case 0:
|
|
468
468
|
params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
469
469
|
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
|
470
470
|
if (params.path) {
|
|
471
|
-
_context7.next =
|
|
471
|
+
_context7.next = 1;
|
|
472
472
|
break;
|
|
473
473
|
}
|
|
474
474
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
475
|
-
case
|
|
475
|
+
case 1:
|
|
476
476
|
if (params.behavior) {
|
|
477
|
-
_context7.next =
|
|
477
|
+
_context7.next = 2;
|
|
478
478
|
break;
|
|
479
479
|
}
|
|
480
480
|
throw new errors.MissingParameterError('Parameter missing: behavior');
|
|
481
|
-
case
|
|
481
|
+
case 2:
|
|
482
482
|
if (!(params.value && !(0, _utils.isString)(params.value))) {
|
|
483
|
-
_context7.next =
|
|
483
|
+
_context7.next = 3;
|
|
484
484
|
break;
|
|
485
485
|
}
|
|
486
486
|
throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
|
|
487
|
-
case
|
|
487
|
+
case 3:
|
|
488
488
|
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
489
|
-
_context7.next =
|
|
489
|
+
_context7.next = 4;
|
|
490
490
|
break;
|
|
491
491
|
}
|
|
492
492
|
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
493
|
-
case
|
|
493
|
+
case 4:
|
|
494
494
|
if (!(params.description && !(0, _utils.isString)(params.description))) {
|
|
495
|
-
_context7.next =
|
|
495
|
+
_context7.next = 5;
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
498
498
|
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
|
|
499
|
-
case
|
|
499
|
+
case 5:
|
|
500
500
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
501
|
-
_context7.next =
|
|
501
|
+
_context7.next = 6;
|
|
502
502
|
break;
|
|
503
503
|
}
|
|
504
504
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
505
|
-
case
|
|
505
|
+
case 6:
|
|
506
506
|
if (!(params.behavior && !(0, _utils.isString)(params.behavior))) {
|
|
507
|
-
_context7.next =
|
|
507
|
+
_context7.next = 7;
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
throw new errors.InvalidParameterError("Bad parameter: behavior must be of type String, received ".concat((0, _utils.getType)(params.behavior)));
|
|
511
|
-
case
|
|
512
|
-
_context7.next =
|
|
511
|
+
case 7:
|
|
512
|
+
_context7.next = 8;
|
|
513
513
|
return _Api.default.sendRequest('/behaviors', 'POST', params, options);
|
|
514
|
-
case
|
|
514
|
+
case 8:
|
|
515
515
|
response = _context7.sent;
|
|
516
516
|
return _context7.abrupt("return", new _Behavior(response === null || response === void 0 ? void 0 : response.data, options));
|
|
517
|
-
case
|
|
517
|
+
case 9:
|
|
518
518
|
case "end":
|
|
519
519
|
return _context7.stop();
|
|
520
520
|
}
|
|
@@ -531,44 +531,44 @@ _Behavior = Behavior;
|
|
|
531
531
|
var params,
|
|
532
532
|
options,
|
|
533
533
|
_args8 = arguments;
|
|
534
|
-
return _regenerator.default.wrap(function
|
|
534
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
535
535
|
while (1) switch (_context8.prev = _context8.next) {
|
|
536
536
|
case 0:
|
|
537
537
|
params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
538
538
|
options = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
|
|
539
539
|
if (params.url) {
|
|
540
|
-
_context8.next =
|
|
540
|
+
_context8.next = 1;
|
|
541
541
|
break;
|
|
542
542
|
}
|
|
543
543
|
throw new errors.MissingParameterError('Parameter missing: url');
|
|
544
|
-
case
|
|
544
|
+
case 1:
|
|
545
545
|
if (!(params.url && !(0, _utils.isString)(params.url))) {
|
|
546
|
-
_context8.next =
|
|
546
|
+
_context8.next = 2;
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params.url)));
|
|
550
|
-
case
|
|
550
|
+
case 2:
|
|
551
551
|
if (!(params.method && !(0, _utils.isString)(params.method))) {
|
|
552
|
-
_context8.next =
|
|
552
|
+
_context8.next = 3;
|
|
553
553
|
break;
|
|
554
554
|
}
|
|
555
555
|
throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params.method)));
|
|
556
|
-
case
|
|
556
|
+
case 3:
|
|
557
557
|
if (!(params.encoding && !(0, _utils.isString)(params.encoding))) {
|
|
558
|
-
_context8.next =
|
|
558
|
+
_context8.next = 4;
|
|
559
559
|
break;
|
|
560
560
|
}
|
|
561
561
|
throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params.encoding)));
|
|
562
|
-
case
|
|
562
|
+
case 4:
|
|
563
563
|
if (!(params.action && !(0, _utils.isString)(params.action))) {
|
|
564
|
-
_context8.next =
|
|
564
|
+
_context8.next = 5;
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params.action)));
|
|
568
|
-
case
|
|
569
|
-
_context8.next =
|
|
568
|
+
case 5:
|
|
569
|
+
_context8.next = 6;
|
|
570
570
|
return _Api.default.sendRequest('/behaviors/webhook/test', 'POST', params, options);
|
|
571
|
-
case
|
|
571
|
+
case 6:
|
|
572
572
|
case "end":
|
|
573
573
|
return _context8.stop();
|
|
574
574
|
}
|