amazon-seller-mcp
Version:
Model Context Protocol (MCP) client for Amazon Selling Partner API
1,161 lines (1,160 loc) • 40.3 kB
TypeScript
/**
* Runtime validation functions using Zod schemas for Amazon API types
*/
import { z } from 'zod';
import type { AmazonCatalogItem, AmazonListingsItem, AmazonInventorySummary, AmazonOrder, AmazonReport, InventoryFilterParams, OrdersFilterParams, ReportsFilterParams } from './amazon-api.js';
/**
* Custom error class for type validation failures
*/
export declare class TypeValidationError extends Error {
readonly typeName: string;
readonly validationErrors: z.ZodError;
constructor(message: string, typeName: string, validationErrors: z.ZodError);
}
/**
* Zod schema for Amazon item attributes
* Supports both Amazon API format (arrays) and legacy format (simple strings)
*/
export declare const AmazonItemAttributesSchema: z.ZodObject<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, z.objectOutputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">, z.objectInputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">>;
/**
* Zod schema for Amazon item identifiers
*/
export declare const AmazonItemIdentifiersSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
identifier: z.ZodString;
identifierType: z.ZodString;
marketplaceId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}>, "many">>;
/**
* Zod schema for Amazon item relationships
*/
export declare const AmazonItemRelationshipsSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
type: z.ZodString;
identifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
identifier: z.ZodString;
identifierType: z.ZodString;
}, "strip", z.ZodTypeAny, {
identifier: string;
identifierType: string;
}, {
identifier: string;
identifierType: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}>, "many">>;
/**
* Zod schema for Amazon catalog item
*/
export declare const AmazonCatalogItemSchema: z.ZodObject<{
asin: z.ZodString;
attributes: z.ZodOptional<z.ZodObject<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, z.objectOutputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">, z.objectInputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">>>;
identifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
identifier: z.ZodString;
identifierType: z.ZodString;
marketplaceId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}>, "many">>>;
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
type: z.ZodString;
identifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
identifier: z.ZodString;
identifierType: z.ZodString;
}, "strip", z.ZodTypeAny, {
identifier: string;
identifierType: string;
}, {
identifier: string;
identifierType: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}>, "many">>>;
salesRanks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
rank: z.ZodNumber;
title: z.ZodString;
}, "strip", z.ZodTypeAny, {
title: string;
rank: number;
}, {
title: string;
rank: number;
}>, "many">>>;
}, "strip", z.ZodTypeAny, {
asin: string;
attributes?: z.objectOutputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip"> | undefined;
identifiers?: Record<string, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}[]> | undefined;
relationships?: Record<string, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}[]> | undefined;
salesRanks?: Record<string, {
title: string;
rank: number;
}[]> | undefined;
}, {
asin: string;
attributes?: z.objectInputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip"> | undefined;
identifiers?: Record<string, {
identifier: string;
identifierType: string;
marketplaceId?: string | undefined;
}[]> | undefined;
relationships?: Record<string, {
type: string;
identifiers?: {
identifier: string;
identifierType: string;
}[] | undefined;
}[]> | undefined;
salesRanks?: Record<string, {
title: string;
rank: number;
}[]> | undefined;
}>;
/**
* Zod schema for Amazon listings item
*/
export declare const AmazonListingsItemSchema: z.ZodObject<{
sku: z.ZodString;
productType: z.ZodString;
attributes: z.ZodObject<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, z.objectOutputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">, z.objectInputType<{
item_name: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">>;
brand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
value: z.ZodString;
language_tag: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
language_tag: string;
}, {
value: string;
language_tag: string;
}>, "many">]>>;
list_price: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodNumber;
currency: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: number;
currency: string;
}, {
value: number;
currency: string;
}>, "many">>;
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
length: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
weight: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}, {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
}>>;
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
variant: z.ZodString;
link: z.ZodString;
}, "strip", z.ZodTypeAny, {
link: string;
variant: string;
}, {
link: string;
variant: string;
}>, "many">>;
}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>, "strip">>;
status: z.ZodOptional<z.ZodString>;
fulfillmentAvailability: z.ZodOptional<z.ZodArray<z.ZodObject<{
fulfillmentChannelCode: z.ZodString;
quantity: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
fulfillmentChannelCode: string;
quantity?: number | undefined;
}, {
fulfillmentChannelCode: string;
quantity?: number | undefined;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
sku: string;
attributes: {
title?: string | undefined;
description?: string | undefined;
item_name?: {
value: string;
language_tag: string;
}[] | undefined;
brand?: string | {
value: string;
language_tag: string;
}[] | undefined;
list_price?: {
value: number;
currency: string;
}[] | undefined;
dimensions?: {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
} | undefined;
images?: {
link: string;
variant: string;
}[] | undefined;
} & {
[k: string]: string | number | boolean | unknown[] | {} | undefined;
};
productType: string;
status?: string | undefined;
fulfillmentAvailability?: {
fulfillmentChannelCode: string;
quantity?: number | undefined;
}[] | undefined;
}, {
sku: string;
attributes: {
title?: string | undefined;
description?: string | undefined;
item_name?: {
value: string;
language_tag: string;
}[] | undefined;
brand?: string | {
value: string;
language_tag: string;
}[] | undefined;
list_price?: {
value: number;
currency: string;
}[] | undefined;
dimensions?: {
length?: number | undefined;
width?: number | undefined;
height?: number | undefined;
weight?: number | undefined;
} | undefined;
images?: {
link: string;
variant: string;
}[] | undefined;
} & {
[k: string]: string | number | boolean | unknown[] | {} | undefined;
};
productType: string;
status?: string | undefined;
fulfillmentAvailability?: {
fulfillmentChannelCode: string;
quantity?: number | undefined;
}[] | undefined;
}>;
/**
* Zod schema for Amazon inventory summary
*/
export declare const AmazonInventorySummarySchema: z.ZodObject<{
asin: z.ZodOptional<z.ZodString>;
sellerSku: z.ZodOptional<z.ZodString>;
condition: z.ZodOptional<z.ZodString>;
inventoryDetails: z.ZodOptional<z.ZodObject<{
fulfillableQuantity: z.ZodOptional<z.ZodNumber>;
inboundWorkingQuantity: z.ZodOptional<z.ZodNumber>;
inboundShippedQuantity: z.ZodOptional<z.ZodNumber>;
inboundReceivingQuantity: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
fulfillableQuantity?: number | undefined;
inboundWorkingQuantity?: number | undefined;
inboundShippedQuantity?: number | undefined;
inboundReceivingQuantity?: number | undefined;
}, {
fulfillableQuantity?: number | undefined;
inboundWorkingQuantity?: number | undefined;
inboundShippedQuantity?: number | undefined;
inboundReceivingQuantity?: number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
asin?: string | undefined;
sellerSku?: string | undefined;
condition?: string | undefined;
inventoryDetails?: {
fulfillableQuantity?: number | undefined;
inboundWorkingQuantity?: number | undefined;
inboundShippedQuantity?: number | undefined;
inboundReceivingQuantity?: number | undefined;
} | undefined;
}, {
asin?: string | undefined;
sellerSku?: string | undefined;
condition?: string | undefined;
inventoryDetails?: {
fulfillableQuantity?: number | undefined;
inboundWorkingQuantity?: number | undefined;
inboundShippedQuantity?: number | undefined;
inboundReceivingQuantity?: number | undefined;
} | undefined;
}>;
/**
* Zod schema for Amazon order
*/
export declare const AmazonOrderSchema: z.ZodObject<{
amazonOrderId: z.ZodString;
purchaseDate: z.ZodString;
orderStatus: z.ZodString;
orderTotal: z.ZodOptional<z.ZodObject<{
currencyCode: z.ZodString;
amount: z.ZodString;
}, "strip", z.ZodTypeAny, {
currencyCode: string;
amount: string;
}, {
currencyCode: string;
amount: string;
}>>;
marketplaceId: z.ZodString;
shippingAddress: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
addressLine1: z.ZodOptional<z.ZodString>;
addressLine2: z.ZodOptional<z.ZodString>;
city: z.ZodOptional<z.ZodString>;
stateOrRegion: z.ZodOptional<z.ZodString>;
postalCode: z.ZodOptional<z.ZodString>;
countryCode: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name?: string | undefined;
addressLine2?: string | undefined;
addressLine1?: string | undefined;
city?: string | undefined;
stateOrRegion?: string | undefined;
postalCode?: string | undefined;
countryCode?: string | undefined;
}, {
name?: string | undefined;
addressLine2?: string | undefined;
addressLine1?: string | undefined;
city?: string | undefined;
stateOrRegion?: string | undefined;
postalCode?: string | undefined;
countryCode?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
marketplaceId: string;
amazonOrderId: string;
purchaseDate: string;
orderStatus: string;
orderTotal?: {
currencyCode: string;
amount: string;
} | undefined;
shippingAddress?: {
name?: string | undefined;
addressLine2?: string | undefined;
addressLine1?: string | undefined;
city?: string | undefined;
stateOrRegion?: string | undefined;
postalCode?: string | undefined;
countryCode?: string | undefined;
} | undefined;
}, {
marketplaceId: string;
amazonOrderId: string;
purchaseDate: string;
orderStatus: string;
orderTotal?: {
currencyCode: string;
amount: string;
} | undefined;
shippingAddress?: {
name?: string | undefined;
addressLine2?: string | undefined;
addressLine1?: string | undefined;
city?: string | undefined;
stateOrRegion?: string | undefined;
postalCode?: string | undefined;
countryCode?: string | undefined;
} | undefined;
}>;
/**
* Zod schema for Amazon report
*/
export declare const AmazonReportSchema: z.ZodObject<{
reportId: z.ZodString;
reportType: z.ZodString;
processingStatus: z.ZodString;
createdTime: z.ZodString;
reportDocumentId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
reportType: string;
reportId: string;
processingStatus: string;
createdTime: string;
reportDocumentId?: string | undefined;
}, {
reportType: string;
reportId: string;
processingStatus: string;
createdTime: string;
reportDocumentId?: string | undefined;
}>;
/**
* Zod schema for inventory filter parameters
*/
export declare const InventoryFilterParamsSchema: z.ZodObject<{
nextToken: z.ZodOptional<z.ZodString>;
granularityType: z.ZodOptional<z.ZodString>;
granularityId: z.ZodOptional<z.ZodString>;
startDateTime: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
endDateTime: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
marketplaceIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
sellerSkus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
asins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
fulfillmentChannels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
sellerSkus?: string[] | undefined;
asins?: string[] | undefined;
fulfillmentChannels?: string[] | undefined;
startDateTime?: string | Date | undefined;
endDateTime?: string | Date | undefined;
nextToken?: string | undefined;
marketplaceIds?: string[] | undefined;
granularityType?: string | undefined;
granularityId?: string | undefined;
}, {
sellerSkus?: string[] | undefined;
asins?: string[] | undefined;
fulfillmentChannels?: string[] | undefined;
startDateTime?: string | Date | undefined;
endDateTime?: string | Date | undefined;
nextToken?: string | undefined;
marketplaceIds?: string[] | undefined;
granularityType?: string | undefined;
granularityId?: string | undefined;
}>;
/**
* Zod schema for orders filter parameters
*/
export declare const OrdersFilterParamsSchema: z.ZodObject<{
nextToken: z.ZodOptional<z.ZodString>;
marketplaceIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
createdAfter: z.ZodOptional<z.ZodString>;
createdBefore: z.ZodOptional<z.ZodString>;
orderStatuses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
fulfillmentChannels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
buyerEmail: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
fulfillmentChannels?: string[] | undefined;
nextToken?: string | undefined;
createdAfter?: string | undefined;
createdBefore?: string | undefined;
orderStatuses?: string[] | undefined;
buyerEmail?: string | undefined;
marketplaceIds?: string[] | undefined;
}, {
fulfillmentChannels?: string[] | undefined;
nextToken?: string | undefined;
createdAfter?: string | undefined;
createdBefore?: string | undefined;
orderStatuses?: string[] | undefined;
buyerEmail?: string | undefined;
marketplaceIds?: string[] | undefined;
}>;
/**
* Zod schema for reports filter parameters
*/
export declare const ReportsFilterParamsSchema: z.ZodObject<{
nextToken: z.ZodOptional<z.ZodString>;
reportTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
processingStatuses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
marketplaceIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
createdSince: z.ZodOptional<z.ZodString>;
createdUntil: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
nextToken?: string | undefined;
marketplaceIds?: string[] | undefined;
reportTypes?: string[] | undefined;
processingStatuses?: string[] | undefined;
createdSince?: string | undefined;
createdUntil?: string | undefined;
}, {
nextToken?: string | undefined;
marketplaceIds?: string[] | undefined;
reportTypes?: string[] | undefined;
processingStatuses?: string[] | undefined;
createdSince?: string | undefined;
createdUntil?: string | undefined;
}>;
/**
* Validates Amazon catalog item data
*/
export declare function validateAmazonCatalogItem(data: unknown): AmazonCatalogItem;
/**
* Validates Amazon listings item data
*/
export declare function validateAmazonListingsItem(data: unknown): AmazonListingsItem;
/**
* Validates Amazon inventory summary data
*/
export declare function validateAmazonInventorySummary(data: unknown): AmazonInventorySummary;
/**
* Validates Amazon order data
*/
export declare function validateAmazonOrder(data: unknown): AmazonOrder;
/**
* Validates Amazon report data
*/
export declare function validateAmazonReport(data: unknown): AmazonReport;
/**
* Validates inventory filter parameters
*/
export declare function validateInventoryFilterParams(data: unknown): InventoryFilterParams;
/**
* Validates orders filter parameters
*/
export declare function validateOrdersFilterParams(data: unknown): OrdersFilterParams;
/**
* Validates reports filter parameters
*/
export declare function validateReportsFilterParams(data: unknown): ReportsFilterParams;