/*! Pixonaut SDK type declarations. Licensed under the MIT licence: see LICENSE-TYPES. */ // Generated from apps/api/openapi.json by apps/api/scripts/generate-openapi.ts; // do not edit. Regenerate: pnpm --filter @pixonaut/api gen:openapi // Excluded from biome: its `check --write` on commit would reformat this // file, and `--check` would then find it stale. export interface paths { "/a/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a print's artwork * @description The link a printshop is handed with an order. The token in the path is signed by the api and expires; no key is needed. */ get: { parameters: { query?: never; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print file */ 200: { headers: { [name: string]: unknown; }; content: { "application/pdf": string; }; }; /** @description The token does not verify or has expired, or the print has no artwork */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The order's machine lays a white or a varnish this print cannot be handed out with */ 422: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/d/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a print's file or job ticket from a delivery link * @description The links a custom printshop's delivery step hands the shop. The token in the path is signed by the api and expires; no key is needed. It names the print, the order it was made for, and whether it serves the print's file or that order's job ticket, which is read through the order. */ get: { parameters: { query?: never; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print file, or its job ticket */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { [key: string]: unknown; }; "application/pdf": string; }; }; /** @description The token does not verify or has expired, or the print has no such part */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The order's machine lays a white or a varnish this print cannot be handed out with */ 422: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/f/{file}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a font file * @description A font family's file by its content hash: a TTF for a renderer, a WOFF2 for a browser. Any cache may keep it for good, since the bytes at a hash never change. */ get: { parameters: { query?: never; header?: never; path: { file: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The font file */ 200: { headers: { [name: string]: unknown; }; content: { "font/ttf": string; "font/woff2": string; }; }; /** @description Not modified: the `If-None-Match` etag still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description No font file by that name: `.ttf` or `.woff2` naming a hash the catalog has made (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/i/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a catalogue image * @description A blank mockup's photo, or a published template's preview, through the link a key's read of blanks or templates answered with (`thumbnailUrl`, `previewUrl`, a mockup's `mount.url`). The token in the path is signed by the api; no key is needed, so an image element can load it. A thumbnail or preview link expires within two hours and only the caller's browser may cache it. A `mount.url` stays valid for at least 30 days and at most 60, and any cache may keep it until then; it stops opening once the mockup's photo is replaced. A link to a mockup the blank no longer has, or to a version no longer published, does not open. */ get: { parameters: { query?: never; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file's bytes */ 200: { headers: { /** @description The uploaded file's height in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-height"?: number; /** @description The uploaded file's width in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-width"?: number; [name: string]: unknown; }; content: { "image/heic": string; "image/heif": string; "image/jpeg": string; "image/png": string; "image/webp": string; }; }; /** @description The caller's copy, named by its ETag, is current */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The token does not verify or has expired, or the image it names is gone (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: asset_map_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: template_defaults_invalid. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable, assets_unavailable, preview_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/l/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch the logo a hosted page shows * @description The image a tenant's hosted pages show as its logo, through the link their share link's page is answered with. The token in the path is signed by the api and expires within two hours; no key is needed. A link to a logo the tenant has since replaced or cleared no longer opens. `width` serves it no larger than the box it is drawn in. */ get: { parameters: { query?: { /** @description The width in pixels the image is drawn at. The long edge served is derived from the image's own ratio, never larger than the stored image, and clamped to the sizes the api serves. */ width?: string; /** @description `cover` when the image is cropped to fill its box: `width` is then its short edge. */ fit?: "cover"; }; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file's bytes */ 200: { headers: { /** @description The uploaded file's height in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-height"?: number; /** @description The uploaded file's width in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-width"?: number; [name: string]: unknown; }; content: { "image/heic": string; "image/heif": string; "image/jpeg": string; "image/png": string; "image/webp": string; }; }; /** @description Not modified: the `If-None-Match` etag still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The token does not verify or has expired, or the image is no longer the tenant's logo (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/m/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a published library asset * @description The preview of a library asset its tenant made public, such as a product photo a template shows. No key is needed, and shared caches may keep it. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file's bytes */ 200: { headers: { /** @description The uploaded file's height in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-height"?: number; /** @description The uploaded file's width in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-width"?: number; [name: string]: unknown; }; content: { "image/heic": string; "image/heif": string; "image/jpeg": string; "image/png": string; "image/webp": string; }; }; /** @description Not modified: the `If-None-Match` etag still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description No such public library asset (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/p/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a proof image * @description The link `POST /v1/proofs` answers with, for showing a customer what they are approving. The token in the path is signed by the api and expires; no key is needed. */ get: { parameters: { query?: never; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The proof image */ 200: { headers: { [name: string]: unknown; }; content: { "image/jpeg": string; }; }; /** @description The token does not verify, has expired or is not a proof link, or the image is gone */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description The request failed unexpectedly. */ 500: { headers: { [name: string]: unknown; }; content: { "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/t/{id}/mockup.png": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Render a template on a product photo * @description The published template `id` (`baseId@version`) drawn into the print area a blank placement's mockup photo marks, as a PNG a storefront shows. A draft, an unknown blank, placement or mockup, and a mockup whose photo is gone are all 404, so the route says nothing about which of them is missing. `size` caps the long edge in pixels. */ get: { parameters: { query: { /** @description The blank whose placement the mockup is of. */ blankId: string; /** @description The placement on that blank. */ placementId: string; /** @description One of the placement's mockup photos. */ mockupId: string; /** @description The long edge in pixels, clamped to the sizes the api renders. */ size?: string; /** @description Refused: a full-bleed reference cannot be composited. */ bleed?: string; }; header?: never; path: { /** @description A published template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The template on the product photo */ 200: { headers: { [name: string]: unknown; }; content: { "image/png": string; }; }; /** @description The caller's copy, named by its ETag, is current */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: bleed_not_compositable */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description No published template, blank, placement or mockup answers to these ids */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: mockup_rect_unusable, mockup_rect_outside_photo, mockup_placed_box_empty, photo_decode_failed, asset_map_too_large, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: artwork_decode_failed, encode_failed, downscale_size_overflow, input_too_large, mockup_warp_unreadable, composite_failed, template_defaults_invalid, db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable, asset_store_unavailable, assets_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/t/{id}/preview.png": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Render a template's preview image * @description The published template drawn with its own default values and clipped to its die-cut shape, as a PNG a storefront shows as a thumbnail. `id` is `baseId@version`. A published version never changes, so its image is served `immutable` with an ETag, and a matching `if-none-match` answers 304. `size` caps the long edge in pixels; `bleed=1` draws the unclipped full-bleed reference instead; its extent is the tenant's default bleed, which can change, so it is served `no-cache` and revalidated with its ETag. A key reads published versions only: any other id is 404. */ get: { parameters: { query?: { /** @description The long edge in pixels, clamped to the sizes the api renders. */ size?: string; /** @description The width in pixels the image is drawn at, for a caller that does not know its ratio: the long edge is derived from the template's declared ratio, and clamped as `size` is. Taken over `size` when both are given. */ width?: string; /** @description `cover` when the image is cropped to fill its box: `width` is then its short edge. */ fit?: "cover"; /** @description `1` for the unclipped full-bleed reference. */ bleed?: string; }; header?: never; path: { /** @description A template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The preview image */ 200: { headers: { [name: string]: unknown; }; content: { "image/png": string; }; }; /** @description The caller's copy, named by its ETag, is current */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description No published template has this id */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: draft_invalid, template_defaults_invalid, draft_has_no_artwork, asset_map_too_large, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`. */ maxBytes?: number; /** @description Always sent with `draft_invalid`. */ reason?: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: template_defaults_invalid, db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable, assets_unavailable, preview_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/u/{token}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** * Upload a file's bytes * @description The `uploadUrl` `POST /v1/assets` answered with. The body is the file itself, exactly the mime and the number of bytes declared there; no key is needed, since the signed token in the path is the credential. A small image is accepted with a `warning` (and `warningKey`, `warningParams` for translation) rather than refused. */ put: { parameters: { query?: never; header?: never; path: { token: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file is stored */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assetId: string; /** @description The asset's `contentKey`, as its listing reports it: pass it as `v` to `/v1/assets/{id}/content` and the answer is cached `immutable`. */ contentKey: string; effectiveDpi: number | null; heightPx: number; /** @description Set when this upload is below the minimum print resolution at its size and may be improved before the proof (`POST /v1/assets/{id}/improve-resolution`), to this size: the template allows upscaling, the tenant's plan and credits cover it, and the shortfall is within one upscale. Null otherwise. */ improveResolution: { heightPx: number; widthPx: number; } | null; warning: string | null; warningKey: string | null; warningParams: { actualPx: number; minPx?: number; } | { storedBytes: number; uploadBytes: number; } | null; widthPx: number; }; }; }; /** @description Refused: unknown_upload */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: upload_expired */ 410: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: size_mismatch, unsupported_mime, animation_not_supported, not_a_valid_image, pixel_dimensions_too_large, size_out_of_bounds */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `unsupported_mime`. */ allowed?: string[]; error: string; /** @description Always sent with `size_out_of_bounds`. */ maxBytes?: number; /** @description Always sent with `pixel_dimensions_too_large`. */ maxEdgePx?: number; /** @description Always sent with `pixel_dimensions_too_large`. */ maxPixels?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: preview_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: storage_quota_exceeded. The tenant's storage quota would be exceeded. `usedBytes` and `quotaBytes` are left out for a publishable key. */ 507: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `storage_quota_exceeded`. */ quotaBytes?: number; /** @description Always sent with `storage_quota_exceeded`. */ usedBytes?: number; }; }; }; }; }; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/admin/sessions/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Inspect a customer session's uploads and proofs * @description Lists every upload and proof one designer session left behind, with when each was made and when each proof expires. `retained` is 1 for one that a committed design or a published template uses, which is kept for as long as that use lasts and which a wipe does not delete, and 0 for one that expires on its own. For support, and for checking what a wipe kept; a storefront does not need it. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The session's assets and proofs */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assets: { created_at: number; id: string; layer_id: string | null; mime: string; retained: number; size_bytes: number; template_id: string | null; }[]; proofs: { created_at: number; doc_hash: string; expires_at: number; id: string; retained: number; template_id: string; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/api-keys": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's API keys * @description Newest first. Metadata only: a key itself is shown once, when it is created. Each key names the member who created it (`createdBy`, with their name as it is now), or null when no member did: a key a secret key created, or one the deployment configures. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The keys */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { allowedOrigins: string[]; /** @description The connected store the key was given to; null for a key minted on its own. Such a key is revoked by disconnecting the store. */ connectionId: string | null; createdAt: number; /** @description The member who created the key; null for one a secret key created. */ createdBy: { name: string | null; userId: string; } | null; /** @description When an MCP key stops working; null for a key that never does. */ expiresAt: number | null; id: string; kind: string; label: string; /** @description A key from the deployment's configuration: listed, never revocable here. */ managed: boolean; }[]; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Create an API key * @description Answers with the key itself, which is never shown again. A publishable key is refused from any origin outside its `allowedOrigins`. An MCP key is created by a member, for their own AI assistant, and acts as them. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { allowedOrigins?: string[]; /** @description An MCP key's lifetime in days; 30 when absent. Refused for any other kind, which never expires. */ expiresInDays?: 7 | 30 | 90 | 365; /** @enum {string} */ kind: "pk" | "sk" | "mcp"; label?: string; }; }; }; responses: { /** @description The new key */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { allowedOrigins: string[]; createdAt: number; expiresAt: number | null; id: string; /** @description The key itself. Shown in this response only. */ key: string; kind: string; label: string; }; }; }; /** @description Refused: invalid_origin, origins_not_allowed, expiry_not_allowed, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_origin`. */ origin?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: forbidden, feature_disabled, origin_forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: sandbox_tenant */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/api-keys/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Revoke an API key * @description A key from the deployment's configuration (`managed`) cannot be revoked here, nor a key a connected store was given (`connectionId`): disconnecting the store revokes it with the rest of what the store holds. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The key was revoked */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: config_managed, connection_key */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; /** * Rename an API key, or change a publishable key's origins * @description Takes what creating that kind of key takes: a secret or integration key, `api-keys:manage`; an MCP key, being the member who created it. A key from the deployment's configuration (`managed`) is not changed here, nor a key a connected store was given, except to rename its integration key: a store's site is changed by connecting it again. Later audit entries name a renamed key by its new name; earlier ones keep the name it had when it acted. */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description A publishable key's origins, replacing the ones it has. Refused for any other kind. */ allowedOrigins?: string[]; /** @description The key's new name. */ label?: string; }; }; }; responses: { /** @description The key, changed */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { allowedOrigins: string[]; id: string; kind: string; label: string; }; }; }; /** @description Refused: invalid_origin, origins_not_allowed, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_origin`. */ origin?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: forbidden, origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: config_managed, connection_key */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/asset-categories": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List asset categories * @description Every category, by name, with how many finished library assets it holds. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The categories */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assetCount: number; id: string; name: string; }[]; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** Create an asset category */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The category's name, 1 to 200 characters, e.g. `Logos`. */ name: string; }; }; }; responses: { /** @description The category was created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: duplicate_category */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large, invalid_name */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/asset-categories/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete an asset category * @description Its assets stay, with no category. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The category was deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; /** Rename an asset category */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The category's name, 1 to 200 characters, e.g. `Logos`. */ name: string; }; }; }; responses: { /** @description The category was renamed */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: duplicate_category */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large, invalid_name */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/asset-duplicate/{sha256hex}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Check whether the tenant already stores a file * @description Asks by the file's SHA-256, in lowercase hex, before uploading it. Advisory: uploading a duplicate is allowed, and counts against the quota again. */ get: { parameters: { query?: never; header?: never; path: { sha256hex: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Whether the bytes are stored, and as which asset (the earliest) */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {boolean} */ exists: false; } | { assetId: string; /** @enum {boolean} */ exists: true; name: string | null; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_hash */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/asset-filters": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the values the asset listing can filter on * @description The sessions and templates assets were uploaded for, most recent first, and the categories and tags, by name. Each list is capped, so a large tenant's is not complete. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The filter values */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { categories: { id: string; name: string; }[]; sessions: string[]; tags: string[]; templates: string[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/asset-tags": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List asset tags * @description Every tag the tenant's assets carry, sorted. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The tags */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": string[]; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/assets": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List assets * @description The tenant's finished assets of every kind, newest first (or with `sort=most-used`, the ones the most of the tenant's drafts use first, then by name), a page at a time. An empty filter is the same as leaving it out. `q` matches a name anywhere, or the start of an asset or session id. `retention=retained` lists what nothing will delete, and `auto-delete` everything else. `ids=a,b` narrows to the named assets; an id this tenant does not hold is left out. */ get: { parameters: { query?: { kind?: "library" | "design-upload"; category?: string; tag?: string; q?: string; retention?: "retained" | "auto-delete"; session?: string; template?: string; sort?: "most-used"; ids?: string; page?: number; pageSize?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of assets */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assets: { categoryId: string | null; /** @description Names the asset's stored bytes, which never change. Pass it as `v` to `/v1/assets/{id}/content` and the answer is cached `immutable`. */ contentKey: string | null; createdAt: number; expiresAt: number; heightPx: number | null; id: string; kind: string; mime: string; name: string | null; retained: boolean; sessionId: string | null; sizeBytes: number; tags: string[]; templateId: string | null; /** @description When the asset's name, visibility, category or tags last changed: what a PATCH's `expectedUpdatedAt` names. */ updatedAt: number; visibility: string; widthPx: number | null; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Start an upload * @description Declares the file about to be uploaded and answers with an `uploadUrl` to `PUT` its bytes to, good once and for 10 minutes. A publishable key's upload is always a design upload, deleted when the tenant's retention runs out unless an order holds it. A secret key's is a library asset unless `kind` is `design-upload`; `visibility: "public"` publishes a library asset at `/m/{id}`. */ post: { parameters: { query?: never; header?: { /** @description The designer's browser session, which the SDK sends so one visitor's uploads and proofs are told apart from another's on the same key: 6 to 64 letters, digits, `_` or `-`. Any other value is ignored. */ "x-pixonaut-session"?: string; }; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { heightMm?: number | null; /** @enum {string} */ kind?: "library" | "design-upload" | "mockup"; layerId?: string | null; /** * @description The file's mime type. A template the upload names may take fewer than the platform does. * @enum {string} */ mime?: "image/png" | "image/jpeg" | "image/webp" | "image/heic" | "image/heif"; name?: string; /** @description The file's size in bytes. The upload must send exactly this many. At most 268435456 for a PNG and 83886080 for any other format, and a template the upload names may allow fewer. */ sizeBytes?: number; templateId?: string | null; /** @enum {string} */ visibility?: "public" | "private"; widthMm?: number | null; } & { [key: string]: unknown; }; }; }; responses: { /** @description The upload is ready for its bytes */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { assetId: string; uploadUrl: string; }; }; }; /** @description Refused: bad_json */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unsupported_mime, size_out_of_bounds, payload_too_large, invalid_input, invalid_kind, invalid_visibility */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `unsupported_mime`. */ allowed?: string[]; /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `size_out_of_bounds`, `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: storage_quota_exceeded. The tenant's storage quota would be exceeded. `usedBytes` and `quotaBytes` are left out for a publishable key. */ 507: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `storage_quota_exceeded`. */ quotaBytes?: number; /** @description Always sent with `storage_quota_exceeded`. */ usedBytes?: number; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/assets/bulk": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Retain or delete assets in bulk * @description Answers every id on its own, in `results`, so one refusal does not fail the rest. `retain` keeps design uploads from being deleted when the tenant's retention runs out; any other id answers `not_found`. `delete` deletes assets of either kind, refusing each one as `DELETE /v1/assets/{id}` would, and a design upload an order holds as `order_referenced`. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @enum {string} */ action: "retain" | "delete"; ids: string[]; }; }; }; responses: { /** @description Each id's answer */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { results: ({ id: string; /** @enum {boolean} */ ok: true; } | { error: string; id: string; /** @enum {boolean} */ ok: false; } | { error: string; id: string; /** @enum {boolean} */ ok: false; referencedBy: { baseId: string; version: number | null; }[]; })[]; }; }; }; /** @description Refused: bad_json */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: payload_too_large, invalid_input */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/assets/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an asset * @description One finished asset of any kind. Its bytes are at `/v1/assets/{id}/content` and `/v1/assets/{id}/original`. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The asset */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { categoryId: string | null; /** @description Names the asset's stored bytes, which never change. Pass it as `v` to `/v1/assets/{id}/content` and the answer is cached `immutable`. */ contentKey: string | null; createdAt: number; expiresAt: number; heightPx: number | null; id: string; kind: string; mime: string; name: string | null; retained: boolean; sessionId: string | null; sizeBytes: number; tags: string[]; templateId: string | null; /** @description When the asset's name, visibility, category or tags last changed: what a PATCH's `expectedUpdatedAt` names. */ updatedAt: number; visibility: string; widthPx: number | null; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; /** * Delete a library asset * @description Refused while something still names the asset: a template version or draft (`template_referenced`, with where), a blank's photo (`blank_referenced`), or the tenant's logo (`logo_referenced`, chosen in its settings; choose another first). `delete_failed` means another write held the tenant's assets for too long; nothing changed, and the request can be sent again. A design upload is deleted through `POST /v1/assets/bulk`. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The asset was deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: template_referenced, blank_referenced, logo_referenced, order_referenced, delete_failed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `template_referenced`. */ referencedBy?: { baseId: string; version: number | null; }[]; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; /** * Update a library asset * @description Sets the fields the body names and leaves the rest. `tags` replaces the asset's tags with this set, each normalised to lowercase with spaces as dashes; `categoryId: null` clears the category. */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The id of a category, as list_asset_categories returns it, or null to take the picture out of its category. */ categoryId?: string | null; /** @description The picture's updatedAt, as list_assets returned it. The change is refused if the picture changed since. */ expectedUpdatedAt?: number; /** @description The picture's new name; it cannot be empty. */ name?: string; /** @description The picture's whole tag list, replacing the current one: lowercase words, e.g. `summer`, `logo`. At most 100. */ tags?: string[]; /** * @description `public` lets the picture be offered to customers; `private` keeps it to the tenant. * @enum {string} */ visibility?: "public" | "private"; }; }; }; responses: { /** @description The updated asset */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { categoryId: string | null; createdAt: number; heightPx: number | null; id: string; mime: string; name: string | null; sizeBytes: number; tags: string[]; /** @description When the asset's name, visibility, category or tags last changed: what a PATCH's `expectedUpdatedAt` names. */ updatedAt: number; visibility: string; widthPx: number | null; }; }; }; /** @description Refused: bad_json */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: stale_update */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `stale_update`. */ current?: { categoryId: string | null; createdAt: number; heightPx: number | null; id: string; mime: string; name: string | null; sizeBytes: number; tags: string[]; /** @description When the asset's name, visibility, category or tags last changed: what a PATCH's `expectedUpdatedAt` names. */ updatedAt: number; visibility: string; widthPx: number | null; }; error: string; }; }; }; /** @description Refused: invalid_tag, unknown_category, payload_too_large, invalid_input, invalid_name, invalid_visibility, invalid_tags */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `invalid_tag`. */ tag?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; trace?: never; }; "/v1/assets/{id}/content": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch an asset's preview * @description The asset's preview when it has one, else the file as stored: what a thumbnail or a canvas shows. `width` serves it no larger than the box it is drawn in; each resize asked for with a key or through a link spends the tenant's render budget, and is refused `rate_limited` once it is spent. The etag names the stored bytes and the size asked for, so `If-None-Match` answers 304 for as long as a cached copy is good. */ get: { parameters: { query?: { /** @description The asset's `contentKey`. When it matches, the answer is cached `immutable`. */ v?: string; /** @description The width in pixels the image is drawn at. The long edge served is derived from the image's own ratio, never larger than the stored image, and clamped to the sizes the api serves. */ width?: string; /** @description `cover` when the image is cropped to fill its box: `width` is then its short edge. */ fit?: "cover"; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file's bytes */ 200: { headers: { /** @description The uploaded file's height in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-height"?: number; /** @description The uploaded file's width in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-width"?: number; [name: string]: unknown; }; content: { "image/heic": string; "image/heif": string; "image/jpeg": string; "image/png": string; "image/webp": string; }; }; /** @description Not modified: the `If-None-Match` etag still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description No such finished asset (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/assets/{id}/improve-resolution": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Improve a customer's upload before the proof * @description Upscales a customer's upload that is below the template's minimum print resolution at the size it was uploaded for, to the size at which it reaches it, into a new design upload for the same layer; the upload is left as it was. Offered by the upload's own answer (`improveResolution`) only where the template allows upscaling, the tenant's plan grants it and its credits cover it, and the shortfall is within one upscale. Takes no size: the upload decides it. Each upload is improved at most once: asked again once delivered, it answers the same improved upload (200) and charges nothing. Paid from the tenant's credits when delivered. */ post: { parameters: { query?: never; header?: { /** @description The designer's browser session, which the SDK sends so one visitor's uploads and proofs are told apart from another's on the same key: 6 to 64 letters, digits, `_` or `-`. Any other value is ignored. */ "x-pixonaut-session"?: string; }; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The improved upload, delivered already: asked again, as when an answer was lost */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assetId: string; contentKey: string; heightPx: number; sourceAssetId: string; widthPx: number; }; }; }; /** @description The improved upload */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { assetId: string; contentKey: string; heightPx: number; sourceAssetId: string; widthPx: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: insufficient_credits. The tenant's credits cannot cover this action, or its spending cap has no room left for it, so none of it was done. `reason` says which: `balance` or `spending_cap`. `requiredCredits`, `availableCredits` and `reason` are left out for a publishable key. */ 402: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `insufficient_credits`. */ availableCredits?: number; error: string; /** @description Always sent with `insufficient_credits`. */ reason?: string; /** @description Always sent with `insufficient_credits`. */ requiredCredits?: number; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: already_improved */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_improvable, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout, upscale_unavailable, upscale_failed, upscale_timed_out, aborted */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: storage_quota_exceeded. The tenant's storage quota would be exceeded. `usedBytes` and `quotaBytes` are left out for a publishable key. */ 507: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `storage_quota_exceeded`. */ quotaBytes?: number; /** @description Always sent with `storage_quota_exceeded`. */ usedBytes?: number; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/assets/{id}/original": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch an asset's file * @description The file as stored, at full resolution. An upload in a format the api converts is stored, and so served, as PNG. Not for a publishable key: a storefront only ever shows the preview. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The file's bytes */ 200: { headers: { /** @description The uploaded file's height in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-height"?: number; /** @description The uploaded file's width in pixels, when it is known. The bytes served may be a smaller preview. */ "x-pixonaut-original-width"?: number; [name: string]: unknown; }; content: { "image/heic": string; "image/heif": string; "image/jpeg": string; "image/png": string; "image/webp": string; }; }; /** @description Not modified: the `If-None-Match` etag still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description No such finished asset (plain text) */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/blanks": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's blanks * @description A page of the tenant's blanks by name. `q` keeps the blanks whose name holds it, case aside; `hasPlacements=true` keeps the ones with a placement to print on. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; q?: string; hasPlacements?: "true" | "false"; pageOf?: string; orderedFirstFor?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of blanks */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { blanks: { categoryId: string | null; createdAt: number; defaultPrintshopId: string | null; id: string; machineProfileId: string | null; name: string; /** @description The blank's placements: the areas a design is printed into. An update replaces the whole list, so send every placement to keep. */ placements: { /** @description Bleed past the trim on each side, in millimetres, 0 to 50. Omitted, the blank category's default applies, else the workspace default. */ bleedMm?: number; /** @description The height a print gets when none is chosen, in millimetres. More than 0 and no more than maxHeightMm. */ defaultHeightMm: number; /** @description The width a print gets when none is chosen, in millimetres. More than 0 and no more than maxWidthMm. */ defaultWidthMm: number; /** @description Print resolution in dots per inch, a whole number above 0. Omitted, the blank category's default applies, else 300. */ dpi?: number; /** @description The placement's id, unique within the blank. Choose a short stable one such as `front`; a template refers to the placement by it. */ id: string; /** @description The tallest print the placement takes, in millimetres. More than 0. */ maxHeightMm: number; /** @description The widest print the placement takes, in millimetres. More than 0. */ maxWidthMm: number; /** @description The product photos shown for the placement, each marking where the print sits on the photo. */ mockups: { /** @description The photo's asset id, as the assets feature returns it after an upload. */ assetId: string; /** @description How far the photo's folds move the design, more than 0 and at most 1. null moves nothing; omitted, the blank category's default applies, else nothing. */ displacementStrength?: number | null; /** @description The mockup's id, unique within the placement. */ id: string; /** @description A short label for the photo, such as Front, white. */ label: string; /** @description Where the print area sits on the photo, in the original photo's pixels. All four values are whole numbers, 0 or more. */ placementRectPx: { /** @description The print area's height, in pixels. */ h: number; /** @description The print area's width, in pixels. */ w: number; /** @description The print area's left edge, in pixels from the photo's left. */ x: number; /** @description The print area's top edge, in pixels from the photo's top. */ y: number; }; /** @description How strongly the photo's light and shade carry onto the design, 0 (none) to 1 (all). Omitted, the blank category's default applies, else the default strength. */ shadingStrength?: number; /** @description How strongly the photo's fine detail, such as a weave or a grain, shows through the print, 0 (none) to 1 (all). Omitted, the blank category's default applies; null, or nothing to inherit, the default strength. */ textureStrength?: number | null; /** @description How the design wraps round the product. null lies it flat; omitted, the blank category's default applies, else flat. */ warp?: { /** @description How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0. */ curvature: number; /** @description How much the design darkens toward the product's sides, 0 (none) to 1 (black at the edge). Omitted, none. */ edgeFalloff?: number; /** @description The kind of wrap; `cylinder` is the only one. */ kind: string; } | null; }[]; /** @description The placement's name, such as Front or Back. */ name: string; /** @description How this placement is printed, such as dtg or screen. Omitted, the blank category's default applies. */ printMethod?: string; /** @description Safe area inside the trim on each side, in millimetres, 0 to 50. Omitted, the blank category's default applies, else the workspace default. */ safeAreaMm?: number; /** @description Printed as: the name the blank's printshop knows the placement by, on orders and job sheets. Null or omitted prints the placement's name. */ shopName?: string | null; }[]; printshopLocked: boolean; /** @description Each inheritable field resolved, with where it comes from: the printshop and machine, and every placement's and photo's printing fields and preview looks, in the order of `placements`. */ resolved: { defaultPrintshopId: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; machineProfileId: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; placements: { bleedMm: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; dpi: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; id: string; mockups: { displacementStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; id: string; shadingStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; textureStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; warp: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: { /** @description How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0. */ curvature: number; /** @description How much the design darkens toward the product's sides, 0 (none) to 1 (black at the edge). Omitted, none. */ edgeFalloff?: number; /** @description The kind of wrap; `cylinder` is the only one. */ kind: string; } | null; }; }[]; printMethod: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; /** @description Printed as: the name the blank's printshop knows the placement by, on orders and job sheets. The placement's own shopName, else its name. */ printedAs: string; /** @description Whether Printed as follows the placement's name: true while it has no shopName of its own. */ printedAsLinked: boolean; safeAreaMm: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; }[]; }; updatedAt: number; }[]; orderedFirst: boolean; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/blanks/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Read a blank */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The blank */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { categoryId: string | null; createdAt: number; defaultPrintshopId: string | null; id: string; machineProfileId: string | null; name: string; /** @description The blank's placements: the areas a design is printed into. An update replaces the whole list, so send every placement to keep. */ placements: { /** @description Bleed past the trim on each side, in millimetres, 0 to 50. Omitted, the blank category's default applies, else the workspace default. */ bleedMm?: number; /** @description The height a print gets when none is chosen, in millimetres. More than 0 and no more than maxHeightMm. */ defaultHeightMm: number; /** @description The width a print gets when none is chosen, in millimetres. More than 0 and no more than maxWidthMm. */ defaultWidthMm: number; /** @description Print resolution in dots per inch, a whole number above 0. Omitted, the blank category's default applies, else 300. */ dpi?: number; /** @description The placement's id, unique within the blank. Choose a short stable one such as `front`; a template refers to the placement by it. */ id: string; /** @description The tallest print the placement takes, in millimetres. More than 0. */ maxHeightMm: number; /** @description The widest print the placement takes, in millimetres. More than 0. */ maxWidthMm: number; /** @description The product photos shown for the placement, each marking where the print sits on the photo. */ mockups: { /** @description The photo's asset id, as the assets feature returns it after an upload. */ assetId: string; /** @description How far the photo's folds move the design, more than 0 and at most 1. null moves nothing; omitted, the blank category's default applies, else nothing. */ displacementStrength?: number | null; /** @description The mockup's id, unique within the placement. */ id: string; /** @description A short label for the photo, such as Front, white. */ label: string; /** @description Where the print area sits on the photo, in the original photo's pixels. All four values are whole numbers, 0 or more. */ placementRectPx: { /** @description The print area's height, in pixels. */ h: number; /** @description The print area's width, in pixels. */ w: number; /** @description The print area's left edge, in pixels from the photo's left. */ x: number; /** @description The print area's top edge, in pixels from the photo's top. */ y: number; }; /** @description How strongly the photo's light and shade carry onto the design, 0 (none) to 1 (all). Omitted, the blank category's default applies, else the default strength. */ shadingStrength?: number; /** @description How strongly the photo's fine detail, such as a weave or a grain, shows through the print, 0 (none) to 1 (all). Omitted, the blank category's default applies; null, or nothing to inherit, the default strength. */ textureStrength?: number | null; /** @description How the design wraps round the product. null lies it flat; omitted, the blank category's default applies, else flat. */ warp?: { /** @description How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0. */ curvature: number; /** @description How much the design darkens toward the product's sides, 0 (none) to 1 (black at the edge). Omitted, none. */ edgeFalloff?: number; /** @description The kind of wrap; `cylinder` is the only one. */ kind: string; } | null; }[]; /** @description The placement's name, such as Front or Back. */ name: string; /** @description How this placement is printed, such as dtg or screen. Omitted, the blank category's default applies. */ printMethod?: string; /** @description Safe area inside the trim on each side, in millimetres, 0 to 50. Omitted, the blank category's default applies, else the workspace default. */ safeAreaMm?: number; /** @description Printed as: the name the blank's printshop knows the placement by, on orders and job sheets. Null or omitted prints the placement's name. */ shopName?: string | null; }[]; printshopLocked: boolean; /** @description Each inheritable field resolved, with where it comes from: the printshop and machine, and every placement's and photo's printing fields and preview looks, in the order of `placements`. */ resolved: { defaultPrintshopId: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; machineProfileId: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; placements: { bleedMm: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; dpi: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; id: string; mockups: { displacementStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; id: string; shadingStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; textureStrength: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; warp: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: { /** @description How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0. */ curvature: number; /** @description How much the design darkens toward the product's sides, 0 (none) to 1 (black at the edge). Omitted, none. */ edgeFalloff?: number; /** @description The kind of wrap; `cylinder` is the only one. */ kind: string; } | null; }; }[]; printMethod: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: string | null; }; /** @description Printed as: the name the blank's printshop knows the placement by, on orders and job sheets. The placement's own shopName, else its name. */ printedAs: string; /** @description Whether Printed as follows the placement's name: true while it has no shopName of its own. */ printedAsLinked: boolean; safeAreaMm: { /** @description Where the value comes from: the field's own, its blank category's, the workspace's default, or none (nothing sets it, and the built-in default applies). */ source: string; value: number | null; }; }[]; }; updatedAt: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/blanks/{id}/mockups": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List a blank's placements and mockups * @description The placement and mockup ids a mockup render names, with their labels, in stored order. The order is not an identifier: it changes when the blank is reordered in the studio, so persist the ids. A placement whose stored sizes are unusable is left out. Each placement carries the largest and default print box, the bleed and safe area it prints with (its own, else the tenant's default) and its print method. Each mockup carries a `thumbnailUrl`, a link to its photo that opens with no key for an hour or two, and a `mount`: what a storefront passes to the designer as one of `mockups`, with a photo link that stays valid for at least 30 days. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The blank's placements, each with its mockups */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { placements: { bleedMm: number; defaultHeightMm: number; defaultWidthMm: number; id: string; maxHeightMm: number; maxWidthMm: number; mockups: { id: string; label: string; /** @description What the designer mounts this mockup with, as one of `mockups` with its `label`. Null when the photo has not finished uploading or its size is not known. */ mount: { /** @description How far the photo's folds move the design, more than 0 and at most 1. null moves nothing; omitted, the blank category's default applies, else nothing. */ displacementStrength?: number | null; /** @description The size of the photo `placementRectPx` is measured in. The url may serve a smaller copy of it; the designer places the rect on whatever size arrives. */ photoSizePx: { h: number; w: number; }; /** @description Where the print area sits on the photo, in the original photo's pixels. All four values are whole numbers, 0 or more. */ placementRectPx: { /** @description The print area's height, in pixels. */ h: number; /** @description The print area's width, in pixels. */ w: number; /** @description The print area's left edge, in pixels from the photo's left. */ x: number; /** @description The print area's top edge, in pixels from the photo's top. */ y: number; }; /** @description How strongly the photo's light and shade carry onto the design, 0 (none) to 1 (all). Omitted, the blank category's default applies, else the default strength. */ shadingStrength?: number; /** @description The photo, opened with no key. It stays valid for at least 30 days and at most 60, and any cache may keep it that long; it stops opening once the mockup's photo is replaced. Read the blank's mockups again within 30 days for a fresh one. */ url: string; /** @description How the design wraps round the product. null lies it flat; omitted, the blank category's default applies, else flat. */ warp?: { /** @description How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0. */ curvature: number; /** @description How much the design darkens toward the product's sides, 0 (none) to 1 (black at the edge). Omitted, none. */ edgeFalloff?: number; /** @description The kind of wrap; `cylinder` is the only one. */ kind: string; } | null; } | null; thumbnailUrl: string; }[]; name: string; /** @description How the placement is printed: its own, else its blank category's. Absent when neither names one. */ printMethod?: string; safeAreaMm: number; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/blanks/{id}/placements/{placementId}/fitting-templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the templates that fit a placement * @description Every one of the tenant's templates, with the verdict for its artwork at the size it would print at on this placement. It answers geometry, not whether the pairing is sold. `status` defaults to live templates; `q` keeps the templates whose name holds it, case aside. A placement without usable measurements is answered as not found. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; status?: "all" | "draft" | "live" | "paused"; q?: string; }; header?: never; path: { id: string; placementId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description A page of templates with their verdicts */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { items: { name: string; printHeightMm: number; printWidthMm: number; ratio: { /** @description The ratio's height part. Positive. */ h: number; /** @description The ratio's width part. Positive. */ w: number; }; ratioTolerance: number; status: string; templateId: string; verdict: { /** @enum {boolean} */ legal: true; } | { /** @enum {boolean} */ legal: false; reason: string; }; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/connect": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read this store's connection * @description Called with the store's own integration key. Answers where the store is connected as it is now: its name after a rename in the studio, the workspace and its environment, its webhook endpoint and its publishable key's origins. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The store's connection */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description The publishable key's origins, the site's own first. */ allowedOrigins: string[]; connectionId: string; environment: string; /** @description The integration key's name, which a member may have renamed in the studio. */ name: string; siteUrl: string; tenantId: string; /** @description The workspace's name. A sandbox is named after its live workspace. */ tenantName: string; webhookEndpointId: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; /** * Disconnect this store * @description Called with the store's own integration key. Revokes the integration key, the publishable key and the webhook endpoint the store was given when it connected. */ delete: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The store was disconnected */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; /** * Change the origins this store's publishable key takes * @description Called with the store's own integration key, for a store answering on both its site's address and its counterpart with or without `www.`. Sets the origins the publishable key takes besides the site's own; any other origin is `400 invalid_origin`. Reconnecting starts again from the site's own origin. */ patch: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The site's counterpart with or without `www.`, same scheme and port; an empty list takes it away. The site's own origin is always kept. */ additionalOrigins: string[]; }; }; }; responses: { /** @description The store's connection */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description The publishable key's origins, the site's own first. */ allowedOrigins: string[]; connectionId: string; environment: string; /** @description The integration key's name, which a member may have renamed in the studio. */ name: string; siteUrl: string; tenantId: string; /** @description The workspace's name. A sandbox is named after its live workspace. */ tenantName: string; webhookEndpointId: string; }; }; }; /** @description Refused: invalid_origin, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_origin`. */ origin?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/connect/token": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Exchange a connect code for the store's credentials * @description Called by the store's server with the code the studio sent its merchant back with, the PKCE verifier it made the challenge from, and the same `redirect_uri`. Answers, once, an integration key, a publishable key bound to the store's origin, and a webhook endpoint registered at the store with its signing secret. A code works once, for a minute: any attempt uses it, and every refusal is `invalid_grant`, after which the store connects again. Connecting a site that is already connected replaces its connection, revoking what it was given before. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { code: string; code_verifier?: string; redirect_uri?: string; }; }; }; responses: { /** @description What the store is given */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { connectionId: string; environment: string; integrationKey: { id: string; /** @description The integration key itself. Shown in this response only. */ key: string; label: string; }; publishableKey: { allowedOrigins: string[]; id: string; /** @description Shown in this response only. */ key: string; }; tenantId: string; /** @description The workspace's name. A sandbox is named after its live workspace. */ tenantName: string; webhook: { id: string; /** @description The endpoint's signing secret. Shown in this response only. */ secret: string; url: string; }; }; }; }; /** @description Refused: invalid_grant */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's designs, newest first * @description `status` narrows the list to one status, `q` to designs whose template name or id holds it, `template` to the designs of the template with that base id, and `externalRef` to the designs holding your own reference, matched exactly. Rows carry no document and no fulfilment payload; read one design for those. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; /** @description Only designs in this status: `committed` waits for a decision, `approved` and `rejected` are decided. */ status?: "committed" | "approved" | "rejected"; q?: string; template?: string; externalRef?: string; pageOf?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of designs */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { designs: { api_key_id: string | null; approve_after: number | null; approved_at: number | null; approved_via: string | null; committed_at: number; /** @description Whether `DELETE /v1/designs/{id}` would take the design now: it is not approved, and no print of it exists, of any revision and in any status. */ deletable: boolean; duplicated_from: string | null; /** @description Your own reference for the design, as sent on the commit or `PUT /v1/designs/{id}/external-ref`, or null. */ external_ref: string | null; id: string; /** @description The size the design prints at, without bleed: the `widthMm` and `heightMm` its proof or commit named, or the size fitted for one that named none. A store checks it, with `template_version`, `blank_id` and `placement_id`, against what the product variation sells before accepting the add to cart, since the proof is made in the customer's browser. Null only for a stored document that holds no usable print size. */ print_size: { /** @description The print's trim height, in millimetres. */ heightMm: number; /** @description The print's trim width, in millimetres. */ widthMm: number; } | null; proof_id: string | null; proof_revision: number | null; revision: number; status: string; template_base_id: string; /** @description Whether the design's template was deleted. The design keeps its template's name and version; the template itself can no longer be opened. */ template_deleted: boolean; template_id: string; template_name: string | null; /** @description The version of the template the design was made from: `template_id` after its `@`. A design committed from a proof token was made from the proof's version, whatever the template's latest is now. */ template_version: number | null; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Commit a design * @description Commits a customer's design, from a proof token (secret or integration key only) or from a template and its values. A printshop it names, or the partner a locked blank is made by, is kept on the design and is where its orders go unless an order names another; with none, an order goes to the blank's default printshop, else the tenant's, as they are when the order is made. A fulfilment payload lacking a key is refused 422 `missing_fulfilment_keys` against where the design would go now; each order checks again against the printshop it goes to, and that check decides. A design holding a spot ink that may not print from its CMYK fallback is refused 422 `spot_plate_required` the same way, where that printshop takes no spot plates. A design committed from a template is fitted to and records the blank and placement it names, and a named placement that does not resolve is refused 422 `unknown_placement`; one committed from a proof token records the proof's. Only a secret or integration key may attach a fulfilment payload, an external reference or choose the printshop. */ post: { parameters: { query?: never; header?: { /** @description Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked `Idempotent-Replayed: true`, and makes nothing; the same key with another body is refused `idempotency_key_reused`, and a repeat while the first is still being answered `idempotency_key_in_use`. A request that is refused makes nothing, so its key may be sent again. */ "idempotency-key"?: string; }; path?: never; cookie?: never; }; requestBody: { content: { "application/json": ({ proofToken: string; } & { /** @description The order data a printshop needs to fulfil this design, such as a material or a shipping method: a JSON object of your own keys, which Pixonaut keeps and hands on with the order without reading its keys. Its size and nesting depth are limited. Only a secret or integration key may send it, `null` included; a publishable key sending it is refused with `secret_key_required`. */ fulfilmentPayload?: unknown; } & { /** @description The id of the printshop that makes this design's orders, unless an order names another. Absent or `null`, an order goes to the default printshop of the blank it was made on, else the tenant's default, as they are when the order is made. A blank locked to one printshop refuses any other with `printshop_locked_by_blank`, and the design keeps that printshop and its lock: its orders are refused any other printshop the same way, even once the blank is deleted. Only a secret or integration key may send it, `null` included; a publishable key sending it is refused with `secret_key_required`. */ printshopId?: string | null; } & { /** @description Your own reference for this design, such as your cart or order line id: kept exactly as sent, not unique, and never read by Pixonaut. `GET /v1/designs?externalRef=` finds the designs holding it, and `PUT /v1/designs/{id}/external-ref` replaces it. Only a secret or integration key may send it; a publishable key sending it is refused with `secret_key_required`. */ externalRef?: string; }) | ({ templateId: string; /** @description What the customer entered: an object keyed by the id of the template layer each value is for, holding that layer's properties (a text layer's `content`, for instance). Checked against the template when the design is committed. */ values?: unknown; } & { blankId?: string; placementId?: string; } & { /** @description The order data a printshop needs to fulfil this design, such as a material or a shipping method: a JSON object of your own keys, which Pixonaut keeps and hands on with the order without reading its keys. Its size and nesting depth are limited. Only a secret or integration key may send it, `null` included; a publishable key sending it is refused with `secret_key_required`. */ fulfilmentPayload?: unknown; } & { /** @description The id of the printshop that makes this design's orders, unless an order names another. Absent or `null`, an order goes to the default printshop of the blank it was made on, else the tenant's default, as they are when the order is made. A blank locked to one printshop refuses any other with `printshop_locked_by_blank`, and the design keeps that printshop and its lock: its orders are refused any other printshop the same way, even once the blank is deleted. Only a secret or integration key may send it, `null` included; a publishable key sending it is refused with `secret_key_required`. */ printshopId?: string | null; } & { /** @description Your own reference for this design, such as your cart or order line id: kept exactly as sent, not unique, and never read by Pixonaut. `GET /v1/designs?externalRef=` finds the designs holding it, and `PUT /v1/designs/{id}/external-ref` replaces it. Only a secret or integration key may send it; a publishable key sending it is refused with `secret_key_required`. */ externalRef?: string; } & { heightMm?: number; widthMm?: number; }); }; }; responses: { /** @description The committed design */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { designId: string; /** @description The pictures that print below `printFloorDpi` at the design's print size. A warning: nothing is refused for it. */ lowResolution: { /** @description The picture's pixels along the edge that decides. */ actualPx: number; assetId: string; /** @description Pixels per inch along that edge, as printed. */ effectiveDpi: number; /** @description The layer the picture fills, or the artwork's own key for its image background. */ layerId: string; /** @description The pixels that edge needs at the floor. */ minPx: number; }[]; /** @description The minimum print resolution the design's pictures were judged against: the template's own, else the tenant's. */ printFloorDpi: number; }; }; }; /** @description Refused: placement_not_committable, print_size_not_committable, bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: secret_key_required, forbidden, origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: unknown_proof, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: proof_already_committed, correction_proof, idempotency_key_in_use */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `proof_already_committed`. */ designId?: string; error: string; }; }; }; /** @description Refused: proof_expired */ 410: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: idempotency_key_reused, invalid_idempotency_key, invalid_doc, invalid_fulfilment_payload, payload_too_large, missing_fulfilment_keys, spot_plate_required, unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_locked_by_blank, printshop_differs_from_blank, blank_has_no_printshop, constraint_violation, unknown_placement, asset_map_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`, and may be sent with `payload_too_large`. */ bytes?: number; /** @description Always sent with `spot_plate_required`. */ cause?: string; /** @description Always sent with `invalid_doc`. */ detail?: unknown; error: string; /** @description Always sent with `payload_too_large`, `asset_map_too_large`. */ maxBytes?: number; /** @description Always sent with `missing_fulfilment_keys`. */ missing?: string[]; /** @description Always sent with `unknown_printshop`, `printshop_disconnected`, `printshop_unavailable`, `printshop_locked_by_blank`, `printshop_differs_from_blank`, `blank_has_no_printshop`. */ reason?: string; /** @description Always sent with `spot_plate_required`. */ references?: string[]; /** @description Always sent with `constraint_violation`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Read one design */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design, with its resolved document */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { api_key_id: string | null; /** @description How the customer agreed to the design's approval, made or scheduled, as its approver said; null when none was said. Correcting the design, asking for changes and rejecting it clear it with the approval. */ approval_consent: { /** @description When the customer agreed, epoch milliseconds. */ at: number; /** @description How the customer agreed: by adding the design to their cart, by ticking a box, on a proof page, by approving it again on your store after correcting it (`edit`), or by letting your store's own approval deadline pass (`deadline`). More kinds may be added. */ kind: string; ref: string | null; } | null; approve_after: number | null; approved_at: number | null; approved_via: string | null; blank_id: string | null; /** @description Whether the caller may approve or reject designs: a secret key, or a member holding `designs:update`. */ canDecide: boolean; /** @description Whether the caller may correct this design now: `editable`, and they may decide designs. */ canEdit: boolean; /** @description The open request for changes a customer made on the design's proof page, or null. Open while the design awaits approval at the version it was about; correcting or deciding the design closes it. */ changeRequest: { message: string; requestedAt: number; } | null; committed_at: number; /** @description The form a correction fills in: the design's template version's generated form, as the designer showed it to the customer. Served whether or not `canEdit`, since it also labels the texts of the design's revisions. Null when that version cannot be read. */ correctionForm: { layout?: string; steps: { fields: { constraints: { [key: string]: unknown; }; default?: unknown; description?: string; label: string; layerId: string; prop: string; type: string; }[]; groupId: string; index: number | null; label: string; layerIds: string[]; transforms: { layerId: string; transform: { [key: string]: unknown; }; }[]; }[]; } | null; /** @description Whether `DELETE /v1/designs/{id}` would take the design now: it is not approved, and no print of it exists, of any revision and in any status. */ deletable: boolean; doc: unknown; duplicated_from: string | null; /** @description Whether the design takes a correction now, whoever asks: it is not rejected and it has no order. */ editable: boolean; /** @description Your own reference for the design, as sent on the commit or `PUT /v1/designs/{id}/external-ref`, or null. */ external_ref: string | null; fulfilment_payload: unknown; /** @description Whether any print of this design has been ordered. An ordered design takes no correction; duplicate it instead. */ hasOrder: boolean; /** @description Whether the design's current text has been printed. A correction leaves that print showing the old text; it is never ordered, and the corrected design is printed again only when someone prints it once it is approved. */ hasPrint: boolean; id: string; /** @description When the design's own personal data was erased (`POST /v1/designs/{id}/erase-personal-data`), or null. An erased design's document holds none of the text or pictures its customer put in, and nothing more is printed, ordered or corrected from it. */ personal_data_erased_at: number | null; /** @description The placement on the blank this design was fitted to when it was made; null whenever blank_id is. Kept while the blank is, so it may name a placement since removed from the blank: the print box frozen into the document is what prints. */ placement_id: string | null; /** @description The size the design prints at, without bleed: the `widthMm` and `heightMm` its proof or commit named, or the size fitted for one that named none. A store checks it, with `template_version`, `blank_id` and `placement_id`, against what the product variation sells before accepting the add to cart, since the proof is made in the customer's browser. Null only for a stored document that holds no usable print size. */ print_size: { /** @description The print's trim height, in millimetres. */ heightMm: number; /** @description The print's trim width, in millimetres. */ widthMm: number; } | null; proof_id: string | null; proof_revision: number | null; revision: number; status: string; template_base_id: string; /** @description Whether the design's template was deleted. The design keeps its template's name and version; the template itself can no longer be opened. */ template_deleted: boolean; template_id: string; template_name: string | null; /** @description The version of the template the design was made from: `template_id` after its `@`. A design committed from a proof token was made from the proof's version, whatever the template's latest is now. */ template_version: number | null; tenant_id: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; /** * Delete a design * @description Deletes a design that was never bought: one not approved and never printed, such as a design committed for a cart that was abandoned. It is gone from every list and read, its share links stop working, and its proof and pictures are released. No rejection is recorded; `design.deleted` is. Refused `design_approved` for an approved design and `design_printed` for one with a print, corrected since or not. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design was deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_approved, design_printed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; options?: never; head?: never; /** * Correct a design that has not been ordered * @description Applies `values` on top of the design's document under the rules its template version sets, keeps the size it was committed at, and sends it back to awaiting approval: any approval, made or scheduled, is cleared, and nothing is printed or ordered until it is approved again. Renders a proof of the corrected document, which becomes the design's proof (`proofId`); a correction whose proof cannot be rendered is refused, and writes nothing. Or, with `proofToken` instead, makes a correction proof's document the design's next revision and that proof the design's proof, refused `proof_not_for_design` for a proof of another design, or of no design, and `revision_changed` once the design has moved past the revision the proof was made from. Emits `design.edited`. A correction that leaves the document as it is writes nothing — not a revision, not a cleared approval, not an event — and answers `edited: false`. Refused once any print of the design has an order. */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The token `POST /v1/designs/{id}/correction-proofs` answered for this design. The design must still be at the revision the proof was made from. */ proofToken: string; } | { /** @description The design's `revision` as the caller read it. When the design has been corrected since, the correction is refused `revision_changed`. */ expectedRevision: number; /** @description What to change, in the shape a commit's `values` take: an object keyed by the `layerId` of a field of the design's correctionForm, each holding an object of that field's `prop` and its new value, such as `{"": {"": "new wording"}}`. Applied on top of the design as it is, so anything not named stays as it was. */ values: { [key: string]: unknown; }; }; }; }; responses: { /** @description Corrected, and awaiting approval; or nothing to correct */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Whether this correction wrote a revision. False when it left the document as it was: nothing was written, the approval stands, and `revision` is the current one. */ edited: boolean; /** @description The pictures that print below `printFloorDpi` at the design's print size. A warning: nothing is refused for it. */ lowResolution: { /** @description The picture's pixels along the edge that decides. */ actualPx: number; assetId: string; /** @description Pixels per inch along that edge, as printed. */ effectiveDpi: number; /** @description The layer the picture fills, or the artwork's own key for its image background. */ layerId: string; /** @description The pixels that edge needs at the floor. */ minPx: number; }[]; /** @description The minimum print resolution the design's pictures were judged against: the template's own, else the tenant's. */ printFloorDpi: number; /** @description The design's proof now: the one rendered of the revision this wrote, or, when nothing was written, the proof the design already had (null when it has none). Its image is `GET /v1/designs/{id}/proof`. */ proofId: string | null; revision: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found, unknown_proof */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_editable, revision_changed, proof_not_for_design */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description `ordered`: a print of the design has an order, so it is what was made; duplicate it instead. `erased`: the design's personal data was erased, and it takes nothing more. Always sent with `not_editable`. */ reason?: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: proof_expired */ 410: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: asset_map_too_large, constraint_violation, design_doc_unreadable, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`, and may be sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`, `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `constraint_violation`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: assets_unavailable, lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; trace?: never; }; "/v1/designs/{id}/approve": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Approve a committed design * @description Approves now, or after `afterDays` days when the tenant wants a window for the customer to change their mind. Safe to retry: approving now a design already approved at `expectedRevision` (or at any revision, when none is given) answers `approved` again and records nothing more; one rejected, or approved at another revision, is refused `not_committed`. Through a deciding proof page link, approves now only, must carry `expectedRevision` (else `bad_request`), and is refused `proof_outdated` unless the design's proof shows its current revision, which a design committed without a proof never has. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description Approve after this many days instead of now, 1 to 60: a window for the customer to change their mind. Left out, the design is approved now. */ afterDays?: number; /** @description How the customer agreed to the design, kept on it (`approval_consent`) and in the approval's audit entry. Left out, none is kept. Through a deciding proof page link, refused `bad_request`: the link's approval records its own, a `proof_page` consent naming the link. */ consent?: { /** @description When the customer agreed, epoch milliseconds. */ at: number; /** * @description How the customer agreed: by adding the design to their cart, by ticking a box, on a proof page, by approving it again on your store after correcting it (`edit`), or by letting your store's own approval deadline pass (`deadline`). More kinds may be added. * @enum {string} */ kind: "add_to_cart" | "checkbox" | "proof_page" | "edit" | "deadline"; /** @description Your own reference for the consent, such as the cart line or checkout it was given at. Through a proof page link, the link's id. */ ref?: string | null; }; /** @description The design's `revision` as the caller read it. When the design has been corrected since, the decision is refused `revision_changed` with the revision it has now. Required through a proof page link: a customer decides the revision whose proof they were shown. */ expectedRevision?: number; } | null; }; }; responses: { /** @description Approved now, or scheduled to be */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { status: string; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_committed, proof_outdated, revision_changed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/correction-links": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Hand out a correction link for a design * @description A share link that reopens this one design in the designer, for a store to let its customer correct it: the SDK's credential (`correctionLink`) on the store's own page, or, with a `returnUrl`, a hosted correction page that returns to the store. It works for 2 hours, from the store's pages and the hosted ones, for this design only. Approving in the designer makes a proof of the correction and writes nothing; `PATCH /v1/designs/{id}` with that proof's token makes it the design's next revision. Refused for a design that takes no correction. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description Where the hosted correction page sends the customer back to: with `state` and the corrected proof's `proofToken` once they approve, with `state` alone when they cancel. Without it, the link is the SDK's credential only, and opens no page. On one of the origins the tenant's publishable keys are allowed on. */ returnUrl?: string; /** @description Carried back to `returnUrl` untouched, for the store to match the customer to its own session. Only with `returnUrl`. */ state?: string; }; }; }; responses: { /** @description The new link */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description When the link stops working. */ expiresAt: number; /** @description The link's id, as the share-link list names it. */ id: string; /** @description The link's token: the SDK's `correctionLink`. Shown in this response only. */ token: string; /** @description The hosted correction page, when the link names a `returnUrl`; null otherwise. */ url: string | null; }; }; }; /** @description Refused: return_url_not_https, return_url_off_store, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_editable */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description `ordered`: a print of the design has an order, so it is what was made; duplicate it instead. `erased`: the design's personal data was erased, and it takes nothing more. Always sent with `not_editable`. */ reason?: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/correction-proofs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Proof a correction of a design without making it * @description Applies `values` on top of the design as it is at `expectedRevision`, under the rules its template version sets and at the size it was committed at, and renders the result, exactly as `PATCH /v1/designs/{id}` would. Empty `values` proof the design as it is. Writes nothing to the design. Made in the customer session `x-pixonaut-session` names, if any, whose wipe deletes it until it is redeemed. The answer's `proofToken` is redeemed by `PATCH /v1/designs/{id}` with `{proofToken}`, which makes this document the design's next revision as long as the design is still at `expectedRevision`. Refused for a design that takes no correction. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The design's `revision` as the caller read it. When the design has been corrected since, the correction is refused `revision_changed`. */ expectedRevision: number; /** @description What to change, in the shape a commit's `values` take: an object keyed by the `layerId` of a field of the design's correctionForm, each holding an object of that field's `prop` and its new value, such as `{"": {"": "new wording"}}`. Applied on top of the design as it is, so anything not named stays as it was. */ values: { [key: string]: unknown; }; }; }; }; responses: { /** @description The correction's proof */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { docHash: string; /** @description When the proof and its token expire, in milliseconds since the Unix epoch. */ expiresAt: number; /** @description The pictures that print below `printFloorDpi` at the design's print size. A warning: nothing is refused for it. */ lowResolution: { /** @description The picture's pixels along the edge that decides. */ actualPx: number; assetId: string; /** @description Pixels per inch along that edge, as printed. */ effectiveDpi: number; /** @description The layer the picture fills, or the artwork's own key for its image background. */ layerId: string; /** @description The pixels that edge needs at the floor. */ minPx: number; }[]; /** @description The minimum print resolution the design's pictures were judged against: the template's own, else the tenant's. */ printFloorDpi: number; /** @description Redeemed by `PATCH /v1/designs/{id}` with a secret key or a connected store's integration key, to make this the design's next revision. */ proofToken: string; /** @description The proof's image, for the customer to see. */ proofUrl: string; /** @description The revision the proof was made from. */ revision: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_editable, revision_changed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description `ordered`: a print of the design has an order, so it is what was made; duplicate it instead. `erased`: the design's personal data was erased, and it takes nothing more. Always sent with `not_editable`. */ reason?: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: asset_map_too_large, constraint_violation, design_doc_unreadable, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`, and may be sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`, `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `constraint_violation`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: assets_unavailable, lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/delivery": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read who a design's first order is for and where it ships * @description A secret key, a studio member holding `orders:read`, or the design's address capture link. The delivery given for the design's first order, while the design is open; once it is ordered, erased or rejected, none. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design's delivery */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Who the design's first order is for and where it ships, while the design is open and one has been given. */ delivery: { capturedAt: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; /** @description `open` while the design takes a delivery; `ordered` once its first order has been placed, which took the delivery or went by its own request; `erased` once the design's personal data was erased; `rejected` once the design is rejected. */ state: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; /** * Say who a design's first order is for and where it ships * @description A secret key, an integration key, or the design's address capture link. Replaces any delivery given before. The design's first order takes it as its `recipient` and `shippingAddress` when its request names neither; an order whose request names either goes by the request alone, and this delivery is dropped. Refused `design_ordered` once the design has an order, `design_erased` once its personal data was erased, and `design_rejected` once it is rejected. Never written to logs. */ put: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; }; }; }; responses: { /** @description Given */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description When it was given. */ capturedAt: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_ordered, design_erased, design_rejected */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; post?: never; /** * Erase who a design's first order is for and where it ships * @description A secret key, or a connected store's integration key or a studio member holding `orders:update`. Erases the delivery given for the design's first order, on its customer's request; erasing none is answered the same. Once the design is ordered, the order holds it, and the order's own erasure applies. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Erased, or there was none */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/designer": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Open a design in the designer to correct it * @description The design's current document and revision, and its template version exactly as `GET /v1/templates/{id}` answers it, so the designer can show the design as it is and apply changes over it as `PATCH /v1/designs/{id}` will. Refused for a design that takes no correction, `design_doc_unreadable` for one whose document the current model cannot read, and `template_unreadable` for one whose template version cannot be read. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design and its template */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { dieShapeId?: string; /** @description The design's current document. */ doc: unknown; formSchema: { layout?: string; steps: { fields: { constraints: { [key: string]: unknown; }; default?: unknown; description?: string; label: string; layerId: string; prop: string; type: string; }[]; groupId: string; index: number | null; label: string; layerIds: string[]; transforms: { layerId: string; transform: { [key: string]: unknown; }; }[]; }[]; }; layerShapeIds?: { [key: string]: string; }; offeredShapes?: { [key: string]: unknown; }; optionLabels?: { [key: string]: string; }; printFloorDpi: number; printMargins: { bleedMm: number; safeAreaMm: number; }; /** @description The revision `doc` is, which a correction made from it sends as `expectedRevision`. */ revision: number; template: components["schemas"]["ResolvedTemplate"]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_editable */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description `ordered`: a print of the design has an order, so it is what was made; duplicate it instead. `erased`: the design's personal data was erased, and it takes nothing more. Always sent with `not_editable`. */ reason?: string; }; }; }; /** @description Refused: design_doc_unreadable, template_unreadable */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/duplicate": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Duplicate a design * @description Makes a new design from this one, awaiting approval on its own, with the same template version, document, blank, printshop and fulfilment payload, and `duplicated_from` naming its source. Emits `design.duplicated`, not `design.committed`. The way to correct a design that has been ordered. Refused `design_erased` for a design whose personal data was erased. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The new design */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { designId: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_erased */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/erase-personal-data": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Erase a design's personal data * @description Erases what the design's customer put into it, whatever its status, approved and printed included: the text of every field they could fill, and every picture they uploaded, in every revision and proof of the design, the words of any request for changes, and the delivery they gave. The design stays as a record (its template, status, dates and prints), `personal_data_erased_at` says when, and nothing more is printed, ordered, corrected, duplicated or asked to change from it. The pictures and proofs are deleted within six hours. A print's files are kept while an order of it is still being made, and deleted within six hours once every order of it has shipped, failed or been cancelled. Not erased: the fulfilment payload, which is yours, designs duplicated from this one, and what a printshop was already sent. Emits `design.personal_data_erased`. Erasing a design already erased answers it unchanged and records nothing. A deleted design is erased too, and answered `204`. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design, its personal data erased */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { api_key_id: string | null; /** @description How the customer agreed to the design's approval, made or scheduled, as its approver said; null when none was said. Correcting the design, asking for changes and rejecting it clear it with the approval. */ approval_consent: { /** @description When the customer agreed, epoch milliseconds. */ at: number; /** @description How the customer agreed: by adding the design to their cart, by ticking a box, on a proof page, by approving it again on your store after correcting it (`edit`), or by letting your store's own approval deadline pass (`deadline`). More kinds may be added. */ kind: string; ref: string | null; } | null; approve_after: number | null; approved_at: number | null; approved_via: string | null; blank_id: string | null; committed_at: number; /** @description Whether `DELETE /v1/designs/{id}` would take the design now: it is not approved, and no print of it exists, of any revision and in any status. */ deletable: boolean; doc: unknown; duplicated_from: string | null; /** @description Your own reference for the design, as sent on the commit or `PUT /v1/designs/{id}/external-ref`, or null. */ external_ref: string | null; fulfilment_payload: unknown; id: string; /** @description When the design's own personal data was erased (`POST /v1/designs/{id}/erase-personal-data`), or null. An erased design's document holds none of the text or pictures its customer put in, and nothing more is printed, ordered or corrected from it. */ personal_data_erased_at: number | null; /** @description The placement on the blank this design was fitted to when it was made; null whenever blank_id is. Kept while the blank is, so it may name a placement since removed from the blank: the print box frozen into the document is what prints. */ placement_id: string | null; /** @description The size the design prints at, without bleed: the `widthMm` and `heightMm` its proof or commit named, or the size fitted for one that named none. A store checks it, with `template_version`, `blank_id` and `placement_id`, against what the product variation sells before accepting the add to cart, since the proof is made in the customer's browser. Null only for a stored document that holds no usable print size. */ print_size: { /** @description The print's trim height, in millimetres. */ heightMm: number; /** @description The print's trim width, in millimetres. */ widthMm: number; } | null; proof_id: string | null; proof_revision: number | null; revision: number; status: string; template_base_id: string; /** @description Whether the design's template was deleted. The design keeps its template's name and version; the template itself can no longer be opened. */ template_deleted: boolean; template_id: string; template_name: string | null; /** @description The version of the template the design was made from: `template_id` after its `@`. A design committed from a proof token was made from the proof's version, whatever the template's latest is now. */ template_version: number | null; tenant_id: string; }; }; }; /** @description The design was deleted, and is erased */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/external-ref": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** * Replace a design's external reference * @description Replaces the reference the design was committed with, such as moving it from your cart line to the order line that bought it. Nothing else about the design changes: it stays approved, or awaiting approval, as it was. */ put: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description Your own reference for the design, kept exactly as sent; `null` clears it. */ externalRef: string | null; }; }; }; responses: { /** @description The design's reference */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { designId: string; externalRef: string | null; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/proof": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a design's proof image * @description The design's proof, as the customer was shown it, read with the credentials that read the design: the proof of its newest revision that has one. A commit from a proof gives revision 1 that proof, and each correction and restore renders a proof of the revision it writes, so a corrected design's proof shows what it says now. `v`, the design's `proof_id`, names the image's bytes in the URL itself, so the answer is cached `immutable`; a `v` naming any other proof (a URL made by hand, or for another design) is refused `proof_changed` rather than served under the wrong name. Without `v`, the proof's id is the answer's etag. Once the proof's file is gone (a rejected design's proof is released), the answer is `proof_not_found`. `width` serves it no larger than the box it is drawn in; each resize asked for with a key or through a link spends the tenant's render budget, and is refused `rate_limited` once it is spent. */ get: { parameters: { query?: { /** @description The design's `proof_id`, which names bytes that never change. When it matches, the answer is cached `immutable`; when it names any other proof, it is refused `proof_changed`. */ v?: string; /** @description The width in pixels the image is drawn at. The long edge served is derived from the image's own ratio, never larger than the stored image, and clamped to the sizes the api serves. */ width?: string; /** @description `cover` when the image is cropped to fill its box: `width` is then its short edge. */ fit?: "cover"; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The proof image */ 200: { headers: { [name: string]: unknown; }; content: { "image/jpeg": string; }; }; /** @description Not modified: the `If-None-Match` etag, the proof's id, still holds */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found, proof_not_found, proof_changed */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/reject": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Reject a committed design * @description Rejects the design, which then takes no correction and releases its proofs and pictures. Safe to retry: rejecting a design already rejected at `expectedRevision` (or at any revision, when none is given) answers success again and records nothing more; one approved, or rejected at another revision, is refused `not_committed`. `expectedRevision`, when given, is refused `revision_changed` once the design has been corrected since. Through a deciding proof page link, must carry `expectedRevision` (else `bad_request`), and is refused `proof_outdated` unless the design's proof shows its current revision, which a design committed without a proof never has. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description The design's `revision` as the caller read it. When the design has been corrected since, the decision is refused `revision_changed` with the revision it has now. Required through a proof page link: a customer decides the revision whose proof they were shown. */ expectedRevision?: number; } | null; }; }; responses: { /** @description Rejected */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {boolean} */ ok: true; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_committed, proof_outdated, revision_changed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/request-changes": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Ask for changes to a design awaiting approval * @description Records the customer's request on the design, which stays awaiting approval; a later request replaces it, and every request is in the `design.changes_requested` events. Cancels a scheduled approval. Refused `design_erased` for a design whose personal data was erased. Through a proof page link, must carry `expectedRevision` (else `bad_request`), and is refused `proof_outdated` unless the design's proof shows its current revision, which a design committed without a proof never has. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The design's `revision` as the caller read it. When the design has been corrected since, the decision is refused `revision_changed` with the revision it has now. Required through a proof page link: a customer decides the revision whose proof they were shown. */ expectedRevision?: number; message: string; }; }; }; responses: { /** @description Recorded */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { revision: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_erased, not_committed, proof_outdated, revision_changed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/review": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a design as its customer reviews it * @description Where the design stands, whether its proof still shows it, and any open request for changes. Never the design's document or its fulfilment payload. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The design's review */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description When a scheduled approval falls due, or null. */ approveAfter: number | null; /** @description Whether the caller may approve, reject or ask for changes: a secret key, or a proof page link the tenant handed the decision to. */ canDecide: boolean; /** @description The open request for changes a customer made on the design's proof page, or null. Open while the design awaits approval at the version it was about; correcting or deciding the design closes it. */ changeRequest: { message: string; requestedAt: number; } | null; /** @description Whether the design has a proof image to show. */ hasProof: boolean; id: string; /** @description Whether the design has a proof and it shows what the design says now. Each correction renders a proof of its own; a design corrected before that was so has only its first proof. A customer decides the design from its proof page only when this is true. */ proofIsCurrent: boolean; revision: number; status: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/revisions": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List a design's revisions * @description Every document the design has had, newest first: revision 1 is what was committed, and each correction or restore added the next. One page at a time; `nextBefore` reads the next older page. */ get: { parameters: { query?: { pageSize?: number; /** @description Only revisions older than this one: a page's `nextBefore`. */ before?: string; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description One page of the design's revisions, newest first */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description The `before` that reads the next older page; null when this page reaches revision 1. */ nextBefore: number | null; revisions: { createdAt: number; /** @description The member who wrote it, named as they are now; null when no member did: a commit, a secret key's correction, or a revision that predates authorship. */ createdBy: { name: string | null; } | null; /** @description Whether this revision is the design's document now. */ isCurrent: boolean; /** @description Whether any print rendered this revision. */ printed: boolean; revision: number; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/revisions/{revision}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read one revision of a design * @description The document the design had as this revision. A print names the revision it rendered (`designRevision`), so this is the document a print shows. */ get: { parameters: { query?: never; header?: never; path: { id: string; /** @description A revision number. */ revision: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The revision and its document */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { createdAt: number; /** @description The member who wrote it, named as they are now; null when no member did: a commit, a secret key's correction, or a revision that predates authorship. */ createdBy: { name: string | null; } | null; doc?: unknown; /** @description Whether this revision is the design's document now. */ isCurrent: boolean; revision: number; }; }; }; /** @description Refused: invalid_id */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/revisions/{revision}/image": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Draw a revision of a design * @description What the design's revision `revision` prints, drawn as its proof is but unwatermarked, read with the credentials that read the design. `width` draws it no larger than the box it is shown in. A JPEG, as a proof is, unless `format=png` asks for a PNG that keeps the design's transparency. A revision never changes but when the design's personal data is erased, so the answer carries an etag naming the revision, that erasure, the format and the renderer, and asking again with it is answered 304 without drawing. A drawing that had to leave out a picture the document names is answered `no-store`. A revision whose document the current model cannot read is refused `design_doc_unreadable`. */ get: { parameters: { query?: { /** @description `png` draws it as a PNG that keeps the design's transparency; absent or `jpeg`, the proof's JPEG. */ format?: "jpeg" | "png"; /** @description The width in pixels the drawing is shown at. Its long edge is derived from the design's declared ratio, and never larger than a proof's. */ width?: string; /** @description `cover` when the image is cropped to fill its box: `width` is then its short edge. */ fit?: "cover"; }; header?: never; path: { id: string; /** @description A revision number. */ revision: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The drawing */ 200: { headers: { [name: string]: unknown; }; content: { "image/jpeg": string; "image/png": string; }; }; /** @description Not modified: the `If-None-Match` etag still names this revision, its erasure, format and renderer */ 304: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: invalid_id */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_doc_unreadable, asset_map_too_large, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: assets_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/designs/{id}/revisions/{revision}/restore": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Restore an earlier revision of a design * @description A correction whose document is the named revision's: it is added as the design's next revision, and the design goes back to awaiting approval, as after any correction, with a proof of its own rendered now (`proofId`). Emits `design.edited` with `restoredFrom`. A revision whose document is the current one writes nothing, and answers `restored: false`. Refused once any print of the design has an order, and for a revision the current model can no longer read. */ post: { parameters: { query?: never; header?: never; path: { id: string; /** @description A revision number. */ revision: string; }; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The design's `revision` as the caller read it. When the design has been corrected since, the correction is refused `revision_changed`. */ expectedRevision: number; }; }; }; responses: { /** @description The design's revision now */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description The design's proof now: the one rendered of the revision this wrote, or, when nothing was written, the proof the design already had (null when it has none). Its image is `GET /v1/designs/{id}/proof`. */ proofId: string | null; /** @description Whether this restore wrote a revision. False when the named revision's document already was the current one: nothing was written, and `revision` is the current one. */ restored: boolean; revision: number; }; }; }; /** @description Refused: bad_request, invalid_id */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: not_editable, revision_changed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description `ordered`: a print of the design has an order, so it is what was made; duplicate it instead. `erased`: the design's personal data was erased, and it takes nothing more. Always sent with `not_editable`. */ reason?: string; /** @description Always sent with `revision_changed`. */ revision?: number; }; }; }; /** @description Refused: asset_map_too_large, design_doc_unreadable, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`, and may be sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`, `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: assets_unavailable, lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/events": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Pull the tenant's events after a given one * @description Catch up on events, for example after downtime: give `after` the id of the last event handled and follow `nextCursor` until it is null, which means nothing more is available yet; continue from the last id later. Events come in the order they were recorded, each in the envelope a webhook delivery's body carries; dedupe them by `id`. */ get: { parameters: { query?: { /** @description The id of the last event the caller handled; the answer starts after it. Omitted, it starts at the tenant's first event. */ after?: string; /** @description Comma-separated event types to narrow the answer to. Omitted, every type. */ types?: string; /** @description The most events to answer. */ limit?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of events */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description The events, in the order they were recorded, each in the envelope its type's webhook delivery carries, with the payload that type sends. */ events: (components["schemas"]["DesignCommittedEvent"] | components["schemas"]["DesignApprovalScheduledEvent"] | components["schemas"]["DesignApprovedEvent"] | components["schemas"]["DesignRejectedEvent"] | components["schemas"]["DesignDeletedEvent"] | components["schemas"]["DesignPersonalDataErasedEvent"] | components["schemas"]["DesignChangesRequestedEvent"] | components["schemas"]["DesignDeliveryCapturedEvent"] | components["schemas"]["DesignEditedEvent"] | components["schemas"]["DesignDuplicatedEvent"] | components["schemas"]["PrintCreatedEvent"] | components["schemas"]["PrintCompletedEvent"] | components["schemas"]["PrintFailedEvent"] | components["schemas"]["TemplatePublishedEvent"] | components["schemas"]["TemplateLiveChangedEvent"] | components["schemas"]["TemplateDeletedEvent"] | components["schemas"]["OrderSubmittedEvent"] | components["schemas"]["OrderStatusChangedEvent"] | components["schemas"]["OrderFailedEvent"] | components["schemas"]["OrderCancelledEvent"] | components["schemas"]["BlankDriftedEvent"] | components["schemas"]["BlankCreatedEvent"] | components["schemas"]["BlankUpdatedEvent"] | components["schemas"]["BlankDeletedEvent"] | components["schemas"]["InkCreatedEvent"] | components["schemas"]["InkUpdatedEvent"] | components["schemas"]["InkDeletedEvent"] | components["schemas"]["PaletteCreatedEvent"] | components["schemas"]["PaletteUpdatedEvent"] | components["schemas"]["PaletteDeletedEvent"] | components["schemas"]["ShapeCreatedEvent"] | components["schemas"]["ShapeUpdatedEvent"] | components["schemas"]["ShapeDeletedEvent"] | components["schemas"]["AssetCreatedEvent"] | components["schemas"]["AssetUpdatedEvent"] | components["schemas"]["AssetDeletedEvent"] | components["schemas"]["PrintshopConnectedEvent"] | components["schemas"]["PrintshopDisconnectedEvent"] | components["schemas"]["PrintshopUpdatedEvent"] | components["schemas"]["PrintshopReconnectedEvent"] | components["schemas"]["RunStartedEvent"] | components["schemas"]["RunCompletedEvent"] | components["schemas"]["RunFailedEvent"] | components["schemas"]["RunExhaustedEvent"] | components["schemas"]["RunCancelledEvent"])[]; /** @description Pass it as `after` for the next page. Null when nothing more is available yet: continue from the last event's id later. A pull looks through at most 1000 events, so with `types` a page can be short, or empty, with a cursor that still moves on. */ nextCursor: string | null; }; }; }; /** @description Refused: unknown_event, invalid_event_type */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_event_type`. */ type?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's orders, newest first * @description `printId` narrows the list to one print's orders, `designId` to the orders of every print of one design, and `externalRef` to the orders placed under your own reference, matched exactly; given several, an order must match all of them. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; /** @description Only the orders of this print: its id, as list_prints returns it. The answer's total is then how many orders that print has. */ printId?: string; designId?: string; externalRef?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of orders */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { orders: { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Place one order for the prints of one item * @description A secret key, an integration key, or a studio member holding `orders:create`. Places ONE order for every print in `prints`: the prints of one physical item, a front and a back of one shirt, made by one printshop as one item. The prints must be completed prints of designs committed on the same blank, each in a placement of its own: `422 print_without_blank` names a print whose design has no blank, `422 print_without_placement` one committed before its placement was recorded, `422 mixed_blanks` prints on different blanks and `422 duplicate_placement` two in one placement. The order goes to the printshop `printshopId` names, else the one any of the prints is locked to, else where the first print would go; every print is then checked against that printshop as if it were named. A printshop that cannot make several prints as one item answers `422 printshop_cannot_combine`, and prints whose designs disagree on what the printshop makes one item from answer `422 prints_disagree` naming the key: nothing is written either way. One print places exactly the order `POST /v1/prints/{id}/orders` would. `quantity`, `externalRef`, `recipient`, `shippingAddress` and the `Idempotency-Key` header are as there; the first print's design's captured delivery is the one the order takes when the body names neither a recipient nor an address. A partner refusing the order is still a 201: the order is recorded as `failed`. */ post: { parameters: { query?: never; header?: { /** @description Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked `Idempotent-Replayed: true`, and makes nothing; the same key with another body is refused `idempotency_key_reused`, and a repeat while the first is still being answered `idempotency_key_in_use`. A request that is refused makes nothing, so its key may be sent again. */ "idempotency-key"?: string; }; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The caller's own reference for this order, such as its order id in the shop. Kept exactly as sent and handed to the printshop. */ externalRef?: string; /** @description The prints of one item, each a completed print of a design committed on the same blank in a placement of its own; the first is the order's lead, which `printId` names on the order. One print places the order `POST /v1/prints/{id}/orders` would. */ prints: { printId: string; }[]; /** @description The id of the printshop to make this order. Absent or `null`, it goes to the printshop the design was committed with, else the default printshop of its blank, else the tenant's default. */ printshopId?: string | null; /** * @description How many copies to order. A whole number of 1 or more; 1 when left out. * @default 1 */ quantity?: number; /** @description Who the order is for. Left out, the first order of a design takes what its customer gave. */ recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; /** @description Where the order ships. Left out, the first order of a design takes what its customer gave. */ shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; }; }; }; responses: { /** @description The placed order */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: print_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: print_not_completed, no_printshop_configured, print_ticket_stale, print_superseded, design_erased, stale_update, blank_printshop_changed, idempotency_key_in_use */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `stale_update`. */ current?: number; /** @description Always sent with `print_ticket_stale`. */ detail?: string; error: string; /** @description Always sent with `print_not_completed`. */ status?: string; }; }; }; /** @description Refused: unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_locked_by_blank, placement_has_no_position, missing_fulfilment_keys, postal_code_required, spot_plate_required, print_without_blank, print_without_placement, mixed_blanks, duplicate_placement, printshop_cannot_combine, prints_disagree, idempotency_key_reused, invalid_idempotency_key, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `prints_disagree`. */ key?: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `missing_fulfilment_keys`. */ missing?: string[]; /** @description Always sent with `duplicate_placement`. */ placementId?: string; /** @description Always sent with `placement_has_no_position`. */ placements?: string[]; /** @description Always sent with `print_without_blank`, `print_without_placement`. */ printId?: string; /** @description Always sent with `unknown_printshop`, `printshop_disconnected`, `printshop_unavailable`, `printshop_locked_by_blank`, `placement_has_no_position`. */ reason?: string; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Read one order, with its history */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order, its history, and whether it can be submitted again */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; canErase: boolean; canRetry: boolean; /** @description The design the lead print was made from. */ designId: string; erasable: boolean; externalOrderRef: string | null; externalRef: string | null; fallbackSpots: string[]; history: { at: number; reason: string | null; seq: number; status: string; type: string; via: string | null; }[]; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; /** @description The id of the printshop this order's design is locked to, recorded when it was committed on a blank locked to that printshop and kept even once the blank is deleted: a retry or a replacing order naming any other printshop is refused with `printshop_locked_by_blank`. `null` when the design is not locked. */ printshopLockedTo: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; retryable: boolean; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; /** @description The statuses this caller may set the order to now with `PATCH /v1/orders/{id}`: for an integration key or a studio member on live, `submitted` and `failed` while its outcome is unknown and nothing otherwise; in a sandbox, every move a secret key may make. Empty for a caller without `orders:update`. */ statusMoves: string[]; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; varnishLeftOut: boolean; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Set an order's status by hand * @description A secret key moves an order forward by hand, for a printshop with no API of its own such as the local one: printed, shipped (optionally with `tracking`) or failed (optionally with a `reason`). An order moves forward only, never out of shipped, failed or cancelled, and never to cancelled, which only `POST /v1/orders/{id}/cancel` reaches by asking its printshop. * * An order whose submission's answer was lost is `outcome_unknown`. Once you have asked its printshop, settle it: `failed` when the printshop does not have it, after which `POST /v1/orders/{id}/retry` submits it again, or `submitted` when it does, optionally with `externalOrderRef`, the printshop's own reference for it, so its status is followed from then on. A connected store's integration key and a studio member holding `orders:update` may make these two moves and no other. Settling needs a `reason`, kept in the audit log with who settled it; refused `422 order_status_reason_required` without one. A reference another order holds, or one other than the order's own, is refused `409 order_reference_taken`. * * In a sandbox, whose orders reach no printshop, an integration key and a member move an order as a secret key does, so a store can rehearse an order shipping or failing. * * A `reason` with any status but `failed` is kept in the audit log only. Any other move is refused `409 order_status_not_allowed`. */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { externalOrderRef?: string; reason?: string; /** @enum {string} */ status: "submitted" | "queued" | "printed" | "shipped" | "failed" | "outcome_unknown" | "cancelled"; tracking?: { carrier?: string; number: string; /** Format: uri */ url?: string; }; }; }; }; responses: { /** @description The order, with its new status */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: order_status_not_allowed, order_reference_taken */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `order_status_not_allowed`. */ from?: string; /** @description Always sent with `order_status_not_allowed`. */ to?: string; }; }; }; /** @description Refused: order_status_reason_required, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `order_status_reason_required`. */ from?: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/orders/{id}/cancel": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Cancel an order before it is made * @description A secret key, or a connected store's integration key or a studio member holding `orders:update`. Asks the order's printshop to stop it, and moves it to `cancelled`, a final status, only once the printshop says it did: `order.cancelled` is emitted. An order in `submitted`, `queued`, `outcome_unknown` can be asked about; one already cancelled is answered unchanged. An order left at its printshop is refused `409 order_at_printshop`, whose `cause` says why: `made` (printed or shipped), `begun` (the printshop has begun it and did not cancel it), `cannot_cancel` (its printshop cannot stop orders), `not_connected` (its printshop is no longer connected), or `status_moved` (the printshop cancelled it, but it shipped meanwhile). Ask the printshop. A failed order is refused `409 order_status_not_allowed`, and one whose submission has not been answered yet `409 order_in_flight`. A printshop that could not be reached is `503 cancel_unavailable`, and the order stands; `retryable` says whether asking again may work. Refunds are your store's: cancelling an order moves no money. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The cancelled order */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: order_at_printshop, order_in_flight, order_status_not_allowed */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `order_at_printshop`. */ cause?: string; /** @description Always sent with `order_in_flight`. */ detail?: string; error: string; /** @description Always sent with `order_status_not_allowed`. */ from?: string; /** @description Always sent with `order_status_not_allowed`. */ to?: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: cancel_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `cancel_unavailable`. */ reason?: string; /** @description Always sent with `cancel_unavailable`. */ retryable?: boolean; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/deliveries": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Read an order's step delivery log */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order's steps in the order they are sent, with their status */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { deliveries: { attempts: number; deliveredAt: number | null; kind: string; lastAttemptAt: number | null; lastError: string | null; nextAttemptAt: number; status: string; stepIndex: number; }[]; deliverySteps: boolean; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/erase-personal-data": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Erase an order's personal data * @description A secret key, or a connected store's integration key or a studio member holding `orders:update`. Erases the order's `recipient` and `shippingAddress`, what a custom printshop's delivery steps were rendered with, and every stored reason the order failed (its `lastError`, its history's and its notifications'), which may repeat them; a step not yet sent is closed as failed. The order itself stays, with its print, status, history, quantity and `externalRef`, which is your own reference and is not erased. `personalDataErasedAt` says when. Refused `409 order_in_flight` until the order has shipped, failed or been cancelled, since its printshop may still need the address. Erasing an order already erased answers it unchanged. An erasure cannot be undone, and does not reach what the printshop was already sent. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order, without its personal data */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: order_in_flight */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `order_in_flight`. */ detail?: string; error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/job": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an order as its printshop makes it * @description Where the order stands, how it ships once shipped, and the job ticket to make it by: the print's ticket with the order's copies, recipient and address. `ticket` is the lead print's, for `machineProfile` when it is asked; `prints` holds every print of the order, the lead first, each with its ticket for its own machine. A failed or cancelled order has no ticket. */ get: { parameters: { query?: { machineProfile?: string; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order's job */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; machineProfileAskedId: string | null; machineProfileId: string | null; machineProfiles: { id: string; name: string; }[]; prints: { placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description This print's ticket for its own machine: `machineProfile` applies to the order's `ticket` alone. */ ticket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; externalRef: string | null; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; quantity: number; recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; }[]; status: string; submittedAt: number; ticket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; externalRef: string | null; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; quantity: number; recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, machine_profile_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: spot_plate_required */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Report how an order's job stands * @description The order marked printed, shipped (optionally with tracking) or failed (optionally with a reason), by the same rules as `PATCH /v1/orders/{id}`, and answered as its job. A printshop link gives a reason with failed only; a secret key may give one with any status, and must to settle an order whose outcome is unknown. */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { reason?: string; /** @enum {string} */ status: "submitted" | "queued" | "printed" | "shipped" | "failed" | "outcome_unknown" | "cancelled"; tracking?: { carrier?: string; number: string; /** Format: uri */ url?: string; }; }; }; }; responses: { /** @description The order's job, as it now stands */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; machineProfileAskedId: string | null; machineProfileId: string | null; machineProfiles: { id: string; name: string; }[]; prints: { placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description This print's ticket for its own machine: `machineProfile` applies to the order's `ticket` alone. */ ticket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; externalRef: string | null; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; quantity: number; recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; }[]; status: string; submittedAt: number; ticket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; externalRef: string | null; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; quantity: number; recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: order_status_not_allowed, order_reference_taken */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `order_status_not_allowed`. */ from?: string; /** @description Always sent with `order_status_not_allowed`. */ to?: string; }; }; }; /** @description Refused: order_status_reason_required, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `order_status_reason_required`. */ from?: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/orders/{id}/job/file": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch the print file of an order * @description A file the printshop prints the order from, of one of its prints (`printId`, required for an order of several): by default its machine profile's default part of the file it was sent, as its delivery links hand it out. `machineProfile` names another of its printshop's profiles, or `settings` output settings for this one download (as the list of its files takes them); `part` another part (`combined`, `print` or `cut`), and `file` the `process` or `separated` file. The parts share the trim and bleed boxes, and the artwork is the same bytes in `combined` and `print`. With no machine, or one that names no cut name, the default part is `print`, the stored file; `combined` then carries a `CutContour` path, and a rectangular die is drawn as a cut path too. Not for a failed or cancelled order. */ get: { parameters: { query?: { machineProfile?: string; settings?: string; /** @description Which of the order's prints, one of its `printIds`. Required when the order holds several; left out, the order's only print. */ printId?: string; part?: "combined" | "print" | "cut"; file?: "process" | "separated"; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print file */ 200: { headers: { [name: string]: unknown; }; content: { "application/pdf": string; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, print_not_found, machine_profile_not_found, part_not_offered, separation_not_found, file_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: spot_plate_required, ink_mask_missing, print_id_required, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `print_id_required`. */ printIds?: string[]; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/job/files": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the files an order can be fetched as * @description Every file one of the order's prints can be handed out as (`printId`, required for an order of several), for the order's machine profile, or `machineProfile`, another of its printshop's, or `settings`, output settings asked for one download (a JSON object of a machine profile's cut name, marks, crop marks, mark offset, mirror, bleed trim, white and varnish): each part of it (`combined`, the print with its cut path on a layer that never prints; `print`, the print alone; `cut`, the cut path alone, on a page of its own) of the process file and, where the print has one, the separated file. All three parts share the trim and bleed boxes. A machine that names no cut name is handed the print alone, and the other parts are drawn under `CutContour`. Each file says whether the printshop is handed it, which is the default, and the address it is fetched from; `settings` answers the settings the files are drawn with, null when none are drawn. A file the order's file door would refuse with `spot_plate_required` is left out, and the list is refused so only when it would leave out every file. A failed or cancelled order lists none. */ get: { parameters: { query?: { machineProfile?: string; settings?: string; /** @description Which of the order's prints, one of its `printIds`. Required when the order holds several; left out, the order's only print. */ printId?: string; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order's files */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { machineProfileAskedId: string | null; machineProfileId: string | null; machineProfiles: { id: string; name: string; }[]; separationMissing: boolean; settings: { bleedTrimMm: number | null; cropMarks: boolean; cutName: string | null; markOffsetMm: number; mirror: boolean; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; } | null; variants: { file: string; handedOut: boolean; isDefault: boolean; part: string; url: string; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, print_not_found, machine_profile_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: spot_plate_required, print_id_required, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `print_id_required`. */ printIds?: string[]; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/progress": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an order as its customer follows it * @description Where the order has got to, how it ships once shipped, when it was placed, and the steps it took. A failed order that was sent again answers as the order that took its place (one that names it as replaced, or a later order of the same print, quantity and reference), under this order's id. Never the printshop, its reference, why an order failed, the recipient or the fulfilment payload. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The order's progress */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; status: string; /** @description Each status the order reached, oldest first, and when. A failed order that was sent again shows the steps of the order that took its place. */ steps: { at: number; status: string; }[]; submittedAt: number; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/orders/{id}/retry": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Submit a failed order again * @description Places a new order for the same print as a failed one, recording which order it replaces. It goes to the printshop the failed order went to, or to the one `printshopId` names, so a print one printshop refused can be sent to another. Refused when the order is not `failed`, reached the printshop, or has already been submitted again; refused 422, writing nothing, when the printshop it would go to cannot take it or the design lacks a key that printshop requires. */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description The id of the printshop to send it to instead. Absent or `null`, it goes to the printshop the failed order went to. */ printshopId?: string | null; } | null; }; }; responses: { /** @description The new order */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: print_not_found, order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: print_not_completed, no_printshop_configured, print_ticket_stale, print_superseded, design_erased, stale_update, blank_printshop_changed, order_not_retryable, order_at_printshop, order_superseded */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `stale_update`. */ current?: number; /** @description Always sent with `print_ticket_stale`. */ detail?: string; error: string; /** @description Always sent with `order_superseded`. */ newerOrderId?: string; /** @description Always sent with `print_not_completed`, `order_not_retryable`. With `order_not_retryable`: one of `submitted`, `queued`, `printed`, `shipped`, `failed`, `outcome_unknown`, `cancelled`. */ status?: string; }; }; }; /** @description Refused: unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_locked_by_blank, placement_has_no_position, missing_fulfilment_keys, postal_code_required, spot_plate_required, print_without_blank, print_without_placement, mixed_blanks, duplicate_placement, printshop_cannot_combine, prints_disagree, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `prints_disagree`. */ key?: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `missing_fulfilment_keys`. */ missing?: string[]; /** @description Always sent with `duplicate_placement`. */ placementId?: string; /** @description Always sent with `placement_has_no_position`. */ placements?: string[]; /** @description Always sent with `print_without_blank`, `print_without_placement`. */ printId?: string; /** @description Always sent with `unknown_printshop`, `printshop_disconnected`, `printshop_unavailable`, `printshop_locked_by_blank`, `placement_has_no_position`. */ reason?: string; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/prints": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's prints, newest first * @description `status`, `apiKeyId` and `designId` narrow the list. Rows carry no job ticket; read one print for it. Each row's `printshops` names the distinct printshops its orders went to; it is empty for a studio member without `orders:read`, since where a print was ordered from is order data. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; /** @description Only prints in this status: `created` is still being made, `completed` is ready to order, `failed` could not be made. */ status?: "created" | "completed" | "failed"; apiKeyId?: string; /** @description Only the prints made from this design: its id, as list_designs returns it. */ designId?: string; pageOf?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of prints */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { page: number; pageSize: number; prints: { api_key_id: string | null; completed_at: number | null; created_at: number; design_id: string; /** @description The design's `revision` this print rendered. Only a print of the design's current revision can be ordered; one made before a correction is refused `print_superseded`. */ design_revision: number; id: string; /** @description The distinct names of the printshops the print's orders went to, first-sent first: two connections sharing a name appear once. Empty for a studio member without `orders:read`. */ printshops: string[]; status: string; }[]; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Print an approved design * @description Renders the print files for an approved design and answers with its job ticket. A studio member or a connected store's integration key needs `prints:create`. */ post: { parameters: { query?: never; header?: { /** @description Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked `Idempotent-Replayed: true`, and makes nothing; the same key with another body is refused `idempotency_key_reused`, and a repeat while the first is still being answered `idempotency_key_in_use`. A request that is refused makes nothing, so its key may be sent again. */ "idempotency-key"?: string; }; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { designId: string; /** @description The design's `hasPrint` as the caller read it. `false` refuses `already_printed` when the design's current text has been printed since, so it is not printed twice by someone who did not know. */ expectedHasPrint?: boolean; /** * @deprecated * @description No longer accepted: the consumer's reference is the order's. Send it to POST /v1/prints/{id}/orders. */ externalRef?: unknown; /** * @deprecated * @description No longer accepted: the quantity is the order's. Send it to POST /v1/prints/{id}/orders. */ quantity?: unknown; }; }; }; responses: { /** @description The print and its job ticket */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { jobTicket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; }; printId: string; }; }; }; /** @description Refused: bad_request, quantity_moved_to_order, external_ref_moved_to_order */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: design_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: design_erased, design_not_approved, already_printed, idempotency_key_in_use */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: idempotency_key_reused, invalid_idempotency_key, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: render_failed, db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `render_failed`. */ detail?: string; error: string; /** @description The print the render left `failed`. Always sent with `render_failed`. */ printId?: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/prints/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read one print * @description A studio member without `designs:read` reads the job ticket without its `fulfilmentPayload`: that is the design's consumer bag, which reading the design would need the grant for. A completed print read by a secret key, or by a member holding `orders:read` or `orders:create`, carries `orderPrintshop`: where an order placed for it without naming a printshop goes, unless that could not be worked out. */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print, with its job ticket once it has completed */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { api_key_id: string | null; artifacts: unknown; completed_at: number | null; created_at: number; design_id: string; /** @description The design's `revision` this print rendered. Only a print of the design's current revision can be ordered; one made before a correction is refused `print_superseded`. */ design_revision: number; id: string; jobTicket: { artifact: { colorSpace: string; cut?: { bleedMm: number; cropMarks: boolean; cutLine: boolean; cutName: string | null; markOffsetMm: number; mirrored: boolean; part: string; profile: string; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; }; effectiveDpi: number; file: string; format: string; iccProfile: string; includesBleed: boolean; spotColors: string[]; spotOutput: string; trimMarks: boolean; }; artwork: { name?: string; templateId: string; }; fulfilmentPayload?: unknown; manifest: { docHash: string; fontSetHash: string; iccProfile: string; renderedAt: string; rendererVersion: string; templateVersion: string; }; printArea: { anchor?: { /** @description How the print aligns to the reference: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right`. Anything else is read as `center`. */ align: string; /** @description How far the print is moved from the reference, in millimetres. y grows downward. */ offsetMm: { /** @description Horizontal offset in millimetres; positive moves right. */ x: number; /** @description Vertical offset in millimetres; positive moves down. */ y: number; }; /** @description The physical reference the print is positioned against on the product. */ reference: string; }; bleedMm?: number; cutShape: { d: string; type: string; }; heightMm: number; printMethod?: string; printedAs?: string; widthMm: number; }; product: { sku: string; tenantId: string; }; } | null; jobTicketStale: boolean; /** @description Where an order placed for this print without naming a printshop goes: the printshop its design was committed with, else its blank's default, else the tenant's default. `null` when none of them names one, so an order has to. Absent when the print is not completed, the caller may not read orders, or it could not be worked out. */ orderPrintshop?: { id: string; /** @description The design is locked to this printshop, having been committed on a blank locked to it: an order naming any other is refused `printshop_locked_by_blank`, even once the blank is deleted. */ lockedByBlank: boolean; /** @description The merchant's own label for the connection. */ name: string; /** @description `usable`, or why an order there is refused: `disconnected`, or `unavailable` when its integration is no longer registered. */ status: string; } | null; status: string; tenant_id: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/prints/{id}/file": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fetch a print's file * @description The print's file as stored, or drawn for `machineProfile`, any machine profile of the tenant's printshops (a studio member needs `printshops:read` to name one), or for `settings`, output settings for this one download; `part` names the part (`combined`, `print` or `cut`), the print alone by default, and `file` the `process` or `separated` file. With no machine, or one that names no cut name, the default part is `print`, the stored file; `combined` then carries a `CutContour` path, and a rectangular die is drawn as a cut path too. */ get: { parameters: { query?: { machineProfile?: string; settings?: string; part?: "combined" | "print" | "cut"; file?: "process" | "separated"; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print file */ 200: { headers: { [name: string]: unknown; }; content: { "application/pdf": string; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: print_not_found, machine_profile_not_found, part_not_offered, separation_not_found, file_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: ink_mask_missing, invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/prints/{id}/files": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the files a print can be fetched as * @description Every file the print can be handed out as: as stored, for `machineProfile`, any machine profile of the tenant's printshops, or for `settings`, output settings asked for one download (a JSON object, as the order's list of files takes it): each part (`combined`, `print`, `cut`) of the process file and, where the print has one, the separated file, with the address it is fetched from. `settings` answers the settings the files are drawn with, null when none are drawn (a print whose ticket cannot be read). `machineProfiles` lists the profiles to choose from, each with its printshop; a studio member sees them, and may ask for one, only with `printshops:read`. */ get: { parameters: { query?: { machineProfile?: string; settings?: string; }; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The print's files */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { machineProfileAskedId: string | null; machineProfiles: { id: string; name: string; printshop: string; }[]; separationMissing: boolean; settings: { bleedTrimMm: number | null; cropMarks: boolean; cutName: string | null; markOffsetMm: number; mirror: boolean; registrationMarks: string; underbase: { chokeMm: number; coverage: string; spotName: string; } | null; varnish: { coverage: string; spotName: string; } | null; } | null; variants: { file: string; handedOut: boolean; isDefault: boolean; part: string; url: string; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: print_not_found, machine_profile_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/prints/{id}/orders": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Submit a completed print to its printshop * @description A secret key, or a connected store's integration key or a studio member holding `orders:create`. Places an order for a completed print with the printshop `printshopId` names, else the printshop its design was committed with, else the default printshop of its blank, else the tenant's default; the order records which. A printshop named here that cannot take the order (unknown, disconnected, unavailable because its integration is no longer registered, or another than the printshop its design is locked to, recorded at commit from its blank) is a 422 and no order is written, as is a design whose fulfilment payload lacks a key that printshop requires. `quantity` is how many copies this order wants, 1 when the body leaves it out; the same print can be ordered again with another. `externalRef` is your own reference for the order (your order or line id; not unique, and `GET /v1/orders?externalRef=` finds it), and `recipient` and `shippingAddress` say who it is for and where it ships; all three are optional, reach the printshop on the job ticket, and are never written to logs. The design's first order takes the recipient and address its customer gave on its address capture page (`PUT /v1/designs/{id}/delivery`) when this body names neither; a body naming either is used alone, and the customer's answer is dropped. A partner refusing the order, or a printshop not named here that has been disconnected since, is still a 201: the order is recorded as `failed`, naming it. With `replacesOrderId`, the order replaces a failed order of this print, as `POST /v1/orders/{id}/retry` would but with what this body asks for, and is refused as a retry is. */ post: { parameters: { query?: never; header?: { /** @description Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked `Idempotent-Replayed: true`, and makes nothing; the same key with another body is refused `idempotency_key_reused`, and a repeat while the first is still being answered `idempotency_key_in_use`. A request that is refused makes nothing, so its key may be sent again. */ "idempotency-key"?: string; }; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description How many orders this print had when the caller read it (`GET /v1/orders?printId=`'s `total`). When it has another number now, the order is refused `stale_update` with the count it has, and none is placed: a request sent again after an answer that was lost does not order twice. Absent skips the check. */ expectedOrderCount?: number; /** @description The caller's own reference for this order, such as its order id in the shop. Kept exactly as sent and handed to the printshop. */ externalRef?: string; /** @description The id of the printshop to make this order. Absent or `null`, it goes to the printshop the design was committed with, else the default printshop of its blank, else the tenant's default. */ printshopId?: string | null; /** * @description How many copies to order. A whole number of 1 or more; 1 when left out. * @default 1 */ quantity?: number; /** @description Who the order is for. Left out, the first order of a design takes what its customer gave. */ recipient?: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; }; /** @description The id of a failed order of this print that this order replaces, changing what it wants: another number of copies, reference, recipient, address or printshop. Allowed under the rules `POST /v1/orders/{id}/retry` has, and refused as it refuses; the new order records which order it replaces. */ replacesOrderId?: string; /** @description Where the order ships. Left out, the first order of a design takes what its customer gave. */ shippingAddress?: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; }; } | null; }; }; responses: { /** @description The submitted order */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { adapter: string; /** @description The design the lead print was made from. */ designId: string; externalOrderRef: string | null; externalRef: string | null; id: string; lastCheckedAt: number | null; lastError: string | null; personalDataErasedAt: number | null; /** @description The order's lead print: the first of `printIds`, and the only one of an order of one print. */ printId: string; /** @description Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank. */ printIds: string[]; /** @description `printIds` with each print's design, placement and file. */ prints: { designId: string; /** @description The placement on its blank the print's design was committed for; `null` for a design with no blank, or one committed before placements were recorded. */ placementId: string | null; printId: string; /** @description Where on the item the print goes, by the name the order's printshop knows it by (its Printed as), recorded when the order was placed; `null` for a print on no blank, or an order placed before it was recorded. */ printedAs: string | null; /** @description Which of this print's files the printshop was sent. */ spotOutput: string; }[]; printshopConnectionId: string | null; printshopName: string | null; quantity: number; recipient: { /** * Format: email * @description The recipient's email address, for the carrier's notices. */ email?: string; /** @description The recipient's name as a parcel label carries it, a person's or a company's. Up to 200 characters. */ name: string; /** @description The recipient's phone number as the customer gave it, with the country code when it has one. */ phone?: string; } | null; replacesOrderId: string | null; shippingAddress: { /** @description The city or town. */ city: string; /** @description The company of a business address, which the parcel goes to; the recipient is who receives it. */ company?: string; /** @description The country as a two-letter ISO 3166-1 code in capitals, such as `SE` or `US`. */ country: string; /** @description The first line of the street address: street and number. */ line1: string; /** @description The second line of the address: an apartment, floor or c/o. */ line2?: string; /** @description The postal code as the country writes it, such as `111 22` or `SW1A 1AA`. Left out where the country has none; a printshop that needs one refuses the order `postal_code_required`. */ postalCode?: string; /** @description The state, province or county, where the country uses one. */ region?: string; } | null; spotOutput: string; status: string; submittedAt: number; tenantId: string; tracking: { carrier?: string; number: string; /** Format: uri */ url?: string; } | null; updatedAt: number; }; }; }; /** @description Refused: bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: print_not_found, order_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: print_not_completed, no_printshop_configured, print_ticket_stale, print_superseded, design_erased, stale_update, blank_printshop_changed, order_not_retryable, order_at_printshop, order_superseded, idempotency_key_in_use */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `stale_update`. */ current?: number; /** @description Always sent with `print_ticket_stale`. */ detail?: string; error: string; /** @description Always sent with `order_superseded`. */ newerOrderId?: string; /** @description Always sent with `print_not_completed`, `order_not_retryable`. With `order_not_retryable`: one of `submitted`, `queued`, `printed`, `shipped`, `failed`, `outcome_unknown`, `cancelled`. */ status?: string; }; }; }; /** @description Refused: unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_locked_by_blank, placement_has_no_position, missing_fulfilment_keys, postal_code_required, spot_plate_required, print_without_blank, print_without_placement, mixed_blanks, duplicate_placement, printshop_cannot_combine, prints_disagree, idempotency_key_reused, invalid_idempotency_key, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; /** @description Always sent with `spot_plate_required`. */ cause?: string; error: string; /** @description Always sent with `prints_disagree`. */ key?: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `missing_fulfilment_keys`. */ missing?: string[]; /** @description Always sent with `duplicate_placement`. */ placementId?: string; /** @description Always sent with `placement_has_no_position`. */ placements?: string[]; /** @description Always sent with `print_without_blank`, `print_without_placement`. */ printId?: string; /** @description Always sent with `unknown_printshop`, `printshop_disconnected`, `printshop_unavailable`, `printshop_locked_by_blank`, `placement_has_no_position`. */ reason?: string; /** @description Always sent with `spot_plate_required`. */ references?: string[]; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/printshop-connections": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's printshop connections * @description Each connection's id, name, adapter, whether it is active and whether it is the tenant's default printshop, active first. `q` keeps the connections whose name holds it, case aside. */ get: { parameters: { query?: { q?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The connections, active first, and the adapters available. A key is answered each connection's id, name, adapter, whether it is active and whether it is the default, and nothing else. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { adapters: { adapter: string; catalogue: boolean; categories: boolean; credentialGuide: { requiredPermissions: string[]; tokenPageUrl: string; } | null; deliverySteps: boolean; machineProfiles: boolean; placeholders: string[]; spotPlates: boolean; }[]; available: string[]; connections: { active: boolean; adapter: string; config?: unknown; createdAt: number; id: string; isDefault: boolean; name: string; secretNames: string[] | null; updatedAt: number; }[]; } | { connections: { active: boolean; adapter: string; id: string; isDefault: boolean; name: string; }[]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/proofs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Render a proof * @description Validates a customer's payload as `POST /v1/validate` does, renders the proof image a customer approves, and answers with a signed link to it. The proof is fitted to the placement the request names, and the proof token commits the design later with that blank and placement. */ post: { parameters: { query?: never; header?: { /** @description The designer's browser session, which the SDK sends so one visitor's uploads and proofs are told apart from another's on the same key: 6 to 64 letters, digits, `_` or `-`. Any other value is ignored. */ "x-pixonaut-session"?: string; }; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The id of a published template. */ templateId?: unknown; /** @description The customer's values for the template's fields. */ values?: unknown; } & { blankId?: string; placementId?: string; } & { heightMm?: number; widthMm?: number; }; }; }; responses: { /** @description The proof, its image link and its token */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { docHash: string; /** @description When the proof and its token expire, in milliseconds since the Unix epoch. */ expiresAt: number; /** @description The pictures that print below `printFloorDpi` at the design's print size. A warning: nothing is refused for it. */ lowResolution: { /** @description The picture's pixels along the edge that decides. */ actualPx: number; assetId: string; /** @description Pixels per inch along that edge, as printed. */ effectiveDpi: number; /** @description The layer the picture fills, or the artwork's own key for its image background. */ layerId: string; /** @description The pixels that edge needs at the floor. */ minPx: number; }[]; /** @description The minimum print resolution the design's pictures were judged against: the template's own, else the tenant's. */ printFloorDpi: number; proofToken: string; proofUrl: string; }; }; }; /** @description Refused: bad_json, bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: constraint_violation, unknown_placement, asset_map_too_large, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Always sent with `asset_map_too_large`, and may be sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `asset_map_too_large`, `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `constraint_violation`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description The caller left before the render started */ 499: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: assets_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/sessions/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Wipe a customer session's unretained uploads and proofs * @description Deletes the pictures a customer uploaded and the proofs made for them in one designer session, for a "clear my design" button. Anything a committed design or a published template still uses is kept. A secret key is also told how many uploads and proofs were kept; a publishable key is not, since it cannot prove the session is its caller's. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description What the wipe deleted, and to a secret key what it kept */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { assetsDeleted: number; assetsRetained?: number; proofsDeleted: number; proofsRetained?: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/share-links": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's share links, newest first * @description Links that still work, of the kinds the caller may hand out. Never the token itself. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; pageOf?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A page of links */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { links: { createdAt: number; /** @description The member who handed it out; null when a secret key did. */ createdBy: { name: string | null; userId: string; } | null; /** @description When the link stops working; null for one that never does. */ expiresAt: number | null; id: string; kind: string; mayDecide: boolean; returnUrl: string | null; /** @description What the link is about; null once it no longer exists. */ subject: { /** @description The subject's name: a template's name; for a design, the name of its template; for an order, its external reference, null when it has none. */ label: string | null; } | null; subjectId: string; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Create a share link * @description Opens one hosted page about one template, design or order to whoever holds the link. Answers with the token, which is never shown again. A member may hand out only what they hold themselves; a printshop page and an address capture page take a secret key. A connected store's integration key hands out what its grants hold, such as a deciding proof page it emails its customer, who approves or rejects there; the page is drawn in the tenant's branding. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description How long the link works, in days. Absent, the kind's default; a designer then never expires. Each kind has a cap, named in the refusal when exceeded. */ expiresInDays?: number; /** * @description The page the link opens. A correction link is minted for its design by `POST /v1/designs/{id}/correction-links`. * @enum {string} */ kind: "designer" | "proof-page" | "order-status" | "printshop" | "address-capture"; /** * @description A proof page only: the language it is shown in, `sv` for Swedish or `en` for English. Absent, English. Refused `locale_not_allowed` for any other kind. * @enum {string} */ locale?: "en" | "sv"; /** @description A proof page only: whether its holder may approve or reject the design. Handing that out takes `designs:update` as well as `designs:read`. */ mayDecide?: boolean; /** @description A proof page only: where it sends the customer once they have asked for changes, with `state`, so the store can open the design for editing. Refused `return_url_not_allowed` for any other kind: a designer that returns to a store is minted by `POST /v1/templates/{id}/designer-links`, a correction page by `POST /v1/designs/{id}/correction-links`. On one of the origins the tenant's publishable keys are allowed on. */ returnUrl?: string; /** @description Carried back to `returnUrl` untouched, for the store to match the customer to its own session. Only with `returnUrl`. */ state?: string; /** @description What the page is about: a template's base id for a designer, a design's id for a proof page or address capture, an order's id for an order status or printshop page. */ subjectId: string; }; }; }; responses: { /** @description The new link */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { createdAt: number; /** @description When the link stops working; null for one that never does. */ expiresAt: number | null; id: string; kind: string; mayDecide: boolean; returnUrl: string | null; subjectId: string; /** @description The link's token. Shown in this response only. */ token: string; /** @description The hosted page the link opens. */ url: string; }; }; }; /** @description Refused: decide_not_allowed, return_url_not_allowed, return_url_not_https, return_url_off_store, locale_not_allowed, expiry_too_long, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `expiry_too_long`. */ kind?: string; /** @description Always sent with `expiry_too_long`. */ maxDays?: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: subject_not_found, not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/share-links/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Revoke a share link * @description The link's page stops opening at once. Revoking one already revoked changes nothing. A link the caller could not have handed out is answered as not found. */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The link no longer works */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/storage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read the tenant's storage use * @description Bytes used against the quota, counting every finished asset at its full size, and how many there are. */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The tenant's storage use */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { fileCount: number; quotaBytes: number; usedBytes: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the tenant's templates * @description A key is answered a page of the tenant's live templates by name (`items`, `total`, `page`, `pageSize`): each one's base id, name, latest version, the ratio and tolerance a print size is judged against, and `previewUrl`, a link to its preview that opens with no key for an hour or two. `q` keeps the templates whose name holds it, case aside; a key may ask for `status=live` alone. */ get: { parameters: { query?: { /** @description Which templates: `all`, `draft`, `live`, `paused`. Any other value is refused `invalid_status`. */ status?: string; q?: string; /** @description The page, from 1. A key's list is always paged. */ page?: number; /** @description How many templates a page holds, at most 200; 50 when only `page` is given. */ pageSize?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A key's page of live templates; a member's archive: the tenant's templates, what the archive's filters count, and with `page` the page's place in the whole */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { items: { baseId: string; latestVersion: number; name: string; previewUrl: string; ratio: { /** @description The ratio's height part. Positive. */ h: number; /** @description The ratio's width part. Positive. */ w: number; }; ratioTolerance: number; }[]; page: number; pageSize: number; total: number; } | { counts: { categories: { id: string; name: string; templateCount: number; }[]; statuses: { draft?: number; live?: number; paused?: number; }; tags: { tag: string; templateCount: number; }[]; uncategorised: number; }; page?: number; pageSize?: number; templates: { baseId: string; categoryId: string | null; hasDraft: boolean; latestVersion: number | null; layerCount: number; name: string; status: string; tags: string[]; updatedAt: number; versions: number[]; }[]; total?: number; }; }; }; /** @description Refused: invalid_status */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** * Publish a template version * @description Writes `template` as the published version `id@version` in one step, after the checks a studio publish runs: the author's own defaults must satisfy the template's constraints, and the publish-only rules must hold. A published version never changes, so a version that already exists is refused with `version_exists`. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description Ink id to the `updatedAt` (epoch ms) of that ink as the author's editor resolved the template against it. The publish refuses with `ink_changed` when one has moved since. */ inkVersions?: { [key: string]: number; }; /** @description Palette id to the `updatedAt` (epoch ms) the editor resolved it at; `palette_changed` when one has moved. */ paletteVersions?: { [key: string]: number; }; /** @description Shape id to the `updatedAt` (epoch ms) the editor resolved it at; `shape_changed` when one has moved. */ shapeVersions?: { [key: string]: number; }; template: components["schemas"]["TemplateInput"]; } & { [key: string]: unknown; }; }; }; responses: { /** @description The version was published */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { templateId: string; }; }; }; /** @description Refused: template_required */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, secret_key_required, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: ink_changed, shape_changed, palette_changed, font_changed, version_exists, base_id_deleted */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_template, invalid_publish, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `invalid_template`, `invalid_publish`. */ reason?: string; /** @description Sent with `invalid_template`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: template_renderer_failed, publish_gate_failed, db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable, publish_references_unavailable, lock_timeout */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a published template * @description The whole published document, which the designer validates and lays out against, and the form generated from it. `optionLabels` holds the tenant's own words for the options the template offers, when it has named any; `dieShapeId` names the die-cut the author chose, `layerShapeIds` the shape each customer-editable shape layer starts on, by layer id, and `offeredShapes` holds the outline of every shape a customer may pick, for the die-cut or a shape layer. `printMargins` is the reading tenant's default bleed and safe area, which artwork with no blank prints with, and `printFloorDpi` the minimum print resolution its pictures are judged against when a design is made: the template's own, else the tenant's. */ get: { parameters: { query?: never; header?: never; path: { /** @description A template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The template and its form */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { dieShapeId?: string; formSchema: { layout?: string; steps: { fields: { constraints: { [key: string]: unknown; }; default?: unknown; description?: string; label: string; layerId: string; prop: string; type: string; }[]; groupId: string; index: number | null; label: string; layerIds: string[]; transforms: { layerId: string; transform: { [key: string]: unknown; }; }[]; }[]; }; layerShapeIds?: { [key: string]: string; }; offeredShapes?: { [key: string]: unknown; }; optionLabels?: { [key: string]: string; }; printFloorDpi: number; printMargins: { bleedMm: number; safeAreaMm: number; }; template: components["schemas"]["ResolvedTemplate"]; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description No published template has this id */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates/{id}/constraints": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read what a print size of a template is judged against * @description The template's declared aspect ratio and the tolerance around it, so a consumer can check a size itself before asking `POST /v1/templates/{id}/print-size`. `fit` says how the artwork sits inside a legal box. Naming a `blankId` and `placementId` (both or neither) adds that placement's bounds: its largest and default print box, the box a proof or design naming it and no size prints at (`printWidthMm` × `printHeightMm`, the template's ratio fitted into the default box), and the bleed and safe area it prints with. A client draws its live preview against that box and those margins so it frames the design as the proof does. A named placement that does not resolve, or whose stored sizes are unusable, is refused with `unknown_placement`. */ get: { parameters: { query?: { blankId?: string; placementId?: string; }; header?: never; path: { /** @description A template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The template's print-size constraints */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { fit?: string; placement?: { blankId: string; bleedMm: number; defaultHeightMm: number; defaultWidthMm: number; maxHeightMm: number; maxWidthMm: number; placementId: string; printHeightMm: number; printWidthMm: number; safeAreaMm: number; }; ratio: { /** @description The ratio's height part. Positive. */ h: number; /** @description The ratio's width part. Positive. */ w: number; }; ratioTolerance: number; templateId: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled, forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query, unknown_placement */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; /** @description Refused: print_box_unavailable */ 503: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates/{id}/designer-links": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Hand out a hosted designer for a template, as a store sells it * @description A designer share link for the template's live version that mounts the designer with what the store sells it on: the blank and placement every proof is fitted to, the store's size menu and its colourway photos, and which size and photo start selected, exactly as the SDK takes them on a store's own page. A front and a back are one link with `sides`: one hosted page with a step per side, each side its own blank, placement, menus and, when it names one, its own template. With a `returnUrl`, approving makes a proof and sends the shopper back to `returnUrl?state=…&proofToken=…` (with `sides`, `returnUrl?state=…&proofToken[front]=…&proofToken[back]=…`), cancelling to `returnUrl?state=…`. `locale` shows the page and the designer in Swedish or English. A link carrying `state`, which names one shopper's visit, works for 24 hours; one without it works until withdrawn. A member needs what handing out a designer needs; a connected store's integration key, `templates:read` and `designs:update`. */ post: { parameters: { query?: never; header?: never; path: { /** @description The template's base id: the link follows whatever version is live. */ id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { blankId?: string; /** * @description The language the page is shown in: `sv` for Swedish, `en` for English. Absent, English. * @enum {string} */ locale?: "en" | "sv"; mockups?: { displacementStrength?: number | null; label: string; photoSizePx?: { h: number; w: number; }; placementRectPx: { h: number; w: number; x: number; y: number; }; shadingStrength?: number; /** Format: uri */ url: string; warp?: { curvature: number; edgeFalloff?: number; /** @enum {string} */ kind: "cylinder"; } | null; }[]; placementId?: string; printSizes?: { heightMm: number; label: string; widthMm: number; }[]; /** @description Where the hosted designer sends the shopper back to: with `state` and the approved proof's `proofToken`, which the store commits with its key, or with `state` alone when they cancel. A link with `sides` returns each side's proof under its key, `proofToken[]`, and only once every side is approved. Without it, the page commits the design itself and shows its id. On one of the origins the tenant's publishable keys are allowed on. */ returnUrl?: string; selectedMockupIndex?: number; selectedPrintSizeIndex?: number; sides?: { blankId: string; key: string; label: string; mockups?: { displacementStrength?: number | null; label: string; photoSizePx?: { h: number; w: number; }; placementRectPx: { h: number; w: number; x: number; y: number; }; shadingStrength?: number; /** Format: uri */ url: string; warp?: { curvature: number; edgeFalloff?: number; /** @enum {string} */ kind: "cylinder"; } | null; }[]; placementId: string; printSizes?: { heightMm: number; label: string; widthMm: number; }[]; selectedMockupIndex?: number; selectedPrintSizeIndex?: number; /** @description The template's base id; the link's own when absent. */ templateId?: string; }[]; /** @description Carried back to `returnUrl` untouched, for the store to match the customer to its own session. Only with `returnUrl`. */ state?: string; }; }; }; responses: { /** @description The new link */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description When the link stops working: 24 hours after it was handed out for a link carrying `state`, null for one without it, which works until withdrawn. */ expiresAt: number | null; /** @description The link's id, as the share-link list names it. */ id: string; /** @description The link's token. Shown in this response only. */ token: string; /** @description The hosted designer the link opens. */ url: string; }; }; }; /** @description Refused: return_url_not_https, return_url_off_store, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: subject_not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unknown_placement, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates/{id}/fitting-blanks": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List the blank placements a template fits * @description Every placement on the tenant's blanks, with the verdict for this artwork at the size it would print at there. It answers geometry, not whether the pairing is sold, and it answers for a draft or paused template too. The page is of BLANKS: one blank with three placements is three items, so page on `page` and `total`, not on the number of items. `q` keeps the blanks whose name holds it, case aside. */ get: { parameters: { query?: { /** @description Which page of the list to read, counting from 1. Left out, the first page. */ page?: number; pageSize?: number; q?: string; }; header?: never; path: { /** @description A template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description A page of placements with their verdicts */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { items: { blankId: string; blankName: string; defaultHeightMm: number; defaultWidthMm: number; maxHeightMm: number; maxWidthMm: number; placementId: string; placementName: string; printHeightMm: number; printWidthMm: number; verdict: { /** @enum {boolean} */ legal: true; } | { /** @enum {boolean} */ legal: false; reason: string; }; }[]; page: number; pageSize: number; total: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_query */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/templates/{id}/print-size": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Check whether a print size is legal for a template * @description Judges `widthMm` × `heightMm` against the template's declared ratio and, when the body names a `blankId` and `placementId` (both or neither), against that placement's maximum print area. An illegal size is still a 200: the verdict says which check it failed. A body with `sizes` (up to 50) in place of one size judges each against the same placement, answering `verdicts` in the order asked. A named placement that does not resolve is refused with `unknown_placement` rather than judged without its bounds. */ post: { parameters: { query?: never; header?: never; path: { /** @description A template id, `baseId@version`. */ id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { blankId?: string; heightMm: number; placementId?: string; widthMm: number; } | { blankId?: string; placementId?: string; sizes: { heightMm: number; widthMm: number; }[]; }; }; }; responses: { /** @description The verdict, or one per size in the order asked */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {boolean} */ legal: true; } | { /** @enum {boolean} */ legal: false; reason: string; } | { verdicts: ({ /** @enum {boolean} */ legal: true; } | { /** @enum {boolean} */ legal: false; reason: string; })[]; }; }; }; /** @description Refused: bad_json */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: forbidden, origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: invalid_body, unknown_placement, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `invalid_body`. */ reason?: string; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/validate": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Check a customer's payload against its template * @description Validates the values a customer gave a published template, and the placement and print size the request names, without rendering or storing anything. A named placement that does not resolve is refused with `unknown_placement`. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description The id of a published template. */ templateId?: unknown; /** @description The customer's values for the template's fields. */ values?: unknown; } & { blankId?: string; placementId?: string; } & { heightMm?: number; widthMm?: number; }; }; }; responses: { /** @description The payload is valid; the hash of the document it resolves to */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { docHash: string; /** @description The pictures that print below `printFloorDpi` at the design's print size. A warning: nothing is refused for it. */ lowResolution: { /** @description The picture's pixels along the edge that decides. */ actualPx: number; assetId: string; /** @description Pixels per inch along that edge, as printed. */ effectiveDpi: number; /** @description The layer the picture fills, or the artwork's own key for its image background. */ layerId: string; /** @description The pixels that edge needs at the floor. */ minPx: number; }[]; /** @enum {boolean} */ ok: true; /** @description The minimum print resolution the design's pictures were judged against: the template's own, else the tenant's. */ printFloorDpi: number; }; }; }; /** @description Refused: bad_json, bad_request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: constraint_violation, unknown_placement, payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Sent with `payload_too_large`. */ bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; /** @description Always sent with `constraint_violation`. */ violations?: { given: unknown; layerId: string; prop: string; rule: string; /** @description `error` refuses a publish; `warning` is worth the author's attention and never does. */ severity: string; }[]; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/webhooks": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List the tenant's webhook endpoints */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The endpoints */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { active: boolean; /** @description The key that owns the endpoint, and alone of the tenant's keys manages it: the secret key that registered it, or the integration key of the store it was given to. Null for one registered in the studio. */ apiKeyId: string | null; /** @description The connected store the endpoint was registered for; null for one registered on its own. Such an endpoint is deleted by disconnecting the store. */ connectionId: string | null; createdAt: number; cursor: string | null; eventTypes: string[]; failedCount: number; failing: boolean; id: string; tenantId: string; url: string; }[]; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; /** Register a webhook endpoint */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @default [] */ eventTypes?: string[]; url: string; }; }; }; responses: { /** @description The endpoint, and its signing secret, shown this once */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { endpointId: string; secret: string; }; }; }; /** @description Refused: invalid_url, invalid_event_type, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_event_type`. */ type?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/webhooks/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** Delete a webhook endpoint */ delete: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The endpoint was deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: connection_endpoint */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; options?: never; head?: never; /** Switch a webhook endpoint on or off, or choose its event types */ patch: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { active?: boolean; /** @description The event types it receives; empty for every type. */ eventTypes?: string[]; }; }; }; responses: { /** @description The endpoint */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { active: boolean; /** @description The key that owns the endpoint, and alone of the tenant's keys manages it: the secret key that registered it, or the integration key of the store it was given to. Null for one registered in the studio. */ apiKeyId: string | null; /** @description The connected store the endpoint was registered for; null for one registered on its own. Such an endpoint is deleted by disconnecting the store. */ connectionId: string | null; createdAt: number; cursor: string | null; eventTypes: string[]; failedCount: number; failing: boolean; id: string; tenantId: string; url: string; }; }; }; /** @description Refused: invalid_event_type, invalid_input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description Always sent with `invalid_event_type`. */ type?: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; trace?: never; }; "/v1/webhooks/{id}/deliveries": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List an endpoint's recent deliveries */ get: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The endpoint's last deliveries, newest first */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { attempts: number; createdAt: number; eventId: string; eventType: string; id: string; lastError: string | null; nextAttemptAt: number | null; status: string; }[]; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/webhooks/{id}/deliveries/redeliver-failed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Requeue every failed delivery of an endpoint */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description How many deliveries were requeued */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": { requeued: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: endpoint_inactive */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Requeue one delivery */ post: { parameters: { query?: never; header?: never; path: { id: string; deliveryId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description How many deliveries were requeued */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": { requeued: number; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: endpoint_inactive */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/v1/webhooks/{id}/ping": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Send an endpoint a signed test request */ post: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Whether the endpoint accepted the request */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {boolean} */ delivered: true; } | { /** @enum {boolean} */ delivered: false; error: string; }; }; }; /** @description Refused: unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: origin_forbidden, forbidden, feature_disabled */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; /** @description The feature the tenant does not have. Always sent with `feature_disabled`. */ feature?: string; }; }; }; /** @description Refused: not_found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: payload_too_large */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { bytes?: number; error: string; /** @description Always sent with `payload_too_large`. */ maxBytes?: number; }; }; }; /** @description Refused: rate_limited */ 429: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Refused: db_error. A request that failed unexpectedly answers as text instead. */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; "text/plain": "Internal Server Error"; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export interface webhooks { "asset.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** asset.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["AssetCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "asset.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** asset.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["AssetDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "asset.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** asset.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["AssetUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "blank.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** blank.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["BlankCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "blank.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** blank.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["BlankDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "blank.drifted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** blank.drifted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["BlankDriftedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "blank.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** blank.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["BlankUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.approval_scheduled": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.approval_scheduled */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignApprovalScheduledEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.approved": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.approved */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignApprovedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.changes_requested": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.changes_requested */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignChangesRequestedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.committed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.committed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignCommittedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.delivery_captured": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.delivery_captured */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignDeliveryCapturedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.duplicated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.duplicated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignDuplicatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.edited": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.edited */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignEditedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.personal_data_erased": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.personal_data_erased */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignPersonalDataErasedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "design.rejected": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** design.rejected */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DesignRejectedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "ink.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** ink.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["InkCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "ink.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** ink.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["InkDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "ink.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** ink.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["InkUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "order.cancelled": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** order.cancelled */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OrderCancelledEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "order.failed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** order.failed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OrderFailedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "order.status_changed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** order.status_changed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OrderStatusChangedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "order.submitted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** order.submitted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OrderSubmittedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "palette.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** palette.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PaletteCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "palette.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** palette.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PaletteDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "palette.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** palette.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PaletteUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "print.completed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** print.completed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintCompletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "print.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** print.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "print.failed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** print.failed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintFailedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "printshop.connected": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** printshop.connected */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintshopConnectedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "printshop.disconnected": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** printshop.disconnected */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintshopDisconnectedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "printshop.reconnected": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** printshop.reconnected */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintshopReconnectedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "printshop.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** printshop.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["PrintshopUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "run.cancelled": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** run.cancelled */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["RunCancelledEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "run.completed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** run.completed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["RunCompletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "run.exhausted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** run.exhausted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["RunExhaustedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "run.failed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** run.failed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["RunFailedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "run.started": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** run.started */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["RunStartedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "shape.created": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** shape.created */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["ShapeCreatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "shape.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** shape.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["ShapeDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "shape.updated": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** shape.updated */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["ShapeUpdatedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "template.deleted": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** template.deleted */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["TemplateDeletedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "template.live_changed": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** template.live_changed */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["TemplateLiveChangedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "template.published": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** template.published */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["TemplatePublishedEvent"]; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "webhook.ping": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * webhook.ping * @description A test request, sent on demand to one endpoint (`POST /v1/webhooks/{id}/ping`). Signed like a delivery, but never retried, never in the delivery log, and not a type an endpoint can subscribe to. */ post: { parameters: { query?: never; header: { /** @description When this attempt was sent, in Unix seconds. */ "x-pixonaut-timestamp": string; /** @description `v1=` followed by the hex HMAC-SHA256, keyed with the endpoint's signing secret, of the `x-pixonaut-timestamp` value, a `.`, and the raw request body. */ "x-pixonaut-signature": string; }; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { /** @description The webhook endpoint the ping tests. */ endpointId: string; }; /** @enum {string} */ type: "webhook.ping"; }; }; }; responses: { /** @description Any 2xx acknowledges the delivery. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export interface components { schemas: { AssetCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { assetId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "asset.created"; }; AssetDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { assetId: string; assetName: string | null; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "asset.deleted"; }; AssetUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { assetId: string; fields: string[]; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "asset.updated"; }; BlankCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { blankId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "blank.created"; }; BlankDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { blankId: string; blankName: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "blank.deleted"; }; BlankDriftedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { blankId: string; blankName: string; kinds: string[]; severity: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "blank.drifted"; }; BlankUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { blankId: string; fields: string[]; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "blank.updated"; }; DesignApprovalScheduledEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { approveAfter: number; designId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.approval_scheduled"; }; DesignApprovedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { approvedVia: string; /** @description How the customer agreed, as the design read's `approval_consent` keeps it: null when none was given. Absent only on an event recorded before approvals carried it. */ consent?: { /** @description When the customer agreed, epoch milliseconds. */ at: number; /** @description How the customer agreed: by adding the design to their cart, by ticking a box, on a proof page, by approving it again on your store after correcting it (`edit`), or by letting your store's own approval deadline pass (`deadline`). More kinds may be added. */ kind: string; ref: string | null; } | null; designId: string; /** @description The design's revision the decision was made about, as the design read's `revision` says it. Absent only on an event recorded before decisions carried it. */ revision?: number; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.approved"; }; DesignChangesRequestedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; message: string; revision: number; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.changes_requested"; }; DesignCommittedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { apiKeyId: string | null; designId: string; templateId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.committed"; }; DesignDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.deleted"; }; DesignDeliveryCapturedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.delivery_captured"; }; DesignDuplicatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; sourceDesignId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.duplicated"; }; DesignEditedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; restoredFrom?: number; revision: number; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.edited"; }; DesignPersonalDataErasedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.personal_data_erased"; }; DesignRejectedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; /** @description The design's revision the decision was made about, as the design read's `revision` says it. Absent only on an event recorded before decisions carried it. */ revision?: number; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "design.rejected"; }; InkCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { inkId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "ink.created"; }; InkDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { inkId: string; inkName: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "ink.deleted"; }; InkUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { fields: string[]; inkId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "ink.updated"; }; OrderCancelledEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { externalRef?: string | null; orderId: string; printId: string; printIds?: string[]; via?: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "order.cancelled"; }; OrderFailedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { externalRef?: string | null; orderId: string; printId: string; printIds?: string[]; reason: string; via?: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "order.failed"; }; OrderStatusChangedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { externalRef?: string | null; orderId: string; previousStatus: string; printId: string; printIds?: string[]; status: string; tracking?: { carrier?: string; number: string; /** Format: uri */ url?: string; }; via?: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "order.status_changed"; }; OrderSubmittedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { adapter: string; externalOrderRef: string | null; externalRef?: string | null; orderId: string; printId: string; printIds?: string[]; quantity?: number; replacesOrderId?: string | null; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "order.submitted"; }; PaletteCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { paletteId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "palette.created"; }; PaletteDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { paletteId: string; paletteName: string; unlinked?: string[]; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "palette.deleted"; }; PaletteUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { fields: string[]; paletteId: string; unlinked?: string[]; uses?: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "palette.updated"; }; PrintCompletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { printId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "print.completed"; }; PrintCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { designId: string; /** @default 1 */ designRevision: number; printId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "print.created"; }; PrintFailedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { printId: string; reason: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "print.failed"; }; PrintshopConnectedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { adapter: string; connectionId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "printshop.connected"; }; PrintshopDisconnectedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { adapter: string; connectionId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "printshop.disconnected"; }; PrintshopReconnectedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { adapter: string; connectionId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "printshop.reconnected"; }; PrintshopUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { adapter: string; connectionId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "printshop.updated"; }; ResolvedTemplate: { /** @description What is painted behind every layer, across the bleed. Absent is none. */ background?: { /** @description The background colour. */ color: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette: string; } | { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; } | { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; }; /** * @description color paints the whole artwork, bleed included; image fills it with a picture. * @enum {string} */ kind: "color"; } | { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The background picture's asset id. */ imageAssetId: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** * @description color paints the whole artwork, bleed included; image fills it with a picture. * @enum {string} */ kind: "image"; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The resolution the artwork is drawn at, in dots per inch; 300 is usual for print. */ dpi: number; /** @description How the artwork sits in a print box of another shape: contain, cover or fill. */ fit: string; fonts?: { [key: string]: { hash: string; weight: number; }[]; }; form?: { layout?: string; }; groups?: { id: string; label: string; layerIds: string[]; order: number; }[]; id: string; layers: ({ /** @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. */ anchor: string; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description A backdrop painted behind this layer's content at exactly its box: a colour, or a filled shape. Text and image layers only. */ mat?: { /** @description The backdrop's colour. */ color: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "color"; } | { /** @description The silhouette's colour. */ fill: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "shape"; /** @description The backdrop's silhouette, at the layer's box. */ shape: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Horizontal alignment in the text box. */ align: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The text. */ content: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The text's colour. */ fill: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette: string; } | { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; } | { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; }; /** @description The font family, one of those the tenant offers. */ fontFamily: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The font size as a fraction of the plate's HEIGHT, as is its offered range: 0.05 is 5 % of the height. Positive. */ fontSizeFrac: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most value a customer may choose. */ max?: number; /** @description The least value a customer may choose. */ min?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The step between the values a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; /** @description The font weight, 1 to 1000; 400 is regular, 700 bold. */ fontWeight?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most value a customer may choose. */ max?: number; /** @description The least value a customer may choose. */ min?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The step between the values a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; /** @description Vertical alignment in the text box; absent is middle. */ valign?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; }; /** @description What the text layer does when its text does not fit its box. Every size here is a fraction of the plate. */ textBox: { /** * @description true breaks a word wider than the box across lines rather than refusing it. * @enum {boolean} */ breakWords?: true; /** * @description adapt keeps the font size and grows the box, then shrinks the text, as far as the limits below allow. * @enum {string} */ mode: "adapt"; /** @description Which way the box grows first. Absent is widerFirst. */ order?: string; /** @description The smallest font size the text may shrink to, as a fraction of the plate's height. Absent, it does not shrink. */ shrinkTo?: number; /** @description How tall the box may grow, as a fraction of the plate's height, at most 1. Absent, it does not grow taller. */ tallerTo?: number; /** @description What happens to text that still does not fit: clamp cuts it at the box, reject refuses the text. */ then: string; /** @description How wide the box may grow, as a fraction of the plate's width, at most 1. Absent, it does not widen. */ widenTo?: number; } | { /** * @description true breaks a word wider than the box across lines rather than refusing it. * @enum {boolean} */ breakWords?: true; /** @description The largest font size, as a fraction of the plate's height; null is no limit, as large as one line of the box. */ max: number | null; /** @description The smallest font size, as a fraction of the plate's height. */ min: number; /** * @description fill sizes the text to fill the box, between min and max. * @enum {string} */ mode: "fill"; /** @description What happens to text that still does not fit: clamp cuts it at the box, reject refuses the text. */ then: string; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. */ bounds?: string; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: string[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "text"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; } | { /** @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. */ anchor: string; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description A backdrop painted behind this layer's content at exactly its box: a colour, or a filled shape. Text and image layers only. */ mat?: { /** @description The backdrop's colour. */ color: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "color"; } | { /** @description The silhouette's colour. */ fill: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "shape"; /** @description The backdrop's silhouette, at the layer's box. */ shape: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The picture's asset id; null is none chosen yet. */ src: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string | null; }; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. */ bounds?: string; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: string[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "image"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; } | { /** @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. */ anchor: string; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description What the silhouette is painted with: a colour, or a picture clipped to it. */ fill: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; } | { /** @description A picture's asset id, clipped to the shape; empty while none is chosen. */ imageAssetId: string; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The layer's silhouette: inline geometry or one of the tenant's shapes. */ shape: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose no shape at all. * @enum {boolean} */ allowEmpty?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. */ bounds?: string; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: string[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "shape"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; })[]; name: string; palettes?: { [key: string]: { /** @description The colour. */ color: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; /** @description The name a customer picks the colour by. */ name: string; }[]; }; /** @description The artwork's aspect ratio, as two positive numbers: { w: 3, h: 2 } is landscape. The plate every fraction is measured against has this shape. */ ratio: { /** @description The ratio's height part. Positive. */ h: number; /** @description The ratio's width part. Positive. */ w: number; }; /** @description How far, as a fraction of the ratio, a print size may differ from it: 0.02 is 2 %. 0 or more. */ ratioTolerance: number; /** @description The die-cut outline the print is cut to, which a customer may be offered. Absent is a square-cornered rectangle. */ shape?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose no shape at all. * @enum {boolean} */ allowEmpty?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What a customer's moves snap to, and the author's grid. */ snap?: { /** @description The author's grid, which the author's drags snap to. A customer never sees it. */ grid?: { /** @description The grid's step as a fraction of the plate, 0.01 to 0.5: 0.05 is a line every 5 %. */ stepFrac: number; }; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ targets?: string[]; }; tenantId: string; uploads?: { /** @description Whether a customer whose upload is below the minimum print resolution at the size they chose is offered to improve it before the proof, paid from the tenant's credits. Only for a tenant whose plan grants upscaling; ignored otherwise. Absent, off. */ allowUpscale?: boolean; /** @description The file formats a customer may upload, each once: png, jpeg, webp, heic. Absent, all of them. */ formats?: string[]; /** @description The largest upload, in bytes, at most 83886080. Absent, that. */ maxBytes?: number; /** @description The minimum print resolution a design's pictures are judged against where they print, in dots per inch, at most 1200. Absent, the tenant's. */ minDpi?: number; }; version: number; }; RunCancelledEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { runId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "run.cancelled"; }; RunCompletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { runId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "run.completed"; }; RunExhaustedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { reason: string; runId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "run.exhausted"; }; RunFailedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { reason: string; runId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "run.failed"; }; RunStartedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { runId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "run.started"; }; ShapeCreatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { shapeId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "shape.created"; }; ShapeDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { shapeId: string; shapeName: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "shape.deleted"; }; ShapeUpdatedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { fields: string[]; shapeId: string; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "shape.updated"; }; TemplateDeletedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { baseId: string; wasLive: boolean; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "template.deleted"; }; TemplateInput: { /** @description What is painted behind every layer, across the bleed. Absent is none. */ background?: { /** @description The background colour. */ color: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette: string; } | { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; } | { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; }; /** * @description color paints the whole artwork, bleed included; image fills it with a picture. * @enum {string} */ kind: "color"; } | { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** * @description The attribute's value, as the template stores it. * @enum {string} */ value: "contain" | "cover" | "fill" | "tile"; }; /** @description The background picture's asset id. */ imageAssetId: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** * @description color paints the whole artwork, bleed included; image fills it with a picture. * @enum {string} */ kind: "image"; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The resolution the artwork is drawn at, in dots per inch; 300 is usual for print. */ dpi: number; /** * @description How the artwork sits in a print box of another shape: contain, cover or fill. * @enum {string} */ fit: "contain" | "cover" | "fill"; form?: { /** @enum {string} */ layout?: "page" | "steps"; }; groups?: { id: string; label: string; layerIds: string[]; order: number; }[]; id: string; layers: ({ /** * @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. * @enum {string} */ anchor: "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right"; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description A backdrop painted behind this layer's content at exactly its box: a colour, or a filled shape. Text and image layers only. */ mat?: { /** @description The backdrop's colour. */ color: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "color"; } | { /** @description The silhouette's colour. */ fill: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "shape"; /** @description The backdrop's silhouette, at the layer's box. */ shape: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Horizontal alignment in the text box. */ align: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** * @description The attribute's value, as the template stores it. * @enum {string} */ value: "left" | "center" | "right"; }; /** @description The text. */ content: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The text's colour. */ fill: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette: string; } | { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; } | { /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; }; /** @description The font family, one of those the tenant offers. */ fontFamily: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string; }; /** @description The font size as a fraction of the plate's HEIGHT, as is its offered range: 0.05 is 5 % of the height. Positive. */ fontSizeFrac: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most value a customer may choose. */ max?: number; /** @description The least value a customer may choose. */ min?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The step between the values a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; /** @description The font weight, 1 to 1000; 400 is regular, 700 bold. */ fontWeight?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most value a customer may choose. */ max?: number; /** @description The least value a customer may choose. */ min?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The step between the values a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; /** @description Vertical alignment in the text box; absent is middle. */ valign?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most characters a customer may type. */ maxLength?: number; /** @description The most lines a customer's text may take. */ maxLines?: number; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** * @description The attribute's value, as the template stores it. * @enum {string} */ value: "top" | "middle" | "bottom"; }; }; /** @description What the text layer does when its text does not fit its box. Every size here is a fraction of the plate. */ textBox: { /** * @description true breaks a word wider than the box across lines rather than refusing it. * @enum {boolean} */ breakWords?: true; /** * @description adapt keeps the font size and grows the box, then shrinks the text, as far as the limits below allow. * @enum {string} */ mode: "adapt"; /** * @description Which way the box grows first. Absent is widerFirst. * @enum {string} */ order?: "widerFirst" | "tallerFirst"; /** @description The smallest font size the text may shrink to, as a fraction of the plate's height. Absent, it does not shrink. */ shrinkTo?: number; /** @description How tall the box may grow, as a fraction of the plate's height, at most 1. Absent, it does not grow taller. */ tallerTo?: number; /** * @description What happens to text that still does not fit: clamp cuts it at the box, reject refuses the text. * @enum {string} */ then: "clamp" | "reject"; /** @description How wide the box may grow, as a fraction of the plate's width, at most 1. Absent, it does not widen. */ widenTo?: number; } | { /** * @description true breaks a word wider than the box across lines rather than refusing it. * @enum {boolean} */ breakWords?: true; /** @description The largest font size, as a fraction of the plate's height; null is no limit, as large as one line of the box. */ max: number | null; /** @description The smallest font size, as a fraction of the plate's height. */ min: number; /** * @description fill sizes the text to fill the box, between min and max. * @enum {string} */ mode: "fill"; /** * @description What happens to text that still does not fit: clamp cuts it at the box, reject refuses the text. * @enum {string} */ then: "clamp" | "reject"; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** * @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. * @enum {string} */ bounds?: "safeArea" | "printBox" | "none"; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: ("centre" | "thirds" | "safeEdges" | "layers")[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "text"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; } | { /** * @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. * @enum {string} */ anchor: "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right"; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description A backdrop painted behind this layer's content at exactly its box: a colour, or a filled shape. Text and image layers only. */ mat?: { /** @description The backdrop's colour. */ color: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "color"; } | { /** @description The silhouette's colour. */ fill: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; }; /** * @description color is a plain backdrop; shape fills a silhouette. * @enum {string} */ kind: "shape"; /** @description The backdrop's silhouette, at the layer's box. */ shape: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** * @description The attribute's value, as the template stores it. * @enum {string} */ value: "contain" | "cover" | "fill" | "tile"; }; /** @description The picture's asset id; null is none chosen yet. */ src: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: string | null; }; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** * @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. * @enum {string} */ bounds?: "safeArea" | "printBox" | "none"; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: ("centre" | "thirds" | "safeEdges" | "layers")[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "image"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; } | { /** * @description The point of the reference the layer is placed against, and the layer's own matching point: top-left puts the layer's top-left corner on the reference's. * @enum {string} */ anchor: "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right"; /** @description Another layer's id, to place and size this one against that layer's box instead of the plate. A missing layer falls back to the plate. */ anchorTo?: string; /** @description The layer's height as a fraction of the reference's height: 1 is the full height, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ hFrac: number; /** @description The layer's id: what anchorTo, groups and a customer's values name it by. Never changes. */ id: string; /** * @description true locks the layer on the author's canvas: clicks pass through and it cannot be deleted. Absent is unlocked. * @enum {boolean} */ locked?: true; /** @description What the author reads the layer as. Not unique; absent, the layer reads as its id. */ name?: string; /** @description How far the layer sits from its anchor, as fractions of the reference, always toward the reference's centre: { x: 0.05, y: 0.05 } nudges it 5 % in from any corner. Ignored on a centred axis. */ offsetFrac: { /** @description Across, as a fraction of the reference's width: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ x: number; /** @description Down or up, as a fraction of the reference's height: 0.05 is 5 %. Toward the centre; negative pushes outward. Uncapped. */ y: number; }; /** @description The layer's opacity, which a customer may be offered. Absent is full and not offered. */ opacity?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most opacity a customer may choose, 0.01 to 1. */ max?: number; /** @description The least opacity a customer may choose, 0.01 to 1. */ min?: number; /** @description The step between choosable opacities, e.g. 0.05. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description How opaque the whole layer is: 1 is full, 0.01 the least. */ value: number; }; /** * @description false makes it a guide layer: laid out and drawn on the author's canvas, never printed or shown to a customer. Absent prints. * @enum {boolean} */ print?: false; props: { /** @description Where the picture sits in its frame, under cover. Absent is uncropped. */ crop?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The most zoom a customer may choose; absent is 3. */ maxZoom?: number; /** @description The least zoom a customer may choose; absent is 1. */ minZoom?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description How far the picture's centre sits right of the frame's centre, in frame widths: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ xFrac: number; /** @description How far the picture's centre sits below the frame's centre, in frame heights: 0.1 is a tenth of the frame. Clamped so the picture always covers the frame, never refused. */ yFrac: number; /** @description The picture's scale over what cover gives it: 1 is the picture just covering the frame, up to 5. */ zoom: number; }; }; /** @description What the silhouette is painted with: a colour, or a picture clipped to it. */ fill: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description Whether a customer may upload a picture of their own. */ allowUpload?: boolean; /** * @description true lets a customer choose any colour, beside or instead of a palette. * @enum {boolean} */ anyColor?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; /** @description The palette a customer picks from. In a template you write, one of your palettes' ids (`pal_…`); in a published template as served, that palette's name, with the palette under `palettes`. */ palette?: string; /** @description Whether a customer must choose a picture. */ required?: boolean; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; } | { /** @description A spot (named) ink colour with the CMYK that prints in its place. */ spot: { /** @description The CMYK that prints and separates in place of the spot ink; it is what reaches the plate. */ fallback: { /** @description A CMYK colour: cyan, magenta, yellow and black in that order, each a percentage of ink from 0 to 100, e.g. [0, 100, 100, 0] for a red. */ cmyk: [ number, number, number, number ]; }; /** @description The spot colour's name as the print shop knows it, e.g. a Pantone name. */ name: string; /** @description How a screen paints the spot, as an RGB colour. Never what prints. */ preview?: { /** @description An RGB colour: red, green and blue in that order, each on the 0 to 255 scale, e.g. [255, 0, 0] for red. */ rgb: [ number, number, number ]; }; }; } | { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; } | { /** @description An older spelling of an ink reference; send `{ ink }`. */ spot: { /** @description One of the tenant's inks, by its id, as the ink library lists it. */ ink: string; }; } | { /** @description The linked entry's id within that palette, `pe_…`, as get_palette returns it. The colour follows the entry. */ entry: string; /** @description The linked palette's id, `pal_…`, as list_palettes returns it. */ palette: string; } | { /** @description A picture's asset id, clipped to the shape; empty while none is chosen. */ imageAssetId: string; }; }; /** @description How the picture fills its box: cover crops, contain shows it whole, fill stretches, tile repeats it. Absent is cover. */ fit?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** * @description The attribute's value, as the template stores it. * @enum {string} */ value: "contain" | "cover" | "fill" | "tile"; }; /** @description The layer's silhouette: inline geometry or one of the tenant's shapes. */ shape: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose no shape at all. * @enum {boolean} */ allowEmpty?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description The tile's size against the picture's own, when the fit is tile. */ tileScale?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** @description The largest tile scale a customer may choose. */ max?: number; /** @description The smallest tile scale a customer may choose. */ min?: number; /** @description The step between the tile scales a customer may choose. */ step?: number; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: number; }; }; /** @description The layer's rotation and scale, and which of them, and its position, a customer may change. */ transform: { /** @description Whether, and within what, a customer may resize the layer. */ resize?: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable?: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most height, in millimetres. */ maxHMm?: number; /** @description The most width, in millimetres. */ maxWMm?: number; /** @description The least height, in millimetres. */ minHMm?: number; /** @description The least width, in millimetres. */ minWMm?: number; }; /** @description Whether, and how far, a customer may rotate the layer. */ rotate: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most rotation, in degrees. */ max?: number; /** @description The least rotation, in degrees. */ min?: number; /** @description The angle rotation snaps to, in degrees, e.g. 15. */ snapDeg?: number; }; /** @description Whether, and how far, a customer may scale the layer. */ scale: { /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description The most scale; 1 is as authored. */ max?: number; /** @description The least scale; 1 is as authored. */ min?: number; /** @description The step between the scales a customer may choose. */ step?: number; }; /** @description Whether, and within what, a customer may move the layer. */ translate: { /** * @description Where a customer's move must keep the layer: inside the safe area (the default), the print box, or anywhere. * @enum {string} */ bounds?: "safeArea" | "printBox" | "none"; /** @description A hint shown to the customer under the control. */ description?: string; /** @description Whether a customer may change it. */ editable: boolean; /** @description What a customer reads the control as. */ label?: string; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ snapTo?: ("centre" | "thirds" | "safeEdges" | "layers")[]; }; /** @description The layer's rotation and scale. */ value: { /** @description Rotation about the layer's anchor, in degrees, clockwise. */ rotationDeg: number; /** @description Scale of the layer; 1 is as authored. */ scale: number; }; }; /** @enum {string} */ type: "shape"; /** * @description true lays spot varnish exactly where the layer is, on a machine that varnishes; it still prints in colour. * @enum {boolean} */ varnish?: true; /** @description The layer's width as a fraction of the reference's width: 1 is the full width, 0.5 half. Positive; uncapped, so above 1 hangs over the edge and is clipped. */ wFrac: number; /** @description Paint depth, lowest painted first. A multiple of 10 follows the layer's place in the list; any other value pins it. */ z: number; })[]; name: string; /** @description The artwork's aspect ratio, as two positive numbers: { w: 3, h: 2 } is landscape. The plate every fraction is measured against has this shape. */ ratio: { /** @description The ratio's height part. Positive. */ h: number; /** @description The ratio's width part. Positive. */ w: number; }; /** @description How far, as a fraction of the ratio, a print size may differ from it: 0.02 is 2 %. 0 or more. */ ratioTolerance: number; /** @description The die-cut outline the print is cut to, which a customer may be offered. Absent is a square-cornered rectangle. */ shape?: { /** @description What a customer may choose, when editable. Absent, the attribute's own range. */ constraints?: { /** * @description true lets a customer choose no shape at all. * @enum {boolean} */ allowEmpty?: true; /** @description The values a customer may choose from, when the attribute is editable: font families, picture asset ids, shape ids (`shp_…`) or fits. Absent, any value the attribute takes. */ oneOf?: string[]; }; /** @description A hint shown to the customer under the attribute's field. */ description?: string; /** @description Whether a customer may change it. A layer is customer-editable when any of its attributes is. */ editable: boolean; /** @description What a customer reads the attribute as, when editable. */ label?: string; /** @description The attribute's value, as the template stores it. */ value: { /** @description SVG path data in fractions of its box, (0,0) its top-left and (1,1) its bottom-right: `M 0 0 L 1 0 L 1 1 L 0 1 Z` is the whole box. No arcs. */ dFrac: string; /** * @description Inline path geometry. * @enum {string} */ type: "path"; } | { /** @description The shape's id, `shp_…`, as list_shapes returns it. */ shapeId: string; /** * @description One of the tenant's shapes, by id. * @enum {string} */ type: "shape"; }; }; /** @description What a customer's moves snap to, and the author's grid. */ snap?: { /** @description The author's grid, which the author's drags snap to. A customer never sees it. */ grid?: { /** @description The grid's step as a fraction of the plate, 0.01 to 0.5: 0.05 is a line every 5 %. */ stepFrac: number; }; /** @description What a move snaps to: centre, thirds, safeEdges, layers. */ targets?: ("centre" | "thirds" | "safeEdges" | "layers")[]; }; tenantId?: string; uploads?: { /** @description Whether a customer whose upload is below the minimum print resolution at the size they chose is offered to improve it before the proof, paid from the tenant's credits. Only for a tenant whose plan grants upscaling; ignored otherwise. Absent, off. */ allowUpscale?: boolean; /** @description The file formats a customer may upload, each once: png, jpeg, webp, heic. Absent, all of them. */ formats?: ("png" | "jpeg" | "webp" | "heic")[]; /** @description The largest upload, in bytes, at most 83886080. Absent, that. */ maxBytes?: number; /** @description The minimum print resolution a design's pictures are judged against where they print, in dots per inch, at most 1200. Absent, the tenant's. */ minDpi?: number; }; version: number; }; TemplateLiveChangedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { baseId: string; live: boolean; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "template.live_changed"; }; TemplatePublishedEvent: { /** @description When the event happened, in milliseconds since the Unix epoch. */ createdAt: number; /** @description The event's id. A retry or a redelivery carries the same id, so a receiver can drop one it has already handled. */ id: string; payload: { templateId: string; version: number; }; /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: "template.published"; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export type operations = Record;