@idelio/contracts 0.1.0-beta.0 → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/brands.d.ts +1 -0
- package/dist/error-catalog.d.ts +628 -0
- package/dist/error-catalog.js +618 -0
- package/dist/events.d.ts +1 -4
- package/dist/events.js +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/webhooks.d.ts +73 -12
- package/dist/webhooks.js +48 -0
- package/openapi/openapi.yaml +360 -129
- package/package.json +3 -2
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import type { errorTypes } from "./errors.js";
|
|
2
|
+
export type ErrorType = (typeof errorTypes)[number];
|
|
3
|
+
export interface ErrorCatalogEntry {
|
|
4
|
+
type: ErrorType;
|
|
5
|
+
status: readonly number[];
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
resolution: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const errorCatalog: {
|
|
11
|
+
readonly required_assets_missing: {
|
|
12
|
+
readonly type: "invalid_request_error";
|
|
13
|
+
readonly status: readonly [422];
|
|
14
|
+
readonly title: "Required asset kinds are missing";
|
|
15
|
+
readonly description: "Every new brand includes five asset kinds - logo, logo_alternative, logo_wordmark, color_palette and font_pairing - and the assets list in this request leaves out at least one of them. The message names the missing kinds.";
|
|
16
|
+
readonly resolution: "Add the missing kinds to assets, or leave assets out entirely to get exactly the five. Other kinds can be added on top.";
|
|
17
|
+
};
|
|
18
|
+
readonly unsupported_size: {
|
|
19
|
+
readonly type: "invalid_request_error";
|
|
20
|
+
readonly status: readonly [415];
|
|
21
|
+
readonly title: "The asset was not rendered at that size";
|
|
22
|
+
readonly description: "Favicons and app icons come pre-rendered at a fixed set of sizes, and nothing is resized on request. The size you asked for is not one of them; the message lists the sizes this asset has.";
|
|
23
|
+
readonly resolution: "Request one of the sizes the message lists, or omit size to get the asset's default file.";
|
|
24
|
+
};
|
|
25
|
+
readonly session_required: {
|
|
26
|
+
readonly type: "permission_error";
|
|
27
|
+
readonly status: readonly [403];
|
|
28
|
+
readonly title: "This action needs a signed-in user";
|
|
29
|
+
readonly description: "The operation acts on behalf of a person - billing, members, API keys, workspace settings - and an API key acts for the workspace, not a person, so it can never call it.";
|
|
30
|
+
readonly resolution: "Do this in the Idelio app while signed in. The SDK exposes no method for these operations.";
|
|
31
|
+
};
|
|
32
|
+
readonly already_a_member: {
|
|
33
|
+
readonly type: "conflict_error";
|
|
34
|
+
readonly status: readonly [409];
|
|
35
|
+
readonly title: "That person is already a member";
|
|
36
|
+
readonly description: "The invite or add-member request named a person who already belongs to this workspace.";
|
|
37
|
+
readonly resolution: "No action is needed - the person already has access. Check the workspace's member list.";
|
|
38
|
+
};
|
|
39
|
+
readonly already_generating: {
|
|
40
|
+
readonly type: "conflict_error";
|
|
41
|
+
readonly status: readonly [409];
|
|
42
|
+
readonly title: "That suggestion is already generating";
|
|
43
|
+
readonly description: "The asset a suggestion card points at is already being produced by a job that has not finished yet, so generating it again was refused.";
|
|
44
|
+
readonly resolution: "Wait for the running job to finish, then check the brand's assets or suggestions again.";
|
|
45
|
+
};
|
|
46
|
+
readonly already_on_this_plan: {
|
|
47
|
+
readonly type: "invalid_request_error";
|
|
48
|
+
readonly status: readonly [422];
|
|
49
|
+
readonly title: "The workspace is already on that plan";
|
|
50
|
+
readonly description: "The checkout or subscription-change request named the price the workspace is subscribed to already.";
|
|
51
|
+
readonly resolution: "Pick a different plan's price id, or skip the change if the current plan is the intended one.";
|
|
52
|
+
};
|
|
53
|
+
readonly already_refunded: {
|
|
54
|
+
readonly type: "conflict_error";
|
|
55
|
+
readonly status: readonly [409];
|
|
56
|
+
readonly title: "This reservation was already refunded";
|
|
57
|
+
readonly description: "A credit reservation can be settled or refunded exactly once. This one was already refunded, so it cannot be acted on again.";
|
|
58
|
+
readonly resolution: "This indicates the request replayed an operation that already completed. If the underlying job or asset still looks stuck, report it with the request_id.";
|
|
59
|
+
};
|
|
60
|
+
readonly already_settled: {
|
|
61
|
+
readonly type: "conflict_error";
|
|
62
|
+
readonly status: readonly [409];
|
|
63
|
+
readonly title: "This reservation was already settled";
|
|
64
|
+
readonly description: "A credit reservation can be settled or refunded exactly once. This one was already settled, so it cannot be acted on again.";
|
|
65
|
+
readonly resolution: "This indicates the request replayed an operation that already completed. If the underlying job or asset still looks stuck, report it with the request_id.";
|
|
66
|
+
};
|
|
67
|
+
readonly api_key_not_found: {
|
|
68
|
+
readonly type: "not_found_error";
|
|
69
|
+
readonly status: readonly [404];
|
|
70
|
+
readonly title: "No active API key with that id";
|
|
71
|
+
readonly description: "The API key id in the request does not match an active key on this workspace - it may be revoked or never existed.";
|
|
72
|
+
readonly resolution: "Check the key id, or list the workspace's keys to find the right one.";
|
|
73
|
+
};
|
|
74
|
+
readonly asset_already_exists: {
|
|
75
|
+
readonly type: "conflict_error";
|
|
76
|
+
readonly status: readonly [409];
|
|
77
|
+
readonly title: "The brand already has this asset kind";
|
|
78
|
+
readonly description: "An expand request asked for one or more asset kinds the brand already owns. The message names which ones.";
|
|
79
|
+
readonly resolution: "Use refine or regenerate on the existing asset instead of expanding for a kind the brand already has.";
|
|
80
|
+
};
|
|
81
|
+
readonly asset_kind_does_not_support_instructions: {
|
|
82
|
+
readonly type: "invalid_request_error";
|
|
83
|
+
readonly status: readonly [422];
|
|
84
|
+
readonly title: "This asset kind takes no refine/variation instructions";
|
|
85
|
+
readonly description: "Free-text refine or variation instructions are not supported for this asset's kind yet.";
|
|
86
|
+
readonly resolution: "Omit the instructions field for this kind, or regenerate the asset without it.";
|
|
87
|
+
};
|
|
88
|
+
readonly asset_kind_not_expandable: {
|
|
89
|
+
readonly type: "invalid_request_error";
|
|
90
|
+
readonly status: readonly [422];
|
|
91
|
+
readonly title: "This asset kind cannot be expanded";
|
|
92
|
+
readonly description: "The expand endpoint only produces certain asset kinds - notably not logo, which has its own dedicated generation and approval flow. The message names the kinds it refused.";
|
|
93
|
+
readonly resolution: "Remove the named kinds from the request, or use the kind's own dedicated endpoint if it has one.";
|
|
94
|
+
};
|
|
95
|
+
readonly asset_kind_not_priceable: {
|
|
96
|
+
readonly type: "invalid_request_error";
|
|
97
|
+
readonly status: readonly [422];
|
|
98
|
+
readonly title: "This build cannot price that asset kind";
|
|
99
|
+
readonly description: "The asset kind named in the request has no credit price in the currently deployed catalogue.";
|
|
100
|
+
readonly resolution: "This indicates a kind that predates or postdates this deployment's catalogue. Report it with the request_id.";
|
|
101
|
+
};
|
|
102
|
+
readonly asset_kind_not_regenerable: {
|
|
103
|
+
readonly type: "api_error";
|
|
104
|
+
readonly status: readonly [501];
|
|
105
|
+
readonly title: "Regeneration is not yet available for this asset kind";
|
|
106
|
+
readonly description: "Regenerate is only implemented for a subset of asset kinds so far; this one is not one of them.";
|
|
107
|
+
readonly resolution: "There is no workaround yet for this kind - check back as the catalogue of regenerable kinds grows.";
|
|
108
|
+
};
|
|
109
|
+
readonly asset_kinds_require_studio_or_elite: {
|
|
110
|
+
readonly type: "invalid_request_error";
|
|
111
|
+
readonly status: readonly [422];
|
|
112
|
+
readonly title: "These asset kinds need a higher AI team tier";
|
|
113
|
+
readonly description: "One or more requested asset kinds are not available on the flash tier. The message names which ones.";
|
|
114
|
+
readonly resolution: "Request those kinds on a brand generated (or expanded) with a higher team tier, or drop them from the request.";
|
|
115
|
+
};
|
|
116
|
+
readonly asset_not_found: {
|
|
117
|
+
readonly type: "not_found_error";
|
|
118
|
+
readonly status: readonly [404];
|
|
119
|
+
readonly title: "No asset with that id";
|
|
120
|
+
readonly description: "The asset id in the request does not match an asset in this workspace.";
|
|
121
|
+
readonly resolution: "Check the asset id, or list the brand's assets to find the right one.";
|
|
122
|
+
};
|
|
123
|
+
readonly asset_not_ready: {
|
|
124
|
+
readonly type: "not_found_error";
|
|
125
|
+
readonly status: readonly [404];
|
|
126
|
+
readonly title: "This asset has no downloadable files yet";
|
|
127
|
+
readonly description: "The asset exists but its generation has not produced any files yet - it may still be in progress.";
|
|
128
|
+
readonly resolution: "Wait for the asset's job to finish, then request the download again.";
|
|
129
|
+
};
|
|
130
|
+
readonly asset_not_yet_approved: {
|
|
131
|
+
readonly type: "invalid_request_error";
|
|
132
|
+
readonly status: readonly [422];
|
|
133
|
+
readonly title: "Approve a logo concept first";
|
|
134
|
+
readonly description: "A variation was requested of a logo concept before any concept on this brand was approved.";
|
|
135
|
+
readonly resolution: "Approve a logo concept for this brand, then request the variation.";
|
|
136
|
+
};
|
|
137
|
+
readonly asset_recipe_incomplete: {
|
|
138
|
+
readonly type: "invalid_request_error";
|
|
139
|
+
readonly status: readonly [422];
|
|
140
|
+
readonly title: "This asset predates regeneration support";
|
|
141
|
+
readonly description: "The asset was generated before its kind recorded the recipe regeneration needs, so it cannot be regenerated in place.";
|
|
142
|
+
readonly resolution: "Regenerate the full brand (or, for a logo-derived kind, the logo) to get an asset that can be regenerated on its own.";
|
|
143
|
+
};
|
|
144
|
+
readonly asset_version_not_found: {
|
|
145
|
+
readonly type: "not_found_error";
|
|
146
|
+
readonly status: readonly [404];
|
|
147
|
+
readonly title: "No matching asset version for that job";
|
|
148
|
+
readonly description: "The asset_version_id in the request does not match a logo concept (or other version) recorded against this job.";
|
|
149
|
+
readonly resolution: "Re-read the job's logo concepts and use one of the asset_version_id values it lists.";
|
|
150
|
+
};
|
|
151
|
+
readonly bad_request: {
|
|
152
|
+
readonly type: "invalid_request_error";
|
|
153
|
+
readonly status: readonly [400];
|
|
154
|
+
readonly title: "The request could not be processed";
|
|
155
|
+
readonly description: "A generic 400 raised without a more specific code - the request was malformed in a way none of the catalogue's other 4xx codes describe.";
|
|
156
|
+
readonly resolution: "Check the request body and query parameters against the OpenAPI document for this operation.";
|
|
157
|
+
};
|
|
158
|
+
readonly brand_asset_not_found: {
|
|
159
|
+
readonly type: "not_found_error";
|
|
160
|
+
readonly status: readonly [404];
|
|
161
|
+
readonly title: "The brand has no such asset yet";
|
|
162
|
+
readonly description: "The brand export or download you requested needs an asset the brand does not have yet - for example a logo, a rendered PNG, a guidelines PDF or a wordmark.";
|
|
163
|
+
readonly resolution: "Generate or expand the brand to produce the missing asset first, then request the export again.";
|
|
164
|
+
};
|
|
165
|
+
readonly brand_not_found: {
|
|
166
|
+
readonly type: "not_found_error";
|
|
167
|
+
readonly status: readonly [404];
|
|
168
|
+
readonly title: "No brand with that id";
|
|
169
|
+
readonly description: "The brand id in the request does not match a brand in this workspace.";
|
|
170
|
+
readonly resolution: "Check the brand id, or list the workspace's brands to find the right one.";
|
|
171
|
+
};
|
|
172
|
+
readonly brand_not_ready: {
|
|
173
|
+
readonly type: "conflict_error";
|
|
174
|
+
readonly status: readonly [409];
|
|
175
|
+
readonly title: "The brand has not finished generating";
|
|
176
|
+
readonly description: "The brand's DNA (or its current version) has not been frozen yet - its generation job must complete first.";
|
|
177
|
+
readonly resolution: "Wait for the brand's generation job to finish, then request this operation again.";
|
|
178
|
+
};
|
|
179
|
+
readonly checkout_session_not_found: {
|
|
180
|
+
readonly type: "not_found_error";
|
|
181
|
+
readonly status: readonly [404];
|
|
182
|
+
readonly title: "No checkout session with that id";
|
|
183
|
+
readonly description: "The checkout session id in the request does not match a session created for this workspace.";
|
|
184
|
+
readonly resolution: "Check the session id, or start a new checkout session.";
|
|
185
|
+
};
|
|
186
|
+
readonly clerk_error: {
|
|
187
|
+
readonly type: "api_error";
|
|
188
|
+
readonly status: readonly [502];
|
|
189
|
+
readonly title: "The identity provider could not complete this request";
|
|
190
|
+
readonly description: "A call to the identity provider behind sign-in and organizations failed or timed out.";
|
|
191
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
192
|
+
};
|
|
193
|
+
readonly colors_locked: {
|
|
194
|
+
readonly type: "conflict_error";
|
|
195
|
+
readonly status: readonly [409];
|
|
196
|
+
readonly title: "This brand's color palette is locked";
|
|
197
|
+
readonly description: "A generation lock is pinning the brand's color palette, so it cannot be regenerated while the lock is on.";
|
|
198
|
+
readonly resolution: "Unlock the color palette in the brand's DNA, then regenerate it.";
|
|
199
|
+
};
|
|
200
|
+
readonly conflict: {
|
|
201
|
+
readonly type: "conflict_error";
|
|
202
|
+
readonly status: readonly [409];
|
|
203
|
+
readonly title: "The request conflicts with the resource's current state";
|
|
204
|
+
readonly description: "A generic 409 raised without a more specific code - the operation cannot be completed given the resource's current state.";
|
|
205
|
+
readonly resolution: "Re-read the resource's current state and retry the operation if it still applies.";
|
|
206
|
+
};
|
|
207
|
+
readonly creative_directions_failed: {
|
|
208
|
+
readonly type: "api_error";
|
|
209
|
+
readonly status: readonly [503];
|
|
210
|
+
readonly title: "Couldn't rank the creative directions";
|
|
211
|
+
readonly description: "The model call that ranks candidate creative directions for a brand failed or timed out.";
|
|
212
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
213
|
+
};
|
|
214
|
+
readonly custom_image_must_be_alone: {
|
|
215
|
+
readonly type: "invalid_request_error";
|
|
216
|
+
readonly status: readonly [422];
|
|
217
|
+
readonly title: "custom_image cannot be combined with other kinds";
|
|
218
|
+
readonly description: "A request's assets list included custom_image alongside one or more other asset kinds, which is not allowed.";
|
|
219
|
+
readonly resolution: "Send a request with assets set to exactly [\"custom_image\"], and request the other kinds separately.";
|
|
220
|
+
};
|
|
221
|
+
readonly custom_image_name_not_allowed: {
|
|
222
|
+
readonly type: "invalid_request_error";
|
|
223
|
+
readonly status: readonly [422];
|
|
224
|
+
readonly title: "custom_image_name is only valid for a custom_image request";
|
|
225
|
+
readonly description: "The custom_image_name field was set on a request whose assets is not exactly [\"custom_image\"].";
|
|
226
|
+
readonly resolution: "Only send custom_image_name when assets is exactly [\"custom_image\"]; otherwise omit it.";
|
|
227
|
+
};
|
|
228
|
+
readonly custom_image_prompt_required: {
|
|
229
|
+
readonly type: "invalid_request_error";
|
|
230
|
+
readonly status: readonly [422];
|
|
231
|
+
readonly title: "A prompt is required for a custom image";
|
|
232
|
+
readonly description: "The request asked for a custom_image asset without supplying custom_image_prompt.";
|
|
233
|
+
readonly resolution: "Include custom_image_prompt describing the image to generate.";
|
|
234
|
+
};
|
|
235
|
+
readonly dna_token_kinds_must_be_alone: {
|
|
236
|
+
readonly type: "invalid_request_error";
|
|
237
|
+
readonly status: readonly [422];
|
|
238
|
+
readonly title: "color_palette/font_pairing cannot be combined with other kinds";
|
|
239
|
+
readonly description: "Expanding color_palette or font_pairing regenerates a DNA token in a new brand version, and cannot be requested alongside any other asset kind in the same request.";
|
|
240
|
+
readonly resolution: "Send color_palette or font_pairing alone, and request other kinds in a separate call.";
|
|
241
|
+
};
|
|
242
|
+
readonly icon_locked: {
|
|
243
|
+
readonly type: "conflict_error";
|
|
244
|
+
readonly status: readonly [409];
|
|
245
|
+
readonly title: "This brand's icon is locked";
|
|
246
|
+
readonly description: "A generation lock is pinning the brand's logo icon, so it cannot be regenerated while the lock is on.";
|
|
247
|
+
readonly resolution: "Unlock the icon in the brand's DNA, then regenerate the logo.";
|
|
248
|
+
};
|
|
249
|
+
readonly idempotency_key_required: {
|
|
250
|
+
readonly type: "invalid_request_error";
|
|
251
|
+
readonly status: readonly [400];
|
|
252
|
+
readonly title: "An Idempotency-Key header is required";
|
|
253
|
+
readonly description: "Paid generation routes require an Idempotency-Key header so a retried request cannot be charged twice.";
|
|
254
|
+
readonly resolution: "Send an Idempotency-Key header - any unique string you generate per attempt is fine; a retried attempt should reuse the same key.";
|
|
255
|
+
};
|
|
256
|
+
readonly insufficient_credits: {
|
|
257
|
+
readonly type: "payment_error";
|
|
258
|
+
readonly status: readonly [402];
|
|
259
|
+
readonly title: "Not enough credits for this operation";
|
|
260
|
+
readonly description: "The workspace does not have enough credits to reserve for the requested generation.";
|
|
261
|
+
readonly resolution: "Buy more credits or wait for the plan's next refill, then retry the request.";
|
|
262
|
+
};
|
|
263
|
+
readonly insufficient_role: {
|
|
264
|
+
readonly type: "permission_error";
|
|
265
|
+
readonly status: readonly [403];
|
|
266
|
+
readonly title: "Your role does not allow this action";
|
|
267
|
+
readonly description: "The signed-in user's role in this workspace is below the role this action requires. The message names the required role.";
|
|
268
|
+
readonly resolution: "Ask a workspace owner or admin to perform this action, or to raise your role.";
|
|
269
|
+
};
|
|
270
|
+
readonly insufficient_scope: {
|
|
271
|
+
readonly type: "permission_error";
|
|
272
|
+
readonly status: readonly [403];
|
|
273
|
+
readonly title: "This API key is missing a required scope";
|
|
274
|
+
readonly description: "The API key used for this request does not carry the scope this action requires. The message names the required scope.";
|
|
275
|
+
readonly resolution: "Create or use an API key that includes the required scope.";
|
|
276
|
+
};
|
|
277
|
+
readonly internal_error: {
|
|
278
|
+
readonly type: "api_error";
|
|
279
|
+
readonly status: readonly [500];
|
|
280
|
+
readonly title: "Something went wrong on our side";
|
|
281
|
+
readonly description: "An unexpected error occurred while handling the request, and it was not one this catalogue names more specifically.";
|
|
282
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
283
|
+
};
|
|
284
|
+
readonly invalid_amount: {
|
|
285
|
+
readonly type: "invalid_request_error";
|
|
286
|
+
readonly status: readonly [400];
|
|
287
|
+
readonly title: "The amount is not valid";
|
|
288
|
+
readonly description: "A credits amount in the request must be a non-negative integer (or, for a top-up, a positive integer), and it was not.";
|
|
289
|
+
readonly resolution: "Send a whole, non-negative number for the amount field (positive for a top-up).";
|
|
290
|
+
};
|
|
291
|
+
readonly invalid_api_key: {
|
|
292
|
+
readonly type: "authentication_error";
|
|
293
|
+
readonly status: readonly [401];
|
|
294
|
+
readonly title: "The API key is not valid";
|
|
295
|
+
readonly description: "The API key on the request is unknown, has been revoked, or its workspace no longer exists.";
|
|
296
|
+
readonly resolution: "Use a current, active API key for an existing workspace. Create a new one in the Idelio app if needed.";
|
|
297
|
+
};
|
|
298
|
+
readonly invalid_cursor: {
|
|
299
|
+
readonly type: "invalid_request_error";
|
|
300
|
+
readonly status: readonly [400];
|
|
301
|
+
readonly title: "The pagination cursor is malformed";
|
|
302
|
+
readonly description: "The cursor query parameter on a list request could not be decoded.";
|
|
303
|
+
readonly resolution: "Only pass a cursor value exactly as returned by a previous page of the same list - never construct one by hand.";
|
|
304
|
+
};
|
|
305
|
+
readonly invalid_settlement: {
|
|
306
|
+
readonly type: "conflict_error";
|
|
307
|
+
readonly status: readonly [409];
|
|
308
|
+
readonly title: "This settlement does not match its reservation";
|
|
309
|
+
readonly description: "The amount being settled against a credit reservation is more than the reservation actually holds.";
|
|
310
|
+
readonly resolution: "This indicates an internal inconsistency between a job's reservation and its settlement. Report it with the request_id.";
|
|
311
|
+
};
|
|
312
|
+
readonly invalid_signature: {
|
|
313
|
+
readonly type: "authentication_error";
|
|
314
|
+
readonly status: readonly [401];
|
|
315
|
+
readonly title: "The webhook signature could not be verified";
|
|
316
|
+
readonly description: "An inbound webhook (from the billing provider or the identity provider) arrived with a signature that does not match its payload.";
|
|
317
|
+
readonly resolution: "This is not something an integrator can resolve on our webhooks. If you operate your own webhook endpoint and see this from us, verify the signing secret you configured matches ours.";
|
|
318
|
+
};
|
|
319
|
+
readonly invalid_target: {
|
|
320
|
+
readonly type: "invalid_request_error";
|
|
321
|
+
readonly status: readonly [422];
|
|
322
|
+
readonly title: "That export target is not supported";
|
|
323
|
+
readonly description: "The target query parameter on a brand export request did not name one of the supported export targets.";
|
|
324
|
+
readonly resolution: "Use one of the supported target values documented for this endpoint.";
|
|
325
|
+
};
|
|
326
|
+
readonly invalid_token: {
|
|
327
|
+
readonly type: "authentication_error";
|
|
328
|
+
readonly status: readonly [401];
|
|
329
|
+
readonly title: "The session token could not be verified";
|
|
330
|
+
readonly description: "The bearer token on the request is not a valid, current identity provider session token.";
|
|
331
|
+
readonly resolution: "Sign in again to get a fresh session token.";
|
|
332
|
+
};
|
|
333
|
+
readonly job_already_finalized: {
|
|
334
|
+
readonly type: "conflict_error";
|
|
335
|
+
readonly status: readonly [409];
|
|
336
|
+
readonly title: "This job has already finalized";
|
|
337
|
+
readonly description: "The job has already reached a terminal state and can no longer accept an asset retry.";
|
|
338
|
+
readonly resolution: "Start a new job (generate or expand again) instead of retrying an asset on this one.";
|
|
339
|
+
};
|
|
340
|
+
readonly job_asset_not_found: {
|
|
341
|
+
readonly type: "not_found_error";
|
|
342
|
+
readonly status: readonly [404];
|
|
343
|
+
readonly title: "No asset of that kind on this job";
|
|
344
|
+
readonly description: "The kind named in the request does not match any asset this job produced or is producing.";
|
|
345
|
+
readonly resolution: "Check the job's steps to find the asset kinds it actually covers.";
|
|
346
|
+
};
|
|
347
|
+
readonly job_asset_not_retryable: {
|
|
348
|
+
readonly type: "conflict_error";
|
|
349
|
+
readonly status: readonly [409];
|
|
350
|
+
readonly title: "This asset is not in a retryable state";
|
|
351
|
+
readonly description: "A retry was requested for a job asset that is not currently in a failed, retryable state. The message names its current state.";
|
|
352
|
+
readonly resolution: "Only retry an asset while the job reports it as failed and retryable.";
|
|
353
|
+
};
|
|
354
|
+
readonly job_not_awaiting_logo_selection: {
|
|
355
|
+
readonly type: "conflict_error";
|
|
356
|
+
readonly status: readonly [409];
|
|
357
|
+
readonly title: "This job is not awaiting a logo selection";
|
|
358
|
+
readonly description: "A logo concept selection was submitted for a job that is not currently paused waiting for one.";
|
|
359
|
+
readonly resolution: "Only select a logo concept while the job's status shows it is awaiting a logo selection.";
|
|
360
|
+
};
|
|
361
|
+
readonly job_not_cancelable: {
|
|
362
|
+
readonly type: "conflict_error";
|
|
363
|
+
readonly status: readonly [409];
|
|
364
|
+
readonly title: "This job has already finished";
|
|
365
|
+
readonly description: "A cancel was requested for a job that already reached a terminal status. The message names that status.";
|
|
366
|
+
readonly resolution: "There is nothing to cancel - the job is no longer running.";
|
|
367
|
+
};
|
|
368
|
+
readonly job_not_found: {
|
|
369
|
+
readonly type: "not_found_error";
|
|
370
|
+
readonly status: readonly [404];
|
|
371
|
+
readonly title: "No job with that id";
|
|
372
|
+
readonly description: "The job id in the request does not match a job in this workspace.";
|
|
373
|
+
readonly resolution: "Check the job id, or read the brand's current job to find the right one.";
|
|
374
|
+
};
|
|
375
|
+
readonly last_owner: {
|
|
376
|
+
readonly type: "conflict_error";
|
|
377
|
+
readonly status: readonly [409];
|
|
378
|
+
readonly title: "The workspace must keep at least one owner";
|
|
379
|
+
readonly description: "The requested change (removing a member or changing a role) would leave the workspace with no owner.";
|
|
380
|
+
readonly resolution: "Promote another member to owner first, then repeat this change.";
|
|
381
|
+
};
|
|
382
|
+
readonly lockup_not_available: {
|
|
383
|
+
readonly type: "invalid_request_error";
|
|
384
|
+
readonly status: readonly [422];
|
|
385
|
+
readonly title: "This brand has no lockup yet";
|
|
386
|
+
readonly description: "The brand's logo predates the pipeline producing a lockup file, so variant=lockup has nothing to return.";
|
|
387
|
+
readonly resolution: "Regenerate the logo to get a lockup, or request variant=mark instead.";
|
|
388
|
+
};
|
|
389
|
+
readonly logo_concept_preview_failed: {
|
|
390
|
+
readonly type: "api_error";
|
|
391
|
+
readonly status: readonly [503];
|
|
392
|
+
readonly title: "Couldn't render that logo concept preview";
|
|
393
|
+
readonly description: "The render that produces a logo concept's preview image failed or timed out.";
|
|
394
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
395
|
+
};
|
|
396
|
+
readonly logo_not_approved: {
|
|
397
|
+
readonly type: "conflict_error";
|
|
398
|
+
readonly status: readonly [409];
|
|
399
|
+
readonly title: "This brand has no approved logo yet";
|
|
400
|
+
readonly description: "The requested asset kind renders from the brand's approved logo mark, and this brand has not approved a logo concept yet.";
|
|
401
|
+
readonly resolution: "Approve a logo concept for this brand, then request the asset kind again.";
|
|
402
|
+
};
|
|
403
|
+
readonly logo_not_found: {
|
|
404
|
+
readonly type: "not_found_error";
|
|
405
|
+
readonly status: readonly [404];
|
|
406
|
+
readonly title: "This brand has no approved logo yet";
|
|
407
|
+
readonly description: "The endpoint reads the brand's approved logo treatment, and this brand has not approved a logo concept yet.";
|
|
408
|
+
readonly resolution: "Approve a logo concept for this brand, then call this endpoint again.";
|
|
409
|
+
};
|
|
410
|
+
readonly logo_not_raster: {
|
|
411
|
+
readonly type: "conflict_error";
|
|
412
|
+
readonly status: readonly [409];
|
|
413
|
+
readonly title: "This brand's logo predates raster generation";
|
|
414
|
+
readonly description: "The brand's approved logo is a vector-only mark from before the raster-only logo pipeline, and cannot render the requested kind.";
|
|
415
|
+
readonly resolution: "Regenerate the logo to get a raster mark, then request the asset kind again.";
|
|
416
|
+
};
|
|
417
|
+
readonly member_not_found: {
|
|
418
|
+
readonly type: "not_found_error";
|
|
419
|
+
readonly status: readonly [404];
|
|
420
|
+
readonly title: "No member with that user id";
|
|
421
|
+
readonly description: "The user id in the request does not match a member of this workspace.";
|
|
422
|
+
readonly resolution: "Check the user id, or list the workspace's members to find the right one.";
|
|
423
|
+
};
|
|
424
|
+
readonly missing_authorization: {
|
|
425
|
+
readonly type: "authentication_error";
|
|
426
|
+
readonly status: readonly [401];
|
|
427
|
+
readonly title: "No Authorization header was sent";
|
|
428
|
+
readonly description: "The request carried no Authorization header at all.";
|
|
429
|
+
readonly resolution: "Send an Authorization: Bearer header with either a session token or an API key.";
|
|
430
|
+
};
|
|
431
|
+
readonly name_ideas_failed: {
|
|
432
|
+
readonly type: "api_error";
|
|
433
|
+
readonly status: readonly [503];
|
|
434
|
+
readonly title: "Couldn't come up with names";
|
|
435
|
+
readonly description: "The model call that generates brand name ideas failed or timed out.";
|
|
436
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
437
|
+
};
|
|
438
|
+
readonly no_active_subscription: {
|
|
439
|
+
readonly type: "conflict_error";
|
|
440
|
+
readonly status: readonly [409];
|
|
441
|
+
readonly title: "This workspace has no active subscription";
|
|
442
|
+
readonly description: "The requested billing operation needs an active subscription, and this workspace does not have one yet.";
|
|
443
|
+
readonly resolution: "Start a subscription with POST /v1/billing/checkout, then retry this operation.";
|
|
444
|
+
};
|
|
445
|
+
readonly no_billing_customer: {
|
|
446
|
+
readonly type: "conflict_error";
|
|
447
|
+
readonly status: readonly [409];
|
|
448
|
+
readonly title: "This workspace has never made a purchase";
|
|
449
|
+
readonly description: "The requested billing operation needs an existing billing customer record, and this workspace has none yet.";
|
|
450
|
+
readonly resolution: "Make a purchase or start a subscription first, then retry this operation.";
|
|
451
|
+
};
|
|
452
|
+
readonly not_a_membership: {
|
|
453
|
+
readonly type: "invalid_request_error";
|
|
454
|
+
readonly status: readonly [422];
|
|
455
|
+
readonly title: "This action belongs to a signed-in user";
|
|
456
|
+
readonly description: "Onboarding-style operations act on a person's own membership and cannot be performed by an API key.";
|
|
457
|
+
readonly resolution: "Perform this action in the Idelio app while signed in. The SDK exposes no method for it.";
|
|
458
|
+
};
|
|
459
|
+
readonly organization_required: {
|
|
460
|
+
readonly type: "authentication_error";
|
|
461
|
+
readonly status: readonly [401];
|
|
462
|
+
readonly title: "An active organization is required";
|
|
463
|
+
readonly description: "The signed-in session has no active organization selected, and this action needs one.";
|
|
464
|
+
readonly resolution: "Select or create an organization in the Idelio app, then retry.";
|
|
465
|
+
};
|
|
466
|
+
readonly package_failed: {
|
|
467
|
+
readonly type: "api_error";
|
|
468
|
+
readonly status: readonly [503];
|
|
469
|
+
readonly title: "Couldn't package the files for download";
|
|
470
|
+
readonly description: "Building the requested download archive failed or timed out.";
|
|
471
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
472
|
+
};
|
|
473
|
+
readonly preview_failed: {
|
|
474
|
+
readonly type: "api_error";
|
|
475
|
+
readonly status: readonly [503];
|
|
476
|
+
readonly title: "Couldn't render that preview";
|
|
477
|
+
readonly description: "The render behind this preview request failed or timed out.";
|
|
478
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
479
|
+
};
|
|
480
|
+
readonly rate_limited: {
|
|
481
|
+
readonly type: "rate_limit_error";
|
|
482
|
+
readonly status: readonly [429];
|
|
483
|
+
readonly title: "Too many requests in a short time";
|
|
484
|
+
readonly description: "The caller exceeded a rate limit - on the general API, on the free AI-assist routes, or on a public form like consent or the waitlist.";
|
|
485
|
+
readonly resolution: "Honor the Retry-After header (when present) and slow down before retrying.";
|
|
486
|
+
};
|
|
487
|
+
readonly reservation_not_found: {
|
|
488
|
+
readonly type: "not_found_error";
|
|
489
|
+
readonly status: readonly [404];
|
|
490
|
+
readonly title: "No credit reservation for that job";
|
|
491
|
+
readonly description: "The job id (and idempotency key, where relevant) does not match a credit reservation on record.";
|
|
492
|
+
readonly resolution: "This indicates the job never reserved credits, or the reservation was already resolved. Report it with the request_id if the job still appears to be paid work in progress.";
|
|
493
|
+
};
|
|
494
|
+
readonly resource_missing: {
|
|
495
|
+
readonly type: "not_found_error";
|
|
496
|
+
readonly status: readonly [404];
|
|
497
|
+
readonly title: "The requested resource does not exist";
|
|
498
|
+
readonly description: "A generic 404 raised without a more specific code - nothing matches the id or path in the request.";
|
|
499
|
+
readonly resolution: "Check the id or path against the resource's list endpoint.";
|
|
500
|
+
};
|
|
501
|
+
readonly slug_taken: {
|
|
502
|
+
readonly type: "conflict_error";
|
|
503
|
+
readonly status: readonly [409];
|
|
504
|
+
readonly title: "That slug is already in use";
|
|
505
|
+
readonly description: "The slug named in a brand update request already belongs to another brand in this workspace.";
|
|
506
|
+
readonly resolution: "Choose a different slug.";
|
|
507
|
+
};
|
|
508
|
+
readonly stripe_error: {
|
|
509
|
+
readonly type: "api_error";
|
|
510
|
+
readonly status: readonly [502];
|
|
511
|
+
readonly title: "The billing provider could not complete this request";
|
|
512
|
+
readonly description: "A call to the billing provider failed or timed out.";
|
|
513
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
514
|
+
};
|
|
515
|
+
readonly suggestion_needs_review: {
|
|
516
|
+
readonly type: "conflict_error";
|
|
517
|
+
readonly status: readonly [409];
|
|
518
|
+
readonly title: "This custom asset idea needs review first";
|
|
519
|
+
readonly description: "A custom asset idea's prompt is generated from the brand page after review, and cannot be generated directly by kind.";
|
|
520
|
+
readonly resolution: "Open the brand page's suggestions and generate the custom asset idea from there.";
|
|
521
|
+
};
|
|
522
|
+
readonly suggestion_not_found: {
|
|
523
|
+
readonly type: "not_found_error";
|
|
524
|
+
readonly status: readonly [404];
|
|
525
|
+
readonly title: "No current suggestion for that kind";
|
|
526
|
+
readonly description: "The brand has no live suggestion card for the requested asset kind right now.";
|
|
527
|
+
readonly resolution: "Re-read the brand's current suggestions and act on one that is actually listed.";
|
|
528
|
+
};
|
|
529
|
+
readonly surprise_brief_failed: {
|
|
530
|
+
readonly type: "api_error";
|
|
531
|
+
readonly status: readonly [503];
|
|
532
|
+
readonly title: "Couldn't come up with an idea";
|
|
533
|
+
readonly description: "The model call that generates a surprise-me brand brief failed or timed out.";
|
|
534
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
535
|
+
};
|
|
536
|
+
readonly template_not_found: {
|
|
537
|
+
readonly type: "not_found_error";
|
|
538
|
+
readonly status: readonly [404];
|
|
539
|
+
readonly title: "No template with that id";
|
|
540
|
+
readonly description: "The template id in the request does not match a template in the catalog.";
|
|
541
|
+
readonly resolution: "Check the template id, or list the catalog's templates to find the right one.";
|
|
542
|
+
};
|
|
543
|
+
readonly too_many_running_jobs: {
|
|
544
|
+
readonly type: "conflict_error";
|
|
545
|
+
readonly status: readonly [409];
|
|
546
|
+
readonly title: "Too many generations running at once";
|
|
547
|
+
readonly description: "The workspace already has as many generation jobs running as its plan allows.";
|
|
548
|
+
readonly resolution: "Wait for a running job to finish, or cancel one, then start the new one.";
|
|
549
|
+
};
|
|
550
|
+
readonly typography_locked: {
|
|
551
|
+
readonly type: "conflict_error";
|
|
552
|
+
readonly status: readonly [409];
|
|
553
|
+
readonly title: "This brand's typography is locked";
|
|
554
|
+
readonly description: "A generation lock is pinning the brand's typography, so it cannot be regenerated - or the logo's font changed - while the lock is on.";
|
|
555
|
+
readonly resolution: "Unlock typography in the brand's DNA, then retry.";
|
|
556
|
+
};
|
|
557
|
+
readonly unauthenticated: {
|
|
558
|
+
readonly type: "authentication_error";
|
|
559
|
+
readonly status: readonly [401];
|
|
560
|
+
readonly title: "Sign in is required";
|
|
561
|
+
readonly description: "The requested action (recording consent, for example) requires a signed-in user and none is present.";
|
|
562
|
+
readonly resolution: "Sign in, then retry the request.";
|
|
563
|
+
};
|
|
564
|
+
readonly unknown_price_id: {
|
|
565
|
+
readonly type: "invalid_request_error";
|
|
566
|
+
readonly status: readonly [422];
|
|
567
|
+
readonly title: "That price id is not recognized";
|
|
568
|
+
readonly description: "The price_id in the checkout or plan-change request does not match a price this deployment knows about.";
|
|
569
|
+
readonly resolution: "Use one of the price ids the plans/pricing endpoint returns.";
|
|
570
|
+
};
|
|
571
|
+
readonly unsupported_format: {
|
|
572
|
+
readonly type: "invalid_request_error";
|
|
573
|
+
readonly status: readonly [415, 422];
|
|
574
|
+
readonly title: "That file format is not available for this asset";
|
|
575
|
+
readonly description: "The requested file format (for a download, an export, or a logo/wordmark variant) does not exist for this asset - for example, no svg file was ever produced for it.";
|
|
576
|
+
readonly resolution: "Request one of the formats the asset actually has, or regenerate the asset in a way that produces the format you need.";
|
|
577
|
+
};
|
|
578
|
+
readonly validation_failed: {
|
|
579
|
+
readonly type: "invalid_request_error";
|
|
580
|
+
readonly status: readonly [400, 422];
|
|
581
|
+
readonly title: "The request body failed validation";
|
|
582
|
+
readonly description: "The request body does not match the schema this operation expects - a field is missing, of the wrong type, or otherwise invalid.";
|
|
583
|
+
readonly resolution: "Check the errors array on the envelope, if present, and fix each named field against the OpenAPI document for this operation.";
|
|
584
|
+
};
|
|
585
|
+
readonly version_not_found: {
|
|
586
|
+
readonly type: "not_found_error";
|
|
587
|
+
readonly status: readonly [404];
|
|
588
|
+
readonly title: "No such version";
|
|
589
|
+
readonly description: "The version named in a restore request does not exist for this brand or asset.";
|
|
590
|
+
readonly resolution: "List the resource's version history to find a version id that actually exists.";
|
|
591
|
+
};
|
|
592
|
+
readonly version_pinning_not_supported: {
|
|
593
|
+
readonly type: "invalid_request_error";
|
|
594
|
+
readonly status: readonly [422];
|
|
595
|
+
readonly title: "Pinning a version is not supported here yet";
|
|
596
|
+
readonly description: "This export always reflects the brand's current head version, and a version query parameter was supplied to pin an older one.";
|
|
597
|
+
readonly resolution: "Omit the version parameter - the export always uses the brand's current version.";
|
|
598
|
+
};
|
|
599
|
+
readonly webhook_endpoint_not_found: {
|
|
600
|
+
readonly type: "not_found_error";
|
|
601
|
+
readonly status: readonly [404];
|
|
602
|
+
readonly title: "No webhook endpoint with that id";
|
|
603
|
+
readonly description: "The webhook endpoint id in the request does not match one registered on this workspace.";
|
|
604
|
+
readonly resolution: "Check the endpoint id, or list the workspace's webhook endpoints to find the right one.";
|
|
605
|
+
};
|
|
606
|
+
readonly workflow_start_failed: {
|
|
607
|
+
readonly type: "api_error";
|
|
608
|
+
readonly status: readonly [503];
|
|
609
|
+
readonly title: "Couldn't start the job";
|
|
610
|
+
readonly description: "Starting the durable workflow behind this generation failed - any reserved credits were refunded.";
|
|
611
|
+
readonly resolution: "Try again. If it keeps happening, report it with the request_id.";
|
|
612
|
+
};
|
|
613
|
+
readonly workspace_deleted: {
|
|
614
|
+
readonly type: "authentication_error";
|
|
615
|
+
readonly status: readonly [401];
|
|
616
|
+
readonly title: "This workspace has been deleted";
|
|
617
|
+
readonly description: "The session's workspace has been deleted and can no longer be used.";
|
|
618
|
+
readonly resolution: "Sign in to (or create) a different workspace.";
|
|
619
|
+
};
|
|
620
|
+
readonly workspace_not_found: {
|
|
621
|
+
readonly type: "not_found_error";
|
|
622
|
+
readonly status: readonly [404];
|
|
623
|
+
readonly title: "No workspace with that id";
|
|
624
|
+
readonly description: "The workspace id in the request does not match a workspace this credential can access.";
|
|
625
|
+
readonly resolution: "Check the workspace id, or use GET /v1/me to find the workspace your credential is scoped to.";
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
export type ErrorCode = keyof typeof errorCatalog;
|