import { MetaDetail } from '../types/orders-fbs.types'; /** * Parsed payload extracted from a MetaValidationFailError or a compatible plain object. */ export interface MetaValidationFailPayload { code: string; message: string; metaDetails: MetaDetail[]; } /** * Extracts marking-code validation failure details from an unknown caught value. * * Useful in shared error boundaries (e.g. middleware, global catch handlers) that * cannot import `MetaValidationFailError` directly but still want typed access to * the `metaDetails` array. * * Returns `null` for any input that is not a 409 meta-validation failure. * * @param err - The value caught in a `catch` block (typically `unknown`) * @returns Parsed payload `{ code, message, metaDetails }` or `null` * * @since 3.15.0 * * @example Using in a shared error boundary * ```typescript * import { parseMetaValidationFail } from 'daytona-wildberries-typescript-sdk'; * * async function deliverSupply(supplyId: string) { * try { * await sdk.ordersFBS.updateSuppliesDeliver(supplyId); * } catch (err) { * const parsed = parseMetaValidationFail(err); * if (parsed) { * // Typed access without importing MetaValidationFailError * parsed.metaDetails * .filter(d => d.decision === 'invalid') * .forEach(d => console.error(`Invalid code for ${d.key}: "${d.value}"`)); * return; * } * throw err; * } * } * ``` */ export declare function parseMetaValidationFail(err: unknown): MetaValidationFailPayload | null; //# sourceMappingURL=parseMetaValidationFail.d.ts.map