@getsupertab/supertab-js 3.68.0 → 3.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3657,7 +3657,7 @@ var { VITE_STATIC_REDIRECT_URI: Xe, VITE_GTM_CONTAINER_ID: Ze, VITE_SENTRY_DSN:
3657
3657
  VITE_STATIC_REDIRECT_URI: void 0,
3658
3658
  VITE_GTM_CONTAINER_ID: "GTM-NG9GT7FM",
3659
3659
  VITE_SENTRY_DSN: "https://d08f3f301f364ceba6345c393c538faf@o23455.ingest.us.sentry.io/4507736861573120",
3660
- VITE_BASE_URL: "https://js.supertab.co/v3.68.0/",
3660
+ VITE_BASE_URL: "https://js.supertab.co/v3.69.0/",
3661
3661
  VITE_DEMO_CLIENT_ID: void 0,
3662
3662
  VITE_API_BASE_URL: void 0,
3663
3663
  VITE_SSO_BASE_URL: void 0,
@@ -3666,7 +3666,7 @@ var { VITE_STATIC_REDIRECT_URI: Xe, VITE_GTM_CONTAINER_ID: Ze, VITE_SENTRY_DSN:
3666
3666
  VITE_CHECKOUT_URL: void 0,
3667
3667
  TAPPER_ENV: "prod",
3668
3668
  PACKAGE_NAME: "@getsupertab/supertab-js",
3669
- PACKAGE_VERSION: "3.68.0",
3669
+ PACKAGE_VERSION: "3.69.0",
3670
3670
  MONETIZATION_PROVIDER_SCRIPT_URL: void 0,
3671
3671
  VITE_POSTHOG_API_HOST: void 0,
3672
3672
  VITE_POSTHOG_API_KEY: void 0
@@ -1,5 +1,5 @@
1
1
  import { a as e } from "./chunk-C5e3QaDY.js";
2
- import { T as t, d as n, n as r, r as i, t as a } from "./env-DIlw1Eak.js";
2
+ import { T as t, d as n, n as r, r as i, t as a } from "./env-DeLiGYY1.js";
3
3
  //#region node_modules/@sentry/core/build/esm/debug-build.js
4
4
  var o = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, s = globalThis, c = "10.51.0";
5
5
  //#endregion
@@ -359,8 +359,9 @@ declare class CheckoutClient {
359
359
  apiConfig: Configuration;
360
360
  private checkoutWindow;
361
361
  constructor(apiConfig: Configuration);
362
- start({ checkoutUrl }: {
362
+ start({ checkoutUrl, whiteLabel, }: {
363
363
  checkoutUrl: string;
364
+ whiteLabel?: boolean;
364
365
  }): Promise<boolean>;
365
366
  _openCheckoutWindow(): Window | null;
366
367
  _destroyCheckoutWindow(): void;
@@ -1,9 +1,9 @@
1
1
  import { a as e, i as t, n, r, t as i } from "./chunk-C5e3QaDY.js";
2
- import { C as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, o as y, p as b, r as x, s as S, u as C, v as w, w as T, x as E, y as D } from "./env-DIlw1Eak.js";
2
+ import { C as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, o as y, p as b, r as x, s as S, u as C, v as w, w as T, x as E, y as D } from "./env-DeLiGYY1.js";
3
3
  //#region src/capture-errors.ts
4
4
  var O = /* @__PURE__ */ e(s(), 1), k = async (e) => {
5
5
  if (f) {
6
- let { captureException: t } = await import("./sentry-CMqKxuCJ.js");
6
+ let { captureException: t } = await import("./sentry-DtylyMWV.js");
7
7
  t(e);
8
8
  }
9
9
  }, A = x === "ctl" || x === "sbx" || x === "stg" ? !0 : x === "prod" && typeof window < "u" && window.location ? new URLSearchParams(window.location.search).has("supertab-enable-logging") : !1, j = {
@@ -7796,22 +7796,22 @@ var mu = class {
7796
7796
  constructor(e) {
7797
7797
  this.apiConfig = e;
7798
7798
  }
7799
- async start({ checkoutUrl: e }) {
7799
+ async start({ checkoutUrl: e, whiteLabel: t = !1 }) {
7800
7800
  if (!e) throw new Ce({
7801
7801
  message: "Checkout URL is required.",
7802
7802
  code: ge.VALIDATION_ERROR
7803
7803
  });
7804
- let t = new URL(e);
7805
- if (!this.apiConfig.urls.checkoutUrl.includes(t.hostname)) throw new Ce({
7804
+ let n = new URL(e);
7805
+ if (!this.apiConfig.urls.checkoutUrl.includes(n.hostname)) throw new Ce({
7806
7806
  message: "Invalid checkout URL",
7807
7807
  code: ge.VALIDATION_ERROR
7808
7808
  });
7809
7809
  if (this.checkoutWindow ||= Ee("", { name: "supertabCheckout" }), !this.checkoutWindow) throw new Ce({ message: "Failed to open checkout window" });
7810
7810
  try {
7811
- let t = bl(e);
7812
- this.checkoutWindow.location.href = t.toString();
7813
- let n = await De(this.checkoutWindow);
7814
- if (n.status) return this._destroyCheckoutWindow(), n.status === "payment_completed";
7811
+ let n = bl(e);
7812
+ t && n.searchParams.set("white_label", "true"), this.checkoutWindow.location.href = n.toString();
7813
+ let r = await De(this.checkoutWindow);
7814
+ if (r.status) return this._destroyCheckoutWindow(), r.status === "payment_completed";
7815
7815
  } catch (e) {
7816
7816
  throw this._destroyCheckoutWindow(), e instanceof Ce ? e : new Ce({ message: Ae(e, "Communication with checkout window failed") });
7817
7817
  }
@@ -30247,7 +30247,10 @@ var jh = ih(({ input: e, sendBack: t }) => {
30247
30247
  let u = "purchase" in l ? l.purchase : null, d = l.actionRequiredDetails || null;
30248
30248
  if (d?.next) {
30249
30249
  try {
30250
- let e = d.next, i = await n.checkout.start({ checkoutUrl: e });
30250
+ let e = d.next, i = await n.checkout.start({
30251
+ checkoutUrl: e,
30252
+ whiteLabel: a.whiteLabel
30253
+ });
30251
30254
  if (i) {
30252
30255
  let e = (await n.api.retrieveCustomer()).tab, a = await n.api.retrievePurchase({ purchaseId: u?.id || "" });
30253
30256
  a && a.status === de.COMPLETED ? t({
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "access": "public",
23
23
  "registry": "https://registry.npmjs.org/"
24
24
  },
25
- "version": "3.68.0",
25
+ "version": "3.69.0",
26
26
  "type": "module",
27
27
  "scripts": {
28
28
  "dev": "vite --config .vite/vite.dev.config.ts",