@schematichq/schematic-components 2.31.1 → 2.33.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.
@@ -5315,6 +5315,132 @@ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminato
5315
5315
  };
5316
5316
  }
5317
5317
 
5318
+ // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5319
+ var CustomPlanActivationStrategy = {
5320
+ Payment: "on_payment",
5321
+ Publish: "on_publish"
5322
+ };
5323
+ function CustomPlanActivationStrategyFromJSON(json) {
5324
+ return CustomPlanActivationStrategyFromJSONTyped(json, false);
5325
+ }
5326
+ function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5327
+ return json;
5328
+ }
5329
+
5330
+ // src/api/checkoutexternal/models/CompanyContextCustomPlanBillingResponseData.ts
5331
+ function CompanyContextCustomPlanBillingResponseDataFromJSON(json) {
5332
+ return CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, false);
5333
+ }
5334
+ function CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5335
+ if (json == null) {
5336
+ return json;
5337
+ }
5338
+ return {
5339
+ activationStrategy: CustomPlanActivationStrategyFromJSON(
5340
+ json["activation_strategy"]
5341
+ ),
5342
+ dueAt: new Date(json["due_at"]),
5343
+ invoiceUrl: json["invoice_url"] == null ? void 0 : json["invoice_url"],
5344
+ planId: json["plan_id"],
5345
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"]
5346
+ };
5347
+ }
5348
+
5349
+ // src/api/checkoutexternal/models/CompanyContextPlanResponseData.ts
5350
+ function CompanyContextPlanResponseDataFromJSON(json) {
5351
+ return CompanyContextPlanResponseDataFromJSONTyped(json, false);
5352
+ }
5353
+ function CompanyContextPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5354
+ if (json == null) {
5355
+ return json;
5356
+ }
5357
+ return {
5358
+ description: json["description"] == null ? void 0 : json["description"],
5359
+ id: json["id"],
5360
+ includedCreditIds: json["included_credit_ids"],
5361
+ name: json["name"],
5362
+ period: json["period"] == null ? void 0 : json["period"],
5363
+ price: json["price"] == null ? void 0 : json["price"]
5364
+ };
5365
+ }
5366
+
5367
+ // src/api/checkoutexternal/models/CompanyContextScheduledDowngradeResponseData.ts
5368
+ function CompanyContextScheduledDowngradeResponseDataFromJSON(json) {
5369
+ return CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, false);
5370
+ }
5371
+ function CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5372
+ if (json == null) {
5373
+ return json;
5374
+ }
5375
+ return {
5376
+ fromPlanId: json["from_plan_id"],
5377
+ fromPlanName: json["from_plan_name"],
5378
+ toPlanId: json["to_plan_id"],
5379
+ toPlanName: json["to_plan_name"]
5380
+ };
5381
+ }
5382
+
5383
+ // src/api/checkoutexternal/models/CompanyContextSubscriptionResponseData.ts
5384
+ function CompanyContextSubscriptionResponseDataFromJSON(json) {
5385
+ return CompanyContextSubscriptionResponseDataFromJSONTyped(json, false);
5386
+ }
5387
+ function CompanyContextSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5388
+ if (json == null) {
5389
+ return json;
5390
+ }
5391
+ return {
5392
+ cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
5393
+ cancelAtPeriodEnd: json["cancel_at_period_end"],
5394
+ currency: CurrencyFromJSON(json["currency"]),
5395
+ nextBillAt: json["next_bill_at"] == null ? void 0 : new Date(json["next_bill_at"]),
5396
+ period: json["period"] == null ? void 0 : json["period"],
5397
+ periodEnd: json["period_end"] == null ? void 0 : new Date(json["period_end"]),
5398
+ status: json["status"],
5399
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
5400
+ };
5401
+ }
5402
+
5403
+ // src/api/checkoutexternal/models/CompanyContextResponseData.ts
5404
+ function CompanyContextResponseDataFromJSON(json) {
5405
+ return CompanyContextResponseDataFromJSONTyped(json, false);
5406
+ }
5407
+ function CompanyContextResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5408
+ if (json == null) {
5409
+ return json;
5410
+ }
5411
+ return {
5412
+ addOns: json["add_ons"].map(
5413
+ CompanyContextPlanResponseDataFromJSON
5414
+ ),
5415
+ customPlanBilling: json["custom_plan_billing"] == null ? void 0 : CompanyContextCustomPlanBillingResponseDataFromJSON(
5416
+ json["custom_plan_billing"]
5417
+ ),
5418
+ id: json["id"],
5419
+ name: json["name"],
5420
+ plan: json["plan"] == null ? void 0 : CompanyContextPlanResponseDataFromJSON(json["plan"]),
5421
+ scheduledDowngrade: json["scheduled_downgrade"] == null ? void 0 : CompanyContextScheduledDowngradeResponseDataFromJSON(
5422
+ json["scheduled_downgrade"]
5423
+ ),
5424
+ subscription: json["subscription"] == null ? void 0 : CompanyContextSubscriptionResponseDataFromJSON(json["subscription"])
5425
+ };
5426
+ }
5427
+
5428
+ // src/api/checkoutexternal/models/CompanyCreditAutoTopupResponseData.ts
5429
+ function CompanyCreditAutoTopupResponseDataFromJSON(json) {
5430
+ return CompanyCreditAutoTopupResponseDataFromJSONTyped(json, false);
5431
+ }
5432
+ function CompanyCreditAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5433
+ if (json == null) {
5434
+ return json;
5435
+ }
5436
+ return {
5437
+ amount: json["amount"] == null ? void 0 : json["amount"],
5438
+ enabled: json["enabled"],
5439
+ selfService: json["self_service"],
5440
+ thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"]
5441
+ };
5442
+ }
5443
+
5318
5444
  // src/api/checkoutexternal/models/CompanyCreditGrantResponseData.ts
5319
5445
  function CompanyCreditGrantResponseDataFromJSON(json) {
5320
5446
  return CompanyCreditGrantResponseDataFromJSONTyped(json, false);
@@ -5372,6 +5498,7 @@ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator
5372
5498
  return json;
5373
5499
  }
5374
5500
  return {
5501
+ autoTopup: json["auto_topup"] == null ? void 0 : CompanyCreditAutoTopupResponseDataFromJSON(json["auto_topup"]),
5375
5502
  composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
5376
5503
  creditDescription: json["credit_description"],
5377
5504
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
@@ -5648,6 +5775,7 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
5648
5775
  metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
5649
5776
  metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
5650
5777
  monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
5778
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
5651
5779
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
5652
5780
  usage: json["usage"] == null ? void 0 : json["usage"],
5653
5781
  valueType: EntitlementValueTypeFromJSON(json["value_type"]),
@@ -5732,18 +5860,6 @@ function EntityTraitDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5732
5860
  };
5733
5861
  }
5734
5862
 
5735
- // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5736
- var CustomPlanActivationStrategy = {
5737
- Payment: "on_payment",
5738
- Publish: "on_publish"
5739
- };
5740
- function CustomPlanActivationStrategyFromJSON(json) {
5741
- return CustomPlanActivationStrategyFromJSONTyped(json, false);
5742
- }
5743
- function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5744
- return json;
5745
- }
5746
-
5747
5863
  // src/api/checkoutexternal/models/CustomPlanBillingStatus.ts
5748
5864
  var CustomPlanBillingStatus = {
5749
5865
  Active: "active",
@@ -5780,6 +5896,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5780
5896
  ),
5781
5897
  billingCycleAnchor: json["billing_cycle_anchor"] == null ? void 0 : new Date(json["billing_cycle_anchor"]),
5782
5898
  billingStartDate: json["billing_start_date"] == null ? void 0 : new Date(json["billing_start_date"]),
5899
+ checkoutId: json["checkout_id"] == null ? void 0 : json["checkout_id"],
5783
5900
  companyId: json["company_id"],
5784
5901
  createdAt: new Date(json["created_at"]),
5785
5902
  daysUntilDue: json["days_until_due"],
@@ -5789,6 +5906,9 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5789
5906
  paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
5790
5907
  planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
5791
5908
  planId: json["plan_id"],
5909
+ problems: json["problems"].map(
5910
+ CheckoutProblemResponseDataFromJSON
5911
+ ),
5792
5912
  prorateFirstPeriod: json["prorate_first_period"] == null ? void 0 : json["prorate_first_period"],
5793
5913
  publishedAt: json["published_at"] == null ? void 0 : new Date(json["published_at"]),
5794
5914
  sendInvoice: json["send_invoice"],
@@ -5949,6 +6069,7 @@ function ConditionFromJSONTyped(json, ignoreDiscriminator) {
5949
6069
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
5950
6070
  metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
5951
6071
  operator: ComparableOperatorFromJSON(json["operator"]),
6072
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
5952
6073
  resourceIds: json["resource_ids"],
5953
6074
  traitDefinition: json["trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["trait_definition"]),
5954
6075
  traitValue: json["trait_value"]
@@ -6886,6 +7007,20 @@ function PlanVersionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6886
7007
  };
6887
7008
  }
6888
7009
 
7010
+ // src/api/checkoutexternal/models/PlanCreditVisibility.ts
7011
+ function PlanCreditVisibilityFromJSON(json) {
7012
+ return PlanCreditVisibilityFromJSONTyped(json, false);
7013
+ }
7014
+ function PlanCreditVisibilityFromJSONTyped(json, ignoreDiscriminator) {
7015
+ if (json == null) {
7016
+ return json;
7017
+ }
7018
+ return {
7019
+ creditId: json["credit_id"],
7020
+ visible: json["visible"]
7021
+ };
7022
+ }
7023
+
6889
7024
  // src/api/checkoutexternal/models/CreditUsageAggregation.ts
6890
7025
  function CreditUsageAggregationFromJSON(json) {
6891
7026
  return CreditUsageAggregationFromJSONTyped(json, false);
@@ -6999,6 +7134,9 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6999
7134
  controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
7000
7135
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
7001
7136
  createdAt: new Date(json["created_at"]),
7137
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
7138
+ PlanCreditVisibilityFromJSON
7139
+ ),
7002
7140
  credits: json["credits"].map(
7003
7141
  BillingCreditResponseDataFromJSON
7004
7142
  ),
@@ -7886,6 +8024,20 @@ function GetCompanyPaymentMethodsResponseFromJSONTyped(json, ignoreDiscriminator
7886
8024
  };
7887
8025
  }
7888
8026
 
8027
+ // src/api/checkoutexternal/models/GetCompanyResponse.ts
8028
+ function GetCompanyResponseFromJSON(json) {
8029
+ return GetCompanyResponseFromJSONTyped(json, false);
8030
+ }
8031
+ function GetCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
8032
+ if (json == null) {
8033
+ return json;
8034
+ }
8035
+ return {
8036
+ data: CompanyContextResponseDataFromJSON(json["data"]),
8037
+ params: json["params"]
8038
+ };
8039
+ }
8040
+
7889
8041
  // src/api/checkoutexternal/models/GetCompanyUpcomingInvoiceResponse.ts
7890
8042
  function GetCompanyUpcomingInvoiceResponseFromJSON(json) {
7891
8043
  return GetCompanyUpcomingInvoiceResponseFromJSONTyped(json, false);
@@ -8740,6 +8892,38 @@ var CheckoutexternalApi = class extends BaseAPI {
8740
8892
  const response = await this.getCheckoutTaxIDRaw(initOverrides);
8741
8893
  return await response.value();
8742
8894
  }
8895
+ /**
8896
+ * Get company
8897
+ */
8898
+ async getCompanyRaw(initOverrides) {
8899
+ const queryParameters = {};
8900
+ const headerParameters = {};
8901
+ if (this.configuration && this.configuration.apiKey) {
8902
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
8903
+ "X-Schematic-Api-Key"
8904
+ );
8905
+ }
8906
+ const response = await this.request(
8907
+ {
8908
+ path: `/company`,
8909
+ method: "GET",
8910
+ headers: headerParameters,
8911
+ query: queryParameters
8912
+ },
8913
+ initOverrides
8914
+ );
8915
+ return new JSONApiResponse(
8916
+ response,
8917
+ (jsonValue) => GetCompanyResponseFromJSON(jsonValue)
8918
+ );
8919
+ }
8920
+ /**
8921
+ * Get company
8922
+ */
8923
+ async getCompany(initOverrides) {
8924
+ const response = await this.getCompanyRaw(initOverrides);
8925
+ return await response.value();
8926
+ }
8743
8927
  /**
8744
8928
  * Get company credit balances
8745
8929
  */
@@ -9930,9 +10114,9 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
9930
10114
 
9931
10115
  // src/api/componentspublic/models/Currency.ts
9932
10116
  function CurrencyFromJSON2(json) {
9933
- return CurrencyFromJSONTyped33(json, false);
10117
+ return CurrencyFromJSONTyped34(json, false);
9934
10118
  }
9935
- function CurrencyFromJSONTyped33(json, ignoreDiscriminator) {
10119
+ function CurrencyFromJSONTyped34(json, ignoreDiscriminator) {
9936
10120
  return json;
9937
10121
  }
9938
10122
 
@@ -11007,6 +11191,20 @@ function PlanVersionResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
11007
11191
  };
11008
11192
  }
11009
11193
 
11194
+ // src/api/componentspublic/models/PlanCreditVisibility.ts
11195
+ function PlanCreditVisibilityFromJSON2(json) {
11196
+ return PlanCreditVisibilityFromJSONTyped3(json, false);
11197
+ }
11198
+ function PlanCreditVisibilityFromJSONTyped3(json, ignoreDiscriminator) {
11199
+ if (json == null) {
11200
+ return json;
11201
+ }
11202
+ return {
11203
+ creditId: json["credit_id"],
11204
+ visible: json["visible"]
11205
+ };
11206
+ }
11207
+
11010
11208
  // src/api/componentspublic/models/PlanViewPublicResponseData.ts
11011
11209
  function PlanViewPublicResponseDataFromJSON(json) {
11012
11210
  return PlanViewPublicResponseDataFromJSONTyped(json, false);
@@ -11038,6 +11236,9 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11038
11236
  controlledBy: BillingProviderTypeFromJSON2(json["controlled_by"]),
11039
11237
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
11040
11238
  createdAt: new Date(json["created_at"]),
11239
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
11240
+ PlanCreditVisibilityFromJSON2
11241
+ ),
11041
11242
  credits: json["credits"].map(
11042
11243
  BillingCreditResponseDataFromJSON2
11043
11244
  ),
@@ -14923,6 +15124,17 @@ function getResetCadencePeriod(cadence) {
14923
15124
  function isPerLicenseGrant(grant) {
14924
15125
  return grant.scaling === PlanCreditGrantScaling.PerLicense;
14925
15126
  }
15127
+ function getDisplayedPlanCreditGrants(plan) {
15128
+ if (!plan) {
15129
+ return [];
15130
+ }
15131
+ const hidden = new Set(
15132
+ (plan.creditVisibility ?? []).filter((override) => !override.visible).map((override) => override.creditId)
15133
+ );
15134
+ return plan.includedCreditGrants.filter(
15135
+ (grant) => !hidden.has(grant.creditId)
15136
+ );
15137
+ }
14926
15138
  function groupPlanCreditGrants(creditGrants) {
14927
15139
  const map = creditGrants.reduce(
14928
15140
  (acc, grant) => {
@@ -16567,7 +16779,7 @@ var reducer = (state, action) => {
16567
16779
  // src/context/EmbedProvider.tsx
16568
16780
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
16569
16781
  var getCustomHeaders = (sessionId) => ({
16570
- "X-Schematic-Components-Version": "2.31.1",
16782
+ "X-Schematic-Components-Version": "2.33.0",
16571
16783
  "X-Schematic-Session-ID": sessionId
16572
16784
  });
16573
16785
  var normalizeCurrencyFilter = (filter2) => {
@@ -19406,7 +19618,9 @@ var Plan = ({
19406
19618
  { useSelectedPeriod: true },
19407
19619
  currency
19408
19620
  ) || {};
19409
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
19621
+ const credits = groupPlanCreditGrants(
19622
+ getDisplayedPlanCreditGrants(plan)
19623
+ );
19410
19624
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
19411
19625
  (entitlement) => !!entitlement.priceBehavior
19412
19626
  );
@@ -19784,8 +19998,8 @@ var Quantity = ({
19784
19998
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
19785
19999
  const unitPriceFontSize = 0.875 * settings.theme.typography.text.fontSize;
19786
20000
  const planCredits = useMemo14(
19787
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
19788
- [selectedPlan?.includedCreditGrants]
20001
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
20002
+ [selectedPlan]
19789
20003
  );
19790
20004
  const prorationBehavior = data?.checkoutSettings?.prorationBehavior;
19791
20005
  const { billDate: renewalDate } = useNextBillDate();
@@ -21041,16 +21255,17 @@ var CheckoutDialog = ({ top }) => {
21041
21255
  );
21042
21256
  }, [availablePlans, checkoutState, selectedPlanId]);
21043
21257
  const [shouldTrial, setShouldTrial] = useState8(false);
21044
- const planCreditGrants = useMemo16(() => {
21045
- const grants = mergeCompanyGrants(
21046
- selectedPlan?.includedCreditGrants,
21258
+ const displayedPlanCreditGrants = useMemo16(
21259
+ () => getDisplayedPlanCreditGrants(selectedPlan),
21260
+ [selectedPlan]
21261
+ );
21262
+ const planCreditGrants = useMemo16(
21263
+ () => mergeCompanyGrants(
21264
+ displayedPlanCreditGrants,
21047
21265
  data?.company?.plan?.includedCreditGrants
21048
- );
21049
- return grants;
21050
- }, [
21051
- selectedPlan?.includedCreditGrants,
21052
- data?.company?.plan?.includedCreditGrants
21053
- ]);
21266
+ ),
21267
+ [displayedPlanCreditGrants, data?.company?.plan?.includedCreditGrants]
21268
+ );
21054
21269
  const [autoTopupConfigs, setAutoTopupConfigs] = useState8(() => {
21055
21270
  const initialConfigs = data?.company?.plan?.includedCreditGrants.reduce(
21056
21271
  (acc, companyGrant) => {
@@ -21290,7 +21505,7 @@ var CheckoutDialog = ({ top }) => {
21290
21505
  description: t3("Choose your base plan")
21291
21506
  });
21292
21507
  }
21293
- const hasSelfServiceAutoTopup = selectedPlan?.includedCreditGrants.some(
21508
+ const hasSelfServiceAutoTopup = displayedPlanCreditGrants.some(
21294
21509
  (grant) => isSelfServiceAutoTopupAvailable(grant)
21295
21510
  );
21296
21511
  if (hasSelfServiceAutoTopup) {
@@ -21350,7 +21565,7 @@ var CheckoutDialog = ({ top }) => {
21350
21565
  data?.customCheckoutFields,
21351
21566
  collectTaxId,
21352
21567
  availablePlans,
21353
- selectedPlan?.includedCreditGrants,
21568
+ displayedPlanCreditGrants,
21354
21569
  willTrialWithoutPaymentMethod,
21355
21570
  payInAdvanceEntitlements,
21356
21571
  addOns,
@@ -24002,8 +24217,8 @@ var SubscriptionSidebar = forwardRef7(
24002
24217
  data?.company?.plan?.includedCreditGrants
24003
24218
  ]);
24004
24219
  const planCredits = useMemo22(
24005
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
24006
- [selectedPlan?.includedCreditGrants]
24220
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
24221
+ [selectedPlan]
24007
24222
  );
24008
24223
  const { payInAdvanceEntitlements } = useMemo22(() => {
24009
24224
  const payAsYouGoEntitlements = [];
@@ -29551,7 +29766,7 @@ var Plan2 = ({
29551
29766
  const currentPlanIndex = plans.findIndex((plan2) => plan2.current);
29552
29767
  const isActivePlan = plan.current && currentPeriod === selectedPeriod;
29553
29768
  const { price: planPrice, currency: planCurrency } = getPlanPrice(plan, selectedPeriod, { useSelectedPeriod: true }, currency) || {};
29554
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
29769
+ const credits = groupPlanCreditGrants(getDisplayedPlanCreditGrants(plan));
29555
29770
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
29556
29771
  (entitlement) => !!entitlement.priceBehavior
29557
29772
  );