@pfantato/printful-ts
Version:
Typescript SDK to integrate with Printful
308 lines (307 loc) • 8.99 kB
TypeScript
import { z } from 'zod';
export declare const MeasurementValue: z.ZodUnion<[z.ZodObject<{
size: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value?: string;
size?: string;
}, {
value?: string;
size?: string;
}>, z.ZodObject<{
size: z.ZodString;
min_value: z.ZodString;
max_value: z.ZodString;
}, "strip", z.ZodTypeAny, {
size?: string;
min_value?: string;
max_value?: string;
}, {
size?: string;
min_value?: string;
max_value?: string;
}>]>;
export type MeasurementValue = z.infer<typeof MeasurementValue>;
export declare const Measurement: z.ZodObject<{
type_label: z.ZodString;
unit: z.ZodEnum<["inches", "cm"]>;
values: z.ZodArray<z.ZodUnion<[z.ZodObject<{
size: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value?: string;
size?: string;
}, {
value?: string;
size?: string;
}>, z.ZodObject<{
size: z.ZodString;
min_value: z.ZodString;
max_value: z.ZodString;
}, "strip", z.ZodTypeAny, {
size?: string;
min_value?: string;
max_value?: string;
}, {
size?: string;
min_value?: string;
max_value?: string;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}>;
export type Measurement = z.infer<typeof Measurement>;
export declare const SizeType: z.ZodEnum<["measure_yourself", "product_measure", "international"]>;
export type SizeType = z.infer<typeof SizeType>;
export declare const SizeTable: z.ZodObject<{
type: z.ZodEnum<["measure_yourself", "product_measure", "international"]>;
unit: z.ZodEnum<["inches", "cm"]>;
description: z.ZodString;
image_url: z.ZodString;
image_description: z.ZodString;
measurements: z.ZodArray<z.ZodObject<{
type_label: z.ZodString;
unit: z.ZodEnum<["inches", "cm"]>;
values: z.ZodArray<z.ZodUnion<[z.ZodObject<{
size: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value?: string;
size?: string;
}, {
value?: string;
size?: string;
}>, z.ZodObject<{
size: z.ZodString;
min_value: z.ZodString;
max_value: z.ZodString;
}, "strip", z.ZodTypeAny, {
size?: string;
min_value?: string;
max_value?: string;
}, {
size?: string;
min_value?: string;
max_value?: string;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}>, "many">;
}, "strip", z.ZodTypeAny, {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}, {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}>;
export type SizeTable = z.infer<typeof SizeTable>;
export declare const ProductSizeGuide: z.ZodObject<{
catalog_product_id: z.ZodNumber;
available_sizes: z.ZodArray<z.ZodString, "many">;
size_tables: z.ZodArray<z.ZodObject<{
type: z.ZodEnum<["measure_yourself", "product_measure", "international"]>;
unit: z.ZodEnum<["inches", "cm"]>;
description: z.ZodString;
image_url: z.ZodString;
image_description: z.ZodString;
measurements: z.ZodArray<z.ZodObject<{
type_label: z.ZodString;
unit: z.ZodEnum<["inches", "cm"]>;
values: z.ZodArray<z.ZodUnion<[z.ZodObject<{
size: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value?: string;
size?: string;
}, {
value?: string;
size?: string;
}>, z.ZodObject<{
size: z.ZodString;
min_value: z.ZodString;
max_value: z.ZodString;
}, "strip", z.ZodTypeAny, {
size?: string;
min_value?: string;
max_value?: string;
}, {
size?: string;
min_value?: string;
max_value?: string;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}, {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}>, "many">;
}, "strip", z.ZodTypeAny, {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}, {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}>, "many">;
}, "strip", z.ZodTypeAny, {
catalog_product_id?: number;
available_sizes?: string[];
size_tables?: {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}[];
}, {
catalog_product_id?: number;
available_sizes?: string[];
size_tables?: {
type?: "measure_yourself" | "product_measure" | "international";
description?: string;
image_url?: string;
unit?: "inches" | "cm";
image_description?: string;
measurements?: {
values?: ({
value?: string;
size?: string;
} | {
size?: string;
min_value?: string;
max_value?: string;
})[];
type_label?: string;
unit?: "inches" | "cm";
}[];
}[];
}>;
export type ProductSizeGuide = z.infer<typeof ProductSizeGuide>;