files.com 1.0.421 → 1.0.422

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. package/.eslintrc.js +179 -0
  2. package/_VERSION +1 -1
  3. package/lib/Api.js +14 -13
  4. package/lib/Errors.js +4 -2
  5. package/lib/Files.js +6 -6
  6. package/lib/Logger.js +20 -12
  7. package/lib/models/AccountLineItem.js +2 -2
  8. package/lib/models/Action.js +2 -2
  9. package/lib/models/ActionNotificationExport.js +2 -1
  10. package/lib/models/ActionNotificationExportResult.js +2 -1
  11. package/lib/models/ActionWebhookFailure.js +3 -3
  12. package/lib/models/ApiKey.js +8 -7
  13. package/lib/models/App.js +2 -1
  14. package/lib/models/As2IncomingMessage.js +2 -1
  15. package/lib/models/As2OutgoingMessage.js +2 -1
  16. package/lib/models/As2Partner.js +8 -7
  17. package/lib/models/As2Station.js +8 -7
  18. package/lib/models/Auto.js +2 -2
  19. package/lib/models/Automation.js +21 -20
  20. package/lib/models/AutomationRun.js +2 -1
  21. package/lib/models/BandwidthSnapshot.js +2 -1
  22. package/lib/models/Behavior.js +9 -8
  23. package/lib/models/Bundle.js +21 -20
  24. package/lib/models/BundleDownload.js +2 -1
  25. package/lib/models/BundleNotification.js +4 -3
  26. package/lib/models/BundleRecipient.js +2 -1
  27. package/lib/models/BundleRegistration.js +2 -1
  28. package/lib/models/Clickwrap.js +9 -8
  29. package/lib/models/DnsRecord.js +2 -1
  30. package/lib/models/EmailIncomingMessage.js +2 -1
  31. package/lib/models/Errors.js +2 -2
  32. package/lib/models/ExternalEvent.js +2 -1
  33. package/lib/models/File.js +51 -42
  34. package/lib/models/FileAction.js +2 -2
  35. package/lib/models/FileComment.js +5 -4
  36. package/lib/models/FileCommentReaction.js +3 -2
  37. package/lib/models/FileMigration.js +2 -1
  38. package/lib/models/FileUploadPart.js +2 -2
  39. package/lib/models/Folder.js +10 -7
  40. package/lib/models/FormField.js +2 -2
  41. package/lib/models/FormFieldSet.js +6 -5
  42. package/lib/models/GpgKey.js +8 -7
  43. package/lib/models/Group.js +8 -7
  44. package/lib/models/GroupUser.js +8 -7
  45. package/lib/models/History.js +19 -8
  46. package/lib/models/HistoryExport.js +2 -1
  47. package/lib/models/HistoryExportResult.js +2 -1
  48. package/lib/models/Image.js +2 -2
  49. package/lib/models/InboxRecipient.js +2 -1
  50. package/lib/models/InboxRegistration.js +2 -1
  51. package/lib/models/InboxUpload.js +2 -1
  52. package/lib/models/Invoice.js +8 -3
  53. package/lib/models/InvoiceLineItem.js +2 -2
  54. package/lib/models/IpAddress.js +8 -3
  55. package/lib/models/Lock.js +4 -3
  56. package/lib/models/Message.js +7 -6
  57. package/lib/models/MessageComment.js +5 -4
  58. package/lib/models/MessageCommentReaction.js +3 -2
  59. package/lib/models/MessageReaction.js +3 -2
  60. package/lib/models/Notification.js +9 -8
  61. package/lib/models/Payment.js +8 -3
  62. package/lib/models/PaymentLineItem.js +2 -2
  63. package/lib/models/Permission.js +3 -2
  64. package/lib/models/Preview.js +2 -2
  65. package/lib/models/Priority.js +2 -1
  66. package/lib/models/Project.js +5 -4
  67. package/lib/models/PublicIpAddress.js +2 -2
  68. package/lib/models/PublicKey.js +5 -4
  69. package/lib/models/RemoteBandwidthSnapshot.js +2 -1
  70. package/lib/models/RemoteServer.js +81 -76
  71. package/lib/models/RemoteServerConfigurationFile.js +2 -2
  72. package/lib/models/Request.js +3 -2
  73. package/lib/models/Session.js +2 -1
  74. package/lib/models/SettingsChange.js +2 -1
  75. package/lib/models/SftpHostKey.js +6 -5
  76. package/lib/models/ShareGroup.js +7 -6
  77. package/lib/models/ShareGroupMember.js +2 -2
  78. package/lib/models/Site.js +5 -2
  79. package/lib/models/Snapshot.js +7 -6
  80. package/lib/models/SsoStrategy.js +3 -2
  81. package/lib/models/Status.js +2 -2
  82. package/lib/models/Style.js +4 -3
  83. package/lib/models/UsageDailySnapshot.js +2 -1
  84. package/lib/models/UsageSnapshot.js +2 -1
  85. package/lib/models/User.js +33 -32
  86. package/lib/models/UserCipherUse.js +2 -1
  87. package/lib/models/UserRequest.js +3 -2
  88. package/lib/models/WebhookTest.js +2 -1
  89. package/lib/utils/pathNormalizer.js +2 -2
  90. package/lib/utils/pathNormalizer.test.js +1 -1
  91. package/lib/utils.js +2 -0
  92. package/package.json +7 -1
  93. package/src/Api.js +17 -13
  94. package/src/Errors.js +2 -1
  95. package/src/Files.js +16 -6
  96. package/src/Logger.js +16 -16
  97. package/src/isomorphic/File.node.js +7 -7
  98. package/src/models/AccountLineItem.js +3 -2
  99. package/src/models/Action.js +3 -2
  100. package/src/models/ActionNotificationExport.js +5 -2
  101. package/src/models/ActionNotificationExportResult.js +4 -2
  102. package/src/models/ActionWebhookFailure.js +4 -3
  103. package/src/models/ApiKey.js +15 -8
  104. package/src/models/App.js +4 -2
  105. package/src/models/As2IncomingMessage.js +4 -2
  106. package/src/models/As2OutgoingMessage.js +4 -2
  107. package/src/models/As2Partner.js +13 -8
  108. package/src/models/As2Station.js +13 -8
  109. package/src/models/Auto.js +3 -2
  110. package/src/models/Automation.js +26 -21
  111. package/src/models/AutomationRun.js +5 -2
  112. package/src/models/BandwidthSnapshot.js +4 -2
  113. package/src/models/Behavior.js +15 -9
  114. package/src/models/Bundle.js +26 -21
  115. package/src/models/BundleDownload.js +4 -2
  116. package/src/models/BundleNotification.js +9 -4
  117. package/src/models/BundleRecipient.js +5 -2
  118. package/src/models/BundleRegistration.js +4 -2
  119. package/src/models/Clickwrap.js +14 -9
  120. package/src/models/DnsRecord.js +4 -2
  121. package/src/models/EmailIncomingMessage.js +4 -2
  122. package/src/models/Errors.js +3 -2
  123. package/src/models/ExternalEvent.js +6 -2
  124. package/src/models/File.js +39 -28
  125. package/src/models/FileAction.js +3 -2
  126. package/src/models/FileComment.js +9 -5
  127. package/src/models/FileCommentReaction.js +5 -3
  128. package/src/models/FileMigration.js +4 -2
  129. package/src/models/FileUploadPart.js +3 -2
  130. package/src/models/Folder.js +5 -3
  131. package/src/models/FormField.js +3 -2
  132. package/src/models/FormFieldSet.js +11 -6
  133. package/src/models/GpgKey.js +13 -8
  134. package/src/models/Group.js +13 -8
  135. package/src/models/GroupUser.js +12 -8
  136. package/src/models/History.js +10 -4
  137. package/src/models/HistoryExport.js +5 -2
  138. package/src/models/HistoryExportResult.js +4 -2
  139. package/src/models/Image.js +3 -2
  140. package/src/models/InboxRecipient.js +5 -2
  141. package/src/models/InboxRegistration.js +4 -2
  142. package/src/models/InboxUpload.js +4 -2
  143. package/src/models/Invoice.js +5 -2
  144. package/src/models/InvoiceLineItem.js +3 -2
  145. package/src/models/IpAddress.js +6 -2
  146. package/src/models/Lock.js +7 -4
  147. package/src/models/Message.js +12 -7
  148. package/src/models/MessageComment.js +10 -5
  149. package/src/models/MessageCommentReaction.js +7 -3
  150. package/src/models/MessageReaction.js +7 -3
  151. package/src/models/Notification.js +14 -9
  152. package/src/models/Payment.js +5 -2
  153. package/src/models/PaymentLineItem.js +3 -2
  154. package/src/models/Permission.js +6 -3
  155. package/src/models/Preview.js +3 -2
  156. package/src/models/Priority.js +4 -2
  157. package/src/models/Project.js +10 -5
  158. package/src/models/PublicIpAddress.js +3 -2
  159. package/src/models/PublicKey.js +10 -5
  160. package/src/models/RemoteBandwidthSnapshot.js +4 -2
  161. package/src/models/RemoteServer.js +82 -75
  162. package/src/models/RemoteServerConfigurationFile.js +3 -2
  163. package/src/models/Request.js +7 -3
  164. package/src/models/Session.js +4 -2
  165. package/src/models/SettingsChange.js +4 -2
  166. package/src/models/SftpHostKey.js +11 -6
  167. package/src/models/ShareGroup.js +12 -7
  168. package/src/models/ShareGroupMember.js +3 -2
  169. package/src/models/Site.js +6 -2
  170. package/src/models/Snapshot.js +12 -7
  171. package/src/models/SsoStrategy.js +6 -3
  172. package/src/models/Status.js +3 -2
  173. package/src/models/Style.js +7 -4
  174. package/src/models/UsageDailySnapshot.js +4 -2
  175. package/src/models/UsageSnapshot.js +4 -2
  176. package/src/models/User.js +38 -33
  177. package/src/models/UserCipherUse.js +4 -2
  178. package/src/models/UserRequest.js +7 -3
  179. package/src/models/WebhookTest.js +4 -2
  180. package/src/utils/pathNormalizer.js +1 -1
  181. package/src/utils/pathNormalizer.test.js +2 -2
  182. package/src/utils.js +6 -5
  183. package/test.sh +10 -0
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class AccountLineItem
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class Action
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class ActionNotificationExport
@@ -151,6 +152,7 @@ class ActionNotificationExport {
151
152
 
152
153
  const response = await Api.sendRequest(`/action_notification_exports/${encodeURIComponent(params['id'])}`, 'GET', params, options)
153
154
 
155
+
154
156
  return new ActionNotificationExport(response?.data, options)
155
157
  }
156
158
 
@@ -207,6 +209,7 @@ class ActionNotificationExport {
207
209
 
208
210
  const response = await Api.sendRequest(`/action_notification_exports`, 'POST', params, options)
209
211
 
212
+
210
213
  return new ActionNotificationExport(response?.data, options)
211
214
  }
212
215
  }
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class ActionNotificationExportResult
@@ -82,6 +83,7 @@ class ActionNotificationExportResult {
82
83
 
83
84
  const response = await Api.sendRequest(`/action_notification_export_results`, 'GET', params, options)
84
85
 
86
+
85
87
  return response?.data?.map(obj => new ActionNotificationExportResult(obj, options)) || []
86
88
  }
87
89
 
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class ActionWebhookFailure
@@ -36,7 +37,7 @@ class ActionWebhookFailure {
36
37
 
37
38
  params.id = this.attributes.id
38
39
  if (params['id'] && !isInt(params['id'])) {
39
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
40
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
40
41
  }
41
42
 
42
43
  if (!params['id']) {
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class ApiKey
@@ -127,19 +128,19 @@ class ApiKey {
127
128
 
128
129
  params.id = this.attributes.id
129
130
  if (params['id'] && !isInt(params['id'])) {
130
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
131
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
131
132
  }
132
133
  if (params['name'] && !isString(params['name'])) {
133
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
134
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
134
135
  }
135
136
  if (params['description'] && !isString(params['description'])) {
136
- throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(description)}`)
137
+ throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params['description'])}`)
137
138
  }
138
139
  if (params['expires_at'] && !isString(params['expires_at'])) {
139
- throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
140
+ throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params['expires_at'])}`)
140
141
  }
141
142
  if (params['permission_set'] && !isString(params['permission_set'])) {
142
- throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
143
+ throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params['permission_set'])}`)
143
144
  }
144
145
 
145
146
  if (!params['id']) {
@@ -152,6 +153,7 @@ class ApiKey {
152
153
 
153
154
  const response = await Api.sendRequest(`/api_keys/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
154
155
 
156
+
155
157
  return new ApiKey(response?.data, this.options)
156
158
  }
157
159
 
@@ -166,7 +168,7 @@ class ApiKey {
166
168
 
167
169
  params.id = this.attributes.id
168
170
  if (params['id'] && !isInt(params['id'])) {
169
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
171
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
170
172
  }
171
173
 
172
174
  if (!params['id']) {
@@ -220,6 +222,7 @@ class ApiKey {
220
222
 
221
223
  const response = await Api.sendRequest(`/api_keys`, 'GET', params, options)
222
224
 
225
+
223
226
  return response?.data?.map(obj => new ApiKey(obj, options)) || []
224
227
  }
225
228
 
@@ -229,6 +232,7 @@ class ApiKey {
229
232
  static findCurrent = async (options = {}) => {
230
233
  const response = await Api.sendRequest(`/api_key`, 'GET', {}, options)
231
234
 
235
+
232
236
  return new ApiKey(response?.data, options)
233
237
  }
234
238
 
@@ -251,6 +255,7 @@ class ApiKey {
251
255
 
252
256
  const response = await Api.sendRequest(`/api_keys/${encodeURIComponent(params['id'])}`, 'GET', params, options)
253
257
 
258
+
254
259
  return new ApiKey(response?.data, options)
255
260
  }
256
261
 
@@ -291,6 +296,7 @@ class ApiKey {
291
296
 
292
297
  const response = await Api.sendRequest(`/api_keys`, 'POST', params, options)
293
298
 
299
+
294
300
  return new ApiKey(response?.data, options)
295
301
  }
296
302
 
@@ -313,6 +319,7 @@ class ApiKey {
313
319
 
314
320
  const response = await Api.sendRequest(`/api_key`, 'PATCH', params, options)
315
321
 
322
+
316
323
  return new ApiKey(response?.data, options)
317
324
  }
318
325
 
package/src/models/App.js CHANGED
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class App
@@ -89,6 +90,7 @@ class App {
89
90
 
90
91
  const response = await Api.sendRequest(`/apps`, 'GET', params, options)
91
92
 
93
+
92
94
  return response?.data?.map(obj => new App(obj, options)) || []
93
95
  }
94
96
 
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class As2IncomingMessage
@@ -154,6 +155,7 @@ class As2IncomingMessage {
154
155
 
155
156
  const response = await Api.sendRequest(`/as2_incoming_messages`, 'GET', params, options)
156
157
 
158
+
157
159
  return response?.data?.map(obj => new As2IncomingMessage(obj, options)) || []
158
160
  }
159
161
 
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class As2OutgoingMessage
@@ -142,6 +143,7 @@ class As2OutgoingMessage {
142
143
 
143
144
  const response = await Api.sendRequest(`/as2_outgoing_messages`, 'GET', params, options)
144
145
 
146
+
145
147
  return response?.data?.map(obj => new As2OutgoingMessage(obj, options)) || []
146
148
  }
147
149
 
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class As2Partner
@@ -139,19 +140,19 @@ class As2Partner {
139
140
 
140
141
  params.id = this.attributes.id
141
142
  if (params['id'] && !isInt(params['id'])) {
142
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
143
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
143
144
  }
144
145
  if (params['name'] && !isString(params['name'])) {
145
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
146
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
146
147
  }
147
148
  if (params['uri'] && !isString(params['uri'])) {
148
- throw new errors.InvalidParameterError(`Bad parameter: uri must be of type String, received ${getType(uri)}`)
149
+ throw new errors.InvalidParameterError(`Bad parameter: uri must be of type String, received ${getType(params['uri'])}`)
149
150
  }
150
151
  if (params['server_certificate'] && !isString(params['server_certificate'])) {
151
- throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(server_certificate)}`)
152
+ throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(params['server_certificate'])}`)
152
153
  }
153
154
  if (params['public_certificate'] && !isString(params['public_certificate'])) {
154
- throw new errors.InvalidParameterError(`Bad parameter: public_certificate must be of type String, received ${getType(public_certificate)}`)
155
+ throw new errors.InvalidParameterError(`Bad parameter: public_certificate must be of type String, received ${getType(params['public_certificate'])}`)
155
156
  }
156
157
 
157
158
  if (!params['id']) {
@@ -164,6 +165,7 @@ class As2Partner {
164
165
 
165
166
  const response = await Api.sendRequest(`/as2_partners/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
166
167
 
168
+
167
169
  return new As2Partner(response?.data, this.options)
168
170
  }
169
171
 
@@ -178,7 +180,7 @@ class As2Partner {
178
180
 
179
181
  params.id = this.attributes.id
180
182
  if (params['id'] && !isInt(params['id'])) {
181
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
183
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
182
184
  }
183
185
 
184
186
  if (!params['id']) {
@@ -221,6 +223,7 @@ class As2Partner {
221
223
 
222
224
  const response = await Api.sendRequest(`/as2_partners`, 'GET', params, options)
223
225
 
226
+
224
227
  return response?.data?.map(obj => new As2Partner(obj, options)) || []
225
228
  }
226
229
 
@@ -246,6 +249,7 @@ class As2Partner {
246
249
 
247
250
  const response = await Api.sendRequest(`/as2_partners/${encodeURIComponent(params['id'])}`, 'GET', params, options)
248
251
 
252
+
249
253
  return new As2Partner(response?.data, options)
250
254
  }
251
255
 
@@ -298,6 +302,7 @@ class As2Partner {
298
302
 
299
303
  const response = await Api.sendRequest(`/as2_partners`, 'POST', params, options)
300
304
 
305
+
301
306
  return new As2Partner(response?.data, options)
302
307
  }
303
308
  }
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class As2Station
@@ -152,19 +153,19 @@ class As2Station {
152
153
 
153
154
  params.id = this.attributes.id
154
155
  if (params['id'] && !isInt(params['id'])) {
155
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
156
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
156
157
  }
157
158
  if (params['name'] && !isString(params['name'])) {
158
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
159
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
159
160
  }
160
161
  if (params['public_certificate'] && !isString(params['public_certificate'])) {
161
- throw new errors.InvalidParameterError(`Bad parameter: public_certificate must be of type String, received ${getType(public_certificate)}`)
162
+ throw new errors.InvalidParameterError(`Bad parameter: public_certificate must be of type String, received ${getType(params['public_certificate'])}`)
162
163
  }
163
164
  if (params['private_key'] && !isString(params['private_key'])) {
164
- throw new errors.InvalidParameterError(`Bad parameter: private_key must be of type String, received ${getType(private_key)}`)
165
+ throw new errors.InvalidParameterError(`Bad parameter: private_key must be of type String, received ${getType(params['private_key'])}`)
165
166
  }
166
167
  if (params['private_key_password'] && !isString(params['private_key_password'])) {
167
- throw new errors.InvalidParameterError(`Bad parameter: private_key_password must be of type String, received ${getType(private_key_password)}`)
168
+ throw new errors.InvalidParameterError(`Bad parameter: private_key_password must be of type String, received ${getType(params['private_key_password'])}`)
168
169
  }
169
170
 
170
171
  if (!params['id']) {
@@ -177,6 +178,7 @@ class As2Station {
177
178
 
178
179
  const response = await Api.sendRequest(`/as2_stations/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
179
180
 
181
+
180
182
  return new As2Station(response?.data, this.options)
181
183
  }
182
184
 
@@ -191,7 +193,7 @@ class As2Station {
191
193
 
192
194
  params.id = this.attributes.id
193
195
  if (params['id'] && !isInt(params['id'])) {
194
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
196
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
195
197
  }
196
198
 
197
199
  if (!params['id']) {
@@ -234,6 +236,7 @@ class As2Station {
234
236
 
235
237
  const response = await Api.sendRequest(`/as2_stations`, 'GET', params, options)
236
238
 
239
+
237
240
  return response?.data?.map(obj => new As2Station(obj, options)) || []
238
241
  }
239
242
 
@@ -259,6 +262,7 @@ class As2Station {
259
262
 
260
263
  const response = await Api.sendRequest(`/as2_stations/${encodeURIComponent(params['id'])}`, 'GET', params, options)
261
264
 
265
+
262
266
  return new As2Station(response?.data, options)
263
267
  }
264
268
 
@@ -301,6 +305,7 @@ class As2Station {
301
305
 
302
306
  const response = await Api.sendRequest(`/as2_stations`, 'POST', params, options)
303
307
 
308
+
304
309
  return new As2Station(response?.data, options)
305
310
  }
306
311
  }
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class Auto
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class Automation
@@ -204,7 +205,7 @@ class Automation {
204
205
 
205
206
  params.id = this.attributes.id
206
207
  if (params['id'] && !isInt(params['id'])) {
207
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
208
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
208
209
  }
209
210
 
210
211
  if (!params['id']) {
@@ -251,55 +252,55 @@ class Automation {
251
252
 
252
253
  params.id = this.attributes.id
253
254
  if (params['id'] && !isInt(params['id'])) {
254
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
255
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
255
256
  }
256
257
  if (params['source'] && !isString(params['source'])) {
257
- throw new errors.InvalidParameterError(`Bad parameter: source must be of type String, received ${getType(source)}`)
258
+ throw new errors.InvalidParameterError(`Bad parameter: source must be of type String, received ${getType(params['source'])}`)
258
259
  }
259
260
  if (params['destination'] && !isString(params['destination'])) {
260
- throw new errors.InvalidParameterError(`Bad parameter: destination must be of type String, received ${getType(destination)}`)
261
+ throw new errors.InvalidParameterError(`Bad parameter: destination must be of type String, received ${getType(params['destination'])}`)
261
262
  }
262
263
  if (params['destinations'] && !isArray(params['destinations'])) {
263
- throw new errors.InvalidParameterError(`Bad parameter: destinations must be of type Array, received ${getType(destinations)}`)
264
+ throw new errors.InvalidParameterError(`Bad parameter: destinations must be of type Array, received ${getType(params['destinations'])}`)
264
265
  }
265
266
  if (params['destination_replace_from'] && !isString(params['destination_replace_from'])) {
266
- throw new errors.InvalidParameterError(`Bad parameter: destination_replace_from must be of type String, received ${getType(destination_replace_from)}`)
267
+ throw new errors.InvalidParameterError(`Bad parameter: destination_replace_from must be of type String, received ${getType(params['destination_replace_from'])}`)
267
268
  }
268
269
  if (params['destination_replace_to'] && !isString(params['destination_replace_to'])) {
269
- throw new errors.InvalidParameterError(`Bad parameter: destination_replace_to must be of type String, received ${getType(destination_replace_to)}`)
270
+ throw new errors.InvalidParameterError(`Bad parameter: destination_replace_to must be of type String, received ${getType(params['destination_replace_to'])}`)
270
271
  }
271
272
  if (params['interval'] && !isString(params['interval'])) {
272
- throw new errors.InvalidParameterError(`Bad parameter: interval must be of type String, received ${getType(interval)}`)
273
+ throw new errors.InvalidParameterError(`Bad parameter: interval must be of type String, received ${getType(params['interval'])}`)
273
274
  }
274
275
  if (params['path'] && !isString(params['path'])) {
275
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
276
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
276
277
  }
277
278
  if (params['sync_ids'] && !isString(params['sync_ids'])) {
278
- throw new errors.InvalidParameterError(`Bad parameter: sync_ids must be of type String, received ${getType(sync_ids)}`)
279
+ throw new errors.InvalidParameterError(`Bad parameter: sync_ids must be of type String, received ${getType(params['sync_ids'])}`)
279
280
  }
280
281
  if (params['user_ids'] && !isString(params['user_ids'])) {
281
- throw new errors.InvalidParameterError(`Bad parameter: user_ids must be of type String, received ${getType(user_ids)}`)
282
+ throw new errors.InvalidParameterError(`Bad parameter: user_ids must be of type String, received ${getType(params['user_ids'])}`)
282
283
  }
283
284
  if (params['group_ids'] && !isString(params['group_ids'])) {
284
- throw new errors.InvalidParameterError(`Bad parameter: group_ids must be of type String, received ${getType(group_ids)}`)
285
+ throw new errors.InvalidParameterError(`Bad parameter: group_ids must be of type String, received ${getType(params['group_ids'])}`)
285
286
  }
286
287
  if (params['description'] && !isString(params['description'])) {
287
- throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(description)}`)
288
+ throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params['description'])}`)
288
289
  }
289
290
  if (params['name'] && !isString(params['name'])) {
290
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
291
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
291
292
  }
292
293
  if (params['trigger'] && !isString(params['trigger'])) {
293
- throw new errors.InvalidParameterError(`Bad parameter: trigger must be of type String, received ${getType(trigger)}`)
294
+ throw new errors.InvalidParameterError(`Bad parameter: trigger must be of type String, received ${getType(params['trigger'])}`)
294
295
  }
295
296
  if (params['trigger_actions'] && !isArray(params['trigger_actions'])) {
296
- throw new errors.InvalidParameterError(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
297
+ throw new errors.InvalidParameterError(`Bad parameter: trigger_actions must be of type Array, received ${getType(params['trigger_actions'])}`)
297
298
  }
298
299
  if (params['recurring_day'] && !isInt(params['recurring_day'])) {
299
- throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(recurring_day)}`)
300
+ throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(params['recurring_day'])}`)
300
301
  }
301
302
  if (params['automation'] && !isString(params['automation'])) {
302
- throw new errors.InvalidParameterError(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
303
+ throw new errors.InvalidParameterError(`Bad parameter: automation must be of type String, received ${getType(params['automation'])}`)
303
304
  }
304
305
 
305
306
  if (!params['id']) {
@@ -312,6 +313,7 @@ class Automation {
312
313
 
313
314
  const response = await Api.sendRequest(`/automations/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
314
315
 
316
+
315
317
  return new Automation(response?.data, this.options)
316
318
  }
317
319
 
@@ -326,7 +328,7 @@ class Automation {
326
328
 
327
329
  params.id = this.attributes.id
328
330
  if (params['id'] && !isInt(params['id'])) {
329
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
331
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
330
332
  }
331
333
 
332
334
  if (!params['id']) {
@@ -376,6 +378,7 @@ class Automation {
376
378
 
377
379
  const response = await Api.sendRequest(`/automations`, 'GET', params, options)
378
380
 
381
+
379
382
  return response?.data?.map(obj => new Automation(obj, options)) || []
380
383
  }
381
384
 
@@ -401,6 +404,7 @@ class Automation {
401
404
 
402
405
  const response = await Api.sendRequest(`/automations/${encodeURIComponent(params['id'])}`, 'GET', params, options)
403
406
 
407
+
404
408
  return new Automation(response?.data, options)
405
409
  }
406
410
 
@@ -498,6 +502,7 @@ class Automation {
498
502
 
499
503
  const response = await Api.sendRequest(`/automations`, 'POST', params, options)
500
504
 
505
+
501
506
  return new Automation(response?.data, options)
502
507
  }
503
508
  }
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class AutomationRun
@@ -72,6 +73,7 @@ class AutomationRun {
72
73
 
73
74
  const response = await Api.sendRequest(`/automation_runs`, 'GET', params, options)
74
75
 
76
+
75
77
  return response?.data?.map(obj => new AutomationRun(obj, options)) || []
76
78
  }
77
79
 
@@ -97,6 +99,7 @@ class AutomationRun {
97
99
 
98
100
  const response = await Api.sendRequest(`/automation_runs/${encodeURIComponent(params['id'])}`, 'GET', params, options)
99
101
 
102
+
100
103
  return new AutomationRun(response?.data, options)
101
104
  }
102
105
 
@@ -1,7 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  import Api from '../Api'
2
3
  import * as errors from '../Errors'
3
- import Logger from '../Logger'
4
- import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
+ import { getType, isArray, isInt, isObject, isString } from '../utils'
5
+ /* eslint-enable no-unused-vars */
5
6
 
6
7
  /**
7
8
  * Class BandwidthSnapshot
@@ -71,6 +72,7 @@ class BandwidthSnapshot {
71
72
 
72
73
  const response = await Api.sendRequest(`/bandwidth_snapshots`, 'GET', params, options)
73
74
 
75
+
74
76
  return response?.data?.map(obj => new BandwidthSnapshot(obj, options)) || []
75
77
  }
76
78