22 lines
911 B
TypeScript
22 lines
911 B
TypeScript
import { z } from 'zod';
|
|
/** Strip spaces, uppercase */
|
|
export declare function normalizePostalCode(raw: string): string;
|
|
/** Validate Canadian postal code (all provinces) */
|
|
export declare function isValidCanadianPostalCode(code: string): boolean;
|
|
export declare const postalCodeParamSchema: z.ZodObject<{
|
|
postalCode: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
}, "strip", z.ZodTypeAny, {
|
|
postalCode: string;
|
|
}, {
|
|
postalCode: string;
|
|
}>;
|
|
export declare const postalCodeQuerySchema: z.ZodObject<{
|
|
refresh: z.ZodDefault<z.ZodOptional<z.ZodEnum<["true", "false"]>>>;
|
|
}, "strip", z.ZodTypeAny, {
|
|
refresh: "false" | "true";
|
|
}, {
|
|
refresh?: "false" | "true" | undefined;
|
|
}>;
|
|
export type PostalCodeParam = z.infer<typeof postalCodeParamSchema>;
|
|
export type PostalCodeQuery = z.infer<typeof postalCodeQuerySchema>;
|
|
//# sourceMappingURL=postal-codes.schemas.d.ts.map
|