@selldone/sdk-storefront
Version:
A TypeScript SDK to connect to your shop and build a fully functional storefront and website by simply developing a frontend web application. All backend operations are seamlessly managed by the serverless Selldone solution.
28 lines (27 loc) • 1.36 kB
TypeScript
import { XapiAuthSMS } from "@selldone/sdk-storefront/auth/sms/XapiAuthSMS";
import { Customer } from "@selldone/core-js/models";
import { XapiAuthSMSVerifyOtpTypes } from "@selldone/sdk-storefront/auth/sms/verify-otp/XapiAuthSMSVerifyOtp";
/**
* Initiates the user selection process based on the provided code and source.
*
* @param code - The unique code associated with the user. This can be a string or number.
* @param source - The source from which the login is initiated (e.g., customer, vendor, etc.),
* represented by the Customer.Source enumeration.
*
* @returns A Promise that resolves to an `XapiAuthSMSVerifyOtpTypes.ILoginResponse` object which contains
* information about the login process. This object can include the method of verification
* (specifically, `Method.LOGIN`), an optional token, and the expiration time
* for that token.
*
* @example
* selectUser("1234", Customer.Source.CUSTOMER)
* .then(response => {
* console.log(response.token);
* })
* .catch(error => {
* console.error("Failed to select user:", error);
* });
*
*/
export default function XapiAuthSMSSelectUser(this: XapiAuthSMS, code: string | number, source: Customer.Source | null): Promise<XapiAuthSMSVerifyOtpTypes.ILoginResponse>;
export declare namespace XapiAuthSMSSelectUserTypes { }