UNPKG

@convex-dev/twilio

Version:

Convex component for sending/receiving SMS messages with Twilio.

340 lines (337 loc) 9.64 kB
/* eslint-disable */ /** * Generated `ComponentApi` utility. * * THIS CODE IS AUTOMATICALLY GENERATED. * * To regenerate, run `npx convex dev`. * @module */ import type { FunctionReference } from "convex/server"; /** * A utility for referencing a Convex component's exposed API. * * Useful when expecting a parameter like `components.myComponent`. * Usage: * ```ts * async function myFunction(ctx: QueryCtx, component: ComponentApi) { * return ctx.runQuery(component.someFile.someQuery, { ...args }); * } * ``` */ export type ComponentApi<Name extends string | undefined = string | undefined> = { messages: { create: FunctionReference< "action", "internal", { account_sid: string; auth_token: string; body: string; callback?: string; from: string; status_callback: string; to: string; }, { account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }, Name >; getByCounterparty: FunctionReference< "query", "internal", { account_sid: string; counterparty: string; limit?: number }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; getBySid: FunctionReference< "query", "internal", { account_sid: string; sid: string }, { account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; } | null, Name >; getFrom: FunctionReference< "query", "internal", { account_sid: string; from: string; limit?: number }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; getFromTwilioBySidAndInsert: FunctionReference< "action", "internal", { account_sid: string; auth_token: string; incomingMessageCallback?: string; sid: string; }, { account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }, Name >; getTo: FunctionReference< "query", "internal", { account_sid: string; limit?: number; to: string }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; list: FunctionReference< "query", "internal", { account_sid: string; limit?: number }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; listIncoming: FunctionReference< "query", "internal", { account_sid: string; limit?: number }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; listOutgoing: FunctionReference< "query", "internal", { account_sid: string; limit?: number }, Array<{ account_sid: string; api_version: string; body: string; counterparty?: string; date_created: string; date_sent: string | null; date_updated: string | null; direction: string; error_code: number | null; error_message: string | null; from: string; messaging_service_sid: string | null; num_media: string; num_segments: string; price: string | null; price_unit: string | null; rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; to: string; uri: string; }>, Name >; updateStatus: FunctionReference< "mutation", "internal", { account_sid: string; sid: string; status: string }, null, Name >; }; phone_numbers: { create: FunctionReference< "action", "internal", { account_sid: string; auth_token: string; number: string }, any, Name >; updateSmsUrl: FunctionReference< "action", "internal", { account_sid: string; auth_token: string; sid: string; sms_url: string; }, any, Name >; }; };