UNPKG

@pfantato/printful-ts

Version:

Typescript SDK to integrate with Printful

842 lines (841 loc) 29.1 kB
import { z } from 'zod'; export declare const CreateOrderItemBody: z.ZodDiscriminatedUnion<"source", [z.ZodObject<z.objectUtil.extendShape<Pick<z.objectUtil.extendShape<{ id: z.ZodNumber; source: z.ZodEnum<["catalog", "product_template", "warehouse"]>; external_id: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; retail_price: z.ZodString; name: z.ZodString; _links: z.ZodObject<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }, "strip", z.ZodTypeAny, { self?: { href?: string; }; }, { self?: { href?: string; }; }>; }, { source: z.ZodLiteral<"catalog">; catalog_variant_id: z.ZodNumber; placements: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<Pick<{ placement: z.ZodString; technique: z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>; print_area_width: z.ZodNumber; print_area_height: z.ZodNumber; layers: z.ZodArray<z.ZodObject<{ type: z.ZodString; layer_options: z.ZodArray<z.ZodObject<{ name: z.ZodString; techniques: z.ZodArray<z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>, "many">; type: z.ZodString; values: z.ZodArray<z.ZodUnknown, "many">; }, "strip", z.ZodTypeAny, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }>, "many">; }, "strip", z.ZodTypeAny, { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }, { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }>, "many">; placement_options: z.ZodArray<z.ZodObject<{ name: z.ZodString; techniques: z.ZodArray<z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>, "many">; type: z.ZodString; values: z.ZodArray<z.ZodUnknown, "many">; }, "strip", z.ZodTypeAny, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }>, "many">; conflicting_placements: z.ZodArray<z.ZodString, "many">; }, "placement_options" | "layers" | "placement" | "technique">, { status: z.ZodEnum<["ok", "failed"]>; status_explanation: z.ZodString; }>, "strip", z.ZodTypeAny, { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }, { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }>, "many">; product_options: z.ZodArray<z.ZodObject<{ name: z.ZodEnum<["inside_pocket", "stitch_color", "notes", "lifelike", "custom_border_color", "base_color", "trim_color", "color_reduction_mode"]>; value: z.ZodBoolean; }, "strip", z.ZodTypeAny, { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }, { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }>, "many">; }>, "name" | "placements" | "source" | "external_id" | "quantity" | "retail_price" | "catalog_variant_id" | "product_options">, { store_id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>; }>, "strip", z.ZodTypeAny, { name?: string; store_id?: number; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; }, { name?: string; store_id?: number; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; }>, z.ZodObject<z.objectUtil.extendShape<Pick<z.objectUtil.extendShape<{ id: z.ZodNumber; source: z.ZodEnum<["catalog", "product_template", "warehouse"]>; external_id: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; retail_price: z.ZodString; name: z.ZodString; _links: z.ZodObject<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }, "strip", z.ZodTypeAny, { self?: { href?: string; }; }, { self?: { href?: string; }; }>; }, { source: z.ZodLiteral<"product_template">; product_template_id: z.ZodUnion<[z.ZodNumber, z.ZodString]>; catalog_variant_id: z.ZodNumber; }>, "name" | "source" | "external_id" | "quantity" | "retail_price" | "catalog_variant_id" | "product_template_id">, { store_id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>; }>, "strip", z.ZodTypeAny, { name?: string; store_id?: number; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; }, { name?: string; store_id?: number; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; }>]>; export type CreateOrderItemBody = z.infer<typeof CreateOrderItemBody>; export declare const CreateOrderItemResponse: z.ZodObject<{ data: z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<z.objectUtil.extendShape<{ id: z.ZodNumber; source: z.ZodEnum<["catalog", "product_template", "warehouse"]>; external_id: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; retail_price: z.ZodString; name: z.ZodString; _links: z.ZodObject<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }, "strip", z.ZodTypeAny, { self?: { href?: string; }; }, { self?: { href?: string; }; }>; }, { source: z.ZodLiteral<"warehouse">; warehouse_product_variant_id: z.ZodNumber; }>, "strip", z.ZodTypeAny, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "warehouse"; external_id?: string; quantity?: number; retail_price?: string; warehouse_product_variant_id?: number; }, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "warehouse"; external_id?: string; quantity?: number; retail_price?: string; warehouse_product_variant_id?: number; }>, z.ZodObject<z.objectUtil.extendShape<{ id: z.ZodNumber; source: z.ZodEnum<["catalog", "product_template", "warehouse"]>; external_id: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; retail_price: z.ZodString; name: z.ZodString; _links: z.ZodObject<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }, "strip", z.ZodTypeAny, { self?: { href?: string; }; }, { self?: { href?: string; }; }>; }, { source: z.ZodLiteral<"catalog">; catalog_variant_id: z.ZodNumber; placements: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<Pick<{ placement: z.ZodString; technique: z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>; print_area_width: z.ZodNumber; print_area_height: z.ZodNumber; layers: z.ZodArray<z.ZodObject<{ type: z.ZodString; layer_options: z.ZodArray<z.ZodObject<{ name: z.ZodString; techniques: z.ZodArray<z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>, "many">; type: z.ZodString; values: z.ZodArray<z.ZodUnknown, "many">; }, "strip", z.ZodTypeAny, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }>, "many">; }, "strip", z.ZodTypeAny, { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }, { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }>, "many">; placement_options: z.ZodArray<z.ZodObject<{ name: z.ZodString; techniques: z.ZodArray<z.ZodEnum<["dtg", "digital", "cut-sew", "uv", "embroidery", "sublimation", "dtfilm"]>, "many">; type: z.ZodString; values: z.ZodArray<z.ZodUnknown, "many">; }, "strip", z.ZodTypeAny, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }, { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }>, "many">; conflicting_placements: z.ZodArray<z.ZodString, "many">; }, "placement_options" | "layers" | "placement" | "technique">, { status: z.ZodEnum<["ok", "failed"]>; status_explanation: z.ZodString; }>, "strip", z.ZodTypeAny, { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }, { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }>, "many">; product_options: z.ZodArray<z.ZodObject<{ name: z.ZodEnum<["inside_pocket", "stitch_color", "notes", "lifelike", "custom_border_color", "base_color", "trim_color", "color_reduction_mode"]>; value: z.ZodBoolean; }, "strip", z.ZodTypeAny, { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }, { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }>, "many">; }>, "strip", z.ZodTypeAny, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; }, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; }>, z.ZodObject<z.objectUtil.extendShape<{ id: z.ZodNumber; source: z.ZodEnum<["catalog", "product_template", "warehouse"]>; external_id: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; retail_price: z.ZodString; name: z.ZodString; _links: z.ZodObject<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }, "strip", z.ZodTypeAny, { self?: { href?: string; }; }, { self?: { href?: string; }; }>; }, { source: z.ZodLiteral<"product_template">; product_template_id: z.ZodUnion<[z.ZodNumber, z.ZodString]>; catalog_variant_id: z.ZodNumber; }>, "strip", z.ZodTypeAny, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; }, { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; }>]>, "many">; _links: z.ZodObject<z.objectUtil.extendShape<{ self: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; first: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; last: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; next: z.ZodOptional<z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>>; previous: z.ZodOptional<z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>>; }, { order: z.ZodObject<{ href: z.ZodString; }, "strip", z.ZodTypeAny, { href?: string; }, { href?: string; }>; }>, "strip", z.ZodTypeAny, { self?: { href?: string; }; first?: { href?: string; }; last?: { href?: string; }; next?: { href?: string; }; previous?: { href?: string; }; order?: { href?: string; }; }, { self?: { href?: string; }; first?: { href?: string; }; last?: { href?: string; }; next?: { href?: string; }; previous?: { href?: string; }; order?: { href?: string; }; }>; }, "strip", z.ZodTypeAny, { _links?: { self?: { href?: string; }; first?: { href?: string; }; last?: { href?: string; }; next?: { href?: string; }; previous?: { href?: string; }; order?: { href?: string; }; }; data?: ({ name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "warehouse"; external_id?: string; quantity?: number; retail_price?: string; warehouse_product_variant_id?: number; } | { name?: string; id?: number; _links?: { self?: { href?: string; }; }; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; } | { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; })[]; }, { _links?: { self?: { href?: string; }; first?: { href?: string; }; last?: { href?: string; }; next?: { href?: string; }; previous?: { href?: string; }; order?: { href?: string; }; }; data?: ({ name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "warehouse"; external_id?: string; quantity?: number; retail_price?: string; warehouse_product_variant_id?: number; } | { name?: string; id?: number; _links?: { self?: { href?: string; }; }; placements?: { status?: "failed" | "ok"; placement_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; layers?: { type?: string; layer_options?: { values?: unknown[]; type?: string; name?: string; techniques?: ("dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm")[]; }[]; }[]; placement?: string; technique?: "dtg" | "digital" | "cut-sew" | "uv" | "embroidery" | "sublimation" | "dtfilm"; status_explanation?: string; }[]; source?: "catalog"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_options?: { value?: boolean; name?: "inside_pocket" | "stitch_color" | "notes" | "lifelike" | "custom_border_color" | "base_color" | "trim_color" | "color_reduction_mode"; }[]; } | { name?: string; id?: number; _links?: { self?: { href?: string; }; }; source?: "product_template"; external_id?: string; quantity?: number; retail_price?: string; catalog_variant_id?: number; product_template_id?: string | number; })[]; }>; export type CreateOrderItemResponse = z.infer<typeof CreateOrderItemResponse>;