api.d.ts•3.9 kB
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
import type * as demo from "../demo.js";
import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";
/**
* A utility for referencing Convex functions in your app's API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
declare const fullApi: ApiFromModules<{
demo: typeof demo;
}>;
declare const fullApiWithMounts: typeof fullApi;
export declare const api: FilterApi<
typeof fullApiWithMounts,
FunctionReference<any, "public">
>;
export declare const internal: FilterApi<
typeof fullApiWithMounts,
FunctionReference<any, "internal">
>;
export declare const components: {
resend: {
lib: {
cancelEmail: FunctionReference<
"mutation",
"internal",
{ emailId: string },
null
>;
cleanupAbandonedEmails: FunctionReference<
"mutation",
"internal",
{ olderThan?: number },
null
>;
cleanupOldEmails: FunctionReference<
"mutation",
"internal",
{ olderThan?: number },
null
>;
createManualEmail: FunctionReference<
"mutation",
"internal",
{
from: string;
headers?: Array<{ name: string; value: string }>;
replyTo?: Array<string>;
subject: string;
to: string;
},
string
>;
get: FunctionReference<
"query",
"internal",
{ emailId: string },
{
complained: boolean;
createdAt: number;
errorMessage?: string;
finalizedAt: number;
from: string;
headers?: Array<{ name: string; value: string }>;
html?: string;
opened: boolean;
replyTo: Array<string>;
resendId?: string;
segment: number;
status:
| "waiting"
| "queued"
| "cancelled"
| "sent"
| "delivered"
| "delivery_delayed"
| "bounced"
| "failed";
subject: string;
text?: string;
to: string;
} | null
>;
getStatus: FunctionReference<
"query",
"internal",
{ emailId: string },
{
complained: boolean;
errorMessage: string | null;
opened: boolean;
status:
| "waiting"
| "queued"
| "cancelled"
| "sent"
| "delivered"
| "delivery_delayed"
| "bounced"
| "failed";
} | null
>;
handleEmailEvent: FunctionReference<
"mutation",
"internal",
{ event: any },
null
>;
sendEmail: FunctionReference<
"mutation",
"internal",
{
from: string;
headers?: Array<{ name: string; value: string }>;
html?: string;
options: {
apiKey: string;
initialBackoffMs: number;
onEmailEvent?: { fnHandle: string };
retryAttempts: number;
testMode: boolean;
};
replyTo?: Array<string>;
subject: string;
text?: string;
to: string;
},
string
>;
updateManualEmail: FunctionReference<
"mutation",
"internal",
{
emailId: string;
errorMessage?: string;
resendId?: string;
status:
| "waiting"
| "queued"
| "cancelled"
| "sent"
| "delivered"
| "delivery_delayed"
| "bounced"
| "failed";
},
null
>;
};
};
};