@bunnyapp/components 1.8.0-beta.16 → 1.8.0-beta.17

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/cjs/index.js CHANGED
@@ -1288,7 +1288,7 @@ const DEFAULT_CONFIG = {
1288
1288
  };
1289
1289
 
1290
1290
  // This will be replaced at build time by rollup-plugin-replace
1291
- const PACKAGE_VERSION = '1.8.0-beta.15';
1291
+ const PACKAGE_VERSION = '1.8.0-beta.16';
1292
1292
  const createRequestHeaders = (token) => {
1293
1293
  const headers = createClientDevHeaders({ token });
1294
1294
  // Add the components version header
@@ -28648,6 +28648,7 @@ const CanShowQuantitiesInput_SubscriptionChargeFragment = t(`
28648
28648
  expired
28649
28649
  selfServiceQuantity
28650
28650
  kind
28651
+ chargeType
28651
28652
  }
28652
28653
  `);
28653
28654
  const CanShowQuantitiesInput_SubscriptionFragment = t(`
@@ -28676,11 +28677,15 @@ const canShowQuantitiesInput = ({ charge: maskedCharge, subscription: maskedSubs
28676
28677
  const isPendingSubscription = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'PENDING';
28677
28678
  const isTrialSubscription = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'TRIAL';
28678
28679
  const isFlatPricing = (charge === null || charge === void 0 ? void 0 : charge.pricingModel) === 'FLAT';
28680
+ const isUsageCharge = (charge === null || charge === void 0 ? void 0 : charge.chargeType) === 'USAGE';
28681
+ const isOneTimeCharge = (charge === null || charge === void 0 ? void 0 : charge.chargeType) === 'ONE_TIME';
28679
28682
  const isDiscount = (charge === null || charge === void 0 ? void 0 : charge.kind) === 'DISCOUNT' || (charge === null || charge === void 0 ? void 0 : charge.kind) === 'FREE_PERIOD_DISCOUNT';
28680
28683
  const quantityChangeAllowed = (isActiveSubscription || isPendingSubscription) &&
28681
28684
  !isDiscount &&
28682
28685
  !isTrialSubscription &&
28683
28686
  !isFlatPricing &&
28687
+ !isUsageCharge &&
28688
+ !isOneTimeCharge &&
28684
28689
  (charge === null || charge === void 0 ? void 0 : charge.selfServiceQuantity) &&
28685
28690
  !(charge === null || charge === void 0 ? void 0 : charge.expired);
28686
28691
  return quantityChangeAllowed;
@@ -5,6 +5,7 @@ export declare const CanShowQuantitiesInput_SubscriptionChargeFragment: import("
5
5
  expired: boolean;
6
6
  selfServiceQuantity: boolean | null;
7
7
  kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
8
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
8
9
  }, {}, {
9
10
  fragment: "CanShowQuantitiesInput_SubscriptionChargeFragment";
10
11
  on: "SubscriptionCharge";
package/dist/esm/index.js CHANGED
@@ -1286,7 +1286,7 @@ const DEFAULT_CONFIG = {
1286
1286
  };
1287
1287
 
1288
1288
  // This will be replaced at build time by rollup-plugin-replace
1289
- const PACKAGE_VERSION = '1.8.0-beta.15';
1289
+ const PACKAGE_VERSION = '1.8.0-beta.16';
1290
1290
  const createRequestHeaders = (token) => {
1291
1291
  const headers = createClientDevHeaders({ token });
1292
1292
  // Add the components version header
@@ -28646,6 +28646,7 @@ const CanShowQuantitiesInput_SubscriptionChargeFragment = t(`
28646
28646
  expired
28647
28647
  selfServiceQuantity
28648
28648
  kind
28649
+ chargeType
28649
28650
  }
28650
28651
  `);
28651
28652
  const CanShowQuantitiesInput_SubscriptionFragment = t(`
@@ -28674,11 +28675,15 @@ const canShowQuantitiesInput = ({ charge: maskedCharge, subscription: maskedSubs
28674
28675
  const isPendingSubscription = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'PENDING';
28675
28676
  const isTrialSubscription = (subscription === null || subscription === void 0 ? void 0 : subscription.state) === 'TRIAL';
28676
28677
  const isFlatPricing = (charge === null || charge === void 0 ? void 0 : charge.pricingModel) === 'FLAT';
28678
+ const isUsageCharge = (charge === null || charge === void 0 ? void 0 : charge.chargeType) === 'USAGE';
28679
+ const isOneTimeCharge = (charge === null || charge === void 0 ? void 0 : charge.chargeType) === 'ONE_TIME';
28677
28680
  const isDiscount = (charge === null || charge === void 0 ? void 0 : charge.kind) === 'DISCOUNT' || (charge === null || charge === void 0 ? void 0 : charge.kind) === 'FREE_PERIOD_DISCOUNT';
28678
28681
  const quantityChangeAllowed = (isActiveSubscription || isPendingSubscription) &&
28679
28682
  !isDiscount &&
28680
28683
  !isTrialSubscription &&
28681
28684
  !isFlatPricing &&
28685
+ !isUsageCharge &&
28686
+ !isOneTimeCharge &&
28682
28687
  (charge === null || charge === void 0 ? void 0 : charge.selfServiceQuantity) &&
28683
28688
  !(charge === null || charge === void 0 ? void 0 : charge.expired);
28684
28689
  return quantityChangeAllowed;
@@ -5,6 +5,7 @@ export declare const CanShowQuantitiesInput_SubscriptionChargeFragment: import("
5
5
  expired: boolean;
6
6
  selfServiceQuantity: boolean | null;
7
7
  kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
8
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
8
9
  }, {}, {
9
10
  fragment: "CanShowQuantitiesInput_SubscriptionChargeFragment";
10
11
  on: "SubscriptionCharge";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.16",
3
+ "version": "1.8.0-beta.17",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",