1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// @generated by packages/sdk-contract/generate.ts from packages/shared/src/PublicErrorCodes.ts.
error_codes! {
/// `viewer/invalid-claims` (HTTP 400): Supply a viewerClaims object with an optional region and boolean ageConfirmed.
InvalidViewerClaims = "viewer/invalid-claims", 400;
/// `viewer/age-confirmation-required` (HTTP 403): Your application has not confirmed age-restricted delivery for this viewer.
AgeConfirmationRequired = "viewer/age-confirmation-required", 403;
/// `viewer/invalid-region` (HTTP 400): Supply the viewer's ISO country code, such as DE or GB.
InvalidViewerRegion = "viewer/invalid-region", 400;
/// `viewer/region-required` (HTTP 403): Supply the viewer region when regional delivery controls apply.
ViewerRegionRequired = "viewer/region-required", 403;
/// `asset/regional-evidence-required` (HTTP 403): This asset needs moderation evidence for the newly served jurisdiction.
RegionalEvidenceRequired = "asset/regional-evidence-required", 403;
/// `validation/invalid-type` (HTTP 400): A field has the wrong type. details.issues lists each problem.
InvalidType = "validation/invalid-type", 400;
/// `validation/too-small` (HTTP 400): A value is below its minimum. details.issues lists each problem.
TooSmall = "validation/too-small", 400;
/// `validation/too-big` (HTTP 400): A value is above its maximum. details.issues lists each problem.
TooBig = "validation/too-big", 400;
/// `validation/invalid-format` (HTTP 400): A string is not in the required format, such as an ID or URL. details.issues lists each problem.
InvalidFormat = "validation/invalid-format", 400;
/// `validation/invalid-value` (HTTP 400): A field has a value it cannot take. details.issues lists each problem.
InvalidValue = "validation/invalid-value", 400;
/// `validation/unknown-field` (HTTP 400): The request has a field this endpoint does not accept.
UnknownField = "validation/unknown-field", 400;
/// `validation/unsupported-content-type` (HTTP 415): Send the request body as application/json.
UnsupportedContentType = "validation/unsupported-content-type", 415;
/// `validation/invalid-filter` (HTTP 400): The filter has invalid syntax or names a field that can't be filtered.
InvalidFilter = "validation/invalid-filter", 400;
/// `validation/invalid-ordering-field` (HTTP 400): The list cannot be ordered by this field.
InvalidOrderingField = "validation/invalid-ordering-field", 400;
/// `misc/route-not-found` (HTTP 404): No endpoint matches this method and path.
RouteNotFound = "misc/route-not-found", 404;
/// `misc/internal-error` (HTTP 500): An internal error occurred. Retry later, and quote requestId to support.
InternalError = "misc/internal-error", 500;
/// `auth/unauthenticated` (HTTP 401): Authentication required.
Unauthenticated = "auth/unauthenticated", 401;
/// `auth/token-expired` (HTTP 401): The session token has expired. Sign in again.
TokenExpired = "auth/token-expired", 401;
/// `auth/invalid-token` (HTTP 401): The session token is invalid. Sign in again.
InvalidToken = "auth/invalid-token", 401;
/// `search/unavailable` (HTTP 503): Search is temporarily unavailable. Retry later.
SearchUnavailable = "search/unavailable", 503;
/// `asset/invalid-transform` (HTTP 400): The transform names an unknown type or is not a valid selector.
InvalidTransform = "asset/invalid-transform", 400;
/// `asset/invalid-transform-options` (HTTP 400): The transform's options are invalid for its type.
InvalidTransformOptions = "asset/invalid-transform-options", 400;
/// `asset/remote-url-redirect-limit` (HTTP 400): The remote URL redirected too many times.
RemoteUrlRedirectLimit = "asset/remote-url-redirect-limit", 400;
/// `copyright/content-held` (HTTP 409): The asset's content is held for a copyright claim and cannot be changed.
CopyrightContentHeld = "copyright/content-held", 409;
/// `asset/api-key-missing-permission` (HTTP 403): This API key needs assets:download permission for this asset's folder.
DownloadPermissionRequired = "asset/api-key-missing-permission", 403;
/// `validation/invalid-cursor` (HTTP 400): The cursor is invalid or belongs to a different query.
InvalidCursor = "validation/invalid-cursor", 400;
/// `auth/missing-token` (HTTP 401): Authentication required. Send your project API key in the X-Api-Key header.
MissingToken = "auth/missing-token", 401;
/// `auth/invalid-api-key` (HTTP 401): The API key is invalid, revoked or expired. Create a key under Developer → API Keys.
InvalidApiKey = "auth/invalid-api-key", 401;
/// `auth/project-mismatch` (HTTP 403): This API key belongs to a different project. Use a key created for the project that owns this resource.
ApiKeyProjectMismatch = "auth/project-mismatch", 403;
/// `auth/api-key-not-accepted` (HTTP 403): API keys are only accepted by the public API at /v1.
ApiKeyNotAccepted = "auth/api-key-not-accepted", 403;
/// `auth/permission-denied` (HTTP 403): This API key lacks a permission the request needs, such as assets:delete for an asset's folder, or the resource belongs to another project.
PermissionDenied = "auth/permission-denied", 403;
/// `upload/file-too-large` (HTTP 400): File size exceeds limit. Maximum direct image size is 10 MiB, audio/video size is 50 MiB, and other files is 5,000 MiB.
FileTooLarge = "upload/file-too-large", 400;
/// `upload/multipart-image-too-small` (HTTP 400): Multipart image uploads must total at least 10 MiB.
MultipartImageTooSmall = "upload/multipart-image-too-small", 400;
/// `upload/multipart-image-too-large` (HTTP 400): Multipart image uploads cannot exceed 20 MiB.
MultipartImageTooLarge = "upload/multipart-image-too-large", 400;
/// `upload/image-exceeded-max-dimensions` (HTTP 400): Image exceeds maximum dimensions. Maximum dimensions are 12,000px.
ImageExceededMaxDimensions = "upload/image-exceeded-max-dimensions", 400;
/// `upload/limit-exceeded` (HTTP 403): Upload limit exceeded. This project's organisation has used its free uploads. Set up billing to continue uploading.
UploadLimitExceeded = "upload/limit-exceeded", 403;
/// `upload/spend-limit-reached` (HTTP 402): Uploads to this project are paused by its organisation's usage limits. See details.reason; an owner can review them in Billing.
SpendLimitReached = "upload/spend-limit-reached", 402;
/// `upload/invalid-mime-type` (HTTP 400): Upload file type is not supported. Uploads must use a concrete file MIME type that CalmLens can store and process, such as image/png, image/jpeg, application/pdf, or text/plain.
InvalidUploadMimeType = "upload/invalid-mime-type", 400;
/// `upload/invalid-payload` (HTTP 400): Upload payload is invalid.
InvalidUploadPayload = "upload/invalid-payload", 400;
/// `upload/use-upload-part` (HTTP 409): Use uploadPart for multipart upload parts after the first part
UseUploadPart = "upload/use-upload-part", 409;
/// `upload/not-open` (HTTP 409): Asset is not accepting additional parts
UploadNotOpen = "upload/not-open", 409;
/// `upload/invalid-part-number` (HTTP 409): Multipart upload part number is invalid.
InvalidUploadPartNumber = "upload/invalid-part-number", 409;
/// `upload/missing` (HTTP 409): Multipart upload state is missing
UploadMissing = "upload/missing", 409;
/// `upload/size-mismatch` (HTTP 400): The uploaded parts do not add up to the totalSizeInBytes declared when the multipart upload started.
UploadSizeMismatch = "upload/size-mismatch", 400;
/// `idempotency/invalid-key` (HTTP 400): The Idempotency-Key header must be 1 to 255 printable ASCII characters, such as a UUID.
InvalidIdempotencyKey = "idempotency/invalid-key", 400;
/// `idempotency/key-reused` (HTTP 409): This Idempotency-Key was already used for a different request. Use a new key for each distinct request.
IdempotencyKeyReused = "idempotency/key-reused", 409;
/// `idempotency/request-in-progress` (HTTP 409): A request with this Idempotency-Key is still being processed. Retry after the Retry-After delay to receive its result.
IdempotentRequestInProgress = "idempotency/request-in-progress", 409;
/// `asset/not-found` (HTTP 404): Asset not found
AssetNotFound = "asset/not-found", 404;
/// `project/not-found` (HTTP 404): Project not found
ProjectNotFound = "project/not-found", 404;
/// `asset/review-changed` (HTTP 409): The asset changed during review. Refresh and review the current decision.
AssetReviewChanged = "asset/review-changed", 409;
/// `asset/review-note-required` (HTTP 400): A note is required when changing the decision.
AssetReviewNoteRequired = "asset/review-note-required", 400;
/// `asset/update-failed` (HTTP 500): Failed to update asset
AssetUpdateFailed = "asset/update-failed", 500;
/// `asset/safety-held` (HTTP 423): Asset access is restricted by a safety hold.
AssetSafetyHeld = "asset/safety-held", 423;
/// `asset/processing` (HTTP 409): Wait for the asset to finish uploading and processing before deciding it.
AssetProcessing = "asset/processing", 409;
/// `asset/decision-not-allowed` (HTTP 409): This asset has no moderation decision yet, so it can only be blocked or purged. Allow, limit or age-restrict it once moderation has decided it.
AssetDecisionNotAllowed = "asset/decision-not-allowed", 409;
/// `asset/decision-unchanged` (HTTP 409): The asset already has this moderation status.
AssetDecisionUnchanged = "asset/decision-unchanged", 409;
/// `asset/not-retryable` (HTTP 409): Only assets that failed to process (status error) can be retried.
AssetNotRetryable = "asset/not-retryable", 409;
/// `asset/content-unavailable` (HTTP 409): This asset's content is no longer stored, so it can't be processed again. Upload it again instead.
AssetContentUnavailable = "asset/content-unavailable", 409;
/// `asset/content-purged` (HTTP 409): This asset's content was purged, so it can only be blocked. Upload it again to have it moderated afresh.
AssetContentPurged = "asset/content-purged", 409;
/// `asset/not-decided` (HTTP 409): This asset has no automatic moderation decision to explain yet.
AssetNotDecided = "asset/not-decided", 409;
/// `asset/policy-changed` (HTTP 409): The project's moderation policy has changed since this decision, so it can't be explained as made. Re-run moderation with the current policy instead.
AssetPolicyChanged = "asset/policy-changed", 409;
/// `asset/reviewed` (HTTP 409): A reviewer has decided this asset, so its moderation can't be re-run.
AssetReviewed = "asset/reviewed", 409;
/// `support/ticket-not-found` (HTTP 404): Support ticket not found.
SupportTicketNotFound = "support/ticket-not-found", 404;
/// `asset/duplicate-external-id` (HTTP 409): An asset with this externalId already exists in the project.
DuplicateExternalId = "asset/duplicate-external-id", 409;
/// `folder/not-found` (HTTP 404): Folder not found
FolderNotFound = "folder/not-found", 404;
/// `folder/duplicate-name` (HTTP 409): A folder with this name already exists in this location.
DuplicateFolderName = "folder/duplicate-name", 409;
/// `folder/not-empty` (HTTP 409): Folder must be empty before it can be deleted.
FolderNotEmpty = "folder/not-empty", 409;
/// `folder/parent-cycle` (HTTP 409): A folder cannot be moved inside itself or one of its descendants.
FolderParentCycle = "folder/parent-cycle", 409;
/// `lens/version-conflict` (HTTP 409): Lens updates require a version greater than the current version.
LensVersionConflict = "lens/version-conflict", 409;
/// `lens/identifier-reserved` (HTTP 409): The identifier belongs to a built-in lens (thumbnail, sm, md, lg, xl or 2xl). Give the lens another identifier.
LensIdentifierReserved = "lens/identifier-reserved", 409;
/// `hash-list/not-found` (HTTP 404): Hash list not found. Check the list ID in the portal.
HashListNotFound = "hash-list/not-found", 404;
/// `hash-list/entry-not-found` (HTTP 404): Hash list entry not found.
HashListEntryNotFound = "hash-list/entry-not-found", 404;
/// `hash-list/limit-reached` (HTTP 409): This project has the most hash lists it can hold. Delete a list to add another.
HashListLimitReached = "hash-list/limit-reached", 409;
/// `hash-list/entry-limit-reached` (HTTP 409): This project's hash lists hold the most entries they can. Remove entries to add more.
HashListEntryLimitReached = "hash-list/entry-limit-reached", 409;
/// `hash-list/asset-not-hashed` (HTTP 409): This asset has no perceptual hash. Only image assets that finished processing can be added.
HashListAssetNotHashed = "hash-list/asset-not-hashed", 409;
/// `upload-preset/not-found` (HTTP 404): Upload preset not found. Check the preset ID in the portal.
UploadPresetNotFound = "upload-preset/not-found", 404;
/// `upload-preset/disabled` (HTTP 403): This upload preset is paused. Turn it on in the portal to accept uploads.
UploadPresetDisabled = "upload-preset/disabled", 403;
/// `upload-preset/token-required` (HTTP 401): This upload preset only accepts uploads with an upload token. Sign one on your server with uploadTokens.sign and pass it to the client.
UploadPresetTokenRequired = "upload-preset/token-required", 401;
/// `upload/remote-url-not-allowed` (HTTP 403): This project doesn't accept URLs from this domain. Change the allowed or blocked domains under Project settings.
RemoteUrlNotAllowed = "upload/remote-url-not-allowed", 403;
/// `upload/website-rate-limit-exceeded` (HTTP 429): This project has submitted too many websites in the last minute. Wait for the Retry-After period, or lower the pace of submissions.
WebsiteRateLimitExceeded = "upload/website-rate-limit-exceeded", 429;
/// `upload-preset/content-type-not-allowed` (HTTP 415): This upload preset doesn't accept this file type.
UploadPresetContentTypeNotAllowed = "upload-preset/content-type-not-allowed", 415;
/// `upload-preset/too-large` (HTTP 413): This file is larger than the upload preset allows.
UploadPresetTooLarge = "upload-preset/too-large", 413;
/// `upload-preset/daily-limit-reached` (HTTP 429): You have reached this upload preset's daily upload limit. Try again after midnight UTC.
UploadPresetDailyLimitReached = "upload-preset/daily-limit-reached", 429;
/// `upload-preset/origin-not-allowed` (HTTP 403): This site isn't allowed to upload through this upload preset.
UploadPresetOriginNotAllowed = "upload-preset/origin-not-allowed", 403;
/// `upload-preset/field-not-allowed` (HTTP 400): This field is set by the upload preset or the upload token and can't be changed by the upload.
UploadPresetFieldNotAllowed = "upload-preset/field-not-allowed", 400;
/// `upload-token/invalid` (HTTP 401): The upload token is invalid. Sign a new one on your server with an active API key for this project.
UploadTokenInvalid = "upload-token/invalid", 401;
/// `upload-token/expired` (HTTP 401): The upload token has expired. Sign a new one on your server.
UploadTokenExpired = "upload-token/expired", 401;
/// `upload-token/used` (HTTP 409): The upload token has already been used. Each token uploads one asset.
UploadTokenUsed = "upload-token/used", 409;
/// `asset/invalid-remote-url` (HTTP 400): Remote URLs must use HTTP or HTTPS and cannot target private networks, localhost names or URL credentials.
InvalidRemoteUrl = "asset/invalid-remote-url", 400;
/// `asset/remote-url-unavailable` (HTTP 422): The URL responded with an error status. Check that it is publicly reachable.
RemoteUrlUnavailable = "asset/remote-url-unavailable", 422;
/// `appeal/not-found` (HTTP 404): The appeal does not exist in this project.
AppealNotFound = "appeal/not-found", 404;
/// `appeal/judgment-not-found` (HTTP 404): The judgment event is unavailable, belongs to another project or cannot supply an asset decision. Supply explicit context instead.
AppealJudgmentNotFound = "appeal/judgment-not-found", 404;
/// `appeal/asset-not-found` (HTTP 404): The linked asset does not exist in this project.
AppealAssetNotFound = "appeal/asset-not-found", 404;
/// `appeal/permission-denied` (HTTP 403): You cannot review this project's appeals.
AppealPermissionDenied = "appeal/permission-denied", 403;
/// `appeal/already-reviewed` (HTTP 409): A reviewer already resolved this appeal.
AppealAlreadyReviewed = "appeal/already-reviewed", 409;
/// `appeal/decision-changed` (HTTP 409): The linked asset's decision changed after the appealed decision. Submit a new appeal for the current decision.
AppealDecisionChanged = "appeal/decision-changed", 409;
/// `appeal/invalid-action` (HTTP 400): The decision's action is not valid for this appeal.
AppealInvalidAction = "appeal/invalid-action", 400;
/// `appeal/safety-held` (HTTP 409): A safety hold prevents this appeal from being submitted or applied.
AppealSafetyHeld = "appeal/safety-held", 409;
/// `appeal/content-unavailable` (HTTP 409): The appeal's content is unavailable, or the asset's content was purged, so it can only be blocked.
AppealContentUnavailable = "appeal/content-unavailable", 409;
}