files.com 1.0.188 → 1.0.191
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/Errors.md +186 -0
- package/docs/models/AccountLineItem.md +53 -0
- package/docs/models/Action.md +37 -0
- package/docs/models/ActionNotificationExport.md +82 -0
- package/docs/models/ActionNotificationExportResult.md +49 -0
- package/docs/models/ActionWebhookFailure.md +16 -0
- package/docs/models/ApiKey.md +183 -0
- package/docs/models/App.md +66 -0
- package/docs/models/As2IncomingMessage.md +104 -0
- package/docs/models/As2OutgoingMessage.md +96 -0
- package/docs/models/As2Partner.md +141 -0
- package/docs/models/As2Station.md +142 -0
- package/docs/models/Auto.md +11 -0
- package/docs/models/Automation.md +257 -0
- package/docs/models/AutomationRun.md +61 -0
- package/docs/models/BandwidthSnapshot.md +50 -0
- package/docs/models/Behavior.md +195 -0
- package/docs/models/Bundle.md +330 -0
- package/docs/models/BundleDownload.md +44 -0
- package/docs/models/BundleRecipient.md +76 -0
- package/docs/models/BundleRegistration.md +53 -0
- package/docs/models/Clickwrap.md +120 -0
- package/docs/models/DnsRecord.md +33 -0
- package/docs/models/Errors.md +17 -0
- package/docs/models/ExternalEvent.md +84 -0
- package/docs/models/File.md +339 -0
- package/docs/models/FileAction.md +13 -0
- package/docs/models/FileComment.md +98 -0
- package/docs/models/FileCommentReaction.md +50 -0
- package/docs/models/FileMigration.md +40 -0
- package/docs/models/FileUploadPart.md +39 -0
- package/docs/models/Folder.md +90 -0
- package/docs/models/FormField.md +29 -0
- package/docs/models/FormFieldSet.md +170 -0
- package/docs/models/Group.md +140 -0
- package/docs/models/GroupUser.md +116 -0
- package/docs/models/History.md +151 -0
- package/docs/models/HistoryExport.md +130 -0
- package/docs/models/HistoryExportResult.md +75 -0
- package/docs/models/Image.md +13 -0
- package/docs/models/InboxRecipient.md +76 -0
- package/docs/models/InboxRegistration.md +47 -0
- package/docs/models/InboxUpload.md +42 -0
- package/docs/models/Invoice.md +82 -0
- package/docs/models/InvoiceLineItem.md +27 -0
- package/docs/models/IpAddress.md +51 -0
- package/docs/models/Lock.md +92 -0
- package/docs/models/Message.md +134 -0
- package/docs/models/MessageComment.md +114 -0
- package/docs/models/MessageCommentReaction.md +79 -0
- package/docs/models/MessageReaction.md +79 -0
- package/docs/models/Notification.md +241 -0
- package/docs/models/Payment.md +82 -0
- package/docs/models/PaymentLineItem.md +19 -0
- package/docs/models/Permission.md +94 -0
- package/docs/models/Preview.md +19 -0
- package/docs/models/Priority.md +30 -0
- package/docs/models/Project.md +98 -0
- package/docs/models/PublicIpAddress.md +17 -0
- package/docs/models/PublicKey.md +112 -0
- package/docs/models/RemoteBandwidthSnapshot.md +42 -0
- package/docs/models/RemoteServer.md +385 -0
- package/docs/models/Request.md +97 -0
- package/docs/models/Session.md +50 -0
- package/docs/models/SettingsChange.md +44 -0
- package/docs/models/Site.md +607 -0
- package/docs/models/SsoStrategy.md +139 -0
- package/docs/models/Status.md +30 -0
- package/docs/models/Style.md +76 -0
- package/docs/models/UsageDailySnapshot.md +56 -0
- package/docs/models/UsageSnapshot.md +63 -0
- package/docs/models/User.md +465 -0
- package/docs/models/UserCipherUse.md +39 -0
- package/docs/models/UserRequest.md +80 -0
- package/docs/models/WebhookTest.md +59 -0
- package/lib/Api.js +12 -11
- package/lib/Errors.js +3126 -0
- package/lib/models/AccountLineItem.js +8 -0
- package/lib/models/Action.js +8 -0
- package/lib/models/ActionNotificationExport.js +21 -13
- package/lib/models/ActionNotificationExportResult.js +13 -5
- package/lib/models/ActionWebhookFailure.js +12 -4
- package/lib/models/ApiKey.js +33 -25
- package/lib/models/App.js +10 -2
- package/lib/models/As2IncomingMessage.js +11 -3
- package/lib/models/As2OutgoingMessage.js +11 -3
- package/lib/models/As2Partner.js +34 -26
- package/lib/models/As2Station.js +32 -24
- package/lib/models/Auto.js +8 -0
- package/lib/models/Automation.js +54 -60
- package/lib/models/AutomationRun.js +16 -8
- package/lib/models/BandwidthSnapshot.js +10 -2
- package/lib/models/Behavior.js +46 -38
- package/lib/models/Bundle.js +51 -43
- package/lib/models/BundleDownload.js +12 -4
- package/lib/models/BundleRecipient.js +22 -14
- package/lib/models/BundleRegistration.js +12 -4
- package/lib/models/Clickwrap.js +31 -23
- package/lib/models/DnsRecord.js +10 -2
- package/lib/models/Errors.js +8 -0
- package/lib/models/ExternalEvent.js +18 -10
- package/lib/models/File.js +68 -60
- package/lib/models/FileAction.js +8 -0
- package/lib/models/FileComment.js +27 -19
- package/lib/models/FileCommentReaction.js +18 -10
- package/lib/models/FileMigration.js +11 -3
- package/lib/models/FileUploadPart.js +8 -0
- package/lib/models/Folder.js +19 -11
- package/lib/models/FormField.js +8 -0
- package/lib/models/FormFieldSet.js +27 -19
- package/lib/models/Group.js +30 -22
- package/lib/models/GroupUser.js +32 -24
- package/lib/models/History.js +42 -34
- package/lib/models/HistoryExport.js +34 -26
- package/lib/models/HistoryExportResult.js +13 -5
- package/lib/models/Image.js +8 -0
- package/lib/models/InboxRecipient.js +22 -14
- package/lib/models/InboxRegistration.js +11 -3
- package/lib/models/InboxUpload.js +12 -4
- package/lib/models/Invoice.js +13 -5
- package/lib/models/InvoiceLineItem.js +8 -0
- package/lib/models/IpAddress.js +12 -4
- package/lib/models/Lock.js +24 -16
- package/lib/models/Message.js +37 -29
- package/lib/models/MessageComment.js +29 -21
- package/lib/models/MessageCommentReaction.js +24 -16
- package/lib/models/MessageReaction.js +24 -16
- package/lib/models/Notification.js +38 -30
- package/lib/models/Payment.js +13 -5
- package/lib/models/PaymentLineItem.js +8 -0
- package/lib/models/Permission.js +23 -15
- package/lib/models/Preview.js +8 -0
- package/lib/models/Priority.js +13 -5
- package/lib/models/Project.js +25 -17
- package/lib/models/PublicIpAddress.js +8 -0
- package/lib/models/PublicKey.js +29 -21
- package/lib/models/RemoteBandwidthSnapshot.js +10 -2
- package/lib/models/RemoteServer.js +226 -196
- package/lib/models/Request.js +27 -19
- package/lib/models/Session.js +13 -5
- package/lib/models/SettingsChange.js +10 -2
- package/lib/models/Site.js +65 -57
- package/lib/models/SsoStrategy.js +17 -9
- package/lib/models/Status.js +8 -0
- package/lib/models/Style.js +20 -12
- package/lib/models/UsageDailySnapshot.js +10 -2
- package/lib/models/UsageSnapshot.js +10 -2
- package/lib/models/User.js +85 -77
- package/lib/models/UserCipherUse.js +11 -3
- package/lib/models/UserRequest.js +24 -16
- package/lib/models/WebhookTest.js +16 -8
- package/package.json +1 -1
- package/src/Api.js +4 -8
- package/src/Errors.js +222 -0
- package/src/models/AccountLineItem.js +1 -0
- package/src/models/Action.js +1 -0
- package/src/models/ActionNotificationExport.js +14 -13
- package/src/models/ActionNotificationExportResult.js +6 -5
- package/src/models/ActionWebhookFailure.js +5 -4
- package/src/models/ApiKey.js +26 -25
- package/src/models/App.js +3 -2
- package/src/models/As2IncomingMessage.js +4 -3
- package/src/models/As2OutgoingMessage.js +4 -3
- package/src/models/As2Partner.js +27 -26
- package/src/models/As2Station.js +25 -24
- package/src/models/Auto.js +1 -0
- package/src/models/Automation.js +51 -62
- package/src/models/AutomationRun.js +9 -8
- package/src/models/BandwidthSnapshot.js +3 -2
- package/src/models/Behavior.js +39 -38
- package/src/models/Bundle.js +44 -43
- package/src/models/BundleDownload.js +5 -4
- package/src/models/BundleRecipient.js +15 -14
- package/src/models/BundleRegistration.js +5 -4
- package/src/models/Clickwrap.js +24 -23
- package/src/models/DnsRecord.js +3 -2
- package/src/models/Errors.js +1 -0
- package/src/models/ExternalEvent.js +11 -10
- package/src/models/File.js +61 -60
- package/src/models/FileAction.js +1 -0
- package/src/models/FileComment.js +20 -19
- package/src/models/FileCommentReaction.js +11 -10
- package/src/models/FileMigration.js +4 -3
- package/src/models/FileUploadPart.js +1 -0
- package/src/models/Folder.js +12 -11
- package/src/models/FormField.js +1 -0
- package/src/models/FormFieldSet.js +20 -19
- package/src/models/Group.js +23 -22
- package/src/models/GroupUser.js +25 -24
- package/src/models/History.js +35 -34
- package/src/models/HistoryExport.js +27 -26
- package/src/models/HistoryExportResult.js +6 -5
- package/src/models/Image.js +1 -0
- package/src/models/InboxRecipient.js +15 -14
- package/src/models/InboxRegistration.js +4 -3
- package/src/models/InboxUpload.js +5 -4
- package/src/models/Invoice.js +6 -5
- package/src/models/InvoiceLineItem.js +1 -0
- package/src/models/IpAddress.js +5 -4
- package/src/models/Lock.js +17 -16
- package/src/models/Message.js +30 -29
- package/src/models/MessageComment.js +22 -21
- package/src/models/MessageCommentReaction.js +17 -16
- package/src/models/MessageReaction.js +17 -16
- package/src/models/Notification.js +31 -30
- package/src/models/Payment.js +6 -5
- package/src/models/PaymentLineItem.js +1 -0
- package/src/models/Permission.js +16 -15
- package/src/models/Preview.js +3 -2
- package/src/models/Priority.js +6 -5
- package/src/models/Project.js +18 -17
- package/src/models/PublicIpAddress.js +1 -0
- package/src/models/PublicKey.js +22 -21
- package/src/models/RemoteBandwidthSnapshot.js +3 -2
- package/src/models/RemoteServer.js +120 -103
- package/src/models/Request.js +20 -19
- package/src/models/Session.js +6 -5
- package/src/models/SettingsChange.js +3 -2
- package/src/models/Site.js +58 -57
- package/src/models/SsoStrategy.js +10 -9
- package/src/models/Status.js +1 -0
- package/src/models/Style.js +13 -12
- package/src/models/UsageDailySnapshot.js +3 -2
- package/src/models/UsageSnapshot.js +3 -2
- package/src/models/User.js +78 -77
- package/src/models/UserCipherUse.js +4 -3
- package/src/models/UserRequest.js +17 -16
- package/src/models/WebhookTest.js +9 -8
- package/test/src/index.js +46 -0
package/src/Errors.js
ADDED
@@ -0,0 +1,222 @@
|
|
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, code)
|
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 code = response?.status || errorData?.['http-code'] || 0
|
32
|
+
|
33
|
+
if (!errorData) {
|
34
|
+
Logger.error('FilesApiError Exception >', code, response.statusText)
|
35
|
+
throw new FilesApiError(error.statusText, code)
|
36
|
+
}
|
37
|
+
|
38
|
+
if (Array.isArray(errorData)) {
|
39
|
+
errorData = errorData[0]
|
40
|
+
}
|
41
|
+
|
42
|
+
if (!errorData.type) {
|
43
|
+
Logger.error('FilesApiError Exception >', code, response.statusText)
|
44
|
+
throw new FilesApiError(error.statusText, code)
|
45
|
+
}
|
46
|
+
|
47
|
+
const parts = errorData.type.split('/')
|
48
|
+
|
49
|
+
let errorFamily
|
50
|
+
let errorType
|
51
|
+
let className
|
52
|
+
|
53
|
+
if (parts.length > 1) {
|
54
|
+
[errorFamily, errorType] = parts.map(toPascalCase)
|
55
|
+
className = `${errorFamily}_${errorType}Error`
|
56
|
+
} else {
|
57
|
+
errorFamily = toPascalCase(parts[0])
|
58
|
+
className = `${errorType}Error`
|
59
|
+
}
|
60
|
+
|
61
|
+
const ErrorClass = errorClasses[className]
|
62
|
+
|
63
|
+
Logger.error(`${className} Exception >`, code, response.statusText)
|
64
|
+
throw new ErrorClass(error.statusText, code)
|
65
|
+
}
|
66
|
+
|
67
|
+
// general errors
|
68
|
+
export class ConfigurationError extends FilesError { constructor(message) { super(message); this.name = 'ConfigurationError' } } errorClasses.ConfigurationError = ConfigurationError
|
69
|
+
export class EmptyPropertyError extends FilesError { constructor(message) { super(message); this.name = 'EmptyPropertyError' } } errorClasses.EmptyPropertyError = EmptyPropertyError
|
70
|
+
export class InvalidParameterError extends FilesError { constructor(message) { super(message); this.name = 'InvalidParameterError' } } errorClasses.InvalidParameterError = InvalidParameterError
|
71
|
+
export class MissingParameterError extends FilesError { constructor(message) { super(message); this.name = 'MissingParameterError' } } errorClasses.MissingParameterError = MissingParameterError
|
72
|
+
export class NotImplementedError extends FilesError { constructor(message) { super(message); this.name = 'NotImplementedError' } } errorClasses.NotImplementedError = NotImplementedError
|
73
|
+
|
74
|
+
// api error groups
|
75
|
+
export class BadRequestError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'BadRequestError' } } errorClasses.BadRequestError = BadRequestError
|
76
|
+
export class NotAuthenticatedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticatedError' } } errorClasses.NotAuthenticatedError = NotAuthenticatedError
|
77
|
+
export class NotAuthorizedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotAuthorizedError' } } errorClasses.NotAuthorizedError = NotAuthorizedError
|
78
|
+
export class NotFoundError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'NotFoundError' } } errorClasses.NotFoundError = NotFoundError
|
79
|
+
export class ProcessingFailureError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailureError' } } errorClasses.ProcessingFailureError = ProcessingFailureError
|
80
|
+
export class RateLimitedError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'RateLimitedError' } } errorClasses.RateLimitedError = RateLimitedError
|
81
|
+
export class ServiceUnavailableError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'ServiceUnavailableError' } } errorClasses.ServiceUnavailableError = ServiceUnavailableError
|
82
|
+
export class SiteConfigurationError extends FilesApiError { constructor(message, code) { super(message, code); this.name = 'SiteConfigurationError' } } errorClasses.SiteConfigurationError = SiteConfigurationError
|
83
|
+
|
84
|
+
|
85
|
+
// grouped api errors
|
86
|
+
export class BadRequest_AttachmentTooLargeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_AttachmentTooLargeError' } } errorClasses.BadRequest_AttachmentTooLargeError = BadRequest_AttachmentTooLargeError
|
87
|
+
export class BadRequest_CannotDownloadDirectoryError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_CannotDownloadDirectoryError' } } errorClasses.BadRequest_CannotDownloadDirectoryError = BadRequest_CannotDownloadDirectoryError
|
88
|
+
export class BadRequest_CantMoveWithMultipleLocationsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_CantMoveWithMultipleLocationsError' } } errorClasses.BadRequest_CantMoveWithMultipleLocationsError = BadRequest_CantMoveWithMultipleLocationsError
|
89
|
+
export class BadRequest_DatetimeParseError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_DatetimeParseError' } } errorClasses.BadRequest_DatetimeParseError = BadRequest_DatetimeParseError
|
90
|
+
export class BadRequest_DestinationSameError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_DestinationSameError' } } errorClasses.BadRequest_DestinationSameError = BadRequest_DestinationSameError
|
91
|
+
export class BadRequest_FolderMustNotBeAFileError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_FolderMustNotBeAFileError' } } errorClasses.BadRequest_FolderMustNotBeAFileError = BadRequest_FolderMustNotBeAFileError
|
92
|
+
export class BadRequest_InvalidBodyError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidBodyError' } } errorClasses.BadRequest_InvalidBodyError = BadRequest_InvalidBodyError
|
93
|
+
export class BadRequest_InvalidCursorError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidCursorError' } } errorClasses.BadRequest_InvalidCursorError = BadRequest_InvalidCursorError
|
94
|
+
export class BadRequest_InvalidEtagsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidEtagsError' } } errorClasses.BadRequest_InvalidEtagsError = BadRequest_InvalidEtagsError
|
95
|
+
export class BadRequest_InvalidFilterCombinationError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidFilterCombinationError' } } errorClasses.BadRequest_InvalidFilterCombinationError = BadRequest_InvalidFilterCombinationError
|
96
|
+
export class BadRequest_InvalidFilterFieldError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidFilterFieldError' } } errorClasses.BadRequest_InvalidFilterFieldError = BadRequest_InvalidFilterFieldError
|
97
|
+
export class BadRequest_InvalidInputEncodingError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidInputEncodingError' } } errorClasses.BadRequest_InvalidInputEncodingError = BadRequest_InvalidInputEncodingError
|
98
|
+
export class BadRequest_InvalidInterfaceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidInterfaceError' } } errorClasses.BadRequest_InvalidInterfaceError = BadRequest_InvalidInterfaceError
|
99
|
+
export class BadRequest_InvalidOauthProviderError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidOauthProviderError' } } errorClasses.BadRequest_InvalidOauthProviderError = BadRequest_InvalidOauthProviderError
|
100
|
+
export class BadRequest_InvalidReturnToUrlError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidReturnToUrlError' } } errorClasses.BadRequest_InvalidReturnToUrlError = BadRequest_InvalidReturnToUrlError
|
101
|
+
export class BadRequest_InvalidUploadOffsetError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadOffsetError' } } errorClasses.BadRequest_InvalidUploadOffsetError = BadRequest_InvalidUploadOffsetError
|
102
|
+
export class BadRequest_InvalidUploadPartGapError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadPartGapError' } } errorClasses.BadRequest_InvalidUploadPartGapError = BadRequest_InvalidUploadPartGapError
|
103
|
+
export class BadRequest_InvalidUploadPartSizeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_InvalidUploadPartSizeError' } } errorClasses.BadRequest_InvalidUploadPartSizeError = BadRequest_InvalidUploadPartSizeError
|
104
|
+
export class BadRequest_MethodNotAllowedError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_MethodNotAllowedError' } } errorClasses.BadRequest_MethodNotAllowedError = BadRequest_MethodNotAllowedError
|
105
|
+
export class BadRequest_NoValidInputParamsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_NoValidInputParamsError' } } errorClasses.BadRequest_NoValidInputParamsError = BadRequest_NoValidInputParamsError
|
106
|
+
export class BadRequest_OperationOnNonScimResourceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_OperationOnNonScimResourceError' } } errorClasses.BadRequest_OperationOnNonScimResourceError = BadRequest_OperationOnNonScimResourceError
|
107
|
+
export class BadRequest_PartNumberTooLargeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_PartNumberTooLargeError' } } errorClasses.BadRequest_PartNumberTooLargeError = BadRequest_PartNumberTooLargeError
|
108
|
+
export class BadRequest_ReauthenticationNeededFieldsError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_ReauthenticationNeededFieldsError' } } errorClasses.BadRequest_ReauthenticationNeededFieldsError = BadRequest_ReauthenticationNeededFieldsError
|
109
|
+
export class BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError' } } errorClasses.BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError = BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError
|
110
|
+
export class BadRequest_RequestParamsContainInvalidCharacterError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsContainInvalidCharacterError' } } errorClasses.BadRequest_RequestParamsContainInvalidCharacterError = BadRequest_RequestParamsContainInvalidCharacterError
|
111
|
+
export class BadRequest_RequestParamsInvalidError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsInvalidError' } } errorClasses.BadRequest_RequestParamsInvalidError = BadRequest_RequestParamsInvalidError
|
112
|
+
export class BadRequest_RequestParamsRequiredError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_RequestParamsRequiredError' } } errorClasses.BadRequest_RequestParamsRequiredError = BadRequest_RequestParamsRequiredError
|
113
|
+
export class BadRequest_SearchAllOnChildPathError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_SearchAllOnChildPathError' } } errorClasses.BadRequest_SearchAllOnChildPathError = BadRequest_SearchAllOnChildPathError
|
114
|
+
export class BadRequest_UnsupportedCurrencyError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedCurrencyError' } } errorClasses.BadRequest_UnsupportedCurrencyError = BadRequest_UnsupportedCurrencyError
|
115
|
+
export class BadRequest_UnsupportedHttpResponseFormatError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedHttpResponseFormatError' } } errorClasses.BadRequest_UnsupportedHttpResponseFormatError = BadRequest_UnsupportedHttpResponseFormatError
|
116
|
+
export class BadRequest_UnsupportedMediaTypeError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UnsupportedMediaTypeError' } } errorClasses.BadRequest_UnsupportedMediaTypeError = BadRequest_UnsupportedMediaTypeError
|
117
|
+
export class BadRequest_UserIdInvalidError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserIdInvalidError' } } errorClasses.BadRequest_UserIdInvalidError = BadRequest_UserIdInvalidError
|
118
|
+
export class BadRequest_UserIdOnUserEndpointError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserIdOnUserEndpointError' } } errorClasses.BadRequest_UserIdOnUserEndpointError = BadRequest_UserIdOnUserEndpointError
|
119
|
+
export class BadRequest_UserRequiredError extends BadRequestError { constructor(message, code) { super(message, code); this.name = 'BadRequest_UserRequiredError' } } errorClasses.BadRequest_UserRequiredError = BadRequest_UserRequiredError
|
120
|
+
export class NotAuthenticated_AuthenticationRequiredError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_AuthenticationRequiredError' } } errorClasses.NotAuthenticated_AuthenticationRequiredError = NotAuthenticated_AuthenticationRequiredError
|
121
|
+
export class NotAuthenticated_BundleRegistrationCodeFailedError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_BundleRegistrationCodeFailedError' } } errorClasses.NotAuthenticated_BundleRegistrationCodeFailedError = NotAuthenticated_BundleRegistrationCodeFailedError
|
122
|
+
export class NotAuthenticated_InboxRegistrationCodeFailedError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InboxRegistrationCodeFailedError' } } errorClasses.NotAuthenticated_InboxRegistrationCodeFailedError = NotAuthenticated_InboxRegistrationCodeFailedError
|
123
|
+
export class NotAuthenticated_InvalidCredentialsError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidCredentialsError' } } errorClasses.NotAuthenticated_InvalidCredentialsError = NotAuthenticated_InvalidCredentialsError
|
124
|
+
export class NotAuthenticated_InvalidOauthError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidOauthError' } } errorClasses.NotAuthenticated_InvalidOauthError = NotAuthenticated_InvalidOauthError
|
125
|
+
export class NotAuthenticated_InvalidOrExpiredCodeError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidOrExpiredCodeError' } } errorClasses.NotAuthenticated_InvalidOrExpiredCodeError = NotAuthenticated_InvalidOrExpiredCodeError
|
126
|
+
export class NotAuthenticated_InvalidUsernameOrPasswordError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_InvalidUsernameOrPasswordError' } } errorClasses.NotAuthenticated_InvalidUsernameOrPasswordError = NotAuthenticated_InvalidUsernameOrPasswordError
|
127
|
+
export class NotAuthenticated_LockedOutError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_LockedOutError' } } errorClasses.NotAuthenticated_LockedOutError = NotAuthenticated_LockedOutError
|
128
|
+
export class NotAuthenticated_LockoutRegionMismatchError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_LockoutRegionMismatchError' } } errorClasses.NotAuthenticated_LockoutRegionMismatchError = NotAuthenticated_LockoutRegionMismatchError
|
129
|
+
export class NotAuthenticated_OneTimePasswordIncorrectError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_OneTimePasswordIncorrectError' } } errorClasses.NotAuthenticated_OneTimePasswordIncorrectError = NotAuthenticated_OneTimePasswordIncorrectError
|
130
|
+
export class NotAuthenticated_TwoFactorAuthenticationErrorError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_TwoFactorAuthenticationErrorError' } } errorClasses.NotAuthenticated_TwoFactorAuthenticationErrorError = NotAuthenticated_TwoFactorAuthenticationErrorError
|
131
|
+
export class NotAuthenticated_TwoFactorAuthenticationSetupExpiredError extends NotAuthenticatedError { constructor(message, code) { super(message, code); this.name = 'NotAuthenticated_TwoFactorAuthenticationSetupExpiredError' } } errorClasses.NotAuthenticated_TwoFactorAuthenticationSetupExpiredError = NotAuthenticated_TwoFactorAuthenticationSetupExpiredError
|
132
|
+
export class NotAuthorized_ApiKeyIsDisabledError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyIsDisabledError' } } errorClasses.NotAuthorized_ApiKeyIsDisabledError = NotAuthorized_ApiKeyIsDisabledError
|
133
|
+
export class NotAuthorized_ApiKeyIsPathRestrictedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyIsPathRestrictedError' } } errorClasses.NotAuthorized_ApiKeyIsPathRestrictedError = NotAuthorized_ApiKeyIsPathRestrictedError
|
134
|
+
export class NotAuthorized_ApiKeyOnlyForDesktopAppError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForDesktopAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForDesktopAppError = NotAuthorized_ApiKeyOnlyForDesktopAppError
|
135
|
+
export class NotAuthorized_ApiKeyOnlyForMobileAppError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForMobileAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForMobileAppError = NotAuthorized_ApiKeyOnlyForMobileAppError
|
136
|
+
export class NotAuthorized_ApiKeyOnlyForOfficeIntegrationError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ApiKeyOnlyForOfficeIntegrationError' } } errorClasses.NotAuthorized_ApiKeyOnlyForOfficeIntegrationError = NotAuthorized_ApiKeyOnlyForOfficeIntegrationError
|
137
|
+
export class NotAuthorized_BillingPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_BillingPermissionRequiredError' } } errorClasses.NotAuthorized_BillingPermissionRequiredError = NotAuthorized_BillingPermissionRequiredError
|
138
|
+
export class NotAuthorized_BundleMaximumUsesReachedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_BundleMaximumUsesReachedError' } } errorClasses.NotAuthorized_BundleMaximumUsesReachedError = NotAuthorized_BundleMaximumUsesReachedError
|
139
|
+
export class NotAuthorized_CannotLoginWhileUsingKeyError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_CannotLoginWhileUsingKeyError' } } errorClasses.NotAuthorized_CannotLoginWhileUsingKeyError = NotAuthorized_CannotLoginWhileUsingKeyError
|
140
|
+
export class NotAuthorized_CantActForOtherUserError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_CantActForOtherUserError' } } errorClasses.NotAuthorized_CantActForOtherUserError = NotAuthorized_CantActForOtherUserError
|
141
|
+
export class NotAuthorized_ContactAdminForPasswordChangeHelpError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ContactAdminForPasswordChangeHelpError' } } errorClasses.NotAuthorized_ContactAdminForPasswordChangeHelpError = NotAuthorized_ContactAdminForPasswordChangeHelpError
|
142
|
+
export class NotAuthorized_FolderAdminOrBillingPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FolderAdminOrBillingPermissionRequiredError' } } errorClasses.NotAuthorized_FolderAdminOrBillingPermissionRequiredError = NotAuthorized_FolderAdminOrBillingPermissionRequiredError
|
143
|
+
export class NotAuthorized_FolderAdminPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FolderAdminPermissionRequiredError' } } errorClasses.NotAuthorized_FolderAdminPermissionRequiredError = NotAuthorized_FolderAdminPermissionRequiredError
|
144
|
+
export class NotAuthorized_FullPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_FullPermissionRequiredError' } } errorClasses.NotAuthorized_FullPermissionRequiredError = NotAuthorized_FullPermissionRequiredError
|
145
|
+
export class NotAuthorized_HistoryPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_HistoryPermissionRequiredError' } } errorClasses.NotAuthorized_HistoryPermissionRequiredError = NotAuthorized_HistoryPermissionRequiredError
|
146
|
+
export class NotAuthorized_InsufficientPermissionForParamsError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_InsufficientPermissionForParamsError' } } errorClasses.NotAuthorized_InsufficientPermissionForParamsError = NotAuthorized_InsufficientPermissionForParamsError
|
147
|
+
export class NotAuthorized_MustAuthenticateWithApiKeyError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_MustAuthenticateWithApiKeyError' } } errorClasses.NotAuthorized_MustAuthenticateWithApiKeyError = NotAuthorized_MustAuthenticateWithApiKeyError
|
148
|
+
export class NotAuthorized_NeedAdminPermissionForInboxError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NeedAdminPermissionForInboxError' } } errorClasses.NotAuthorized_NeedAdminPermissionForInboxError = NotAuthorized_NeedAdminPermissionForInboxError
|
149
|
+
export class NotAuthorized_NonAdminsMustQueryByFolderOrPathError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NonAdminsMustQueryByFolderOrPathError' } } errorClasses.NotAuthorized_NonAdminsMustQueryByFolderOrPathError = NotAuthorized_NonAdminsMustQueryByFolderOrPathError
|
150
|
+
export class NotAuthorized_NotAllowedToCreateBundleError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_NotAllowedToCreateBundleError' } } errorClasses.NotAuthorized_NotAllowedToCreateBundleError = NotAuthorized_NotAllowedToCreateBundleError
|
151
|
+
export class NotAuthorized_PasswordChangeNotRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_PasswordChangeNotRequiredError' } } errorClasses.NotAuthorized_PasswordChangeNotRequiredError = NotAuthorized_PasswordChangeNotRequiredError
|
152
|
+
export class NotAuthorized_PasswordChangeRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_PasswordChangeRequiredError' } } errorClasses.NotAuthorized_PasswordChangeRequiredError = NotAuthorized_PasswordChangeRequiredError
|
153
|
+
export class NotAuthorized_ReadOnlySessionError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReadOnlySessionError' } } errorClasses.NotAuthorized_ReadOnlySessionError = NotAuthorized_ReadOnlySessionError
|
154
|
+
export class NotAuthorized_ReadPermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReadPermissionRequiredError' } } errorClasses.NotAuthorized_ReadPermissionRequiredError = NotAuthorized_ReadPermissionRequiredError
|
155
|
+
export class NotAuthorized_ReauthenticationFailedError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationFailedError' } } errorClasses.NotAuthorized_ReauthenticationFailedError = NotAuthorized_ReauthenticationFailedError
|
156
|
+
export class NotAuthorized_ReauthenticationFailedFinalError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationFailedFinalError' } } errorClasses.NotAuthorized_ReauthenticationFailedFinalError = NotAuthorized_ReauthenticationFailedFinalError
|
157
|
+
export class NotAuthorized_ReauthenticationNeededActionError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ReauthenticationNeededActionError' } } errorClasses.NotAuthorized_ReauthenticationNeededActionError = NotAuthorized_ReauthenticationNeededActionError
|
158
|
+
export class NotAuthorized_SelfManagedRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SelfManagedRequiredError' } } errorClasses.NotAuthorized_SelfManagedRequiredError = NotAuthorized_SelfManagedRequiredError
|
159
|
+
export class NotAuthorized_SiteAdminRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SiteAdminRequiredError' } } errorClasses.NotAuthorized_SiteAdminRequiredError = NotAuthorized_SiteAdminRequiredError
|
160
|
+
export class NotAuthorized_SiteFilesAreImmutableError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_SiteFilesAreImmutableError' } } errorClasses.NotAuthorized_SiteFilesAreImmutableError = NotAuthorized_SiteFilesAreImmutableError
|
161
|
+
export class NotAuthorized_TwoFactorAuthenticationRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_TwoFactorAuthenticationRequiredError' } } errorClasses.NotAuthorized_TwoFactorAuthenticationRequiredError = NotAuthorized_TwoFactorAuthenticationRequiredError
|
162
|
+
export class NotAuthorized_UserIdWithoutSiteAdminError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_UserIdWithoutSiteAdminError' } } errorClasses.NotAuthorized_UserIdWithoutSiteAdminError = NotAuthorized_UserIdWithoutSiteAdminError
|
163
|
+
export class NotAuthorized_WritePermissionRequiredError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_WritePermissionRequiredError' } } errorClasses.NotAuthorized_WritePermissionRequiredError = NotAuthorized_WritePermissionRequiredError
|
164
|
+
export class NotAuthorized_ZipDownloadIpMismatchError extends NotAuthorizedError { constructor(message, code) { super(message, code); this.name = 'NotAuthorized_ZipDownloadIpMismatchError' } } errorClasses.NotAuthorized_ZipDownloadIpMismatchError = NotAuthorized_ZipDownloadIpMismatchError
|
165
|
+
export class NotFound_ApiKeyNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_ApiKeyNotFoundError' } } errorClasses.NotFound_ApiKeyNotFoundError = NotFound_ApiKeyNotFoundError
|
166
|
+
export class NotFound_BundlePathNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_BundlePathNotFoundError' } } errorClasses.NotFound_BundlePathNotFoundError = NotFound_BundlePathNotFoundError
|
167
|
+
export class NotFound_CodeNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_CodeNotFoundError' } } errorClasses.NotFound_CodeNotFoundError = NotFound_CodeNotFoundError
|
168
|
+
export class NotFound_FileNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FileNotFoundError' } } errorClasses.NotFound_FileNotFoundError = NotFound_FileNotFoundError
|
169
|
+
export class NotFound_FileUploadNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FileUploadNotFoundError' } } errorClasses.NotFound_FileUploadNotFoundError = NotFound_FileUploadNotFoundError
|
170
|
+
export class NotFound_FolderNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_FolderNotFoundError' } } errorClasses.NotFound_FolderNotFoundError = NotFound_FolderNotFoundError
|
171
|
+
export class NotFound_GroupNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_GroupNotFoundError' } } errorClasses.NotFound_GroupNotFoundError = NotFound_GroupNotFoundError
|
172
|
+
export class NotFound_InboxNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_InboxNotFoundError' } } errorClasses.NotFound_InboxNotFoundError = NotFound_InboxNotFoundError
|
173
|
+
export class NotFound_NestedNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_NestedNotFoundError' } } errorClasses.NotFound_NestedNotFoundError = NotFound_NestedNotFoundError
|
174
|
+
export class NotFound_PlanNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_PlanNotFoundError' } } errorClasses.NotFound_PlanNotFoundError = NotFound_PlanNotFoundError
|
175
|
+
export class NotFound_SiteNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_SiteNotFoundError' } } errorClasses.NotFound_SiteNotFoundError = NotFound_SiteNotFoundError
|
176
|
+
export class NotFound_UserNotFoundError extends NotFoundError { constructor(message, code) { super(message, code); this.name = 'NotFound_UserNotFoundError' } } errorClasses.NotFound_UserNotFoundError = NotFound_UserNotFoundError
|
177
|
+
export class ProcessingFailure_BundleOnlyAllowsPreviewsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_BundleOnlyAllowsPreviewsError' } } errorClasses.ProcessingFailure_BundleOnlyAllowsPreviewsError = ProcessingFailure_BundleOnlyAllowsPreviewsError
|
178
|
+
export class ProcessingFailure_CouldNotCreateParentError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_CouldNotCreateParentError' } } errorClasses.ProcessingFailure_CouldNotCreateParentError = ProcessingFailure_CouldNotCreateParentError
|
179
|
+
export class ProcessingFailure_DestinationExistsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationExistsError' } } errorClasses.ProcessingFailure_DestinationExistsError = ProcessingFailure_DestinationExistsError
|
180
|
+
export class ProcessingFailure_DestinationFolderLimitedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationFolderLimitedError' } } errorClasses.ProcessingFailure_DestinationFolderLimitedError = ProcessingFailure_DestinationFolderLimitedError
|
181
|
+
export class ProcessingFailure_DestinationParentConflictError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationParentConflictError' } } errorClasses.ProcessingFailure_DestinationParentConflictError = ProcessingFailure_DestinationParentConflictError
|
182
|
+
export class ProcessingFailure_DestinationParentDoesNotExistError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_DestinationParentDoesNotExistError' } } errorClasses.ProcessingFailure_DestinationParentDoesNotExistError = ProcessingFailure_DestinationParentDoesNotExistError
|
183
|
+
export class ProcessingFailure_ExpiredPrivateKeyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExpiredPrivateKeyError' } } errorClasses.ProcessingFailure_ExpiredPrivateKeyError = ProcessingFailure_ExpiredPrivateKeyError
|
184
|
+
export class ProcessingFailure_ExpiredPublicKeyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExpiredPublicKeyError' } } errorClasses.ProcessingFailure_ExpiredPublicKeyError = ProcessingFailure_ExpiredPublicKeyError
|
185
|
+
export class ProcessingFailure_ExportFailureError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExportFailureError' } } errorClasses.ProcessingFailure_ExportFailureError = ProcessingFailure_ExportFailureError
|
186
|
+
export class ProcessingFailure_ExportNotReadyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ExportNotReadyError' } } errorClasses.ProcessingFailure_ExportNotReadyError = ProcessingFailure_ExportNotReadyError
|
187
|
+
export class ProcessingFailure_FailedToChangePasswordError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FailedToChangePasswordError' } } errorClasses.ProcessingFailure_FailedToChangePasswordError = ProcessingFailure_FailedToChangePasswordError
|
188
|
+
export class ProcessingFailure_FileLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileLockedError' } } errorClasses.ProcessingFailure_FileLockedError = ProcessingFailure_FileLockedError
|
189
|
+
export class ProcessingFailure_FileNotUploadedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileNotUploadedError' } } errorClasses.ProcessingFailure_FileNotUploadedError = ProcessingFailure_FileNotUploadedError
|
190
|
+
export class ProcessingFailure_FilePendingProcessingError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FilePendingProcessingError' } } errorClasses.ProcessingFailure_FilePendingProcessingError = ProcessingFailure_FilePendingProcessingError
|
191
|
+
export class ProcessingFailure_FileTooBigToDecryptError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileTooBigToDecryptError' } } errorClasses.ProcessingFailure_FileTooBigToDecryptError = ProcessingFailure_FileTooBigToDecryptError
|
192
|
+
export class ProcessingFailure_FileTooBigToEncryptError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileTooBigToEncryptError' } } errorClasses.ProcessingFailure_FileTooBigToEncryptError = ProcessingFailure_FileTooBigToEncryptError
|
193
|
+
export class ProcessingFailure_FileUploadedToWrongRegionError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FileUploadedToWrongRegionError' } } errorClasses.ProcessingFailure_FileUploadedToWrongRegionError = ProcessingFailure_FileUploadedToWrongRegionError
|
194
|
+
export class ProcessingFailure_FolderLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FolderLockedError' } } errorClasses.ProcessingFailure_FolderLockedError = ProcessingFailure_FolderLockedError
|
195
|
+
export class ProcessingFailure_FolderNotEmptyError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_FolderNotEmptyError' } } errorClasses.ProcessingFailure_FolderNotEmptyError = ProcessingFailure_FolderNotEmptyError
|
196
|
+
export class ProcessingFailure_HistoryUnavailableError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_HistoryUnavailableError' } } errorClasses.ProcessingFailure_HistoryUnavailableError = ProcessingFailure_HistoryUnavailableError
|
197
|
+
export class ProcessingFailure_InvalidBundleCodeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidBundleCodeError' } } errorClasses.ProcessingFailure_InvalidBundleCodeError = ProcessingFailure_InvalidBundleCodeError
|
198
|
+
export class ProcessingFailure_InvalidFileTypeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidFileTypeError' } } errorClasses.ProcessingFailure_InvalidFileTypeError = ProcessingFailure_InvalidFileTypeError
|
199
|
+
export class ProcessingFailure_InvalidFilenameError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidFilenameError' } } errorClasses.ProcessingFailure_InvalidFilenameError = ProcessingFailure_InvalidFilenameError
|
200
|
+
export class ProcessingFailure_InvalidRangeError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_InvalidRangeError' } } errorClasses.ProcessingFailure_InvalidRangeError = ProcessingFailure_InvalidRangeError
|
201
|
+
export class ProcessingFailure_ModelSaveErrorError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ModelSaveErrorError' } } errorClasses.ProcessingFailure_ModelSaveErrorError = ProcessingFailure_ModelSaveErrorError
|
202
|
+
export class ProcessingFailure_MultipartUploadsRequiredForRemotesError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_MultipartUploadsRequiredForRemotesError' } } errorClasses.ProcessingFailure_MultipartUploadsRequiredForRemotesError = ProcessingFailure_MultipartUploadsRequiredForRemotesError
|
203
|
+
export class ProcessingFailure_MultipleProcessingErrorsError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_MultipleProcessingErrorsError' } } errorClasses.ProcessingFailure_MultipleProcessingErrorsError = ProcessingFailure_MultipleProcessingErrorsError
|
204
|
+
export class ProcessingFailure_PathTooLongError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_PathTooLongError' } } errorClasses.ProcessingFailure_PathTooLongError = ProcessingFailure_PathTooLongError
|
205
|
+
export class ProcessingFailure_RecipientAlreadySharedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_RecipientAlreadySharedError' } } errorClasses.ProcessingFailure_RecipientAlreadySharedError = ProcessingFailure_RecipientAlreadySharedError
|
206
|
+
export class ProcessingFailure_RemoteServerErrorError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_RemoteServerErrorError' } } errorClasses.ProcessingFailure_RemoteServerErrorError = ProcessingFailure_RemoteServerErrorError
|
207
|
+
export class ProcessingFailure_ResourceLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_ResourceLockedError' } } errorClasses.ProcessingFailure_ResourceLockedError = ProcessingFailure_ResourceLockedError
|
208
|
+
export class ProcessingFailure_SubfolderLockedError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_SubfolderLockedError' } } errorClasses.ProcessingFailure_SubfolderLockedError = ProcessingFailure_SubfolderLockedError
|
209
|
+
export class ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError' } } errorClasses.ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError = ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError
|
210
|
+
export class ProcessingFailure_UpdatesNotAllowedForRemotesError extends ProcessingFailureError { constructor(message, code) { super(message, code); this.name = 'ProcessingFailure_UpdatesNotAllowedForRemotesError' } } errorClasses.ProcessingFailure_UpdatesNotAllowedForRemotesError = ProcessingFailure_UpdatesNotAllowedForRemotesError
|
211
|
+
export class RateLimited_ReauthenticationRateLimitedError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_ReauthenticationRateLimitedError' } } errorClasses.RateLimited_ReauthenticationRateLimitedError = RateLimited_ReauthenticationRateLimitedError
|
212
|
+
export class RateLimited_TooManyConcurrentRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyConcurrentRequestsError' } } errorClasses.RateLimited_TooManyConcurrentRequestsError = RateLimited_TooManyConcurrentRequestsError
|
213
|
+
export class RateLimited_TooManyLoginAttemptsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyLoginAttemptsError' } } errorClasses.RateLimited_TooManyLoginAttemptsError = RateLimited_TooManyLoginAttemptsError
|
214
|
+
export class RateLimited_TooManyRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyRequestsError' } } errorClasses.RateLimited_TooManyRequestsError = RateLimited_TooManyRequestsError
|
215
|
+
export class ServiceUnavailable_UploadsUnavailableError extends ServiceUnavailableError { constructor(message, code) { super(message, code); this.name = 'ServiceUnavailable_UploadsUnavailableError' } } errorClasses.ServiceUnavailable_UploadsUnavailableError = ServiceUnavailable_UploadsUnavailableError
|
216
|
+
export class SiteConfiguration_AccountAlreadyExistsError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountAlreadyExistsError' } } errorClasses.SiteConfiguration_AccountAlreadyExistsError = SiteConfiguration_AccountAlreadyExistsError
|
217
|
+
export class SiteConfiguration_AccountOverdueError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountOverdueError' } } errorClasses.SiteConfiguration_AccountOverdueError = SiteConfiguration_AccountOverdueError
|
218
|
+
export class SiteConfiguration_NoAccountForSiteError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_NoAccountForSiteError' } } errorClasses.SiteConfiguration_NoAccountForSiteError = SiteConfiguration_NoAccountForSiteError
|
219
|
+
export class SiteConfiguration_SiteWasRemovedError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_SiteWasRemovedError' } } errorClasses.SiteConfiguration_SiteWasRemovedError = SiteConfiguration_SiteWasRemovedError
|
220
|
+
export class SiteConfiguration_TrialExpiredError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_TrialExpiredError' } } errorClasses.SiteConfiguration_TrialExpiredError = SiteConfiguration_TrialExpiredError
|
221
|
+
export class SiteConfiguration_TrialLockedError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_TrialLockedError' } } errorClasses.SiteConfiguration_TrialLockedError = SiteConfiguration_TrialLockedError
|
222
|
+
export class SiteConfiguration_UserRequestsEnabledRequiredError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_UserRequestsEnabledRequiredError' } } errorClasses.SiteConfiguration_UserRequestsEnabledRequiredError = SiteConfiguration_UserRequestsEnabledRequiredError
|
package/src/models/Action.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
|
|
@@ -123,7 +124,7 @@ class ActionNotificationExport {
|
|
123
124
|
|
124
125
|
save = () => {
|
125
126
|
if (this.attributes['id']) {
|
126
|
-
throw new
|
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
|
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
|
145
|
+
throw new errors.MissingParameterError('Parameter missing: id')
|
145
146
|
}
|
146
147
|
|
147
148
|
if (params['id'] && !isInt(params['id'])) {
|
148
|
-
throw new
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
30
|
+
throw new errors.EmptyPropertyError('Current object has no id')
|
30
31
|
}
|
31
32
|
|
32
33
|
if (!isObject(params)) {
|
33
|
-
throw new
|
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
|
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
|
46
|
+
throw new errors.MissingParameterError('Parameter missing: id')
|
46
47
|
}
|
47
48
|
}
|
48
49
|
|
package/src/models/ApiKey.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
|
|
@@ -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
|
106
|
+
throw new errors.EmptyPropertyError('Current object has no id')
|
106
107
|
}
|
107
108
|
|
108
109
|
if (!isObject(params)) {
|
109
|
-
throw new
|
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
|
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
|
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
|
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
|
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
|
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
|
142
|
+
throw new errors.EmptyPropertyError('Current object has no id')
|
142
143
|
}
|
143
144
|
|
144
145
|
if (!isObject(params)) {
|
145
|
-
throw new
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
228
|
+
throw new errors.MissingParameterError('Parameter missing: id')
|
228
229
|
}
|
229
230
|
|
230
231
|
if (params['id'] && !isInt(params['id'])) {
|
231
|
-
throw new
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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)
|