@schematichq/schematic-components 2.2.1 → 2.3.1

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.
@@ -4915,6 +4915,46 @@ var JSONApiResponse = class {
4915
4915
  }
4916
4916
  };
4917
4917
 
4918
+ // src/api/checkoutexternal/models/BillingCreditBundleStatus.ts
4919
+ function BillingCreditBundleStatusFromJSON(json) {
4920
+ return BillingCreditBundleStatusFromJSONTyped(json, false);
4921
+ }
4922
+ function BillingCreditBundleStatusFromJSONTyped(json, ignoreDiscriminator) {
4923
+ return json;
4924
+ }
4925
+
4926
+ // src/api/checkoutexternal/models/BillingCreditBundleType.ts
4927
+ function BillingCreditBundleTypeFromJSON(json) {
4928
+ return BillingCreditBundleTypeFromJSONTyped(json, false);
4929
+ }
4930
+ function BillingCreditBundleTypeFromJSONTyped(json, ignoreDiscriminator) {
4931
+ return json;
4932
+ }
4933
+
4934
+ // src/api/checkoutexternal/models/BillingCreditExpiryType.ts
4935
+ function BillingCreditExpiryTypeFromJSON(json) {
4936
+ return BillingCreditExpiryTypeFromJSONTyped(json, false);
4937
+ }
4938
+ function BillingCreditExpiryTypeFromJSONTyped(json, ignoreDiscriminator) {
4939
+ return json;
4940
+ }
4941
+
4942
+ // src/api/checkoutexternal/models/BillingProductPriceInterval.ts
4943
+ function BillingProductPriceIntervalFromJSON(json) {
4944
+ return BillingProductPriceIntervalFromJSONTyped(json, false);
4945
+ }
4946
+ function BillingProductPriceIntervalFromJSONTyped(json, ignoreDiscriminator) {
4947
+ return json;
4948
+ }
4949
+
4950
+ // src/api/checkoutexternal/models/BillingTiersMode.ts
4951
+ function BillingTiersModeFromJSON(json) {
4952
+ return BillingTiersModeFromJSONTyped(json, false);
4953
+ }
4954
+ function BillingTiersModeFromJSONTyped(json, ignoreDiscriminator) {
4955
+ return json;
4956
+ }
4957
+
4918
4958
  // src/api/checkoutexternal/models/BillingProductPriceResponseData.ts
4919
4959
  function BillingProductPriceResponseDataFromJSON(json) {
4920
4960
  return BillingProductPriceResponseDataFromJSONTyped(json, false);
@@ -4928,7 +4968,7 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
4928
4968
  createdAt: new Date(json["created_at"]),
4929
4969
  currency: json["currency"],
4930
4970
  id: json["id"],
4931
- interval: json["interval"],
4971
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4932
4972
  isActive: json["is_active"],
4933
4973
  meterId: json["meter_id"] == null ? void 0 : json["meter_id"],
4934
4974
  packageSize: json["package_size"],
@@ -4936,12 +4976,20 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
4936
4976
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4937
4977
  priceExternalId: json["price_external_id"],
4938
4978
  productExternalId: json["product_external_id"],
4939
- tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
4979
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"]),
4940
4980
  updatedAt: new Date(json["updated_at"]),
4941
4981
  usageType: json["usage_type"]
4942
4982
  };
4943
4983
  }
4944
4984
 
4985
+ // src/api/checkoutexternal/models/BillingCreditExpiryUnit.ts
4986
+ function BillingCreditExpiryUnitFromJSON(json) {
4987
+ return BillingCreditExpiryUnitFromJSONTyped(json, false);
4988
+ }
4989
+ function BillingCreditExpiryUnitFromJSONTyped(json, ignoreDiscriminator) {
4990
+ return json;
4991
+ }
4992
+
4945
4993
  // src/api/checkoutexternal/models/BillingCreditBundleView.ts
4946
4994
  function BillingCreditBundleViewFromJSON(json) {
4947
4995
  return BillingCreditBundleViewFromJSONTyped(json, false);
@@ -4952,14 +5000,14 @@ function BillingCreditBundleViewFromJSONTyped(json, ignoreDiscriminator) {
4952
5000
  }
4953
5001
  return {
4954
5002
  billingInvoiceId: json["billing_invoice_id"] == null ? void 0 : json["billing_invoice_id"],
4955
- bundleType: json["bundle_type"],
5003
+ bundleType: BillingCreditBundleTypeFromJSON(json["bundle_type"]),
4956
5004
  createdAt: new Date(json["created_at"]),
4957
5005
  creditDescription: json["credit_description"] == null ? void 0 : json["credit_description"],
4958
5006
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
4959
5007
  creditId: json["credit_id"],
4960
5008
  creditName: json["credit_name"],
4961
- expiryType: json["expiry_type"],
4962
- expiryUnit: json["expiry_unit"],
5009
+ expiryType: BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
5010
+ expiryUnit: BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
4963
5011
  expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
4964
5012
  hasGrants: json["has_grants"],
4965
5013
  id: json["id"],
@@ -4968,12 +5016,36 @@ function BillingCreditBundleViewFromJSONTyped(json, ignoreDiscriminator) {
4968
5016
  price: json["price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["price"]),
4969
5017
  quantity: json["quantity"] == null ? void 0 : json["quantity"],
4970
5018
  singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
4971
- status: json["status"],
5019
+ status: BillingCreditBundleStatusFromJSON(json["status"]),
4972
5020
  unitPrice: json["unit_price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["unit_price"]),
4973
5021
  updatedAt: new Date(json["updated_at"])
4974
5022
  };
4975
5023
  }
4976
5024
 
5025
+ // src/api/checkoutexternal/models/BillingCreditBurnStrategy.ts
5026
+ function BillingCreditBurnStrategyFromJSON(json) {
5027
+ return BillingCreditBurnStrategyFromJSONTyped(json, false);
5028
+ }
5029
+ function BillingCreditBurnStrategyFromJSONTyped(json, ignoreDiscriminator) {
5030
+ return json;
5031
+ }
5032
+
5033
+ // src/api/checkoutexternal/models/BillingCreditGrantReason.ts
5034
+ function BillingCreditGrantReasonFromJSON(json) {
5035
+ return BillingCreditGrantReasonFromJSONTyped(json, false);
5036
+ }
5037
+ function BillingCreditGrantReasonFromJSONTyped(json, ignoreDiscriminator) {
5038
+ return json;
5039
+ }
5040
+
5041
+ // src/api/checkoutexternal/models/BillingCreditGrantZeroedOutReason.ts
5042
+ function BillingCreditGrantZeroedOutReasonFromJSON(json) {
5043
+ return BillingCreditGrantZeroedOutReasonFromJSONTyped(json, false);
5044
+ }
5045
+ function BillingCreditGrantZeroedOutReasonFromJSONTyped(json, ignoreDiscriminator) {
5046
+ return json;
5047
+ }
5048
+
4977
5049
  // src/api/checkoutexternal/models/BillingProductResponseData.ts
4978
5050
  function BillingProductResponseDataFromJSON(json) {
4979
5051
  return BillingProductResponseDataFromJSONTyped(json, false);
@@ -5010,13 +5082,21 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5010
5082
  currency: json["currency"],
5011
5083
  externalPriceId: json["external_price_id"],
5012
5084
  id: json["id"],
5013
- interval: json["interval"],
5085
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
5014
5086
  price: json["price"],
5015
5087
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
5016
5088
  scheme: json["scheme"]
5017
5089
  };
5018
5090
  }
5019
5091
 
5092
+ // src/api/checkoutexternal/models/BillingCreditRolloverPolicy.ts
5093
+ function BillingCreditRolloverPolicyFromJSON(json) {
5094
+ return BillingCreditRolloverPolicyFromJSONTyped(json, false);
5095
+ }
5096
+ function BillingCreditRolloverPolicyFromJSONTyped(json, ignoreDiscriminator) {
5097
+ return json;
5098
+ }
5099
+
5020
5100
  // src/api/checkoutexternal/models/BillingCreditResponseData.ts
5021
5101
  function BillingCreditResponseDataFromJSON(json) {
5022
5102
  return BillingCreditResponseDataFromJSONTyped(json, false);
@@ -5026,11 +5106,15 @@ function BillingCreditResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5026
5106
  return json;
5027
5107
  }
5028
5108
  return {
5029
- burnStrategy: json["burn_strategy"],
5109
+ burnStrategy: BillingCreditBurnStrategyFromJSON(json["burn_strategy"]),
5030
5110
  createdAt: new Date(json["created_at"]),
5031
- defaultExpiryUnit: json["default_expiry_unit"],
5111
+ defaultExpiryUnit: BillingCreditExpiryUnitFromJSON(
5112
+ json["default_expiry_unit"]
5113
+ ),
5032
5114
  defaultExpiryUnitCount: json["default_expiry_unit_count"] == null ? void 0 : json["default_expiry_unit_count"],
5033
- defaultRolloverPolicy: json["default_rollover_policy"],
5115
+ defaultRolloverPolicy: BillingCreditRolloverPolicyFromJSON(
5116
+ json["default_rollover_policy"]
5117
+ ),
5034
5118
  description: json["description"],
5035
5119
  icon: json["icon"] == null ? void 0 : json["icon"],
5036
5120
  id: json["id"],
@@ -5043,6 +5127,30 @@ function BillingCreditResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5043
5127
  };
5044
5128
  }
5045
5129
 
5130
+ // src/api/checkoutexternal/models/BillingPlanCreditGrantResetCadence.ts
5131
+ function BillingPlanCreditGrantResetCadenceFromJSON(json) {
5132
+ return BillingPlanCreditGrantResetCadenceFromJSONTyped(json, false);
5133
+ }
5134
+ function BillingPlanCreditGrantResetCadenceFromJSONTyped(json, ignoreDiscriminator) {
5135
+ return json;
5136
+ }
5137
+
5138
+ // src/api/checkoutexternal/models/BillingPlanCreditGrantResetStart.ts
5139
+ function BillingPlanCreditGrantResetStartFromJSON(json) {
5140
+ return BillingPlanCreditGrantResetStartFromJSONTyped(json, false);
5141
+ }
5142
+ function BillingPlanCreditGrantResetStartFromJSONTyped(json, ignoreDiscriminator) {
5143
+ return json;
5144
+ }
5145
+
5146
+ // src/api/checkoutexternal/models/BillingPlanCreditGrantResetType.ts
5147
+ function BillingPlanCreditGrantResetTypeFromJSON(json) {
5148
+ return BillingPlanCreditGrantResetTypeFromJSONTyped(json, false);
5149
+ }
5150
+ function BillingPlanCreditGrantResetTypeFromJSONTyped(json, ignoreDiscriminator) {
5151
+ return json;
5152
+ }
5153
+
5046
5154
  // src/api/checkoutexternal/models/BillingPlanCreditGrantResponseData.ts
5047
5155
  function BillingPlanCreditGrantResponseDataFromJSON(json) {
5048
5156
  return BillingPlanCreditGrantResponseDataFromJSONTyped(json, false);
@@ -5055,8 +5163,8 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
5055
5163
  autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
5056
5164
  autoTopupAmountType: json["auto_topup_amount_type"] == null ? void 0 : json["auto_topup_amount_type"],
5057
5165
  autoTopupEnabled: json["auto_topup_enabled"],
5058
- autoTopupExpiryType: json["auto_topup_expiry_type"] == null ? void 0 : json["auto_topup_expiry_type"],
5059
- autoTopupExpiryUnit: json["auto_topup_expiry_unit"] == null ? void 0 : json["auto_topup_expiry_unit"],
5166
+ autoTopupExpiryType: json["auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["auto_topup_expiry_type"]),
5167
+ autoTopupExpiryUnit: json["auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["auto_topup_expiry_unit"]),
5060
5168
  autoTopupExpiryUnitCount: json["auto_topup_expiry_unit_count"] == null ? void 0 : json["auto_topup_expiry_unit_count"],
5061
5169
  autoTopupThresholdPercent: json["auto_topup_threshold_percent"] == null ? void 0 : json["auto_topup_threshold_percent"],
5062
5170
  createdAt: new Date(json["created_at"]),
@@ -5065,19 +5173,29 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
5065
5173
  creditName: json["credit_name"],
5066
5174
  creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5067
5175
  creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5068
- expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
5069
- expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
5176
+ expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
5177
+ expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
5070
5178
  expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
5071
5179
  id: json["id"],
5072
5180
  planId: json["plan_id"],
5073
5181
  planName: json["plan_name"],
5074
- resetCadence: json["reset_cadence"],
5075
- resetStart: json["reset_start"],
5076
- resetType: json["reset_type"] == null ? void 0 : json["reset_type"],
5182
+ resetCadence: BillingPlanCreditGrantResetCadenceFromJSON(
5183
+ json["reset_cadence"]
5184
+ ),
5185
+ resetStart: BillingPlanCreditGrantResetStartFromJSON(json["reset_start"]),
5186
+ resetType: json["reset_type"] == null ? void 0 : BillingPlanCreditGrantResetTypeFromJSON(json["reset_type"]),
5077
5187
  updatedAt: new Date(json["updated_at"])
5078
5188
  };
5079
5189
  }
5080
5190
 
5191
+ // src/api/checkoutexternal/models/BillingPriceUsageType.ts
5192
+ function BillingPriceUsageTypeFromJSON(json) {
5193
+ return BillingPriceUsageTypeFromJSONTyped(json, false);
5194
+ }
5195
+ function BillingPriceUsageTypeFromJSONTyped(json, ignoreDiscriminator) {
5196
+ return json;
5197
+ }
5198
+
5081
5199
  // src/api/checkoutexternal/models/BillingProductPriceTierResponseData.ts
5082
5200
  function BillingProductPriceTierResponseDataFromJSON(json) {
5083
5201
  return BillingProductPriceTierResponseDataFromJSONTyped(json, false);
@@ -5107,7 +5225,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
5107
5225
  createdAt: new Date(json["created_at"]),
5108
5226
  currency: json["currency"],
5109
5227
  id: json["id"],
5110
- interval: json["interval"],
5228
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
5111
5229
  isActive: json["is_active"],
5112
5230
  meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
5113
5231
  meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
@@ -5123,7 +5241,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
5123
5241
  productExternalId: json["product_external_id"],
5124
5242
  productId: json["product_id"],
5125
5243
  productName: json["product_name"],
5126
- tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
5244
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"]),
5127
5245
  updatedAt: new Date(json["updated_at"]),
5128
5246
  usageType: json["usage_type"]
5129
5247
  };
@@ -5188,7 +5306,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
5188
5306
  subscriptionId: json["subscription_id"],
5189
5307
  subscriptionItemExternalId: json["subscription_item_external_id"] == null ? void 0 : json["subscription_item_external_id"],
5190
5308
  updatedAt: new Date(json["updated_at"]),
5191
- usageType: json["usage_type"]
5309
+ usageType: BillingPriceUsageTypeFromJSON(json["usage_type"])
5192
5310
  };
5193
5311
  }
5194
5312
 
@@ -5218,6 +5336,14 @@ function BillingSubscriptionDiscountViewFromJSONTyped(json, ignoreDiscriminator)
5218
5336
  };
5219
5337
  }
5220
5338
 
5339
+ // src/api/checkoutexternal/models/BillingSubscriptionTrialEndSetting.ts
5340
+ function BillingSubscriptionTrialEndSettingFromJSON(json) {
5341
+ return BillingSubscriptionTrialEndSettingFromJSONTyped(json, false);
5342
+ }
5343
+ function BillingSubscriptionTrialEndSettingFromJSONTyped(json, ignoreDiscriminator) {
5344
+ return json;
5345
+ }
5346
+
5221
5347
  // src/api/checkoutexternal/models/InvoiceResponseData.ts
5222
5348
  function InvoiceResponseDataFromJSON(json) {
5223
5349
  return InvoiceResponseDataFromJSONTyped(json, false);
@@ -5311,7 +5437,7 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
5311
5437
  subscriptionExternalId: json["subscription_external_id"],
5312
5438
  totalPrice: json["total_price"],
5313
5439
  trialEnd: json["trial_end"] == null ? void 0 : json["trial_end"],
5314
- trialEndSetting: json["trial_end_setting"] == null ? void 0 : json["trial_end_setting"]
5440
+ trialEndSetting: json["trial_end_setting"] == null ? void 0 : BillingSubscriptionTrialEndSettingFromJSON(json["trial_end_setting"])
5315
5441
  };
5316
5442
  }
5317
5443
 
@@ -5372,6 +5498,14 @@ function ChangeSubscriptionRequestBodyToJSON(value) {
5372
5498
  };
5373
5499
  }
5374
5500
 
5501
+ // src/api/checkoutexternal/models/ChargeType.ts
5502
+ function ChargeTypeFromJSON(json) {
5503
+ return ChargeTypeFromJSONTyped(json, false);
5504
+ }
5505
+ function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
5506
+ return json;
5507
+ }
5508
+
5375
5509
  // src/api/checkoutexternal/models/CheckoutResponseData.ts
5376
5510
  function CheckoutResponseDataFromJSON(json) {
5377
5511
  return CheckoutResponseDataFromJSONTyped(json, false);
@@ -5401,7 +5535,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5401
5535
  subscriptionExternalId: json["subscription_external_id"],
5402
5536
  totalPrice: json["total_price"],
5403
5537
  trialEnd: json["trial_end"] == null ? void 0 : json["trial_end"],
5404
- trialEndSetting: json["trial_end_setting"] == null ? void 0 : json["trial_end_setting"]
5538
+ trialEndSetting: json["trial_end_setting"] == null ? void 0 : BillingSubscriptionTrialEndSettingFromJSON(json["trial_end_setting"])
5405
5539
  };
5406
5540
  }
5407
5541
 
@@ -5508,8 +5642,12 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
5508
5642
  billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
5509
5643
  billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
5510
5644
  billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
5511
- billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : json["billing_credit_auto_topup_expiry_type"],
5512
- billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit"],
5645
+ billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(
5646
+ json["billing_credit_auto_topup_expiry_type"]
5647
+ ),
5648
+ billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(
5649
+ json["billing_credit_auto_topup_expiry_unit"]
5650
+ ),
5513
5651
  billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
5514
5652
  billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
5515
5653
  createdAt: new Date(json["created_at"]),
@@ -5518,16 +5656,18 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
5518
5656
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5519
5657
  creditId: json["credit_id"],
5520
5658
  creditName: json["credit_name"],
5521
- expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
5522
- expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
5659
+ expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
5660
+ expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
5523
5661
  expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
5524
5662
  id: json["id"],
5525
5663
  planId: json["plan_id"],
5526
5664
  planName: json["plan_name"],
5527
5665
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
5528
- resetCadence: json["reset_cadence"],
5529
- resetStart: json["reset_start"],
5530
- resetType: json["reset_type"],
5666
+ resetCadence: BillingPlanCreditGrantResetCadenceFromJSON(
5667
+ json["reset_cadence"]
5668
+ ),
5669
+ resetStart: BillingPlanCreditGrantResetStartFromJSON(json["reset_start"]),
5670
+ resetType: BillingPlanCreditGrantResetTypeFromJSON(json["reset_type"]),
5531
5671
  singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
5532
5672
  updatedAt: new Date(json["updated_at"])
5533
5673
  };
@@ -5557,6 +5697,14 @@ function CompanyPlanWithBillingSubViewFromJSONTyped(json, ignoreDiscriminator) {
5557
5697
  };
5558
5698
  }
5559
5699
 
5700
+ // src/api/checkoutexternal/models/EntityType.ts
5701
+ function EntityTypeFromJSON(json) {
5702
+ return EntityTypeFromJSONTyped(json, false);
5703
+ }
5704
+ function EntityTypeFromJSONTyped(json, ignoreDiscriminator) {
5705
+ return json;
5706
+ }
5707
+
5560
5708
  // src/api/checkoutexternal/models/EntityKeyDefinitionResponseData.ts
5561
5709
  function EntityKeyDefinitionResponseDataFromJSON(json) {
5562
5710
  return EntityKeyDefinitionResponseDataFromJSONTyped(json, false);
@@ -5567,7 +5715,7 @@ function EntityKeyDefinitionResponseDataFromJSONTyped(json, ignoreDiscriminator)
5567
5715
  }
5568
5716
  return {
5569
5717
  createdAt: new Date(json["created_at"]),
5570
- entityType: json["entity_type"],
5718
+ entityType: EntityTypeFromJSON(json["entity_type"]),
5571
5719
  id: json["id"],
5572
5720
  key: json["key"],
5573
5721
  updatedAt: new Date(json["updated_at"])
@@ -5587,7 +5735,7 @@ function EntityKeyDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5587
5735
  definition: json["definition"] == null ? void 0 : EntityKeyDefinitionResponseDataFromJSON(json["definition"]),
5588
5736
  definitionId: json["definition_id"],
5589
5737
  entityId: json["entity_id"],
5590
- entityType: json["entity_type"],
5738
+ entityType: EntityTypeFromJSON(json["entity_type"]),
5591
5739
  environmentId: json["environment_id"],
5592
5740
  id: json["id"],
5593
5741
  key: json["key"],
@@ -5596,6 +5744,14 @@ function EntityKeyDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5596
5744
  };
5597
5745
  }
5598
5746
 
5747
+ // src/api/checkoutexternal/models/TraitType.ts
5748
+ function TraitTypeFromJSON(json) {
5749
+ return TraitTypeFromJSONTyped(json, false);
5750
+ }
5751
+ function TraitTypeFromJSONTyped(json, ignoreDiscriminator) {
5752
+ return json;
5753
+ }
5754
+
5599
5755
  // src/api/checkoutexternal/models/EntityTraitDefinitionResponseData.ts
5600
5756
  function EntityTraitDefinitionResponseDataFromJSON(json) {
5601
5757
  return EntityTraitDefinitionResponseDataFromJSONTyped(json, false);
@@ -5607,10 +5763,10 @@ function EntityTraitDefinitionResponseDataFromJSONTyped(json, ignoreDiscriminato
5607
5763
  return {
5608
5764
  createdAt: new Date(json["created_at"]),
5609
5765
  displayName: json["display_name"],
5610
- entityType: json["entity_type"],
5766
+ entityType: EntityTypeFromJSON(json["entity_type"]),
5611
5767
  hierarchy: json["hierarchy"],
5612
5768
  id: json["id"],
5613
- traitType: json["trait_type"],
5769
+ traitType: TraitTypeFromJSON(json["trait_type"]),
5614
5770
  updatedAt: new Date(json["updated_at"])
5615
5771
  };
5616
5772
  }
@@ -5644,7 +5800,7 @@ function TraitDefinitionFromJSONTyped(json, ignoreDiscriminator) {
5644
5800
  }
5645
5801
  return {
5646
5802
  comparableType: json["comparable_type"],
5647
- entityType: json["entity_type"],
5803
+ entityType: EntityTypeFromJSON(json["entity_type"]),
5648
5804
  id: json["id"]
5649
5805
  };
5650
5806
  }
@@ -5790,6 +5946,30 @@ function CompanyOverrideNoteResponseDataFromJSONTyped(json, ignoreDiscriminator)
5790
5946
  };
5791
5947
  }
5792
5948
 
5949
+ // src/api/checkoutexternal/models/EntitlementValueType.ts
5950
+ function EntitlementValueTypeFromJSON(json) {
5951
+ return EntitlementValueTypeFromJSONTyped(json, false);
5952
+ }
5953
+ function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
5954
+ return json;
5955
+ }
5956
+
5957
+ // src/api/checkoutexternal/models/FeatureType.ts
5958
+ function FeatureTypeFromJSON(json) {
5959
+ return FeatureTypeFromJSONTyped(json, false);
5960
+ }
5961
+ function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
5962
+ return json;
5963
+ }
5964
+
5965
+ // src/api/checkoutexternal/models/FeatureLifecyclePhase.ts
5966
+ function FeatureLifecyclePhaseFromJSON(json) {
5967
+ return FeatureLifecyclePhaseFromJSONTyped(json, false);
5968
+ }
5969
+ function FeatureLifecyclePhaseFromJSONTyped(json, ignoreDiscriminator) {
5970
+ return json;
5971
+ }
5972
+
5793
5973
  // src/api/checkoutexternal/models/FeatureResponseData.ts
5794
5974
  function FeatureResponseDataFromJSON(json) {
5795
5975
  return FeatureResponseDataFromJSONTyped(json, false);
@@ -5802,10 +5982,10 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5802
5982
  createdAt: new Date(json["created_at"]),
5803
5983
  description: json["description"],
5804
5984
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
5805
- featureType: json["feature_type"],
5985
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
5806
5986
  icon: json["icon"],
5807
5987
  id: json["id"],
5808
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
5988
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
5809
5989
  maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
5810
5990
  name: json["name"],
5811
5991
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
@@ -5845,7 +6025,7 @@ function CompanyOverrideResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5845
6025
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
5846
6026
  valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
5847
6027
  valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
5848
- valueType: json["value_type"]
6028
+ valueType: EntitlementValueTypeFromJSON(json["value_type"])
5849
6029
  };
5850
6030
  }
5851
6031
 
@@ -5927,7 +6107,7 @@ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator)
5927
6107
  ),
5928
6108
  ruleId: json["rule_id"],
5929
6109
  trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
5930
- traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
6110
+ traitEntityType: json["trait_entity_type"] == null ? void 0 : EntityTypeFromJSON(json["trait_entity_type"]),
5931
6111
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
5932
6112
  traitValue: json["trait_value"],
5933
6113
  updatedAt: new Date(json["updated_at"])
@@ -5982,6 +6162,14 @@ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5982
6162
  };
5983
6163
  }
5984
6164
 
6165
+ // src/api/checkoutexternal/models/FlagType.ts
6166
+ function FlagTypeFromJSON(json) {
6167
+ return FlagTypeFromJSONTyped(json, false);
6168
+ }
6169
+ function FlagTypeFromJSONTyped(json, ignoreDiscriminator) {
6170
+ return json;
6171
+ }
6172
+
5985
6173
  // src/api/checkoutexternal/models/FlagDetailResponseData.ts
5986
6174
  function FlagDetailResponseDataFromJSON(json) {
5987
6175
  return FlagDetailResponseDataFromJSONTyped(json, false);
@@ -5996,7 +6184,7 @@ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5996
6184
  description: json["description"],
5997
6185
  feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
5998
6186
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
5999
- flagType: json["flag_type"],
6187
+ flagType: FlagTypeFromJSON(json["flag_type"]),
6000
6188
  id: json["id"],
6001
6189
  key: json["key"],
6002
6190
  lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
@@ -6020,11 +6208,11 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6020
6208
  description: json["description"],
6021
6209
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
6022
6210
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
6023
- featureType: json["feature_type"],
6211
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
6024
6212
  flags: json["flags"].map(FlagDetailResponseDataFromJSON),
6025
6213
  icon: json["icon"],
6026
6214
  id: json["id"],
6027
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
6215
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
6028
6216
  maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
6029
6217
  name: json["name"],
6030
6218
  plans: json["plans"].map(PreviewObjectFromJSON),
@@ -6036,6 +6224,30 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6036
6224
  };
6037
6225
  }
6038
6226
 
6227
+ // src/api/checkoutexternal/models/PlanControlledByType.ts
6228
+ function PlanControlledByTypeFromJSON(json) {
6229
+ return PlanControlledByTypeFromJSONTyped(json, false);
6230
+ }
6231
+ function PlanControlledByTypeFromJSONTyped(json, ignoreDiscriminator) {
6232
+ return json;
6233
+ }
6234
+
6235
+ // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6236
+ function EntitlementPriceBehaviorFromJSON(json) {
6237
+ return EntitlementPriceBehaviorFromJSONTyped(json, false);
6238
+ }
6239
+ function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6240
+ return json;
6241
+ }
6242
+
6243
+ // src/api/checkoutexternal/models/PlanType.ts
6244
+ function PlanTypeFromJSON(json) {
6245
+ return PlanTypeFromJSONTyped(json, false);
6246
+ }
6247
+ function PlanTypeFromJSONTyped(json, ignoreDiscriminator) {
6248
+ return json;
6249
+ }
6250
+
6039
6251
  // src/api/checkoutexternal/models/PlanResponseData.ts
6040
6252
  function PlanResponseDataFromJSON(json) {
6041
6253
  return PlanResponseDataFromJSONTyped(json, false);
@@ -6051,7 +6263,7 @@ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6051
6263
  icon: json["icon"],
6052
6264
  id: json["id"],
6053
6265
  name: json["name"],
6054
- planType: json["plan_type"],
6266
+ planType: PlanTypeFromJSON(json["plan_type"]),
6055
6267
  updatedAt: new Date(json["updated_at"])
6056
6268
  };
6057
6269
  }
@@ -6078,7 +6290,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6078
6290
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
6079
6291
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
6080
6292
  planId: json["plan_id"],
6081
- priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
6293
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6082
6294
  ruleId: json["rule_id"],
6083
6295
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
6084
6296
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -6089,7 +6301,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6089
6301
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
6090
6302
  valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
6091
6303
  valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
6092
- valueType: json["value_type"]
6304
+ valueType: EntitlementValueTypeFromJSON(json["value_type"])
6093
6305
  };
6094
6306
  }
6095
6307
 
@@ -6119,11 +6331,19 @@ function CreditGrantDetailFromJSONTyped(json, ignoreDiscriminator) {
6119
6331
  return {
6120
6332
  creditTypeIcon: json["credit_type_icon"] == null ? void 0 : json["credit_type_icon"],
6121
6333
  expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
6122
- grantReason: json["grant_reason"],
6334
+ grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
6123
6335
  quantity: json["quantity"]
6124
6336
  };
6125
6337
  }
6126
6338
 
6339
+ // src/api/checkoutexternal/models/EntitlementType.ts
6340
+ function EntitlementTypeFromJSON(json) {
6341
+ return EntitlementTypeFromJSONTyped(json, false);
6342
+ }
6343
+ function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
6344
+ return json;
6345
+ }
6346
+
6127
6347
  // src/api/checkoutexternal/models/FeatureUsageResponseData.ts
6128
6348
  function FeatureUsageResponseDataFromJSON(json) {
6129
6349
  return FeatureUsageResponseDataFromJSONTyped(json, false);
@@ -6135,14 +6355,14 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6135
6355
  return {
6136
6356
  access: json["access"],
6137
6357
  allocation: json["allocation"] == null ? void 0 : json["allocation"],
6138
- allocationType: json["allocation_type"],
6358
+ allocationType: EntitlementValueTypeFromJSON(json["allocation_type"]),
6139
6359
  companyOverride: json["company_override"] == null ? void 0 : CompanyOverrideResponseDataFromJSON(json["company_override"]),
6140
6360
  creditConsumptionRate: json["credit_consumption_rate"] == null ? void 0 : json["credit_consumption_rate"],
6141
6361
  creditGrantCounts: json["credit_grant_counts"] == null ? void 0 : json["credit_grant_counts"],
6142
6362
  creditGrantDetails: json["credit_grant_details"] == null ? void 0 : json["credit_grant_details"].map(
6143
6363
  CreditGrantDetailFromJSON
6144
6364
  ),
6145
- creditGrantReason: json["credit_grant_reason"] == null ? void 0 : json["credit_grant_reason"],
6365
+ creditGrantReason: json["credit_grant_reason"] == null ? void 0 : BillingCreditGrantReasonFromJSON(json["credit_grant_reason"]),
6146
6366
  creditRemaining: json["credit_remaining"] == null ? void 0 : json["credit_remaining"],
6147
6367
  creditTotal: json["credit_total"] == null ? void 0 : json["credit_total"],
6148
6368
  creditTypeIcon: json["credit_type_icon"] == null ? void 0 : json["credit_type_icon"],
@@ -6152,7 +6372,7 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6152
6372
  entitlementExpirationDate: json["entitlement_expiration_date"] == null ? void 0 : new Date(json["entitlement_expiration_date"]),
6153
6373
  entitlementId: json["entitlement_id"],
6154
6374
  entitlementSource: json["entitlement_source"] == null ? void 0 : json["entitlement_source"],
6155
- entitlementType: json["entitlement_type"],
6375
+ entitlementType: EntitlementTypeFromJSON(json["entitlement_type"]),
6156
6376
  feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
6157
6377
  hasValidAllocation: json["has_valid_allocation"] == null ? void 0 : json["has_valid_allocation"],
6158
6378
  isUnlimited: json["is_unlimited"] == null ? void 0 : json["is_unlimited"],
@@ -6164,7 +6384,7 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6164
6384
  period: json["period"] == null ? void 0 : json["period"],
6165
6385
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
6166
6386
  planEntitlement: json["plan_entitlement"] == null ? void 0 : PlanEntitlementResponseDataFromJSON(json["plan_entitlement"]),
6167
- priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
6387
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6168
6388
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
6169
6389
  usage: json["usage"] == null ? void 0 : json["usage"],
6170
6390
  yearlyUsageBasedPrice: json["yearly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_usage_based_price"])
@@ -6182,11 +6402,11 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6182
6402
  return {
6183
6403
  audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
6184
6404
  billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON(json["billing_product"]),
6185
- chargeType: json["charge_type"],
6405
+ chargeType: ChargeTypeFromJSON(json["charge_type"]),
6186
6406
  companyCanTrial: json["company_can_trial"],
6187
6407
  companyCount: json["company_count"],
6188
6408
  compatiblePlanIds: json["compatible_plan_ids"],
6189
- controlledBy: json["controlled_by"],
6409
+ controlledBy: PlanControlledByTypeFromJSON(json["controlled_by"]),
6190
6410
  createdAt: new Date(json["created_at"]),
6191
6411
  current: json["current"],
6192
6412
  custom: json["custom"],
@@ -6203,6 +6423,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6203
6423
  includedCreditGrants: json["included_credit_grants"].map(
6204
6424
  PlanCreditGrantViewFromJSON
6205
6425
  ),
6426
+ invalidReason: json["invalid_reason"] == null ? void 0 : json["invalid_reason"],
6206
6427
  isCustom: json["is_custom"],
6207
6428
  isDefault: json["is_default"],
6208
6429
  isFree: json["is_free"],
@@ -6210,7 +6431,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6210
6431
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
6211
6432
  name: json["name"],
6212
6433
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
6213
- planType: json["plan_type"],
6434
+ planType: PlanTypeFromJSON(json["plan_type"]),
6214
6435
  trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
6215
6436
  updatedAt: new Date(json["updated_at"]),
6216
6437
  usageViolations: json["usage_violations"].map(
@@ -6295,6 +6516,14 @@ function ComponentCheckoutSettingsFromJSONTyped(json, ignoreDiscriminator) {
6295
6516
  };
6296
6517
  }
6297
6518
 
6519
+ // src/api/checkoutexternal/models/ComponentEntityType.ts
6520
+ function ComponentEntityTypeFromJSON(json) {
6521
+ return ComponentEntityTypeFromJSONTyped(json, false);
6522
+ }
6523
+ function ComponentEntityTypeFromJSONTyped(json, ignoreDiscriminator) {
6524
+ return json;
6525
+ }
6526
+
6298
6527
  // src/api/checkoutexternal/models/PlanDetailResponseData.ts
6299
6528
  function PlanDetailResponseDataFromJSON(json) {
6300
6529
  return PlanDetailResponseDataFromJSONTyped(json, false);
@@ -6306,9 +6535,9 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6306
6535
  return {
6307
6536
  audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
6308
6537
  billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON(json["billing_product"]),
6309
- chargeType: json["charge_type"],
6538
+ chargeType: ChargeTypeFromJSON(json["charge_type"]),
6310
6539
  companyCount: json["company_count"],
6311
- controlledBy: json["controlled_by"],
6540
+ controlledBy: PlanControlledByTypeFromJSON(json["controlled_by"]),
6312
6541
  createdAt: new Date(json["created_at"]),
6313
6542
  description: json["description"],
6314
6543
  features: json["features"].map(
@@ -6325,7 +6554,7 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6325
6554
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
6326
6555
  name: json["name"],
6327
6556
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
6328
- planType: json["plan_type"],
6557
+ planType: PlanTypeFromJSON(json["plan_type"]),
6329
6558
  trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
6330
6559
  updatedAt: new Date(json["updated_at"]),
6331
6560
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["yearly_price"])
@@ -6366,10 +6595,10 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
6366
6595
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
6367
6596
  creditName: json["credit_name"],
6368
6597
  expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
6369
- expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
6370
- expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
6598
+ expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
6599
+ expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
6371
6600
  expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
6372
- grantReason: json["grant_reason"],
6601
+ grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
6373
6602
  id: json["id"],
6374
6603
  planId: json["plan_id"] == null ? void 0 : json["plan_id"],
6375
6604
  planName: json["plan_name"] == null ? void 0 : json["plan_name"],
@@ -6383,7 +6612,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
6383
6612
  updatedAt: new Date(json["updated_at"]),
6384
6613
  validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"]),
6385
6614
  zeroedOutDate: json["zeroed_out_date"] == null ? void 0 : new Date(json["zeroed_out_date"]),
6386
- zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : json["zeroed_out_reason"]
6615
+ zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : BillingCreditGrantZeroedOutReasonFromJSON(json["zeroed_out_reason"])
6387
6616
  };
6388
6617
  }
6389
6618
 
@@ -6403,14 +6632,22 @@ function UsageBasedEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminato
6403
6632
  metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
6404
6633
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
6405
6634
  monthlyUsageBasedPrice: json["monthly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_usage_based_price"]),
6406
- priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
6635
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6407
6636
  valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
6408
6637
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
6409
- valueType: json["value_type"],
6638
+ valueType: EntitlementValueTypeFromJSON(json["value_type"]),
6410
6639
  yearlyUsageBasedPrice: json["yearly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_usage_based_price"])
6411
6640
  };
6412
6641
  }
6413
6642
 
6643
+ // src/api/checkoutexternal/models/ComponentState.ts
6644
+ function ComponentStateFromJSON(json) {
6645
+ return ComponentStateFromJSONTyped(json, false);
6646
+ }
6647
+ function ComponentStateFromJSONTyped(json, ignoreDiscriminator) {
6648
+ return json;
6649
+ }
6650
+
6414
6651
  // src/api/checkoutexternal/models/ComponentResponseData.ts
6415
6652
  function ComponentResponseDataFromJSON(json) {
6416
6653
  return ComponentResponseDataFromJSONTyped(json, false);
@@ -6424,8 +6661,8 @@ function ComponentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6424
6661
  createdAt: new Date(json["created_at"]),
6425
6662
  id: json["id"],
6426
6663
  name: json["name"],
6427
- state: json["state"],
6428
- type: json["type"],
6664
+ state: ComponentStateFromJSON(json["state"]),
6665
+ type: ComponentEntityTypeFromJSON(json["type"]),
6429
6666
  updatedAt: new Date(json["updated_at"])
6430
6667
  };
6431
6668
  }
@@ -6479,6 +6716,9 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6479
6716
  defaultPlan: json["default_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["default_plan"]),
6480
6717
  featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"]),
6481
6718
  postTrialPlan: json["post_trial_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["post_trial_plan"]),
6719
+ preventSelfServiceDowngrade: json["prevent_self_service_downgrade"],
6720
+ preventSelfServiceDowngradeButtonText: json["prevent_self_service_downgrade_button_text"] == null ? void 0 : json["prevent_self_service_downgrade_button_text"],
6721
+ preventSelfServiceDowngradeUrl: json["prevent_self_service_downgrade_url"] == null ? void 0 : json["prevent_self_service_downgrade_url"],
6482
6722
  showCredits: json["show_credits"],
6483
6723
  showPeriodToggle: json["show_period_toggle"],
6484
6724
  showZeroPriceAsFree: json["show_zero_price_as_free"],
@@ -7466,6 +7706,30 @@ var JSONApiResponse2 = class {
7466
7706
  }
7467
7707
  };
7468
7708
 
7709
+ // src/api/componentspublic/models/BillingCreditBurnStrategy.ts
7710
+ function BillingCreditBurnStrategyFromJSON2(json) {
7711
+ return BillingCreditBurnStrategyFromJSONTyped3(json, false);
7712
+ }
7713
+ function BillingCreditBurnStrategyFromJSONTyped3(json, ignoreDiscriminator) {
7714
+ return json;
7715
+ }
7716
+
7717
+ // src/api/componentspublic/models/BillingCreditExpiryType.ts
7718
+ function BillingCreditExpiryTypeFromJSON2(json) {
7719
+ return BillingCreditExpiryTypeFromJSONTyped6(json, false);
7720
+ }
7721
+ function BillingCreditExpiryTypeFromJSONTyped6(json, ignoreDiscriminator) {
7722
+ return json;
7723
+ }
7724
+
7725
+ // src/api/componentspublic/models/BillingCreditExpiryUnit.ts
7726
+ function BillingCreditExpiryUnitFromJSON2(json) {
7727
+ return BillingCreditExpiryUnitFromJSONTyped7(json, false);
7728
+ }
7729
+ function BillingCreditExpiryUnitFromJSONTyped7(json, ignoreDiscriminator) {
7730
+ return json;
7731
+ }
7732
+
7469
7733
  // src/api/componentspublic/models/BillingProductResponseData.ts
7470
7734
  function BillingProductResponseDataFromJSON2(json) {
7471
7735
  return BillingProductResponseDataFromJSONTyped4(json, false);
@@ -7490,6 +7754,14 @@ function BillingProductResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
7490
7754
  };
7491
7755
  }
7492
7756
 
7757
+ // src/api/componentspublic/models/BillingProductPriceInterval.ts
7758
+ function BillingProductPriceIntervalFromJSON2(json) {
7759
+ return BillingProductPriceIntervalFromJSONTyped5(json, false);
7760
+ }
7761
+ function BillingProductPriceIntervalFromJSONTyped5(json, ignoreDiscriminator) {
7762
+ return json;
7763
+ }
7764
+
7493
7765
  // src/api/componentspublic/models/BillingPriceResponseData.ts
7494
7766
  function BillingPriceResponseDataFromJSON2(json) {
7495
7767
  return BillingPriceResponseDataFromJSONTyped7(json, false);
@@ -7502,13 +7774,21 @@ function BillingPriceResponseDataFromJSONTyped7(json, ignoreDiscriminator) {
7502
7774
  currency: json["currency"],
7503
7775
  externalPriceId: json["external_price_id"],
7504
7776
  id: json["id"],
7505
- interval: json["interval"],
7777
+ interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
7506
7778
  price: json["price"],
7507
7779
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
7508
7780
  scheme: json["scheme"]
7509
7781
  };
7510
7782
  }
7511
7783
 
7784
+ // src/api/componentspublic/models/BillingCreditRolloverPolicy.ts
7785
+ function BillingCreditRolloverPolicyFromJSON2(json) {
7786
+ return BillingCreditRolloverPolicyFromJSONTyped3(json, false);
7787
+ }
7788
+ function BillingCreditRolloverPolicyFromJSONTyped3(json, ignoreDiscriminator) {
7789
+ return json;
7790
+ }
7791
+
7512
7792
  // src/api/componentspublic/models/BillingCreditResponseData.ts
7513
7793
  function BillingCreditResponseDataFromJSON2(json) {
7514
7794
  return BillingCreditResponseDataFromJSONTyped3(json, false);
@@ -7518,11 +7798,15 @@ function BillingCreditResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
7518
7798
  return json;
7519
7799
  }
7520
7800
  return {
7521
- burnStrategy: json["burn_strategy"],
7801
+ burnStrategy: BillingCreditBurnStrategyFromJSON2(json["burn_strategy"]),
7522
7802
  createdAt: new Date(json["created_at"]),
7523
- defaultExpiryUnit: json["default_expiry_unit"],
7803
+ defaultExpiryUnit: BillingCreditExpiryUnitFromJSON2(
7804
+ json["default_expiry_unit"]
7805
+ ),
7524
7806
  defaultExpiryUnitCount: json["default_expiry_unit_count"] == null ? void 0 : json["default_expiry_unit_count"],
7525
- defaultRolloverPolicy: json["default_rollover_policy"],
7807
+ defaultRolloverPolicy: BillingCreditRolloverPolicyFromJSON2(
7808
+ json["default_rollover_policy"]
7809
+ ),
7526
7810
  description: json["description"],
7527
7811
  icon: json["icon"] == null ? void 0 : json["icon"],
7528
7812
  id: json["id"],
@@ -7535,6 +7819,30 @@ function BillingCreditResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
7535
7819
  };
7536
7820
  }
7537
7821
 
7822
+ // src/api/componentspublic/models/BillingPlanCreditGrantResetCadence.ts
7823
+ function BillingPlanCreditGrantResetCadenceFromJSON2(json) {
7824
+ return BillingPlanCreditGrantResetCadenceFromJSONTyped4(json, false);
7825
+ }
7826
+ function BillingPlanCreditGrantResetCadenceFromJSONTyped4(json, ignoreDiscriminator) {
7827
+ return json;
7828
+ }
7829
+
7830
+ // src/api/componentspublic/models/BillingPlanCreditGrantResetStart.ts
7831
+ function BillingPlanCreditGrantResetStartFromJSON2(json) {
7832
+ return BillingPlanCreditGrantResetStartFromJSONTyped4(json, false);
7833
+ }
7834
+ function BillingPlanCreditGrantResetStartFromJSONTyped4(json, ignoreDiscriminator) {
7835
+ return json;
7836
+ }
7837
+
7838
+ // src/api/componentspublic/models/BillingPlanCreditGrantResetType.ts
7839
+ function BillingPlanCreditGrantResetTypeFromJSON2(json) {
7840
+ return BillingPlanCreditGrantResetTypeFromJSONTyped4(json, false);
7841
+ }
7842
+ function BillingPlanCreditGrantResetTypeFromJSONTyped4(json, ignoreDiscriminator) {
7843
+ return json;
7844
+ }
7845
+
7538
7846
  // src/api/componentspublic/models/BillingProductPriceTierResponseData.ts
7539
7847
  function BillingProductPriceTierResponseDataFromJSON2(json) {
7540
7848
  return BillingProductPriceTierResponseDataFromJSONTyped4(json, false);
@@ -7551,6 +7859,14 @@ function BillingProductPriceTierResponseDataFromJSONTyped4(json, ignoreDiscrimin
7551
7859
  };
7552
7860
  }
7553
7861
 
7862
+ // src/api/componentspublic/models/BillingTiersMode.ts
7863
+ function BillingTiersModeFromJSON2(json) {
7864
+ return BillingTiersModeFromJSONTyped4(json, false);
7865
+ }
7866
+ function BillingTiersModeFromJSONTyped4(json, ignoreDiscriminator) {
7867
+ return json;
7868
+ }
7869
+
7554
7870
  // src/api/componentspublic/models/BillingPriceView.ts
7555
7871
  function BillingPriceViewFromJSON2(json) {
7556
7872
  return BillingPriceViewFromJSONTyped5(json, false);
@@ -7564,7 +7880,7 @@ function BillingPriceViewFromJSONTyped5(json, ignoreDiscriminator) {
7564
7880
  createdAt: new Date(json["created_at"]),
7565
7881
  currency: json["currency"],
7566
7882
  id: json["id"],
7567
- interval: json["interval"],
7883
+ interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
7568
7884
  isActive: json["is_active"],
7569
7885
  meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
7570
7886
  meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
@@ -7580,7 +7896,7 @@ function BillingPriceViewFromJSONTyped5(json, ignoreDiscriminator) {
7580
7896
  productExternalId: json["product_external_id"],
7581
7897
  productId: json["product_id"],
7582
7898
  productName: json["product_name"],
7583
- tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
7899
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON2(json["tiers_mode"]),
7584
7900
  updatedAt: new Date(json["updated_at"]),
7585
7901
  usageType: json["usage_type"]
7586
7902
  };
@@ -7614,6 +7930,14 @@ function BillingProductDetailResponseDataFromJSONTyped5(json, ignoreDiscriminato
7614
7930
  };
7615
7931
  }
7616
7932
 
7933
+ // src/api/componentspublic/models/ChargeType.ts
7934
+ function ChargeTypeFromJSON2(json) {
7935
+ return ChargeTypeFromJSONTyped5(json, false);
7936
+ }
7937
+ function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
7938
+ return json;
7939
+ }
7940
+
7617
7941
  // src/api/componentspublic/models/CompatiblePlans.ts
7618
7942
  function CompatiblePlansFromJSON2(json) {
7619
7943
  return CompatiblePlansFromJSONTyped3(json, false);
@@ -7657,6 +7981,38 @@ function CustomPlanConfigFromJSONTyped3(json, ignoreDiscriminator) {
7657
7981
  };
7658
7982
  }
7659
7983
 
7984
+ // src/api/componentspublic/models/EntitlementPriceBehavior.ts
7985
+ function EntitlementPriceBehaviorFromJSON2(json) {
7986
+ return EntitlementPriceBehaviorFromJSONTyped5(json, false);
7987
+ }
7988
+ function EntitlementPriceBehaviorFromJSONTyped5(json, ignoreDiscriminator) {
7989
+ return json;
7990
+ }
7991
+
7992
+ // src/api/componentspublic/models/EntitlementValueType.ts
7993
+ function EntitlementValueTypeFromJSON2(json) {
7994
+ return EntitlementValueTypeFromJSONTyped6(json, false);
7995
+ }
7996
+ function EntitlementValueTypeFromJSONTyped6(json, ignoreDiscriminator) {
7997
+ return json;
7998
+ }
7999
+
8000
+ // src/api/componentspublic/models/EntityType.ts
8001
+ function EntityTypeFromJSON2(json) {
8002
+ return EntityTypeFromJSONTyped9(json, false);
8003
+ }
8004
+ function EntityTypeFromJSONTyped9(json, ignoreDiscriminator) {
8005
+ return json;
8006
+ }
8007
+
8008
+ // src/api/componentspublic/models/TraitType.ts
8009
+ function TraitTypeFromJSON2(json) {
8010
+ return TraitTypeFromJSONTyped3(json, false);
8011
+ }
8012
+ function TraitTypeFromJSONTyped3(json, ignoreDiscriminator) {
8013
+ return json;
8014
+ }
8015
+
7660
8016
  // src/api/componentspublic/models/EntityTraitDefinitionResponseData.ts
7661
8017
  function EntityTraitDefinitionResponseDataFromJSON2(json) {
7662
8018
  return EntityTraitDefinitionResponseDataFromJSONTyped7(json, false);
@@ -7668,10 +8024,10 @@ function EntityTraitDefinitionResponseDataFromJSONTyped7(json, ignoreDiscriminat
7668
8024
  return {
7669
8025
  createdAt: new Date(json["created_at"]),
7670
8026
  displayName: json["display_name"],
7671
- entityType: json["entity_type"],
8027
+ entityType: EntityTypeFromJSON2(json["entity_type"]),
7672
8028
  hierarchy: json["hierarchy"],
7673
8029
  id: json["id"],
7674
- traitType: json["trait_type"],
8030
+ traitType: TraitTypeFromJSON2(json["trait_type"]),
7675
8031
  updatedAt: new Date(json["updated_at"])
7676
8032
  };
7677
8033
  }
@@ -7694,6 +8050,14 @@ function EventSummaryResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
7694
8050
  };
7695
8051
  }
7696
8052
 
8053
+ // src/api/componentspublic/models/FeatureType.ts
8054
+ function FeatureTypeFromJSON2(json) {
8055
+ return FeatureTypeFromJSONTyped4(json, false);
8056
+ }
8057
+ function FeatureTypeFromJSONTyped4(json, ignoreDiscriminator) {
8058
+ return json;
8059
+ }
8060
+
7697
8061
  // src/api/componentspublic/models/PreviewObject.ts
7698
8062
  function PreviewObjectFromJSON2(json) {
7699
8063
  return PreviewObjectFromJSONTyped3(json, false);
@@ -7710,6 +8074,14 @@ function PreviewObjectFromJSONTyped3(json, ignoreDiscriminator) {
7710
8074
  };
7711
8075
  }
7712
8076
 
8077
+ // src/api/componentspublic/models/FeatureLifecyclePhase.ts
8078
+ function FeatureLifecyclePhaseFromJSON2(json) {
8079
+ return FeatureLifecyclePhaseFromJSONTyped4(json, false);
8080
+ }
8081
+ function FeatureLifecyclePhaseFromJSONTyped4(json, ignoreDiscriminator) {
8082
+ return json;
8083
+ }
8084
+
7713
8085
  // src/api/componentspublic/models/PreviewObjectResponseData.ts
7714
8086
  function PreviewObjectResponseDataFromJSON2(json) {
7715
8087
  return PreviewObjectResponseDataFromJSONTyped3(json, false);
@@ -7754,7 +8126,7 @@ function RuleConditionDetailResponseDataFromJSONTyped4(json, ignoreDiscriminator
7754
8126
  ),
7755
8127
  ruleId: json["rule_id"],
7756
8128
  trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON2(json["trait"]),
7757
- traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
8129
+ traitEntityType: json["trait_entity_type"] == null ? void 0 : EntityTypeFromJSON2(json["trait_entity_type"]),
7758
8130
  traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
7759
8131
  traitValue: json["trait_value"],
7760
8132
  updatedAt: new Date(json["updated_at"])
@@ -7821,10 +8193,10 @@ function FeatureResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
7821
8193
  createdAt: new Date(json["created_at"]),
7822
8194
  description: json["description"],
7823
8195
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
7824
- featureType: json["feature_type"],
8196
+ featureType: FeatureTypeFromJSON2(json["feature_type"]),
7825
8197
  icon: json["icon"],
7826
8198
  id: json["id"],
7827
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
8199
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
7828
8200
  maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
7829
8201
  name: json["name"],
7830
8202
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
@@ -7834,6 +8206,14 @@ function FeatureResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
7834
8206
  };
7835
8207
  }
7836
8208
 
8209
+ // src/api/componentspublic/models/FlagType.ts
8210
+ function FlagTypeFromJSON2(json) {
8211
+ return FlagTypeFromJSONTyped4(json, false);
8212
+ }
8213
+ function FlagTypeFromJSONTyped4(json, ignoreDiscriminator) {
8214
+ return json;
8215
+ }
8216
+
7837
8217
  // src/api/componentspublic/models/FlagDetailResponseData.ts
7838
8218
  function FlagDetailResponseDataFromJSON2(json) {
7839
8219
  return FlagDetailResponseDataFromJSONTyped3(json, false);
@@ -7848,7 +8228,7 @@ function FlagDetailResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
7848
8228
  description: json["description"],
7849
8229
  feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON2(json["feature"]),
7850
8230
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
7851
- flagType: json["flag_type"],
8231
+ flagType: FlagTypeFromJSON2(json["flag_type"]),
7852
8232
  id: json["id"],
7853
8233
  key: json["key"],
7854
8234
  lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
@@ -7872,11 +8252,11 @@ function FeatureDetailResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
7872
8252
  description: json["description"],
7873
8253
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
7874
8254
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON2(json["event_summary"]),
7875
- featureType: json["feature_type"],
8255
+ featureType: FeatureTypeFromJSON2(json["feature_type"]),
7876
8256
  flags: json["flags"].map(FlagDetailResponseDataFromJSON2),
7877
8257
  icon: json["icon"],
7878
8258
  id: json["id"],
7879
- lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
8259
+ lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
7880
8260
  maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
7881
8261
  name: json["name"],
7882
8262
  plans: json["plans"].map(PreviewObjectFromJSON2),
@@ -7888,6 +8268,14 @@ function FeatureDetailResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
7888
8268
  };
7889
8269
  }
7890
8270
 
8271
+ // src/api/componentspublic/models/PlanControlledByType.ts
8272
+ function PlanControlledByTypeFromJSON2(json) {
8273
+ return PlanControlledByTypeFromJSONTyped5(json, false);
8274
+ }
8275
+ function PlanControlledByTypeFromJSONTyped5(json, ignoreDiscriminator) {
8276
+ return json;
8277
+ }
8278
+
7891
8279
  // src/api/componentspublic/models/PlanCreditGrantView.ts
7892
8280
  function PlanCreditGrantViewFromJSON2(json) {
7893
8281
  return PlanCreditGrantViewFromJSONTyped4(json, false);
@@ -7900,8 +8288,12 @@ function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
7900
8288
  billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
7901
8289
  billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
7902
8290
  billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
7903
- billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : json["billing_credit_auto_topup_expiry_type"],
7904
- billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit"],
8291
+ billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(
8292
+ json["billing_credit_auto_topup_expiry_type"]
8293
+ ),
8294
+ billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(
8295
+ json["billing_credit_auto_topup_expiry_unit"]
8296
+ ),
7905
8297
  billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
7906
8298
  billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
7907
8299
  createdAt: new Date(json["created_at"]),
@@ -7910,21 +8302,31 @@ function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
7910
8302
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
7911
8303
  creditId: json["credit_id"],
7912
8304
  creditName: json["credit_name"],
7913
- expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
7914
- expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
8305
+ expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(json["expiry_type"]),
8306
+ expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(json["expiry_unit"]),
7915
8307
  expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
7916
8308
  id: json["id"],
7917
8309
  planId: json["plan_id"],
7918
8310
  planName: json["plan_name"],
7919
8311
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
7920
- resetCadence: json["reset_cadence"],
7921
- resetStart: json["reset_start"],
7922
- resetType: json["reset_type"],
8312
+ resetCadence: BillingPlanCreditGrantResetCadenceFromJSON2(
8313
+ json["reset_cadence"]
8314
+ ),
8315
+ resetStart: BillingPlanCreditGrantResetStartFromJSON2(json["reset_start"]),
8316
+ resetType: BillingPlanCreditGrantResetTypeFromJSON2(json["reset_type"]),
7923
8317
  singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
7924
8318
  updatedAt: new Date(json["updated_at"])
7925
8319
  };
7926
8320
  }
7927
8321
 
8322
+ // src/api/componentspublic/models/PlanType.ts
8323
+ function PlanTypeFromJSON2(json) {
8324
+ return PlanTypeFromJSONTyped6(json, false);
8325
+ }
8326
+ function PlanTypeFromJSONTyped6(json, ignoreDiscriminator) {
8327
+ return json;
8328
+ }
8329
+
7928
8330
  // src/api/componentspublic/models/PlanResponseData.ts
7929
8331
  function PlanResponseDataFromJSON2(json) {
7930
8332
  return PlanResponseDataFromJSONTyped4(json, false);
@@ -7940,7 +8342,7 @@ function PlanResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
7940
8342
  icon: json["icon"],
7941
8343
  id: json["id"],
7942
8344
  name: json["name"],
7943
- planType: json["plan_type"],
8345
+ planType: PlanTypeFromJSON2(json["plan_type"]),
7944
8346
  updatedAt: new Date(json["updated_at"])
7945
8347
  };
7946
8348
  }
@@ -7967,7 +8369,7 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
7967
8369
  metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
7968
8370
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON2(json["plan"]),
7969
8371
  planId: json["plan_id"],
7970
- priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
8372
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON2(json["price_behavior"]),
7971
8373
  ruleId: json["rule_id"],
7972
8374
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
7973
8375
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -7978,7 +8380,7 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
7978
8380
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
7979
8381
  valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON2(json["value_trait"]),
7980
8382
  valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
7981
- valueType: json["value_type"]
8383
+ valueType: EntitlementValueTypeFromJSON2(json["value_type"])
7982
8384
  };
7983
8385
  }
7984
8386
 
@@ -7993,10 +8395,10 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7993
8395
  return {
7994
8396
  audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
7995
8397
  billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON2(json["billing_product"]),
7996
- chargeType: json["charge_type"],
8398
+ chargeType: ChargeTypeFromJSON2(json["charge_type"]),
7997
8399
  companyCount: json["company_count"],
7998
8400
  compatiblePlanIds: json["compatible_plan_ids"],
7999
- controlledBy: json["controlled_by"],
8401
+ controlledBy: PlanControlledByTypeFromJSON2(json["controlled_by"]),
8000
8402
  createdAt: new Date(json["created_at"]),
8001
8403
  custom: json["custom"],
8002
8404
  customPlanConfig: json["custom_plan_config"] == null ? void 0 : CustomPlanConfigFromJSON2(json["custom_plan_config"]),
@@ -8019,7 +8421,7 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8019
8421
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
8020
8422
  name: json["name"],
8021
8423
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
8022
- planType: json["plan_type"],
8424
+ planType: PlanTypeFromJSON2(json["plan_type"]),
8023
8425
  trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
8024
8426
  updatedAt: new Date(json["updated_at"]),
8025
8427
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["yearly_price"])
@@ -8134,7 +8536,8 @@ function normalize(data) {
8134
8536
  taxCollectionEnabled: false
8135
8537
  },
8136
8538
  creditBundles: [],
8137
- creditGrants: []
8539
+ creditGrants: [],
8540
+ preventSelfServiceDowngrade: false
8138
8541
  });
8139
8542
  }
8140
8543
  var reducer = (state, action) => {
@@ -8287,7 +8690,7 @@ var reducer = (state, action) => {
8287
8690
  // src/context/EmbedProvider.tsx
8288
8691
  import { jsx, jsxs } from "react/jsx-runtime";
8289
8692
  var getCustomHeaders = (sessionId) => ({
8290
- "X-Schematic-Components-Version": "2.2.1",
8693
+ "X-Schematic-Components-Version": "2.3.1",
8291
8694
  "X-Schematic-Session-ID": sessionId
8292
8695
  });
8293
8696
  var EmbedProvider = ({
@@ -8951,10 +9354,10 @@ var Box = dt("div")((props) => {
8951
9354
  for (const [key, value] of Object.entries(props.$viewport || {})) {
8952
9355
  styles.push(lt`
8953
9356
  ${{
8954
- sm: "@container (min-width: 640px)",
8955
- md: "@container (min-width: 768px)",
8956
- lg: "@container (min-width: 1024px)",
8957
- xl: "@container (min-width: 1280px)",
9357
+ "sm": "@container (min-width: 640px)",
9358
+ "md": "@container (min-width: 768px)",
9359
+ "lg": "@container (min-width: 1024px)",
9360
+ "xl": "@container (min-width: 1280px)",
8958
9361
  "2xl": "@container (min-width: 1536px)"
8959
9362
  }[key] || key} {
8960
9363
  ${Object.entries(value || {}).reduce(reducer2, [])}
@@ -9452,8 +9855,8 @@ var Overlay = dt(Box)`
9452
9855
  scrollbar-gutter: stable both-edges;
9453
9856
  `;
9454
9857
  var Modal = dt.div.attrs({
9455
- tabIndex: 0,
9456
- role: "dialog",
9858
+ "tabIndex": 0,
9859
+ "role": "dialog",
9457
9860
  "aria-modal": true
9458
9861
  })`
9459
9862
  position: relative;
@@ -10296,9 +10699,6 @@ var StageButton = ({
10296
10699
  checkout,
10297
10700
  checkoutStage,
10298
10701
  checkoutStages,
10299
- hasAddOns,
10300
- hasPayInAdvanceEntitlements,
10301
- hasCreditBundles,
10302
10702
  hasPaymentMethod,
10303
10703
  hasPlan,
10304
10704
  inEditMode,
@@ -10313,7 +10713,31 @@ var StageButton = ({
10313
10713
  }) => {
10314
10714
  const { t: t2 } = useTranslation5();
10315
10715
  const isDisabled = isLoading || !hasPlan || inEditMode;
10716
+ const getNextStageId = (currentStageId) => {
10717
+ if (!checkoutStages) return void 0;
10718
+ const currentIndex = checkoutStages.findIndex(
10719
+ (s2) => s2.id === currentStageId
10720
+ );
10721
+ return checkoutStages[currentIndex + 1]?.id;
10722
+ };
10723
+ const getStageDisplayName = (stageId) => {
10724
+ switch (stageId) {
10725
+ case "usage":
10726
+ return t2("Usage");
10727
+ case "addons":
10728
+ return t2("Addons");
10729
+ case "addonsUsage":
10730
+ return t2("Add-ons Quantity");
10731
+ case "credits":
10732
+ return t2("Credits");
10733
+ case "checkout":
10734
+ return t2("Checkout");
10735
+ default:
10736
+ return t2("Checkout");
10737
+ }
10738
+ };
10316
10739
  if (checkoutStage === "plan") {
10740
+ const nextStage = getNextStageId("plan");
10317
10741
  if (isSelectedPlanTrialable && trialPaymentMethodRequired && shouldTrial) {
10318
10742
  return /* @__PURE__ */ jsx14(
10319
10743
  Button,
@@ -10343,9 +10767,7 @@ var StageButton = ({
10343
10767
  }
10344
10768
  );
10345
10769
  }
10346
- if (!isPaymentMethodRequired && !checkoutStages?.some(
10347
- (stage) => stage.id === "usage" || stage.id === "addons" || stage.id === "credits"
10348
- )) {
10770
+ if (!isPaymentMethodRequired && !nextStage) {
10349
10771
  return /* @__PURE__ */ jsx14(
10350
10772
  NoPaymentRequired,
10351
10773
  {
@@ -10362,27 +10784,23 @@ var StageButton = ({
10362
10784
  type: "button",
10363
10785
  disabled: isDisabled,
10364
10786
  onClick: async () => {
10365
- setCheckoutStage?.(
10366
- hasPayInAdvanceEntitlements ? "usage" : hasAddOns ? "addons" : hasCreditBundles ? "credits" : "checkout"
10367
- );
10787
+ setCheckoutStage?.(nextStage ?? "checkout");
10368
10788
  },
10369
10789
  $isLoading: isLoading,
10370
10790
  $fullWidth: true,
10371
10791
  $size: isSticky ? "sm" : "md",
10372
10792
  children: /* @__PURE__ */ jsxs8(Flex, { $gap: "0.5rem", $justifyContent: "center", $alignItems: "center", children: [
10373
10793
  t2("Next"),
10374
- ":",
10375
- " ",
10376
- hasPayInAdvanceEntitlements ? t2("Usage") : hasAddOns ? t2("Addons") : hasCreditBundles ? t2("Credits") : t2("Checkout"),
10794
+ ": ",
10795
+ getStageDisplayName(nextStage),
10377
10796
  /* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
10378
10797
  ] })
10379
10798
  }
10380
10799
  );
10381
10800
  }
10382
10801
  if (checkoutStage === "usage") {
10383
- if (!isPaymentMethodRequired && !checkoutStages?.some(
10384
- (stage) => stage.id === "addons" || stage.id === "credits"
10385
- )) {
10802
+ const nextStage = getNextStageId("usage");
10803
+ if (!isPaymentMethodRequired && !nextStage) {
10386
10804
  return /* @__PURE__ */ jsx14(
10387
10805
  NoPaymentRequired,
10388
10806
  {
@@ -10399,9 +10817,7 @@ var StageButton = ({
10399
10817
  type: "button",
10400
10818
  disabled: isDisabled,
10401
10819
  onClick: async () => {
10402
- setCheckoutStage?.(
10403
- hasAddOns ? "addons" : hasCreditBundles ? "credits" : "checkout"
10404
- );
10820
+ setCheckoutStage?.(nextStage ?? "checkout");
10405
10821
  },
10406
10822
  $isLoading: isLoading,
10407
10823
  $fullWidth: true,
@@ -10415,9 +10831,8 @@ var StageButton = ({
10415
10831
  $padding: "0 1rem",
10416
10832
  children: [
10417
10833
  t2("Next"),
10418
- ":",
10419
- " ",
10420
- hasAddOns ? t2("Addons") : hasCreditBundles ? t2("Credits") : t2("Checkout"),
10834
+ ": ",
10835
+ getStageDisplayName(nextStage),
10421
10836
  /* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
10422
10837
  ]
10423
10838
  }
@@ -10426,13 +10841,8 @@ var StageButton = ({
10426
10841
  );
10427
10842
  }
10428
10843
  if (checkoutStage === "addons") {
10429
- const hasAddonsUsageStage = checkoutStages?.some(
10430
- (stage) => stage.id === "addonsUsage"
10431
- );
10432
- const hasCreditsStage = checkoutStages?.some(
10433
- (stage) => stage.id === "credits"
10434
- );
10435
- if (!isPaymentMethodRequired && !hasAddonsUsageStage && !hasCreditsStage) {
10844
+ const nextStage = getNextStageId("addons");
10845
+ if (!isPaymentMethodRequired && !nextStage) {
10436
10846
  return /* @__PURE__ */ jsx14(
10437
10847
  NoPaymentRequired,
10438
10848
  {
@@ -10449,9 +10859,7 @@ var StageButton = ({
10449
10859
  type: "button",
10450
10860
  disabled: isDisabled,
10451
10861
  onClick: async () => {
10452
- setCheckoutStage?.(
10453
- hasAddonsUsageStage ? "addonsUsage" : hasCreditsStage ? "credits" : "checkout"
10454
- );
10862
+ setCheckoutStage?.(nextStage ?? "checkout");
10455
10863
  },
10456
10864
  $isLoading: isLoading,
10457
10865
  $fullWidth: true,
@@ -10464,9 +10872,8 @@ var StageButton = ({
10464
10872
  $padding: "0 1rem",
10465
10873
  children: [
10466
10874
  t2("Next"),
10467
- ":",
10468
- " ",
10469
- hasAddonsUsageStage ? t2("Add-ons Quantity") : hasCreditsStage ? t2("Credits") : t2("Checkout"),
10875
+ ": ",
10876
+ getStageDisplayName(nextStage),
10470
10877
  /* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
10471
10878
  ]
10472
10879
  }
@@ -10475,7 +10882,8 @@ var StageButton = ({
10475
10882
  );
10476
10883
  }
10477
10884
  if (checkoutStage === "addonsUsage") {
10478
- if (!isPaymentMethodRequired && !checkoutStages?.some((stage) => stage.id === "credits")) {
10885
+ const nextStage = getNextStageId("addonsUsage");
10886
+ if (!isPaymentMethodRequired && !nextStage) {
10479
10887
  return /* @__PURE__ */ jsx14(
10480
10888
  NoPaymentRequired,
10481
10889
  {
@@ -10492,7 +10900,7 @@ var StageButton = ({
10492
10900
  type: "button",
10493
10901
  disabled: isDisabled,
10494
10902
  onClick: async () => {
10495
- setCheckoutStage?.(hasCreditBundles ? "credits" : "checkout");
10903
+ setCheckoutStage?.(nextStage ?? "checkout");
10496
10904
  },
10497
10905
  $isLoading: isLoading,
10498
10906
  $fullWidth: true,
@@ -10507,7 +10915,7 @@ var StageButton = ({
10507
10915
  children: [
10508
10916
  t2("Next"),
10509
10917
  ": ",
10510
- hasCreditBundles ? t2("Credits") : t2("Checkout"),
10918
+ getStageDisplayName(nextStage),
10511
10919
  /* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
10512
10920
  ]
10513
10921
  }
@@ -10719,6 +11127,10 @@ var Sidebar = forwardRef7(
10719
11127
  }, [charges]);
10720
11128
  const updatedUsageBasedEntitlements = useMemo6(() => {
10721
11129
  const changedUsageBasedEntitlements = [];
11130
+ const allSelectedUsageBasedEntitlements = [
11131
+ ...usageBasedEntitlements,
11132
+ ...addOnUsageBasedEntitlements
11133
+ ];
10722
11134
  const addedUsageBasedEntitlements = selectedPlan ? usageBasedEntitlements.reduce(
10723
11135
  (acc, selected) => {
10724
11136
  const changed = currentUsageBasedEntitlements.find(
@@ -10738,9 +11150,10 @@ var Sidebar = forwardRef7(
10738
11150
  ) : [];
10739
11151
  const removedUsageBasedEntitlements = selectedPlan ? currentUsageBasedEntitlements.reduce(
10740
11152
  (acc, current) => {
10741
- const match2 = usageBasedEntitlements.every(
10742
- (entitlement) => entitlement.id !== current.entitlementId
10743
- ) && currentEntitlements.find(
11153
+ const existsInSelected = allSelectedUsageBasedEntitlements.some(
11154
+ (entitlement) => entitlement.id === current.entitlementId
11155
+ );
11156
+ const match2 = !existsInSelected && currentEntitlements.find(
10744
11157
  (usage) => usage.entitlementId === current.entitlementId
10745
11158
  );
10746
11159
  if (match2) {
@@ -10766,7 +11179,8 @@ var Sidebar = forwardRef7(
10766
11179
  selectedPlan,
10767
11180
  currentEntitlements,
10768
11181
  currentUsageBasedEntitlements,
10769
- usageBasedEntitlements
11182
+ usageBasedEntitlements,
11183
+ addOnUsageBasedEntitlements
10770
11184
  ]);
10771
11185
  const selectedAddOns = useMemo6(
10772
11186
  () => addOns.filter((addOn) => addOn.isSelected),
@@ -10954,9 +11368,6 @@ var Sidebar = forwardRef7(
10954
11368
  checkout: handleCheckout,
10955
11369
  checkoutStage,
10956
11370
  checkoutStages,
10957
- hasAddOns: addOns.length > 0,
10958
- hasPayInAdvanceEntitlements: payInAdvanceEntitlements.length > 0,
10959
- hasCreditBundles: creditBundles.length > 0,
10960
11371
  hasPaymentMethod: typeof paymentMethod !== "undefined" || typeof paymentMethodId === "string",
10961
11372
  hasPlan: typeof selectedPlan !== "undefined",
10962
11373
  inEditMode: settings.mode === "edit",
@@ -13380,6 +13791,21 @@ var CheckoutDialog = ({ top = 0 }) => {
13380
13791
  return true;
13381
13792
  });
13382
13793
  }, [checkoutStages, checkoutState]);
13794
+ const navigableStages = useMemo8(() => {
13795
+ return checkoutStages.filter((stage) => {
13796
+ if (stage.id === "plan" && checkoutState?.bypassPlanSelection) {
13797
+ return false;
13798
+ }
13799
+ if (stage.id === "addons" && checkoutState?.bypassAddOnSelection) {
13800
+ return false;
13801
+ }
13802
+ return true;
13803
+ });
13804
+ }, [
13805
+ checkoutStages,
13806
+ checkoutState?.bypassPlanSelection,
13807
+ checkoutState?.bypassAddOnSelection
13808
+ ]);
13383
13809
  const shouldShowBypassOverlay = isBypassLoading || checkoutState?.bypassPlanSelection && checkoutStage === "plan" && !hasSkippedInitialPlan || checkoutState?.bypassAddOnSelection && checkoutStage === "addons" && !hasSkippedInitialAddOns;
13384
13810
  return /* @__PURE__ */ jsxs16(Modal2, { ref: modalRef, size: "lg", top, children: [
13385
13811
  shouldShowBypassOverlay && /* @__PURE__ */ jsx22(
@@ -13564,7 +13990,7 @@ var CheckoutDialog = ({ top = 0 }) => {
13564
13990
  creditBundles,
13565
13991
  charges,
13566
13992
  checkoutStage,
13567
- checkoutStages,
13993
+ checkoutStages: navigableStages,
13568
13994
  error,
13569
13995
  isLoading,
13570
13996
  isPaymentMethodRequired,
@@ -22421,7 +22847,7 @@ var Loading = () => {
22421
22847
  $alignItems: "center",
22422
22848
  $justifyContent: "center",
22423
22849
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
22424
- children: /* @__PURE__ */ jsx53(Loader, { $color: "#194BFB", $size: "2xl" })
22850
+ children: /* @__PURE__ */ jsx53(Loader, { $color: settings.theme.primary, $size: "2xl" })
22425
22851
  }
22426
22852
  );
22427
22853
  };