UNPKG

@pfantato/printful-ts

Version:

Typescript SDK to integrate with Printful

660 lines (659 loc) 22.7 kB
import { z } from 'zod'; export declare const CalculateShippingRatesBody: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{ recipient: z.ZodObject<{ name: z.ZodString; company: z.ZodString; address1: z.ZodString; address2: z.ZodString; city: z.ZodString; state_code: z.ZodString; state_name: z.ZodString; country_code: z.ZodString; country_name: z.ZodString; zip: z.ZodString; phone: z.ZodString; email: z.ZodString; tax_number: z.ZodString; }, "strip", z.ZodTypeAny, { email?: string; name?: string; company?: string; address1?: string; address2?: string; city?: string; state_code?: string; state_name?: string; country_code?: string; country_name?: string; zip?: string; phone?: string; tax_number?: string; }, { email?: string; name?: string; company?: string; address1?: string; address2?: string; city?: string; state_code?: string; state_name?: string; country_code?: string; country_name?: string; zip?: string; phone?: string; tax_number?: string; }>; order_items: 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">; currency: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>; }, { store_id: z.ZodOptional<z.ZodNumber>; }>, { locale: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }>, z.UnknownKeysParam, z.ZodTypeAny, { locale?: string; store_id?: number; currency?: string; recipient?: { email?: string; name?: string; company?: string; address1?: string; address2?: string; city?: string; state_code?: string; state_name?: string; country_code?: string; country_name?: string; zip?: string; phone?: string; tax_number?: string; }; order_items?: ({ 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; })[]; }, { locale?: string; store_id?: number; currency?: string; recipient?: { email?: string; name?: string; company?: string; address1?: string; address2?: string; city?: string; state_code?: string; state_name?: string; country_code?: string; country_name?: string; zip?: string; phone?: string; tax_number?: string; }; order_items?: ({ 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 CalculateShippingRatesBody = z.infer<typeof CalculateShippingRatesBody>; export declare const CalculateShippingRatesResponse: z.ZodObject<{ data: z.ZodObject<{ shipping: z.ZodString; shipping_method_name: z.ZodString; rate: z.ZodString; currency: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>; min_delivery_days: z.ZodOptional<z.ZodNumber>; max_delivery_days: z.ZodOptional<z.ZodNumber>; min_delivery_date: z.ZodOptional<z.ZodString>; max_delivery_date: z.ZodOptional<z.ZodString>; shipments: z.ZodArray<z.ZodObject<{ departure_country: z.ZodNullable<z.ZodString>; shipment_items: z.ZodArray<z.ZodObject<{ catalog_variant_id: z.ZodNumber; quantity: z.ZodNumber; }, "strip", z.ZodTypeAny, { quantity?: number; catalog_variant_id?: number; }, { quantity?: number; catalog_variant_id?: number; }>, "many">; custom_fees_possible: z.ZodBoolean; }, "strip", z.ZodTypeAny, { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }, { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }>, "many">; }, "strip", z.ZodTypeAny, { currency?: string; shipping?: string; shipments?: { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }[]; shipping_method_name?: string; rate?: string; min_delivery_days?: number; max_delivery_days?: number; min_delivery_date?: string; max_delivery_date?: string; }, { currency?: string; shipping?: string; shipments?: { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }[]; shipping_method_name?: string; rate?: string; min_delivery_days?: number; max_delivery_days?: number; min_delivery_date?: string; max_delivery_date?: string; }>; }, "strip", z.ZodTypeAny, { data?: { currency?: string; shipping?: string; shipments?: { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }[]; shipping_method_name?: string; rate?: string; min_delivery_days?: number; max_delivery_days?: number; min_delivery_date?: string; max_delivery_date?: string; }; }, { data?: { currency?: string; shipping?: string; shipments?: { shipment_items?: { quantity?: number; catalog_variant_id?: number; }[]; departure_country?: string; custom_fees_possible?: boolean; }[]; shipping_method_name?: string; rate?: string; min_delivery_days?: number; max_delivery_days?: number; min_delivery_date?: string; max_delivery_date?: string; }; }>; export type CalculateShippingRatesResponse = z.infer<typeof CalculateShippingRatesResponse>;