@flopay/shared 1.2.6 → 1.2.7

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.d.cts CHANGED
@@ -191,8 +191,12 @@ type CheckoutProductType = 'item' | 'subscription';
191
191
  interface CheckoutSessionProduct {
192
192
  uuid: string;
193
193
  checkoutSessionId: string;
194
- /** Whether this product is a one-time item or a recurring subscription. */
195
- type: CheckoutProductType;
194
+ /**
195
+ * Whether this product is a one-time item or a recurring subscription.
196
+ * Optional to mirror {@link CheckoutProduct.type}; when omitted, consumers
197
+ * treat the product as an `'item'` for display ordering.
198
+ */
199
+ type?: CheckoutProductType;
196
200
  /** Preferred catalog code for the product. */
197
201
  code?: string;
198
202
  /**
@@ -1003,7 +1007,7 @@ declare function getConfiguredBillingApiUrl(): string;
1003
1007
  declare function getFloPayEnvironment(): FloPayEnvironment;
1004
1008
 
1005
1009
  /** Current SDK version. */
1006
- declare const SDK_VERSION = "1.2.6";
1010
+ declare const SDK_VERSION = "1.2.7";
1007
1011
  /** Billing API URL for staging environment. */
1008
1012
  declare const BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
1009
1013
  /** Billing API URL for production environment. */
package/dist/index.d.ts CHANGED
@@ -191,8 +191,12 @@ type CheckoutProductType = 'item' | 'subscription';
191
191
  interface CheckoutSessionProduct {
192
192
  uuid: string;
193
193
  checkoutSessionId: string;
194
- /** Whether this product is a one-time item or a recurring subscription. */
195
- type: CheckoutProductType;
194
+ /**
195
+ * Whether this product is a one-time item or a recurring subscription.
196
+ * Optional to mirror {@link CheckoutProduct.type}; when omitted, consumers
197
+ * treat the product as an `'item'` for display ordering.
198
+ */
199
+ type?: CheckoutProductType;
196
200
  /** Preferred catalog code for the product. */
197
201
  code?: string;
198
202
  /**
@@ -1003,7 +1007,7 @@ declare function getConfiguredBillingApiUrl(): string;
1003
1007
  declare function getFloPayEnvironment(): FloPayEnvironment;
1004
1008
 
1005
1009
  /** Current SDK version. */
1006
- declare const SDK_VERSION = "1.2.6";
1010
+ declare const SDK_VERSION = "1.2.7";
1007
1011
  /** Billing API URL for staging environment. */
1008
1012
  declare const BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
1009
1013
  /** Billing API URL for production environment. */
package/dist/index.mjs CHANGED
@@ -79,7 +79,7 @@ var PAYMENT_METHOD_LOGOS = {
79
79
  };
80
80
 
81
81
  // src/constants.ts
82
- var SDK_VERSION = "1.2.6";
82
+ var SDK_VERSION = "1.2.7";
83
83
  var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
84
84
  var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
85
85
  var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
@@ -1855,7 +1855,7 @@ function buildCheckoutDisplayData(session, options = {}) {
1855
1855
  const itemsList = [];
1856
1856
  const products = session.products ?? [];
1857
1857
  const subscriptions = products.filter((p) => p.type === "subscription");
1858
- const items = products.filter((p) => p.type === "item");
1858
+ const items = products.filter((p) => p.type !== "subscription");
1859
1859
  const resolvedCurrency = resolveSessionCurrency(session.currency, void 0, void 0, products);
1860
1860
  const currency = (resolvedCurrency ?? "USD").toUpperCase();
1861
1861
  for (const sub of subscriptions) {