files.com 1.0.190 → 1.0.193

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. package/_VERSION +1 -1
  2. package/docs/Errors.md +186 -0
  3. package/docs/models/AccountLineItem.md +53 -0
  4. package/docs/models/Action.md +37 -0
  5. package/docs/models/ActionNotificationExport.md +82 -0
  6. package/docs/models/ActionNotificationExportResult.md +49 -0
  7. package/docs/models/ActionWebhookFailure.md +16 -0
  8. package/docs/models/ApiKey.md +183 -0
  9. package/docs/models/App.md +66 -0
  10. package/docs/models/As2IncomingMessage.md +104 -0
  11. package/docs/models/As2OutgoingMessage.md +96 -0
  12. package/docs/models/As2Partner.md +141 -0
  13. package/docs/models/As2Station.md +142 -0
  14. package/docs/models/Auto.md +11 -0
  15. package/docs/models/Automation.md +257 -0
  16. package/docs/models/AutomationRun.md +61 -0
  17. package/docs/models/BandwidthSnapshot.md +50 -0
  18. package/docs/models/Behavior.md +195 -0
  19. package/docs/models/Bundle.md +330 -0
  20. package/docs/models/BundleDownload.md +44 -0
  21. package/docs/models/BundleRecipient.md +76 -0
  22. package/docs/models/BundleRegistration.md +53 -0
  23. package/docs/models/Clickwrap.md +120 -0
  24. package/docs/models/DnsRecord.md +33 -0
  25. package/docs/models/Errors.md +17 -0
  26. package/docs/models/ExternalEvent.md +84 -0
  27. package/docs/models/File.md +339 -0
  28. package/docs/models/FileAction.md +13 -0
  29. package/docs/models/FileComment.md +98 -0
  30. package/docs/models/FileCommentReaction.md +50 -0
  31. package/docs/models/FileMigration.md +40 -0
  32. package/docs/models/FileUploadPart.md +39 -0
  33. package/docs/models/Folder.md +90 -0
  34. package/docs/models/FormField.md +29 -0
  35. package/docs/models/FormFieldSet.md +170 -0
  36. package/docs/models/Group.md +140 -0
  37. package/docs/models/GroupUser.md +116 -0
  38. package/docs/models/History.md +151 -0
  39. package/docs/models/HistoryExport.md +130 -0
  40. package/docs/models/HistoryExportResult.md +75 -0
  41. package/docs/models/Image.md +13 -0
  42. package/docs/models/InboxRecipient.md +76 -0
  43. package/docs/models/InboxRegistration.md +47 -0
  44. package/docs/models/InboxUpload.md +42 -0
  45. package/docs/models/Invoice.md +82 -0
  46. package/docs/models/InvoiceLineItem.md +27 -0
  47. package/docs/models/IpAddress.md +51 -0
  48. package/docs/models/Lock.md +92 -0
  49. package/docs/models/Message.md +134 -0
  50. package/docs/models/MessageComment.md +114 -0
  51. package/docs/models/MessageCommentReaction.md +79 -0
  52. package/docs/models/MessageReaction.md +79 -0
  53. package/docs/models/Notification.md +241 -0
  54. package/docs/models/Payment.md +82 -0
  55. package/docs/models/PaymentLineItem.md +19 -0
  56. package/docs/models/Permission.md +94 -0
  57. package/docs/models/Preview.md +19 -0
  58. package/docs/models/Priority.md +30 -0
  59. package/docs/models/Project.md +98 -0
  60. package/docs/models/PublicIpAddress.md +17 -0
  61. package/docs/models/PublicKey.md +112 -0
  62. package/docs/models/RemoteBandwidthSnapshot.md +42 -0
  63. package/docs/models/RemoteServer.md +385 -0
  64. package/docs/models/Request.md +97 -0
  65. package/docs/models/Session.md +50 -0
  66. package/docs/models/SettingsChange.md +44 -0
  67. package/docs/models/Site.md +607 -0
  68. package/docs/models/SsoStrategy.md +139 -0
  69. package/docs/models/Status.md +30 -0
  70. package/docs/models/Style.md +76 -0
  71. package/docs/models/UsageDailySnapshot.md +56 -0
  72. package/docs/models/UsageSnapshot.md +63 -0
  73. package/docs/models/User.md +465 -0
  74. package/docs/models/UserCipherUse.md +39 -0
  75. package/docs/models/UserRequest.md +80 -0
  76. package/docs/models/WebhookTest.md +59 -0
  77. package/lib/Api.js +12 -11
  78. package/lib/Errors.js +3125 -0
  79. package/lib/models/AccountLineItem.js +8 -0
  80. package/lib/models/Action.js +8 -0
  81. package/lib/models/ActionNotificationExport.js +21 -13
  82. package/lib/models/ActionNotificationExportResult.js +13 -5
  83. package/lib/models/ActionWebhookFailure.js +12 -4
  84. package/lib/models/ApiKey.js +33 -25
  85. package/lib/models/App.js +10 -2
  86. package/lib/models/As2IncomingMessage.js +11 -3
  87. package/lib/models/As2OutgoingMessage.js +11 -3
  88. package/lib/models/As2Partner.js +34 -26
  89. package/lib/models/As2Station.js +32 -24
  90. package/lib/models/Auto.js +8 -0
  91. package/lib/models/Automation.js +51 -43
  92. package/lib/models/AutomationRun.js +16 -8
  93. package/lib/models/BandwidthSnapshot.js +10 -2
  94. package/lib/models/Behavior.js +46 -38
  95. package/lib/models/Bundle.js +51 -43
  96. package/lib/models/BundleDownload.js +12 -4
  97. package/lib/models/BundleRecipient.js +22 -14
  98. package/lib/models/BundleRegistration.js +12 -4
  99. package/lib/models/Clickwrap.js +31 -23
  100. package/lib/models/DnsRecord.js +10 -2
  101. package/lib/models/Errors.js +8 -0
  102. package/lib/models/ExternalEvent.js +18 -10
  103. package/lib/models/File.js +68 -60
  104. package/lib/models/FileAction.js +8 -0
  105. package/lib/models/FileComment.js +27 -19
  106. package/lib/models/FileCommentReaction.js +18 -10
  107. package/lib/models/FileMigration.js +11 -3
  108. package/lib/models/FileUploadPart.js +8 -0
  109. package/lib/models/Folder.js +19 -11
  110. package/lib/models/FormField.js +8 -0
  111. package/lib/models/FormFieldSet.js +27 -19
  112. package/lib/models/Group.js +30 -22
  113. package/lib/models/GroupUser.js +32 -24
  114. package/lib/models/History.js +42 -34
  115. package/lib/models/HistoryExport.js +34 -26
  116. package/lib/models/HistoryExportResult.js +13 -5
  117. package/lib/models/Image.js +8 -0
  118. package/lib/models/InboxRecipient.js +22 -14
  119. package/lib/models/InboxRegistration.js +11 -3
  120. package/lib/models/InboxUpload.js +12 -4
  121. package/lib/models/Invoice.js +13 -5
  122. package/lib/models/InvoiceLineItem.js +8 -0
  123. package/lib/models/IpAddress.js +12 -4
  124. package/lib/models/Lock.js +24 -16
  125. package/lib/models/Message.js +37 -29
  126. package/lib/models/MessageComment.js +29 -21
  127. package/lib/models/MessageCommentReaction.js +24 -16
  128. package/lib/models/MessageReaction.js +24 -16
  129. package/lib/models/Notification.js +38 -30
  130. package/lib/models/Payment.js +13 -5
  131. package/lib/models/PaymentLineItem.js +8 -0
  132. package/lib/models/Permission.js +23 -15
  133. package/lib/models/Preview.js +8 -0
  134. package/lib/models/Priority.js +13 -5
  135. package/lib/models/Project.js +25 -17
  136. package/lib/models/PublicIpAddress.js +8 -0
  137. package/lib/models/PublicKey.js +29 -21
  138. package/lib/models/RemoteBandwidthSnapshot.js +10 -2
  139. package/lib/models/RemoteServer.js +113 -105
  140. package/lib/models/Request.js +27 -19
  141. package/lib/models/Session.js +13 -5
  142. package/lib/models/SettingsChange.js +10 -2
  143. package/lib/models/Site.js +65 -57
  144. package/lib/models/SsoStrategy.js +17 -9
  145. package/lib/models/Status.js +8 -0
  146. package/lib/models/Style.js +20 -12
  147. package/lib/models/UsageDailySnapshot.js +10 -2
  148. package/lib/models/UsageSnapshot.js +10 -2
  149. package/lib/models/User.js +85 -77
  150. package/lib/models/UserCipherUse.js +11 -3
  151. package/lib/models/UserRequest.js +24 -16
  152. package/lib/models/WebhookTest.js +16 -8
  153. package/package.json +1 -1
  154. package/src/Api.js +4 -8
  155. package/src/Errors.js +221 -0
  156. package/src/models/AccountLineItem.js +1 -0
  157. package/src/models/Action.js +1 -0
  158. package/src/models/ActionNotificationExport.js +14 -13
  159. package/src/models/ActionNotificationExportResult.js +6 -5
  160. package/src/models/ActionWebhookFailure.js +5 -4
  161. package/src/models/ApiKey.js +26 -25
  162. package/src/models/App.js +3 -2
  163. package/src/models/As2IncomingMessage.js +4 -3
  164. package/src/models/As2OutgoingMessage.js +4 -3
  165. package/src/models/As2Partner.js +27 -26
  166. package/src/models/As2Station.js +25 -24
  167. package/src/models/Auto.js +1 -0
  168. package/src/models/Automation.js +44 -43
  169. package/src/models/AutomationRun.js +9 -8
  170. package/src/models/BandwidthSnapshot.js +3 -2
  171. package/src/models/Behavior.js +39 -38
  172. package/src/models/Bundle.js +44 -43
  173. package/src/models/BundleDownload.js +5 -4
  174. package/src/models/BundleRecipient.js +15 -14
  175. package/src/models/BundleRegistration.js +5 -4
  176. package/src/models/Clickwrap.js +24 -23
  177. package/src/models/DnsRecord.js +3 -2
  178. package/src/models/Errors.js +1 -0
  179. package/src/models/ExternalEvent.js +11 -10
  180. package/src/models/File.js +61 -60
  181. package/src/models/FileAction.js +1 -0
  182. package/src/models/FileComment.js +20 -19
  183. package/src/models/FileCommentReaction.js +11 -10
  184. package/src/models/FileMigration.js +4 -3
  185. package/src/models/FileUploadPart.js +1 -0
  186. package/src/models/Folder.js +12 -11
  187. package/src/models/FormField.js +1 -0
  188. package/src/models/FormFieldSet.js +20 -19
  189. package/src/models/Group.js +23 -22
  190. package/src/models/GroupUser.js +25 -24
  191. package/src/models/History.js +35 -34
  192. package/src/models/HistoryExport.js +27 -26
  193. package/src/models/HistoryExportResult.js +6 -5
  194. package/src/models/Image.js +1 -0
  195. package/src/models/InboxRecipient.js +15 -14
  196. package/src/models/InboxRegistration.js +4 -3
  197. package/src/models/InboxUpload.js +5 -4
  198. package/src/models/Invoice.js +6 -5
  199. package/src/models/InvoiceLineItem.js +1 -0
  200. package/src/models/IpAddress.js +5 -4
  201. package/src/models/Lock.js +17 -16
  202. package/src/models/Message.js +30 -29
  203. package/src/models/MessageComment.js +22 -21
  204. package/src/models/MessageCommentReaction.js +17 -16
  205. package/src/models/MessageReaction.js +17 -16
  206. package/src/models/Notification.js +31 -30
  207. package/src/models/Payment.js +6 -5
  208. package/src/models/PaymentLineItem.js +1 -0
  209. package/src/models/Permission.js +16 -15
  210. package/src/models/Preview.js +1 -0
  211. package/src/models/Priority.js +6 -5
  212. package/src/models/Project.js +18 -17
  213. package/src/models/PublicIpAddress.js +1 -0
  214. package/src/models/PublicKey.js +22 -21
  215. package/src/models/RemoteBandwidthSnapshot.js +3 -2
  216. package/src/models/RemoteServer.js +106 -105
  217. package/src/models/Request.js +20 -19
  218. package/src/models/Session.js +6 -5
  219. package/src/models/SettingsChange.js +3 -2
  220. package/src/models/Site.js +58 -57
  221. package/src/models/SsoStrategy.js +10 -9
  222. package/src/models/Status.js +1 -0
  223. package/src/models/Style.js +13 -12
  224. package/src/models/UsageDailySnapshot.js +3 -2
  225. package/src/models/UsageSnapshot.js +3 -2
  226. package/src/models/User.js +78 -77
  227. package/src/models/UserCipherUse.js +4 -3
  228. package/src/models/UserRequest.js +17 -16
  229. package/src/models/WebhookTest.js +9 -8
  230. package/test/src/index.js +46 -0
package/src/Errors.js ADDED
@@ -0,0 +1,221 @@
1
+ import Logger from './Logger'
2
+
3
+ export class FilesError extends Error {
4
+ constructor(message) {
5
+ super(message)
6
+ this.name = 'FilesError'
7
+ }
8
+ }
9
+
10
+ export class FilesApiError extends FilesError {
11
+ constructor(message, code) {
12
+ super(message)
13
+ this.name = 'FilesApiError'
14
+ this.code = code
15
+ }
16
+ }
17
+
18
+ const errorClasses = {
19
+ FilesApiError: FilesApiError,
20
+ }
21
+
22
+ const toPascalCase = string =>
23
+ string.replace('-', ' ').split(' ')
24
+ .map(part => part[0].toUpperCase() + part.substring(1))
25
+ .join('')
26
+
27
+ export const handleErrorResponse = error => {
28
+ const response = error.response
29
+ let errorData = response?.data
30
+
31
+ const message = errorData?.error || response?.statusText || error.message
32
+ const code = response?.status || errorData?.['http-code'] || 0
33
+
34
+ if (!errorData) {
35
+ Logger.error('FilesApiError Exception >', code, message)
36
+ throw new FilesApiError(message, code)
37
+ }
38
+
39
+ if (Array.isArray(errorData)) {
40
+ errorData = errorData[0]
41
+ }
42
+
43
+ if (!errorData.type) {
44
+ Logger.error('FilesApiError Exception >', code, message)
45
+ throw new FilesApiError(message, code)
46
+ }
47
+
48
+ const parts = errorData.type.split('/')
49
+
50
+ let className
51
+
52
+ if (parts.length > 1) {
53
+ const [errorFamily, errorType] = parts.map(toPascalCase)
54
+ className = `${errorFamily}_${errorType}Error`
55
+ } else {
56
+ const errorType = toPascalCase(parts[0])
57
+ className = `${errorType}Error`
58
+ }
59
+
60
+ const ErrorClass = errorClasses[className]
61
+
62
+ Logger.error(`${className} Exception >`, code, message)
63
+ throw new ErrorClass(message, code)
64
+ }
65
+
66
+ // general errors
67
+ export class ConfigurationError extends FilesError { constructor(message) { super(message); this.name = 'ConfigurationError' } } errorClasses.ConfigurationError = ConfigurationError
68
+ export class EmptyPropertyError extends FilesError { constructor(message) { super(message); this.name = 'EmptyPropertyError' } } errorClasses.EmptyPropertyError = EmptyPropertyError
69
+ export class InvalidParameterError extends FilesError { constructor(message) { super(message); this.name = 'InvalidParameterError' } } errorClasses.InvalidParameterError = InvalidParameterError
70
+ export class MissingParameterError extends FilesError { constructor(message) { super(message); this.name = 'MissingParameterError' } } errorClasses.MissingParameterError = MissingParameterError
71
+ export class NotImplementedError extends FilesError { constructor(message) { super(message); this.name = 'NotImplementedError' } } errorClasses.NotImplementedError = NotImplementedError
72
+
73
+ // api error groups
74
+ export class BadRequestError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'BadRequestError' } } errorClasses.BadRequestError = BadRequestError
75
+ export class NotAuthenticatedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticatedError' } } errorClasses.NotAuthenticatedError = NotAuthenticatedError
76
+ export class NotAuthorizedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotAuthorizedError' } } errorClasses.NotAuthorizedError = NotAuthorizedError
77
+ export class NotFoundError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotFoundError' } } errorClasses.NotFoundError = NotFoundError
78
+ export class ProcessingFailureError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailureError' } } errorClasses.ProcessingFailureError = ProcessingFailureError
79
+ export class RateLimitedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'RateLimitedError' } } errorClasses.RateLimitedError = RateLimitedError
80
+ export class ServiceUnavailableError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'ServiceUnavailableError' } } errorClasses.ServiceUnavailableError = ServiceUnavailableError
81
+ export class SiteConfigurationError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'SiteConfigurationError' } } errorClasses.SiteConfigurationError = SiteConfigurationError
82
+
83
+
84
+ // grouped api errors
85
+ export class BadRequest_AttachmentTooLargeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_AttachmentTooLargeError' } } errorClasses.BadRequest_AttachmentTooLargeError = BadRequest_AttachmentTooLargeError
86
+ export class BadRequest_CannotDownloadDirectoryError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_CannotDownloadDirectoryError' } } errorClasses.BadRequest_CannotDownloadDirectoryError = BadRequest_CannotDownloadDirectoryError
87
+ export class BadRequest_CantMoveWithMultipleLocationsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_CantMoveWithMultipleLocationsError' } } errorClasses.BadRequest_CantMoveWithMultipleLocationsError = BadRequest_CantMoveWithMultipleLocationsError
88
+ export class BadRequest_DatetimeParseError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_DatetimeParseError' } } errorClasses.BadRequest_DatetimeParseError = BadRequest_DatetimeParseError
89
+ export class BadRequest_DestinationSameError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_DestinationSameError' } } errorClasses.BadRequest_DestinationSameError = BadRequest_DestinationSameError
90
+ export class BadRequest_FolderMustNotBeAFileError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_FolderMustNotBeAFileError' } } errorClasses.BadRequest_FolderMustNotBeAFileError = BadRequest_FolderMustNotBeAFileError
91
+ export class BadRequest_InvalidBodyError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidBodyError' } } errorClasses.BadRequest_InvalidBodyError = BadRequest_InvalidBodyError
92
+ export class BadRequest_InvalidCursorError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidCursorError' } } errorClasses.BadRequest_InvalidCursorError = BadRequest_InvalidCursorError
93
+ export class BadRequest_InvalidEtagsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidEtagsError' } } errorClasses.BadRequest_InvalidEtagsError = BadRequest_InvalidEtagsError
94
+ export class BadRequest_InvalidFilterCombinationError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidFilterCombinationError' } } errorClasses.BadRequest_InvalidFilterCombinationError = BadRequest_InvalidFilterCombinationError
95
+ export class BadRequest_InvalidFilterFieldError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidFilterFieldError' } } errorClasses.BadRequest_InvalidFilterFieldError = BadRequest_InvalidFilterFieldError
96
+ export class BadRequest_InvalidInputEncodingError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidInputEncodingError' } } errorClasses.BadRequest_InvalidInputEncodingError = BadRequest_InvalidInputEncodingError
97
+ export class BadRequest_InvalidInterfaceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidInterfaceError' } } errorClasses.BadRequest_InvalidInterfaceError = BadRequest_InvalidInterfaceError
98
+ export class BadRequest_InvalidOauthProviderError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidOauthProviderError' } } errorClasses.BadRequest_InvalidOauthProviderError = BadRequest_InvalidOauthProviderError
99
+ export class BadRequest_InvalidReturnToUrlError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidReturnToUrlError' } } errorClasses.BadRequest_InvalidReturnToUrlError = BadRequest_InvalidReturnToUrlError
100
+ export class BadRequest_InvalidUploadOffsetError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadOffsetError' } } errorClasses.BadRequest_InvalidUploadOffsetError = BadRequest_InvalidUploadOffsetError
101
+ export class BadRequest_InvalidUploadPartGapError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadPartGapError' } } errorClasses.BadRequest_InvalidUploadPartGapError = BadRequest_InvalidUploadPartGapError
102
+ export class BadRequest_InvalidUploadPartSizeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadPartSizeError' } } errorClasses.BadRequest_InvalidUploadPartSizeError = BadRequest_InvalidUploadPartSizeError
103
+ export class BadRequest_MethodNotAllowedError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_MethodNotAllowedError' } } errorClasses.BadRequest_MethodNotAllowedError = BadRequest_MethodNotAllowedError
104
+ export class BadRequest_NoValidInputParamsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_NoValidInputParamsError' } } errorClasses.BadRequest_NoValidInputParamsError = BadRequest_NoValidInputParamsError
105
+ export class BadRequest_OperationOnNonScimResourceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_OperationOnNonScimResourceError' } } errorClasses.BadRequest_OperationOnNonScimResourceError = BadRequest_OperationOnNonScimResourceError
106
+ export class BadRequest_PartNumberTooLargeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_PartNumberTooLargeError' } } errorClasses.BadRequest_PartNumberTooLargeError = BadRequest_PartNumberTooLargeError
107
+ export class BadRequest_ReauthenticationNeededFieldsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_ReauthenticationNeededFieldsError' } } errorClasses.BadRequest_ReauthenticationNeededFieldsError = BadRequest_ReauthenticationNeededFieldsError
108
+ export class BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError' } } errorClasses.BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError = BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError
109
+ export class BadRequest_RequestParamsContainInvalidCharacterError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsContainInvalidCharacterError' } } errorClasses.BadRequest_RequestParamsContainInvalidCharacterError = BadRequest_RequestParamsContainInvalidCharacterError
110
+ export class BadRequest_RequestParamsInvalidError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsInvalidError' } } errorClasses.BadRequest_RequestParamsInvalidError = BadRequest_RequestParamsInvalidError
111
+ export class BadRequest_RequestParamsRequiredError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsRequiredError' } } errorClasses.BadRequest_RequestParamsRequiredError = BadRequest_RequestParamsRequiredError
112
+ export class BadRequest_SearchAllOnChildPathError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_SearchAllOnChildPathError' } } errorClasses.BadRequest_SearchAllOnChildPathError = BadRequest_SearchAllOnChildPathError
113
+ export class BadRequest_UnsupportedCurrencyError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedCurrencyError' } } errorClasses.BadRequest_UnsupportedCurrencyError = BadRequest_UnsupportedCurrencyError
114
+ export class BadRequest_UnsupportedHttpResponseFormatError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedHttpResponseFormatError' } } errorClasses.BadRequest_UnsupportedHttpResponseFormatError = BadRequest_UnsupportedHttpResponseFormatError
115
+ export class BadRequest_UnsupportedMediaTypeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedMediaTypeError' } } errorClasses.BadRequest_UnsupportedMediaTypeError = BadRequest_UnsupportedMediaTypeError
116
+ export class BadRequest_UserIdInvalidError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserIdInvalidError' } } errorClasses.BadRequest_UserIdInvalidError = BadRequest_UserIdInvalidError
117
+ export class BadRequest_UserIdOnUserEndpointError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserIdOnUserEndpointError' } } errorClasses.BadRequest_UserIdOnUserEndpointError = BadRequest_UserIdOnUserEndpointError
118
+ export class BadRequest_UserRequiredError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserRequiredError' } } errorClasses.BadRequest_UserRequiredError = BadRequest_UserRequiredError
119
+ export class NotAuthenticated_AuthenticationRequiredError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_AuthenticationRequiredError' } } errorClasses.NotAuthenticated_AuthenticationRequiredError = NotAuthenticated_AuthenticationRequiredError
120
+ export class NotAuthenticated_BundleRegistrationCodeFailedError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_BundleRegistrationCodeFailedError' } } errorClasses.NotAuthenticated_BundleRegistrationCodeFailedError = NotAuthenticated_BundleRegistrationCodeFailedError
121
+ export class NotAuthenticated_InboxRegistrationCodeFailedError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InboxRegistrationCodeFailedError' } } errorClasses.NotAuthenticated_InboxRegistrationCodeFailedError = NotAuthenticated_InboxRegistrationCodeFailedError
122
+ export class NotAuthenticated_InvalidCredentialsError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidCredentialsError' } } errorClasses.NotAuthenticated_InvalidCredentialsError = NotAuthenticated_InvalidCredentialsError
123
+ export class NotAuthenticated_InvalidOauthError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidOauthError' } } errorClasses.NotAuthenticated_InvalidOauthError = NotAuthenticated_InvalidOauthError
124
+ export class NotAuthenticated_InvalidOrExpiredCodeError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidOrExpiredCodeError' } } errorClasses.NotAuthenticated_InvalidOrExpiredCodeError = NotAuthenticated_InvalidOrExpiredCodeError
125
+ export class NotAuthenticated_InvalidUsernameOrPasswordError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidUsernameOrPasswordError' } } errorClasses.NotAuthenticated_InvalidUsernameOrPasswordError = NotAuthenticated_InvalidUsernameOrPasswordError
126
+ export class NotAuthenticated_LockedOutError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_LockedOutError' } } errorClasses.NotAuthenticated_LockedOutError = NotAuthenticated_LockedOutError
127
+ export class NotAuthenticated_LockoutRegionMismatchError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_LockoutRegionMismatchError' } } errorClasses.NotAuthenticated_LockoutRegionMismatchError = NotAuthenticated_LockoutRegionMismatchError
128
+ export class NotAuthenticated_OneTimePasswordIncorrectError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_OneTimePasswordIncorrectError' } } errorClasses.NotAuthenticated_OneTimePasswordIncorrectError = NotAuthenticated_OneTimePasswordIncorrectError
129
+ export class NotAuthenticated_TwoFactorAuthenticationErrorError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_TwoFactorAuthenticationErrorError' } } errorClasses.NotAuthenticated_TwoFactorAuthenticationErrorError = NotAuthenticated_TwoFactorAuthenticationErrorError
130
+ export class NotAuthenticated_TwoFactorAuthenticationSetupExpiredError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_TwoFactorAuthenticationSetupExpiredError' } } errorClasses.NotAuthenticated_TwoFactorAuthenticationSetupExpiredError = NotAuthenticated_TwoFactorAuthenticationSetupExpiredError
131
+ export class NotAuthorized_ApiKeyIsDisabledError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyIsDisabledError' } } errorClasses.NotAuthorized_ApiKeyIsDisabledError = NotAuthorized_ApiKeyIsDisabledError
132
+ export class NotAuthorized_ApiKeyIsPathRestrictedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyIsPathRestrictedError' } } errorClasses.NotAuthorized_ApiKeyIsPathRestrictedError = NotAuthorized_ApiKeyIsPathRestrictedError
133
+ export class NotAuthorized_ApiKeyOnlyForDesktopAppError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForDesktopAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForDesktopAppError = NotAuthorized_ApiKeyOnlyForDesktopAppError
134
+ export class NotAuthorized_ApiKeyOnlyForMobileAppError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForMobileAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForMobileAppError = NotAuthorized_ApiKeyOnlyForMobileAppError
135
+ export class NotAuthorized_ApiKeyOnlyForOfficeIntegrationError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForOfficeIntegrationError' } } errorClasses.NotAuthorized_ApiKeyOnlyForOfficeIntegrationError = NotAuthorized_ApiKeyOnlyForOfficeIntegrationError
136
+ export class NotAuthorized_BillingPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_BillingPermissionRequiredError' } } errorClasses.NotAuthorized_BillingPermissionRequiredError = NotAuthorized_BillingPermissionRequiredError
137
+ export class NotAuthorized_BundleMaximumUsesReachedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_BundleMaximumUsesReachedError' } } errorClasses.NotAuthorized_BundleMaximumUsesReachedError = NotAuthorized_BundleMaximumUsesReachedError
138
+ export class NotAuthorized_CannotLoginWhileUsingKeyError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_CannotLoginWhileUsingKeyError' } } errorClasses.NotAuthorized_CannotLoginWhileUsingKeyError = NotAuthorized_CannotLoginWhileUsingKeyError
139
+ export class NotAuthorized_CantActForOtherUserError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_CantActForOtherUserError' } } errorClasses.NotAuthorized_CantActForOtherUserError = NotAuthorized_CantActForOtherUserError
140
+ export class NotAuthorized_ContactAdminForPasswordChangeHelpError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ContactAdminForPasswordChangeHelpError' } } errorClasses.NotAuthorized_ContactAdminForPasswordChangeHelpError = NotAuthorized_ContactAdminForPasswordChangeHelpError
141
+ export class NotAuthorized_FolderAdminOrBillingPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FolderAdminOrBillingPermissionRequiredError' } } errorClasses.NotAuthorized_FolderAdminOrBillingPermissionRequiredError = NotAuthorized_FolderAdminOrBillingPermissionRequiredError
142
+ export class NotAuthorized_FolderAdminPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FolderAdminPermissionRequiredError' } } errorClasses.NotAuthorized_FolderAdminPermissionRequiredError = NotAuthorized_FolderAdminPermissionRequiredError
143
+ export class NotAuthorized_FullPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FullPermissionRequiredError' } } errorClasses.NotAuthorized_FullPermissionRequiredError = NotAuthorized_FullPermissionRequiredError
144
+ export class NotAuthorized_HistoryPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_HistoryPermissionRequiredError' } } errorClasses.NotAuthorized_HistoryPermissionRequiredError = NotAuthorized_HistoryPermissionRequiredError
145
+ export class NotAuthorized_InsufficientPermissionForParamsError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_InsufficientPermissionForParamsError' } } errorClasses.NotAuthorized_InsufficientPermissionForParamsError = NotAuthorized_InsufficientPermissionForParamsError
146
+ export class NotAuthorized_MustAuthenticateWithApiKeyError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_MustAuthenticateWithApiKeyError' } } errorClasses.NotAuthorized_MustAuthenticateWithApiKeyError = NotAuthorized_MustAuthenticateWithApiKeyError
147
+ export class NotAuthorized_NeedAdminPermissionForInboxError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NeedAdminPermissionForInboxError' } } errorClasses.NotAuthorized_NeedAdminPermissionForInboxError = NotAuthorized_NeedAdminPermissionForInboxError
148
+ export class NotAuthorized_NonAdminsMustQueryByFolderOrPathError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NonAdminsMustQueryByFolderOrPathError' } } errorClasses.NotAuthorized_NonAdminsMustQueryByFolderOrPathError = NotAuthorized_NonAdminsMustQueryByFolderOrPathError
149
+ export class NotAuthorized_NotAllowedToCreateBundleError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NotAllowedToCreateBundleError' } } errorClasses.NotAuthorized_NotAllowedToCreateBundleError = NotAuthorized_NotAllowedToCreateBundleError
150
+ export class NotAuthorized_PasswordChangeNotRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_PasswordChangeNotRequiredError' } } errorClasses.NotAuthorized_PasswordChangeNotRequiredError = NotAuthorized_PasswordChangeNotRequiredError
151
+ export class NotAuthorized_PasswordChangeRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_PasswordChangeRequiredError' } } errorClasses.NotAuthorized_PasswordChangeRequiredError = NotAuthorized_PasswordChangeRequiredError
152
+ export class NotAuthorized_ReadOnlySessionError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReadOnlySessionError' } } errorClasses.NotAuthorized_ReadOnlySessionError = NotAuthorized_ReadOnlySessionError
153
+ export class NotAuthorized_ReadPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReadPermissionRequiredError' } } errorClasses.NotAuthorized_ReadPermissionRequiredError = NotAuthorized_ReadPermissionRequiredError
154
+ export class NotAuthorized_ReauthenticationFailedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationFailedError' } } errorClasses.NotAuthorized_ReauthenticationFailedError = NotAuthorized_ReauthenticationFailedError
155
+ export class NotAuthorized_ReauthenticationFailedFinalError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationFailedFinalError' } } errorClasses.NotAuthorized_ReauthenticationFailedFinalError = NotAuthorized_ReauthenticationFailedFinalError
156
+ export class NotAuthorized_ReauthenticationNeededActionError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationNeededActionError' } } errorClasses.NotAuthorized_ReauthenticationNeededActionError = NotAuthorized_ReauthenticationNeededActionError
157
+ export class NotAuthorized_SelfManagedRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SelfManagedRequiredError' } } errorClasses.NotAuthorized_SelfManagedRequiredError = NotAuthorized_SelfManagedRequiredError
158
+ export class NotAuthorized_SiteAdminRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SiteAdminRequiredError' } } errorClasses.NotAuthorized_SiteAdminRequiredError = NotAuthorized_SiteAdminRequiredError
159
+ export class NotAuthorized_SiteFilesAreImmutableError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SiteFilesAreImmutableError' } } errorClasses.NotAuthorized_SiteFilesAreImmutableError = NotAuthorized_SiteFilesAreImmutableError
160
+ export class NotAuthorized_TwoFactorAuthenticationRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_TwoFactorAuthenticationRequiredError' } } errorClasses.NotAuthorized_TwoFactorAuthenticationRequiredError = NotAuthorized_TwoFactorAuthenticationRequiredError
161
+ export class NotAuthorized_UserIdWithoutSiteAdminError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_UserIdWithoutSiteAdminError' } } errorClasses.NotAuthorized_UserIdWithoutSiteAdminError = NotAuthorized_UserIdWithoutSiteAdminError
162
+ export class NotAuthorized_WritePermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_WritePermissionRequiredError' } } errorClasses.NotAuthorized_WritePermissionRequiredError = NotAuthorized_WritePermissionRequiredError
163
+ export class NotAuthorized_ZipDownloadIpMismatchError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ZipDownloadIpMismatchError' } } errorClasses.NotAuthorized_ZipDownloadIpMismatchError = NotAuthorized_ZipDownloadIpMismatchError
164
+ export class NotFound_ApiKeyNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_ApiKeyNotFoundError' } } errorClasses.NotFound_ApiKeyNotFoundError = NotFound_ApiKeyNotFoundError
165
+ export class NotFound_BundlePathNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_BundlePathNotFoundError' } } errorClasses.NotFound_BundlePathNotFoundError = NotFound_BundlePathNotFoundError
166
+ export class NotFound_CodeNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_CodeNotFoundError' } } errorClasses.NotFound_CodeNotFoundError = NotFound_CodeNotFoundError
167
+ export class NotFound_FileNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FileNotFoundError' } } errorClasses.NotFound_FileNotFoundError = NotFound_FileNotFoundError
168
+ export class NotFound_FileUploadNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FileUploadNotFoundError' } } errorClasses.NotFound_FileUploadNotFoundError = NotFound_FileUploadNotFoundError
169
+ export class NotFound_FolderNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FolderNotFoundError' } } errorClasses.NotFound_FolderNotFoundError = NotFound_FolderNotFoundError
170
+ export class NotFound_GroupNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_GroupNotFoundError' } } errorClasses.NotFound_GroupNotFoundError = NotFound_GroupNotFoundError
171
+ export class NotFound_InboxNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_InboxNotFoundError' } } errorClasses.NotFound_InboxNotFoundError = NotFound_InboxNotFoundError
172
+ export class NotFound_NestedNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_NestedNotFoundError' } } errorClasses.NotFound_NestedNotFoundError = NotFound_NestedNotFoundError
173
+ export class NotFound_PlanNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_PlanNotFoundError' } } errorClasses.NotFound_PlanNotFoundError = NotFound_PlanNotFoundError
174
+ export class NotFound_SiteNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_SiteNotFoundError' } } errorClasses.NotFound_SiteNotFoundError = NotFound_SiteNotFoundError
175
+ export class NotFound_UserNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_UserNotFoundError' } } errorClasses.NotFound_UserNotFoundError = NotFound_UserNotFoundError
176
+ export class ProcessingFailure_BundleOnlyAllowsPreviewsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_BundleOnlyAllowsPreviewsError' } } errorClasses.ProcessingFailure_BundleOnlyAllowsPreviewsError = ProcessingFailure_BundleOnlyAllowsPreviewsError
177
+ export class ProcessingFailure_CouldNotCreateParentError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_CouldNotCreateParentError' } } errorClasses.ProcessingFailure_CouldNotCreateParentError = ProcessingFailure_CouldNotCreateParentError
178
+ export class ProcessingFailure_DestinationExistsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationExistsError' } } errorClasses.ProcessingFailure_DestinationExistsError = ProcessingFailure_DestinationExistsError
179
+ export class ProcessingFailure_DestinationFolderLimitedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationFolderLimitedError' } } errorClasses.ProcessingFailure_DestinationFolderLimitedError = ProcessingFailure_DestinationFolderLimitedError
180
+ export class ProcessingFailure_DestinationParentConflictError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationParentConflictError' } } errorClasses.ProcessingFailure_DestinationParentConflictError = ProcessingFailure_DestinationParentConflictError
181
+ export class ProcessingFailure_DestinationParentDoesNotExistError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationParentDoesNotExistError' } } errorClasses.ProcessingFailure_DestinationParentDoesNotExistError = ProcessingFailure_DestinationParentDoesNotExistError
182
+ export class ProcessingFailure_ExpiredPrivateKeyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExpiredPrivateKeyError' } } errorClasses.ProcessingFailure_ExpiredPrivateKeyError = ProcessingFailure_ExpiredPrivateKeyError
183
+ export class ProcessingFailure_ExpiredPublicKeyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExpiredPublicKeyError' } } errorClasses.ProcessingFailure_ExpiredPublicKeyError = ProcessingFailure_ExpiredPublicKeyError
184
+ export class ProcessingFailure_ExportFailureError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExportFailureError' } } errorClasses.ProcessingFailure_ExportFailureError = ProcessingFailure_ExportFailureError
185
+ export class ProcessingFailure_ExportNotReadyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExportNotReadyError' } } errorClasses.ProcessingFailure_ExportNotReadyError = ProcessingFailure_ExportNotReadyError
186
+ export class ProcessingFailure_FailedToChangePasswordError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FailedToChangePasswordError' } } errorClasses.ProcessingFailure_FailedToChangePasswordError = ProcessingFailure_FailedToChangePasswordError
187
+ export class ProcessingFailure_FileLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileLockedError' } } errorClasses.ProcessingFailure_FileLockedError = ProcessingFailure_FileLockedError
188
+ export class ProcessingFailure_FileNotUploadedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileNotUploadedError' } } errorClasses.ProcessingFailure_FileNotUploadedError = ProcessingFailure_FileNotUploadedError
189
+ export class ProcessingFailure_FilePendingProcessingError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FilePendingProcessingError' } } errorClasses.ProcessingFailure_FilePendingProcessingError = ProcessingFailure_FilePendingProcessingError
190
+ export class ProcessingFailure_FileTooBigToDecryptError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileTooBigToDecryptError' } } errorClasses.ProcessingFailure_FileTooBigToDecryptError = ProcessingFailure_FileTooBigToDecryptError
191
+ export class ProcessingFailure_FileTooBigToEncryptError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileTooBigToEncryptError' } } errorClasses.ProcessingFailure_FileTooBigToEncryptError = ProcessingFailure_FileTooBigToEncryptError
192
+ export class ProcessingFailure_FileUploadedToWrongRegionError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileUploadedToWrongRegionError' } } errorClasses.ProcessingFailure_FileUploadedToWrongRegionError = ProcessingFailure_FileUploadedToWrongRegionError
193
+ export class ProcessingFailure_FolderLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FolderLockedError' } } errorClasses.ProcessingFailure_FolderLockedError = ProcessingFailure_FolderLockedError
194
+ export class ProcessingFailure_FolderNotEmptyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FolderNotEmptyError' } } errorClasses.ProcessingFailure_FolderNotEmptyError = ProcessingFailure_FolderNotEmptyError
195
+ export class ProcessingFailure_HistoryUnavailableError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_HistoryUnavailableError' } } errorClasses.ProcessingFailure_HistoryUnavailableError = ProcessingFailure_HistoryUnavailableError
196
+ export class ProcessingFailure_InvalidBundleCodeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidBundleCodeError' } } errorClasses.ProcessingFailure_InvalidBundleCodeError = ProcessingFailure_InvalidBundleCodeError
197
+ export class ProcessingFailure_InvalidFileTypeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidFileTypeError' } } errorClasses.ProcessingFailure_InvalidFileTypeError = ProcessingFailure_InvalidFileTypeError
198
+ export class ProcessingFailure_InvalidFilenameError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidFilenameError' } } errorClasses.ProcessingFailure_InvalidFilenameError = ProcessingFailure_InvalidFilenameError
199
+ export class ProcessingFailure_InvalidRangeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidRangeError' } } errorClasses.ProcessingFailure_InvalidRangeError = ProcessingFailure_InvalidRangeError
200
+ export class ProcessingFailure_ModelSaveErrorError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ModelSaveErrorError' } } errorClasses.ProcessingFailure_ModelSaveErrorError = ProcessingFailure_ModelSaveErrorError
201
+ export class ProcessingFailure_MultipartUploadsRequiredForRemotesError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_MultipartUploadsRequiredForRemotesError' } } errorClasses.ProcessingFailure_MultipartUploadsRequiredForRemotesError = ProcessingFailure_MultipartUploadsRequiredForRemotesError
202
+ export class ProcessingFailure_MultipleProcessingErrorsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_MultipleProcessingErrorsError' } } errorClasses.ProcessingFailure_MultipleProcessingErrorsError = ProcessingFailure_MultipleProcessingErrorsError
203
+ export class ProcessingFailure_PathTooLongError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_PathTooLongError' } } errorClasses.ProcessingFailure_PathTooLongError = ProcessingFailure_PathTooLongError
204
+ export class ProcessingFailure_RecipientAlreadySharedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_RecipientAlreadySharedError' } } errorClasses.ProcessingFailure_RecipientAlreadySharedError = ProcessingFailure_RecipientAlreadySharedError
205
+ export class ProcessingFailure_RemoteServerErrorError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_RemoteServerErrorError' } } errorClasses.ProcessingFailure_RemoteServerErrorError = ProcessingFailure_RemoteServerErrorError
206
+ export class ProcessingFailure_ResourceLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ResourceLockedError' } } errorClasses.ProcessingFailure_ResourceLockedError = ProcessingFailure_ResourceLockedError
207
+ export class ProcessingFailure_SubfolderLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_SubfolderLockedError' } } errorClasses.ProcessingFailure_SubfolderLockedError = ProcessingFailure_SubfolderLockedError
208
+ export class ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError' } } errorClasses.ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError = ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError
209
+ export class ProcessingFailure_UpdatesNotAllowedForRemotesError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_UpdatesNotAllowedForRemotesError' } } errorClasses.ProcessingFailure_UpdatesNotAllowedForRemotesError = ProcessingFailure_UpdatesNotAllowedForRemotesError
210
+ export class RateLimited_ReauthenticationRateLimitedError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_ReauthenticationRateLimitedError' } } errorClasses.RateLimited_ReauthenticationRateLimitedError = RateLimited_ReauthenticationRateLimitedError
211
+ export class RateLimited_TooManyConcurrentRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyConcurrentRequestsError' } } errorClasses.RateLimited_TooManyConcurrentRequestsError = RateLimited_TooManyConcurrentRequestsError
212
+ export class RateLimited_TooManyLoginAttemptsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyLoginAttemptsError' } } errorClasses.RateLimited_TooManyLoginAttemptsError = RateLimited_TooManyLoginAttemptsError
213
+ export class RateLimited_TooManyRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyRequestsError' } } errorClasses.RateLimited_TooManyRequestsError = RateLimited_TooManyRequestsError
214
+ export class ServiceUnavailable_UploadsUnavailableError extends ServiceUnavailableError { constructor(message, code) { super(message, code); this.name = 'ServiceUnavailable_UploadsUnavailableError' } } errorClasses.ServiceUnavailable_UploadsUnavailableError = ServiceUnavailable_UploadsUnavailableError
215
+ export class SiteConfiguration_AccountAlreadyExistsError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountAlreadyExistsError' } } errorClasses.SiteConfiguration_AccountAlreadyExistsError = SiteConfiguration_AccountAlreadyExistsError
216
+ export class SiteConfiguration_AccountOverdueError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountOverdueError' } } errorClasses.SiteConfiguration_AccountOverdueError = SiteConfiguration_AccountOverdueError
217
+ export class SiteConfiguration_NoAccountForSiteError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_NoAccountForSiteError' } } errorClasses.SiteConfiguration_NoAccountForSiteError = SiteConfiguration_NoAccountForSiteError
218
+ export class SiteConfiguration_SiteWasRemovedError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_SiteWasRemovedError' } } errorClasses.SiteConfiguration_SiteWasRemovedError = SiteConfiguration_SiteWasRemovedError
219
+ export class SiteConfiguration_TrialExpiredError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_TrialExpiredError' } } errorClasses.SiteConfiguration_TrialExpiredError = SiteConfiguration_TrialExpiredError
220
+ export class SiteConfiguration_TrialLockedError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_TrialLockedError' } } errorClasses.SiteConfiguration_TrialLockedError = SiteConfiguration_TrialLockedError
221
+ export class SiteConfiguration_UserRequestsEnabledRequiredError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_UserRequestsEnabledRequiredError' } } errorClasses.SiteConfiguration_UserRequestsEnabledRequiredError = SiteConfiguration_UserRequestsEnabledRequiredError
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -123,7 +124,7 @@ class ActionNotificationExport {
123
124
 
124
125
  save = () => {
125
126
  if (this.attributes['id']) {
126
- throw new Error('The ActionNotificationExport object doesn\'t support updates.')
127
+ throw new errors.NotImplementedError('The ActionNotificationExport object doesn\'t support updates.')
127
128
  } else {
128
129
  const newObject = ActionNotificationExport.create(this.attributes, this.options)
129
130
  this.attributes = { ...newObject.attributes }
@@ -135,17 +136,17 @@ class ActionNotificationExport {
135
136
  // id (required) - int64 - Action Notification Export ID.
136
137
  static find = async (id, params = {}, options = {}) => {
137
138
  if (!isObject(params)) {
138
- throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
139
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
139
140
  }
140
141
 
141
142
  params['id'] = id
142
143
 
143
144
  if (!params['id']) {
144
- throw new Error('Parameter missing: id')
145
+ throw new errors.MissingParameterError('Parameter missing: id')
145
146
  }
146
147
 
147
148
  if (params['id'] && !isInt(params['id'])) {
148
- throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
149
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
149
150
  }
150
151
 
151
152
  const response = await Api.sendRequest(`/action_notification_exports/${params['id']}`, 'GET', params, options)
@@ -169,39 +170,39 @@ class ActionNotificationExport {
169
170
  // query_folder - string - Return notifications that were triggered by actions in this folder.
170
171
  static create = async (params = {}, options = {}) => {
171
172
  if (params['user_id'] && !isInt(params['user_id'])) {
172
- throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
173
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
173
174
  }
174
175
 
175
176
  if (params['start_at'] && !isString(params['start_at'])) {
176
- throw new Error(`Bad parameter: start_at must be of type String, received ${getType(start_at)}`)
177
+ throw new errors.InvalidParameterError(`Bad parameter: start_at must be of type String, received ${getType(start_at)}`)
177
178
  }
178
179
 
179
180
  if (params['end_at'] && !isString(params['end_at'])) {
180
- throw new Error(`Bad parameter: end_at must be of type String, received ${getType(end_at)}`)
181
+ throw new errors.InvalidParameterError(`Bad parameter: end_at must be of type String, received ${getType(end_at)}`)
181
182
  }
182
183
 
183
184
  if (params['query_message'] && !isString(params['query_message'])) {
184
- throw new Error(`Bad parameter: query_message must be of type String, received ${getType(query_message)}`)
185
+ throw new errors.InvalidParameterError(`Bad parameter: query_message must be of type String, received ${getType(query_message)}`)
185
186
  }
186
187
 
187
188
  if (params['query_request_method'] && !isString(params['query_request_method'])) {
188
- throw new Error(`Bad parameter: query_request_method must be of type String, received ${getType(query_request_method)}`)
189
+ throw new errors.InvalidParameterError(`Bad parameter: query_request_method must be of type String, received ${getType(query_request_method)}`)
189
190
  }
190
191
 
191
192
  if (params['query_request_url'] && !isString(params['query_request_url'])) {
192
- throw new Error(`Bad parameter: query_request_url must be of type String, received ${getType(query_request_url)}`)
193
+ throw new errors.InvalidParameterError(`Bad parameter: query_request_url must be of type String, received ${getType(query_request_url)}`)
193
194
  }
194
195
 
195
196
  if (params['query_status'] && !isString(params['query_status'])) {
196
- throw new Error(`Bad parameter: query_status must be of type String, received ${getType(query_status)}`)
197
+ throw new errors.InvalidParameterError(`Bad parameter: query_status must be of type String, received ${getType(query_status)}`)
197
198
  }
198
199
 
199
200
  if (params['query_path'] && !isString(params['query_path'])) {
200
- throw new Error(`Bad parameter: query_path must be of type String, received ${getType(query_path)}`)
201
+ throw new errors.InvalidParameterError(`Bad parameter: query_path must be of type String, received ${getType(query_path)}`)
201
202
  }
202
203
 
203
204
  if (params['query_folder'] && !isString(params['query_folder'])) {
204
- throw new Error(`Bad parameter: query_folder must be of type String, received ${getType(query_folder)}`)
205
+ throw new errors.InvalidParameterError(`Bad parameter: query_folder must be of type String, received ${getType(query_folder)}`)
205
206
  }
206
207
 
207
208
  const response = await Api.sendRequest(`/action_notification_exports`, 'POST', params, options)
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -60,23 +61,23 @@ class ActionNotificationExportResult {
60
61
  // action_notification_export_id (required) - int64 - ID of the associated action notification export.
61
62
  static list = async (params = {}, options = {}) => {
62
63
  if (!params['action_notification_export_id']) {
63
- throw new Error('Parameter missing: action_notification_export_id')
64
+ throw new errors.MissingParameterError('Parameter missing: action_notification_export_id')
64
65
  }
65
66
 
66
67
  if (params['user_id'] && !isInt(params['user_id'])) {
67
- throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
68
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
68
69
  }
69
70
 
70
71
  if (params['cursor'] && !isString(params['cursor'])) {
71
- throw new Error(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
72
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
72
73
  }
73
74
 
74
75
  if (params['per_page'] && !isInt(params['per_page'])) {
75
- throw new Error(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
76
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
76
77
  }
77
78
 
78
79
  if (params['action_notification_export_id'] && !isInt(params['action_notification_export_id'])) {
79
- throw new Error(`Bad parameter: action_notification_export_id must be of type Int, received ${getType(action_notification_export_id)}`)
80
+ throw new errors.InvalidParameterError(`Bad parameter: action_notification_export_id must be of type Int, received ${getType(action_notification_export_id)}`)
80
81
  }
81
82
 
82
83
  const response = await Api.sendRequest(`/action_notification_export_results`, 'GET', params, options)
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -26,23 +27,23 @@ class ActionWebhookFailure {
26
27
  // retry Action Webhook Failure
27
28
  retry = async (params = {}) => {
28
29
  if (!this.attributes.id) {
29
- throw new Error('Current object has no id')
30
+ throw new errors.EmptyPropertyError('Current object has no id')
30
31
  }
31
32
 
32
33
  if (!isObject(params)) {
33
- throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
34
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
34
35
  }
35
36
 
36
37
  params.id = this.attributes.id
37
38
  if (params['id'] && !isInt(params['id'])) {
38
- throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
39
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
39
40
  }
40
41
 
41
42
  if (!params['id']) {
42
43
  if (this.attributes.id) {
43
44
  params['id'] = this.id
44
45
  } else {
45
- throw new Error('Parameter missing: id')
46
+ throw new errors.MissingParameterError('Parameter missing: id')
46
47
  }
47
48
  }
48
49
 
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -102,32 +103,32 @@ class ApiKey {
102
103
  // permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
103
104
  update = async (params = {}) => {
104
105
  if (!this.attributes.id) {
105
- throw new Error('Current object has no id')
106
+ throw new errors.EmptyPropertyError('Current object has no id')
106
107
  }
107
108
 
108
109
  if (!isObject(params)) {
109
- throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
110
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
110
111
  }
111
112
 
112
113
  params.id = this.attributes.id
113
114
  if (params['id'] && !isInt(params['id'])) {
114
- throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
115
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
115
116
  }
116
117
  if (params['name'] && !isString(params['name'])) {
117
- throw new Error(`Bad parameter: name must be of type String, received ${getType(name)}`)
118
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
118
119
  }
119
120
  if (params['expires_at'] && !isString(params['expires_at'])) {
120
- throw new Error(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
121
+ throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
121
122
  }
122
123
  if (params['permission_set'] && !isString(params['permission_set'])) {
123
- throw new Error(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
124
+ throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
124
125
  }
125
126
 
126
127
  if (!params['id']) {
127
128
  if (this.attributes.id) {
128
129
  params['id'] = this.id
129
130
  } else {
130
- throw new Error('Parameter missing: id')
131
+ throw new errors.MissingParameterError('Parameter missing: id')
131
132
  }
132
133
  }
133
134
 
@@ -138,23 +139,23 @@ class ApiKey {
138
139
 
139
140
  delete = async (params = {}) => {
140
141
  if (!this.attributes.id) {
141
- throw new Error('Current object has no id')
142
+ throw new errors.EmptyPropertyError('Current object has no id')
142
143
  }
143
144
 
144
145
  if (!isObject(params)) {
145
- throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
146
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
146
147
  }
147
148
 
148
149
  params.id = this.attributes.id
149
150
  if (params['id'] && !isInt(params['id'])) {
150
- throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
151
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
151
152
  }
152
153
 
153
154
  if (!params['id']) {
154
155
  if (this.attributes.id) {
155
156
  params['id'] = this.id
156
157
  } else {
157
- throw new Error('Parameter missing: id')
158
+ throw new errors.MissingParameterError('Parameter missing: id')
158
159
  }
159
160
  }
160
161
 
@@ -189,15 +190,15 @@ class ApiKey {
189
190
  // filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `expires_at`.
190
191
  static list = async (params = {}, options = {}) => {
191
192
  if (params['user_id'] && !isInt(params['user_id'])) {
192
- throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
193
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
193
194
  }
194
195
 
195
196
  if (params['cursor'] && !isString(params['cursor'])) {
196
- throw new Error(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
197
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
197
198
  }
198
199
 
199
200
  if (params['per_page'] && !isInt(params['per_page'])) {
200
- throw new Error(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
201
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
201
202
  }
202
203
 
203
204
  const response = await Api.sendRequest(`/api_keys`, 'GET', params, options)
@@ -218,17 +219,17 @@ class ApiKey {
218
219
  // id (required) - int64 - Api Key ID.
219
220
  static find = async (id, params = {}, options = {}) => {
220
221
  if (!isObject(params)) {
221
- throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
222
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
222
223
  }
223
224
 
224
225
  params['id'] = id
225
226
 
226
227
  if (!params['id']) {
227
- throw new Error('Parameter missing: id')
228
+ throw new errors.MissingParameterError('Parameter missing: id')
228
229
  }
229
230
 
230
231
  if (params['id'] && !isInt(params['id'])) {
231
- throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
232
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
232
233
  }
233
234
 
234
235
  const response = await Api.sendRequest(`/api_keys/${params['id']}`, 'GET', params, options)
@@ -247,23 +248,23 @@ class ApiKey {
247
248
  // path - string - Folder path restriction for this api key.
248
249
  static create = async (params = {}, options = {}) => {
249
250
  if (params['user_id'] && !isInt(params['user_id'])) {
250
- throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
251
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
251
252
  }
252
253
 
253
254
  if (params['name'] && !isString(params['name'])) {
254
- throw new Error(`Bad parameter: name must be of type String, received ${getType(name)}`)
255
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
255
256
  }
256
257
 
257
258
  if (params['expires_at'] && !isString(params['expires_at'])) {
258
- throw new Error(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
259
+ throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
259
260
  }
260
261
 
261
262
  if (params['permission_set'] && !isString(params['permission_set'])) {
262
- throw new Error(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
263
+ throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
263
264
  }
264
265
 
265
266
  if (params['path'] && !isString(params['path'])) {
266
- throw new Error(`Bad parameter: path must be of type String, received ${getType(path)}`)
267
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
267
268
  }
268
269
 
269
270
  const response = await Api.sendRequest(`/api_keys`, 'POST', params, options)
@@ -277,15 +278,15 @@ class ApiKey {
277
278
  // permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
278
279
  static updateCurrent = async (params = {}, options = {}) => {
279
280
  if (params['expires_at'] && !isString(params['expires_at'])) {
280
- throw new Error(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
281
+ throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
281
282
  }
282
283
 
283
284
  if (params['name'] && !isString(params['name'])) {
284
- throw new Error(`Bad parameter: name must be of type String, received ${getType(name)}`)
285
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
285
286
  }
286
287
 
287
288
  if (params['permission_set'] && !isString(params['permission_set'])) {
288
- throw new Error(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
289
+ throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(permission_set)}`)
289
290
  }
290
291
 
291
292
  const response = await Api.sendRequest(`/api_key`, 'PATCH', params, options)
package/src/models/App.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import Api from '../Api'
2
+ import * as errors from '../Errors'
2
3
  import Logger from '../Logger'
3
4
  import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
4
5
 
@@ -83,11 +84,11 @@ class App {
83
84
  // filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `name` and `app_type`. Valid field combinations are `[ name, app_type ]` and `[ app_type, name ]`.
84
85
  static list = async (params = {}, options = {}) => {
85
86
  if (params['cursor'] && !isString(params['cursor'])) {
86
- throw new Error(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
87
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
87
88
  }
88
89
 
89
90
  if (params['per_page'] && !isInt(params['per_page'])) {
90
- throw new Error(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
91
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
91
92
  }
92
93
 
93
94
  const response = await Api.sendRequest(`/apps`, 'GET', params, options)