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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// @generated by packages/sdk-contract/generate.ts from packages/shared/src/PublicErrorCodes.ts.
error_codes! {
/// `viewer-claims/invalid` (HTTP 400): Supply a viewerClaims object with an optional region and boolean ageConfirmed.
InvalidViewerClaims = "viewer-claims/invalid", 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-region/invalid` (HTTP 400): Supply the viewer's ISO country code, such as DE or GB.
InvalidViewerRegion = "viewer-region/invalid", 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;
/// `signed-url/expired` (HTTP 403): The signed URL has expired. Create a new one on your server.
SignedUrlExpired = "signed-url/expired", 403;
/// `signed-url/invalid` (HTTP 403): The signed asset URL's grant wasn't signed for this project, or was changed after signing. Use the URL as created, adding only resources, selectors and viewer claims.
SignedUrlInvalid = "signed-url/invalid", 403;
/// `signed-url/original-not-granted` (HTTP 403): This signed asset URL doesn't grant the original file. Sign a URL for the original resource.
SignedUrlOriginalNotGranted = "signed-url/original-not-granted", 403;
/// `validation/invalid-request` (HTTP 400): The request's parameters, query or body are invalid. details.issues lists each problem, with its path and issue code.
InvalidRequest = "validation/invalid-request", 400;
/// `validation/invalid-type` (HTTP 400): Issue code in details.issues: a field has the wrong type.
InvalidType = "validation/invalid-type", 400;
/// `validation/too-small` (HTTP 400): Issue code in details.issues: a value is below its minimum.
TooSmall = "validation/too-small", 400;
/// `validation/too-big` (HTTP 400): Issue code in details.issues: a value is above its maximum.
TooBig = "validation/too-big", 400;
/// `validation/invalid-format` (HTTP 400): Issue code in details.issues: a string is not in the required format, such as an ID or URL.
InvalidFormat = "validation/invalid-format", 400;
/// `validation/invalid-value` (HTTP 400): Issue code in details.issues: a field has a value it cannot take.
InvalidValue = "validation/invalid-value", 400;
/// `validation/unknown-field` (HTTP 400): Issue code in details.issues: the request has a field this endpoint does not accept.
UnknownField = "validation/unknown-field", 400;
/// `request/unsupported-content-type` (HTTP 415): Send the request body as application/json.
UnsupportedContentType = "request/unsupported-content-type", 415;
/// `filter/invalid` (HTTP 400): The filter has invalid syntax or names a field that can't be filtered.
InvalidFilter = "filter/invalid", 400;
/// `ordering/unsupported-field` (HTTP 400): The list cannot be ordered by this field.
UnsupportedOrderingField = "ordering/unsupported-field", 400;
/// `request/route-not-found` (HTTP 404): No endpoint matches this method and path.
RouteNotFound = "request/route-not-found", 404;
/// `server/internal-error` (HTTP 500): An internal error occurred. Retry later, and quote requestId to support.
InternalError = "server/internal-error", 500;
/// `auth/unauthenticated` (HTTP 401): Authentication required.
Unauthenticated = "auth/unauthenticated", 401;
/// `session-token/expired` (HTTP 401): The session token has expired. Sign in again.
TokenExpired = "session-token/expired", 401;
/// `session-token/invalid` (HTTP 401): The session token is invalid. Sign in again.
InvalidToken = "session-token/invalid", 401;
/// `search/unavailable` (HTTP 503): Search is temporarily unavailable. Retry later.
SearchUnavailable = "search/unavailable", 503;
/// `transform/invalid` (HTTP 400): The transform names an unknown type or is not a valid selector.
InvalidTransform = "transform/invalid", 400;
/// `transform-options/invalid` (HTTP 400): The transform's options are invalid for its type.
InvalidTransformOptions = "transform-options/invalid", 400;
/// `remote-url/too-many-redirects` (HTTP 400): The remote URL redirected too many times.
RemoteUrlTooManyRedirects = "remote-url/too-many-redirects", 400;
/// `cursor/invalid` (HTTP 400): The cursor is invalid or belongs to a different query.
InvalidCursor = "cursor/invalid", 400;
/// `api-key/missing` (HTTP 401): Authentication required. Send your project API key in the X-Api-Key header.
MissingApiKey = "api-key/missing", 401;
/// `api-key/invalid` (HTTP 401): The API key is invalid, revoked or expired. Create a key under Developer → API Keys.
InvalidApiKey = "api-key/invalid", 401;
/// `api-key/project-mismatch` (HTTP 403): This API key belongs to a different project. Use a key created for the project that owns this resource.
ApiKeyProjectMismatch = "api-key/project-mismatch", 403;
/// `api-key/not-accepted` (HTTP 403): API keys are only accepted by the public API at /v1.
ApiKeyNotAccepted = "api-key/not-accepted", 403;
/// `auth/permission-denied` (HTTP 403): This API key lacks a permission the request needs (details.permission names it, such as assets:download for an asset's folder, and details.role the least role that includes it), or the resource belongs to another project.
PermissionDenied = "auth/permission-denied", 403;
/// `upload/too-large` (HTTP 413): The file is larger than allowed. details.limitBytes is the limit, and details.source says whether it is the plan's (`plan`) or the upload preset's (`preset`).
UploadTooLarge = "upload/too-large", 413;
/// `document/too-many-items` (HTTP 422): The document holds more embedded images or audio and video files than can be moderated: details.limit is `images` or `media` and details.maximum the most allowed. Split it into smaller documents.
DocumentTooManyItems = "document/too-many-items", 422;
/// `media/duration-limit` (HTTP 422): The audio or video is longer than allowed: details.durationSeconds is what its file states and details.limitSeconds the limit. Trim it or split it into separate uploads; before billing is set up, setting it up raises the limit.
MediaDurationLimit = "media/duration-limit", 422;
/// `image/invalid` (HTTP 422): The image is corrupt or cannot be decoded. Upload a valid image file.
InvalidImage = "image/invalid", 422;
/// `image/too-large` (HTTP 422): The image exceeds a processing limit: details.limit is `bytes`, `pixels` or `dimension`. Reduce its size before uploading.
ImageTooLarge = "image/too-large", 422;
/// `usage/free-uploads-exhausted` (HTTP 403): This project's organisation has used its free uploads. Set up billing to continue uploading.
FreeUploadsExhausted = "usage/free-uploads-exhausted", 403;
/// `payment/billing-required` (HTTP 409): Set up billing to upload websites.
WebsiteBillingRequired = "payment/billing-required", 409;
/// `usage/uploads-paused` (HTTP 402): This upload would pass its organisation's usage limits, so it was refused. See details.reason; an owner can review them in Billing.
UploadsPaused = "usage/uploads-paused", 402;
/// `upload/unsupported-type` (HTTP 415): The file type is not accepted. details.source is `calmlens` when CalmLens cannot store and process it (use a concrete MIME type such as image/png, application/pdf or text/plain) or `preset` when the upload preset doesn't allow it (details.contentType and details.allowedContentTypes say what was sent and what it accepts).
UnsupportedUploadType = "upload/unsupported-type", 415;
/// `upload-payload/invalid` (HTTP 400): Upload payload is invalid.
InvalidUploadPayload = "upload-payload/invalid", 400;
/// `upload/options-in-query` (HTTP 400): Send the asset's name and fields in the request body (the JSON body, or the options part of a multipart/form-data upload), not in the query string.
UploadOptionsInQuery = "upload/options-in-query", 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-part/invalid-number` (HTTP 409): Multipart upload part number is invalid.
InvalidUploadPartNumber = "upload-part/invalid-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/no-rendered-version` (HTTP 404): This asset has no such resource: text and spreadsheets have no rendered version or preview, and documents, audio and video get theirs once processing makes them. Check the asset's `content.rendered` and `content.preview`, or request its original resource instead.
NoRenderedVersion = "asset/no-rendered-version", 404;
/// `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/child-not-deletable` (HTTP 409): This asset was extracted from another asset (its `parentId`), so it can't be deleted on its own. Delete the asset it was extracted from instead, which deletes it too.
AssetChildNotDeletable = "asset/child-not-deletable", 409;
/// `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/held` (HTTP 423): The asset is held and this request can't change or deliver it. details.hold is `safety` for a safety hold or `copyright` for a copyright claim.
AssetHeld = "asset/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;
/// `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/not-found` (HTTP 404): Lens not found. Check the lens ID or identifier in the portal.
LensNotFound = "lens/not-found", 404;
/// `lens/identifier-taken` (HTTP 409): The project already has a lens with this identifier. Update that lens, or give this one another identifier.
LensIdentifierTaken = "lens/identifier-taken", 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-entry/quality-too-low` (HTTP 422): This hash cannot be matched. Use a more detailed image or a hash of higher quality.
HashListEntryQualityTooLow = "hash-list-entry/quality-too-low", 422;
/// `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;
/// `policy/not-found` (HTTP 404): Policy not found. Check the policy ID in the portal.
PolicyNotFound = "policy/not-found", 404;
/// `policy/revision-conflict` (HTTP 409): The policy changed. Retrieve it again and retry with its current revision.
PolicyRevisionConflict = "policy/revision-conflict", 409;
/// `policy/projects-changed` (HTTP 409): The projects using this policy changed. Retrieve it again and review the affected projects before saving.
PolicyProjectsChanged = "policy/projects-changed", 409;
/// `policy/in-use` (HTTP 409): Projects or upload presets still use this policy. Choose another policy for each of them before deleting it.
PolicyInUse = "policy/in-use", 409;
/// `policy/used-by-another-project` (HTTP 409): Another project uses this policy, so it can only be changed from the portal or that project.
PolicyUsedByAnotherProject = "policy/used-by-another-project", 409;
/// `policy/no-preset` (HTTP 400): This policy has no preset baseline.
PolicyNoPreset = "policy/no-preset", 400;
/// `policy/preset-version-conflict` (HTTP 409): The preset changed. Review the latest differences and retry with its version.
PolicyPresetVersionConflict = "policy/preset-version-conflict", 409;
/// `policy/preset-update-unavailable` (HTTP 409): Only an unchanged copy of an older preset version can be updated. Reset or review your changes first.
PolicyPresetUpdateUnavailable = "policy/preset-update-unavailable", 409;
/// `policy/automatic-updates-unavailable` (HTTP 409): Automatic updates can only be switched on for a saved copy of one of the organisation's own preset policies, and off for one that has them.
PolicyAutomaticUpdatesUnavailable = "policy/automatic-updates-unavailable", 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;
/// `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 = "remote-url/not-allowed", 403;
/// `upload/rate-limit-reached` (HTTP 429): This organisation has started too many uploads in the last 10 seconds. Wait for the Retry-After period, or lower the pace of uploads.
UploadRateLimitReached = "upload/rate-limit-reached", 429;
/// `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-preset/revision-conflict` (HTTP 409): The upload preset changed, or was created or deleted, since you read it. Retrieve it again and retry with its current revision.
UploadPresetRevisionConflict = "upload-preset/revision-conflict", 409;
/// `upload-preset/key-taken` (HTTP 409): Another upload preset in this project has this key. Choose a different key.
UploadPresetKeyTaken = "upload-preset/key-taken", 409;
/// `upload-preset/daily-limit-required` (HTTP 400): A preset that anyone can upload to needs a daily upload limit.
UploadPresetDailyLimitRequired = "upload-preset/daily-limit-required", 400;
/// `upload-preset/invalid-folder` (HTTP 400): The folder isn't in this project. Choose a folder from this project and try again.
UploadPresetInvalidFolder = "upload-preset/invalid-folder", 400;
/// `upload-preset/invalid-policy` (HTTP 400): The policy isn't one of this organisation's. Choose one of its policies and try again.
UploadPresetInvalidPolicy = "upload-preset/invalid-policy", 400;
/// `project-settings/revision-conflict` (HTTP 409): The project's settings or metadata fields changed since you read them. Retrieve them again and retry with the current revision.
ProjectSettingsRevisionConflict = "project-settings/revision-conflict", 409;
/// `search/estimate-changed` (HTTP 409): Turning on AI media search needs a searchIndexingBudgetUnits of at least the current indexing estimate, which details.indexingUnits gives.
SearchEstimateChanged = "search/estimate-changed", 409;
/// `metadata-field/not-found` (HTTP 404): The project has no metadata field with this ID.
MetadataFieldNotFound = "metadata-field/not-found", 404;
/// `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;
/// `remote-url/invalid` (HTTP 400): Remote URLs must use HTTP or HTTPS and cannot target private networks, localhost names or URL credentials.
InvalidRemoteUrl = "remote-url/invalid", 400;
/// `remote-url/unavailable` (HTTP 422): The URL responded with an error status. Check that it is publicly reachable.
RemoteUrlUnavailable = "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/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;
}