UNPKG

streambird

Version:
31 lines (30 loc) 1.1 kB
import { AxiosInstance } from "axios"; import { Resource } from "../../Resource"; import { DeviceFingerprint } from "../../shared/DeviceFingerprint"; export declare type OTPLoginOrCreateBySMSRequest = { phoneNumber: string; expiresIn?: number | null; deviceFingerprint?: DeviceFingerprint | null; requiresVerification?: boolean | null; }; export declare type OTPLoginOrCreateBySMSResponse = { phoneNumberId: string; userCreated: boolean; userId: string; status: string; }; export declare type OTPSendBySMSRequest = { phoneNumber: string; expiresIn?: number | null; deviceFingerprint?: DeviceFingerprint | null; requiresVerification?: boolean | null; }; export declare type OTPSendBySMSResponse = { phoneNumberId: string; userId: string; }; export declare class SMS extends Resource<never> { constructor(axiosInstance: AxiosInstance); loginOrCreate(sendRequest: OTPLoginOrCreateBySMSRequest): Promise<OTPLoginOrCreateBySMSResponse>; send(sendRequest: OTPSendBySMSRequest): Promise<OTPSendBySMSResponse>; }