@schematichq/schematic-components 2.32.0 → 2.34.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.
@@ -3677,7 +3677,7 @@ var import_debounce2 = __toESM(require_debounce());
3677
3677
  var import_merge3 = __toESM(require_merge());
3678
3678
  import { useCallback as useCallback2, useEffect, useMemo as useMemo2, useReducer, useRef as useRef2 } from "react";
3679
3679
 
3680
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/stringify.js
3680
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/stringify.js
3681
3681
  var byteToHex = [];
3682
3682
  for (let i2 = 0; i2 < 256; ++i2) {
3683
3683
  byteToHex.push((i2 + 256).toString(16).slice(1));
@@ -3686,13 +3686,13 @@ function unsafeStringify(arr, offset = 0) {
3686
3686
  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3687
3687
  }
3688
3688
 
3689
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/rng.js
3689
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/rng.js
3690
3690
  var rnds8 = new Uint8Array(16);
3691
3691
  function rng() {
3692
3692
  return crypto.getRandomValues(rnds8);
3693
3693
  }
3694
3694
 
3695
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/v4.js
3695
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/v4.js
3696
3696
  function v4(options, buf, offset) {
3697
3697
  if (!buf && !options && crypto.randomUUID) {
3698
3698
  return crypto.randomUUID();
@@ -4878,6 +4878,339 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
4878
4878
  };
4879
4879
  }
4880
4880
 
4881
+ // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
4882
+ function CatalogPriceTierResponseDataFromJSON(json) {
4883
+ return CatalogPriceTierResponseDataFromJSONTyped(json, false);
4884
+ }
4885
+ function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4886
+ if (json == null) {
4887
+ return json;
4888
+ }
4889
+ return {
4890
+ flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
4891
+ from: json["from"],
4892
+ perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
4893
+ perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
4894
+ to: json["to"] == null ? void 0 : json["to"]
4895
+ };
4896
+ }
4897
+
4898
+ // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
4899
+ function CatalogPriceResponseDataFromJSON(json) {
4900
+ return CatalogPriceResponseDataFromJSONTyped(json, false);
4901
+ }
4902
+ function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4903
+ if (json == null) {
4904
+ return json;
4905
+ }
4906
+ return {
4907
+ currency: CurrencyFromJSON(json["currency"]),
4908
+ id: json["id"],
4909
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4910
+ intervalCount: json["interval_count"],
4911
+ overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
4912
+ packageSize: json["package_size"],
4913
+ price: json["price"],
4914
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4915
+ priceTiers: json["price_tiers"].map(
4916
+ CatalogPriceTierResponseDataFromJSON
4917
+ ),
4918
+ scheme: BillingPriceSchemeFromJSON(json["scheme"]),
4919
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
4920
+ };
4921
+ }
4922
+
4923
+ // src/api/checkoutexternal/models/CatalogBundleCurrencyPriceResponseData.ts
4924
+ function CatalogBundleCurrencyPriceResponseDataFromJSON(json) {
4925
+ return CatalogBundleCurrencyPriceResponseDataFromJSONTyped(json, false);
4926
+ }
4927
+ function CatalogBundleCurrencyPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4928
+ if (json == null) {
4929
+ return json;
4930
+ }
4931
+ return {
4932
+ currency: CurrencyFromJSON(json["currency"]),
4933
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
4934
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
4935
+ };
4936
+ }
4937
+
4938
+ // src/api/checkoutexternal/models/CatalogAutoTopupResponseData.ts
4939
+ function CatalogAutoTopupResponseDataFromJSON(json) {
4940
+ return CatalogAutoTopupResponseDataFromJSONTyped(json, false);
4941
+ }
4942
+ function CatalogAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4943
+ if (json == null) {
4944
+ return json;
4945
+ }
4946
+ return {
4947
+ amount: json["amount"] == null ? void 0 : json["amount"],
4948
+ availability: BillingCreditAutoTopupAvailabilityFromJSON(
4949
+ json["availability"]
4950
+ ),
4951
+ companyAmount: json["company_amount"] == null ? void 0 : json["company_amount"],
4952
+ companyEnabled: json["company_enabled"] == null ? void 0 : json["company_enabled"],
4953
+ companyThresholdCredits: json["company_threshold_credits"] == null ? void 0 : json["company_threshold_credits"],
4954
+ creditId: json["credit_id"],
4955
+ currencyPrices: json["currency_prices"].map(
4956
+ CatalogBundleCurrencyPriceResponseDataFromJSON
4957
+ ),
4958
+ enabled: json["enabled"],
4959
+ planCreditGrantId: json["plan_credit_grant_id"],
4960
+ thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"],
4961
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
4962
+ };
4963
+ }
4964
+
4965
+ // src/api/checkoutexternal/models/CatalogCapabilitiesResponseData.ts
4966
+ function CatalogCapabilitiesResponseDataFromJSON(json) {
4967
+ return CatalogCapabilitiesResponseDataFromJSONTyped(json, false);
4968
+ }
4969
+ function CatalogCapabilitiesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4970
+ if (json == null) {
4971
+ return json;
4972
+ }
4973
+ return {
4974
+ badgeVisibility: json["badge_visibility"],
4975
+ checkout: json["checkout"]
4976
+ };
4977
+ }
4978
+
4979
+ // src/api/checkoutexternal/models/CatalogCheckoutFieldResponseData.ts
4980
+ function CatalogCheckoutFieldResponseDataFromJSON(json) {
4981
+ return CatalogCheckoutFieldResponseDataFromJSONTyped(json, false);
4982
+ }
4983
+ function CatalogCheckoutFieldResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4984
+ if (json == null) {
4985
+ return json;
4986
+ }
4987
+ return {
4988
+ helperText: json["helper_text"] == null ? void 0 : json["helper_text"],
4989
+ id: json["id"],
4990
+ name: json["name"],
4991
+ required: json["required"],
4992
+ value: json["value"] == null ? void 0 : json["value"]
4993
+ };
4994
+ }
4995
+
4996
+ // src/api/checkoutexternal/models/CheckoutBundlePurchaseBehavior.ts
4997
+ var CheckoutBundlePurchaseBehavior = {
4998
+ Individual: "individual",
4999
+ Quantity: "quantity"
5000
+ };
5001
+ function CheckoutBundlePurchaseBehaviorFromJSON(json) {
5002
+ return CheckoutBundlePurchaseBehaviorFromJSONTyped(json, false);
5003
+ }
5004
+ function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5005
+ return json;
5006
+ }
5007
+
5008
+ // src/api/checkoutexternal/models/ProrationBehavior.ts
5009
+ var ProrationBehavior = {
5010
+ CreateProrations: "create_prorations",
5011
+ InvoiceImmediately: "invoice_immediately"
5012
+ };
5013
+ function ProrationBehaviorFromJSON(json) {
5014
+ return ProrationBehaviorFromJSONTyped(json, false);
5015
+ }
5016
+ function ProrationBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5017
+ return json;
5018
+ }
5019
+
5020
+ // src/api/checkoutexternal/models/CatalogCheckoutSettingsResponseData.ts
5021
+ function CatalogCheckoutSettingsResponseDataFromJSON(json) {
5022
+ return CatalogCheckoutSettingsResponseDataFromJSONTyped(json, false);
5023
+ }
5024
+ function CatalogCheckoutSettingsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5025
+ if (json == null) {
5026
+ return json;
5027
+ }
5028
+ return {
5029
+ bundlePurchaseBehavior: CheckoutBundlePurchaseBehaviorFromJSON(
5030
+ json["bundle_purchase_behavior"]
5031
+ ),
5032
+ collectAddress: json["collect_address"],
5033
+ collectEmail: json["collect_email"],
5034
+ collectPhone: json["collect_phone"],
5035
+ collectTaxId: json["collect_tax_id"],
5036
+ customFields: json["custom_fields"].map(
5037
+ CatalogCheckoutFieldResponseDataFromJSON
5038
+ ),
5039
+ prorationBehavior: ProrationBehaviorFromJSON(json["proration_behavior"]),
5040
+ taxCollectionEnabled: json["tax_collection_enabled"]
5041
+ };
5042
+ }
5043
+
5044
+ // src/api/checkoutexternal/models/CatalogPlanRefResponseData.ts
5045
+ function CatalogPlanRefResponseDataFromJSON(json) {
5046
+ return CatalogPlanRefResponseDataFromJSONTyped(json, false);
5047
+ }
5048
+ function CatalogPlanRefResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5049
+ if (json == null) {
5050
+ return json;
5051
+ }
5052
+ return {
5053
+ id: json["id"],
5054
+ name: json["name"]
5055
+ };
5056
+ }
5057
+
5058
+ // src/api/checkoutexternal/models/CompanyPlanInvalidReason.ts
5059
+ var CompanyPlanInvalidReason = {
5060
+ DowngradeNotPermitted: "downgrade_not_permitted",
5061
+ FeatureUsageExceeded: "feature_usage_exceeded"
5062
+ };
5063
+ function CompanyPlanInvalidReasonFromJSON(json) {
5064
+ return CompanyPlanInvalidReasonFromJSONTyped(json, false);
5065
+ }
5066
+ function CompanyPlanInvalidReasonFromJSONTyped(json, ignoreDiscriminator) {
5067
+ return json;
5068
+ }
5069
+
5070
+ // src/api/checkoutexternal/models/CatalogUsageViolationResponseData.ts
5071
+ function CatalogUsageViolationResponseDataFromJSON(json) {
5072
+ return CatalogUsageViolationResponseDataFromJSONTyped(json, false);
5073
+ }
5074
+ function CatalogUsageViolationResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5075
+ if (json == null) {
5076
+ return json;
5077
+ }
5078
+ return {
5079
+ featureId: json["feature_id"],
5080
+ featureName: json["feature_name"],
5081
+ limit: json["limit"] == null ? void 0 : json["limit"],
5082
+ usage: json["usage"]
5083
+ };
5084
+ }
5085
+
5086
+ // src/api/checkoutexternal/models/EntitlementValueType.ts
5087
+ var EntitlementValueType = {
5088
+ Boolean: "boolean",
5089
+ Credit: "credit",
5090
+ Numeric: "numeric",
5091
+ Trait: "trait",
5092
+ Unknown: "unknown",
5093
+ Unlimited: "unlimited"
5094
+ };
5095
+ function EntitlementValueTypeFromJSON(json) {
5096
+ return EntitlementValueTypeFromJSONTyped(json, false);
5097
+ }
5098
+ function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
5099
+ return json;
5100
+ }
5101
+
5102
+ // src/api/checkoutexternal/models/FeatureType.ts
5103
+ var FeatureType = {
5104
+ Boolean: "boolean",
5105
+ Event: "event",
5106
+ License: "license",
5107
+ Trait: "trait"
5108
+ };
5109
+ function FeatureTypeFromJSON(json) {
5110
+ return FeatureTypeFromJSONTyped(json, false);
5111
+ }
5112
+ function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
5113
+ return json;
5114
+ }
5115
+
5116
+ // src/api/checkoutexternal/models/MetricPeriodMonthReset.ts
5117
+ function MetricPeriodMonthResetFromJSON(json) {
5118
+ return MetricPeriodMonthResetFromJSONTyped(json, false);
5119
+ }
5120
+ function MetricPeriodMonthResetFromJSONTyped(json, ignoreDiscriminator) {
5121
+ return json;
5122
+ }
5123
+
5124
+ // src/api/checkoutexternal/models/MetricPeriod.ts
5125
+ function MetricPeriodFromJSON(json) {
5126
+ return MetricPeriodFromJSONTyped(json, false);
5127
+ }
5128
+ function MetricPeriodFromJSONTyped(json, ignoreDiscriminator) {
5129
+ return json;
5130
+ }
5131
+
5132
+ // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
5133
+ var EntitlementPriceBehavior = {
5134
+ CreditBurndown: "credit_burndown",
5135
+ Overage: "overage",
5136
+ PayAsYouGo: "pay_as_you_go",
5137
+ PayInAdvance: "pay_in_advance",
5138
+ Tier: "tier"
5139
+ };
5140
+ function EntitlementPriceBehaviorFromJSON(json) {
5141
+ return EntitlementPriceBehaviorFromJSONTyped(json, false);
5142
+ }
5143
+ function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5144
+ return json;
5145
+ }
5146
+
5147
+ // src/api/checkoutexternal/models/CatalogCurrencyPricesResponseData.ts
5148
+ function CatalogCurrencyPricesResponseDataFromJSON(json) {
5149
+ return CatalogCurrencyPricesResponseDataFromJSONTyped(json, false);
5150
+ }
5151
+ function CatalogCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5152
+ if (json == null) {
5153
+ return json;
5154
+ }
5155
+ return {
5156
+ currency: CurrencyFromJSON(json["currency"]),
5157
+ monthlyPrice: json["monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["monthly_price"]),
5158
+ oneTimePrice: json["one_time_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["one_time_price"]),
5159
+ quarterlyPrice: json["quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["quarterly_price"]),
5160
+ yearlyPrice: json["yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["yearly_price"])
5161
+ };
5162
+ }
5163
+
5164
+ // src/api/checkoutexternal/models/CatalogPlanEntitlementResponseData.ts
5165
+ function CatalogPlanEntitlementResponseDataFromJSON(json) {
5166
+ return CatalogPlanEntitlementResponseDataFromJSONTyped(json, false);
5167
+ }
5168
+ function CatalogPlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5169
+ if (json == null) {
5170
+ return json;
5171
+ }
5172
+ return {
5173
+ consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
5174
+ creditEquivalentLimit: json["credit_equivalent_limit"] == null ? void 0 : json["credit_equivalent_limit"],
5175
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5176
+ creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
5177
+ creditName: json["credit_name"] == null ? void 0 : json["credit_name"],
5178
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5179
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5180
+ currencyPrices: json["currency_prices"].map(
5181
+ CatalogCurrencyPricesResponseDataFromJSON
5182
+ ),
5183
+ featureDescription: json["feature_description"],
5184
+ featureIcon: json["feature_icon"],
5185
+ featureId: json["feature_id"],
5186
+ featureName: json["feature_name"],
5187
+ featurePluralName: json["feature_plural_name"] == null ? void 0 : json["feature_plural_name"],
5188
+ featureSingularName: json["feature_singular_name"] == null ? void 0 : json["feature_singular_name"],
5189
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
5190
+ id: json["id"],
5191
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
5192
+ meteredMonthlyPrice: json["metered_monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_monthly_price"]),
5193
+ meteredQuarterlyPrice: json["metered_quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_quarterly_price"]),
5194
+ meteredYearlyPrice: json["metered_yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_yearly_price"]),
5195
+ metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
5196
+ metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
5197
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
5198
+ softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
5199
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
5200
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
5201
+ valueType: EntitlementValueTypeFromJSON(json["value_type"]),
5202
+ warningThreshold: json["warning_threshold"] == null ? void 0 : json["warning_threshold"]
5203
+ };
5204
+ }
5205
+
5206
+ // src/api/checkoutexternal/models/ChargeType.ts
5207
+ function ChargeTypeFromJSON(json) {
5208
+ return ChargeTypeFromJSONTyped(json, false);
5209
+ }
5210
+ function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
5211
+ return json;
5212
+ }
5213
+
4881
5214
  // src/api/checkoutexternal/models/CatalogCreditGrantResponseData.ts
4882
5215
  function CatalogCreditGrantResponseDataFromJSON(json) {
4883
5216
  return CatalogCreditGrantResponseDataFromJSONTyped(json, false);
@@ -4901,45 +5234,103 @@ function CatalogCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator)
4901
5234
  };
4902
5235
  }
4903
5236
 
4904
- // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
4905
- function CatalogPriceTierResponseDataFromJSON(json) {
4906
- return CatalogPriceTierResponseDataFromJSONTyped(json, false);
5237
+ // src/api/checkoutexternal/models/PlanPriceCadence.ts
5238
+ function PlanPriceCadenceFromJSON(json) {
5239
+ return PlanPriceCadenceFromJSONTyped(json, false);
4907
5240
  }
4908
- function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5241
+ function PlanPriceCadenceFromJSONTyped(json, ignoreDiscriminator) {
5242
+ return json;
5243
+ }
5244
+
5245
+ // src/api/checkoutexternal/models/CatalogCompanyPlanResponseData.ts
5246
+ function CatalogCompanyPlanResponseDataFromJSON(json) {
5247
+ return CatalogCompanyPlanResponseDataFromJSONTyped(json, false);
5248
+ }
5249
+ function CatalogCompanyPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4909
5250
  if (json == null) {
4910
5251
  return json;
4911
5252
  }
4912
5253
  return {
4913
- flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
4914
- from: json["from"],
4915
- perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
4916
- perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
4917
- to: json["to"] == null ? void 0 : json["to"]
5254
+ autoTopups: json["auto_topups"].map(
5255
+ CatalogAutoTopupResponseDataFromJSON
5256
+ ),
5257
+ availablePeriods: json["available_periods"].map(
5258
+ PlanPriceCadenceFromJSON
5259
+ ),
5260
+ billingStrategy: BillingStrategyFromJSON(json["billing_strategy"]),
5261
+ chargeType: ChargeTypeFromJSON(json["charge_type"]),
5262
+ companyCanTrial: json["company_can_trial"],
5263
+ compatiblePlanIds: json["compatible_plan_ids"] == null ? void 0 : json["compatible_plan_ids"],
5264
+ currencyPrices: json["currency_prices"].map(
5265
+ CatalogCurrencyPricesResponseDataFromJSON
5266
+ ),
5267
+ current: json["current"],
5268
+ description: json["description"],
5269
+ entitlements: json["entitlements"].map(
5270
+ CatalogPlanEntitlementResponseDataFromJSON
5271
+ ),
5272
+ icon: json["icon"],
5273
+ id: json["id"],
5274
+ includedCreditGrants: json["included_credit_grants"].map(
5275
+ CatalogCreditGrantResponseDataFromJSON
5276
+ ),
5277
+ invalidReason: json["invalid_reason"] == null ? void 0 : CompanyPlanInvalidReasonFromJSON(json["invalid_reason"]),
5278
+ isTrialable: json["is_trialable"],
5279
+ monthlyPrice: json["monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["monthly_price"]),
5280
+ name: json["name"],
5281
+ oneTimePrice: json["one_time_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["one_time_price"]),
5282
+ quarterlyPrice: json["quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["quarterly_price"]),
5283
+ trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
5284
+ usageViolations: json["usage_violations"].map(
5285
+ CatalogUsageViolationResponseDataFromJSON
5286
+ ),
5287
+ valid: json["valid"],
5288
+ yearlyPrice: json["yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["yearly_price"])
4918
5289
  };
4919
5290
  }
4920
5291
 
4921
- // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
4922
- function CatalogPriceResponseDataFromJSON(json) {
4923
- return CatalogPriceResponseDataFromJSONTyped(json, false);
5292
+ // src/api/checkoutexternal/models/CatalogCreditBundleResponseData.ts
5293
+ function CatalogCreditBundleResponseDataFromJSON(json) {
5294
+ return CatalogCreditBundleResponseDataFromJSONTyped(json, false);
4924
5295
  }
4925
- function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5296
+ function CatalogCreditBundleResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4926
5297
  if (json == null) {
4927
5298
  return json;
4928
5299
  }
4929
5300
  return {
4930
- currency: CurrencyFromJSON(json["currency"]),
4931
- id: json["id"],
4932
- interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4933
- intervalCount: json["interval_count"],
4934
- overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
4935
- packageSize: json["package_size"],
4936
- price: json["price"],
4937
- priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4938
- priceTiers: json["price_tiers"].map(
4939
- CatalogPriceTierResponseDataFromJSON
5301
+ bundleType: BillingCreditBundleTypeFromJSON(json["bundle_type"]),
5302
+ compatiblePlanIds: json["compatible_plan_ids"] == null ? void 0 : json["compatible_plan_ids"],
5303
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5304
+ creditId: json["credit_id"],
5305
+ creditName: json["credit_name"],
5306
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5307
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5308
+ currencyPrices: json["currency_prices"].map(
5309
+ CatalogBundleCurrencyPriceResponseDataFromJSON
4940
5310
  ),
4941
- scheme: BillingPriceSchemeFromJSON(json["scheme"]),
4942
- tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
5311
+ expiryType: BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
5312
+ expiryUnit: BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
5313
+ expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
5314
+ id: json["id"],
5315
+ name: json["name"],
5316
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
5317
+ quantity: json["quantity"] == null ? void 0 : json["quantity"],
5318
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
5319
+ };
5320
+ }
5321
+
5322
+ // src/api/checkoutexternal/models/CatalogCustomPlanCTAResponseData.ts
5323
+ function CatalogCustomPlanCTAResponseDataFromJSON(json) {
5324
+ return CatalogCustomPlanCTAResponseDataFromJSONTyped(json, false);
5325
+ }
5326
+ function CatalogCustomPlanCTAResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5327
+ if (json == null) {
5328
+ return json;
5329
+ }
5330
+ return {
5331
+ ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
5332
+ ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
5333
+ priceText: json["price_text"] == null ? void 0 : json["price_text"]
4943
5334
  };
4944
5335
  }
4945
5336
 
@@ -5113,26 +5504,6 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
5113
5504
  };
5114
5505
  }
5115
5506
 
5116
- // src/api/checkoutexternal/models/ChargeType.ts
5117
- function ChargeTypeFromJSON(json) {
5118
- return ChargeTypeFromJSONTyped(json, false);
5119
- }
5120
- function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
5121
- return json;
5122
- }
5123
-
5124
- // src/api/checkoutexternal/models/CheckoutBundlePurchaseBehavior.ts
5125
- var CheckoutBundlePurchaseBehavior = {
5126
- Individual: "individual",
5127
- Quantity: "quantity"
5128
- };
5129
- function CheckoutBundlePurchaseBehaviorFromJSON(json) {
5130
- return CheckoutBundlePurchaseBehaviorFromJSONTyped(json, false);
5131
- }
5132
- function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5133
- return json;
5134
- }
5135
-
5136
5507
  // src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
5137
5508
  function CheckoutPriceSnapshotFromJSON(json) {
5138
5509
  return CheckoutPriceSnapshotFromJSONTyped(json, false);
@@ -5148,6 +5519,8 @@ function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
5148
5519
  isScheduledDowngrade: json["is_scheduled_downgrade"],
5149
5520
  newCharges: json["new_charges"],
5150
5521
  optInRequired: json["opt_in_required"],
5522
+ optInText: json["opt_in_text"] == null ? void 0 : json["opt_in_text"],
5523
+ optInTitle: json["opt_in_title"] == null ? void 0 : json["opt_in_title"],
5151
5524
  paymentMethodRequired: json["payment_method_required"],
5152
5525
  percentOff: json["percent_off"],
5153
5526
  periodStart: new Date(json["period_start"]),
@@ -5169,6 +5542,17 @@ function CheckoutStatusFromJSONTyped(json, ignoreDiscriminator) {
5169
5542
  return json;
5170
5543
  }
5171
5544
 
5545
+ // src/api/checkoutexternal/models/CheckoutIntent.ts
5546
+ function CheckoutIntentFromJSON(json) {
5547
+ return CheckoutIntentFromJSONTyped(json, false);
5548
+ }
5549
+ function CheckoutIntentFromJSONTyped(json, ignoreDiscriminator) {
5550
+ return json;
5551
+ }
5552
+ function CheckoutIntentToJSON(value) {
5553
+ return value;
5554
+ }
5555
+
5172
5556
  // src/api/checkoutexternal/models/CheckoutSelectionsResponseData.ts
5173
5557
  function CheckoutSelectionsResponseDataFromJSON(json) {
5174
5558
  return CheckoutSelectionsResponseDataFromJSONTyped(json, false);
@@ -5189,9 +5573,11 @@ function CheckoutSelectionsResponseDataFromJSONTyped(json, ignoreDiscriminator)
5189
5573
  creditBundles: json["credit_bundles"].map(
5190
5574
  UpdateCreditBundleRequestBodyFromJSON
5191
5575
  ),
5576
+ currency: json["currency"] == null ? void 0 : json["currency"],
5192
5577
  customFieldValues: json["custom_field_values"].map(
5193
5578
  CheckoutFieldValueFromJSON
5194
5579
  ),
5580
+ intent: CheckoutIntentFromJSON(json["intent"]),
5195
5581
  newPlanId: json["new_plan_id"] == null ? void 0 : json["new_plan_id"],
5196
5582
  newPriceId: json["new_price_id"] == null ? void 0 : json["new_price_id"],
5197
5583
  optInAccepted: json["opt_in_accepted"] == null ? void 0 : json["opt_in_accepted"],
@@ -5291,11 +5677,6 @@ function CheckoutFieldWithValueFromJSONTyped(json, ignoreDiscriminator) {
5291
5677
  };
5292
5678
  }
5293
5679
 
5294
- // src/api/checkoutexternal/models/CheckoutIntent.ts
5295
- function CheckoutIntentToJSON(value) {
5296
- return value;
5297
- }
5298
-
5299
5680
  // src/api/checkoutexternal/models/ScheduledDowngradeConfigBehavior.ts
5300
5681
  function ScheduledDowngradeConfigBehaviorFromJSON(json) {
5301
5682
  return ScheduledDowngradeConfigBehaviorFromJSONTyped(json, false);
@@ -5400,43 +5781,194 @@ function CheckoutUnsubscribeResponseFromJSONTyped(json, ignoreDiscriminator) {
5400
5781
  };
5401
5782
  }
5402
5783
 
5403
- // src/api/checkoutexternal/models/ProrationBehavior.ts
5404
- var ProrationBehavior = {
5405
- CreateProrations: "create_prorations",
5406
- InvoiceImmediately: "invoice_immediately"
5784
+ // src/api/checkoutexternal/models/CompanyBillingProfileResponseData.ts
5785
+ function CompanyBillingProfileResponseDataFromJSON(json) {
5786
+ return CompanyBillingProfileResponseDataFromJSONTyped(json, false);
5787
+ }
5788
+ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5789
+ if (json == null) {
5790
+ return json;
5791
+ }
5792
+ return {
5793
+ accountId: json["account_id"],
5794
+ billingCustomerId: json["billing_customer_id"] == null ? void 0 : json["billing_customer_id"],
5795
+ collectionMethod: BillingCollectionMethodFromJSON(
5796
+ json["collection_method"]
5797
+ ),
5798
+ companyId: json["company_id"],
5799
+ createdAt: new Date(json["created_at"]),
5800
+ daysUntilDue: json["days_until_due"] == null ? void 0 : json["days_until_due"],
5801
+ environmentId: json["environment_id"],
5802
+ id: json["id"],
5803
+ isDefault: json["is_default"],
5804
+ name: json["name"] == null ? void 0 : json["name"],
5805
+ paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
5806
+ prorationBehavior: json["proration_behavior"] == null ? void 0 : ProrationBehaviorFromJSON(json["proration_behavior"]),
5807
+ providerType: BillingProviderTypeFromJSON(json["provider_type"]),
5808
+ updatedAt: new Date(json["updated_at"])
5809
+ };
5810
+ }
5811
+
5812
+ // src/api/checkoutexternal/models/CompanyCatalogResponseData.ts
5813
+ function CompanyCatalogResponseDataFromJSON(json) {
5814
+ return CompanyCatalogResponseDataFromJSONTyped(json, false);
5815
+ }
5816
+ function CompanyCatalogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5817
+ if (json == null) {
5818
+ return json;
5819
+ }
5820
+ return {
5821
+ addOns: json["add_ons"].map(
5822
+ CatalogCompanyPlanResponseDataFromJSON
5823
+ ),
5824
+ capabilities: CatalogCapabilitiesResponseDataFromJSON(json["capabilities"]),
5825
+ checkoutSettings: CatalogCheckoutSettingsResponseDataFromJSON(
5826
+ json["checkout_settings"]
5827
+ ),
5828
+ creditBundles: json["credit_bundles"].map(
5829
+ CatalogCreditBundleResponseDataFromJSON
5830
+ ),
5831
+ customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON(json["custom_plan_cta"]),
5832
+ defaultCurrency: CurrencyFromJSON(json["default_currency"]),
5833
+ description: json["description"] == null ? void 0 : json["description"],
5834
+ id: json["id"],
5835
+ name: json["name"],
5836
+ plans: json["plans"].map(
5837
+ CatalogCompanyPlanResponseDataFromJSON
5838
+ ),
5839
+ preventSelfServiceDowngrade: json["prevent_self_service_downgrade"],
5840
+ preventSelfServiceDowngradeButtonText: json["prevent_self_service_downgrade_button_text"] == null ? void 0 : json["prevent_self_service_downgrade_button_text"],
5841
+ preventSelfServiceDowngradeUrl: json["prevent_self_service_downgrade_url"] == null ? void 0 : json["prevent_self_service_downgrade_url"],
5842
+ pricingModel: json["pricing_model"] == null ? void 0 : json["pricing_model"],
5843
+ pricingUrl: json["pricing_url"] == null ? void 0 : json["pricing_url"],
5844
+ trialExpiryPlan: json["trial_expiry_plan"] == null ? void 0 : CatalogPlanRefResponseDataFromJSON(json["trial_expiry_plan"]),
5845
+ trialPaymentMethodRequired: json["trial_payment_method_required"] == null ? void 0 : json["trial_payment_method_required"]
5846
+ };
5847
+ }
5848
+
5849
+ // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5850
+ var CustomPlanActivationStrategy = {
5851
+ Payment: "on_payment",
5852
+ Publish: "on_publish"
5407
5853
  };
5408
- function ProrationBehaviorFromJSON(json) {
5409
- return ProrationBehaviorFromJSONTyped(json, false);
5854
+ function CustomPlanActivationStrategyFromJSON(json) {
5855
+ return CustomPlanActivationStrategyFromJSONTyped(json, false);
5410
5856
  }
5411
- function ProrationBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5857
+ function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5412
5858
  return json;
5413
5859
  }
5414
5860
 
5415
- // src/api/checkoutexternal/models/CompanyBillingProfileResponseData.ts
5416
- function CompanyBillingProfileResponseDataFromJSON(json) {
5417
- return CompanyBillingProfileResponseDataFromJSONTyped(json, false);
5861
+ // src/api/checkoutexternal/models/CompanyContextCustomPlanBillingResponseData.ts
5862
+ function CompanyContextCustomPlanBillingResponseDataFromJSON(json) {
5863
+ return CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, false);
5418
5864
  }
5419
- function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5865
+ function CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5866
+ if (json == null) {
5867
+ return json;
5868
+ }
5869
+ return {
5870
+ activationStrategy: CustomPlanActivationStrategyFromJSON(
5871
+ json["activation_strategy"]
5872
+ ),
5873
+ dueAt: new Date(json["due_at"]),
5874
+ invoiceUrl: json["invoice_url"] == null ? void 0 : json["invoice_url"],
5875
+ planId: json["plan_id"],
5876
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"]
5877
+ };
5878
+ }
5879
+
5880
+ // src/api/checkoutexternal/models/CompanyContextPlanResponseData.ts
5881
+ function CompanyContextPlanResponseDataFromJSON(json) {
5882
+ return CompanyContextPlanResponseDataFromJSONTyped(json, false);
5883
+ }
5884
+ function CompanyContextPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5885
+ if (json == null) {
5886
+ return json;
5887
+ }
5888
+ return {
5889
+ description: json["description"] == null ? void 0 : json["description"],
5890
+ id: json["id"],
5891
+ includedCreditIds: json["included_credit_ids"],
5892
+ name: json["name"],
5893
+ period: json["period"] == null ? void 0 : json["period"],
5894
+ price: json["price"] == null ? void 0 : json["price"]
5895
+ };
5896
+ }
5897
+
5898
+ // src/api/checkoutexternal/models/CompanyContextScheduledDowngradeResponseData.ts
5899
+ function CompanyContextScheduledDowngradeResponseDataFromJSON(json) {
5900
+ return CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, false);
5901
+ }
5902
+ function CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5903
+ if (json == null) {
5904
+ return json;
5905
+ }
5906
+ return {
5907
+ fromPlanId: json["from_plan_id"],
5908
+ fromPlanName: json["from_plan_name"],
5909
+ toPlanId: json["to_plan_id"],
5910
+ toPlanName: json["to_plan_name"]
5911
+ };
5912
+ }
5913
+
5914
+ // src/api/checkoutexternal/models/CompanyContextSubscriptionResponseData.ts
5915
+ function CompanyContextSubscriptionResponseDataFromJSON(json) {
5916
+ return CompanyContextSubscriptionResponseDataFromJSONTyped(json, false);
5917
+ }
5918
+ function CompanyContextSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5919
+ if (json == null) {
5920
+ return json;
5921
+ }
5922
+ return {
5923
+ cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
5924
+ cancelAtPeriodEnd: json["cancel_at_period_end"],
5925
+ currency: CurrencyFromJSON(json["currency"]),
5926
+ nextBillAt: json["next_bill_at"] == null ? void 0 : new Date(json["next_bill_at"]),
5927
+ period: json["period"] == null ? void 0 : json["period"],
5928
+ periodEnd: json["period_end"] == null ? void 0 : new Date(json["period_end"]),
5929
+ status: json["status"],
5930
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
5931
+ };
5932
+ }
5933
+
5934
+ // src/api/checkoutexternal/models/CompanyContextResponseData.ts
5935
+ function CompanyContextResponseDataFromJSON(json) {
5936
+ return CompanyContextResponseDataFromJSONTyped(json, false);
5937
+ }
5938
+ function CompanyContextResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5939
+ if (json == null) {
5940
+ return json;
5941
+ }
5942
+ return {
5943
+ addOns: json["add_ons"].map(
5944
+ CompanyContextPlanResponseDataFromJSON
5945
+ ),
5946
+ customPlanBilling: json["custom_plan_billing"] == null ? void 0 : CompanyContextCustomPlanBillingResponseDataFromJSON(
5947
+ json["custom_plan_billing"]
5948
+ ),
5949
+ id: json["id"],
5950
+ name: json["name"],
5951
+ plan: json["plan"] == null ? void 0 : CompanyContextPlanResponseDataFromJSON(json["plan"]),
5952
+ scheduledDowngrade: json["scheduled_downgrade"] == null ? void 0 : CompanyContextScheduledDowngradeResponseDataFromJSON(
5953
+ json["scheduled_downgrade"]
5954
+ ),
5955
+ subscription: json["subscription"] == null ? void 0 : CompanyContextSubscriptionResponseDataFromJSON(json["subscription"])
5956
+ };
5957
+ }
5958
+
5959
+ // src/api/checkoutexternal/models/CompanyCreditAutoTopupResponseData.ts
5960
+ function CompanyCreditAutoTopupResponseDataFromJSON(json) {
5961
+ return CompanyCreditAutoTopupResponseDataFromJSONTyped(json, false);
5962
+ }
5963
+ function CompanyCreditAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5420
5964
  if (json == null) {
5421
5965
  return json;
5422
5966
  }
5423
5967
  return {
5424
- accountId: json["account_id"],
5425
- billingCustomerId: json["billing_customer_id"] == null ? void 0 : json["billing_customer_id"],
5426
- collectionMethod: BillingCollectionMethodFromJSON(
5427
- json["collection_method"]
5428
- ),
5429
- companyId: json["company_id"],
5430
- createdAt: new Date(json["created_at"]),
5431
- daysUntilDue: json["days_until_due"] == null ? void 0 : json["days_until_due"],
5432
- environmentId: json["environment_id"],
5433
- id: json["id"],
5434
- isDefault: json["is_default"],
5435
- name: json["name"] == null ? void 0 : json["name"],
5436
- paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
5437
- prorationBehavior: json["proration_behavior"] == null ? void 0 : ProrationBehaviorFromJSON(json["proration_behavior"]),
5438
- providerType: BillingProviderTypeFromJSON(json["provider_type"]),
5439
- updatedAt: new Date(json["updated_at"])
5968
+ amount: json["amount"] == null ? void 0 : json["amount"],
5969
+ enabled: json["enabled"],
5970
+ selfService: json["self_service"],
5971
+ thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"]
5440
5972
  };
5441
5973
  }
5442
5974
 
@@ -5497,6 +6029,7 @@ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator
5497
6029
  return json;
5498
6030
  }
5499
6031
  return {
6032
+ autoTopup: json["auto_topup"] == null ? void 0 : CompanyCreditAutoTopupResponseDataFromJSON(json["auto_topup"]),
5500
6033
  composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
5501
6034
  creditDescription: json["credit_description"],
5502
6035
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
@@ -5703,30 +6236,6 @@ function CompanyPlanWithBillingSubViewFromJSONTyped(json, ignoreDiscriminator) {
5703
6236
  };
5704
6237
  }
5705
6238
 
5706
- // src/api/checkoutexternal/models/EntitlementValueType.ts
5707
- var EntitlementValueType = {
5708
- Boolean: "boolean",
5709
- Credit: "credit",
5710
- Numeric: "numeric",
5711
- Trait: "trait",
5712
- Unknown: "unknown",
5713
- Unlimited: "unlimited"
5714
- };
5715
- function EntitlementValueTypeFromJSON(json) {
5716
- return EntitlementValueTypeFromJSONTyped(json, false);
5717
- }
5718
- function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
5719
- return json;
5720
- }
5721
-
5722
- // src/api/checkoutexternal/models/MetricPeriodMonthReset.ts
5723
- function MetricPeriodMonthResetFromJSON(json) {
5724
- return MetricPeriodMonthResetFromJSONTyped(json, false);
5725
- }
5726
- function MetricPeriodMonthResetFromJSONTyped(json, ignoreDiscriminator) {
5727
- return json;
5728
- }
5729
-
5730
6239
  // src/api/checkoutexternal/models/WarningTier.ts
5731
6240
  function WarningTierFromJSON(json) {
5732
6241
  return WarningTierFromJSONTyped(json, false);
@@ -5741,14 +6250,6 @@ function WarningTierFromJSONTyped(json, ignoreDiscriminator) {
5741
6250
  };
5742
6251
  }
5743
6252
 
5744
- // src/api/checkoutexternal/models/MetricPeriod.ts
5745
- function MetricPeriodFromJSON(json) {
5746
- return MetricPeriodFromJSONTyped(json, false);
5747
- }
5748
- function MetricPeriodFromJSONTyped(json, ignoreDiscriminator) {
5749
- return json;
5750
- }
5751
-
5752
6253
  // src/api/checkoutexternal/models/FeatureEntitlement.ts
5753
6254
  function FeatureEntitlementFromJSON(json) {
5754
6255
  return FeatureEntitlementFromJSONTyped(json, false);
@@ -5773,6 +6274,7 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
5773
6274
  metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
5774
6275
  metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
5775
6276
  monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
6277
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
5776
6278
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
5777
6279
  usage: json["usage"] == null ? void 0 : json["usage"],
5778
6280
  valueType: EntitlementValueTypeFromJSON(json["value_type"]),
@@ -5857,18 +6359,6 @@ function EntityTraitDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5857
6359
  };
5858
6360
  }
5859
6361
 
5860
- // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5861
- var CustomPlanActivationStrategy = {
5862
- Payment: "on_payment",
5863
- Publish: "on_publish"
5864
- };
5865
- function CustomPlanActivationStrategyFromJSON(json) {
5866
- return CustomPlanActivationStrategyFromJSONTyped(json, false);
5867
- }
5868
- function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5869
- return json;
5870
- }
5871
-
5872
6362
  // src/api/checkoutexternal/models/CustomPlanBillingStatus.ts
5873
6363
  var CustomPlanBillingStatus = {
5874
6364
  Active: "active",
@@ -5905,6 +6395,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5905
6395
  ),
5906
6396
  billingCycleAnchor: json["billing_cycle_anchor"] == null ? void 0 : new Date(json["billing_cycle_anchor"]),
5907
6397
  billingStartDate: json["billing_start_date"] == null ? void 0 : new Date(json["billing_start_date"]),
6398
+ checkoutId: json["checkout_id"] == null ? void 0 : json["checkout_id"],
5908
6399
  companyId: json["company_id"],
5909
6400
  createdAt: new Date(json["created_at"]),
5910
6401
  daysUntilDue: json["days_until_due"],
@@ -5914,6 +6405,9 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5914
6405
  paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
5915
6406
  planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
5916
6407
  planId: json["plan_id"],
6408
+ problems: json["problems"].map(
6409
+ CheckoutProblemResponseDataFromJSON
6410
+ ),
5917
6411
  prorateFirstPeriod: json["prorate_first_period"] == null ? void 0 : json["prorate_first_period"],
5918
6412
  publishedAt: json["published_at"] == null ? void 0 : new Date(json["published_at"]),
5919
6413
  sendInvoice: json["send_invoice"],
@@ -6074,6 +6568,7 @@ function ConditionFromJSONTyped(json, ignoreDiscriminator) {
6074
6568
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
6075
6569
  metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
6076
6570
  operator: ComparableOperatorFromJSON(json["operator"]),
6571
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
6077
6572
  resourceIds: json["resource_ids"],
6078
6573
  traitDefinition: json["trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["trait_definition"]),
6079
6574
  traitValue: json["trait_value"]
@@ -6200,35 +6695,6 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6200
6695
  };
6201
6696
  }
6202
6697
 
6203
- // src/api/checkoutexternal/models/FeatureType.ts
6204
- var FeatureType = {
6205
- Boolean: "boolean",
6206
- Event: "event",
6207
- License: "license",
6208
- Trait: "trait"
6209
- };
6210
- function FeatureTypeFromJSON(json) {
6211
- return FeatureTypeFromJSONTyped(json, false);
6212
- }
6213
- function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6214
- return json;
6215
- }
6216
-
6217
- // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6218
- var EntitlementPriceBehavior = {
6219
- CreditBurndown: "credit_burndown",
6220
- Overage: "overage",
6221
- PayAsYouGo: "pay_as_you_go",
6222
- PayInAdvance: "pay_in_advance",
6223
- Tier: "tier"
6224
- };
6225
- function EntitlementPriceBehaviorFromJSON(json) {
6226
- return EntitlementPriceBehaviorFromJSONTyped(json, false);
6227
- }
6228
- function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6229
- return json;
6230
- }
6231
-
6232
6698
  // src/api/checkoutexternal/models/EntitlementType.ts
6233
6699
  function EntitlementTypeFromJSON(json) {
6234
6700
  return EntitlementTypeFromJSONTyped(json, false);
@@ -6511,26 +6977,6 @@ function CompanyPaymentMethodsResponseDataFromJSONTyped(json, ignoreDiscriminato
6511
6977
  };
6512
6978
  }
6513
6979
 
6514
- // src/api/checkoutexternal/models/CompanyPlanInvalidReason.ts
6515
- var CompanyPlanInvalidReason = {
6516
- DowngradeNotPermitted: "downgrade_not_permitted",
6517
- FeatureUsageExceeded: "feature_usage_exceeded"
6518
- };
6519
- function CompanyPlanInvalidReasonFromJSON(json) {
6520
- return CompanyPlanInvalidReasonFromJSONTyped(json, false);
6521
- }
6522
- function CompanyPlanInvalidReasonFromJSONTyped(json, ignoreDiscriminator) {
6523
- return json;
6524
- }
6525
-
6526
- // src/api/checkoutexternal/models/PlanPriceCadence.ts
6527
- function PlanPriceCadenceFromJSON(json) {
6528
- return PlanPriceCadenceFromJSONTyped(json, false);
6529
- }
6530
- function PlanPriceCadenceFromJSONTyped(json, ignoreDiscriminator) {
6531
- return json;
6532
- }
6533
-
6534
6980
  // src/api/checkoutexternal/models/EstimatedPlanTotal.ts
6535
6981
  function EstimatedPlanTotalFromJSON(json) {
6536
6982
  return EstimatedPlanTotalFromJSONTyped(json, false);
@@ -7011,6 +7457,20 @@ function PlanVersionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7011
7457
  };
7012
7458
  }
7013
7459
 
7460
+ // src/api/checkoutexternal/models/PlanCreditVisibility.ts
7461
+ function PlanCreditVisibilityFromJSON(json) {
7462
+ return PlanCreditVisibilityFromJSONTyped(json, false);
7463
+ }
7464
+ function PlanCreditVisibilityFromJSONTyped(json, ignoreDiscriminator) {
7465
+ if (json == null) {
7466
+ return json;
7467
+ }
7468
+ return {
7469
+ creditId: json["credit_id"],
7470
+ visible: json["visible"]
7471
+ };
7472
+ }
7473
+
7014
7474
  // src/api/checkoutexternal/models/CreditUsageAggregation.ts
7015
7475
  function CreditUsageAggregationFromJSON(json) {
7016
7476
  return CreditUsageAggregationFromJSONTyped(json, false);
@@ -7124,6 +7584,9 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7124
7584
  controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
7125
7585
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
7126
7586
  createdAt: new Date(json["created_at"]),
7587
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
7588
+ PlanCreditVisibilityFromJSON
7589
+ ),
7127
7590
  credits: json["credits"].map(
7128
7591
  BillingCreditResponseDataFromJSON
7129
7592
  ),
@@ -7843,6 +8306,34 @@ function FinalizeCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
7843
8306
  };
7844
8307
  }
7845
8308
 
8309
+ // src/api/checkoutexternal/models/GetCatalogViewByIDResponse.ts
8310
+ function GetCatalogViewByIDResponseFromJSON(json) {
8311
+ return GetCatalogViewByIDResponseFromJSONTyped(json, false);
8312
+ }
8313
+ function GetCatalogViewByIDResponseFromJSONTyped(json, ignoreDiscriminator) {
8314
+ if (json == null) {
8315
+ return json;
8316
+ }
8317
+ return {
8318
+ data: CompanyCatalogResponseDataFromJSON(json["data"]),
8319
+ params: json["params"]
8320
+ };
8321
+ }
8322
+
8323
+ // src/api/checkoutexternal/models/GetCatalogViewResponse.ts
8324
+ function GetCatalogViewResponseFromJSON(json) {
8325
+ return GetCatalogViewResponseFromJSONTyped(json, false);
8326
+ }
8327
+ function GetCatalogViewResponseFromJSONTyped(json, ignoreDiscriminator) {
8328
+ if (json == null) {
8329
+ return json;
8330
+ }
8331
+ return {
8332
+ data: CompanyCatalogResponseDataFromJSON(json["data"]),
8333
+ params: json["params"]
8334
+ };
8335
+ }
8336
+
7846
8337
  // src/api/checkoutexternal/models/GetCheckoutResponse.ts
7847
8338
  function GetCheckoutResponseFromJSON(json) {
7848
8339
  return GetCheckoutResponseFromJSONTyped(json, false);
@@ -8011,6 +8502,20 @@ function GetCompanyPaymentMethodsResponseFromJSONTyped(json, ignoreDiscriminator
8011
8502
  };
8012
8503
  }
8013
8504
 
8505
+ // src/api/checkoutexternal/models/GetCompanyResponse.ts
8506
+ function GetCompanyResponseFromJSON(json) {
8507
+ return GetCompanyResponseFromJSONTyped(json, false);
8508
+ }
8509
+ function GetCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
8510
+ if (json == null) {
8511
+ return json;
8512
+ }
8513
+ return {
8514
+ data: CompanyContextResponseDataFromJSON(json["data"]),
8515
+ params: json["params"]
8516
+ };
8517
+ }
8518
+
8014
8519
  // src/api/checkoutexternal/models/GetCompanyUpcomingInvoiceResponse.ts
8015
8520
  function GetCompanyUpcomingInvoiceResponseFromJSON(json) {
8016
8521
  return GetCompanyUpcomingInvoiceResponseFromJSONTyped(json, false);
@@ -8789,6 +9294,82 @@ var CheckoutexternalApi = class extends BaseAPI {
8789
9294
  );
8790
9295
  return await response.value();
8791
9296
  }
9297
+ /**
9298
+ * Get catalog view
9299
+ */
9300
+ async getCatalogViewRaw(initOverrides) {
9301
+ const queryParameters = {};
9302
+ const headerParameters = {};
9303
+ if (this.configuration && this.configuration.apiKey) {
9304
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9305
+ "X-Schematic-Api-Key"
9306
+ );
9307
+ }
9308
+ const response = await this.request(
9309
+ {
9310
+ path: `/catalog/view`,
9311
+ method: "GET",
9312
+ headers: headerParameters,
9313
+ query: queryParameters
9314
+ },
9315
+ initOverrides
9316
+ );
9317
+ return new JSONApiResponse(
9318
+ response,
9319
+ (jsonValue) => GetCatalogViewResponseFromJSON(jsonValue)
9320
+ );
9321
+ }
9322
+ /**
9323
+ * Get catalog view
9324
+ */
9325
+ async getCatalogView(initOverrides) {
9326
+ const response = await this.getCatalogViewRaw(initOverrides);
9327
+ return await response.value();
9328
+ }
9329
+ /**
9330
+ * Get catalog view by ID
9331
+ */
9332
+ async getCatalogViewByIDRaw(requestParameters, initOverrides) {
9333
+ if (requestParameters["catalogId"] == null) {
9334
+ throw new RequiredError(
9335
+ "catalogId",
9336
+ 'Required parameter "catalogId" was null or undefined when calling getCatalogViewByID().'
9337
+ );
9338
+ }
9339
+ const queryParameters = {};
9340
+ const headerParameters = {};
9341
+ if (this.configuration && this.configuration.apiKey) {
9342
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9343
+ "X-Schematic-Api-Key"
9344
+ );
9345
+ }
9346
+ const response = await this.request(
9347
+ {
9348
+ path: `/catalogs/{catalog_id}/view`.replace(
9349
+ `{${"catalog_id"}}`,
9350
+ encodeURIComponent(String(requestParameters["catalogId"]))
9351
+ ),
9352
+ method: "GET",
9353
+ headers: headerParameters,
9354
+ query: queryParameters
9355
+ },
9356
+ initOverrides
9357
+ );
9358
+ return new JSONApiResponse(
9359
+ response,
9360
+ (jsonValue) => GetCatalogViewByIDResponseFromJSON(jsonValue)
9361
+ );
9362
+ }
9363
+ /**
9364
+ * Get catalog view by ID
9365
+ */
9366
+ async getCatalogViewByID(requestParameters, initOverrides) {
9367
+ const response = await this.getCatalogViewByIDRaw(
9368
+ requestParameters,
9369
+ initOverrides
9370
+ );
9371
+ return await response.value();
9372
+ }
8792
9373
  /**
8793
9374
  * Get checkout
8794
9375
  */
@@ -8865,6 +9446,38 @@ var CheckoutexternalApi = class extends BaseAPI {
8865
9446
  const response = await this.getCheckoutTaxIDRaw(initOverrides);
8866
9447
  return await response.value();
8867
9448
  }
9449
+ /**
9450
+ * Get company
9451
+ */
9452
+ async getCompanyRaw(initOverrides) {
9453
+ const queryParameters = {};
9454
+ const headerParameters = {};
9455
+ if (this.configuration && this.configuration.apiKey) {
9456
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9457
+ "X-Schematic-Api-Key"
9458
+ );
9459
+ }
9460
+ const response = await this.request(
9461
+ {
9462
+ path: `/company`,
9463
+ method: "GET",
9464
+ headers: headerParameters,
9465
+ query: queryParameters
9466
+ },
9467
+ initOverrides
9468
+ );
9469
+ return new JSONApiResponse(
9470
+ response,
9471
+ (jsonValue) => GetCompanyResponseFromJSON(jsonValue)
9472
+ );
9473
+ }
9474
+ /**
9475
+ * Get company
9476
+ */
9477
+ async getCompany(initOverrides) {
9478
+ const response = await this.getCompanyRaw(initOverrides);
9479
+ return await response.value();
9480
+ }
8868
9481
  /**
8869
9482
  * Get company credit balances
8870
9483
  */
@@ -10015,9 +10628,9 @@ function BillingArrearsCadenceFromJSONTyped7(json, ignoreDiscriminator) {
10015
10628
 
10016
10629
  // src/api/componentspublic/models/BillingCreditAutoTopupAvailability.ts
10017
10630
  function BillingCreditAutoTopupAvailabilityFromJSON2(json) {
10018
- return BillingCreditAutoTopupAvailabilityFromJSONTyped5(json, false);
10631
+ return BillingCreditAutoTopupAvailabilityFromJSONTyped6(json, false);
10019
10632
  }
10020
- function BillingCreditAutoTopupAvailabilityFromJSONTyped5(json, ignoreDiscriminator) {
10633
+ function BillingCreditAutoTopupAvailabilityFromJSONTyped6(json, ignoreDiscriminator) {
10021
10634
  return json;
10022
10635
  }
10023
10636
 
@@ -10031,17 +10644,17 @@ function BillingCreditBurnStrategyFromJSONTyped4(json, ignoreDiscriminator) {
10031
10644
 
10032
10645
  // src/api/componentspublic/models/BillingCreditExpiryType.ts
10033
10646
  function BillingCreditExpiryTypeFromJSON2(json) {
10034
- return BillingCreditExpiryTypeFromJSONTyped7(json, false);
10647
+ return BillingCreditExpiryTypeFromJSONTyped8(json, false);
10035
10648
  }
10036
- function BillingCreditExpiryTypeFromJSONTyped7(json, ignoreDiscriminator) {
10649
+ function BillingCreditExpiryTypeFromJSONTyped8(json, ignoreDiscriminator) {
10037
10650
  return json;
10038
10651
  }
10039
10652
 
10040
10653
  // src/api/componentspublic/models/BillingCreditExpiryUnit.ts
10041
10654
  function BillingCreditExpiryUnitFromJSON2(json) {
10042
- return BillingCreditExpiryUnitFromJSONTyped9(json, false);
10655
+ return BillingCreditExpiryUnitFromJSONTyped10(json, false);
10043
10656
  }
10044
- function BillingCreditExpiryUnitFromJSONTyped9(json, ignoreDiscriminator) {
10657
+ function BillingCreditExpiryUnitFromJSONTyped10(json, ignoreDiscriminator) {
10045
10658
  return json;
10046
10659
  }
10047
10660
 
@@ -10055,9 +10668,9 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
10055
10668
 
10056
10669
  // src/api/componentspublic/models/Currency.ts
10057
10670
  function CurrencyFromJSON2(json) {
10058
- return CurrencyFromJSONTyped33(json, false);
10671
+ return CurrencyFromJSONTyped38(json, false);
10059
10672
  }
10060
- function CurrencyFromJSONTyped33(json, ignoreDiscriminator) {
10673
+ function CurrencyFromJSONTyped38(json, ignoreDiscriminator) {
10061
10674
  return json;
10062
10675
  }
10063
10676
 
@@ -10439,41 +11052,41 @@ function BillingProductDetailResponseDataFromJSONTyped5(json, ignoreDiscriminato
10439
11052
 
10440
11053
  // src/api/componentspublic/models/BillingStrategy.ts
10441
11054
  function BillingStrategyFromJSON2(json) {
10442
- return BillingStrategyFromJSONTyped5(json, false);
11055
+ return BillingStrategyFromJSONTyped7(json, false);
10443
11056
  }
10444
- function BillingStrategyFromJSONTyped5(json, ignoreDiscriminator) {
11057
+ function BillingStrategyFromJSONTyped7(json, ignoreDiscriminator) {
10445
11058
  return json;
10446
11059
  }
10447
11060
 
10448
11061
  // src/api/componentspublic/models/ChargeType.ts
10449
11062
  function ChargeTypeFromJSON2(json) {
10450
- return ChargeTypeFromJSONTyped5(json, false);
11063
+ return ChargeTypeFromJSONTyped7(json, false);
10451
11064
  }
10452
- function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
11065
+ function ChargeTypeFromJSONTyped7(json, ignoreDiscriminator) {
10453
11066
  return json;
10454
11067
  }
10455
11068
 
10456
11069
  // src/api/componentspublic/models/EntitlementValueType.ts
10457
11070
  function EntitlementValueTypeFromJSON2(json) {
10458
- return EntitlementValueTypeFromJSONTyped8(json, false);
11071
+ return EntitlementValueTypeFromJSONTyped10(json, false);
10459
11072
  }
10460
- function EntitlementValueTypeFromJSONTyped8(json, ignoreDiscriminator) {
11073
+ function EntitlementValueTypeFromJSONTyped10(json, ignoreDiscriminator) {
10461
11074
  return json;
10462
11075
  }
10463
11076
 
10464
11077
  // src/api/componentspublic/models/MetricPeriodMonthReset.ts
10465
11078
  function MetricPeriodMonthResetFromJSON2(json) {
10466
- return MetricPeriodMonthResetFromJSONTyped12(json, false);
11079
+ return MetricPeriodMonthResetFromJSONTyped14(json, false);
10467
11080
  }
10468
- function MetricPeriodMonthResetFromJSONTyped12(json, ignoreDiscriminator) {
11081
+ function MetricPeriodMonthResetFromJSONTyped14(json, ignoreDiscriminator) {
10469
11082
  return json;
10470
11083
  }
10471
11084
 
10472
11085
  // src/api/componentspublic/models/MetricPeriod.ts
10473
11086
  function MetricPeriodFromJSON2(json) {
10474
- return MetricPeriodFromJSONTyped12(json, false);
11087
+ return MetricPeriodFromJSONTyped14(json, false);
10475
11088
  }
10476
- function MetricPeriodFromJSONTyped12(json, ignoreDiscriminator) {
11089
+ function MetricPeriodFromJSONTyped14(json, ignoreDiscriminator) {
10477
11090
  return json;
10478
11091
  }
10479
11092
 
@@ -10581,9 +11194,9 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
10581
11194
 
10582
11195
  // src/api/componentspublic/models/EntitlementPriceBehavior.ts
10583
11196
  function EntitlementPriceBehaviorFromJSON2(json) {
10584
- return EntitlementPriceBehaviorFromJSONTyped6(json, false);
11197
+ return EntitlementPriceBehaviorFromJSONTyped8(json, false);
10585
11198
  }
10586
- function EntitlementPriceBehaviorFromJSONTyped6(json, ignoreDiscriminator) {
11199
+ function EntitlementPriceBehaviorFromJSONTyped8(json, ignoreDiscriminator) {
10587
11200
  return json;
10588
11201
  }
10589
11202
 
@@ -10650,9 +11263,9 @@ function FeatureEventSourceFromJSONTyped4(json, ignoreDiscriminator) {
10650
11263
 
10651
11264
  // src/api/componentspublic/models/FeatureType.ts
10652
11265
  function FeatureTypeFromJSON2(json) {
10653
- return FeatureTypeFromJSONTyped5(json, false);
11266
+ return FeatureTypeFromJSONTyped7(json, false);
10654
11267
  }
10655
- function FeatureTypeFromJSONTyped5(json, ignoreDiscriminator) {
11268
+ function FeatureTypeFromJSONTyped7(json, ignoreDiscriminator) {
10656
11269
  return json;
10657
11270
  }
10658
11271
 
@@ -11008,9 +11621,9 @@ function PlanEntitlementResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
11008
11621
 
11009
11622
  // src/api/componentspublic/models/PlanPriceCadence.ts
11010
11623
  function PlanPriceCadenceFromJSON2(json) {
11011
- return PlanPriceCadenceFromJSONTyped5(json, false);
11624
+ return PlanPriceCadenceFromJSONTyped7(json, false);
11012
11625
  }
11013
- function PlanPriceCadenceFromJSONTyped5(json, ignoreDiscriminator) {
11626
+ function PlanPriceCadenceFromJSONTyped7(json, ignoreDiscriminator) {
11014
11627
  return json;
11015
11628
  }
11016
11629
 
@@ -11132,6 +11745,20 @@ function PlanVersionResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
11132
11745
  };
11133
11746
  }
11134
11747
 
11748
+ // src/api/componentspublic/models/PlanCreditVisibility.ts
11749
+ function PlanCreditVisibilityFromJSON2(json) {
11750
+ return PlanCreditVisibilityFromJSONTyped3(json, false);
11751
+ }
11752
+ function PlanCreditVisibilityFromJSONTyped3(json, ignoreDiscriminator) {
11753
+ if (json == null) {
11754
+ return json;
11755
+ }
11756
+ return {
11757
+ creditId: json["credit_id"],
11758
+ visible: json["visible"]
11759
+ };
11760
+ }
11761
+
11135
11762
  // src/api/componentspublic/models/PlanViewPublicResponseData.ts
11136
11763
  function PlanViewPublicResponseDataFromJSON(json) {
11137
11764
  return PlanViewPublicResponseDataFromJSONTyped(json, false);
@@ -11163,6 +11790,9 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11163
11790
  controlledBy: BillingProviderTypeFromJSON2(json["controlled_by"]),
11164
11791
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
11165
11792
  createdAt: new Date(json["created_at"]),
11793
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
11794
+ PlanCreditVisibilityFromJSON2
11795
+ ),
11166
11796
  credits: json["credits"].map(
11167
11797
  BillingCreditResponseDataFromJSON2
11168
11798
  ),
@@ -15048,6 +15678,17 @@ function getResetCadencePeriod(cadence) {
15048
15678
  function isPerLicenseGrant(grant) {
15049
15679
  return grant.scaling === PlanCreditGrantScaling.PerLicense;
15050
15680
  }
15681
+ function getDisplayedPlanCreditGrants(plan) {
15682
+ if (!plan) {
15683
+ return [];
15684
+ }
15685
+ const hidden = new Set(
15686
+ (plan.creditVisibility ?? []).filter((override) => !override.visible).map((override) => override.creditId)
15687
+ );
15688
+ return plan.includedCreditGrants.filter(
15689
+ (grant) => !hidden.has(grant.creditId)
15690
+ );
15691
+ }
15051
15692
  function groupPlanCreditGrants(creditGrants) {
15052
15693
  const map = creditGrants.reduce(
15053
15694
  (acc, grant) => {
@@ -16692,7 +17333,7 @@ var reducer = (state, action) => {
16692
17333
  // src/context/EmbedProvider.tsx
16693
17334
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
16694
17335
  var getCustomHeaders = (sessionId) => ({
16695
- "X-Schematic-Components-Version": "2.32.0",
17336
+ "X-Schematic-Components-Version": "2.34.0",
16696
17337
  "X-Schematic-Session-ID": sessionId
16697
17338
  });
16698
17339
  var normalizeCurrencyFilter = (filter2) => {
@@ -19531,7 +20172,9 @@ var Plan = ({
19531
20172
  { useSelectedPeriod: true },
19532
20173
  currency
19533
20174
  ) || {};
19534
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
20175
+ const credits = groupPlanCreditGrants(
20176
+ getDisplayedPlanCreditGrants(plan)
20177
+ );
19535
20178
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
19536
20179
  (entitlement) => !!entitlement.priceBehavior
19537
20180
  );
@@ -19909,8 +20552,8 @@ var Quantity = ({
19909
20552
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
19910
20553
  const unitPriceFontSize = 0.875 * settings.theme.typography.text.fontSize;
19911
20554
  const planCredits = useMemo14(
19912
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
19913
- [selectedPlan?.includedCreditGrants]
20555
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
20556
+ [selectedPlan]
19914
20557
  );
19915
20558
  const prorationBehavior = data?.checkoutSettings?.prorationBehavior;
19916
20559
  const { billDate: renewalDate } = useNextBillDate();
@@ -21166,16 +21809,17 @@ var CheckoutDialog = ({ top }) => {
21166
21809
  );
21167
21810
  }, [availablePlans, checkoutState, selectedPlanId]);
21168
21811
  const [shouldTrial, setShouldTrial] = useState8(false);
21169
- const planCreditGrants = useMemo16(() => {
21170
- const grants = mergeCompanyGrants(
21171
- selectedPlan?.includedCreditGrants,
21812
+ const displayedPlanCreditGrants = useMemo16(
21813
+ () => getDisplayedPlanCreditGrants(selectedPlan),
21814
+ [selectedPlan]
21815
+ );
21816
+ const planCreditGrants = useMemo16(
21817
+ () => mergeCompanyGrants(
21818
+ displayedPlanCreditGrants,
21172
21819
  data?.company?.plan?.includedCreditGrants
21173
- );
21174
- return grants;
21175
- }, [
21176
- selectedPlan?.includedCreditGrants,
21177
- data?.company?.plan?.includedCreditGrants
21178
- ]);
21820
+ ),
21821
+ [displayedPlanCreditGrants, data?.company?.plan?.includedCreditGrants]
21822
+ );
21179
21823
  const [autoTopupConfigs, setAutoTopupConfigs] = useState8(() => {
21180
21824
  const initialConfigs = data?.company?.plan?.includedCreditGrants.reduce(
21181
21825
  (acc, companyGrant) => {
@@ -21415,7 +22059,7 @@ var CheckoutDialog = ({ top }) => {
21415
22059
  description: t3("Choose your base plan")
21416
22060
  });
21417
22061
  }
21418
- const hasSelfServiceAutoTopup = selectedPlan?.includedCreditGrants.some(
22062
+ const hasSelfServiceAutoTopup = displayedPlanCreditGrants.some(
21419
22063
  (grant) => isSelfServiceAutoTopupAvailable(grant)
21420
22064
  );
21421
22065
  if (hasSelfServiceAutoTopup) {
@@ -21475,7 +22119,7 @@ var CheckoutDialog = ({ top }) => {
21475
22119
  data?.customCheckoutFields,
21476
22120
  collectTaxId,
21477
22121
  availablePlans,
21478
- selectedPlan?.includedCreditGrants,
22122
+ displayedPlanCreditGrants,
21479
22123
  willTrialWithoutPaymentMethod,
21480
22124
  payInAdvanceEntitlements,
21481
22125
  addOns,
@@ -24127,8 +24771,8 @@ var SubscriptionSidebar = forwardRef7(
24127
24771
  data?.company?.plan?.includedCreditGrants
24128
24772
  ]);
24129
24773
  const planCredits = useMemo22(
24130
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
24131
- [selectedPlan?.includedCreditGrants]
24774
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
24775
+ [selectedPlan]
24132
24776
  );
24133
24777
  const { payInAdvanceEntitlements } = useMemo22(() => {
24134
24778
  const payAsYouGoEntitlements = [];
@@ -29676,7 +30320,7 @@ var Plan2 = ({
29676
30320
  const currentPlanIndex = plans.findIndex((plan2) => plan2.current);
29677
30321
  const isActivePlan = plan.current && currentPeriod === selectedPeriod;
29678
30322
  const { price: planPrice, currency: planCurrency } = getPlanPrice(plan, selectedPeriod, { useSelectedPeriod: true }, currency) || {};
29679
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
30323
+ const credits = groupPlanCreditGrants(getDisplayedPlanCreditGrants(plan));
29680
30324
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
29681
30325
  (entitlement) => !!entitlement.priceBehavior
29682
30326
  );