@monetize.software/sdk 3.0.0-alpha.16 → 3.0.0-alpha.18

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.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),r=require("./chunks/PaywallUI-CX81Oe3o.js");exports.ApiClient=e.ApiClient;exports.ApiGatewayClient=e.ApiGatewayClient;exports.AuthClient=e.AuthClient;exports.BillingClient=e.BillingClient;exports.EventTracker=e.EventTracker;exports.PaywallError=e.PaywallError;exports.QuotaExceededError=e.QuotaExceededError;exports.SDK_VERSION=e.SDK_VERSION;exports.STORAGE_KEYS=e.STORAGE_KEYS;exports.createStorage=e.createStorage;exports.ensureVisitorId=e.ensureVisitorId;exports.findApplicableOffer=e.findApplicableOffer;exports.generateVisitorId=e.generateVisitorId;exports.offerStartStorageKey=e.offerStartStorageKey;exports.readBrowserOfferStart=e.readBrowserOfferStart;exports.resolveOffer=e.resolveOffer;exports.PaywallUI=r.PaywallUI;exports.blockRegistry=r.blockRegistry;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),r=require("./chunks/PaywallUI-C2aJvWhy.js");exports.ApiClient=e.ApiClient;exports.ApiGatewayClient=e.ApiGatewayClient;exports.AuthClient=e.AuthClient;exports.BillingClient=e.BillingClient;exports.EventTracker=e.EventTracker;exports.PaywallError=e.PaywallError;exports.QuotaExceededError=e.QuotaExceededError;exports.SDK_VERSION=e.SDK_VERSION;exports.STORAGE_KEYS=e.STORAGE_KEYS;exports.createStorage=e.createStorage;exports.ensureVisitorId=e.ensureVisitorId;exports.findApplicableOffer=e.findApplicableOffer;exports.generateVisitorId=e.generateVisitorId;exports.offerStartStorageKey=e.offerStartStorageKey;exports.readBrowserOfferStart=e.readBrowserOfferStart;exports.resolveOffer=e.resolveOffer;exports.PaywallUI=r.PaywallUI;exports.blockRegistry=r.blockRegistry;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -807,7 +807,9 @@ export declare class BillingClient {
807
807
  * инвойсы). Опен-флоу управляется host'ом:
808
808
  *
809
809
  * ```ts
810
- * const { url } = await billing.getCustomerPortalUrl();
810
+ * const { url } = await billing.getCustomerPortalUrl({
811
+ * returnUrl: 'https://your-app.com/account'
812
+ * });
811
813
  * window.open(url, '_blank');
812
814
  * ```
813
815
  *
@@ -819,6 +821,14 @@ export declare class BillingClient {
819
821
  */
820
822
  getCustomerPortalUrl(opts?: {
821
823
  signal?: AbortSignal;
824
+ /** URL для return-button у провайдера (Stripe «Return to ...», Paddle
825
+ * и Chargebee redirect_url'ы). Передавай туда страницу-аккаунт твоего
826
+ * app'а — `https://your-app.com/account`. Без явного returnUrl бэк
827
+ * применяет fallback в порядке: `paywall_settings.shop_url` →
828
+ * custom_domain пейвола → NEXT_PUBLIC_ONLINE_ORIGIN (последнее — это
829
+ * страница в самом online-сервисе, годится только для legacy
830
+ * v2-iframe-флоу). */
831
+ returnUrl?: string;
822
832
  }): Promise<{
823
833
  url: string;
824
834
  }>;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ApiClient as t, ApiGatewayClient as a, AuthClient as i, BillingClient as o, EventTracker as l, PaywallError as f, QuotaExceededError as n, SDK_VERSION as s, STORAGE_KEYS as S, createStorage as E, ensureVisitorId as d, findApplicableOffer as p, generateVisitorId as c, offerStartStorageKey as g, readBrowserOfferStart as y, resolveOffer as A } from "./core.js";
2
- import { P as w, b as C } from "./chunks/PaywallUI-BBX0qK8m.js";
2
+ import { P as w, b as C } from "./chunks/PaywallUI-DZrllP18.js";
3
3
  export {
4
4
  t as ApiClient,
5
5
  a as ApiGatewayClient,
package/dist/ui.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/PaywallUI-CX81Oe3o.js");exports.PaywallUI=e.PaywallUI;exports.blockRegistry=e.blockRegistry;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/PaywallUI-C2aJvWhy.js");exports.PaywallUI=e.PaywallUI;exports.blockRegistry=e.blockRegistry;
2
2
  //# sourceMappingURL=ui.cjs.map
package/dist/ui.d.ts CHANGED
@@ -793,7 +793,9 @@ declare class BillingClient {
793
793
  * инвойсы). Опен-флоу управляется host'ом:
794
794
  *
795
795
  * ```ts
796
- * const { url } = await billing.getCustomerPortalUrl();
796
+ * const { url } = await billing.getCustomerPortalUrl({
797
+ * returnUrl: 'https://your-app.com/account'
798
+ * });
797
799
  * window.open(url, '_blank');
798
800
  * ```
799
801
  *
@@ -805,6 +807,14 @@ declare class BillingClient {
805
807
  */
806
808
  getCustomerPortalUrl(opts?: {
807
809
  signal?: AbortSignal;
810
+ /** URL для return-button у провайдера (Stripe «Return to ...», Paddle
811
+ * и Chargebee redirect_url'ы). Передавай туда страницу-аккаунт твоего
812
+ * app'а — `https://your-app.com/account`. Без явного returnUrl бэк
813
+ * применяет fallback в порядке: `paywall_settings.shop_url` →
814
+ * custom_domain пейвола → NEXT_PUBLIC_ONLINE_ORIGIN (последнее — это
815
+ * страница в самом online-сервисе, годится только для legacy
816
+ * v2-iframe-флоу). */
817
+ returnUrl?: string;
808
818
  }): Promise<{
809
819
  url: string;
810
820
  }>;
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as o, b as r } from "./chunks/PaywallUI-BBX0qK8m.js";
1
+ import { P as o, b as r } from "./chunks/PaywallUI-DZrllP18.js";
2
2
  export {
3
3
  o as PaywallUI,
4
4
  r as blockRegistry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monetize.software/sdk",
3
- "version": "3.0.0-alpha.16",
3
+ "version": "3.0.0-alpha.18",
4
4
  "description": "Monetize SDK — bundled billing client and paywall render engine for web and Chrome extensions",
5
5
  "type": "module",
6
6
  "sideEffects": false,