UNPKG

netopia-client

Version:

A fully-typed, TypeScript-based client for the Netopia payments API V2.

204 lines (203 loc) 5.75 kB
import { z } from "zod"; export declare namespace Browser { const Schema: z.ZodObject<{ userAgent: z.ZodString; colorDepth: z.ZodNumber; language: z.ZodString; screenWidth: z.ZodNumber; screenHeight: z.ZodNumber; timeZone: z.ZodString; mobile: z.ZodBoolean; }, "strip", z.ZodTypeAny, { userAgent: string; colorDepth: number; language: string; screenWidth: number; screenHeight: number; timeZone: string; mobile: boolean; }, { userAgent: string; colorDepth: number; language: string; screenWidth: number; screenHeight: number; timeZone: string; mobile: boolean; }>; type Data = z.infer<typeof Schema>; const parse: (data: unknown) => { userAgent: string; colorDepth: number; language: string; screenWidth: number; screenHeight: number; timeZone: string; mobile: boolean; }; } export declare namespace Order { const Schema: z.ZodObject<{ posSignature: z.ZodString; amount: z.ZodNumber; currency: z.ZodDefault<z.ZodString>; orderID: z.ZodString; billing: z.ZodObject<{ firstName: z.ZodString; lastName: z.ZodString; email: z.ZodString; phone: z.ZodString; city: z.ZodOptional<z.ZodString>; country: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { firstName: string; lastName: string; email: string; phone: string; country: number; city?: string | undefined; }, { firstName: string; lastName: string; email: string; phone: string; city?: string | undefined; country?: number | undefined; }>; products: z.ZodArray<z.ZodObject<{ category: z.ZodDefault<z.ZodString>; code: z.ZodDefault<z.ZodString>; name: z.ZodDefault<z.ZodString>; price: z.ZodDefault<z.ZodNumber>; vat: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { code: string; category: string; name: string; price: number; vat: number; }, { code?: string | undefined; category?: string | undefined; name?: string | undefined; price?: number | undefined; vat?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { posSignature: string; amount: number; currency: string; orderID: string; billing: { firstName: string; lastName: string; email: string; phone: string; country: number; city?: string | undefined; }; products: { code: string; category: string; name: string; price: number; vat: number; }[]; }, { posSignature: string; amount: number; orderID: string; billing: { firstName: string; lastName: string; email: string; phone: string; city?: string | undefined; country?: number | undefined; }; products: { code?: string | undefined; category?: string | undefined; name?: string | undefined; price?: number | undefined; vat?: number | undefined; }[]; currency?: string | undefined; }>; type Data = z.infer<typeof Schema>; const parse: (data: unknown) => { posSignature: string; amount: number; currency: string; orderID: string; billing: { firstName: string; lastName: string; email: string; phone: string; country: number; city?: string | undefined; }; products: { code: string; category: string; name: string; price: number; vat: number; }[]; }; } export declare namespace Payment { const Schema: z.ZodObject<{ account: z.ZodString; expMonth: z.ZodNumber; expYear: z.ZodNumber; secretCode: z.ZodString; }, "strip", z.ZodTypeAny, { account: string; expMonth: number; expYear: number; secretCode: string; }, { account: string; expMonth: number; expYear: number; secretCode: string; }>; type Data = z.infer<typeof Schema>; const parse: (data: unknown) => { account: string; expMonth: number; expYear: number; secretCode: string; }; } export declare namespace Product { const Schema: z.ZodObject<{ category: z.ZodDefault<z.ZodString>; code: z.ZodDefault<z.ZodString>; name: z.ZodDefault<z.ZodString>; price: z.ZodDefault<z.ZodNumber>; vat: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { code: string; category: string; name: string; price: number; vat: number; }, { code?: string | undefined; category?: string | undefined; name?: string | undefined; price?: number | undefined; vat?: number | undefined; }>; type Data = z.infer<typeof Schema>; const parse: (data: unknown) => { code: string; category: string; name: string; price: number; vat: number; }; }