@convex-dev/twilio
Version:
Convex component for sending/receiving SMS messages with Twilio.
13 lines • 536 B
TypeScript
import type { Validator, Infer } from "convex/values";
export declare const twilioRequest: (path: string, account_sid: string, auth_token: string, body: Record<string, string>, method?: "POST" | "GET") => Promise<any>;
/**
* Generic function to attempt parsing with proper TypeScript type narrowing
*/
export declare function attemptToParse<T extends Validator<any, any, any>>(validator: T, value: unknown): {
kind: "success";
data: Infer<T>;
} | {
kind: "error";
error: unknown;
};
//# sourceMappingURL=utils.d.ts.map