streambird
Version:
Node.js library for the Streambird API
28 lines (27 loc) • 924 B
TypeScript
import { AxiosInstance } from "axios";
import { Resource } from "../../Resource";
import { DeviceFingerprint } from "../../shared/DeviceFingerprint";
import { MethodType } from "../../shared/Enums";
import { Session } from "../../shared/Session";
import { Email } from "./Email";
import { SMS } from "./SMS";
export declare type OTPVerifyRequest = {
otp: string;
methodId: string;
sessionExpiresIn?: number | null;
deviceFingerprint?: DeviceFingerprint | null;
};
export declare type OTPVerifyResponse = {
userId: string;
methodId: string;
methodType: MethodType;
sessionToken?: string;
sessionJwt?: string;
session?: Session;
};
export declare class OTPs extends Resource<never> {
readonly email: Email;
readonly sms: SMS;
constructor(axiosInstance: AxiosInstance);
verify(otpVerifyRequest: OTPVerifyRequest): Promise<OTPVerifyResponse>;
}