UNPKG

@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.

35 lines 1.53 kB
/* * Copyright (c) 2023. Selldone® Business OS™ * * Author: M.Pajuhaan * Web: https://selldone.com * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ * * All rights reserved. In the weave of time, where traditions and innovations intermingle, this content was crafted. * From the essence of thought, through the corridors of creativity, each word, and sentiment has been molded. * Not just to exist, but to inspire. Like an artist's stroke or a sculptor's chisel, every nuance is deliberate. * Our journey is not just about reaching a destination, but about creating a masterpiece. * Tread carefully, for you're treading on dreams. */ import { APIAbstract } from "@selldone/core-js/server/APIAbstract"; import { XapiAuthSMS } from "./sms/XapiAuthSMS"; import { XapiAuthEmail } from "@selldone/sdk-storefront/auth/email/XapiAuthEmail"; export class XapiAuth extends APIAbstract { shop_name; sms; email; constructor(shop_name) { super(); this.shop_name = shop_name; this.sms = new XapiAuthSMS(this.shop_name); this.email = new XapiAuthEmail(this.shop_name); } logout() { const url = window.XAPI.LOGOUT(this.shop_name); return this.postNow(url, null).then((data) => { window.$storefront.USER = null; // Clear user info from sdk! return data; // Pass data! }); } } //# sourceMappingURL=XapiAuth.js.map