@phonecheck/phone-number-validator-js
Version:
Validate, parse, and enrich international phone numbers — geocoding, carrier lookup, and timezone resolution. Sync (Node) + async (serverless) APIs, platform adapters, and a CLI.
23 lines (22 loc) • 807 B
TypeScript
export interface GcpRequest {
method: string;
path?: string;
url?: string;
query?: Record<string, string | string[] | undefined>;
body?: unknown;
headers?: Record<string, string | string[] | undefined>;
}
export interface GcpResponse {
status(code: number): GcpResponse;
set(headers: Record<string, string>): GcpResponse;
json(body: unknown): GcpResponse;
send(body?: unknown): GcpResponse;
}
export declare function gcpHandler(req: GcpRequest, res: GcpResponse): Promise<void>;
/** Single-route convenience — infers single vs. batch from the body. */
export declare function gcpFunction(req: GcpRequest, res: GcpResponse): Promise<void>;
declare const _default: {
gcpHandler: typeof gcpHandler;
gcpFunction: typeof gcpFunction;
};
export default _default;