files.com 1.0.420 → 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 +16 -15
  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 +4 -4
  8. package/lib/models/Action.js +4 -4
  9. package/lib/models/ActionNotificationExport.js +4 -3
  10. package/lib/models/ActionNotificationExportResult.js +4 -3
  11. package/lib/models/ActionWebhookFailure.js +5 -5
  12. package/lib/models/ApiKey.js +10 -9
  13. package/lib/models/App.js +4 -3
  14. package/lib/models/As2IncomingMessage.js +4 -3
  15. package/lib/models/As2OutgoingMessage.js +4 -3
  16. package/lib/models/As2Partner.js +10 -9
  17. package/lib/models/As2Station.js +10 -9
  18. package/lib/models/Auto.js +4 -4
  19. package/lib/models/Automation.js +23 -22
  20. package/lib/models/AutomationRun.js +4 -3
  21. package/lib/models/BandwidthSnapshot.js +4 -3
  22. package/lib/models/Behavior.js +11 -10
  23. package/lib/models/Bundle.js +23 -22
  24. package/lib/models/BundleDownload.js +4 -3
  25. package/lib/models/BundleNotification.js +6 -5
  26. package/lib/models/BundleRecipient.js +4 -3
  27. package/lib/models/BundleRegistration.js +4 -3
  28. package/lib/models/Clickwrap.js +11 -10
  29. package/lib/models/DnsRecord.js +4 -3
  30. package/lib/models/EmailIncomingMessage.js +4 -3
  31. package/lib/models/Errors.js +4 -4
  32. package/lib/models/ExternalEvent.js +4 -3
  33. package/lib/models/File.js +53 -44
  34. package/lib/models/FileAction.js +4 -4
  35. package/lib/models/FileComment.js +7 -6
  36. package/lib/models/FileCommentReaction.js +5 -4
  37. package/lib/models/FileMigration.js +4 -3
  38. package/lib/models/FileUploadPart.js +4 -4
  39. package/lib/models/Folder.js +12 -9
  40. package/lib/models/FormField.js +4 -4
  41. package/lib/models/FormFieldSet.js +8 -7
  42. package/lib/models/GpgKey.js +10 -9
  43. package/lib/models/Group.js +10 -9
  44. package/lib/models/GroupUser.js +10 -9
  45. package/lib/models/History.js +21 -10
  46. package/lib/models/HistoryExport.js +4 -3
  47. package/lib/models/HistoryExportResult.js +4 -3
  48. package/lib/models/Image.js +4 -4
  49. package/lib/models/InboxRecipient.js +4 -3
  50. package/lib/models/InboxRegistration.js +4 -3
  51. package/lib/models/InboxUpload.js +4 -3
  52. package/lib/models/Invoice.js +10 -5
  53. package/lib/models/InvoiceLineItem.js +4 -4
  54. package/lib/models/IpAddress.js +10 -5
  55. package/lib/models/Lock.js +6 -5
  56. package/lib/models/Message.js +9 -8
  57. package/lib/models/MessageComment.js +7 -6
  58. package/lib/models/MessageCommentReaction.js +5 -4
  59. package/lib/models/MessageReaction.js +5 -4
  60. package/lib/models/Notification.js +11 -10
  61. package/lib/models/Payment.js +10 -5
  62. package/lib/models/PaymentLineItem.js +4 -4
  63. package/lib/models/Permission.js +5 -4
  64. package/lib/models/Preview.js +4 -4
  65. package/lib/models/Priority.js +4 -3
  66. package/lib/models/Project.js +7 -6
  67. package/lib/models/PublicIpAddress.js +4 -4
  68. package/lib/models/PublicKey.js +7 -6
  69. package/lib/models/RemoteBandwidthSnapshot.js +4 -3
  70. package/lib/models/RemoteServer.js +83 -78
  71. package/lib/models/RemoteServerConfigurationFile.js +4 -4
  72. package/lib/models/Request.js +5 -4
  73. package/lib/models/Session.js +4 -3
  74. package/lib/models/SettingsChange.js +4 -3
  75. package/lib/models/SftpHostKey.js +8 -7
  76. package/lib/models/ShareGroup.js +9 -8
  77. package/lib/models/ShareGroupMember.js +4 -4
  78. package/lib/models/Site.js +7 -4
  79. package/lib/models/Snapshot.js +9 -8
  80. package/lib/models/SsoStrategy.js +5 -4
  81. package/lib/models/Status.js +4 -4
  82. package/lib/models/Style.js +6 -5
  83. package/lib/models/UsageDailySnapshot.js +4 -3
  84. package/lib/models/UsageSnapshot.js +4 -3
  85. package/lib/models/User.js +35 -34
  86. package/lib/models/UserCipherUse.js +4 -3
  87. package/lib/models/UserRequest.js +5 -4
  88. package/lib/models/WebhookTest.js +4 -3
  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 GroupUser
@@ -81,13 +82,13 @@ class GroupUser {
81
82
 
82
83
  params.id = this.attributes.id
83
84
  if (params['id'] && !isInt(params['id'])) {
84
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
85
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
85
86
  }
86
87
  if (params['group_id'] && !isInt(params['group_id'])) {
87
- throw new errors.InvalidParameterError(`Bad parameter: group_id must be of type Int, received ${getType(group_id)}`)
88
+ throw new errors.InvalidParameterError(`Bad parameter: group_id must be of type Int, received ${getType(params['group_id'])}`)
88
89
  }
89
90
  if (params['user_id'] && !isInt(params['user_id'])) {
90
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
91
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
91
92
  }
92
93
 
93
94
  if (!params['id']) {
@@ -116,6 +117,7 @@ class GroupUser {
116
117
 
117
118
  const response = await Api.sendRequest(`/group_users/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
118
119
 
120
+
119
121
  return new GroupUser(response?.data, this.options)
120
122
  }
121
123
 
@@ -133,13 +135,13 @@ class GroupUser {
133
135
 
134
136
  params.id = this.attributes.id
135
137
  if (params['id'] && !isInt(params['id'])) {
136
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
138
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
137
139
  }
138
140
  if (params['group_id'] && !isInt(params['group_id'])) {
139
- throw new errors.InvalidParameterError(`Bad parameter: group_id must be of type Int, received ${getType(group_id)}`)
141
+ throw new errors.InvalidParameterError(`Bad parameter: group_id must be of type Int, received ${getType(params['group_id'])}`)
140
142
  }
141
143
  if (params['user_id'] && !isInt(params['user_id'])) {
142
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
144
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
143
145
  }
144
146
 
145
147
  if (!params['id']) {
@@ -208,6 +210,7 @@ class GroupUser {
208
210
 
209
211
  const response = await Api.sendRequest(`/group_users`, 'GET', params, options)
210
212
 
213
+
211
214
  return response?.data?.map(obj => new GroupUser(obj, options)) || []
212
215
  }
213
216
 
@@ -237,6 +240,7 @@ class GroupUser {
237
240
 
238
241
  const response = await Api.sendRequest(`/group_users`, 'POST', params, options)
239
242
 
243
+
240
244
  return new GroupUser(response?.data, options)
241
245
  }
242
246
  }
@@ -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 History
@@ -108,6 +109,7 @@ class History {
108
109
 
109
110
  const response = await Api.sendRequest(`/history/files/${encodeURIComponent(params['path'])}`, 'GET', params, options)
110
111
 
112
+ const Action = require("./Action.js").default
111
113
  return response?.data?.map(obj => new Action(obj, options)) || []
112
114
  }
113
115
 
@@ -156,6 +158,7 @@ class History {
156
158
 
157
159
  const response = await Api.sendRequest(`/history/folders/${encodeURIComponent(params['path'])}`, 'GET', params, options)
158
160
 
161
+ const Action = require("./Action.js").default
159
162
  return response?.data?.map(obj => new Action(obj, options)) || []
160
163
  }
161
164
 
@@ -167,12 +170,12 @@ class History {
167
170
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
168
171
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[user_id]=desc`). Valid fields are `user_id` and `created_at`.
169
172
  // user_id (required) - int64 - User ID.
170
- static listForUser = async (user_id, params = {}, options = {}) => {
173
+ static listForUser = async (userId, params = {}, options = {}) => {
171
174
  if (!isObject(params)) {
172
175
  throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
173
176
  }
174
177
 
175
- params['user_id'] = user_id
178
+ params['user_id'] = userId
176
179
 
177
180
  if (!params['user_id']) {
178
181
  throw new errors.MissingParameterError('Parameter missing: user_id')
@@ -204,6 +207,7 @@ class History {
204
207
 
205
208
  const response = await Api.sendRequest(`/history/users/${encodeURIComponent(params['user_id'])}`, 'GET', params, options)
206
209
 
210
+ const Action = require("./Action.js").default
207
211
  return response?.data?.map(obj => new Action(obj, options)) || []
208
212
  }
209
213
 
@@ -237,6 +241,7 @@ class History {
237
241
 
238
242
  const response = await Api.sendRequest(`/history/login`, 'GET', params, options)
239
243
 
244
+ const Action = require("./Action.js").default
240
245
  return response?.data?.map(obj => new Action(obj, options)) || []
241
246
  }
242
247
 
@@ -272,6 +277,7 @@ class History {
272
277
 
273
278
  const response = await Api.sendRequest(`/history`, 'GET', params, options)
274
279
 
280
+ const Action = require("./Action.js").default
275
281
  return response?.data?.map(obj => new Action(obj, options)) || []
276
282
  }
277
283
 
@@ -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 HistoryExport
@@ -235,6 +236,7 @@ class HistoryExport {
235
236
 
236
237
  const response = await Api.sendRequest(`/history_exports/${encodeURIComponent(params['id'])}`, 'GET', params, options)
237
238
 
239
+
238
240
  return new HistoryExport(response?.data, options)
239
241
  }
240
242
 
@@ -355,6 +357,7 @@ class HistoryExport {
355
357
 
356
358
  const response = await Api.sendRequest(`/history_exports`, 'POST', params, options)
357
359
 
360
+
358
361
  return new HistoryExport(response?.data, options)
359
362
  }
360
363
  }
@@ -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 HistoryExportResult
@@ -127,6 +128,7 @@ class HistoryExportResult {
127
128
 
128
129
  const response = await Api.sendRequest(`/history_export_results`, 'GET', params, options)
129
130
 
131
+
130
132
  return response?.data?.map(obj => new HistoryExportResult(obj, options)) || []
131
133
  }
132
134
 
@@ -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 Image
@@ -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 InboxRecipient
@@ -108,6 +109,7 @@ class InboxRecipient {
108
109
 
109
110
  const response = await Api.sendRequest(`/inbox_recipients`, 'GET', params, options)
110
111
 
112
+
111
113
  return response?.data?.map(obj => new InboxRecipient(obj, options)) || []
112
114
  }
113
115
 
@@ -152,6 +154,7 @@ class InboxRecipient {
152
154
 
153
155
  const response = await Api.sendRequest(`/inbox_recipients`, 'POST', params, options)
154
156
 
157
+
155
158
  return new InboxRecipient(response?.data, options)
156
159
  }
157
160
  }
@@ -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 InboxRegistration
@@ -79,6 +80,7 @@ class InboxRegistration {
79
80
 
80
81
  const response = await Api.sendRequest(`/inbox_registrations`, 'GET', params, options)
81
82
 
83
+
82
84
  return response?.data?.map(obj => new InboxRegistration(obj, options)) || []
83
85
  }
84
86
 
@@ -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 InboxUpload
@@ -63,6 +64,7 @@ class InboxUpload {
63
64
 
64
65
  const response = await Api.sendRequest(`/inbox_uploads`, 'GET', params, options)
65
66
 
67
+
66
68
  return response?.data?.map(obj => new InboxUpload(obj, options)) || []
67
69
  }
68
70
 
@@ -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 Invoice
@@ -80,6 +81,7 @@ class Invoice {
80
81
 
81
82
  const response = await Api.sendRequest(`/invoices`, 'GET', params, options)
82
83
 
84
+ const AccountLineItem = require("./AccountLineItem.js").default
83
85
  return response?.data?.map(obj => new AccountLineItem(obj, options)) || []
84
86
  }
85
87
 
@@ -105,6 +107,7 @@ class Invoice {
105
107
 
106
108
  const response = await Api.sendRequest(`/invoices/${encodeURIComponent(params['id'])}`, 'GET', params, options)
107
109
 
110
+ const AccountLineItem = require("./AccountLineItem.js").default
108
111
  return new AccountLineItem(response?.data, options)
109
112
  }
110
113
 
@@ -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 InvoiceLineItem
@@ -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 IpAddress
@@ -50,6 +51,7 @@ class IpAddress {
50
51
 
51
52
  const response = await Api.sendRequest(`/ip_addresses`, 'GET', params, options)
52
53
 
54
+
53
55
  return response?.data?.map(obj => new IpAddress(obj, options)) || []
54
56
  }
55
57
 
@@ -70,6 +72,7 @@ class IpAddress {
70
72
 
71
73
  const response = await Api.sendRequest(`/ip_addresses/exavault-reserved`, 'GET', params, options)
72
74
 
75
+ const PublicIpAddress = require("./PublicIpAddress.js").default
73
76
  return response?.data?.map(obj => new PublicIpAddress(obj, options)) || []
74
77
  }
75
78
 
@@ -87,6 +90,7 @@ class IpAddress {
87
90
 
88
91
  const response = await Api.sendRequest(`/ip_addresses/reserved`, 'GET', params, options)
89
92
 
93
+ const PublicIpAddress = require("./PublicIpAddress.js").default
90
94
  return response?.data?.map(obj => new PublicIpAddress(obj, options)) || []
91
95
  }
92
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 Lock
@@ -121,10 +122,10 @@ class Lock {
121
122
 
122
123
  params.path = this.attributes.path
123
124
  if (params['path'] && !isString(params['path'])) {
124
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
125
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
125
126
  }
126
127
  if (params['token'] && !isString(params['token'])) {
127
- throw new errors.InvalidParameterError(`Bad parameter: token must be of type String, received ${getType(token)}`)
128
+ throw new errors.InvalidParameterError(`Bad parameter: token must be of type String, received ${getType(params['token'])}`)
128
129
  }
129
130
 
130
131
  if (!params['path']) {
@@ -187,6 +188,7 @@ class Lock {
187
188
 
188
189
  const response = await Api.sendRequest(`/locks/${encodeURIComponent(params['path'])}`, 'GET', params, options)
189
190
 
191
+
190
192
  return response?.data?.map(obj => new Lock(obj, options)) || []
191
193
  }
192
194
 
@@ -221,6 +223,7 @@ class Lock {
221
223
 
222
224
  const response = await Api.sendRequest(`/locks/${encodeURIComponent(params['path'])}`, 'POST', params, options)
223
225
 
226
+
224
227
  return new Lock(response?.data, options)
225
228
  }
226
229
  }
@@ -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 Message
@@ -81,16 +82,16 @@ class Message {
81
82
 
82
83
  params.id = this.attributes.id
83
84
  if (params['id'] && !isInt(params['id'])) {
84
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
85
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
85
86
  }
86
87
  if (params['project_id'] && !isInt(params['project_id'])) {
87
- throw new errors.InvalidParameterError(`Bad parameter: project_id must be of type Int, received ${getType(project_id)}`)
88
+ throw new errors.InvalidParameterError(`Bad parameter: project_id must be of type Int, received ${getType(params['project_id'])}`)
88
89
  }
89
90
  if (params['subject'] && !isString(params['subject'])) {
90
- throw new errors.InvalidParameterError(`Bad parameter: subject must be of type String, received ${getType(subject)}`)
91
+ throw new errors.InvalidParameterError(`Bad parameter: subject must be of type String, received ${getType(params['subject'])}`)
91
92
  }
92
93
  if (params['body'] && !isString(params['body'])) {
93
- throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(body)}`)
94
+ throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(params['body'])}`)
94
95
  }
95
96
 
96
97
  if (!params['id']) {
@@ -127,6 +128,7 @@ class Message {
127
128
 
128
129
  const response = await Api.sendRequest(`/messages/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
129
130
 
131
+
130
132
  return new Message(response?.data, this.options)
131
133
  }
132
134
 
@@ -141,7 +143,7 @@ class Message {
141
143
 
142
144
  params.id = this.attributes.id
143
145
  if (params['id'] && !isInt(params['id'])) {
144
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
146
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
145
147
  }
146
148
 
147
149
  if (!params['id']) {
@@ -198,6 +200,7 @@ class Message {
198
200
 
199
201
  const response = await Api.sendRequest(`/messages`, 'GET', params, options)
200
202
 
203
+
201
204
  return response?.data?.map(obj => new Message(obj, options)) || []
202
205
  }
203
206
 
@@ -223,6 +226,7 @@ class Message {
223
226
 
224
227
  const response = await Api.sendRequest(`/messages/${encodeURIComponent(params['id'])}`, 'GET', params, options)
225
228
 
229
+
226
230
  return new Message(response?.data, options)
227
231
  }
228
232
 
@@ -265,6 +269,7 @@ class Message {
265
269
 
266
270
  const response = await Api.sendRequest(`/messages`, 'POST', params, options)
267
271
 
272
+
268
273
  return new Message(response?.data, options)
269
274
  }
270
275
  }
@@ -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 MessageComment
@@ -65,10 +66,10 @@ class MessageComment {
65
66
 
66
67
  params.id = this.attributes.id
67
68
  if (params['id'] && !isInt(params['id'])) {
68
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
69
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
69
70
  }
70
71
  if (params['body'] && !isString(params['body'])) {
71
- throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(body)}`)
72
+ throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(params['body'])}`)
72
73
  }
73
74
 
74
75
  if (!params['id']) {
@@ -89,6 +90,7 @@ class MessageComment {
89
90
 
90
91
  const response = await Api.sendRequest(`/message_comments/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
91
92
 
93
+
92
94
  return new MessageComment(response?.data, this.options)
93
95
  }
94
96
 
@@ -103,7 +105,7 @@ class MessageComment {
103
105
 
104
106
  params.id = this.attributes.id
105
107
  if (params['id'] && !isInt(params['id'])) {
106
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
108
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
107
109
  }
108
110
 
109
111
  if (!params['id']) {
@@ -160,6 +162,7 @@ class MessageComment {
160
162
 
161
163
  const response = await Api.sendRequest(`/message_comments`, 'GET', params, options)
162
164
 
165
+
163
166
  return response?.data?.map(obj => new MessageComment(obj, options)) || []
164
167
  }
165
168
 
@@ -185,6 +188,7 @@ class MessageComment {
185
188
 
186
189
  const response = await Api.sendRequest(`/message_comments/${encodeURIComponent(params['id'])}`, 'GET', params, options)
187
190
 
191
+
188
192
  return new MessageComment(response?.data, options)
189
193
  }
190
194
 
@@ -209,6 +213,7 @@ class MessageComment {
209
213
 
210
214
  const response = await Api.sendRequest(`/message_comments`, 'POST', params, options)
211
215
 
216
+
212
217
  return new MessageComment(response?.data, options)
213
218
  }
214
219
  }
@@ -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 MessageCommentReaction
@@ -56,7 +57,7 @@ class MessageCommentReaction {
56
57
 
57
58
  params.id = this.attributes.id
58
59
  if (params['id'] && !isInt(params['id'])) {
59
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
60
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
60
61
  }
61
62
 
62
63
  if (!params['id']) {
@@ -113,6 +114,7 @@ class MessageCommentReaction {
113
114
 
114
115
  const response = await Api.sendRequest(`/message_comment_reactions`, 'GET', params, options)
115
116
 
117
+
116
118
  return response?.data?.map(obj => new MessageCommentReaction(obj, options)) || []
117
119
  }
118
120
 
@@ -138,6 +140,7 @@ class MessageCommentReaction {
138
140
 
139
141
  const response = await Api.sendRequest(`/message_comment_reactions/${encodeURIComponent(params['id'])}`, 'GET', params, options)
140
142
 
143
+
141
144
  return new MessageCommentReaction(response?.data, options)
142
145
  }
143
146
 
@@ -162,6 +165,7 @@ class MessageCommentReaction {
162
165
 
163
166
  const response = await Api.sendRequest(`/message_comment_reactions`, 'POST', params, options)
164
167
 
168
+
165
169
  return new MessageCommentReaction(response?.data, options)
166
170
  }
167
171
  }
@@ -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 MessageReaction
@@ -56,7 +57,7 @@ class MessageReaction {
56
57
 
57
58
  params.id = this.attributes.id
58
59
  if (params['id'] && !isInt(params['id'])) {
59
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
60
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
60
61
  }
61
62
 
62
63
  if (!params['id']) {
@@ -113,6 +114,7 @@ class MessageReaction {
113
114
 
114
115
  const response = await Api.sendRequest(`/message_reactions`, 'GET', params, options)
115
116
 
117
+
116
118
  return response?.data?.map(obj => new MessageReaction(obj, options)) || []
117
119
  }
118
120
 
@@ -138,6 +140,7 @@ class MessageReaction {
138
140
 
139
141
  const response = await Api.sendRequest(`/message_reactions/${encodeURIComponent(params['id'])}`, 'GET', params, options)
140
142
 
143
+
141
144
  return new MessageReaction(response?.data, options)
142
145
  }
143
146
 
@@ -162,6 +165,7 @@ class MessageReaction {
162
165
 
163
166
  const response = await Api.sendRequest(`/message_reactions`, 'POST', params, options)
164
167
 
168
+
165
169
  return new MessageReaction(response?.data, options)
166
170
  }
167
171
  }