import type { AddressLevel } from '../../../../lib/address/types.js'; /** * Shipping-zone REST payload (spec § 3.3, § 3.7, § 3.13 — D-22): * * { name, countries: ['US', 'CA'], regions: [{ country: 'US', level?: 'administrative_area', key: 'US-CA' }] } * * - every country must be a known ISO 3166-1 code; at least one is required; * - every region must belong to one of the zone's countries and be an ACTIVE * key at its level (retired keys are rejected: a zone is live logistics * configuration, unlike a stored address); * - a country outside the merchant's sell-to list is NOT rejected: it comes * back in `warnings` ("intent wins, logistics is flagged"). */ export interface ZoneRegionEntry { country: string; level: AddressLevel; key: string; } export interface NormalizedZonePayload { name: string; countries: string[]; regions: ZoneRegionEntry[]; warnings: string[]; } export declare class ZonePayloadError extends Error { constructor(message: string); } export declare function normalizeZonePayload(body: unknown): Promise;