@schematichq/schematic-components 2.31.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4400,6 +4400,17 @@ function BillingProductPriceIntervalFromJSONTyped(json, ignoreDiscriminator) {
4400
4400
  return json;
4401
4401
  }
4402
4402
 
4403
+ // src/api/checkoutexternal/models/Currency.ts
4404
+ function CurrencyFromJSON(json) {
4405
+ return CurrencyFromJSONTyped(json, false);
4406
+ }
4407
+ function CurrencyFromJSONTyped(json, ignoreDiscriminator) {
4408
+ return json;
4409
+ }
4410
+ function CurrencyToJSON(value) {
4411
+ return value;
4412
+ }
4413
+
4403
4414
  // src/api/checkoutexternal/models/BillingPriceUsageType.ts
4404
4415
  function BillingPriceUsageTypeFromJSON(json) {
4405
4416
  return BillingPriceUsageTypeFromJSONTyped(json, false);
@@ -4447,7 +4458,7 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
4447
4458
  return {
4448
4459
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
4449
4460
  createdAt: new Date(json["created_at"]),
4450
- currency: json["currency"],
4461
+ currency: CurrencyFromJSON(json["currency"]),
4451
4462
  id: json["id"],
4452
4463
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4453
4464
  intervalCount: json["interval_count"],
@@ -4493,7 +4504,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
4493
4504
  return {
4494
4505
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
4495
4506
  createdAt: new Date(json["created_at"]),
4496
- currency: json["currency"],
4507
+ currency: CurrencyFromJSON(json["currency"]),
4497
4508
  id: json["id"],
4498
4509
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
4499
4510
  intervalCount: json["interval_count"],
@@ -4529,7 +4540,7 @@ function CreditBundleCurrencyPriceFromJSONTyped(json, ignoreDiscriminator) {
4529
4540
  return json;
4530
4541
  }
4531
4542
  return {
4532
- currency: json["currency"],
4543
+ currency: CurrencyFromJSON(json["currency"]),
4533
4544
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON(json["price"])
4534
4545
  };
4535
4546
  }
@@ -4633,7 +4644,7 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4633
4644
  return json;
4634
4645
  }
4635
4646
  return {
4636
- currency: json["currency"],
4647
+ currency: CurrencyFromJSON(json["currency"]),
4637
4648
  externalPriceId: json["external_price_id"],
4638
4649
  id: json["id"],
4639
4650
  interval: BillingProductPriceIntervalFromJSON(json["interval"]),
@@ -4655,7 +4666,7 @@ function CreditCurrencyPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
4655
4666
  return json;
4656
4667
  }
4657
4668
  return {
4658
- currency: json["currency"],
4669
+ currency: CurrencyFromJSON(json["currency"]),
4659
4670
  price: json["price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["price"])
4660
4671
  };
4661
4672
  }
@@ -4739,7 +4750,7 @@ function CreditCurrencyPriceFromJSONTyped(json, ignoreDiscriminator) {
4739
4750
  return json;
4740
4751
  }
4741
4752
  return {
4742
- currency: json["currency"],
4753
+ currency: CurrencyFromJSON(json["currency"]),
4743
4754
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON(json["price"])
4744
4755
  };
4745
4756
  }
@@ -5010,7 +5021,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
5010
5021
  billingScheme: BillingPriceSchemeFromJSON(json["billing_scheme"]),
5011
5022
  billingThreshold: json["billing_threshold"] == null ? void 0 : json["billing_threshold"],
5012
5023
  createdAt: new Date(json["created_at"]),
5013
- currency: json["currency"],
5024
+ currency: CurrencyFromJSON(json["currency"]),
5014
5025
  environmentId: json["environment_id"],
5015
5026
  externalId: json["external_id"],
5016
5027
  id: json["id"],
@@ -5055,7 +5066,7 @@ function BillingSubscriptionDiscountViewFromJSONTyped(json, ignoreDiscriminator)
5055
5066
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
5056
5067
  couponId: json["coupon_id"],
5057
5068
  couponName: json["coupon_name"],
5058
- currency: json["currency"] == null ? void 0 : json["currency"],
5069
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5059
5070
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
5060
5071
  discountExternalId: json["discount_external_id"],
5061
5072
  duration: json["duration"],
@@ -5107,7 +5118,7 @@ function InvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5107
5118
  collectionMethod: json["collection_method"],
5108
5119
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
5109
5120
  createdAt: new Date(json["created_at"]),
5110
- currency: json["currency"],
5121
+ currency: CurrencyFromJSON(json["currency"]),
5111
5122
  customerExternalId: json["customer_external_id"],
5112
5123
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
5113
5124
  endingBalance: json["ending_balance"],
@@ -5170,7 +5181,7 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
5170
5181
  cancelAtPeriodEnd: json["cancel_at_period_end"],
5171
5182
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
5172
5183
  createdAt: new Date(json["created_at"]),
5173
- currency: json["currency"],
5184
+ currency: CurrencyFromJSON(json["currency"]),
5174
5185
  customerExternalId: json["customer_external_id"],
5175
5186
  defaultPaymentMethodId: json["default_payment_method_id"] == null ? void 0 : json["default_payment_method_id"],
5176
5187
  discounts: json["discounts"].map(
@@ -5196,6 +5207,71 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
5196
5207
  };
5197
5208
  }
5198
5209
 
5210
+ // src/api/checkoutexternal/models/CatalogCreditGrantResponseData.ts
5211
+ function CatalogCreditGrantResponseDataFromJSON(json) {
5212
+ return CatalogCreditGrantResponseDataFromJSONTyped(json, false);
5213
+ }
5214
+ function CatalogCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5215
+ if (json == null) {
5216
+ return json;
5217
+ }
5218
+ return {
5219
+ companyCreditAmount: json["company_credit_amount"],
5220
+ creditAmount: json["credit_amount"],
5221
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5222
+ creditId: json["credit_id"],
5223
+ creditName: json["credit_name"],
5224
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5225
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5226
+ id: json["id"],
5227
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
5228
+ resetCadence: json["reset_cadence"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON(json["reset_cadence"]),
5229
+ scaling: PlanCreditGrantScalingFromJSON(json["scaling"])
5230
+ };
5231
+ }
5232
+
5233
+ // src/api/checkoutexternal/models/CatalogPriceTierResponseData.ts
5234
+ function CatalogPriceTierResponseDataFromJSON(json) {
5235
+ return CatalogPriceTierResponseDataFromJSONTyped(json, false);
5236
+ }
5237
+ function CatalogPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5238
+ if (json == null) {
5239
+ return json;
5240
+ }
5241
+ return {
5242
+ flatPrice: json["flat_price"] == null ? void 0 : json["flat_price"],
5243
+ from: json["from"],
5244
+ perUnitPrice: json["per_unit_price"] == null ? void 0 : json["per_unit_price"],
5245
+ perUnitPriceDecimal: json["per_unit_price_decimal"] == null ? void 0 : json["per_unit_price_decimal"],
5246
+ to: json["to"] == null ? void 0 : json["to"]
5247
+ };
5248
+ }
5249
+
5250
+ // src/api/checkoutexternal/models/CatalogPriceResponseData.ts
5251
+ function CatalogPriceResponseDataFromJSON(json) {
5252
+ return CatalogPriceResponseDataFromJSONTyped(json, false);
5253
+ }
5254
+ function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5255
+ if (json == null) {
5256
+ return json;
5257
+ }
5258
+ return {
5259
+ currency: CurrencyFromJSON(json["currency"]),
5260
+ id: json["id"],
5261
+ interval: BillingProductPriceIntervalFromJSON(json["interval"]),
5262
+ intervalCount: json["interval_count"],
5263
+ overageUnitPriceDecimal: json["overage_unit_price_decimal"] == null ? void 0 : json["overage_unit_price_decimal"],
5264
+ packageSize: json["package_size"],
5265
+ price: json["price"],
5266
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
5267
+ priceTiers: json["price_tiers"].map(
5268
+ CatalogPriceTierResponseDataFromJSON
5269
+ ),
5270
+ scheme: BillingPriceSchemeFromJSON(json["scheme"]),
5271
+ tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"])
5272
+ };
5273
+ }
5274
+
5199
5275
  // src/api/checkoutexternal/models/UpdatePayInAdvanceRequestBody.ts
5200
5276
  function UpdatePayInAdvanceRequestBodyFromJSON(json) {
5201
5277
  return UpdatePayInAdvanceRequestBodyFromJSONTyped(json, false);
@@ -5350,7 +5426,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
5350
5426
  credit_bundles: value["creditBundles"].map(
5351
5427
  UpdateCreditBundleRequestBodyToJSON
5352
5428
  ),
5353
- currency: value["currency"],
5429
+ currency: CurrencyToJSON(value["currency"]),
5354
5430
  custom_field_values: value["customFieldValues"].map(
5355
5431
  CheckoutFieldValueToJSON
5356
5432
  ),
@@ -5396,7 +5472,7 @@ function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
5396
5472
  }
5397
5473
  return {
5398
5474
  amountOff: json["amount_off"],
5399
- currency: json["currency"],
5475
+ currency: CurrencyFromJSON(json["currency"]),
5400
5476
  dueNow: json["due_now"],
5401
5477
  isScheduledDowngrade: json["is_scheduled_downgrade"],
5402
5478
  newCharges: json["new_charges"],
@@ -5473,11 +5549,11 @@ function CheckoutProblemCodeFromJSONTyped(json, ignoreDiscriminator) {
5473
5549
  return json;
5474
5550
  }
5475
5551
 
5476
- // src/api/checkoutexternal/models/Problem.ts
5477
- function ProblemFromJSON(json) {
5478
- return ProblemFromJSONTyped(json, false);
5552
+ // src/api/checkoutexternal/models/CheckoutProblemResponseData.ts
5553
+ function CheckoutProblemResponseDataFromJSON(json) {
5554
+ return CheckoutProblemResponseDataFromJSONTyped(json, false);
5479
5555
  }
5480
- function ProblemFromJSONTyped(json, ignoreDiscriminator) {
5556
+ function CheckoutProblemResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5481
5557
  if (json == null) {
5482
5558
  return json;
5483
5559
  }
@@ -5485,7 +5561,7 @@ function ProblemFromJSONTyped(json, ignoreDiscriminator) {
5485
5561
  blocking: json["blocking"],
5486
5562
  bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
5487
5563
  code: CheckoutProblemCodeFromJSON(json["code"]),
5488
- currency: json["currency"] == null ? void 0 : json["currency"],
5564
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5489
5565
  detail: json["detail"] == null ? void 0 : json["detail"],
5490
5566
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
5491
5567
  fieldId: json["field_id"] == null ? void 0 : json["field_id"],
@@ -5514,7 +5590,9 @@ function CheckoutDraftResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5514
5590
  lastActivityAt: new Date(json["last_activity_at"]),
5515
5591
  priceSnapshot: json["price_snapshot"] == null ? void 0 : CheckoutPriceSnapshotFromJSON(json["price_snapshot"]),
5516
5592
  pricedAt: json["priced_at"] == null ? void 0 : new Date(json["priced_at"]),
5517
- problems: json["problems"].map(ProblemFromJSON),
5593
+ problems: json["problems"].map(
5594
+ CheckoutProblemResponseDataFromJSON
5595
+ ),
5518
5596
  selections: CheckoutSelectionsResponseDataFromJSON(json["selections"]),
5519
5597
  shareToken: json["share_token"] == null ? void 0 : json["share_token"],
5520
5598
  status: CheckoutStatusFromJSON(json["status"]),
@@ -5542,6 +5620,11 @@ function CheckoutFieldWithValueFromJSONTyped(json, ignoreDiscriminator) {
5542
5620
  };
5543
5621
  }
5544
5622
 
5623
+ // src/api/checkoutexternal/models/CheckoutIntent.ts
5624
+ function CheckoutIntentToJSON(value) {
5625
+ return value;
5626
+ }
5627
+
5545
5628
  // src/api/checkoutexternal/models/ScheduledDowngradeConfigBehavior.ts
5546
5629
  function ScheduledDowngradeConfigBehaviorFromJSON(json) {
5547
5630
  return ScheduledDowngradeConfigBehaviorFromJSONTyped(json, false);
@@ -5566,7 +5649,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5566
5649
  confirmPaymentIntentClientSecret: json["confirm_payment_intent_client_secret"] == null ? void 0 : json["confirm_payment_intent_client_secret"],
5567
5650
  confirmPaymentIntentId: json["confirm_payment_intent_id"] == null ? void 0 : json["confirm_payment_intent_id"],
5568
5651
  createdAt: new Date(json["created_at"]),
5569
- currency: json["currency"],
5652
+ currency: CurrencyFromJSON(json["currency"]),
5570
5653
  customerExternalId: json["customer_external_id"],
5571
5654
  defaultPaymentMethodId: json["default_payment_method_id"] == null ? void 0 : json["default_payment_method_id"],
5572
5655
  expiredAt: json["expired_at"] == null ? void 0 : new Date(json["expired_at"]),
@@ -5686,6 +5769,134 @@ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminato
5686
5769
  };
5687
5770
  }
5688
5771
 
5772
+ // src/api/checkoutexternal/models/CompanyCreditGrantResponseData.ts
5773
+ function CompanyCreditGrantResponseDataFromJSON(json) {
5774
+ return CompanyCreditGrantResponseDataFromJSONTyped(json, false);
5775
+ }
5776
+ function CompanyCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5777
+ if (json == null) {
5778
+ return json;
5779
+ }
5780
+ return {
5781
+ bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
5782
+ bundleName: json["bundle_name"] == null ? void 0 : json["bundle_name"],
5783
+ createdAt: new Date(json["created_at"]),
5784
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
5785
+ grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
5786
+ id: json["id"],
5787
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
5788
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"],
5789
+ quantity: json["quantity"],
5790
+ quantityRemaining: json["quantity_remaining"],
5791
+ quantityUsed: json["quantity_used"],
5792
+ renewalPeriod: json["renewal_period"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON(json["renewal_period"]),
5793
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
5794
+ validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"])
5795
+ };
5796
+ }
5797
+
5798
+ // src/api/checkoutexternal/models/CompanyCreditCompositionResponseData.ts
5799
+ function CompanyCreditCompositionResponseDataFromJSON(json) {
5800
+ return CompanyCreditCompositionResponseDataFromJSONTyped(json, false);
5801
+ }
5802
+ function CompanyCreditCompositionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5803
+ if (json == null) {
5804
+ return json;
5805
+ }
5806
+ return {
5807
+ fixedQuantity: json["fixed_quantity"],
5808
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
5809
+ licenseName: json["license_name"],
5810
+ licensePluralName: json["license_plural_name"] == null ? void 0 : json["license_plural_name"],
5811
+ licenseQuantity: json["license_quantity"],
5812
+ licenseSingularName: json["license_singular_name"] == null ? void 0 : json["license_singular_name"],
5813
+ perLicenseAmount: json["per_license_amount"],
5814
+ period: json["period"],
5815
+ renewsAt: json["renews_at"] == null ? void 0 : new Date(json["renews_at"]),
5816
+ total: json["total"]
5817
+ };
5818
+ }
5819
+
5820
+ // src/api/checkoutexternal/models/CompanyCreditBalanceResponseData.ts
5821
+ function CompanyCreditBalanceResponseDataFromJSON(json) {
5822
+ return CompanyCreditBalanceResponseDataFromJSONTyped(json, false);
5823
+ }
5824
+ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5825
+ if (json == null) {
5826
+ return json;
5827
+ }
5828
+ return {
5829
+ composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
5830
+ creditDescription: json["credit_description"],
5831
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
5832
+ creditId: json["credit_id"],
5833
+ creditName: json["credit_name"],
5834
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
5835
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
5836
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
5837
+ grants: json["grants"].map(
5838
+ CompanyCreditGrantResponseDataFromJSON
5839
+ ),
5840
+ purchasable: json["purchasable"],
5841
+ remaining: json["remaining"],
5842
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
5843
+ total: json["total"],
5844
+ used: json["used"]
5845
+ };
5846
+ }
5847
+
5848
+ // src/api/checkoutexternal/models/CompanyCreditBalancesResponseData.ts
5849
+ function CompanyCreditBalancesResponseDataFromJSON(json) {
5850
+ return CompanyCreditBalancesResponseDataFromJSONTyped(json, false);
5851
+ }
5852
+ function CompanyCreditBalancesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5853
+ if (json == null) {
5854
+ return json;
5855
+ }
5856
+ return {
5857
+ balances: json["balances"].map(
5858
+ CompanyCreditBalanceResponseDataFromJSON
5859
+ ),
5860
+ count: json["count"]
5861
+ };
5862
+ }
5863
+
5864
+ // src/api/checkoutexternal/models/CompanyCreditUserUsageRowResponseData.ts
5865
+ function CompanyCreditUserUsageRowResponseDataFromJSON(json) {
5866
+ return CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, false);
5867
+ }
5868
+ function CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5869
+ if (json == null) {
5870
+ return json;
5871
+ }
5872
+ return {
5873
+ name: json["name"] == null ? void 0 : json["name"],
5874
+ share: json["share"],
5875
+ used: json["used"],
5876
+ userId: json["user_id"]
5877
+ };
5878
+ }
5879
+
5880
+ // src/api/checkoutexternal/models/CompanyCreditUserUsageResponseData.ts
5881
+ function CompanyCreditUserUsageResponseDataFromJSON(json) {
5882
+ return CompanyCreditUserUsageResponseDataFromJSONTyped(json, false);
5883
+ }
5884
+ function CompanyCreditUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5885
+ if (json == null) {
5886
+ return json;
5887
+ }
5888
+ return {
5889
+ count: json["count"],
5890
+ endTime: json["end_time"] == null ? void 0 : new Date(json["end_time"]),
5891
+ startTime: json["start_time"] == null ? void 0 : new Date(json["start_time"]),
5892
+ total: json["total"],
5893
+ unattributed: json["unattributed"] == null ? void 0 : json["unattributed"],
5894
+ users: json["users"].map(
5895
+ CompanyCreditUserUsageRowResponseDataFromJSON
5896
+ )
5897
+ };
5898
+ }
5899
+
5689
5900
  // src/api/checkoutexternal/models/CurrencyBalance.ts
5690
5901
  function CurrencyBalanceFromJSON(json) {
5691
5902
  return CurrencyBalanceFromJSONTyped(json, false);
@@ -5696,7 +5907,7 @@ function CurrencyBalanceFromJSONTyped(json, ignoreDiscriminator) {
5696
5907
  }
5697
5908
  return {
5698
5909
  balance: json["balance"],
5699
- currency: json["currency"]
5910
+ currency: CurrencyFromJSON(json["currency"])
5700
5911
  };
5701
5912
  }
5702
5913
 
@@ -5907,7 +6118,7 @@ function ScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator)
5907
6118
  return json;
5908
6119
  }
5909
6120
  return {
5910
- currency: json["currency"],
6121
+ currency: CurrencyFromJSON(json["currency"]),
5911
6122
  effectiveAfter: new Date(json["effective_after"]),
5912
6123
  fromPlanId: json["from_plan_id"],
5913
6124
  fromPlanName: json["from_plan_name"],
@@ -6028,6 +6239,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6028
6239
  daysUntilDue: json["days_until_due"],
6029
6240
  externalInvoiceId: json["external_invoice_id"] == null ? void 0 : json["external_invoice_id"],
6030
6241
  id: json["id"],
6242
+ migrationId: json["migration_id"] == null ? void 0 : json["migration_id"],
6031
6243
  paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
6032
6244
  planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
6033
6245
  planId: json["plan_id"],
@@ -6309,7 +6521,7 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6309
6521
  return {
6310
6522
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
6311
6523
  couponName: json["coupon_name"],
6312
- currency: json["currency"] == null ? void 0 : json["currency"],
6524
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
6313
6525
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
6314
6526
  duration: json["duration"],
6315
6527
  durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
@@ -6317,6 +6529,141 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6317
6529
  };
6318
6530
  }
6319
6531
 
6532
+ // src/api/checkoutexternal/models/FeatureType.ts
6533
+ var FeatureType = {
6534
+ Boolean: "boolean",
6535
+ Event: "event",
6536
+ License: "license",
6537
+ Trait: "trait"
6538
+ };
6539
+ function FeatureTypeFromJSON(json) {
6540
+ return FeatureTypeFromJSONTyped(json, false);
6541
+ }
6542
+ function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6543
+ return json;
6544
+ }
6545
+
6546
+ // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6547
+ var EntitlementPriceBehavior = {
6548
+ CreditBurndown: "credit_burndown",
6549
+ Overage: "overage",
6550
+ PayAsYouGo: "pay_as_you_go",
6551
+ PayInAdvance: "pay_in_advance",
6552
+ Tier: "tier"
6553
+ };
6554
+ function EntitlementPriceBehaviorFromJSON(json) {
6555
+ return EntitlementPriceBehaviorFromJSONTyped(json, false);
6556
+ }
6557
+ function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6558
+ return json;
6559
+ }
6560
+
6561
+ // src/api/checkoutexternal/models/EntitlementType.ts
6562
+ function EntitlementTypeFromJSON(json) {
6563
+ return EntitlementTypeFromJSONTyped(json, false);
6564
+ }
6565
+ function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
6566
+ return json;
6567
+ }
6568
+
6569
+ // src/api/checkoutexternal/models/CompanyFeatureUsageResponseData.ts
6570
+ function CompanyFeatureUsageResponseDataFromJSON(json) {
6571
+ return CompanyFeatureUsageResponseDataFromJSONTyped(json, false);
6572
+ }
6573
+ function CompanyFeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6574
+ if (json == null) {
6575
+ return json;
6576
+ }
6577
+ return {
6578
+ access: json["access"],
6579
+ allocation: json["allocation"] == null ? void 0 : json["allocation"],
6580
+ companyOverrideId: json["company_override_id"] == null ? void 0 : json["company_override_id"],
6581
+ consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
6582
+ creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
6583
+ creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
6584
+ creditName: json["credit_name"] == null ? void 0 : json["credit_name"],
6585
+ creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
6586
+ creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
6587
+ currentCost: json["current_cost"] == null ? void 0 : json["current_cost"],
6588
+ entitlementType: EntitlementTypeFromJSON(json["entitlement_type"]),
6589
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
6590
+ featureDescription: json["feature_description"],
6591
+ featureIcon: json["feature_icon"],
6592
+ featureId: json["feature_id"],
6593
+ featureName: json["feature_name"],
6594
+ featurePluralName: json["feature_plural_name"] == null ? void 0 : json["feature_plural_name"],
6595
+ featureSingularName: json["feature_singular_name"] == null ? void 0 : json["feature_singular_name"],
6596
+ featureType: FeatureTypeFromJSON(json["feature_type"]),
6597
+ licenseId: json["license_id"] == null ? void 0 : json["license_id"],
6598
+ metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
6599
+ metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
6600
+ perLicenseCreditGrants: json["per_license_credit_grants"].map(CatalogCreditGrantResponseDataFromJSON),
6601
+ planEntitlementId: json["plan_entitlement_id"] == null ? void 0 : json["plan_entitlement_id"],
6602
+ price: json["price"] == null ? void 0 : CatalogPriceResponseDataFromJSON(json["price"]),
6603
+ priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6604
+ resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
6605
+ softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
6606
+ usage: json["usage"] == null ? void 0 : json["usage"],
6607
+ valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
6608
+ valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
6609
+ valueType: EntitlementValueTypeFromJSON(json["value_type"]),
6610
+ warningThreshold: json["warning_threshold"] == null ? void 0 : json["warning_threshold"]
6611
+ };
6612
+ }
6613
+
6614
+ // src/api/checkoutexternal/models/CompanyFeatureUsageListResponseData.ts
6615
+ function CompanyFeatureUsageListResponseDataFromJSON(json) {
6616
+ return CompanyFeatureUsageListResponseDataFromJSONTyped(json, false);
6617
+ }
6618
+ function CompanyFeatureUsageListResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6619
+ if (json == null) {
6620
+ return json;
6621
+ }
6622
+ return {
6623
+ count: json["count"],
6624
+ features: json["features"].map(
6625
+ CompanyFeatureUsageResponseDataFromJSON
6626
+ )
6627
+ };
6628
+ }
6629
+
6630
+ // src/api/checkoutexternal/models/CompanyUserUsageResponseData.ts
6631
+ function CompanyUserUsageResponseDataFromJSON(json) {
6632
+ return CompanyUserUsageResponseDataFromJSONTyped(json, false);
6633
+ }
6634
+ function CompanyUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6635
+ if (json == null) {
6636
+ return json;
6637
+ }
6638
+ return {
6639
+ lastSeen: new Date(json["last_seen"]),
6640
+ name: json["name"] == null ? void 0 : json["name"],
6641
+ share: json["share"],
6642
+ usage: json["usage"],
6643
+ userId: json["user_id"]
6644
+ };
6645
+ }
6646
+
6647
+ // src/api/checkoutexternal/models/CompanyFeatureUserUsageResponseData.ts
6648
+ function CompanyFeatureUserUsageResponseDataFromJSON(json) {
6649
+ return CompanyFeatureUserUsageResponseDataFromJSONTyped(json, false);
6650
+ }
6651
+ function CompanyFeatureUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6652
+ if (json == null) {
6653
+ return json;
6654
+ }
6655
+ return {
6656
+ count: json["count"],
6657
+ endTime: new Date(json["end_time"]),
6658
+ startTime: new Date(json["start_time"]),
6659
+ total: json["total"],
6660
+ unattributed: json["unattributed"] == null ? void 0 : json["unattributed"],
6661
+ users: json["users"].map(
6662
+ CompanyUserUsageResponseDataFromJSON
6663
+ )
6664
+ };
6665
+ }
6666
+
6320
6667
  // src/api/checkoutexternal/models/CompanyInvoiceResponseData.ts
6321
6668
  function CompanyInvoiceResponseDataFromJSON(json) {
6322
6669
  return CompanyInvoiceResponseDataFromJSONTyped(json, false);
@@ -6328,7 +6675,7 @@ function CompanyInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6328
6675
  return {
6329
6676
  amountDue: json["amount_due"],
6330
6677
  createdAt: new Date(json["created_at"]),
6331
- currency: json["currency"],
6678
+ currency: CurrencyFromJSON(json["currency"]),
6332
6679
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
6333
6680
  id: json["id"],
6334
6681
  status: json["status"] == null ? void 0 : InvoiceStatusFromJSON(json["status"]),
@@ -6370,17 +6717,11 @@ function CompanyOverrideNoteResponseDataFromJSONTyped(json, ignoreDiscriminator)
6370
6717
  };
6371
6718
  }
6372
6719
 
6373
- // src/api/checkoutexternal/models/FeatureType.ts
6374
- var FeatureType = {
6375
- Boolean: "boolean",
6376
- Event: "event",
6377
- License: "license",
6378
- Trait: "trait"
6379
- };
6380
- function FeatureTypeFromJSON(json) {
6381
- return FeatureTypeFromJSONTyped(json, false);
6720
+ // src/api/checkoutexternal/models/FeatureEventSource.ts
6721
+ function FeatureEventSourceFromJSON(json) {
6722
+ return FeatureEventSourceFromJSONTyped(json, false);
6382
6723
  }
6383
- function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
6724
+ function FeatureEventSourceFromJSONTyped(json, ignoreDiscriminator) {
6384
6725
  return json;
6385
6726
  }
6386
6727
 
@@ -6403,6 +6744,7 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6403
6744
  return {
6404
6745
  createdAt: new Date(json["created_at"]),
6405
6746
  description: json["description"],
6747
+ eventSource: FeatureEventSourceFromJSON(json["event_source"]),
6406
6748
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
6407
6749
  featureType: FeatureTypeFromJSON(json["feature_type"]),
6408
6750
  icon: json["icon"],
@@ -6442,6 +6784,7 @@ function CompanyOverrideResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6442
6784
  notes: json["notes"].map(
6443
6785
  CompanyOverrideNoteResponseDataFromJSON
6444
6786
  ),
6787
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
6445
6788
  ruleId: json["rule_id"] == null ? void 0 : json["rule_id"],
6446
6789
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
6447
6790
  updatedAt: new Date(json["updated_at"]),
@@ -6527,7 +6870,7 @@ function EstimatedPlanTotalFromJSONTyped(json, ignoreDiscriminator) {
6527
6870
  }
6528
6871
  return {
6529
6872
  amount: json["amount"],
6530
- currency: json["currency"],
6873
+ currency: CurrencyFromJSON(json["currency"]),
6531
6874
  period: PlanPriceCadenceFromJSON(json["period"])
6532
6875
  };
6533
6876
  }
@@ -6541,28 +6884,13 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscrimi
6541
6884
  return json;
6542
6885
  }
6543
6886
  return {
6544
- currency: json["currency"],
6887
+ currency: CurrencyFromJSON(json["currency"]),
6545
6888
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_price"]),
6546
6889
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["quarterly_price"]),
6547
6890
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_price"])
6548
6891
  };
6549
6892
  }
6550
6893
 
6551
- // src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
6552
- var EntitlementPriceBehavior = {
6553
- CreditBurndown: "credit_burndown",
6554
- Overage: "overage",
6555
- PayAsYouGo: "pay_as_you_go",
6556
- PayInAdvance: "pay_in_advance",
6557
- Tier: "tier"
6558
- };
6559
- function EntitlementPriceBehaviorFromJSON(json) {
6560
- return EntitlementPriceBehaviorFromJSONTyped(json, false);
6561
- }
6562
- function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
6563
- return json;
6564
- }
6565
-
6566
6894
  // src/api/checkoutexternal/models/WarningTierResponseData.ts
6567
6895
  function WarningTierResponseDataFromJSON(json) {
6568
6896
  return WarningTierResponseDataFromJSONTyped(json, false);
@@ -6648,6 +6976,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6648
6976
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
6649
6977
  planId: json["plan_id"],
6650
6978
  priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
6979
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
6651
6980
  ruleId: json["rule_id"],
6652
6981
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
6653
6982
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -6857,6 +7186,7 @@ function FeatureInPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6857
7186
  ),
6858
7187
  createdAt: new Date(json["created_at"]),
6859
7188
  description: json["description"],
7189
+ eventSource: FeatureEventSourceFromJSON(json["event_source"]),
6860
7190
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
6861
7191
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
6862
7192
  featureType: FeatureTypeFromJSON(json["feature_type"]),
@@ -6979,7 +7309,7 @@ function PlanCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator)
6979
7309
  return json;
6980
7310
  }
6981
7311
  return {
6982
- currency: json["currency"],
7312
+ currency: CurrencyFromJSON(json["currency"]),
6983
7313
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
6984
7314
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
6985
7315
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["quarterly_price"]),
@@ -7042,14 +7372,6 @@ function CreditGrantDetailFromJSONTyped(json, ignoreDiscriminator) {
7042
7372
  };
7043
7373
  }
7044
7374
 
7045
- // src/api/checkoutexternal/models/EntitlementType.ts
7046
- function EntitlementTypeFromJSON(json) {
7047
- return EntitlementTypeFromJSONTyped(json, false);
7048
- }
7049
- function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
7050
- return json;
7051
- }
7052
-
7053
7375
  // src/api/checkoutexternal/models/FeatureUsageResponseData.ts
7054
7376
  function FeatureUsageResponseDataFromJSON(json) {
7055
7377
  return FeatureUsageResponseDataFromJSONTyped(json, false);
@@ -7190,7 +7512,7 @@ function CompanySubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator)
7190
7512
  return {
7191
7513
  cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
7192
7514
  cancelAtPeriodEnd: json["cancel_at_period_end"],
7193
- currency: json["currency"],
7515
+ currency: CurrencyFromJSON(json["currency"]),
7194
7516
  customerExternalId: json["customer_external_id"],
7195
7517
  discounts: json["discounts"].map(
7196
7518
  BillingSubscriptionDiscountViewFromJSON
@@ -7221,7 +7543,7 @@ function CompanyUpcomingInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminat
7221
7543
  }
7222
7544
  return {
7223
7545
  amountDue: json["amount_due"],
7224
- currency: json["currency"],
7546
+ currency: CurrencyFromJSON(json["currency"]),
7225
7547
  customerBalanceApplied: json["customer_balance_applied"],
7226
7548
  customerBalanceRemaining: json["customer_balance_remaining"],
7227
7549
  discounts: json["discounts"].map(
@@ -7386,7 +7708,7 @@ function UpcomingInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7386
7708
  collectionMethod: json["collection_method"],
7387
7709
  companyId: json["company_id"] == null ? void 0 : json["company_id"],
7388
7710
  createdAt: new Date(json["created_at"]),
7389
- currency: json["currency"],
7711
+ currency: CurrencyFromJSON(json["currency"]),
7390
7712
  customerExternalId: json["customer_external_id"],
7391
7713
  dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
7392
7714
  endingBalance: json["ending_balance"],
@@ -7457,7 +7779,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
7457
7779
  creditDescription: json["credit_description"],
7458
7780
  creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
7459
7781
  creditName: json["credit_name"],
7460
- currency: json["currency"] == null ? void 0 : json["currency"],
7782
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
7461
7783
  exhaustedAt: json["exhausted_at"] == null ? void 0 : new Date(json["exhausted_at"]),
7462
7784
  expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
7463
7785
  expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
@@ -7470,7 +7792,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
7470
7792
  planName: json["plan_name"] == null ? void 0 : json["plan_name"],
7471
7793
  pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
7472
7794
  postpaidChargeAmount: json["postpaid_charge_amount"] == null ? void 0 : json["postpaid_charge_amount"],
7473
- postpaidChargeCurrency: json["postpaid_charge_currency"] == null ? void 0 : json["postpaid_charge_currency"],
7795
+ postpaidChargeCurrency: json["postpaid_charge_currency"] == null ? void 0 : CurrencyFromJSON(json["postpaid_charge_currency"]),
7474
7796
  postpaidChargedCredits: json["postpaid_charged_credits"] == null ? void 0 : json["postpaid_charged_credits"],
7475
7797
  postpaidPeriodEnd: json["postpaid_period_end"] == null ? void 0 : new Date(json["postpaid_period_end"]),
7476
7798
  postpaidRate: json["postpaid_rate"] == null ? void 0 : json["postpaid_rate"],
@@ -7637,10 +7959,11 @@ function CreateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
7637
7959
  credit_bundles: value["creditBundles"].map(
7638
7960
  UpdateCreditBundleRequestBodyToJSON
7639
7961
  ),
7640
- currency: value["currency"],
7962
+ currency: CurrencyToJSON(value["currency"]),
7641
7963
  custom_field_values: value["customFieldValues"].map(
7642
7964
  CheckoutFieldValueToJSON
7643
7965
  ),
7966
+ intent: CheckoutIntentToJSON(value["intent"]),
7644
7967
  new_plan_id: value["newPlanId"],
7645
7968
  new_price_id: value["newPriceId"],
7646
7969
  opt_in_accepted: value["optInAccepted"],
@@ -7890,6 +8213,90 @@ function GetCheckoutTaxIDResponseFromJSONTyped(json, ignoreDiscriminator) {
7890
8213
  };
7891
8214
  }
7892
8215
 
8216
+ // src/api/checkoutexternal/models/GetCompanyCreditBalancesResponse.ts
8217
+ function GetCompanyCreditBalancesResponseFromJSON(json) {
8218
+ return GetCompanyCreditBalancesResponseFromJSONTyped(json, false);
8219
+ }
8220
+ function GetCompanyCreditBalancesResponseFromJSONTyped(json, ignoreDiscriminator) {
8221
+ if (json == null) {
8222
+ return json;
8223
+ }
8224
+ return {
8225
+ data: CompanyCreditBalancesResponseDataFromJSON(json["data"]),
8226
+ params: json["params"]
8227
+ };
8228
+ }
8229
+
8230
+ // src/api/checkoutexternal/models/GetCompanyCreditUserUsageParams.ts
8231
+ function GetCompanyCreditUserUsageParamsFromJSON(json) {
8232
+ return GetCompanyCreditUserUsageParamsFromJSONTyped(json, false);
8233
+ }
8234
+ function GetCompanyCreditUserUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
8235
+ if (json == null) {
8236
+ return json;
8237
+ }
8238
+ return {
8239
+ limit: json["limit"] == null ? void 0 : json["limit"],
8240
+ offset: json["offset"] == null ? void 0 : json["offset"]
8241
+ };
8242
+ }
8243
+
8244
+ // src/api/checkoutexternal/models/GetCompanyCreditUserUsageResponse.ts
8245
+ function GetCompanyCreditUserUsageResponseFromJSON(json) {
8246
+ return GetCompanyCreditUserUsageResponseFromJSONTyped(json, false);
8247
+ }
8248
+ function GetCompanyCreditUserUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
8249
+ if (json == null) {
8250
+ return json;
8251
+ }
8252
+ return {
8253
+ data: CompanyCreditUserUsageResponseDataFromJSON(json["data"]),
8254
+ params: GetCompanyCreditUserUsageParamsFromJSON(json["params"])
8255
+ };
8256
+ }
8257
+
8258
+ // src/api/checkoutexternal/models/GetCompanyFeatureUsageResponse.ts
8259
+ function GetCompanyFeatureUsageResponseFromJSON(json) {
8260
+ return GetCompanyFeatureUsageResponseFromJSONTyped(json, false);
8261
+ }
8262
+ function GetCompanyFeatureUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
8263
+ if (json == null) {
8264
+ return json;
8265
+ }
8266
+ return {
8267
+ data: CompanyFeatureUsageListResponseDataFromJSON(json["data"]),
8268
+ params: json["params"]
8269
+ };
8270
+ }
8271
+
8272
+ // src/api/checkoutexternal/models/GetCompanyFeatureUserUsageParams.ts
8273
+ function GetCompanyFeatureUserUsageParamsFromJSON(json) {
8274
+ return GetCompanyFeatureUserUsageParamsFromJSONTyped(json, false);
8275
+ }
8276
+ function GetCompanyFeatureUserUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
8277
+ if (json == null) {
8278
+ return json;
8279
+ }
8280
+ return {
8281
+ limit: json["limit"] == null ? void 0 : json["limit"],
8282
+ offset: json["offset"] == null ? void 0 : json["offset"]
8283
+ };
8284
+ }
8285
+
8286
+ // src/api/checkoutexternal/models/GetCompanyFeatureUserUsageResponse.ts
8287
+ function GetCompanyFeatureUserUsageResponseFromJSON(json) {
8288
+ return GetCompanyFeatureUserUsageResponseFromJSONTyped(json, false);
8289
+ }
8290
+ function GetCompanyFeatureUserUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
8291
+ if (json == null) {
8292
+ return json;
8293
+ }
8294
+ return {
8295
+ data: CompanyFeatureUserUsageResponseDataFromJSON(json["data"]),
8296
+ params: GetCompanyFeatureUserUsageParamsFromJSON(json["params"])
8297
+ };
8298
+ }
8299
+
7893
8300
  // src/api/checkoutexternal/models/GetCompanyInvoicesParams.ts
7894
8301
  function GetCompanyInvoicesParamsFromJSON(json) {
7895
8302
  return GetCompanyInvoicesParamsFromJSONTyped(json, false);
@@ -8172,7 +8579,7 @@ function PreviewSubscriptionDiscountResponseDataFromJSONTyped(json, ignoreDiscri
8172
8579
  return {
8173
8580
  amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
8174
8581
  couponName: json["coupon_name"],
8175
- currency: json["currency"] == null ? void 0 : json["currency"],
8582
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
8176
8583
  customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
8177
8584
  duration: json["duration"],
8178
8585
  durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
@@ -8194,7 +8601,7 @@ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscrim
8194
8601
  }
8195
8602
  return {
8196
8603
  amountOff: json["amount_off"],
8197
- currency: json["currency"],
8604
+ currency: CurrencyFromJSON(json["currency"]),
8198
8605
  discountAmount: json["discount_amount"],
8199
8606
  discounts: json["discounts"].map(
8200
8607
  PreviewSubscriptionDiscountResponseDataFromJSON
@@ -8236,6 +8643,9 @@ function PreviewSubscriptionChangeResponseDataFromJSONTyped(json, ignoreDiscrimi
8236
8643
  paymentMethodRequired: json["payment_method_required"],
8237
8644
  percentOff: json["percent_off"],
8238
8645
  periodStart: new Date(json["period_start"]),
8646
+ problems: json["problems"].map(
8647
+ CheckoutProblemResponseDataFromJSON
8648
+ ),
8239
8649
  promoCodeApplied: json["promo_code_applied"],
8240
8650
  proration: json["proration"],
8241
8651
  scheduledChangeTime: json["scheduled_change_time"] == null ? void 0 : new Date(json["scheduled_change_time"]),
@@ -8339,10 +8749,11 @@ function UpdateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
8339
8749
  credit_bundles: value["creditBundles"].map(
8340
8750
  UpdateCreditBundleRequestBodyToJSON
8341
8751
  ),
8342
- currency: value["currency"],
8752
+ currency: CurrencyToJSON(value["currency"]),
8343
8753
  custom_field_values: value["customFieldValues"].map(
8344
8754
  CheckoutFieldValueToJSON
8345
8755
  ),
8756
+ intent: CheckoutIntentToJSON(value["intent"]),
8346
8757
  new_plan_id: value["newPlanId"],
8347
8758
  new_price_id: value["newPriceId"],
8348
8759
  opt_in_accepted: value["optInAccepted"],
@@ -8783,6 +9194,170 @@ var CheckoutexternalApi = class extends BaseAPI {
8783
9194
  const response = await this.getCheckoutTaxIDRaw(initOverrides);
8784
9195
  return await response.value();
8785
9196
  }
9197
+ /**
9198
+ * Get company credit balances
9199
+ */
9200
+ async getCompanyCreditBalancesRaw(initOverrides) {
9201
+ const queryParameters = {};
9202
+ const headerParameters = {};
9203
+ if (this.configuration && this.configuration.apiKey) {
9204
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9205
+ "X-Schematic-Api-Key"
9206
+ );
9207
+ }
9208
+ const response = await this.request(
9209
+ {
9210
+ path: `/company/credits`,
9211
+ method: "GET",
9212
+ headers: headerParameters,
9213
+ query: queryParameters
9214
+ },
9215
+ initOverrides
9216
+ );
9217
+ return new JSONApiResponse(
9218
+ response,
9219
+ (jsonValue) => GetCompanyCreditBalancesResponseFromJSON(jsonValue)
9220
+ );
9221
+ }
9222
+ /**
9223
+ * Get company credit balances
9224
+ */
9225
+ async getCompanyCreditBalances(initOverrides) {
9226
+ const response = await this.getCompanyCreditBalancesRaw(initOverrides);
9227
+ return await response.value();
9228
+ }
9229
+ /**
9230
+ * Get company credit user usage
9231
+ */
9232
+ async getCompanyCreditUserUsageRaw(requestParameters, initOverrides) {
9233
+ if (requestParameters["creditId"] == null) {
9234
+ throw new RequiredError(
9235
+ "creditId",
9236
+ 'Required parameter "creditId" was null or undefined when calling getCompanyCreditUserUsage().'
9237
+ );
9238
+ }
9239
+ const queryParameters = {};
9240
+ if (requestParameters["limit"] != null) {
9241
+ queryParameters["limit"] = requestParameters["limit"];
9242
+ }
9243
+ if (requestParameters["offset"] != null) {
9244
+ queryParameters["offset"] = requestParameters["offset"];
9245
+ }
9246
+ const headerParameters = {};
9247
+ if (this.configuration && this.configuration.apiKey) {
9248
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9249
+ "X-Schematic-Api-Key"
9250
+ );
9251
+ }
9252
+ const response = await this.request(
9253
+ {
9254
+ path: `/company/credits/{credit_id}/users`.replace(
9255
+ `{${"credit_id"}}`,
9256
+ encodeURIComponent(String(requestParameters["creditId"]))
9257
+ ),
9258
+ method: "GET",
9259
+ headers: headerParameters,
9260
+ query: queryParameters
9261
+ },
9262
+ initOverrides
9263
+ );
9264
+ return new JSONApiResponse(
9265
+ response,
9266
+ (jsonValue) => GetCompanyCreditUserUsageResponseFromJSON(jsonValue)
9267
+ );
9268
+ }
9269
+ /**
9270
+ * Get company credit user usage
9271
+ */
9272
+ async getCompanyCreditUserUsage(requestParameters, initOverrides) {
9273
+ const response = await this.getCompanyCreditUserUsageRaw(
9274
+ requestParameters,
9275
+ initOverrides
9276
+ );
9277
+ return await response.value();
9278
+ }
9279
+ /**
9280
+ * Get company feature usage
9281
+ */
9282
+ async getCompanyFeatureUsageRaw(initOverrides) {
9283
+ const queryParameters = {};
9284
+ const headerParameters = {};
9285
+ if (this.configuration && this.configuration.apiKey) {
9286
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9287
+ "X-Schematic-Api-Key"
9288
+ );
9289
+ }
9290
+ const response = await this.request(
9291
+ {
9292
+ path: `/company/usage`,
9293
+ method: "GET",
9294
+ headers: headerParameters,
9295
+ query: queryParameters
9296
+ },
9297
+ initOverrides
9298
+ );
9299
+ return new JSONApiResponse(
9300
+ response,
9301
+ (jsonValue) => GetCompanyFeatureUsageResponseFromJSON(jsonValue)
9302
+ );
9303
+ }
9304
+ /**
9305
+ * Get company feature usage
9306
+ */
9307
+ async getCompanyFeatureUsage(initOverrides) {
9308
+ const response = await this.getCompanyFeatureUsageRaw(initOverrides);
9309
+ return await response.value();
9310
+ }
9311
+ /**
9312
+ * Get company feature user usage
9313
+ */
9314
+ async getCompanyFeatureUserUsageRaw(requestParameters, initOverrides) {
9315
+ if (requestParameters["featureId"] == null) {
9316
+ throw new RequiredError(
9317
+ "featureId",
9318
+ 'Required parameter "featureId" was null or undefined when calling getCompanyFeatureUserUsage().'
9319
+ );
9320
+ }
9321
+ const queryParameters = {};
9322
+ if (requestParameters["limit"] != null) {
9323
+ queryParameters["limit"] = requestParameters["limit"];
9324
+ }
9325
+ if (requestParameters["offset"] != null) {
9326
+ queryParameters["offset"] = requestParameters["offset"];
9327
+ }
9328
+ const headerParameters = {};
9329
+ if (this.configuration && this.configuration.apiKey) {
9330
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9331
+ "X-Schematic-Api-Key"
9332
+ );
9333
+ }
9334
+ const response = await this.request(
9335
+ {
9336
+ path: `/company/usage/{feature_id}/users`.replace(
9337
+ `{${"feature_id"}}`,
9338
+ encodeURIComponent(String(requestParameters["featureId"]))
9339
+ ),
9340
+ method: "GET",
9341
+ headers: headerParameters,
9342
+ query: queryParameters
9343
+ },
9344
+ initOverrides
9345
+ );
9346
+ return new JSONApiResponse(
9347
+ response,
9348
+ (jsonValue) => GetCompanyFeatureUserUsageResponseFromJSON(jsonValue)
9349
+ );
9350
+ }
9351
+ /**
9352
+ * Get company feature user usage
9353
+ */
9354
+ async getCompanyFeatureUserUsage(requestParameters, initOverrides) {
9355
+ const response = await this.getCompanyFeatureUserUsageRaw(
9356
+ requestParameters,
9357
+ initOverrides
9358
+ );
9359
+ return await response.value();
9360
+ }
8786
9361
  /**
8787
9362
  * Get company invoices
8788
9363
  */
@@ -9807,11 +10382,19 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
9807
10382
  return json;
9808
10383
  }
9809
10384
 
10385
+ // src/api/componentspublic/models/Currency.ts
10386
+ function CurrencyFromJSON2(json) {
10387
+ return CurrencyFromJSONTyped33(json, false);
10388
+ }
10389
+ function CurrencyFromJSONTyped33(json, ignoreDiscriminator) {
10390
+ return json;
10391
+ }
10392
+
9810
10393
  // src/api/componentspublic/models/BillingProductPriceInterval.ts
9811
10394
  function BillingProductPriceIntervalFromJSON2(json) {
9812
- return BillingProductPriceIntervalFromJSONTyped5(json, false);
10395
+ return BillingProductPriceIntervalFromJSONTyped6(json, false);
9813
10396
  }
9814
- function BillingProductPriceIntervalFromJSONTyped5(json, ignoreDiscriminator) {
10397
+ function BillingProductPriceIntervalFromJSONTyped6(json, ignoreDiscriminator) {
9815
10398
  return json;
9816
10399
  }
9817
10400
 
@@ -9825,9 +10408,9 @@ function BillingProviderTypeFromJSONTyped21(json, ignoreDiscriminator) {
9825
10408
 
9826
10409
  // src/api/componentspublic/models/BillingPriceScheme.ts
9827
10410
  function BillingPriceSchemeFromJSON2(json) {
9828
- return BillingPriceSchemeFromJSONTyped6(json, false);
10411
+ return BillingPriceSchemeFromJSONTyped7(json, false);
9829
10412
  }
9830
- function BillingPriceSchemeFromJSONTyped6(json, ignoreDiscriminator) {
10413
+ function BillingPriceSchemeFromJSONTyped7(json, ignoreDiscriminator) {
9831
10414
  return json;
9832
10415
  }
9833
10416
 
@@ -9840,7 +10423,7 @@ function BillingPriceResponseDataFromJSONTyped10(json, ignoreDiscriminator) {
9840
10423
  return json;
9841
10424
  }
9842
10425
  return {
9843
- currency: json["currency"],
10426
+ currency: CurrencyFromJSON2(json["currency"]),
9844
10427
  externalPriceId: json["external_price_id"],
9845
10428
  id: json["id"],
9846
10429
  interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
@@ -9862,7 +10445,7 @@ function CreditCurrencyPriceResponseDataFromJSONTyped3(json, ignoreDiscriminator
9862
10445
  return json;
9863
10446
  }
9864
10447
  return {
9865
- currency: json["currency"],
10448
+ currency: CurrencyFromJSON2(json["currency"]),
9866
10449
  price: json["price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["price"])
9867
10450
  };
9868
10451
  }
@@ -9963,9 +10546,9 @@ function BillingPriceUsageTypeFromJSONTyped5(json, ignoreDiscriminator) {
9963
10546
 
9964
10547
  // src/api/componentspublic/models/BillingTiersMode.ts
9965
10548
  function BillingTiersModeFromJSON2(json) {
9966
- return BillingTiersModeFromJSONTyped5(json, false);
10549
+ return BillingTiersModeFromJSONTyped6(json, false);
9967
10550
  }
9968
- function BillingTiersModeFromJSONTyped5(json, ignoreDiscriminator) {
10551
+ function BillingTiersModeFromJSONTyped6(json, ignoreDiscriminator) {
9969
10552
  return json;
9970
10553
  }
9971
10554
 
@@ -9980,7 +10563,7 @@ function BillingPriceViewFromJSONTyped11(json, ignoreDiscriminator) {
9980
10563
  return {
9981
10564
  billingScheme: BillingPriceSchemeFromJSON2(json["billing_scheme"]),
9982
10565
  createdAt: new Date(json["created_at"]),
9983
- currency: json["currency"],
10566
+ currency: CurrencyFromJSON2(json["currency"]),
9984
10567
  id: json["id"],
9985
10568
  interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
9986
10569
  intervalCount: json["interval_count"],
@@ -10016,7 +10599,7 @@ function CreditCurrencyPriceFromJSONTyped3(json, ignoreDiscriminator) {
10016
10599
  return json;
10017
10600
  }
10018
10601
  return {
10019
- currency: json["currency"],
10602
+ currency: CurrencyFromJSON2(json["currency"]),
10020
10603
  price: json["price"] == null ? void 0 : BillingPriceViewFromJSON2(json["price"])
10021
10604
  };
10022
10605
  }
@@ -10108,9 +10691,9 @@ function BillingPlanCreditGrantBillingModeFromJSONTyped5(json, ignoreDiscriminat
10108
10691
 
10109
10692
  // src/api/componentspublic/models/BillingPlanCreditGrantResetCadence.ts
10110
10693
  function BillingPlanCreditGrantResetCadenceFromJSON2(json) {
10111
- return BillingPlanCreditGrantResetCadenceFromJSONTyped6(json, false);
10694
+ return BillingPlanCreditGrantResetCadenceFromJSONTyped8(json, false);
10112
10695
  }
10113
- function BillingPlanCreditGrantResetCadenceFromJSONTyped6(json, ignoreDiscriminator) {
10696
+ function BillingPlanCreditGrantResetCadenceFromJSONTyped8(json, ignoreDiscriminator) {
10114
10697
  return json;
10115
10698
  }
10116
10699
 
@@ -10132,9 +10715,9 @@ function BillingPlanCreditGrantResetTypeFromJSONTyped5(json, ignoreDiscriminator
10132
10715
 
10133
10716
  // src/api/componentspublic/models/PlanCreditGrantScaling.ts
10134
10717
  function PlanCreditGrantScalingFromJSON2(json) {
10135
- return PlanCreditGrantScalingFromJSONTyped5(json, false);
10718
+ return PlanCreditGrantScalingFromJSONTyped6(json, false);
10136
10719
  }
10137
- function PlanCreditGrantScalingFromJSONTyped5(json, ignoreDiscriminator) {
10720
+ function PlanCreditGrantScalingFromJSONTyped6(json, ignoreDiscriminator) {
10138
10721
  return json;
10139
10722
  }
10140
10723
 
@@ -10201,25 +10784,25 @@ function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
10201
10784
 
10202
10785
  // src/api/componentspublic/models/EntitlementValueType.ts
10203
10786
  function EntitlementValueTypeFromJSON2(json) {
10204
- return EntitlementValueTypeFromJSONTyped7(json, false);
10787
+ return EntitlementValueTypeFromJSONTyped8(json, false);
10205
10788
  }
10206
- function EntitlementValueTypeFromJSONTyped7(json, ignoreDiscriminator) {
10789
+ function EntitlementValueTypeFromJSONTyped8(json, ignoreDiscriminator) {
10207
10790
  return json;
10208
10791
  }
10209
10792
 
10210
10793
  // src/api/componentspublic/models/MetricPeriodMonthReset.ts
10211
10794
  function MetricPeriodMonthResetFromJSON2(json) {
10212
- return MetricPeriodMonthResetFromJSONTyped11(json, false);
10795
+ return MetricPeriodMonthResetFromJSONTyped12(json, false);
10213
10796
  }
10214
- function MetricPeriodMonthResetFromJSONTyped11(json, ignoreDiscriminator) {
10797
+ function MetricPeriodMonthResetFromJSONTyped12(json, ignoreDiscriminator) {
10215
10798
  return json;
10216
10799
  }
10217
10800
 
10218
10801
  // src/api/componentspublic/models/MetricPeriod.ts
10219
10802
  function MetricPeriodFromJSON2(json) {
10220
- return MetricPeriodFromJSONTyped11(json, false);
10803
+ return MetricPeriodFromJSONTyped12(json, false);
10221
10804
  }
10222
- function MetricPeriodFromJSONTyped11(json, ignoreDiscriminator) {
10805
+ function MetricPeriodFromJSONTyped12(json, ignoreDiscriminator) {
10223
10806
  return json;
10224
10807
  }
10225
10808
 
@@ -10318,7 +10901,7 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
10318
10901
  return json;
10319
10902
  }
10320
10903
  return {
10321
- currency: json["currency"],
10904
+ currency: CurrencyFromJSON2(json["currency"]),
10322
10905
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["monthly_price"]),
10323
10906
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["quarterly_price"]),
10324
10907
  yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["yearly_price"])
@@ -10327,9 +10910,9 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
10327
10910
 
10328
10911
  // src/api/componentspublic/models/EntitlementPriceBehavior.ts
10329
10912
  function EntitlementPriceBehaviorFromJSON2(json) {
10330
- return EntitlementPriceBehaviorFromJSONTyped5(json, false);
10913
+ return EntitlementPriceBehaviorFromJSONTyped6(json, false);
10331
10914
  }
10332
- function EntitlementPriceBehaviorFromJSONTyped5(json, ignoreDiscriminator) {
10915
+ function EntitlementPriceBehaviorFromJSONTyped6(json, ignoreDiscriminator) {
10333
10916
  return json;
10334
10917
  }
10335
10918
 
@@ -10386,11 +10969,19 @@ function EventSummaryResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
10386
10969
  };
10387
10970
  }
10388
10971
 
10972
+ // src/api/componentspublic/models/FeatureEventSource.ts
10973
+ function FeatureEventSourceFromJSON2(json) {
10974
+ return FeatureEventSourceFromJSONTyped4(json, false);
10975
+ }
10976
+ function FeatureEventSourceFromJSONTyped4(json, ignoreDiscriminator) {
10977
+ return json;
10978
+ }
10979
+
10389
10980
  // src/api/componentspublic/models/FeatureType.ts
10390
10981
  function FeatureTypeFromJSON2(json) {
10391
- return FeatureTypeFromJSONTyped4(json, false);
10982
+ return FeatureTypeFromJSONTyped5(json, false);
10392
10983
  }
10393
- function FeatureTypeFromJSONTyped4(json, ignoreDiscriminator) {
10984
+ function FeatureTypeFromJSONTyped5(json, ignoreDiscriminator) {
10394
10985
  return json;
10395
10986
  }
10396
10987
 
@@ -10539,6 +11130,7 @@ function FeatureResponseDataFromJSONTyped7(json, ignoreDiscriminator) {
10539
11130
  return {
10540
11131
  createdAt: new Date(json["created_at"]),
10541
11132
  description: json["description"],
11133
+ eventSource: FeatureEventSourceFromJSON2(json["event_source"]),
10542
11134
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
10543
11135
  featureType: FeatureTypeFromJSON2(json["feature_type"]),
10544
11136
  icon: json["icon"],
@@ -10602,6 +11194,7 @@ function FeatureInPlanResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
10602
11194
  ),
10603
11195
  createdAt: new Date(json["created_at"]),
10604
11196
  description: json["description"],
11197
+ eventSource: FeatureEventSourceFromJSON2(json["event_source"]),
10605
11198
  eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
10606
11199
  eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON2(json["event_summary"]),
10607
11200
  featureType: FeatureTypeFromJSON2(json["feature_type"]),
@@ -10723,6 +11316,7 @@ function PlanEntitlementResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
10723
11316
  plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON2(json["plan"]),
10724
11317
  planId: json["plan_id"],
10725
11318
  priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON2(json["price_behavior"]),
11319
+ quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
10726
11320
  ruleId: json["rule_id"],
10727
11321
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
10728
11322
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
@@ -10836,7 +11430,7 @@ function PlanCurrencyPricesResponseDataFromJSONTyped5(json, ignoreDiscriminator)
10836
11430
  return json;
10837
11431
  }
10838
11432
  return {
10839
- currency: json["currency"],
11433
+ currency: CurrencyFromJSON2(json["currency"]),
10840
11434
  monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
10841
11435
  oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
10842
11436
  quarterlyPrice: json["quarterly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["quarterly_price"]),
@@ -13800,6 +14394,7 @@ var en = {
13800
14394
  "Over plan limit": "Over plan limit",
13801
14395
  "Pay-in-advance features require a quantity.": "Pay-in-advance features require a quantity.",
13802
14396
  "Error saving custom field values. Please try again.": "Error saving custom field values. Please try again.",
14397
+ "Pay and close": "Pay and close",
13803
14398
  "Pay now": "Pay now",
13804
14399
  "Payment Details": "Payment Details",
13805
14400
  "Payment due": "Payment due {{date}}",
@@ -14079,6 +14674,8 @@ var it = {
14079
14674
  "Error processing payment. Please try a different payment method.": "Errore durante l'elaborazione del pagamento. Prova con un altro metodo di pagamento.",
14080
14675
  "Error retrieving plan details. Please try again in a moment.": "Errore durante il recupero dei dettagli del piano. Riprova tra qualche istante.",
14081
14676
  "Error updating payment method. Please try again.": "Errore durante l'aggiornamento del metodo di pagamento. Riprova.",
14677
+ "Estimated at current usage": "Stima in base al tuo utilizzo attuale",
14678
+ "Estimated at current usage with base price": "Stima in base al tuo utilizzo attuale. Prezzo base {{amount}}/{{period}}",
14082
14679
  "Estimated bill": "Importo stimato",
14083
14680
  "Everything in": "Tutto quanto incluso in {{plan}}, pi\xF9",
14084
14681
  "Expired": "Scaduta",
@@ -14115,6 +14712,7 @@ var it = {
14115
14712
  "Over plan limit": "Oltre il limite del piano",
14116
14713
  "Pay-in-advance features require a quantity.": "Le funzionalit\xE0 a pagamento anticipato richiedono una quantit\xE0.",
14117
14714
  "Error saving custom field values. Please try again.": "Errore durante il salvataggio dei campi personalizzati. Riprova.",
14715
+ "Pay and close": "Paga e chiudi",
14118
14716
  "Pay now": "Paga ora",
14119
14717
  "Payment Details": "Dati di pagamento",
14120
14718
  "Payment due": "Pagamento entro il {{date}}",
@@ -16417,7 +17015,7 @@ var reducer = (state, action) => {
16417
17015
  // src/context/EmbedProvider.tsx
16418
17016
  var import_jsx_runtime4 = require("react/jsx-runtime");
16419
17017
  var getCustomHeaders = (sessionId) => ({
16420
- "X-Schematic-Components-Version": "2.31.0",
17018
+ "X-Schematic-Components-Version": "2.32.0",
16421
17019
  "X-Schematic-Session-ID": sessionId
16422
17020
  });
16423
17021
  var normalizeCurrencyFilter = (filter) => {
@@ -23209,6 +23807,7 @@ var NoPaymentRequired = ({
23209
23807
  isSticky = false,
23210
23808
  willScheduleDowngrade = false,
23211
23809
  isCreditOnlyPurchase = false,
23810
+ isOneTimeOnlyPurchase = false,
23212
23811
  onClick
23213
23812
  }) => {
23214
23813
  const { t: t2 } = useTranslation();
@@ -23221,7 +23820,7 @@ var NoPaymentRequired = ({
23221
23820
  $size: isSticky ? "sm" : "md",
23222
23821
  $fullWidth: true,
23223
23822
  $isLoading: isLoading,
23224
- children: isCreditOnlyPurchase ? t2("Buy credits") : willScheduleDowngrade ? t2("Schedule downgrade") : t2("Subscribe and close")
23823
+ children: isCreditOnlyPurchase ? t2("Buy credits") : willScheduleDowngrade ? t2("Schedule downgrade") : isOneTimeOnlyPurchase ? t2("Pay and close") : t2("Subscribe and close")
23225
23824
  }
23226
23825
  );
23227
23826
  };
@@ -23245,7 +23844,8 @@ var CheckoutStageButton = ({
23245
23844
  willTrialWithoutPaymentMethod,
23246
23845
  willScheduleDowngrade,
23247
23846
  hasIncompleteRequiredCustomFields = false,
23248
- isCreditOnlyPurchase = false
23847
+ isCreditOnlyPurchase = false,
23848
+ isOneTimeOnlyPurchase = false
23249
23849
  }) => {
23250
23850
  const { t: t2 } = useTranslation();
23251
23851
  const isDisabled = isLoading || !hasPlan && !isCreditOnlyPurchase || inEditMode || !canCheckout;
@@ -23314,7 +23914,8 @@ var CheckoutStageButton = ({
23314
23914
  isLoading,
23315
23915
  onClick: checkout,
23316
23916
  isSticky,
23317
- isCreditOnlyPurchase
23917
+ isCreditOnlyPurchase,
23918
+ isOneTimeOnlyPurchase
23318
23919
  }
23319
23920
  );
23320
23921
  }
@@ -23348,7 +23949,8 @@ var CheckoutStageButton = ({
23348
23949
  isLoading,
23349
23950
  onClick: checkout,
23350
23951
  isSticky,
23351
- isCreditOnlyPurchase
23952
+ isCreditOnlyPurchase,
23953
+ isOneTimeOnlyPurchase
23352
23954
  }
23353
23955
  );
23354
23956
  }
@@ -23391,7 +23993,8 @@ var CheckoutStageButton = ({
23391
23993
  isLoading,
23392
23994
  onClick: checkout,
23393
23995
  isSticky,
23394
- isCreditOnlyPurchase
23996
+ isCreditOnlyPurchase,
23997
+ isOneTimeOnlyPurchase
23395
23998
  }
23396
23999
  );
23397
24000
  }
@@ -23434,7 +24037,8 @@ var CheckoutStageButton = ({
23434
24037
  isLoading,
23435
24038
  onClick: checkout,
23436
24039
  isSticky,
23437
- isCreditOnlyPurchase
24040
+ isCreditOnlyPurchase,
24041
+ isOneTimeOnlyPurchase
23438
24042
  }
23439
24043
  );
23440
24044
  }
@@ -23476,7 +24080,8 @@ var CheckoutStageButton = ({
23476
24080
  isLoading,
23477
24081
  onClick: checkout,
23478
24082
  isSticky,
23479
- isCreditOnlyPurchase
24083
+ isCreditOnlyPurchase,
24084
+ isOneTimeOnlyPurchase
23480
24085
  }
23481
24086
  );
23482
24087
  }
@@ -23519,7 +24124,8 @@ var CheckoutStageButton = ({
23519
24124
  isLoading,
23520
24125
  onClick: checkout,
23521
24126
  isSticky,
23522
- isCreditOnlyPurchase
24127
+ isCreditOnlyPurchase,
24128
+ isOneTimeOnlyPurchase
23523
24129
  }
23524
24130
  );
23525
24131
  }
@@ -23562,7 +24168,8 @@ var CheckoutStageButton = ({
23562
24168
  isLoading,
23563
24169
  onClick: checkout,
23564
24170
  isSticky,
23565
- isCreditOnlyPurchase
24171
+ isCreditOnlyPurchase,
24172
+ isOneTimeOnlyPurchase
23566
24173
  }
23567
24174
  ),
23568
24175
  optInNotice
@@ -24085,6 +24692,27 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
24085
24692
  () => creditBundles.filter((bundle) => bundle.count > 0),
24086
24693
  [creditBundles]
24087
24694
  );
24695
+ const isOneTimeOnlyPurchase = (0, import_react37.useMemo)(() => {
24696
+ if (!selectedPlan?.current) {
24697
+ return false;
24698
+ }
24699
+ const currentPeriod = getSubscriptionPeriod(billingSubscription);
24700
+ if (currentPeriod && currentPeriod !== planPeriod) {
24701
+ return false;
24702
+ }
24703
+ if (willAddOnsChange || updatedUsageBasedEntitlements.changed.length) {
24704
+ return false;
24705
+ }
24706
+ return selectedOneTimeAddOns.length > 0 || addedCreditBundles.length > 0;
24707
+ }, [
24708
+ selectedPlan,
24709
+ billingSubscription,
24710
+ planPeriod,
24711
+ willAddOnsChange,
24712
+ updatedUsageBasedEntitlements.changed.length,
24713
+ selectedOneTimeAddOns.length,
24714
+ addedCreditBundles.length
24715
+ ]);
24088
24716
  const discountApplied = (0, import_react37.useMemo)(
24089
24717
  () => promoCode && (amountOff > 0 || percentOff > 0),
24090
24718
  [promoCode, amountOff, percentOff]
@@ -24277,6 +24905,7 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
24277
24905
  shouldTrial,
24278
24906
  hasIncompleteRequiredCustomFields,
24279
24907
  isCreditOnlyPurchase,
24908
+ isOneTimeOnlyPurchase,
24280
24909
  checkout: handleCheckout
24281
24910
  }
24282
24911
  );
@@ -24321,6 +24950,7 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
24321
24950
  payInAdvanceEntitlements,
24322
24951
  addOnPayInAdvanceEntitlements,
24323
24952
  isCreditOnlyPurchase,
24953
+ isOneTimeOnlyPurchase,
24324
24954
  hasIncompleteRequiredCustomFields
24325
24955
  ]);
24326
24956
  (0, import_react37.useLayoutEffect)(() => {
@@ -26967,7 +27597,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
26967
27597
  iconColor: isLightBackground ? "hsla(0, 0%, 0%, 0.8)" : "hsla(0, 0%, 100%, 0.4)"
26968
27598
  }
26969
27599
  ),
26970
- props.usageByUser.isVisible && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
27600
+ props.usageByUser.isVisible && hasGrants && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
26971
27601
  UsageByUser,
26972
27602
  {
26973
27603
  source: { kind: "credit", id: credit.id },