@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.
@@ -3650,7 +3650,7 @@ var import_debounce2 = __toESM(require_debounce());
3650
3650
  var import_merge3 = __toESM(require_merge());
3651
3651
  var import_react5 = require("react");
3652
3652
 
3653
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/stringify.js
3653
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/stringify.js
3654
3654
  var byteToHex = [];
3655
3655
  for (let i2 = 0; i2 < 256; ++i2) {
3656
3656
  byteToHex.push((i2 + 256).toString(16).slice(1));
@@ -3659,13 +3659,13 @@ function unsafeStringify(arr, offset = 0) {
3659
3659
  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();
3660
3660
  }
3661
3661
 
3662
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/rng.js
3662
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/rng.js
3663
3663
  var rnds8 = new Uint8Array(16);
3664
3664
  function rng() {
3665
3665
  return crypto.getRandomValues(rnds8);
3666
3666
  }
3667
3667
 
3668
- // node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/v4.js
3668
+ // node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/v4.js
3669
3669
  function v4(options, buf, offset) {
3670
3670
  if (!buf && !options && crypto.randomUUID) {
3671
3671
  return crypto.randomUUID();
@@ -4851,6 +4851,339 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
4851
4851
  };
4852
4852
  }
4853
4853
 
4854
+ // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
4855
+ function CatalogPriceTierResponseDataFromJSON(json) {
4856
+ return CatalogPriceTierResponseDataFromJSONTyped(json, false);
4857
+ }
4858
+ function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4859
+ if (json == null) {
4860
+ return json;
4861
+ }
4862
+ return {
4863
+ flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
4864
+ from: json["from"],
4865
+ perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
4866
+ perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
4867
+ to: json["to"] == null ? void 0 : json["to"]
4868
+ };
4869
+ }
4870
+
4871
+ // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
4872
+ function CatalogPriceResponseDataFromJSON(json) {
4873
+ return CatalogPriceResponseDataFromJSONTyped(json, false);
4874
+ }
4875
+ function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4876
+ if (json == null) {
4877
+ return json;
4878
+ }
4879
+ return {
4880
+ currency: CurrencyFromJSON(json["currency"]),
4881
+ id: json["id"],
4882
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4883
+ intervalCount: json["interval_count"],
4884
+ overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
4885
+ packageSize: json["package_size"],
4886
+ price: json["price"],
4887
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4888
+ priceTiers: json["price_tiers"].map(
4889
+ CatalogPriceTierResponseDataFromJSON
4890
+ ),
4891
+ scheme: BillingPriceSchemeFromJSON(json["scheme"]),
4892
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
4893
+ };
4894
+ }
4895
+
4896
+ // src/api/checkoutexternal/models/CatalogBundleCurrencyPriceResponseData.ts
4897
+ function CatalogBundleCurrencyPriceResponseDataFromJSON(json) {
4898
+ return CatalogBundleCurrencyPriceResponseDataFromJSONTyped(json, false);
4899
+ }
4900
+ function CatalogBundleCurrencyPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4901
+ if (json == null) {
4902
+ return json;
4903
+ }
4904
+ return {
4905
+ currency: CurrencyFromJSON(json["currency"]),
4906
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
4907
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
4908
+ };
4909
+ }
4910
+
4911
+ // src/api/checkoutexternal/models/CatalogAutoTopupResponseData.ts
4912
+ function CatalogAutoTopupResponseDataFromJSON(json) {
4913
+ return CatalogAutoTopupResponseDataFromJSONTyped(json, false);
4914
+ }
4915
+ function CatalogAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4916
+ if (json == null) {
4917
+ return json;
4918
+ }
4919
+ return {
4920
+ amount: json["amount"] == null ? void 0 : json["amount"],
4921
+ availability: BillingCreditAutoTopupAvailabilityFromJSON(
4922
+ json["availability"]
4923
+ ),
4924
+ companyAmount: json["company_amount"] == null ? void 0 : json["company_amount"],
4925
+ companyEnabled: json["company_enabled"] == null ? void 0 : json["company_enabled"],
4926
+ companyThresholdCredits: json["company_threshold_credits"] == null ? void 0 : json["company_threshold_credits"],
4927
+ creditId: json["credit_id"],
4928
+ currencyPrices: json["currency_prices"].map(
4929
+ CatalogBundleCurrencyPriceResponseDataFromJSON
4930
+ ),
4931
+ enabled: json["enabled"],
4932
+ planCreditGrantId: json["plan_credit_grant_id"],
4933
+ thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"],
4934
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
4935
+ };
4936
+ }
4937
+
4938
+ // src/api/checkoutexternal/models/CatalogCapabilitiesResponseData.ts
4939
+ function CatalogCapabilitiesResponseDataFromJSON(json) {
4940
+ return CatalogCapabilitiesResponseDataFromJSONTyped(json, false);
4941
+ }
4942
+ function CatalogCapabilitiesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4943
+ if (json == null) {
4944
+ return json;
4945
+ }
4946
+ return {
4947
+ badgeVisibility: json["badge_visibility"],
4948
+ checkout: json["checkout"]
4949
+ };
4950
+ }
4951
+
4952
+ // src/api/checkoutexternal/models/CatalogCheckoutFieldResponseData.ts
4953
+ function CatalogCheckoutFieldResponseDataFromJSON(json) {
4954
+ return CatalogCheckoutFieldResponseDataFromJSONTyped(json, false);
4955
+ }
4956
+ function CatalogCheckoutFieldResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4957
+ if (json == null) {
4958
+ return json;
4959
+ }
4960
+ return {
4961
+ helperText: json["helper_text"] == null ? void 0 : json["helper_text"],
4962
+ id: json["id"],
4963
+ name: json["name"],
4964
+ required: json["required"],
4965
+ value: json["value"] == null ? void 0 : json["value"]
4966
+ };
4967
+ }
4968
+
4969
+ // src/api/checkoutexternal/models/CheckoutBundlePurchaseBehavior.ts
4970
+ var CheckoutBundlePurchaseBehavior = {
4971
+ Individual: "individual",
4972
+ Quantity: "quantity"
4973
+ };
4974
+ function CheckoutBundlePurchaseBehaviorFromJSON(json) {
4975
+ return CheckoutBundlePurchaseBehaviorFromJSONTyped(json, false);
4976
+ }
4977
+ function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
4978
+ return json;
4979
+ }
4980
+
4981
+ // src/api/checkoutexternal/models/ProrationBehavior.ts
4982
+ var ProrationBehavior = {
4983
+ CreateProrations: "create_prorations",
4984
+ InvoiceImmediately: "invoice_immediately"
4985
+ };
4986
+ function ProrationBehaviorFromJSON(json) {
4987
+ return ProrationBehaviorFromJSONTyped(json, false);
4988
+ }
4989
+ function ProrationBehaviorFromJSONTyped(json, ignoreDiscriminator) {
4990
+ return json;
4991
+ }
4992
+
4993
+ // src/api/checkoutexternal/models/CatalogCheckoutSettingsResponseData.ts
4994
+ function CatalogCheckoutSettingsResponseDataFromJSON(json) {
4995
+ return CatalogCheckoutSettingsResponseDataFromJSONTyped(json, false);
4996
+ }
4997
+ function CatalogCheckoutSettingsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4998
+ if (json == null) {
4999
+ return json;
5000
+ }
5001
+ return {
5002
+ bundlePurchaseBehavior: CheckoutBundlePurchaseBehaviorFromJSON(
5003
+ json["bundle_purchase_behavior"]
5004
+ ),
5005
+ collectAddress: json["collect_address"],
5006
+ collectEmail: json["collect_email"],
5007
+ collectPhone: json["collect_phone"],
5008
+ collectTaxId: json["collect_tax_id"],
5009
+ customFields: json["custom_fields"].map(
5010
+ CatalogCheckoutFieldResponseDataFromJSON
5011
+ ),
5012
+ prorationBehavior: ProrationBehaviorFromJSON(json["proration_behavior"]),
5013
+ taxCollectionEnabled: json["tax_collection_enabled"]
5014
+ };
5015
+ }
5016
+
5017
+ // src/api/checkoutexternal/models/CatalogPlanRefResponseData.ts
5018
+ function CatalogPlanRefResponseDataFromJSON(json) {
5019
+ return CatalogPlanRefResponseDataFromJSONTyped(json, false);
5020
+ }
5021
+ function CatalogPlanRefResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5022
+ if (json == null) {
5023
+ return json;
5024
+ }
5025
+ return {
5026
+ id: json["id"],
5027
+ name: json["name"]
5028
+ };
5029
+ }
5030
+
5031
+ // src/api/checkoutexternal/models/CompanyPlanInvalidReason.ts
5032
+ var CompanyPlanInvalidReason = {
5033
+ DowngradeNotPermitted: "downgrade_not_permitted",
5034
+ FeatureUsageExceeded: "feature_usage_exceeded"
5035
+ };
5036
+ function CompanyPlanInvalidReasonFromJSON(json) {
5037
+ return CompanyPlanInvalidReasonFromJSONTyped(json, false);
5038
+ }
5039
+ function CompanyPlanInvalidReasonFromJSONTyped(json, ignoreDiscriminator) {
5040
+ return json;
5041
+ }
5042
+
5043
+ // src/api/checkoutexternal/models/CatalogUsageViolationResponseData.ts
5044
+ function CatalogUsageViolationResponseDataFromJSON(json) {
5045
+ return CatalogUsageViolationResponseDataFromJSONTyped(json, false);
5046
+ }
5047
+ function CatalogUsageViolationResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5048
+ if (json == null) {
5049
+ return json;
5050
+ }
5051
+ return {
5052
+ featureId: json["feature_id"],
5053
+ featureName: json["feature_name"],
5054
+ limit: json["limit"] == null ? void 0 : json["limit"],
5055
+ usage: json["usage"]
5056
+ };
5057
+ }
5058
+
5059
+ // src/api/checkoutexternal/models/EntitlementValueType.ts
5060
+ var EntitlementValueType = {
5061
+ Boolean: "boolean",
5062
+ Credit: "credit",
5063
+ Numeric: "numeric",
5064
+ Trait: "trait",
5065
+ Unknown: "unknown",
5066
+ Unlimited: "unlimited"
5067
+ };
5068
+ function EntitlementValueTypeFromJSON(json) {
5069
+ return EntitlementValueTypeFromJSONTyped(json, false);
5070
+ }
5071
+ function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
5072
+ return json;
5073
+ }
5074
+
5075
+ // src/api/checkoutexternal/models/FeatureType.ts
5076
+ var FeatureType = {
5077
+ Boolean: "boolean",
5078
+ Event: "event",
5079
+ License: "license",
5080
+ Trait: "trait"
5081
+ };
5082
+ function FeatureTypeFromJSON(json) {
5083
+ return FeatureTypeFromJSONTyped(json, false);
5084
+ }
5085
+ function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
5086
+ return json;
5087
+ }
5088
+
5089
+ // src/api/checkoutexternal/models/MetricPeriodMonthReset.ts
5090
+ function MetricPeriodMonthResetFromJSON(json) {
5091
+ return MetricPeriodMonthResetFromJSONTyped(json, false);
5092
+ }
5093
+ function MetricPeriodMonthResetFromJSONTyped(json, ignoreDiscriminator) {
5094
+ return json;
5095
+ }
5096
+
5097
+ // src/api/checkoutexternal/models/MetricPeriod.ts
5098
+ function MetricPeriodFromJSON(json) {
5099
+ return MetricPeriodFromJSONTyped(json, false);
5100
+ }
5101
+ function MetricPeriodFromJSONTyped(json, ignoreDiscriminator) {
5102
+ return json;
5103
+ }
5104
+
5105
+ // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
5106
+ var EntitlementPriceBehavior = {
5107
+ CreditBurndown: "credit_burndown",
5108
+ Overage: "overage",
5109
+ PayAsYouGo: "pay_as_you_go",
5110
+ PayInAdvance: "pay_in_advance",
5111
+ Tier: "tier"
5112
+ };
5113
+ function EntitlementPriceBehaviorFromJSON(json) {
5114
+ return EntitlementPriceBehaviorFromJSONTyped(json, false);
5115
+ }
5116
+ function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5117
+ return json;
5118
+ }
5119
+
5120
+ // src/api/checkoutexternal/models/CatalogCurrencyPricesResponseData.ts
5121
+ function CatalogCurrencyPricesResponseDataFromJSON(json) {
5122
+ return CatalogCurrencyPricesResponseDataFromJSONTyped(json, false);
5123
+ }
5124
+ function CatalogCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5125
+ if (json == null) {
5126
+ return json;
5127
+ }
5128
+ return {
5129
+ currency: CurrencyFromJSON(json["currency"]),
5130
+ monthlyPrice: json["monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["monthly_price"]),
5131
+ oneTimePrice: json["one_time_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["one_time_price"]),
5132
+ quarterlyPrice: json["quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["quarterly_price"]),
5133
+ yearlyPrice: json["yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["yearly_price"])
5134
+ };
5135
+ }
5136
+
5137
+ // src/api/checkoutexternal/models/CatalogPlanEntitlementResponseData.ts
5138
+ function CatalogPlanEntitlementResponseDataFromJSON(json) {
5139
+ return CatalogPlanEntitlementResponseDataFromJSONTyped(json, false);
5140
+ }
5141
+ function CatalogPlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5142
+ if (json == null) {
5143
+ return json;
5144
+ }
5145
+ return {
5146
+ consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
5147
+ creditEquivalentLimit: json["credit_equivalent_limit"] == null ? void 0 : json["credit_equivalent_limit"],
5148
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5149
+ creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
5150
+ creditName: json["credit_name"] == null ? void 0 : json["credit_name"],
5151
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5152
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5153
+ currencyPrices: json["currency_prices"].map(
5154
+ CatalogCurrencyPricesResponseDataFromJSON
5155
+ ),
5156
+ featureDescription: json["feature_description"],
5157
+ featureIcon: json["feature_icon"],
5158
+ featureId: json["feature_id"],
5159
+ featureName: json["feature_name"],
5160
+ featurePluralName: json["feature_plural_name"] == null ? void 0 : json["feature_plural_name"],
5161
+ featureSingularName: json["feature_singular_name"] == null ? void 0 : json["feature_singular_name"],
5162
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
5163
+ id: json["id"],
5164
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
5165
+ meteredMonthlyPrice: json["metered_monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_monthly_price"]),
5166
+ meteredQuarterlyPrice: json["metered_quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_quarterly_price"]),
5167
+ meteredYearlyPrice: json["metered_yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["metered_yearly_price"]),
5168
+ metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
5169
+ metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
5170
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
5171
+ softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
5172
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
5173
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
5174
+ valueType: EntitlementValueTypeFromJSON(json["value_type"]),
5175
+ warningThreshold: json["warning_threshold"] == null ? void 0 : json["warning_threshold"]
5176
+ };
5177
+ }
5178
+
5179
+ // src/api/checkoutexternal/models/ChargeType.ts
5180
+ function ChargeTypeFromJSON(json) {
5181
+ return ChargeTypeFromJSONTyped(json, false);
5182
+ }
5183
+ function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
5184
+ return json;
5185
+ }
5186
+
4854
5187
  // src/api/checkoutexternal/models/CatalogCreditGrantResponseData.ts
4855
5188
  function CatalogCreditGrantResponseDataFromJSON(json) {
4856
5189
  return CatalogCreditGrantResponseDataFromJSONTyped(json, false);
@@ -4874,45 +5207,103 @@ function CatalogCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator)
4874
5207
  };
4875
5208
  }
4876
5209
 
4877
- // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
4878
- function CatalogPriceTierResponseDataFromJSON(json) {
4879
- return CatalogPriceTierResponseDataFromJSONTyped(json, false);
5210
+ // src/api/checkoutexternal/models/PlanPriceCadence.ts
5211
+ function PlanPriceCadenceFromJSON(json) {
5212
+ return PlanPriceCadenceFromJSONTyped(json, false);
4880
5213
  }
4881
- function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5214
+ function PlanPriceCadenceFromJSONTyped(json, ignoreDiscriminator) {
5215
+ return json;
5216
+ }
5217
+
5218
+ // src/api/checkoutexternal/models/CatalogCompanyPlanResponseData.ts
5219
+ function CatalogCompanyPlanResponseDataFromJSON(json) {
5220
+ return CatalogCompanyPlanResponseDataFromJSONTyped(json, false);
5221
+ }
5222
+ function CatalogCompanyPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4882
5223
  if (json == null) {
4883
5224
  return json;
4884
5225
  }
4885
5226
  return {
4886
- flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
4887
- from: json["from"],
4888
- perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
4889
- perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
4890
- to: json["to"] == null ? void 0 : json["to"]
5227
+ autoTopups: json["auto_topups"].map(
5228
+ CatalogAutoTopupResponseDataFromJSON
5229
+ ),
5230
+ availablePeriods: json["available_periods"].map(
5231
+ PlanPriceCadenceFromJSON
5232
+ ),
5233
+ billingStrategy: BillingStrategyFromJSON(json["billing_strategy"]),
5234
+ chargeType: ChargeTypeFromJSON(json["charge_type"]),
5235
+ companyCanTrial: json["company_can_trial"],
5236
+ compatiblePlanIds: json["compatible_plan_ids"] == null ? void 0 : json["compatible_plan_ids"],
5237
+ currencyPrices: json["currency_prices"].map(
5238
+ CatalogCurrencyPricesResponseDataFromJSON
5239
+ ),
5240
+ current: json["current"],
5241
+ description: json["description"],
5242
+ entitlements: json["entitlements"].map(
5243
+ CatalogPlanEntitlementResponseDataFromJSON
5244
+ ),
5245
+ icon: json["icon"],
5246
+ id: json["id"],
5247
+ includedCreditGrants: json["included_credit_grants"].map(
5248
+ CatalogCreditGrantResponseDataFromJSON
5249
+ ),
5250
+ invalidReason: json["invalid_reason"] == null ? void 0 : CompanyPlanInvalidReasonFromJSON(json["invalid_reason"]),
5251
+ isTrialable: json["is_trialable"],
5252
+ monthlyPrice: json["monthly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["monthly_price"]),
5253
+ name: json["name"],
5254
+ oneTimePrice: json["one_time_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["one_time_price"]),
5255
+ quarterlyPrice: json["quarterly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["quarterly_price"]),
5256
+ trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
5257
+ usageViolations: json["usage_violations"].map(
5258
+ CatalogUsageViolationResponseDataFromJSON
5259
+ ),
5260
+ valid: json["valid"],
5261
+ yearlyPrice: json["yearly_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["yearly_price"])
4891
5262
  };
4892
5263
  }
4893
5264
 
4894
- // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
4895
- function CatalogPriceResponseDataFromJSON(json) {
4896
- return CatalogPriceResponseDataFromJSONTyped(json, false);
5265
+ // src/api/checkoutexternal/models/CatalogCreditBundleResponseData.ts
5266
+ function CatalogCreditBundleResponseDataFromJSON(json) {
5267
+ return CatalogCreditBundleResponseDataFromJSONTyped(json, false);
4897
5268
  }
4898
- function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5269
+ function CatalogCreditBundleResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4899
5270
  if (json == null) {
4900
5271
  return json;
4901
5272
  }
4902
5273
  return {
4903
- currency: CurrencyFromJSON(json["currency"]),
4904
- id: json["id"],
4905
- interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4906
- intervalCount: json["interval_count"],
4907
- overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
4908
- packageSize: json["package_size"],
4909
- price: json["price"],
4910
- priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4911
- priceTiers: json["price_tiers"].map(
4912
- CatalogPriceTierResponseDataFromJSON
5274
+ bundleType: BillingCreditBundleTypeFromJSON(json["bundle_type"]),
5275
+ compatiblePlanIds: json["compatible_plan_ids"] == null ? void 0 : json["compatible_plan_ids"],
5276
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5277
+ creditId: json["credit_id"],
5278
+ creditName: json["credit_name"],
5279
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5280
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5281
+ currencyPrices: json["currency_prices"].map(
5282
+ CatalogBundleCurrencyPriceResponseDataFromJSON
4913
5283
  ),
4914
- scheme: BillingPriceSchemeFromJSON(json["scheme"]),
4915
- tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
5284
+ expiryType: BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
5285
+ expiryUnit: BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
5286
+ expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
5287
+ id: json["id"],
5288
+ name: json["name"],
5289
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
5290
+ quantity: json["quantity"] == null ? void 0 : json["quantity"],
5291
+ unitPrice: json["unit_price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["unit_price"])
5292
+ };
5293
+ }
5294
+
5295
+ // src/api/checkoutexternal/models/CatalogCustomPlanCTAResponseData.ts
5296
+ function CatalogCustomPlanCTAResponseDataFromJSON(json) {
5297
+ return CatalogCustomPlanCTAResponseDataFromJSONTyped(json, false);
5298
+ }
5299
+ function CatalogCustomPlanCTAResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5300
+ if (json == null) {
5301
+ return json;
5302
+ }
5303
+ return {
5304
+ ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
5305
+ ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
5306
+ priceText: json["price_text"] == null ? void 0 : json["price_text"]
4916
5307
  };
4917
5308
  }
4918
5309
 
@@ -5086,26 +5477,6 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
5086
5477
  };
5087
5478
  }
5088
5479
 
5089
- // src/api/checkoutexternal/models/ChargeType.ts
5090
- function ChargeTypeFromJSON(json) {
5091
- return ChargeTypeFromJSONTyped(json, false);
5092
- }
5093
- function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
5094
- return json;
5095
- }
5096
-
5097
- // src/api/checkoutexternal/models/CheckoutBundlePurchaseBehavior.ts
5098
- var CheckoutBundlePurchaseBehavior = {
5099
- Individual: "individual",
5100
- Quantity: "quantity"
5101
- };
5102
- function CheckoutBundlePurchaseBehaviorFromJSON(json) {
5103
- return CheckoutBundlePurchaseBehaviorFromJSONTyped(json, false);
5104
- }
5105
- function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5106
- return json;
5107
- }
5108
-
5109
5480
  // src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
5110
5481
  function CheckoutPriceSnapshotFromJSON(json) {
5111
5482
  return CheckoutPriceSnapshotFromJSONTyped(json, false);
@@ -5121,6 +5492,8 @@ function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
5121
5492
  isScheduledDowngrade: json["is_scheduled_downgrade"],
5122
5493
  newCharges: json["new_charges"],
5123
5494
  optInRequired: json["opt_in_required"],
5495
+ optInText: json["opt_in_text"] == null ? void 0 : json["opt_in_text"],
5496
+ optInTitle: json["opt_in_title"] == null ? void 0 : json["opt_in_title"],
5124
5497
  paymentMethodRequired: json["payment_method_required"],
5125
5498
  percentOff: json["percent_off"],
5126
5499
  periodStart: new Date(json["period_start"]),
@@ -5142,6 +5515,17 @@ function CheckoutStatusFromJSONTyped(json, ignoreDiscriminator) {
5142
5515
  return json;
5143
5516
  }
5144
5517
 
5518
+ // src/api/checkoutexternal/models/CheckoutIntent.ts
5519
+ function CheckoutIntentFromJSON(json) {
5520
+ return CheckoutIntentFromJSONTyped(json, false);
5521
+ }
5522
+ function CheckoutIntentFromJSONTyped(json, ignoreDiscriminator) {
5523
+ return json;
5524
+ }
5525
+ function CheckoutIntentToJSON(value) {
5526
+ return value;
5527
+ }
5528
+
5145
5529
  // src/api/checkoutexternal/models/CheckoutSelectionsResponseData.ts
5146
5530
  function CheckoutSelectionsResponseDataFromJSON(json) {
5147
5531
  return CheckoutSelectionsResponseDataFromJSONTyped(json, false);
@@ -5162,9 +5546,11 @@ function CheckoutSelectionsResponseDataFromJSONTyped(json, ignoreDiscriminator)
5162
5546
  creditBundles: json["credit_bundles"].map(
5163
5547
  UpdateCreditBundleRequestBodyFromJSON
5164
5548
  ),
5549
+ currency: json["currency"] == null ? void 0 : json["currency"],
5165
5550
  customFieldValues: json["custom_field_values"].map(
5166
5551
  CheckoutFieldValueFromJSON
5167
5552
  ),
5553
+ intent: CheckoutIntentFromJSON(json["intent"]),
5168
5554
  newPlanId: json["new_plan_id"] == null ? void 0 : json["new_plan_id"],
5169
5555
  newPriceId: json["new_price_id"] == null ? void 0 : json["new_price_id"],
5170
5556
  optInAccepted: json["opt_in_accepted"] == null ? void 0 : json["opt_in_accepted"],
@@ -5264,11 +5650,6 @@ function CheckoutFieldWithValueFromJSONTyped(json, ignoreDiscriminator) {
5264
5650
  };
5265
5651
  }
5266
5652
 
5267
- // src/api/checkoutexternal/models/CheckoutIntent.ts
5268
- function CheckoutIntentToJSON(value) {
5269
- return value;
5270
- }
5271
-
5272
5653
  // src/api/checkoutexternal/models/ScheduledDowngradeConfigBehavior.ts
5273
5654
  function ScheduledDowngradeConfigBehaviorFromJSON(json) {
5274
5655
  return ScheduledDowngradeConfigBehaviorFromJSONTyped(json, false);
@@ -5373,43 +5754,194 @@ function CheckoutUnsubscribeResponseFromJSONTyped(json, ignoreDiscriminator) {
5373
5754
  };
5374
5755
  }
5375
5756
 
5376
- // src/api/checkoutexternal/models/ProrationBehavior.ts
5377
- var ProrationBehavior = {
5378
- CreateProrations: "create_prorations",
5379
- InvoiceImmediately: "invoice_immediately"
5757
+ // src/api/checkoutexternal/models/CompanyBillingProfileResponseData.ts
5758
+ function CompanyBillingProfileResponseDataFromJSON(json) {
5759
+ return CompanyBillingProfileResponseDataFromJSONTyped(json, false);
5760
+ }
5761
+ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5762
+ if (json == null) {
5763
+ return json;
5764
+ }
5765
+ return {
5766
+ accountId: json["account_id"],
5767
+ billingCustomerId: json["billing_customer_id"] == null ? void 0 : json["billing_customer_id"],
5768
+ collectionMethod: BillingCollectionMethodFromJSON(
5769
+ json["collection_method"]
5770
+ ),
5771
+ companyId: json["company_id"],
5772
+ createdAt: new Date(json["created_at"]),
5773
+ daysUntilDue: json["days_until_due"] == null ? void 0 : json["days_until_due"],
5774
+ environmentId: json["environment_id"],
5775
+ id: json["id"],
5776
+ isDefault: json["is_default"],
5777
+ name: json["name"] == null ? void 0 : json["name"],
5778
+ paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
5779
+ prorationBehavior: json["proration_behavior"] == null ? void 0 : ProrationBehaviorFromJSON(json["proration_behavior"]),
5780
+ providerType: BillingProviderTypeFromJSON(json["provider_type"]),
5781
+ updatedAt: new Date(json["updated_at"])
5782
+ };
5783
+ }
5784
+
5785
+ // src/api/checkoutexternal/models/CompanyCatalogResponseData.ts
5786
+ function CompanyCatalogResponseDataFromJSON(json) {
5787
+ return CompanyCatalogResponseDataFromJSONTyped(json, false);
5788
+ }
5789
+ function CompanyCatalogResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5790
+ if (json == null) {
5791
+ return json;
5792
+ }
5793
+ return {
5794
+ addOns: json["add_ons"].map(
5795
+ CatalogCompanyPlanResponseDataFromJSON
5796
+ ),
5797
+ capabilities: CatalogCapabilitiesResponseDataFromJSON(json["capabilities"]),
5798
+ checkoutSettings: CatalogCheckoutSettingsResponseDataFromJSON(
5799
+ json["checkout_settings"]
5800
+ ),
5801
+ creditBundles: json["credit_bundles"].map(
5802
+ CatalogCreditBundleResponseDataFromJSON
5803
+ ),
5804
+ customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON(json["custom_plan_cta"]),
5805
+ defaultCurrency: CurrencyFromJSON(json["default_currency"]),
5806
+ description: json["description"] == null ? void 0 : json["description"],
5807
+ id: json["id"],
5808
+ name: json["name"],
5809
+ plans: json["plans"].map(
5810
+ CatalogCompanyPlanResponseDataFromJSON
5811
+ ),
5812
+ preventSelfServiceDowngrade: json["prevent_self_service_downgrade"],
5813
+ preventSelfServiceDowngradeButtonText: json["prevent_self_service_downgrade_button_text"] == null ? void 0 : json["prevent_self_service_downgrade_button_text"],
5814
+ preventSelfServiceDowngradeUrl: json["prevent_self_service_downgrade_url"] == null ? void 0 : json["prevent_self_service_downgrade_url"],
5815
+ pricingModel: json["pricing_model"] == null ? void 0 : json["pricing_model"],
5816
+ pricingUrl: json["pricing_url"] == null ? void 0 : json["pricing_url"],
5817
+ trialExpiryPlan: json["trial_expiry_plan"] == null ? void 0 : CatalogPlanRefResponseDataFromJSON(json["trial_expiry_plan"]),
5818
+ trialPaymentMethodRequired: json["trial_payment_method_required"] == null ? void 0 : json["trial_payment_method_required"]
5819
+ };
5820
+ }
5821
+
5822
+ // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5823
+ var CustomPlanActivationStrategy = {
5824
+ Payment: "on_payment",
5825
+ Publish: "on_publish"
5380
5826
  };
5381
- function ProrationBehaviorFromJSON(json) {
5382
- return ProrationBehaviorFromJSONTyped(json, false);
5827
+ function CustomPlanActivationStrategyFromJSON(json) {
5828
+ return CustomPlanActivationStrategyFromJSONTyped(json, false);
5383
5829
  }
5384
- function ProrationBehaviorFromJSONTyped(json, ignoreDiscriminator) {
5830
+ function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5385
5831
  return json;
5386
5832
  }
5387
5833
 
5388
- // src/api/checkoutexternal/models/CompanyBillingProfileResponseData.ts
5389
- function CompanyBillingProfileResponseDataFromJSON(json) {
5390
- return CompanyBillingProfileResponseDataFromJSONTyped(json, false);
5834
+ // src/api/checkoutexternal/models/CompanyContextCustomPlanBillingResponseData.ts
5835
+ function CompanyContextCustomPlanBillingResponseDataFromJSON(json) {
5836
+ return CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, false);
5391
5837
  }
5392
- function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5838
+ function CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5839
+ if (json == null) {
5840
+ return json;
5841
+ }
5842
+ return {
5843
+ activationStrategy: CustomPlanActivationStrategyFromJSON(
5844
+ json["activation_strategy"]
5845
+ ),
5846
+ dueAt: new Date(json["due_at"]),
5847
+ invoiceUrl: json["invoice_url"] == null ? void 0 : json["invoice_url"],
5848
+ planId: json["plan_id"],
5849
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"]
5850
+ };
5851
+ }
5852
+
5853
+ // src/api/checkoutexternal/models/CompanyContextPlanResponseData.ts
5854
+ function CompanyContextPlanResponseDataFromJSON(json) {
5855
+ return CompanyContextPlanResponseDataFromJSONTyped(json, false);
5856
+ }
5857
+ function CompanyContextPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5858
+ if (json == null) {
5859
+ return json;
5860
+ }
5861
+ return {
5862
+ description: json["description"] == null ? void 0 : json["description"],
5863
+ id: json["id"],
5864
+ includedCreditIds: json["included_credit_ids"],
5865
+ name: json["name"],
5866
+ period: json["period"] == null ? void 0 : json["period"],
5867
+ price: json["price"] == null ? void 0 : json["price"]
5868
+ };
5869
+ }
5870
+
5871
+ // src/api/checkoutexternal/models/CompanyContextScheduledDowngradeResponseData.ts
5872
+ function CompanyContextScheduledDowngradeResponseDataFromJSON(json) {
5873
+ return CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, false);
5874
+ }
5875
+ function CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5876
+ if (json == null) {
5877
+ return json;
5878
+ }
5879
+ return {
5880
+ fromPlanId: json["from_plan_id"],
5881
+ fromPlanName: json["from_plan_name"],
5882
+ toPlanId: json["to_plan_id"],
5883
+ toPlanName: json["to_plan_name"]
5884
+ };
5885
+ }
5886
+
5887
+ // src/api/checkoutexternal/models/CompanyContextSubscriptionResponseData.ts
5888
+ function CompanyContextSubscriptionResponseDataFromJSON(json) {
5889
+ return CompanyContextSubscriptionResponseDataFromJSONTyped(json, false);
5890
+ }
5891
+ function CompanyContextSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5892
+ if (json == null) {
5893
+ return json;
5894
+ }
5895
+ return {
5896
+ cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
5897
+ cancelAtPeriodEnd: json["cancel_at_period_end"],
5898
+ currency: CurrencyFromJSON(json["currency"]),
5899
+ nextBillAt: json["next_bill_at"] == null ? void 0 : new Date(json["next_bill_at"]),
5900
+ period: json["period"] == null ? void 0 : json["period"],
5901
+ periodEnd: json["period_end"] == null ? void 0 : new Date(json["period_end"]),
5902
+ status: json["status"],
5903
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
5904
+ };
5905
+ }
5906
+
5907
+ // src/api/checkoutexternal/models/CompanyContextResponseData.ts
5908
+ function CompanyContextResponseDataFromJSON(json) {
5909
+ return CompanyContextResponseDataFromJSONTyped(json, false);
5910
+ }
5911
+ function CompanyContextResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5912
+ if (json == null) {
5913
+ return json;
5914
+ }
5915
+ return {
5916
+ addOns: json["add_ons"].map(
5917
+ CompanyContextPlanResponseDataFromJSON
5918
+ ),
5919
+ customPlanBilling: json["custom_plan_billing"] == null ? void 0 : CompanyContextCustomPlanBillingResponseDataFromJSON(
5920
+ json["custom_plan_billing"]
5921
+ ),
5922
+ id: json["id"],
5923
+ name: json["name"],
5924
+ plan: json["plan"] == null ? void 0 : CompanyContextPlanResponseDataFromJSON(json["plan"]),
5925
+ scheduledDowngrade: json["scheduled_downgrade"] == null ? void 0 : CompanyContextScheduledDowngradeResponseDataFromJSON(
5926
+ json["scheduled_downgrade"]
5927
+ ),
5928
+ subscription: json["subscription"] == null ? void 0 : CompanyContextSubscriptionResponseDataFromJSON(json["subscription"])
5929
+ };
5930
+ }
5931
+
5932
+ // src/api/checkoutexternal/models/CompanyCreditAutoTopupResponseData.ts
5933
+ function CompanyCreditAutoTopupResponseDataFromJSON(json) {
5934
+ return CompanyCreditAutoTopupResponseDataFromJSONTyped(json, false);
5935
+ }
5936
+ function CompanyCreditAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5393
5937
  if (json == null) {
5394
5938
  return json;
5395
5939
  }
5396
5940
  return {
5397
- accountId: json["account_id"],
5398
- billingCustomerId: json["billing_customer_id"] == null ? void 0 : json["billing_customer_id"],
5399
- collectionMethod: BillingCollectionMethodFromJSON(
5400
- json["collection_method"]
5401
- ),
5402
- companyId: json["company_id"],
5403
- createdAt: new Date(json["created_at"]),
5404
- daysUntilDue: json["days_until_due"] == null ? void 0 : json["days_until_due"],
5405
- environmentId: json["environment_id"],
5406
- id: json["id"],
5407
- isDefault: json["is_default"],
5408
- name: json["name"] == null ? void 0 : json["name"],
5409
- paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
5410
- prorationBehavior: json["proration_behavior"] == null ? void 0 : ProrationBehaviorFromJSON(json["proration_behavior"]),
5411
- providerType: BillingProviderTypeFromJSON(json["provider_type"]),
5412
- updatedAt: new Date(json["updated_at"])
5941
+ amount: json["amount"] == null ? void 0 : json["amount"],
5942
+ enabled: json["enabled"],
5943
+ selfService: json["self_service"],
5944
+ thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"]
5413
5945
  };
5414
5946
  }
5415
5947
 
@@ -5470,6 +6002,7 @@ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator
5470
6002
  return json;
5471
6003
  }
5472
6004
  return {
6005
+ autoTopup: json["auto_topup"] == null ? void 0 : CompanyCreditAutoTopupResponseDataFromJSON(json["auto_topup"]),
5473
6006
  composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
5474
6007
  creditDescription: json["credit_description"],
5475
6008
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
@@ -5676,30 +6209,6 @@ function CompanyPlanWithBillingSubViewFromJSONTyped(json, ignoreDiscriminator) {
5676
6209
  };
5677
6210
  }
5678
6211
 
5679
- // src/api/checkoutexternal/models/EntitlementValueType.ts
5680
- var EntitlementValueType = {
5681
- Boolean: "boolean",
5682
- Credit: "credit",
5683
- Numeric: "numeric",
5684
- Trait: "trait",
5685
- Unknown: "unknown",
5686
- Unlimited: "unlimited"
5687
- };
5688
- function EntitlementValueTypeFromJSON(json) {
5689
- return EntitlementValueTypeFromJSONTyped(json, false);
5690
- }
5691
- function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
5692
- return json;
5693
- }
5694
-
5695
- // src/api/checkoutexternal/models/MetricPeriodMonthReset.ts
5696
- function MetricPeriodMonthResetFromJSON(json) {
5697
- return MetricPeriodMonthResetFromJSONTyped(json, false);
5698
- }
5699
- function MetricPeriodMonthResetFromJSONTyped(json, ignoreDiscriminator) {
5700
- return json;
5701
- }
5702
-
5703
6212
  // src/api/checkoutexternal/models/WarningTier.ts
5704
6213
  function WarningTierFromJSON(json) {
5705
6214
  return WarningTierFromJSONTyped(json, false);
@@ -5714,14 +6223,6 @@ function WarningTierFromJSONTyped(json, ignoreDiscriminator) {
5714
6223
  };
5715
6224
  }
5716
6225
 
5717
- // src/api/checkoutexternal/models/MetricPeriod.ts
5718
- function MetricPeriodFromJSON(json) {
5719
- return MetricPeriodFromJSONTyped(json, false);
5720
- }
5721
- function MetricPeriodFromJSONTyped(json, ignoreDiscriminator) {
5722
- return json;
5723
- }
5724
-
5725
6226
  // src/api/checkoutexternal/models/FeatureEntitlement.ts
5726
6227
  function FeatureEntitlementFromJSON(json) {
5727
6228
  return FeatureEntitlementFromJSONTyped(json, false);
@@ -5746,6 +6247,7 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
5746
6247
  metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
5747
6248
  metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
5748
6249
  monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
6250
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
5749
6251
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
5750
6252
  usage: json["usage"] == null ? void 0 : json["usage"],
5751
6253
  valueType: EntitlementValueTypeFromJSON(json["value_type"]),
@@ -5830,18 +6332,6 @@ function EntityTraitDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5830
6332
  };
5831
6333
  }
5832
6334
 
5833
- // src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
5834
- var CustomPlanActivationStrategy = {
5835
- Payment: "on_payment",
5836
- Publish: "on_publish"
5837
- };
5838
- function CustomPlanActivationStrategyFromJSON(json) {
5839
- return CustomPlanActivationStrategyFromJSONTyped(json, false);
5840
- }
5841
- function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
5842
- return json;
5843
- }
5844
-
5845
6335
  // src/api/checkoutexternal/models/CustomPlanBillingStatus.ts
5846
6336
  var CustomPlanBillingStatus = {
5847
6337
  Active: "active",
@@ -5878,6 +6368,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5878
6368
  ),
5879
6369
  billingCycleAnchor: json["billing_cycle_anchor"] == null ? void 0 : new Date(json["billing_cycle_anchor"]),
5880
6370
  billingStartDate: json["billing_start_date"] == null ? void 0 : new Date(json["billing_start_date"]),
6371
+ checkoutId: json["checkout_id"] == null ? void 0 : json["checkout_id"],
5881
6372
  companyId: json["company_id"],
5882
6373
  createdAt: new Date(json["created_at"]),
5883
6374
  daysUntilDue: json["days_until_due"],
@@ -5887,6 +6378,9 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5887
6378
  paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
5888
6379
  planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
5889
6380
  planId: json["plan_id"],
6381
+ problems: json["problems"].map(
6382
+ CheckoutProblemResponseDataFromJSON
6383
+ ),
5890
6384
  prorateFirstPeriod: json["prorate_first_period"] == null ? void 0 : json["prorate_first_period"],
5891
6385
  publishedAt: json["published_at"] == null ? void 0 : new Date(json["published_at"]),
5892
6386
  sendInvoice: json["send_invoice"],
@@ -6047,6 +6541,7 @@ function ConditionFromJSONTyped(json, ignoreDiscriminator) {
6047
6541
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
6048
6542
  metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
6049
6543
  operator: ComparableOperatorFromJSON(json["operator"]),
6544
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
6050
6545
  resourceIds: json["resource_ids"],
6051
6546
  traitDefinition: json["trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["trait_definition"]),
6052
6547
  traitValue: json["trait_value"]
@@ -6173,35 +6668,6 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6173
6668
  };
6174
6669
  }
6175
6670
 
6176
- // src/api/checkoutexternal/models/FeatureType.ts
6177
- var FeatureType = {
6178
- Boolean: "boolean",
6179
- Event: "event",
6180
- License: "license",
6181
- Trait: "trait"
6182
- };
6183
- function FeatureTypeFromJSON(json) {
6184
- return FeatureTypeFromJSONTyped(json, false);
6185
- }
6186
- function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6187
- return json;
6188
- }
6189
-
6190
- // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6191
- var EntitlementPriceBehavior = {
6192
- CreditBurndown: "credit_burndown",
6193
- Overage: "overage",
6194
- PayAsYouGo: "pay_as_you_go",
6195
- PayInAdvance: "pay_in_advance",
6196
- Tier: "tier"
6197
- };
6198
- function EntitlementPriceBehaviorFromJSON(json) {
6199
- return EntitlementPriceBehaviorFromJSONTyped(json, false);
6200
- }
6201
- function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6202
- return json;
6203
- }
6204
-
6205
6671
  // src/api/checkoutexternal/models/EntitlementType.ts
6206
6672
  function EntitlementTypeFromJSON(json) {
6207
6673
  return EntitlementTypeFromJSONTyped(json, false);
@@ -6484,26 +6950,6 @@ function CompanyPaymentMethodsResponseDataFromJSONTyped(json, ignoreDiscriminato
6484
6950
  };
6485
6951
  }
6486
6952
 
6487
- // src/api/checkoutexternal/models/CompanyPlanInvalidReason.ts
6488
- var CompanyPlanInvalidReason = {
6489
- DowngradeNotPermitted: "downgrade_not_permitted",
6490
- FeatureUsageExceeded: "feature_usage_exceeded"
6491
- };
6492
- function CompanyPlanInvalidReasonFromJSON(json) {
6493
- return CompanyPlanInvalidReasonFromJSONTyped(json, false);
6494
- }
6495
- function CompanyPlanInvalidReasonFromJSONTyped(json, ignoreDiscriminator) {
6496
- return json;
6497
- }
6498
-
6499
- // src/api/checkoutexternal/models/PlanPriceCadence.ts
6500
- function PlanPriceCadenceFromJSON(json) {
6501
- return PlanPriceCadenceFromJSONTyped(json, false);
6502
- }
6503
- function PlanPriceCadenceFromJSONTyped(json, ignoreDiscriminator) {
6504
- return json;
6505
- }
6506
-
6507
6953
  // src/api/checkoutexternal/models/EstimatedPlanTotal.ts
6508
6954
  function EstimatedPlanTotalFromJSON(json) {
6509
6955
  return EstimatedPlanTotalFromJSONTyped(json, false);
@@ -6984,6 +7430,20 @@ function PlanVersionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6984
7430
  };
6985
7431
  }
6986
7432
 
7433
+ // src/api/checkoutexternal/models/PlanCreditVisibility.ts
7434
+ function PlanCreditVisibilityFromJSON(json) {
7435
+ return PlanCreditVisibilityFromJSONTyped(json, false);
7436
+ }
7437
+ function PlanCreditVisibilityFromJSONTyped(json, ignoreDiscriminator) {
7438
+ if (json == null) {
7439
+ return json;
7440
+ }
7441
+ return {
7442
+ creditId: json["credit_id"],
7443
+ visible: json["visible"]
7444
+ };
7445
+ }
7446
+
6987
7447
  // src/api/checkoutexternal/models/CreditUsageAggregation.ts
6988
7448
  function CreditUsageAggregationFromJSON(json) {
6989
7449
  return CreditUsageAggregationFromJSONTyped(json, false);
@@ -7097,6 +7557,9 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7097
7557
  controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
7098
7558
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
7099
7559
  createdAt: new Date(json["created_at"]),
7560
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
7561
+ PlanCreditVisibilityFromJSON
7562
+ ),
7100
7563
  credits: json["credits"].map(
7101
7564
  BillingCreditResponseDataFromJSON
7102
7565
  ),
@@ -7816,6 +8279,34 @@ function FinalizeCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
7816
8279
  };
7817
8280
  }
7818
8281
 
8282
+ // src/api/checkoutexternal/models/GetCatalogViewByIDResponse.ts
8283
+ function GetCatalogViewByIDResponseFromJSON(json) {
8284
+ return GetCatalogViewByIDResponseFromJSONTyped(json, false);
8285
+ }
8286
+ function GetCatalogViewByIDResponseFromJSONTyped(json, ignoreDiscriminator) {
8287
+ if (json == null) {
8288
+ return json;
8289
+ }
8290
+ return {
8291
+ data: CompanyCatalogResponseDataFromJSON(json["data"]),
8292
+ params: json["params"]
8293
+ };
8294
+ }
8295
+
8296
+ // src/api/checkoutexternal/models/GetCatalogViewResponse.ts
8297
+ function GetCatalogViewResponseFromJSON(json) {
8298
+ return GetCatalogViewResponseFromJSONTyped(json, false);
8299
+ }
8300
+ function GetCatalogViewResponseFromJSONTyped(json, ignoreDiscriminator) {
8301
+ if (json == null) {
8302
+ return json;
8303
+ }
8304
+ return {
8305
+ data: CompanyCatalogResponseDataFromJSON(json["data"]),
8306
+ params: json["params"]
8307
+ };
8308
+ }
8309
+
7819
8310
  // src/api/checkoutexternal/models/GetCheckoutResponse.ts
7820
8311
  function GetCheckoutResponseFromJSON(json) {
7821
8312
  return GetCheckoutResponseFromJSONTyped(json, false);
@@ -7984,6 +8475,20 @@ function GetCompanyPaymentMethodsResponseFromJSONTyped(json, ignoreDiscriminator
7984
8475
  };
7985
8476
  }
7986
8477
 
8478
+ // src/api/checkoutexternal/models/GetCompanyResponse.ts
8479
+ function GetCompanyResponseFromJSON(json) {
8480
+ return GetCompanyResponseFromJSONTyped(json, false);
8481
+ }
8482
+ function GetCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
8483
+ if (json == null) {
8484
+ return json;
8485
+ }
8486
+ return {
8487
+ data: CompanyContextResponseDataFromJSON(json["data"]),
8488
+ params: json["params"]
8489
+ };
8490
+ }
8491
+
7987
8492
  // src/api/checkoutexternal/models/GetCompanyUpcomingInvoiceResponse.ts
7988
8493
  function GetCompanyUpcomingInvoiceResponseFromJSON(json) {
7989
8494
  return GetCompanyUpcomingInvoiceResponseFromJSONTyped(json, false);
@@ -8762,6 +9267,82 @@ var CheckoutexternalApi = class extends BaseAPI {
8762
9267
  );
8763
9268
  return await response.value();
8764
9269
  }
9270
+ /**
9271
+ * Get catalog view
9272
+ */
9273
+ async getCatalogViewRaw(initOverrides) {
9274
+ const queryParameters = {};
9275
+ const headerParameters = {};
9276
+ if (this.configuration && this.configuration.apiKey) {
9277
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9278
+ "X-Schematic-Api-Key"
9279
+ );
9280
+ }
9281
+ const response = await this.request(
9282
+ {
9283
+ path: `/catalog/view`,
9284
+ method: "GET",
9285
+ headers: headerParameters,
9286
+ query: queryParameters
9287
+ },
9288
+ initOverrides
9289
+ );
9290
+ return new JSONApiResponse(
9291
+ response,
9292
+ (jsonValue) => GetCatalogViewResponseFromJSON(jsonValue)
9293
+ );
9294
+ }
9295
+ /**
9296
+ * Get catalog view
9297
+ */
9298
+ async getCatalogView(initOverrides) {
9299
+ const response = await this.getCatalogViewRaw(initOverrides);
9300
+ return await response.value();
9301
+ }
9302
+ /**
9303
+ * Get catalog view by ID
9304
+ */
9305
+ async getCatalogViewByIDRaw(requestParameters, initOverrides) {
9306
+ if (requestParameters["catalogId"] == null) {
9307
+ throw new RequiredError(
9308
+ "catalogId",
9309
+ 'Required parameter "catalogId" was null or undefined when calling getCatalogViewByID().'
9310
+ );
9311
+ }
9312
+ const queryParameters = {};
9313
+ const headerParameters = {};
9314
+ if (this.configuration && this.configuration.apiKey) {
9315
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9316
+ "X-Schematic-Api-Key"
9317
+ );
9318
+ }
9319
+ const response = await this.request(
9320
+ {
9321
+ path: `/catalogs/{catalog_id}/view`.replace(
9322
+ `{${"catalog_id"}}`,
9323
+ encodeURIComponent(String(requestParameters["catalogId"]))
9324
+ ),
9325
+ method: "GET",
9326
+ headers: headerParameters,
9327
+ query: queryParameters
9328
+ },
9329
+ initOverrides
9330
+ );
9331
+ return new JSONApiResponse(
9332
+ response,
9333
+ (jsonValue) => GetCatalogViewByIDResponseFromJSON(jsonValue)
9334
+ );
9335
+ }
9336
+ /**
9337
+ * Get catalog view by ID
9338
+ */
9339
+ async getCatalogViewByID(requestParameters, initOverrides) {
9340
+ const response = await this.getCatalogViewByIDRaw(
9341
+ requestParameters,
9342
+ initOverrides
9343
+ );
9344
+ return await response.value();
9345
+ }
8765
9346
  /**
8766
9347
  * Get checkout
8767
9348
  */
@@ -8838,6 +9419,38 @@ var CheckoutexternalApi = class extends BaseAPI {
8838
9419
  const response = await this.getCheckoutTaxIDRaw(initOverrides);
8839
9420
  return await response.value();
8840
9421
  }
9422
+ /**
9423
+ * Get company
9424
+ */
9425
+ async getCompanyRaw(initOverrides) {
9426
+ const queryParameters = {};
9427
+ const headerParameters = {};
9428
+ if (this.configuration && this.configuration.apiKey) {
9429
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9430
+ "X-Schematic-Api-Key"
9431
+ );
9432
+ }
9433
+ const response = await this.request(
9434
+ {
9435
+ path: `/company`,
9436
+ method: "GET",
9437
+ headers: headerParameters,
9438
+ query: queryParameters
9439
+ },
9440
+ initOverrides
9441
+ );
9442
+ return new JSONApiResponse(
9443
+ response,
9444
+ (jsonValue) => GetCompanyResponseFromJSON(jsonValue)
9445
+ );
9446
+ }
9447
+ /**
9448
+ * Get company
9449
+ */
9450
+ async getCompany(initOverrides) {
9451
+ const response = await this.getCompanyRaw(initOverrides);
9452
+ return await response.value();
9453
+ }
8841
9454
  /**
8842
9455
  * Get company credit balances
8843
9456
  */
@@ -9988,9 +10601,9 @@ function BillingArrearsCadenceFromJSONTyped7(json, ignoreDiscriminator) {
9988
10601
 
9989
10602
  // src/api/componentspublic/models/BillingCreditAutoTopupAvailability.ts
9990
10603
  function BillingCreditAutoTopupAvailabilityFromJSON2(json) {
9991
- return BillingCreditAutoTopupAvailabilityFromJSONTyped5(json, false);
10604
+ return BillingCreditAutoTopupAvailabilityFromJSONTyped6(json, false);
9992
10605
  }
9993
- function BillingCreditAutoTopupAvailabilityFromJSONTyped5(json, ignoreDiscriminator) {
10606
+ function BillingCreditAutoTopupAvailabilityFromJSONTyped6(json, ignoreDiscriminator) {
9994
10607
  return json;
9995
10608
  }
9996
10609
 
@@ -10004,17 +10617,17 @@ function BillingCreditBurnStrategyFromJSONTyped4(json, ignoreDiscriminator) {
10004
10617
 
10005
10618
  // src/api/componentspublic/models/BillingCreditExpiryType.ts
10006
10619
  function BillingCreditExpiryTypeFromJSON2(json) {
10007
- return BillingCreditExpiryTypeFromJSONTyped7(json, false);
10620
+ return BillingCreditExpiryTypeFromJSONTyped8(json, false);
10008
10621
  }
10009
- function BillingCreditExpiryTypeFromJSONTyped7(json, ignoreDiscriminator) {
10622
+ function BillingCreditExpiryTypeFromJSONTyped8(json, ignoreDiscriminator) {
10010
10623
  return json;
10011
10624
  }
10012
10625
 
10013
10626
  // src/api/componentspublic/models/BillingCreditExpiryUnit.ts
10014
10627
  function BillingCreditExpiryUnitFromJSON2(json) {
10015
- return BillingCreditExpiryUnitFromJSONTyped9(json, false);
10628
+ return BillingCreditExpiryUnitFromJSONTyped10(json, false);
10016
10629
  }
10017
- function BillingCreditExpiryUnitFromJSONTyped9(json, ignoreDiscriminator) {
10630
+ function BillingCreditExpiryUnitFromJSONTyped10(json, ignoreDiscriminator) {
10018
10631
  return json;
10019
10632
  }
10020
10633
 
@@ -10028,9 +10641,9 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
10028
10641
 
10029
10642
  // src/api/componentspublic/models/Currency.ts
10030
10643
  function CurrencyFromJSON2(json) {
10031
- return CurrencyFromJSONTyped33(json, false);
10644
+ return CurrencyFromJSONTyped38(json, false);
10032
10645
  }
10033
- function CurrencyFromJSONTyped33(json, ignoreDiscriminator) {
10646
+ function CurrencyFromJSONTyped38(json, ignoreDiscriminator) {
10034
10647
  return json;
10035
10648
  }
10036
10649
 
@@ -10412,41 +11025,41 @@ function BillingProductDetailResponseDataFromJSONTyped5(json, ignoreDiscriminato
10412
11025
 
10413
11026
  // src/api/componentspublic/models/BillingStrategy.ts
10414
11027
  function BillingStrategyFromJSON2(json) {
10415
- return BillingStrategyFromJSONTyped5(json, false);
11028
+ return BillingStrategyFromJSONTyped7(json, false);
10416
11029
  }
10417
- function BillingStrategyFromJSONTyped5(json, ignoreDiscriminator) {
11030
+ function BillingStrategyFromJSONTyped7(json, ignoreDiscriminator) {
10418
11031
  return json;
10419
11032
  }
10420
11033
 
10421
11034
  // src/api/componentspublic/models/ChargeType.ts
10422
11035
  function ChargeTypeFromJSON2(json) {
10423
- return ChargeTypeFromJSONTyped5(json, false);
11036
+ return ChargeTypeFromJSONTyped7(json, false);
10424
11037
  }
10425
- function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
11038
+ function ChargeTypeFromJSONTyped7(json, ignoreDiscriminator) {
10426
11039
  return json;
10427
11040
  }
10428
11041
 
10429
11042
  // src/api/componentspublic/models/EntitlementValueType.ts
10430
11043
  function EntitlementValueTypeFromJSON2(json) {
10431
- return EntitlementValueTypeFromJSONTyped8(json, false);
11044
+ return EntitlementValueTypeFromJSONTyped10(json, false);
10432
11045
  }
10433
- function EntitlementValueTypeFromJSONTyped8(json, ignoreDiscriminator) {
11046
+ function EntitlementValueTypeFromJSONTyped10(json, ignoreDiscriminator) {
10434
11047
  return json;
10435
11048
  }
10436
11049
 
10437
11050
  // src/api/componentspublic/models/MetricPeriodMonthReset.ts
10438
11051
  function MetricPeriodMonthResetFromJSON2(json) {
10439
- return MetricPeriodMonthResetFromJSONTyped12(json, false);
11052
+ return MetricPeriodMonthResetFromJSONTyped14(json, false);
10440
11053
  }
10441
- function MetricPeriodMonthResetFromJSONTyped12(json, ignoreDiscriminator) {
11054
+ function MetricPeriodMonthResetFromJSONTyped14(json, ignoreDiscriminator) {
10442
11055
  return json;
10443
11056
  }
10444
11057
 
10445
11058
  // src/api/componentspublic/models/MetricPeriod.ts
10446
11059
  function MetricPeriodFromJSON2(json) {
10447
- return MetricPeriodFromJSONTyped12(json, false);
11060
+ return MetricPeriodFromJSONTyped14(json, false);
10448
11061
  }
10449
- function MetricPeriodFromJSONTyped12(json, ignoreDiscriminator) {
11062
+ function MetricPeriodFromJSONTyped14(json, ignoreDiscriminator) {
10450
11063
  return json;
10451
11064
  }
10452
11065
 
@@ -10554,9 +11167,9 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
10554
11167
 
10555
11168
  // src/api/componentspublic/models/EntitlementPriceBehavior.ts
10556
11169
  function EntitlementPriceBehaviorFromJSON2(json) {
10557
- return EntitlementPriceBehaviorFromJSONTyped6(json, false);
11170
+ return EntitlementPriceBehaviorFromJSONTyped8(json, false);
10558
11171
  }
10559
- function EntitlementPriceBehaviorFromJSONTyped6(json, ignoreDiscriminator) {
11172
+ function EntitlementPriceBehaviorFromJSONTyped8(json, ignoreDiscriminator) {
10560
11173
  return json;
10561
11174
  }
10562
11175
 
@@ -10623,9 +11236,9 @@ function FeatureEventSourceFromJSONTyped4(json, ignoreDiscriminator) {
10623
11236
 
10624
11237
  // src/api/componentspublic/models/FeatureType.ts
10625
11238
  function FeatureTypeFromJSON2(json) {
10626
- return FeatureTypeFromJSONTyped5(json, false);
11239
+ return FeatureTypeFromJSONTyped7(json, false);
10627
11240
  }
10628
- function FeatureTypeFromJSONTyped5(json, ignoreDiscriminator) {
11241
+ function FeatureTypeFromJSONTyped7(json, ignoreDiscriminator) {
10629
11242
  return json;
10630
11243
  }
10631
11244
 
@@ -10981,9 +11594,9 @@ function PlanEntitlementResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
10981
11594
 
10982
11595
  // src/api/componentspublic/models/PlanPriceCadence.ts
10983
11596
  function PlanPriceCadenceFromJSON2(json) {
10984
- return PlanPriceCadenceFromJSONTyped5(json, false);
11597
+ return PlanPriceCadenceFromJSONTyped7(json, false);
10985
11598
  }
10986
- function PlanPriceCadenceFromJSONTyped5(json, ignoreDiscriminator) {
11599
+ function PlanPriceCadenceFromJSONTyped7(json, ignoreDiscriminator) {
10987
11600
  return json;
10988
11601
  }
10989
11602
 
@@ -11105,6 +11718,20 @@ function PlanVersionResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
11105
11718
  };
11106
11719
  }
11107
11720
 
11721
+ // src/api/componentspublic/models/PlanCreditVisibility.ts
11722
+ function PlanCreditVisibilityFromJSON2(json) {
11723
+ return PlanCreditVisibilityFromJSONTyped3(json, false);
11724
+ }
11725
+ function PlanCreditVisibilityFromJSONTyped3(json, ignoreDiscriminator) {
11726
+ if (json == null) {
11727
+ return json;
11728
+ }
11729
+ return {
11730
+ creditId: json["credit_id"],
11731
+ visible: json["visible"]
11732
+ };
11733
+ }
11734
+
11108
11735
  // src/api/componentspublic/models/PlanViewPublicResponseData.ts
11109
11736
  function PlanViewPublicResponseDataFromJSON(json) {
11110
11737
  return PlanViewPublicResponseDataFromJSONTyped(json, false);
@@ -11136,6 +11763,9 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11136
11763
  controlledBy: BillingProviderTypeFromJSON2(json["controlled_by"]),
11137
11764
  copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
11138
11765
  createdAt: new Date(json["created_at"]),
11766
+ creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
11767
+ PlanCreditVisibilityFromJSON2
11768
+ ),
11139
11769
  credits: json["credits"].map(
11140
11770
  BillingCreditResponseDataFromJSON2
11141
11771
  ),
@@ -15014,6 +15644,17 @@ function getResetCadencePeriod(cadence) {
15014
15644
  function isPerLicenseGrant(grant) {
15015
15645
  return grant.scaling === PlanCreditGrantScaling.PerLicense;
15016
15646
  }
15647
+ function getDisplayedPlanCreditGrants(plan) {
15648
+ if (!plan) {
15649
+ return [];
15650
+ }
15651
+ const hidden = new Set(
15652
+ (plan.creditVisibility ?? []).filter((override) => !override.visible).map((override) => override.creditId)
15653
+ );
15654
+ return plan.includedCreditGrants.filter(
15655
+ (grant) => !hidden.has(grant.creditId)
15656
+ );
15657
+ }
15017
15658
  function groupPlanCreditGrants(creditGrants) {
15018
15659
  const map = creditGrants.reduce(
15019
15660
  (acc, grant) => {
@@ -16658,7 +17299,7 @@ var reducer = (state, action) => {
16658
17299
  // src/context/EmbedProvider.tsx
16659
17300
  var import_jsx_runtime4 = require("react/jsx-runtime");
16660
17301
  var getCustomHeaders = (sessionId) => ({
16661
- "X-Schematic-Components-Version": "2.32.0",
17302
+ "X-Schematic-Components-Version": "2.34.0",
16662
17303
  "X-Schematic-Session-ID": sessionId
16663
17304
  });
16664
17305
  var normalizeCurrencyFilter = (filter2) => {
@@ -19485,7 +20126,9 @@ var Plan = ({
19485
20126
  { useSelectedPeriod: true },
19486
20127
  currency
19487
20128
  ) || {};
19488
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
20129
+ const credits = groupPlanCreditGrants(
20130
+ getDisplayedPlanCreditGrants(plan)
20131
+ );
19489
20132
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
19490
20133
  (entitlement) => !!entitlement.priceBehavior
19491
20134
  );
@@ -19863,8 +20506,8 @@ var Quantity = ({
19863
20506
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
19864
20507
  const unitPriceFontSize = 0.875 * settings.theme.typography.text.fontSize;
19865
20508
  const planCredits = (0, import_react27.useMemo)(
19866
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
19867
- [selectedPlan?.includedCreditGrants]
20509
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
20510
+ [selectedPlan]
19868
20511
  );
19869
20512
  const prorationBehavior = data?.checkoutSettings?.prorationBehavior;
19870
20513
  const { billDate: renewalDate } = useNextBillDate();
@@ -21113,16 +21756,17 @@ var CheckoutDialog = ({ top }) => {
21113
21756
  );
21114
21757
  }, [availablePlans, checkoutState, selectedPlanId]);
21115
21758
  const [shouldTrial, setShouldTrial] = (0, import_react30.useState)(false);
21116
- const planCreditGrants = (0, import_react30.useMemo)(() => {
21117
- const grants = mergeCompanyGrants(
21118
- selectedPlan?.includedCreditGrants,
21759
+ const displayedPlanCreditGrants = (0, import_react30.useMemo)(
21760
+ () => getDisplayedPlanCreditGrants(selectedPlan),
21761
+ [selectedPlan]
21762
+ );
21763
+ const planCreditGrants = (0, import_react30.useMemo)(
21764
+ () => mergeCompanyGrants(
21765
+ displayedPlanCreditGrants,
21119
21766
  data?.company?.plan?.includedCreditGrants
21120
- );
21121
- return grants;
21122
- }, [
21123
- selectedPlan?.includedCreditGrants,
21124
- data?.company?.plan?.includedCreditGrants
21125
- ]);
21767
+ ),
21768
+ [displayedPlanCreditGrants, data?.company?.plan?.includedCreditGrants]
21769
+ );
21126
21770
  const [autoTopupConfigs, setAutoTopupConfigs] = (0, import_react30.useState)(() => {
21127
21771
  const initialConfigs = data?.company?.plan?.includedCreditGrants.reduce(
21128
21772
  (acc, companyGrant) => {
@@ -21362,7 +22006,7 @@ var CheckoutDialog = ({ top }) => {
21362
22006
  description: t3("Choose your base plan")
21363
22007
  });
21364
22008
  }
21365
- const hasSelfServiceAutoTopup = selectedPlan?.includedCreditGrants.some(
22009
+ const hasSelfServiceAutoTopup = displayedPlanCreditGrants.some(
21366
22010
  (grant) => isSelfServiceAutoTopupAvailable(grant)
21367
22011
  );
21368
22012
  if (hasSelfServiceAutoTopup) {
@@ -21422,7 +22066,7 @@ var CheckoutDialog = ({ top }) => {
21422
22066
  data?.customCheckoutFields,
21423
22067
  collectTaxId,
21424
22068
  availablePlans,
21425
- selectedPlan?.includedCreditGrants,
22069
+ displayedPlanCreditGrants,
21426
22070
  willTrialWithoutPaymentMethod,
21427
22071
  payInAdvanceEntitlements,
21428
22072
  addOns,
@@ -24062,8 +24706,8 @@ var SubscriptionSidebar = (0, import_react38.forwardRef)(
24062
24706
  data?.company?.plan?.includedCreditGrants
24063
24707
  ]);
24064
24708
  const planCredits = (0, import_react38.useMemo)(
24065
- () => groupPlanCreditGrants(selectedPlan?.includedCreditGrants ?? []),
24066
- [selectedPlan?.includedCreditGrants]
24709
+ () => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
24710
+ [selectedPlan]
24067
24711
  );
24068
24712
  const { payInAdvanceEntitlements } = (0, import_react38.useMemo)(() => {
24069
24713
  const payAsYouGoEntitlements = [];
@@ -29604,7 +30248,7 @@ var Plan2 = ({
29604
30248
  const currentPlanIndex = plans.findIndex((plan2) => plan2.current);
29605
30249
  const isActivePlan = plan.current && currentPeriod === selectedPeriod;
29606
30250
  const { price: planPrice, currency: planCurrency } = getPlanPrice(plan, selectedPeriod, { useSelectedPeriod: true }, currency) || {};
29607
- const credits = groupPlanCreditGrants(plan.includedCreditGrants);
30251
+ const credits = groupPlanCreditGrants(getDisplayedPlanCreditGrants(plan));
29608
30252
  const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
29609
30253
  (entitlement) => !!entitlement.priceBehavior
29610
30254
  );