@schematichq/schematic-components 2.31.0 → 2.31.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.
@@ -3946,6 +3946,17 @@ function BillingProductPriceIntervalFromJSONTyped(json, ignoreDiscriminator) {
3946
3946
  return json;
3947
3947
  }
3948
3948
 
3949
+ // src/api/checkoutexternal/models/Currency.ts
3950
+ function CurrencyFromJSON(json) {
3951
+ return CurrencyFromJSONTyped(json, false);
3952
+ }
3953
+ function CurrencyFromJSONTyped(json, ignoreDiscriminator) {
3954
+ return json;
3955
+ }
3956
+ function CurrencyToJSON(value) {
3957
+ return value;
3958
+ }
3959
+
3949
3960
  // src/api/checkoutexternal/models/BillingPriceUsageType.ts
3950
3961
  function BillingPriceUsageTypeFromJSON(json) {
3951
3962
  return BillingPriceUsageTypeFromJSONTyped(json, false);
@@ -3993,7 +4004,7 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
3993
4004
  return {
3994
4005
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
3995
4006
  createdAt: new Date(json["created_at"]),
3996
- currency: json["currency"],
4007
+ currency: CurrencyFromJSON(json["currency"]),
3997
4008
  id: json["id"],
3998
4009
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
3999
4010
  intervalCount: json["interval_count"],
@@ -4039,7 +4050,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
4039
4050
  return {
4040
4051
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
4041
4052
  createdAt: new Date(json["created_at"]),
4042
- currency: json["currency"],
4053
+ currency: CurrencyFromJSON(json["currency"]),
4043
4054
  id: json["id"],
4044
4055
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4045
4056
  intervalCount: json["interval_count"],
@@ -4075,7 +4086,7 @@ function CreditBundleCurrencyPriceFromJSONTyped(json, ignoreDiscriminator) {
4075
4086
  return json;
4076
4087
  }
4077
4088
  return {
4078
- currency: json["currency"],
4089
+ currency: CurrencyFromJSON(json["currency"]),
4079
4090
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON(json["price"])
4080
4091
  };
4081
4092
  }
@@ -4179,7 +4190,7 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4179
4190
  return json;
4180
4191
  }
4181
4192
  return {
4182
- currency: json["currency"],
4193
+ currency: CurrencyFromJSON(json["currency"]),
4183
4194
  externalPriceId: json["external_price_id"],
4184
4195
  id: json["id"],
4185
4196
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
@@ -4201,7 +4212,7 @@ function CreditCurrencyPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
4201
4212
  return json;
4202
4213
  }
4203
4214
  return {
4204
- currency: json["currency"],
4215
+ currency: CurrencyFromJSON(json["currency"]),
4205
4216
  price: json["price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["price"])
4206
4217
  };
4207
4218
  }
@@ -4285,7 +4296,7 @@ function CreditCurrencyPriceFromJSONTyped(json, ignoreDiscriminator) {
4285
4296
  return json;
4286
4297
  }
4287
4298
  return {
4288
- currency: json["currency"],
4299
+ currency: CurrencyFromJSON(json["currency"]),
4289
4300
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON(json["price"])
4290
4301
  };
4291
4302
  }
@@ -4556,7 +4567,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
4556
4567
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
4557
4568
  billingThreshold: json["billing_threshold"] == null ? void 0 : json["billing_threshold"],
4558
4569
  createdAt: new Date(json["created_at"]),
4559
- currency: json["currency"],
4570
+ currency: CurrencyFromJSON(json["currency"]),
4560
4571
  environmentId: json["environment_id"],
4561
4572
  externalId: json["external_id"],
4562
4573
  id: json["id"],
@@ -4601,7 +4612,7 @@ function BillingSubscriptionDiscountViewFromJSONTyped(json, ignoreDiscriminator)
4601
4612
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
4602
4613
  couponId: json["coupon_id"],
4603
4614
  couponName: json["coupon_name"],
4604
- currency: json["currency"] == null ? void 0 : json["currency"],
4615
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
4605
4616
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
4606
4617
  discountExternalId: json["discount_external_id"],
4607
4618
  duration: json["duration"],
@@ -4653,7 +4664,7 @@ function InvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4653
4664
  collectionMethod: json["collection_method"],
4654
4665
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
4655
4666
  createdAt: new Date(json["created_at"]),
4656
- currency: json["currency"],
4667
+ currency: CurrencyFromJSON(json["currency"]),
4657
4668
  customerExternalId: json["customer_external_id"],
4658
4669
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
4659
4670
  endingBalance: json["ending_balance"],
@@ -4716,7 +4727,7 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
4716
4727
  cancelAtPeriodEnd: json["cancel_at_period_end"],
4717
4728
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
4718
4729
  createdAt: new Date(json["created_at"]),
4719
- currency: json["currency"],
4730
+ currency: CurrencyFromJSON(json["currency"]),
4720
4731
  customerExternalId: json["customer_external_id"],
4721
4732
  defaultPaymentMethodId: json["default_payment_method_id"] == null ? void 0 : json["default_payment_method_id"],
4722
4733
  discounts: json["discounts"].map(
@@ -4742,6 +4753,71 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
4742
4753
  };
4743
4754
  }
4744
4755
 
4756
+ // src/api/checkoutexternal/models/CatalogCreditGrantResponseData.ts
4757
+ function CatalogCreditGrantResponseDataFromJSON(json) {
4758
+ return CatalogCreditGrantResponseDataFromJSONTyped(json, false);
4759
+ }
4760
+ function CatalogCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4761
+ if (json == null) {
4762
+ return json;
4763
+ }
4764
+ return {
4765
+ companyCreditAmount: json["company_credit_amount"],
4766
+ creditAmount: json["credit_amount"],
4767
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
4768
+ creditId: json["credit_id"],
4769
+ creditName: json["credit_name"],
4770
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
4771
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
4772
+ id: json["id"],
4773
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
4774
+ resetCadence: json["reset_cadence"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON(json["reset_cadence"]),
4775
+ scaling: PlanCreditGrantScalingFromJSON(json["scaling"])
4776
+ };
4777
+ }
4778
+
4779
+ // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
4780
+ function CatalogPriceTierResponseDataFromJSON(json) {
4781
+ return CatalogPriceTierResponseDataFromJSONTyped(json, false);
4782
+ }
4783
+ function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4784
+ if (json == null) {
4785
+ return json;
4786
+ }
4787
+ return {
4788
+ flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
4789
+ from: json["from"],
4790
+ perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
4791
+ perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
4792
+ to: json["to"] == null ? void 0 : json["to"]
4793
+ };
4794
+ }
4795
+
4796
+ // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
4797
+ function CatalogPriceResponseDataFromJSON(json) {
4798
+ return CatalogPriceResponseDataFromJSONTyped(json, false);
4799
+ }
4800
+ function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4801
+ if (json == null) {
4802
+ return json;
4803
+ }
4804
+ return {
4805
+ currency: CurrencyFromJSON(json["currency"]),
4806
+ id: json["id"],
4807
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4808
+ intervalCount: json["interval_count"],
4809
+ overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
4810
+ packageSize: json["package_size"],
4811
+ price: json["price"],
4812
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
4813
+ priceTiers: json["price_tiers"].map(
4814
+ CatalogPriceTierResponseDataFromJSON
4815
+ ),
4816
+ scheme: BillingPriceSchemeFromJSON(json["scheme"]),
4817
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
4818
+ };
4819
+ }
4820
+
4745
4821
  // src/api/checkoutexternal/models/UpdatePayInAdvanceRequestBody.ts
4746
4822
  function UpdatePayInAdvanceRequestBodyFromJSON(json) {
4747
4823
  return UpdatePayInAdvanceRequestBodyFromJSONTyped(json, false);
@@ -4896,7 +4972,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
4896
4972
  credit_bundles: value["creditBundles"].map(
4897
4973
  UpdateCreditBundleRequestBodyToJSON
4898
4974
  ),
4899
- currency: value["currency"],
4975
+ currency: CurrencyToJSON(value["currency"]),
4900
4976
  custom_field_values: value["customFieldValues"].map(
4901
4977
  CheckoutFieldValueToJSON
4902
4978
  ),
@@ -4942,7 +5018,7 @@ function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
4942
5018
  }
4943
5019
  return {
4944
5020
  amountOff: json["amount_off"],
4945
- currency: json["currency"],
5021
+ currency: CurrencyFromJSON(json["currency"]),
4946
5022
  dueNow: json["due_now"],
4947
5023
  isScheduledDowngrade: json["is_scheduled_downgrade"],
4948
5024
  newCharges: json["new_charges"],
@@ -5019,11 +5095,11 @@ function CheckoutProblemCodeFromJSONTyped(json, ignoreDiscriminator) {
5019
5095
  return json;
5020
5096
  }
5021
5097
 
5022
- // src/api/checkoutexternal/models/Problem.ts
5023
- function ProblemFromJSON(json) {
5024
- return ProblemFromJSONTyped(json, false);
5098
+ // src/api/checkoutexternal/models/CheckoutProblemResponseData.ts
5099
+ function CheckoutProblemResponseDataFromJSON(json) {
5100
+ return CheckoutProblemResponseDataFromJSONTyped(json, false);
5025
5101
  }
5026
- function ProblemFromJSONTyped(json, ignoreDiscriminator) {
5102
+ function CheckoutProblemResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5027
5103
  if (json == null) {
5028
5104
  return json;
5029
5105
  }
@@ -5031,7 +5107,7 @@ function ProblemFromJSONTyped(json, ignoreDiscriminator) {
5031
5107
  blocking: json["blocking"],
5032
5108
  bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
5033
5109
  code: CheckoutProblemCodeFromJSON(json["code"]),
5034
- currency: json["currency"] == null ? void 0 : json["currency"],
5110
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5035
5111
  detail: json["detail"] == null ? void 0 : json["detail"],
5036
5112
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
5037
5113
  fieldId: json["field_id"] == null ? void 0 : json["field_id"],
@@ -5060,7 +5136,9 @@ function CheckoutDraftResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5060
5136
  lastActivityAt: new Date(json["last_activity_at"]),
5061
5137
  priceSnapshot: json["price_snapshot"] == null ? void 0 : CheckoutPriceSnapshotFromJSON(json["price_snapshot"]),
5062
5138
  pricedAt: json["priced_at"] == null ? void 0 : new Date(json["priced_at"]),
5063
- problems: json["problems"].map(ProblemFromJSON),
5139
+ problems: json["problems"].map(
5140
+ CheckoutProblemResponseDataFromJSON
5141
+ ),
5064
5142
  selections: CheckoutSelectionsResponseDataFromJSON(json["selections"]),
5065
5143
  shareToken: json["share_token"] == null ? void 0 : json["share_token"],
5066
5144
  status: CheckoutStatusFromJSON(json["status"]),
@@ -5088,6 +5166,11 @@ function CheckoutFieldWithValueFromJSONTyped(json, ignoreDiscriminator) {
5088
5166
  };
5089
5167
  }
5090
5168
 
5169
+ // src/api/checkoutexternal/models/CheckoutIntent.ts
5170
+ function CheckoutIntentToJSON(value) {
5171
+ return value;
5172
+ }
5173
+
5091
5174
  // src/api/checkoutexternal/models/ScheduledDowngradeConfigBehavior.ts
5092
5175
  function ScheduledDowngradeConfigBehaviorFromJSON(json) {
5093
5176
  return ScheduledDowngradeConfigBehaviorFromJSONTyped(json, false);
@@ -5112,7 +5195,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5112
5195
  confirmPaymentIntentClientSecret: json["confirm_payment_intent_client_secret"] == null ? void 0 : json["confirm_payment_intent_client_secret"],
5113
5196
  confirmPaymentIntentId: json["confirm_payment_intent_id"] == null ? void 0 : json["confirm_payment_intent_id"],
5114
5197
  createdAt: new Date(json["created_at"]),
5115
- currency: json["currency"],
5198
+ currency: CurrencyFromJSON(json["currency"]),
5116
5199
  customerExternalId: json["customer_external_id"],
5117
5200
  defaultPaymentMethodId: json["default_payment_method_id"] == null ? void 0 : json["default_payment_method_id"],
5118
5201
  expiredAt: json["expired_at"] == null ? void 0 : new Date(json["expired_at"]),
@@ -5232,6 +5315,134 @@ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminato
5232
5315
  };
5233
5316
  }
5234
5317
 
5318
+ // src/api/checkoutexternal/models/CompanyCreditGrantResponseData.ts
5319
+ function CompanyCreditGrantResponseDataFromJSON(json) {
5320
+ return CompanyCreditGrantResponseDataFromJSONTyped(json, false);
5321
+ }
5322
+ function CompanyCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5323
+ if (json == null) {
5324
+ return json;
5325
+ }
5326
+ return {
5327
+ bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
5328
+ bundleName: json["bundle_name"] == null ? void 0 : json["bundle_name"],
5329
+ createdAt: new Date(json["created_at"]),
5330
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
5331
+ grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
5332
+ id: json["id"],
5333
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
5334
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"],
5335
+ quantity: json["quantity"],
5336
+ quantityRemaining: json["quantity_remaining"],
5337
+ quantityUsed: json["quantity_used"],
5338
+ renewalPeriod: json["renewal_period"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON(json["renewal_period"]),
5339
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
5340
+ validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"])
5341
+ };
5342
+ }
5343
+
5344
+ // src/api/checkoutexternal/models/CompanyCreditCompositionResponseData.ts
5345
+ function CompanyCreditCompositionResponseDataFromJSON(json) {
5346
+ return CompanyCreditCompositionResponseDataFromJSONTyped(json, false);
5347
+ }
5348
+ function CompanyCreditCompositionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5349
+ if (json == null) {
5350
+ return json;
5351
+ }
5352
+ return {
5353
+ fixedQuantity: json["fixed_quantity"],
5354
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
5355
+ licenseName: json["license_name"],
5356
+ licensePluralName: json["license_plural_name"] == null ? void 0 : json["license_plural_name"],
5357
+ licenseQuantity: json["license_quantity"],
5358
+ licenseSingularName: json["license_singular_name"] == null ? void 0 : json["license_singular_name"],
5359
+ perLicenseAmount: json["per_license_amount"],
5360
+ period: json["period"],
5361
+ renewsAt: json["renews_at"] == null ? void 0 : new Date(json["renews_at"]),
5362
+ total: json["total"]
5363
+ };
5364
+ }
5365
+
5366
+ // src/api/checkoutexternal/models/CompanyCreditBalanceResponseData.ts
5367
+ function CompanyCreditBalanceResponseDataFromJSON(json) {
5368
+ return CompanyCreditBalanceResponseDataFromJSONTyped(json, false);
5369
+ }
5370
+ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5371
+ if (json == null) {
5372
+ return json;
5373
+ }
5374
+ return {
5375
+ composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
5376
+ creditDescription: json["credit_description"],
5377
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5378
+ creditId: json["credit_id"],
5379
+ creditName: json["credit_name"],
5380
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5381
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5382
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
5383
+ grants: json["grants"].map(
5384
+ CompanyCreditGrantResponseDataFromJSON
5385
+ ),
5386
+ purchasable: json["purchasable"],
5387
+ remaining: json["remaining"],
5388
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
5389
+ total: json["total"],
5390
+ used: json["used"]
5391
+ };
5392
+ }
5393
+
5394
+ // src/api/checkoutexternal/models/CompanyCreditBalancesResponseData.ts
5395
+ function CompanyCreditBalancesResponseDataFromJSON(json) {
5396
+ return CompanyCreditBalancesResponseDataFromJSONTyped(json, false);
5397
+ }
5398
+ function CompanyCreditBalancesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5399
+ if (json == null) {
5400
+ return json;
5401
+ }
5402
+ return {
5403
+ balances: json["balances"].map(
5404
+ CompanyCreditBalanceResponseDataFromJSON
5405
+ ),
5406
+ count: json["count"]
5407
+ };
5408
+ }
5409
+
5410
+ // src/api/checkoutexternal/models/CompanyCreditUserUsageRowResponseData.ts
5411
+ function CompanyCreditUserUsageRowResponseDataFromJSON(json) {
5412
+ return CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, false);
5413
+ }
5414
+ function CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5415
+ if (json == null) {
5416
+ return json;
5417
+ }
5418
+ return {
5419
+ name: json["name"] == null ? void 0 : json["name"],
5420
+ share: json["share"],
5421
+ used: json["used"],
5422
+ userId: json["user_id"]
5423
+ };
5424
+ }
5425
+
5426
+ // src/api/checkoutexternal/models/CompanyCreditUserUsageResponseData.ts
5427
+ function CompanyCreditUserUsageResponseDataFromJSON(json) {
5428
+ return CompanyCreditUserUsageResponseDataFromJSONTyped(json, false);
5429
+ }
5430
+ function CompanyCreditUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5431
+ if (json == null) {
5432
+ return json;
5433
+ }
5434
+ return {
5435
+ count: json["count"],
5436
+ endTime: json["end_time"] == null ? void 0 : new Date(json["end_time"]),
5437
+ startTime: json["start_time"] == null ? void 0 : new Date(json["start_time"]),
5438
+ total: json["total"],
5439
+ unattributed: json["unattributed"] == null ? void 0 : json["unattributed"],
5440
+ users: json["users"].map(
5441
+ CompanyCreditUserUsageRowResponseDataFromJSON
5442
+ )
5443
+ };
5444
+ }
5445
+
5235
5446
  // src/api/checkoutexternal/models/CurrencyBalance.ts
5236
5447
  function CurrencyBalanceFromJSON(json) {
5237
5448
  return CurrencyBalanceFromJSONTyped(json, false);
@@ -5242,7 +5453,7 @@ function CurrencyBalanceFromJSONTyped(json, ignoreDiscriminator) {
5242
5453
  }
5243
5454
  return {
5244
5455
  balance: json["balance"],
5245
- currency: json["currency"]
5456
+ currency: CurrencyFromJSON(json["currency"])
5246
5457
  };
5247
5458
  }
5248
5459
 
@@ -5453,7 +5664,7 @@ function ScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator)
5453
5664
  return json;
5454
5665
  }
5455
5666
  return {
5456
- currency: json["currency"],
5667
+ currency: CurrencyFromJSON(json["currency"]),
5457
5668
  effectiveAfter: new Date(json["effective_after"]),
5458
5669
  fromPlanId: json["from_plan_id"],
5459
5670
  fromPlanName: json["from_plan_name"],
@@ -5574,6 +5785,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5574
5785
  daysUntilDue: json["days_until_due"],
5575
5786
  externalInvoiceId: json["external_invoice_id"] == null ? void 0 : json["external_invoice_id"],
5576
5787
  id: json["id"],
5788
+ migrationId: json["migration_id"] == null ? void 0 : json["migration_id"],
5577
5789
  paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
5578
5790
  planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
5579
5791
  planId: json["plan_id"],
@@ -5855,7 +6067,7 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5855
6067
  return {
5856
6068
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
5857
6069
  couponName: json["coupon_name"],
5858
- currency: json["currency"] == null ? void 0 : json["currency"],
6070
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5859
6071
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
5860
6072
  duration: json["duration"],
5861
6073
  durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
@@ -5863,6 +6075,141 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5863
6075
  };
5864
6076
  }
5865
6077
 
6078
+ // src/api/checkoutexternal/models/FeatureType.ts
6079
+ var FeatureType = {
6080
+ Boolean: "boolean",
6081
+ Event: "event",
6082
+ License: "license",
6083
+ Trait: "trait"
6084
+ };
6085
+ function FeatureTypeFromJSON(json) {
6086
+ return FeatureTypeFromJSONTyped(json, false);
6087
+ }
6088
+ function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6089
+ return json;
6090
+ }
6091
+
6092
+ // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6093
+ var EntitlementPriceBehavior = {
6094
+ CreditBurndown: "credit_burndown",
6095
+ Overage: "overage",
6096
+ PayAsYouGo: "pay_as_you_go",
6097
+ PayInAdvance: "pay_in_advance",
6098
+ Tier: "tier"
6099
+ };
6100
+ function EntitlementPriceBehaviorFromJSON(json) {
6101
+ return EntitlementPriceBehaviorFromJSONTyped(json, false);
6102
+ }
6103
+ function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6104
+ return json;
6105
+ }
6106
+
6107
+ // src/api/checkoutexternal/models/EntitlementType.ts
6108
+ function EntitlementTypeFromJSON(json) {
6109
+ return EntitlementTypeFromJSONTyped(json, false);
6110
+ }
6111
+ function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
6112
+ return json;
6113
+ }
6114
+
6115
+ // src/api/checkoutexternal/models/CompanyFeatureUsageResponseData.ts
6116
+ function CompanyFeatureUsageResponseDataFromJSON(json) {
6117
+ return CompanyFeatureUsageResponseDataFromJSONTyped(json, false);
6118
+ }
6119
+ function CompanyFeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6120
+ if (json == null) {
6121
+ return json;
6122
+ }
6123
+ return {
6124
+ access: json["access"],
6125
+ allocation: json["allocation"] == null ? void 0 : json["allocation"],
6126
+ companyOverrideId: json["company_override_id"] == null ? void 0 : json["company_override_id"],
6127
+ consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
6128
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
6129
+ creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
6130
+ creditName: json["credit_name"] == null ? void 0 : json["credit_name"],
6131
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
6132
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
6133
+ currentCost: json["current_cost"] == null ? void 0 : json["current_cost"],
6134
+ entitlementType: EntitlementTypeFromJSON(json["entitlement_type"]),
6135
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
6136
+ featureDescription: json["feature_description"],
6137
+ featureIcon: json["feature_icon"],
6138
+ featureId: json["feature_id"],
6139
+ featureName: json["feature_name"],
6140
+ featurePluralName: json["feature_plural_name"] == null ? void 0 : json["feature_plural_name"],
6141
+ featureSingularName: json["feature_singular_name"] == null ? void 0 : json["feature_singular_name"],
6142
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
6143
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
6144
+ metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
6145
+ metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
6146
+ perLicenseCreditGrants: json["per_license_credit_grants"].map(CatalogCreditGrantResponseDataFromJSON),
6147
+ planEntitlementId: json["plan_entitlement_id"] == null ? void 0 : json["plan_entitlement_id"],
6148
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
6149
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6150
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
6151
+ softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
6152
+ usage: json["usage"] == null ? void 0 : json["usage"],
6153
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
6154
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
6155
+ valueType: EntitlementValueTypeFromJSON(json["value_type"]),
6156
+ warningThreshold: json["warning_threshold"] == null ? void 0 : json["warning_threshold"]
6157
+ };
6158
+ }
6159
+
6160
+ // src/api/checkoutexternal/models/CompanyFeatureUsageListResponseData.ts
6161
+ function CompanyFeatureUsageListResponseDataFromJSON(json) {
6162
+ return CompanyFeatureUsageListResponseDataFromJSONTyped(json, false);
6163
+ }
6164
+ function CompanyFeatureUsageListResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6165
+ if (json == null) {
6166
+ return json;
6167
+ }
6168
+ return {
6169
+ count: json["count"],
6170
+ features: json["features"].map(
6171
+ CompanyFeatureUsageResponseDataFromJSON
6172
+ )
6173
+ };
6174
+ }
6175
+
6176
+ // src/api/checkoutexternal/models/CompanyUserUsageResponseData.ts
6177
+ function CompanyUserUsageResponseDataFromJSON(json) {
6178
+ return CompanyUserUsageResponseDataFromJSONTyped(json, false);
6179
+ }
6180
+ function CompanyUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6181
+ if (json == null) {
6182
+ return json;
6183
+ }
6184
+ return {
6185
+ lastSeen: new Date(json["last_seen"]),
6186
+ name: json["name"] == null ? void 0 : json["name"],
6187
+ share: json["share"],
6188
+ usage: json["usage"],
6189
+ userId: json["user_id"]
6190
+ };
6191
+ }
6192
+
6193
+ // src/api/checkoutexternal/models/CompanyFeatureUserUsageResponseData.ts
6194
+ function CompanyFeatureUserUsageResponseDataFromJSON(json) {
6195
+ return CompanyFeatureUserUsageResponseDataFromJSONTyped(json, false);
6196
+ }
6197
+ function CompanyFeatureUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6198
+ if (json == null) {
6199
+ return json;
6200
+ }
6201
+ return {
6202
+ count: json["count"],
6203
+ endTime: new Date(json["end_time"]),
6204
+ startTime: new Date(json["start_time"]),
6205
+ total: json["total"],
6206
+ unattributed: json["unattributed"] == null ? void 0 : json["unattributed"],
6207
+ users: json["users"].map(
6208
+ CompanyUserUsageResponseDataFromJSON
6209
+ )
6210
+ };
6211
+ }
6212
+
5866
6213
  // src/api/checkoutexternal/models/CompanyInvoiceResponseData.ts
5867
6214
  function CompanyInvoiceResponseDataFromJSON(json) {
5868
6215
  return CompanyInvoiceResponseDataFromJSONTyped(json, false);
@@ -5874,7 +6221,7 @@ function CompanyInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5874
6221
  return {
5875
6222
  amountDue: json["amount_due"],
5876
6223
  createdAt: new Date(json["created_at"]),
5877
- currency: json["currency"],
6224
+ currency: CurrencyFromJSON(json["currency"]),
5878
6225
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
5879
6226
  id: json["id"],
5880
6227
  status: json["status"] == null ? void 0 : InvoiceStatusFromJSON(json["status"]),
@@ -5916,17 +6263,11 @@ function CompanyOverrideNoteResponseDataFromJSONTyped(json, ignoreDiscriminator)
5916
6263
  };
5917
6264
  }
5918
6265
 
5919
- // src/api/checkoutexternal/models/FeatureType.ts
5920
- var FeatureType = {
5921
- Boolean: "boolean",
5922
- Event: "event",
5923
- License: "license",
5924
- Trait: "trait"
5925
- };
5926
- function FeatureTypeFromJSON(json) {
5927
- return FeatureTypeFromJSONTyped(json, false);
6266
+ // src/api/checkoutexternal/models/FeatureEventSource.ts
6267
+ function FeatureEventSourceFromJSON(json) {
6268
+ return FeatureEventSourceFromJSONTyped(json, false);
5928
6269
  }
5929
- function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6270
+ function FeatureEventSourceFromJSONTyped(json, ignoreDiscriminator) {
5930
6271
  return json;
5931
6272
  }
5932
6273
 
@@ -5949,6 +6290,7 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5949
6290
  return {
5950
6291
  createdAt: new Date(json["created_at"]),
5951
6292
  description: json["description"],
6293
+ eventSource: FeatureEventSourceFromJSON(json["event_source"]),
5952
6294
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
5953
6295
  featureType: FeatureTypeFromJSON(json["feature_type"]),
5954
6296
  icon: json["icon"],
@@ -5988,6 +6330,7 @@ function CompanyOverrideResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5988
6330
  notes: json["notes"].map(
5989
6331
  CompanyOverrideNoteResponseDataFromJSON
5990
6332
  ),
6333
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
5991
6334
  ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
5992
6335
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
5993
6336
  updatedAt: new Date(json["updated_at"]),
@@ -6073,7 +6416,7 @@ function EstimatedPlanTotalFromJSONTyped(json, ignoreDiscriminator) {
6073
6416
  }
6074
6417
  return {
6075
6418
  amount: json["amount"],
6076
- currency: json["currency"],
6419
+ currency: CurrencyFromJSON(json["currency"]),
6077
6420
  period: PlanPriceCadenceFromJSON(json["period"])
6078
6421
  };
6079
6422
  }
@@ -6087,28 +6430,13 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscrimi
6087
6430
  return json;
6088
6431
  }
6089
6432
  return {
6090
- currency: json["currency"],
6433
+ currency: CurrencyFromJSON(json["currency"]),
6091
6434
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_price"]),
6092
6435
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["quarterly_price"]),
6093
6436
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_price"])
6094
6437
  };
6095
6438
  }
6096
6439
 
6097
- // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6098
- var EntitlementPriceBehavior = {
6099
- CreditBurndown: "credit_burndown",
6100
- Overage: "overage",
6101
- PayAsYouGo: "pay_as_you_go",
6102
- PayInAdvance: "pay_in_advance",
6103
- Tier: "tier"
6104
- };
6105
- function EntitlementPriceBehaviorFromJSON(json) {
6106
- return EntitlementPriceBehaviorFromJSONTyped(json, false);
6107
- }
6108
- function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6109
- return json;
6110
- }
6111
-
6112
6440
  // src/api/checkoutexternal/models/WarningTierResponseData.ts
6113
6441
  function WarningTierResponseDataFromJSON(json) {
6114
6442
  return WarningTierResponseDataFromJSONTyped(json, false);
@@ -6194,6 +6522,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6194
6522
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
6195
6523
  planId: json["plan_id"],
6196
6524
  priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6525
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
6197
6526
  ruleId: json["rule_id"],
6198
6527
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
6199
6528
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -6403,6 +6732,7 @@ function FeatureInPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6403
6732
  ),
6404
6733
  createdAt: new Date(json["created_at"]),
6405
6734
  description: json["description"],
6735
+ eventSource: FeatureEventSourceFromJSON(json["event_source"]),
6406
6736
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
6407
6737
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
6408
6738
  featureType: FeatureTypeFromJSON(json["feature_type"]),
@@ -6525,7 +6855,7 @@ function PlanCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator)
6525
6855
  return json;
6526
6856
  }
6527
6857
  return {
6528
- currency: json["currency"],
6858
+ currency: CurrencyFromJSON(json["currency"]),
6529
6859
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
6530
6860
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
6531
6861
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["quarterly_price"]),
@@ -6588,14 +6918,6 @@ function CreditGrantDetailFromJSONTyped(json, ignoreDiscriminator) {
6588
6918
  };
6589
6919
  }
6590
6920
 
6591
- // src/api/checkoutexternal/models/EntitlementType.ts
6592
- function EntitlementTypeFromJSON(json) {
6593
- return EntitlementTypeFromJSONTyped(json, false);
6594
- }
6595
- function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
6596
- return json;
6597
- }
6598
-
6599
6921
  // src/api/checkoutexternal/models/FeatureUsageResponseData.ts
6600
6922
  function FeatureUsageResponseDataFromJSON(json) {
6601
6923
  return FeatureUsageResponseDataFromJSONTyped(json, false);
@@ -6736,7 +7058,7 @@ function CompanySubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator)
6736
7058
  return {
6737
7059
  cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
6738
7060
  cancelAtPeriodEnd: json["cancel_at_period_end"],
6739
- currency: json["currency"],
7061
+ currency: CurrencyFromJSON(json["currency"]),
6740
7062
  customerExternalId: json["customer_external_id"],
6741
7063
  discounts: json["discounts"].map(
6742
7064
  BillingSubscriptionDiscountViewFromJSON
@@ -6767,7 +7089,7 @@ function CompanyUpcomingInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminat
6767
7089
  }
6768
7090
  return {
6769
7091
  amountDue: json["amount_due"],
6770
- currency: json["currency"],
7092
+ currency: CurrencyFromJSON(json["currency"]),
6771
7093
  customerBalanceApplied: json["customer_balance_applied"],
6772
7094
  customerBalanceRemaining: json["customer_balance_remaining"],
6773
7095
  discounts: json["discounts"].map(
@@ -6932,7 +7254,7 @@ function UpcomingInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6932
7254
  collectionMethod: json["collection_method"],
6933
7255
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
6934
7256
  createdAt: new Date(json["created_at"]),
6935
- currency: json["currency"],
7257
+ currency: CurrencyFromJSON(json["currency"]),
6936
7258
  customerExternalId: json["customer_external_id"],
6937
7259
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
6938
7260
  endingBalance: json["ending_balance"],
@@ -7003,7 +7325,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
7003
7325
  creditDescription: json["credit_description"],
7004
7326
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
7005
7327
  creditName: json["credit_name"],
7006
- currency: json["currency"] == null ? void 0 : json["currency"],
7328
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
7007
7329
  exhaustedAt: json["exhausted_at"] == null ? void 0 : new Date(json["exhausted_at"]),
7008
7330
  expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
7009
7331
  expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
@@ -7016,7 +7338,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
7016
7338
  planName: json["plan_name"] == null ? void 0 : json["plan_name"],
7017
7339
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
7018
7340
  postpaidChargeAmount: json["postpaid_charge_amount"] == null ? void 0 : json["postpaid_charge_amount"],
7019
- postpaidChargeCurrency: json["postpaid_charge_currency"] == null ? void 0 : json["postpaid_charge_currency"],
7341
+ postpaidChargeCurrency: json["postpaid_charge_currency"] == null ? void 0 : CurrencyFromJSON(json["postpaid_charge_currency"]),
7020
7342
  postpaidChargedCredits: json["postpaid_charged_credits"] == null ? void 0 : json["postpaid_charged_credits"],
7021
7343
  postpaidPeriodEnd: json["postpaid_period_end"] == null ? void 0 : new Date(json["postpaid_period_end"]),
7022
7344
  postpaidRate: json["postpaid_rate"] == null ? void 0 : json["postpaid_rate"],
@@ -7183,10 +7505,11 @@ function CreateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
7183
7505
  credit_bundles: value["creditBundles"].map(
7184
7506
  UpdateCreditBundleRequestBodyToJSON
7185
7507
  ),
7186
- currency: value["currency"],
7508
+ currency: CurrencyToJSON(value["currency"]),
7187
7509
  custom_field_values: value["customFieldValues"].map(
7188
7510
  CheckoutFieldValueToJSON
7189
7511
  ),
7512
+ intent: CheckoutIntentToJSON(value["intent"]),
7190
7513
  new_plan_id: value["newPlanId"],
7191
7514
  new_price_id: value["newPriceId"],
7192
7515
  opt_in_accepted: value["optInAccepted"],
@@ -7436,6 +7759,90 @@ function GetCheckoutTaxIDResponseFromJSONTyped(json, ignoreDiscriminator) {
7436
7759
  };
7437
7760
  }
7438
7761
 
7762
+ // src/api/checkoutexternal/models/GetCompanyCreditBalancesResponse.ts
7763
+ function GetCompanyCreditBalancesResponseFromJSON(json) {
7764
+ return GetCompanyCreditBalancesResponseFromJSONTyped(json, false);
7765
+ }
7766
+ function GetCompanyCreditBalancesResponseFromJSONTyped(json, ignoreDiscriminator) {
7767
+ if (json == null) {
7768
+ return json;
7769
+ }
7770
+ return {
7771
+ data: CompanyCreditBalancesResponseDataFromJSON(json["data"]),
7772
+ params: json["params"]
7773
+ };
7774
+ }
7775
+
7776
+ // src/api/checkoutexternal/models/GetCompanyCreditUserUsageParams.ts
7777
+ function GetCompanyCreditUserUsageParamsFromJSON(json) {
7778
+ return GetCompanyCreditUserUsageParamsFromJSONTyped(json, false);
7779
+ }
7780
+ function GetCompanyCreditUserUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
7781
+ if (json == null) {
7782
+ return json;
7783
+ }
7784
+ return {
7785
+ limit: json["limit"] == null ? void 0 : json["limit"],
7786
+ offset: json["offset"] == null ? void 0 : json["offset"]
7787
+ };
7788
+ }
7789
+
7790
+ // src/api/checkoutexternal/models/GetCompanyCreditUserUsageResponse.ts
7791
+ function GetCompanyCreditUserUsageResponseFromJSON(json) {
7792
+ return GetCompanyCreditUserUsageResponseFromJSONTyped(json, false);
7793
+ }
7794
+ function GetCompanyCreditUserUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
7795
+ if (json == null) {
7796
+ return json;
7797
+ }
7798
+ return {
7799
+ data: CompanyCreditUserUsageResponseDataFromJSON(json["data"]),
7800
+ params: GetCompanyCreditUserUsageParamsFromJSON(json["params"])
7801
+ };
7802
+ }
7803
+
7804
+ // src/api/checkoutexternal/models/GetCompanyFeatureUsageResponse.ts
7805
+ function GetCompanyFeatureUsageResponseFromJSON(json) {
7806
+ return GetCompanyFeatureUsageResponseFromJSONTyped(json, false);
7807
+ }
7808
+ function GetCompanyFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
7809
+ if (json == null) {
7810
+ return json;
7811
+ }
7812
+ return {
7813
+ data: CompanyFeatureUsageListResponseDataFromJSON(json["data"]),
7814
+ params: json["params"]
7815
+ };
7816
+ }
7817
+
7818
+ // src/api/checkoutexternal/models/GetCompanyFeatureUserUsageParams.ts
7819
+ function GetCompanyFeatureUserUsageParamsFromJSON(json) {
7820
+ return GetCompanyFeatureUserUsageParamsFromJSONTyped(json, false);
7821
+ }
7822
+ function GetCompanyFeatureUserUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
7823
+ if (json == null) {
7824
+ return json;
7825
+ }
7826
+ return {
7827
+ limit: json["limit"] == null ? void 0 : json["limit"],
7828
+ offset: json["offset"] == null ? void 0 : json["offset"]
7829
+ };
7830
+ }
7831
+
7832
+ // src/api/checkoutexternal/models/GetCompanyFeatureUserUsageResponse.ts
7833
+ function GetCompanyFeatureUserUsageResponseFromJSON(json) {
7834
+ return GetCompanyFeatureUserUsageResponseFromJSONTyped(json, false);
7835
+ }
7836
+ function GetCompanyFeatureUserUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
7837
+ if (json == null) {
7838
+ return json;
7839
+ }
7840
+ return {
7841
+ data: CompanyFeatureUserUsageResponseDataFromJSON(json["data"]),
7842
+ params: GetCompanyFeatureUserUsageParamsFromJSON(json["params"])
7843
+ };
7844
+ }
7845
+
7439
7846
  // src/api/checkoutexternal/models/GetCompanyInvoicesParams.ts
7440
7847
  function GetCompanyInvoicesParamsFromJSON(json) {
7441
7848
  return GetCompanyInvoicesParamsFromJSONTyped(json, false);
@@ -7718,7 +8125,7 @@ function PreviewSubscriptionDiscountResponseDataFromJSONTyped(json, ignoreDiscri
7718
8125
  return {
7719
8126
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
7720
8127
  couponName: json["coupon_name"],
7721
- currency: json["currency"] == null ? void 0 : json["currency"],
8128
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
7722
8129
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
7723
8130
  duration: json["duration"],
7724
8131
  durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
@@ -7740,7 +8147,7 @@ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscrim
7740
8147
  }
7741
8148
  return {
7742
8149
  amountOff: json["amount_off"],
7743
- currency: json["currency"],
8150
+ currency: CurrencyFromJSON(json["currency"]),
7744
8151
  discountAmount: json["discount_amount"],
7745
8152
  discounts: json["discounts"].map(
7746
8153
  PreviewSubscriptionDiscountResponseDataFromJSON
@@ -7782,6 +8189,9 @@ function PreviewSubscriptionChangeResponseDataFromJSONTyped(json, ignoreDiscrimi
7782
8189
  paymentMethodRequired: json["payment_method_required"],
7783
8190
  percentOff: json["percent_off"],
7784
8191
  periodStart: new Date(json["period_start"]),
8192
+ problems: json["problems"].map(
8193
+ CheckoutProblemResponseDataFromJSON
8194
+ ),
7785
8195
  promoCodeApplied: json["promo_code_applied"],
7786
8196
  proration: json["proration"],
7787
8197
  scheduledChangeTime: json["scheduled_change_time"] == null ? void 0 : new Date(json["scheduled_change_time"]),
@@ -7885,10 +8295,11 @@ function UpdateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
7885
8295
  credit_bundles: value["creditBundles"].map(
7886
8296
  UpdateCreditBundleRequestBodyToJSON
7887
8297
  ),
7888
- currency: value["currency"],
8298
+ currency: CurrencyToJSON(value["currency"]),
7889
8299
  custom_field_values: value["customFieldValues"].map(
7890
8300
  CheckoutFieldValueToJSON
7891
8301
  ),
8302
+ intent: CheckoutIntentToJSON(value["intent"]),
7892
8303
  new_plan_id: value["newPlanId"],
7893
8304
  new_price_id: value["newPriceId"],
7894
8305
  opt_in_accepted: value["optInAccepted"],
@@ -8329,6 +8740,170 @@ var CheckoutexternalApi = class extends BaseAPI {
8329
8740
  const response = await this.getCheckoutTaxIDRaw(initOverrides);
8330
8741
  return await response.value();
8331
8742
  }
8743
+ /**
8744
+ * Get company credit balances
8745
+ */
8746
+ async getCompanyCreditBalancesRaw(initOverrides) {
8747
+ const queryParameters = {};
8748
+ const headerParameters = {};
8749
+ if (this.configuration && this.configuration.apiKey) {
8750
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
8751
+ "X-Schematic-Api-Key"
8752
+ );
8753
+ }
8754
+ const response = await this.request(
8755
+ {
8756
+ path: `/company/credits`,
8757
+ method: "GET",
8758
+ headers: headerParameters,
8759
+ query: queryParameters
8760
+ },
8761
+ initOverrides
8762
+ );
8763
+ return new JSONApiResponse(
8764
+ response,
8765
+ (jsonValue) => GetCompanyCreditBalancesResponseFromJSON(jsonValue)
8766
+ );
8767
+ }
8768
+ /**
8769
+ * Get company credit balances
8770
+ */
8771
+ async getCompanyCreditBalances(initOverrides) {
8772
+ const response = await this.getCompanyCreditBalancesRaw(initOverrides);
8773
+ return await response.value();
8774
+ }
8775
+ /**
8776
+ * Get company credit user usage
8777
+ */
8778
+ async getCompanyCreditUserUsageRaw(requestParameters, initOverrides) {
8779
+ if (requestParameters["creditId"] == null) {
8780
+ throw new RequiredError(
8781
+ "creditId",
8782
+ 'Required parameter "creditId" was null or undefined when calling getCompanyCreditUserUsage().'
8783
+ );
8784
+ }
8785
+ const queryParameters = {};
8786
+ if (requestParameters["limit"] != null) {
8787
+ queryParameters["limit"] = requestParameters["limit"];
8788
+ }
8789
+ if (requestParameters["offset"] != null) {
8790
+ queryParameters["offset"] = requestParameters["offset"];
8791
+ }
8792
+ const headerParameters = {};
8793
+ if (this.configuration && this.configuration.apiKey) {
8794
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
8795
+ "X-Schematic-Api-Key"
8796
+ );
8797
+ }
8798
+ const response = await this.request(
8799
+ {
8800
+ path: `/company/credits/{credit_id}/users`.replace(
8801
+ `{${"credit_id"}}`,
8802
+ encodeURIComponent(String(requestParameters["creditId"]))
8803
+ ),
8804
+ method: "GET",
8805
+ headers: headerParameters,
8806
+ query: queryParameters
8807
+ },
8808
+ initOverrides
8809
+ );
8810
+ return new JSONApiResponse(
8811
+ response,
8812
+ (jsonValue) => GetCompanyCreditUserUsageResponseFromJSON(jsonValue)
8813
+ );
8814
+ }
8815
+ /**
8816
+ * Get company credit user usage
8817
+ */
8818
+ async getCompanyCreditUserUsage(requestParameters, initOverrides) {
8819
+ const response = await this.getCompanyCreditUserUsageRaw(
8820
+ requestParameters,
8821
+ initOverrides
8822
+ );
8823
+ return await response.value();
8824
+ }
8825
+ /**
8826
+ * Get company feature usage
8827
+ */
8828
+ async getCompanyFeatureUsageRaw(initOverrides) {
8829
+ const queryParameters = {};
8830
+ const headerParameters = {};
8831
+ if (this.configuration && this.configuration.apiKey) {
8832
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
8833
+ "X-Schematic-Api-Key"
8834
+ );
8835
+ }
8836
+ const response = await this.request(
8837
+ {
8838
+ path: `/company/usage`,
8839
+ method: "GET",
8840
+ headers: headerParameters,
8841
+ query: queryParameters
8842
+ },
8843
+ initOverrides
8844
+ );
8845
+ return new JSONApiResponse(
8846
+ response,
8847
+ (jsonValue) => GetCompanyFeatureUsageResponseFromJSON(jsonValue)
8848
+ );
8849
+ }
8850
+ /**
8851
+ * Get company feature usage
8852
+ */
8853
+ async getCompanyFeatureUsage(initOverrides) {
8854
+ const response = await this.getCompanyFeatureUsageRaw(initOverrides);
8855
+ return await response.value();
8856
+ }
8857
+ /**
8858
+ * Get company feature user usage
8859
+ */
8860
+ async getCompanyFeatureUserUsageRaw(requestParameters, initOverrides) {
8861
+ if (requestParameters["featureId"] == null) {
8862
+ throw new RequiredError(
8863
+ "featureId",
8864
+ 'Required parameter "featureId" was null or undefined when calling getCompanyFeatureUserUsage().'
8865
+ );
8866
+ }
8867
+ const queryParameters = {};
8868
+ if (requestParameters["limit"] != null) {
8869
+ queryParameters["limit"] = requestParameters["limit"];
8870
+ }
8871
+ if (requestParameters["offset"] != null) {
8872
+ queryParameters["offset"] = requestParameters["offset"];
8873
+ }
8874
+ const headerParameters = {};
8875
+ if (this.configuration && this.configuration.apiKey) {
8876
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
8877
+ "X-Schematic-Api-Key"
8878
+ );
8879
+ }
8880
+ const response = await this.request(
8881
+ {
8882
+ path: `/company/usage/{feature_id}/users`.replace(
8883
+ `{${"feature_id"}}`,
8884
+ encodeURIComponent(String(requestParameters["featureId"]))
8885
+ ),
8886
+ method: "GET",
8887
+ headers: headerParameters,
8888
+ query: queryParameters
8889
+ },
8890
+ initOverrides
8891
+ );
8892
+ return new JSONApiResponse(
8893
+ response,
8894
+ (jsonValue) => GetCompanyFeatureUserUsageResponseFromJSON(jsonValue)
8895
+ );
8896
+ }
8897
+ /**
8898
+ * Get company feature user usage
8899
+ */
8900
+ async getCompanyFeatureUserUsage(requestParameters, initOverrides) {
8901
+ const response = await this.getCompanyFeatureUserUsageRaw(
8902
+ requestParameters,
8903
+ initOverrides
8904
+ );
8905
+ return await response.value();
8906
+ }
8332
8907
  /**
8333
8908
  * Get company invoices
8334
8909
  */
@@ -9353,11 +9928,19 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
9353
9928
  return json;
9354
9929
  }
9355
9930
 
9931
+ // src/api/componentspublic/models/Currency.ts
9932
+ function CurrencyFromJSON2(json) {
9933
+ return CurrencyFromJSONTyped33(json, false);
9934
+ }
9935
+ function CurrencyFromJSONTyped33(json, ignoreDiscriminator) {
9936
+ return json;
9937
+ }
9938
+
9356
9939
  // src/api/componentspublic/models/BillingProductPriceInterval.ts
9357
9940
  function BillingProductPriceIntervalFromJSON2(json) {
9358
- return BillingProductPriceIntervalFromJSONTyped5(json, false);
9941
+ return BillingProductPriceIntervalFromJSONTyped6(json, false);
9359
9942
  }
9360
- function BillingProductPriceIntervalFromJSONTyped5(json, ignoreDiscriminator) {
9943
+ function BillingProductPriceIntervalFromJSONTyped6(json, ignoreDiscriminator) {
9361
9944
  return json;
9362
9945
  }
9363
9946
 
@@ -9371,9 +9954,9 @@ function BillingProviderTypeFromJSONTyped21(json, ignoreDiscriminator) {
9371
9954
 
9372
9955
  // src/api/componentspublic/models/BillingPriceScheme.ts
9373
9956
  function BillingPriceSchemeFromJSON2(json) {
9374
- return BillingPriceSchemeFromJSONTyped6(json, false);
9957
+ return BillingPriceSchemeFromJSONTyped7(json, false);
9375
9958
  }
9376
- function BillingPriceSchemeFromJSONTyped6(json, ignoreDiscriminator) {
9959
+ function BillingPriceSchemeFromJSONTyped7(json, ignoreDiscriminator) {
9377
9960
  return json;
9378
9961
  }
9379
9962
 
@@ -9386,7 +9969,7 @@ function BillingPriceResponseDataFromJSONTyped10(json, ignoreDiscriminator) {
9386
9969
  return json;
9387
9970
  }
9388
9971
  return {
9389
- currency: json["currency"],
9972
+ currency: CurrencyFromJSON2(json["currency"]),
9390
9973
  externalPriceId: json["external_price_id"],
9391
9974
  id: json["id"],
9392
9975
  interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
@@ -9408,7 +9991,7 @@ function CreditCurrencyPriceResponseDataFromJSONTyped3(json, ignoreDiscriminator
9408
9991
  return json;
9409
9992
  }
9410
9993
  return {
9411
- currency: json["currency"],
9994
+ currency: CurrencyFromJSON2(json["currency"]),
9412
9995
  price: json["price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["price"])
9413
9996
  };
9414
9997
  }
@@ -9509,9 +10092,9 @@ function BillingPriceUsageTypeFromJSONTyped5(json, ignoreDiscriminator) {
9509
10092
 
9510
10093
  // src/api/componentspublic/models/BillingTiersMode.ts
9511
10094
  function BillingTiersModeFromJSON2(json) {
9512
- return BillingTiersModeFromJSONTyped5(json, false);
10095
+ return BillingTiersModeFromJSONTyped6(json, false);
9513
10096
  }
9514
- function BillingTiersModeFromJSONTyped5(json, ignoreDiscriminator) {
10097
+ function BillingTiersModeFromJSONTyped6(json, ignoreDiscriminator) {
9515
10098
  return json;
9516
10099
  }
9517
10100
 
@@ -9526,7 +10109,7 @@ function BillingPriceViewFromJSONTyped11(json, ignoreDiscriminator) {
9526
10109
  return {
9527
10110
  billingScheme: BillingPriceSchemeFromJSON2(json["billing_scheme"]),
9528
10111
  createdAt: new Date(json["created_at"]),
9529
- currency: json["currency"],
10112
+ currency: CurrencyFromJSON2(json["currency"]),
9530
10113
  id: json["id"],
9531
10114
  interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
9532
10115
  intervalCount: json["interval_count"],
@@ -9562,7 +10145,7 @@ function CreditCurrencyPriceFromJSONTyped3(json, ignoreDiscriminator) {
9562
10145
  return json;
9563
10146
  }
9564
10147
  return {
9565
- currency: json["currency"],
10148
+ currency: CurrencyFromJSON2(json["currency"]),
9566
10149
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON2(json["price"])
9567
10150
  };
9568
10151
  }
@@ -9654,9 +10237,9 @@ function BillingPlanCreditGrantBillingModeFromJSONTyped5(json, ignoreDiscriminat
9654
10237
 
9655
10238
  // src/api/componentspublic/models/BillingPlanCreditGrantResetCadence.ts
9656
10239
  function BillingPlanCreditGrantResetCadenceFromJSON2(json) {
9657
- return BillingPlanCreditGrantResetCadenceFromJSONTyped6(json, false);
10240
+ return BillingPlanCreditGrantResetCadenceFromJSONTyped8(json, false);
9658
10241
  }
9659
- function BillingPlanCreditGrantResetCadenceFromJSONTyped6(json, ignoreDiscriminator) {
10242
+ function BillingPlanCreditGrantResetCadenceFromJSONTyped8(json, ignoreDiscriminator) {
9660
10243
  return json;
9661
10244
  }
9662
10245
 
@@ -9678,9 +10261,9 @@ function BillingPlanCreditGrantResetTypeFromJSONTyped5(json, ignoreDiscriminator
9678
10261
 
9679
10262
  // src/api/componentspublic/models/PlanCreditGrantScaling.ts
9680
10263
  function PlanCreditGrantScalingFromJSON2(json) {
9681
- return PlanCreditGrantScalingFromJSONTyped5(json, false);
10264
+ return PlanCreditGrantScalingFromJSONTyped6(json, false);
9682
10265
  }
9683
- function PlanCreditGrantScalingFromJSONTyped5(json, ignoreDiscriminator) {
10266
+ function PlanCreditGrantScalingFromJSONTyped6(json, ignoreDiscriminator) {
9684
10267
  return json;
9685
10268
  }
9686
10269
 
@@ -9747,25 +10330,25 @@ function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
9747
10330
 
9748
10331
  // src/api/componentspublic/models/EntitlementValueType.ts
9749
10332
  function EntitlementValueTypeFromJSON2(json) {
9750
- return EntitlementValueTypeFromJSONTyped7(json, false);
10333
+ return EntitlementValueTypeFromJSONTyped8(json, false);
9751
10334
  }
9752
- function EntitlementValueTypeFromJSONTyped7(json, ignoreDiscriminator) {
10335
+ function EntitlementValueTypeFromJSONTyped8(json, ignoreDiscriminator) {
9753
10336
  return json;
9754
10337
  }
9755
10338
 
9756
10339
  // src/api/componentspublic/models/MetricPeriodMonthReset.ts
9757
10340
  function MetricPeriodMonthResetFromJSON2(json) {
9758
- return MetricPeriodMonthResetFromJSONTyped11(json, false);
10341
+ return MetricPeriodMonthResetFromJSONTyped12(json, false);
9759
10342
  }
9760
- function MetricPeriodMonthResetFromJSONTyped11(json, ignoreDiscriminator) {
10343
+ function MetricPeriodMonthResetFromJSONTyped12(json, ignoreDiscriminator) {
9761
10344
  return json;
9762
10345
  }
9763
10346
 
9764
10347
  // src/api/componentspublic/models/MetricPeriod.ts
9765
10348
  function MetricPeriodFromJSON2(json) {
9766
- return MetricPeriodFromJSONTyped11(json, false);
10349
+ return MetricPeriodFromJSONTyped12(json, false);
9767
10350
  }
9768
- function MetricPeriodFromJSONTyped11(json, ignoreDiscriminator) {
10351
+ function MetricPeriodFromJSONTyped12(json, ignoreDiscriminator) {
9769
10352
  return json;
9770
10353
  }
9771
10354
 
@@ -9864,7 +10447,7 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
9864
10447
  return json;
9865
10448
  }
9866
10449
  return {
9867
- currency: json["currency"],
10450
+ currency: CurrencyFromJSON2(json["currency"]),
9868
10451
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["monthly_price"]),
9869
10452
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["quarterly_price"]),
9870
10453
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["yearly_price"])
@@ -9873,9 +10456,9 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
9873
10456
 
9874
10457
  // src/api/componentspublic/models/EntitlementPriceBehavior.ts
9875
10458
  function EntitlementPriceBehaviorFromJSON2(json) {
9876
- return EntitlementPriceBehaviorFromJSONTyped5(json, false);
10459
+ return EntitlementPriceBehaviorFromJSONTyped6(json, false);
9877
10460
  }
9878
- function EntitlementPriceBehaviorFromJSONTyped5(json, ignoreDiscriminator) {
10461
+ function EntitlementPriceBehaviorFromJSONTyped6(json, ignoreDiscriminator) {
9879
10462
  return json;
9880
10463
  }
9881
10464
 
@@ -9932,11 +10515,19 @@ function EventSummaryResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
9932
10515
  };
9933
10516
  }
9934
10517
 
10518
+ // src/api/componentspublic/models/FeatureEventSource.ts
10519
+ function FeatureEventSourceFromJSON2(json) {
10520
+ return FeatureEventSourceFromJSONTyped4(json, false);
10521
+ }
10522
+ function FeatureEventSourceFromJSONTyped4(json, ignoreDiscriminator) {
10523
+ return json;
10524
+ }
10525
+
9935
10526
  // src/api/componentspublic/models/FeatureType.ts
9936
10527
  function FeatureTypeFromJSON2(json) {
9937
- return FeatureTypeFromJSONTyped4(json, false);
10528
+ return FeatureTypeFromJSONTyped5(json, false);
9938
10529
  }
9939
- function FeatureTypeFromJSONTyped4(json, ignoreDiscriminator) {
10530
+ function FeatureTypeFromJSONTyped5(json, ignoreDiscriminator) {
9940
10531
  return json;
9941
10532
  }
9942
10533
 
@@ -10085,6 +10676,7 @@ function FeatureResponseDataFromJSONTyped7(json, ignoreDiscriminator) {
10085
10676
  return {
10086
10677
  createdAt: new Date(json["created_at"]),
10087
10678
  description: json["description"],
10679
+ eventSource: FeatureEventSourceFromJSON2(json["event_source"]),
10088
10680
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
10089
10681
  featureType: FeatureTypeFromJSON2(json["feature_type"]),
10090
10682
  icon: json["icon"],
@@ -10148,6 +10740,7 @@ function FeatureInPlanResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
10148
10740
  ),
10149
10741
  createdAt: new Date(json["created_at"]),
10150
10742
  description: json["description"],
10743
+ eventSource: FeatureEventSourceFromJSON2(json["event_source"]),
10151
10744
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
10152
10745
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON2(json["event_summary"]),
10153
10746
  featureType: FeatureTypeFromJSON2(json["feature_type"]),
@@ -10269,6 +10862,7 @@ function PlanEntitlementResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
10269
10862
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON2(json["plan"]),
10270
10863
  planId: json["plan_id"],
10271
10864
  priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON2(json["price_behavior"]),
10865
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
10272
10866
  ruleId: json["rule_id"],
10273
10867
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
10274
10868
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -10382,7 +10976,7 @@ function PlanCurrencyPricesResponseDataFromJSONTyped5(json, ignoreDiscriminator)
10382
10976
  return json;
10383
10977
  }
10384
10978
  return {
10385
- currency: json["currency"],
10979
+ currency: CurrencyFromJSON2(json["currency"]),
10386
10980
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
10387
10981
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
10388
10982
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["quarterly_price"]),
@@ -13353,6 +13947,7 @@ var en = {
13353
13947
  "Over plan limit": "Over plan limit",
13354
13948
  "Pay-in-advance features require a quantity.": "Pay-in-advance features require a quantity.",
13355
13949
  "Error saving custom field values. Please try again.": "Error saving custom field values. Please try again.",
13950
+ "Pay and close": "Pay and close",
13356
13951
  "Pay now": "Pay now",
13357
13952
  "Payment Details": "Payment Details",
13358
13953
  "Payment due": "Payment due {{date}}",
@@ -13632,6 +14227,8 @@ var it2 = {
13632
14227
  "Error processing payment. Please try a different payment method.": "Errore durante l'elaborazione del pagamento. Prova con un altro metodo di pagamento.",
13633
14228
  "Error retrieving plan details. Please try again in a moment.": "Errore durante il recupero dei dettagli del piano. Riprova tra qualche istante.",
13634
14229
  "Error updating payment method. Please try again.": "Errore durante l'aggiornamento del metodo di pagamento. Riprova.",
14230
+ "Estimated at current usage": "Stima in base al tuo utilizzo attuale",
14231
+ "Estimated at current usage with base price": "Stima in base al tuo utilizzo attuale. Prezzo base {{amount}}/{{period}}",
13635
14232
  "Estimated bill": "Importo stimato",
13636
14233
  "Everything in": "Tutto quanto incluso in {{plan}}, pi\xF9",
13637
14234
  "Expired": "Scaduta",
@@ -13668,6 +14265,7 @@ var it2 = {
13668
14265
  "Over plan limit": "Oltre il limite del piano",
13669
14266
  "Pay-in-advance features require a quantity.": "Le funzionalit\xE0 a pagamento anticipato richiedono una quantit\xE0.",
13670
14267
  "Error saving custom field values. Please try again.": "Errore durante il salvataggio dei campi personalizzati. Riprova.",
14268
+ "Pay and close": "Paga e chiudi",
13671
14269
  "Pay now": "Paga ora",
13672
14270
  "Payment Details": "Dati di pagamento",
13673
14271
  "Payment due": "Pagamento entro il {{date}}",
@@ -15969,7 +16567,7 @@ var reducer = (state, action) => {
15969
16567
  // src/context/EmbedProvider.tsx
15970
16568
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
15971
16569
  var getCustomHeaders = (sessionId) => ({
15972
- "X-Schematic-Components-Version": "2.31.0",
16570
+ "X-Schematic-Components-Version": "2.31.1",
15973
16571
  "X-Schematic-Session-ID": sessionId
15974
16572
  });
15975
16573
  var normalizeCurrencyFilter = (filter2) => {
@@ -22773,6 +23371,7 @@ var NoPaymentRequired = ({
22773
23371
  isSticky = false,
22774
23372
  willScheduleDowngrade = false,
22775
23373
  isCreditOnlyPurchase = false,
23374
+ isOneTimeOnlyPurchase = false,
22776
23375
  onClick
22777
23376
  }) => {
22778
23377
  const { t: t3 } = useTranslation();
@@ -22785,7 +23384,7 @@ var NoPaymentRequired = ({
22785
23384
  $size: isSticky ? "sm" : "md",
22786
23385
  $fullWidth: true,
22787
23386
  $isLoading: isLoading,
22788
- children: isCreditOnlyPurchase ? t3("Buy credits") : willScheduleDowngrade ? t3("Schedule downgrade") : t3("Subscribe and close")
23387
+ children: isCreditOnlyPurchase ? t3("Buy credits") : willScheduleDowngrade ? t3("Schedule downgrade") : isOneTimeOnlyPurchase ? t3("Pay and close") : t3("Subscribe and close")
22789
23388
  }
22790
23389
  );
22791
23390
  };
@@ -22809,7 +23408,8 @@ var CheckoutStageButton = ({
22809
23408
  willTrialWithoutPaymentMethod,
22810
23409
  willScheduleDowngrade,
22811
23410
  hasIncompleteRequiredCustomFields = false,
22812
- isCreditOnlyPurchase = false
23411
+ isCreditOnlyPurchase = false,
23412
+ isOneTimeOnlyPurchase = false
22813
23413
  }) => {
22814
23414
  const { t: t3 } = useTranslation();
22815
23415
  const isDisabled = isLoading || !hasPlan && !isCreditOnlyPurchase || inEditMode || !canCheckout;
@@ -22878,7 +23478,8 @@ var CheckoutStageButton = ({
22878
23478
  isLoading,
22879
23479
  onClick: checkout,
22880
23480
  isSticky,
22881
- isCreditOnlyPurchase
23481
+ isCreditOnlyPurchase,
23482
+ isOneTimeOnlyPurchase
22882
23483
  }
22883
23484
  );
22884
23485
  }
@@ -22912,7 +23513,8 @@ var CheckoutStageButton = ({
22912
23513
  isLoading,
22913
23514
  onClick: checkout,
22914
23515
  isSticky,
22915
- isCreditOnlyPurchase
23516
+ isCreditOnlyPurchase,
23517
+ isOneTimeOnlyPurchase
22916
23518
  }
22917
23519
  );
22918
23520
  }
@@ -22955,7 +23557,8 @@ var CheckoutStageButton = ({
22955
23557
  isLoading,
22956
23558
  onClick: checkout,
22957
23559
  isSticky,
22958
- isCreditOnlyPurchase
23560
+ isCreditOnlyPurchase,
23561
+ isOneTimeOnlyPurchase
22959
23562
  }
22960
23563
  );
22961
23564
  }
@@ -22998,7 +23601,8 @@ var CheckoutStageButton = ({
22998
23601
  isLoading,
22999
23602
  onClick: checkout,
23000
23603
  isSticky,
23001
- isCreditOnlyPurchase
23604
+ isCreditOnlyPurchase,
23605
+ isOneTimeOnlyPurchase
23002
23606
  }
23003
23607
  );
23004
23608
  }
@@ -23040,7 +23644,8 @@ var CheckoutStageButton = ({
23040
23644
  isLoading,
23041
23645
  onClick: checkout,
23042
23646
  isSticky,
23043
- isCreditOnlyPurchase
23647
+ isCreditOnlyPurchase,
23648
+ isOneTimeOnlyPurchase
23044
23649
  }
23045
23650
  );
23046
23651
  }
@@ -23083,7 +23688,8 @@ var CheckoutStageButton = ({
23083
23688
  isLoading,
23084
23689
  onClick: checkout,
23085
23690
  isSticky,
23086
- isCreditOnlyPurchase
23691
+ isCreditOnlyPurchase,
23692
+ isOneTimeOnlyPurchase
23087
23693
  }
23088
23694
  );
23089
23695
  }
@@ -23126,7 +23732,8 @@ var CheckoutStageButton = ({
23126
23732
  isLoading,
23127
23733
  onClick: checkout,
23128
23734
  isSticky,
23129
- isCreditOnlyPurchase
23735
+ isCreditOnlyPurchase,
23736
+ isOneTimeOnlyPurchase
23130
23737
  }
23131
23738
  ),
23132
23739
  optInNotice
@@ -23649,6 +24256,27 @@ var SubscriptionSidebar = forwardRef7(
23649
24256
  () => creditBundles.filter((bundle) => bundle.count > 0),
23650
24257
  [creditBundles]
23651
24258
  );
24259
+ const isOneTimeOnlyPurchase = useMemo22(() => {
24260
+ if (!selectedPlan?.current) {
24261
+ return false;
24262
+ }
24263
+ const currentPeriod = getSubscriptionPeriod(billingSubscription);
24264
+ if (currentPeriod && currentPeriod !== planPeriod) {
24265
+ return false;
24266
+ }
24267
+ if (willAddOnsChange || updatedUsageBasedEntitlements.changed.length) {
24268
+ return false;
24269
+ }
24270
+ return selectedOneTimeAddOns.length > 0 || addedCreditBundles.length > 0;
24271
+ }, [
24272
+ selectedPlan,
24273
+ billingSubscription,
24274
+ planPeriod,
24275
+ willAddOnsChange,
24276
+ updatedUsageBasedEntitlements.changed.length,
24277
+ selectedOneTimeAddOns.length,
24278
+ addedCreditBundles.length
24279
+ ]);
23652
24280
  const discountApplied = useMemo22(
23653
24281
  () => promoCode && (amountOff > 0 || percentOff > 0),
23654
24282
  [promoCode, amountOff, percentOff]
@@ -23841,6 +24469,7 @@ var SubscriptionSidebar = forwardRef7(
23841
24469
  shouldTrial,
23842
24470
  hasIncompleteRequiredCustomFields,
23843
24471
  isCreditOnlyPurchase,
24472
+ isOneTimeOnlyPurchase,
23844
24473
  checkout: handleCheckout
23845
24474
  }
23846
24475
  );
@@ -23885,6 +24514,7 @@ var SubscriptionSidebar = forwardRef7(
23885
24514
  payInAdvanceEntitlements,
23886
24515
  addOnPayInAdvanceEntitlements,
23887
24516
  isCreditOnlyPurchase,
24517
+ isOneTimeOnlyPurchase,
23888
24518
  hasIncompleteRequiredCustomFields
23889
24519
  ]);
23890
24520
  useLayoutEffect6(() => {
@@ -26529,7 +27159,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
26529
27159
  iconColor: isLightBackground ? "hsla(0, 0%, 0%, 0.8)" : "hsla(0, 0%, 100%, 0.4)"
26530
27160
  }
26531
27161
  ),
26532
- props.usageByUser.isVisible && /* @__PURE__ */ jsx58(
27162
+ props.usageByUser.isVisible && hasGrants && /* @__PURE__ */ jsx58(
26533
27163
  UsageByUser,
26534
27164
  {
26535
27165
  source: { kind: "credit", id: credit.id },