files.com 1.1.18 → 1.2.0
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/.eslintrc.js +0 -3
- package/_VERSION +1 -1
- package/docs/Errors.md +1 -0
- package/lib/Api.js +1 -1
- package/lib/Errors.js +957 -933
- package/lib/Files.js +1 -1
- package/lib/models/ActionNotificationExport.js +25 -25
- package/lib/models/ActionNotificationExportResult.js +10 -10
- package/lib/models/ActionWebhookFailure.js +5 -9
- package/lib/models/ApiKey.js +62 -70
- package/lib/models/App.js +5 -5
- package/lib/models/As2IncomingMessage.js +7 -7
- package/lib/models/As2OutgoingMessage.js +7 -7
- package/lib/models/As2Partner.js +54 -58
- package/lib/models/As2Station.js +51 -55
- package/lib/models/Automation.js +102 -110
- package/lib/models/AutomationRun.js +13 -13
- package/lib/models/BandwidthSnapshot.js +5 -5
- package/lib/models/Behavior.js +77 -85
- package/lib/models/Bundle.js +102 -110
- package/lib/models/BundleDownload.js +9 -9
- package/lib/models/BundleNotification.js +37 -41
- package/lib/models/BundleRecipient.js +22 -22
- package/lib/models/BundleRegistration.js +7 -7
- package/lib/models/Clickwrap.js +52 -56
- package/lib/models/DnsRecord.js +5 -5
- package/lib/models/EmailIncomingMessage.js +5 -5
- package/lib/models/ExternalEvent.js +18 -18
- package/lib/models/File.js +89 -93
- package/lib/models/FileComment.js +41 -45
- package/lib/models/FileCommentReaction.js +15 -19
- package/lib/models/FileMigration.js +5 -5
- package/lib/models/Folder.js +24 -24
- package/lib/models/FormFieldSet.js +44 -48
- package/lib/models/GpgKey.js +53 -57
- package/lib/models/Group.js +51 -55
- package/lib/models/GroupUser.js +53 -57
- package/lib/models/History.js +72 -72
- package/lib/models/HistoryExport.js +51 -51
- package/lib/models/HistoryExportResult.js +10 -10
- package/lib/models/InboxRecipient.js +22 -22
- package/lib/models/InboxRegistration.js +7 -7
- package/lib/models/InboxUpload.js +9 -9
- package/lib/models/Invoice.js +12 -12
- package/lib/models/IpAddress.js +17 -17
- package/lib/models/Lock.js +27 -31
- package/lib/models/Message.js +60 -64
- package/lib/models/MessageComment.js +46 -50
- package/lib/models/MessageCommentReaction.js +27 -31
- package/lib/models/MessageReaction.js +27 -31
- package/lib/models/Notification.js +66 -70
- package/lib/models/Payment.js +12 -12
- package/lib/models/Permission.js +28 -32
- package/lib/models/Priority.js +9 -9
- package/lib/models/Project.js +39 -43
- package/lib/models/PublicKey.js +46 -50
- package/lib/models/RemoteBandwidthSnapshot.js +5 -5
- package/lib/models/RemoteServer.js +306 -310
- package/lib/models/Request.js +33 -37
- package/lib/models/Session.js +11 -15
- package/lib/models/SettingsChange.js +5 -5
- package/lib/models/SftpHostKey.js +40 -44
- package/lib/models/ShareGroup.js +50 -54
- package/lib/models/Site.js +138 -138
- package/lib/models/Snapshot.js +44 -48
- package/lib/models/SsoStrategy.js +15 -19
- package/lib/models/Style.js +17 -21
- package/lib/models/UsageDailySnapshot.js +5 -5
- package/lib/models/UsageSnapshot.js +5 -5
- package/lib/models/User.js +156 -172
- package/lib/models/UserCipherUse.js +7 -7
- package/lib/models/UserRequest.js +26 -30
- package/lib/models/WebhookTest.js +15 -15
- package/package.json +6 -2
- package/src/Api.js +2 -1
- package/src/Errors.js +189 -177
- package/src/Files.js +1 -1
- package/src/models/AccountLineItem.js +5 -2
- package/src/models/Action.js +5 -2
- package/src/models/ActionNotificationExport.js +36 -35
- package/src/models/ActionNotificationExportResult.js +15 -13
- package/src/models/ActionWebhookFailure.js +9 -8
- package/src/models/ApiKey.js +69 -72
- package/src/models/App.js +10 -8
- package/src/models/As2IncomingMessage.js +12 -10
- package/src/models/As2OutgoingMessage.js +12 -10
- package/src/models/As2Partner.js +61 -60
- package/src/models/As2Station.js +58 -57
- package/src/models/Auto.js +5 -2
- package/src/models/Automation.js +121 -110
- package/src/models/AutomationRun.js +18 -17
- package/src/models/BandwidthSnapshot.js +10 -8
- package/src/models/Behavior.js +85 -86
- package/src/models/Bundle.js +121 -110
- package/src/models/BundleDownload.js +14 -12
- package/src/models/BundleNotification.js +40 -43
- package/src/models/BundleRecipient.js +33 -32
- package/src/models/BundleRegistration.js +12 -10
- package/src/models/Clickwrap.js +60 -58
- package/src/models/DnsRecord.js +10 -8
- package/src/models/EmailIncomingMessage.js +10 -8
- package/src/models/Errors.js +5 -2
- package/src/models/ExternalEvent.js +29 -29
- package/src/models/File.js +116 -108
- package/src/models/FileAction.js +5 -2
- package/src/models/FileComment.js +45 -46
- package/src/models/FileCommentReaction.js +26 -26
- package/src/models/FileMigration.js +10 -8
- package/src/models/FileUploadPart.js +5 -2
- package/src/models/Folder.js +32 -29
- package/src/models/FormField.js +5 -2
- package/src/models/FormFieldSet.js +49 -50
- package/src/models/GpgKey.js +60 -59
- package/src/models/Group.js +58 -57
- package/src/models/GroupUser.js +60 -58
- package/src/models/History.js +77 -74
- package/src/models/HistoryExport.js +62 -61
- package/src/models/HistoryExportResult.js +15 -13
- package/src/models/Image.js +5 -2
- package/src/models/InboxRecipient.js +33 -32
- package/src/models/InboxRegistration.js +12 -10
- package/src/models/InboxUpload.js +14 -12
- package/src/models/Invoice.js +17 -14
- package/src/models/InvoiceLineItem.js +5 -2
- package/src/models/IpAddress.js +22 -20
- package/src/models/Lock.js +36 -36
- package/src/models/Message.js +66 -66
- package/src/models/MessageComment.js +50 -52
- package/src/models/MessageCommentReaction.js +38 -40
- package/src/models/MessageReaction.js +38 -40
- package/src/models/Notification.js +74 -72
- package/src/models/Payment.js +17 -14
- package/src/models/PaymentLineItem.js +5 -2
- package/src/models/Permission.js +39 -40
- package/src/models/Preview.js +5 -2
- package/src/models/Priority.js +14 -12
- package/src/models/Project.js +43 -45
- package/src/models/PublicIpAddress.js +5 -2
- package/src/models/PublicKey.js +50 -52
- package/src/models/RemoteBandwidthSnapshot.js +10 -8
- package/src/models/RemoteServer.js +380 -312
- package/src/models/RemoteServerConfigurationFile.js +5 -2
- package/src/models/Request.js +44 -46
- package/src/models/Session.js +22 -22
- package/src/models/SettingsChange.js +10 -8
- package/src/models/SftpHostKey.js +45 -46
- package/src/models/ShareGroup.js +56 -56
- package/src/models/ShareGroupMember.js +5 -2
- package/src/models/Site.js +143 -142
- package/src/models/Snapshot.js +50 -50
- package/src/models/SsoStrategy.js +20 -21
- package/src/models/Status.js +5 -2
- package/src/models/Style.js +22 -23
- package/src/models/UsageDailySnapshot.js +10 -8
- package/src/models/UsageSnapshot.js +10 -8
- package/src/models/User.js +185 -168
- package/src/models/UserCipherUse.js +12 -10
- package/src/models/UserRequest.js +37 -39
- package/src/models/WebhookTest.js +26 -24
- package/test/Api.test.js +163 -0
- package/test/{package.json → integration/package.json} +1 -1
- package/test/{src → integration/src}/index.js +1 -1
- package/test.sh +2 -1
- /package/test/{.babelrc → integration/.babelrc} +0 -0
- /package/test/{index.js → integration/index.js} +0 -0
|
@@ -87,7 +87,7 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
|
|
|
87
87
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
88
88
|
while (1) switch (_context.prev = _context.next) {
|
|
89
89
|
case 0:
|
|
90
|
-
if (!_this.attributes
|
|
90
|
+
if (!_this.attributes.id) {
|
|
91
91
|
_context.next = 4;
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
@@ -136,32 +136,32 @@ _class = InboxRecipient;
|
|
|
136
136
|
case 0:
|
|
137
137
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
138
138
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
139
|
-
if (params
|
|
139
|
+
if (params.inbox_id) {
|
|
140
140
|
_context2.next = 4;
|
|
141
141
|
break;
|
|
142
142
|
}
|
|
143
143
|
throw new errors.MissingParameterError('Parameter missing: inbox_id');
|
|
144
144
|
case 4:
|
|
145
|
-
if (!(params
|
|
145
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
146
146
|
_context2.next = 6;
|
|
147
147
|
break;
|
|
148
148
|
}
|
|
149
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
149
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
150
150
|
case 6:
|
|
151
|
-
if (!(params
|
|
151
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
152
152
|
_context2.next = 8;
|
|
153
153
|
break;
|
|
154
154
|
}
|
|
155
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
155
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
156
156
|
case 8:
|
|
157
|
-
if (!(params
|
|
157
|
+
if (!(params.inbox_id && !(0, _utils.isInt)(params.inbox_id))) {
|
|
158
158
|
_context2.next = 10;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
|
-
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
161
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_id)));
|
|
162
162
|
case 10:
|
|
163
163
|
_context2.next = 12;
|
|
164
|
-
return _Api.default.sendRequest(
|
|
164
|
+
return _Api.default.sendRequest('/inbox_recipients', 'GET', params, options);
|
|
165
165
|
case 12:
|
|
166
166
|
response = _context2.sent;
|
|
167
167
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
@@ -195,50 +195,50 @@ _class = InboxRecipient;
|
|
|
195
195
|
case 0:
|
|
196
196
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
197
197
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
198
|
-
if (params
|
|
198
|
+
if (params.inbox_id) {
|
|
199
199
|
_context3.next = 4;
|
|
200
200
|
break;
|
|
201
201
|
}
|
|
202
202
|
throw new errors.MissingParameterError('Parameter missing: inbox_id');
|
|
203
203
|
case 4:
|
|
204
|
-
if (params
|
|
204
|
+
if (params.recipient) {
|
|
205
205
|
_context3.next = 6;
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
208
|
throw new errors.MissingParameterError('Parameter missing: recipient');
|
|
209
209
|
case 6:
|
|
210
|
-
if (!(params
|
|
210
|
+
if (!(params.inbox_id && !(0, _utils.isInt)(params.inbox_id))) {
|
|
211
211
|
_context3.next = 8;
|
|
212
212
|
break;
|
|
213
213
|
}
|
|
214
|
-
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
214
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_id)));
|
|
215
215
|
case 8:
|
|
216
|
-
if (!(params
|
|
216
|
+
if (!(params.recipient && !(0, _utils.isString)(params.recipient))) {
|
|
217
217
|
_context3.next = 10;
|
|
218
218
|
break;
|
|
219
219
|
}
|
|
220
|
-
throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params
|
|
220
|
+
throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params.recipient)));
|
|
221
221
|
case 10:
|
|
222
|
-
if (!(params
|
|
222
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
223
223
|
_context3.next = 12;
|
|
224
224
|
break;
|
|
225
225
|
}
|
|
226
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params
|
|
226
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
227
227
|
case 12:
|
|
228
|
-
if (!(params
|
|
228
|
+
if (!(params.company && !(0, _utils.isString)(params.company))) {
|
|
229
229
|
_context3.next = 14;
|
|
230
230
|
break;
|
|
231
231
|
}
|
|
232
|
-
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params
|
|
232
|
+
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
|
|
233
233
|
case 14:
|
|
234
|
-
if (!(params
|
|
234
|
+
if (!(params.note && !(0, _utils.isString)(params.note))) {
|
|
235
235
|
_context3.next = 16;
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
|
-
throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params
|
|
238
|
+
throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params.note)));
|
|
239
239
|
case 16:
|
|
240
240
|
_context3.next = 18;
|
|
241
|
-
return _Api.default.sendRequest(
|
|
241
|
+
return _Api.default.sendRequest('/inbox_recipients', 'POST', params, options);
|
|
242
242
|
case 18:
|
|
243
243
|
response = _context3.sent;
|
|
244
244
|
return _context3.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
|
@@ -110,26 +110,26 @@ _class = InboxRegistration;
|
|
|
110
110
|
case 0:
|
|
111
111
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
112
112
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
113
|
-
if (!(params
|
|
113
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
114
114
|
_context.next = 4;
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
117
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
118
118
|
case 4:
|
|
119
|
-
if (!(params
|
|
119
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
120
120
|
_context.next = 6;
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
123
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
124
124
|
case 6:
|
|
125
|
-
if (!(params
|
|
125
|
+
if (!(params.folder_behavior_id && !(0, _utils.isInt)(params.folder_behavior_id))) {
|
|
126
126
|
_context.next = 8;
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
|
-
throw new errors.InvalidParameterError("Bad parameter: folder_behavior_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
129
|
+
throw new errors.InvalidParameterError("Bad parameter: folder_behavior_id must be of type Int, received ".concat((0, _utils.getType)(params.folder_behavior_id)));
|
|
130
130
|
case 8:
|
|
131
131
|
_context.next = 10;
|
|
132
|
-
return _Api.default.sendRequest(
|
|
132
|
+
return _Api.default.sendRequest('/inbox_registrations', 'GET', params, options);
|
|
133
133
|
case 10:
|
|
134
134
|
response = _context.sent;
|
|
135
135
|
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) {
|
|
@@ -81,32 +81,32 @@ _class = InboxUpload;
|
|
|
81
81
|
case 0:
|
|
82
82
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
83
83
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
84
|
-
if (!(params
|
|
84
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
85
85
|
_context.next = 4;
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
88
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
89
89
|
case 4:
|
|
90
|
-
if (!(params
|
|
90
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
91
91
|
_context.next = 6;
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
94
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
95
95
|
case 6:
|
|
96
|
-
if (!(params
|
|
96
|
+
if (!(params.inbox_registration_id && !(0, _utils.isInt)(params.inbox_registration_id))) {
|
|
97
97
|
_context.next = 8;
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
|
-
throw new errors.InvalidParameterError("Bad parameter: inbox_registration_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
100
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_registration_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_registration_id)));
|
|
101
101
|
case 8:
|
|
102
|
-
if (!(params
|
|
102
|
+
if (!(params.inbox_id && !(0, _utils.isInt)(params.inbox_id))) {
|
|
103
103
|
_context.next = 10;
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
|
-
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
106
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_id)));
|
|
107
107
|
case 10:
|
|
108
108
|
_context.next = 12;
|
|
109
|
-
return _Api.default.sendRequest(
|
|
109
|
+
return _Api.default.sendRequest('/inbox_uploads', 'GET', params, options);
|
|
110
110
|
case 12:
|
|
111
111
|
response = _context.sent;
|
|
112
112
|
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) {
|
package/lib/models/Invoice.js
CHANGED
|
@@ -118,23 +118,23 @@ _class = Invoice;
|
|
|
118
118
|
case 0:
|
|
119
119
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
120
120
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
121
|
-
if (!(params
|
|
121
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
122
122
|
_context.next = 4;
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
125
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
126
126
|
case 4:
|
|
127
|
-
if (!(params
|
|
127
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
128
128
|
_context.next = 6;
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
131
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
132
132
|
case 6:
|
|
133
133
|
_context.next = 8;
|
|
134
|
-
return _Api.default.sendRequest(
|
|
134
|
+
return _Api.default.sendRequest('/invoices', 'GET', params, options);
|
|
135
135
|
case 8:
|
|
136
136
|
response = _context.sent;
|
|
137
|
-
AccountLineItem = require(
|
|
137
|
+
AccountLineItem = require('./AccountLineItem.js').default;
|
|
138
138
|
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) {
|
|
139
139
|
return new AccountLineItem(obj, options);
|
|
140
140
|
})) || []);
|
|
@@ -169,24 +169,24 @@ _class = Invoice;
|
|
|
169
169
|
}
|
|
170
170
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
171
171
|
case 4:
|
|
172
|
-
params
|
|
173
|
-
if (params
|
|
172
|
+
params.id = id;
|
|
173
|
+
if (params.id) {
|
|
174
174
|
_context2.next = 7;
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
177
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
178
178
|
case 7:
|
|
179
|
-
if (!(params
|
|
179
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
180
180
|
_context2.next = 9;
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
183
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
184
184
|
case 9:
|
|
185
185
|
_context2.next = 11;
|
|
186
|
-
return _Api.default.sendRequest("/invoices/".concat(encodeURIComponent(params
|
|
186
|
+
return _Api.default.sendRequest("/invoices/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
187
187
|
case 11:
|
|
188
188
|
response = _context2.sent;
|
|
189
|
-
AccountLineItem = require(
|
|
189
|
+
AccountLineItem = require('./AccountLineItem.js').default;
|
|
190
190
|
return _context2.abrupt("return", new AccountLineItem(response === null || response === void 0 ? void 0 : response.data, options));
|
|
191
191
|
case 14:
|
|
192
192
|
case "end":
|
package/lib/models/IpAddress.js
CHANGED
|
@@ -77,20 +77,20 @@ _class = IpAddress;
|
|
|
77
77
|
case 0:
|
|
78
78
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
79
79
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
80
|
-
if (!(params
|
|
80
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
81
81
|
_context.next = 4;
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
84
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
85
85
|
case 4:
|
|
86
|
-
if (!(params
|
|
86
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
87
87
|
_context.next = 6;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
90
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
91
91
|
case 6:
|
|
92
92
|
_context.next = 8;
|
|
93
|
-
return _Api.default.sendRequest(
|
|
93
|
+
return _Api.default.sendRequest('/ip_addresses', 'GET', params, options);
|
|
94
94
|
case 8:
|
|
95
95
|
response = _context.sent;
|
|
96
96
|
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,23 +122,23 @@ _class = IpAddress;
|
|
|
122
122
|
case 0:
|
|
123
123
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
124
124
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
125
|
-
if (!(params
|
|
125
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
126
126
|
_context2.next = 4;
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
129
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
130
130
|
case 4:
|
|
131
|
-
if (!(params
|
|
131
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
132
132
|
_context2.next = 6;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
135
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
136
136
|
case 6:
|
|
137
137
|
_context2.next = 8;
|
|
138
|
-
return _Api.default.sendRequest(
|
|
138
|
+
return _Api.default.sendRequest('/ip_addresses/exavault-reserved', 'GET', params, options);
|
|
139
139
|
case 8:
|
|
140
140
|
response = _context2.sent;
|
|
141
|
-
PublicIpAddress = require(
|
|
141
|
+
PublicIpAddress = require('./PublicIpAddress.js').default;
|
|
142
142
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
|
|
143
143
|
return new PublicIpAddress(obj, options);
|
|
144
144
|
})) || []);
|
|
@@ -163,23 +163,23 @@ _class = IpAddress;
|
|
|
163
163
|
case 0:
|
|
164
164
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
165
165
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
166
|
-
if (!(params
|
|
166
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
167
167
|
_context3.next = 4;
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
170
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
171
171
|
case 4:
|
|
172
|
-
if (!(params
|
|
172
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
173
173
|
_context3.next = 6;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
176
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
177
177
|
case 6:
|
|
178
178
|
_context3.next = 8;
|
|
179
|
-
return _Api.default.sendRequest(
|
|
179
|
+
return _Api.default.sendRequest('/ip_addresses/reserved', 'GET', params, options);
|
|
180
180
|
case 8:
|
|
181
181
|
response = _context3.sent;
|
|
182
|
-
PublicIpAddress = require(
|
|
182
|
+
PublicIpAddress = require('./PublicIpAddress.js').default;
|
|
183
183
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
|
|
184
184
|
return new PublicIpAddress(obj, options);
|
|
185
185
|
})) || []);
|
package/lib/models/Lock.js
CHANGED
|
@@ -121,7 +121,6 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
121
121
|
// token (required) - string - Lock token
|
|
122
122
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
123
123
|
var params,
|
|
124
|
-
response,
|
|
125
124
|
_args = arguments;
|
|
126
125
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
127
126
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -140,19 +139,19 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
140
139
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
141
140
|
case 5:
|
|
142
141
|
params.path = _this.attributes.path;
|
|
143
|
-
if (!(params
|
|
142
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
144
143
|
_context.next = 8;
|
|
145
144
|
break;
|
|
146
145
|
}
|
|
147
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
|
146
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
148
147
|
case 8:
|
|
149
|
-
if (!(params
|
|
148
|
+
if (!(params.token && !(0, _utils.isString)(params.token))) {
|
|
150
149
|
_context.next = 10;
|
|
151
150
|
break;
|
|
152
151
|
}
|
|
153
|
-
throw new errors.InvalidParameterError("Bad parameter: token must be of type String, received ".concat((0, _utils.getType)(params
|
|
152
|
+
throw new errors.InvalidParameterError("Bad parameter: token must be of type String, received ".concat((0, _utils.getType)(params.token)));
|
|
154
153
|
case 10:
|
|
155
|
-
if (params
|
|
154
|
+
if (params.path) {
|
|
156
155
|
_context.next = 16;
|
|
157
156
|
break;
|
|
158
157
|
}
|
|
@@ -160,13 +159,13 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
160
159
|
_context.next = 15;
|
|
161
160
|
break;
|
|
162
161
|
}
|
|
163
|
-
params
|
|
162
|
+
params.path = _this.path;
|
|
164
163
|
_context.next = 16;
|
|
165
164
|
break;
|
|
166
165
|
case 15:
|
|
167
166
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
168
167
|
case 16:
|
|
169
|
-
if (params
|
|
168
|
+
if (params.token) {
|
|
170
169
|
_context.next = 22;
|
|
171
170
|
break;
|
|
172
171
|
}
|
|
@@ -174,18 +173,15 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
|
|
|
174
173
|
_context.next = 21;
|
|
175
174
|
break;
|
|
176
175
|
}
|
|
177
|
-
params
|
|
176
|
+
params.token = _this.token;
|
|
178
177
|
_context.next = 22;
|
|
179
178
|
break;
|
|
180
179
|
case 21:
|
|
181
180
|
throw new errors.MissingParameterError('Parameter missing: token');
|
|
182
181
|
case 22:
|
|
183
182
|
_context.next = 24;
|
|
184
|
-
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params
|
|
183
|
+
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'DELETE', params, _this.options);
|
|
185
184
|
case 24:
|
|
186
|
-
response = _context.sent;
|
|
187
|
-
return _context.abrupt("return");
|
|
188
|
-
case 26:
|
|
189
185
|
case "end":
|
|
190
186
|
return _context.stop();
|
|
191
187
|
}
|
|
@@ -249,33 +245,33 @@ _class = Lock;
|
|
|
249
245
|
}
|
|
250
246
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
251
247
|
case 4:
|
|
252
|
-
params
|
|
253
|
-
if (params
|
|
248
|
+
params.path = path;
|
|
249
|
+
if (params.path) {
|
|
254
250
|
_context3.next = 7;
|
|
255
251
|
break;
|
|
256
252
|
}
|
|
257
253
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
258
254
|
case 7:
|
|
259
|
-
if (!(params
|
|
255
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
260
256
|
_context3.next = 9;
|
|
261
257
|
break;
|
|
262
258
|
}
|
|
263
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
259
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
264
260
|
case 9:
|
|
265
|
-
if (!(params
|
|
261
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
266
262
|
_context3.next = 11;
|
|
267
263
|
break;
|
|
268
264
|
}
|
|
269
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
265
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
270
266
|
case 11:
|
|
271
|
-
if (!(params
|
|
267
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
272
268
|
_context3.next = 13;
|
|
273
269
|
break;
|
|
274
270
|
}
|
|
275
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
|
271
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
276
272
|
case 13:
|
|
277
273
|
_context3.next = 15;
|
|
278
|
-
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params
|
|
274
|
+
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
|
279
275
|
case 15:
|
|
280
276
|
response = _context3.sent;
|
|
281
277
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
@@ -314,33 +310,33 @@ _class = Lock;
|
|
|
314
310
|
}
|
|
315
311
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
316
312
|
case 4:
|
|
317
|
-
params
|
|
318
|
-
if (params
|
|
313
|
+
params.path = path;
|
|
314
|
+
if (params.path) {
|
|
319
315
|
_context4.next = 7;
|
|
320
316
|
break;
|
|
321
317
|
}
|
|
322
318
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
323
319
|
case 7:
|
|
324
|
-
if (!(params
|
|
320
|
+
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
325
321
|
_context4.next = 9;
|
|
326
322
|
break;
|
|
327
323
|
}
|
|
328
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params
|
|
324
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
329
325
|
case 9:
|
|
330
|
-
if (!(params
|
|
326
|
+
if (!(params.recursive && !(0, _utils.isString)(params.recursive))) {
|
|
331
327
|
_context4.next = 11;
|
|
332
328
|
break;
|
|
333
329
|
}
|
|
334
|
-
throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params
|
|
330
|
+
throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params.recursive)));
|
|
335
331
|
case 11:
|
|
336
|
-
if (!(params
|
|
332
|
+
if (!(params.timeout && !(0, _utils.isInt)(params.timeout))) {
|
|
337
333
|
_context4.next = 13;
|
|
338
334
|
break;
|
|
339
335
|
}
|
|
340
|
-
throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params
|
|
336
|
+
throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params.timeout)));
|
|
341
337
|
case 13:
|
|
342
338
|
_context4.next = 15;
|
|
343
|
-
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params
|
|
339
|
+
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'POST', params, options);
|
|
344
340
|
case 15:
|
|
345
341
|
response = _context4.sent;
|
|
346
342
|
return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|