UNPKG

@basetime/a2w-api-ts

Version:

Client library that communicates with the addtowallet API.

46 lines (45 loc) 1.5 kB
import { z } from 'zod'; /** * Schema for the barcode types supported by the `/barcodes` endpoint. * * Maps to the [bwip-js](https://github.com/metafloor/bwip-js) symbology IDs accepted by * the backend renderer. `codabar` is a backend alias for `rationalizedCodabar`. */ export declare const BarcodeTypeSchema: z.ZodEnum<{ qrcode: "qrcode"; code128: "code128"; azteccode: "azteccode"; pdf417: "pdf417"; rationalizedCodabar: "rationalizedCodabar"; codabar: "codabar"; }>; /** * The barcode types supported by the `/barcodes` endpoint. */ export type BarcodeType = z.infer<typeof BarcodeTypeSchema>; /** * Schema for input accepted by {@link ../endpoint/BarcodesEndpoint.BarcodesEndpoint.render}. */ export declare const BarcodeRenderInputSchema: z.ZodObject<{ type: z.ZodEnum<{ qrcode: "qrcode"; code128: "code128"; azteccode: "azteccode"; pdf417: "pdf417"; rationalizedCodabar: "rationalizedCodabar"; codabar: "codabar"; }>; data: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; color: z.ZodOptional<z.ZodString>; background: z.ZodOptional<z.ZodString>; }, z.core.$loose>; /** * Input accepted by {@link ../endpoint/BarcodesEndpoint.BarcodesEndpoint.render}. */ export type BarcodeRenderInput = z.infer<typeof BarcodeRenderInputSchema>; /** * Backwards-compatible alias for {@link BarcodeRenderInput}. */ export type Barcode = BarcodeRenderInput;