gpudeploy
Version:
Utilities for creating APIs
27 lines (26 loc) • 760 B
TypeScript
import { APIAdapterParams } from "./APIBase";
declare namespace Email {
type BeginVerificationParams = {
email: string;
type: "auth";
};
type BeginVerificationReturn = {
expiresAt: Date;
id: string;
resendableAt: Date;
};
type CompleteVerificationParams = {
code: string;
id: string;
};
type CompleteVerificationReturn = {
token: string;
};
class Adapter {
private api;
constructor({ api }: APIAdapterParams);
beginVerification(data: BeginVerificationParams): Promise<BeginVerificationReturn>;
completeVerification({ id, ...data }: CompleteVerificationParams): Promise<CompleteVerificationReturn>;
}
}
export default Email;