streambird
Version:
Node.js library for the Streambird API
30 lines (29 loc) • 1.06 kB
TypeScript
import { AxiosInstance } from "axios";
import { Resource } from "../../Resource";
import { DeviceFingerprint } from "../../shared/DeviceFingerprint";
export declare type OTPLoginOrCreateByEmailRequest = {
email: string;
expiresIn?: number | null;
deviceFingerprint?: DeviceFingerprint | null;
requiresVerification?: boolean | false;
};
export declare type OTPLoginOrCreateByEmailResponse = {
emailId: string;
userCreated: boolean;
userId: string;
status: string;
};
export declare type OTPSendByEmailRequest = {
email: string;
expiresIn?: number | null;
deviceFingerprint?: DeviceFingerprint | null;
};
export declare type OTPSendByEmailResponse = {
emailId: string;
userId: string;
};
export declare class Email extends Resource<never> {
constructor(axiosInstance: AxiosInstance);
loginOrCreate(loginOrCreateRequest: OTPLoginOrCreateByEmailRequest): Promise<OTPLoginOrCreateByEmailResponse>;
send(sendRequest: OTPSendByEmailRequest): Promise<OTPSendByEmailResponse>;
}