@schematichq/schematic-components 2.34.0 → 2.34.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.
@@ -4587,6 +4587,24 @@ function PreviewObjectResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4587
4587
  };
4588
4588
  }
4589
4589
 
4590
+ // src/api/checkoutexternal/models/BillingPlanCreditGrantWarningTierResponseData.ts
4591
+ function BillingPlanCreditGrantWarningTierResponseDataFromJSON(json) {
4592
+ return BillingPlanCreditGrantWarningTierResponseDataFromJSONTyped(
4593
+ json,
4594
+ false
4595
+ );
4596
+ }
4597
+ function BillingPlanCreditGrantWarningTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4598
+ if (json == null) {
4599
+ return json;
4600
+ }
4601
+ return {
4602
+ id: json["id"],
4603
+ key: json["key"],
4604
+ value: json["value"]
4605
+ };
4606
+ }
4607
+
4590
4608
  // src/api/checkoutexternal/models/BillingPlanCreditGrantResponseData.ts
4591
4609
  function BillingPlanCreditGrantResponseDataFromJSON(json) {
4592
4610
  return BillingPlanCreditGrantResponseDataFromJSONTyped(json, false);
@@ -4647,7 +4665,10 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
4647
4665
  tierMode: json["tier_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tier_mode"]),
4648
4666
  unitPrice: json["unit_price"] == null ? void 0 : json["unit_price"],
4649
4667
  unitPriceDecimal: json["unit_price_decimal"] == null ? void 0 : json["unit_price_decimal"],
4650
- updatedAt: new Date(json["updated_at"])
4668
+ updatedAt: new Date(json["updated_at"]),
4669
+ warningTiers: json["warning_tiers"].map(
4670
+ BillingPlanCreditGrantWarningTierResponseDataFromJSON
4671
+ )
4651
4672
  };
4652
4673
  }
4653
4674
 
@@ -5504,6 +5525,27 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
5504
5525
  };
5505
5526
  }
5506
5527
 
5528
+ // src/api/checkoutexternal/models/CheckoutPriceSnapshotDiscount.ts
5529
+ function CheckoutPriceSnapshotDiscountFromJSON(json) {
5530
+ return CheckoutPriceSnapshotDiscountFromJSONTyped(json, false);
5531
+ }
5532
+ function CheckoutPriceSnapshotDiscountFromJSONTyped(json, ignoreDiscriminator) {
5533
+ if (json == null) {
5534
+ return json;
5535
+ }
5536
+ return {
5537
+ amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
5538
+ couponExternalId: json["coupon_external_id"],
5539
+ couponName: json["coupon_name"],
5540
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5541
+ customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
5542
+ duration: json["duration"],
5543
+ durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
5544
+ percentOff: json["percent_off"] == null ? void 0 : json["percent_off"],
5545
+ promoCodeExternalId: json["promo_code_external_id"] == null ? void 0 : json["promo_code_external_id"]
5546
+ };
5547
+ }
5548
+
5507
5549
  // src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
5508
5550
  function CheckoutPriceSnapshotFromJSON(json) {
5509
5551
  return CheckoutPriceSnapshotFromJSONTyped(json, false);
@@ -5515,6 +5557,10 @@ function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
5515
5557
  return {
5516
5558
  amountOff: json["amount_off"],
5517
5559
  currency: CurrencyFromJSON(json["currency"]),
5560
+ discountAmount: json["discount_amount"],
5561
+ discounts: json["discounts"].map(
5562
+ CheckoutPriceSnapshotDiscountFromJSON
5563
+ ),
5518
5564
  dueNow: json["due_now"],
5519
5565
  isScheduledDowngrade: json["is_scheduled_downgrade"],
5520
5566
  newCharges: json["new_charges"],
@@ -5781,6 +5827,22 @@ function CheckoutUnsubscribeResponseFromJSONTyped(json, ignoreDiscriminator) {
5781
5827
  };
5782
5828
  }
5783
5829
 
5830
+ // src/api/checkoutexternal/models/Collector.ts
5831
+ function CollectorFromJSON(json) {
5832
+ return CollectorFromJSONTyped(json, false);
5833
+ }
5834
+ function CollectorFromJSONTyped(json, ignoreDiscriminator) {
5835
+ return json;
5836
+ }
5837
+
5838
+ // src/api/checkoutexternal/models/PaymentGating.ts
5839
+ function PaymentGatingFromJSON(json) {
5840
+ return PaymentGatingFromJSONTyped(json, false);
5841
+ }
5842
+ function PaymentGatingFromJSONTyped(json, ignoreDiscriminator) {
5843
+ return json;
5844
+ }
5845
+
5784
5846
  // src/api/checkoutexternal/models/CompanyBillingProfileResponseData.ts
5785
5847
  function CompanyBillingProfileResponseDataFromJSON(json) {
5786
5848
  return CompanyBillingProfileResponseDataFromJSONTyped(json, false);
@@ -5795,16 +5857,22 @@ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminato
5795
5857
  collectionMethod: BillingCollectionMethodFromJSON(
5796
5858
  json["collection_method"]
5797
5859
  ),
5860
+ collector: json["collector"] == null ? void 0 : CollectorFromJSON(json["collector"]),
5798
5861
  companyId: json["company_id"],
5799
5862
  createdAt: new Date(json["created_at"]),
5863
+ currency: json["currency"] == null ? void 0 : CurrencyFromJSON(json["currency"]),
5800
5864
  daysUntilDue: json["days_until_due"] == null ? void 0 : json["days_until_due"],
5801
5865
  environmentId: json["environment_id"],
5866
+ gatingDays: json["gating_days"],
5802
5867
  id: json["id"],
5803
5868
  isDefault: json["is_default"],
5804
5869
  name: json["name"] == null ? void 0 : json["name"],
5870
+ overdraftLimit: json["overdraft_limit"] == null ? void 0 : json["overdraft_limit"],
5871
+ paymentGating: PaymentGatingFromJSON(json["payment_gating"]),
5805
5872
  paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
5806
5873
  prorationBehavior: json["proration_behavior"] == null ? void 0 : ProrationBehaviorFromJSON(json["proration_behavior"]),
5807
5874
  providerType: BillingProviderTypeFromJSON(json["provider_type"]),
5875
+ purchaseOrder: json["purchase_order"] == null ? void 0 : json["purchase_order"],
5808
5876
  updatedAt: new Date(json["updated_at"])
5809
5877
  };
5810
5878
  }
@@ -6399,6 +6467,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
6399
6467
  companyId: json["company_id"],
6400
6468
  createdAt: new Date(json["created_at"]),
6401
6469
  daysUntilDue: json["days_until_due"],
6470
+ endDate: json["end_date"] == null ? void 0 : new Date(json["end_date"]),
6402
6471
  externalInvoiceId: json["external_invoice_id"] == null ? void 0 : json["external_invoice_id"],
6403
6472
  id: json["id"],
6404
6473
  migrationId: json["migration_id"] == null ? void 0 : json["migration_id"],
@@ -7274,7 +7343,7 @@ function FlagInPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7274
7343
  }
7275
7344
  return {
7276
7345
  createdAt: new Date(json["created_at"]),
7277
- defaultValue: json["default_value"],
7346
+ defaultValue: json["default_value"] == null ? void 0 : json["default_value"],
7278
7347
  description: json["description"],
7279
7348
  feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
7280
7349
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
@@ -7434,6 +7503,14 @@ function PlanCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator)
7434
7503
  };
7435
7504
  }
7436
7505
 
7506
+ // src/api/checkoutexternal/models/RenewalPolicy.ts
7507
+ function RenewalPolicyFromJSON(json) {
7508
+ return RenewalPolicyFromJSONTyped(json, false);
7509
+ }
7510
+ function RenewalPolicyFromJSONTyped(json, ignoreDiscriminator) {
7511
+ return json;
7512
+ }
7513
+
7437
7514
  // src/api/checkoutexternal/models/PlanVersionResponseData.ts
7438
7515
  function PlanVersionResponseDataFromJSON(json) {
7439
7516
  return PlanVersionResponseDataFromJSONTyped(json, false);
@@ -7451,6 +7528,7 @@ function PlanVersionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
7451
7528
  name: json["name"],
7452
7529
  originalPlanId: json["original_plan_id"] == null ? void 0 : json["original_plan_id"],
7453
7530
  planType: PlanTypeFromJSON(json["plan_type"]),
7531
+ renewalPolicy: RenewalPolicyFromJSON(json["renewal_policy"]),
7454
7532
  status: PlanVersionStatusFromJSON(json["status"]),
7455
7533
  updatedAt: new Date(json["updated_at"]),
7456
7534
  version: json["version"]
@@ -9026,6 +9104,11 @@ var CheckoutexternalApi = class extends BaseAPI {
9026
9104
  const queryParameters = {};
9027
9105
  const headerParameters = {};
9028
9106
  headerParameters["Content-Type"] = "application/json";
9107
+ if (requestParameters["xCheckoutSessionID"] != null) {
9108
+ headerParameters["X-Checkout-Session-ID"] = String(
9109
+ requestParameters["xCheckoutSessionID"]
9110
+ );
9111
+ }
9029
9112
  if (this.configuration && this.configuration.apiKey) {
9030
9113
  headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9031
9114
  "X-Schematic-Api-Key"
@@ -9259,6 +9342,11 @@ var CheckoutexternalApi = class extends BaseAPI {
9259
9342
  const queryParameters = {};
9260
9343
  const headerParameters = {};
9261
9344
  headerParameters["Content-Type"] = "application/json";
9345
+ if (requestParameters["xCheckoutSessionID"] != null) {
9346
+ headerParameters["X-Checkout-Session-ID"] = String(
9347
+ requestParameters["xCheckoutSessionID"]
9348
+ );
9349
+ }
9262
9350
  if (this.configuration && this.configuration.apiKey) {
9263
9351
  headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9264
9352
  "X-Schematic-Api-Key"
@@ -10668,9 +10756,9 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
10668
10756
 
10669
10757
  // src/api/componentspublic/models/Currency.ts
10670
10758
  function CurrencyFromJSON2(json) {
10671
- return CurrencyFromJSONTyped38(json, false);
10759
+ return CurrencyFromJSONTyped40(json, false);
10672
10760
  }
10673
- function CurrencyFromJSONTyped38(json, ignoreDiscriminator) {
10761
+ function CurrencyFromJSONTyped40(json, ignoreDiscriminator) {
10674
10762
  return json;
10675
10763
  }
10676
10764
 
@@ -11058,14 +11146,6 @@ function BillingStrategyFromJSONTyped7(json, ignoreDiscriminator) {
11058
11146
  return json;
11059
11147
  }
11060
11148
 
11061
- // src/api/componentspublic/models/ChargeType.ts
11062
- function ChargeTypeFromJSON2(json) {
11063
- return ChargeTypeFromJSONTyped7(json, false);
11064
- }
11065
- function ChargeTypeFromJSONTyped7(json, ignoreDiscriminator) {
11066
- return json;
11067
- }
11068
-
11069
11149
  // src/api/componentspublic/models/EntitlementValueType.ts
11070
11150
  function EntitlementValueTypeFromJSON2(json) {
11071
11151
  return EntitlementValueTypeFromJSONTyped10(json, false);
@@ -11074,6 +11154,14 @@ function EntitlementValueTypeFromJSONTyped10(json, ignoreDiscriminator) {
11074
11154
  return json;
11075
11155
  }
11076
11156
 
11157
+ // src/api/componentspublic/models/FeatureType.ts
11158
+ function FeatureTypeFromJSON2(json) {
11159
+ return FeatureTypeFromJSONTyped7(json, false);
11160
+ }
11161
+ function FeatureTypeFromJSONTyped7(json, ignoreDiscriminator) {
11162
+ return json;
11163
+ }
11164
+
11077
11165
  // src/api/componentspublic/models/MetricPeriodMonthReset.ts
11078
11166
  function MetricPeriodMonthResetFromJSON2(json) {
11079
11167
  return MetricPeriodMonthResetFromJSONTyped14(json, false);
@@ -11090,6 +11178,30 @@ function MetricPeriodFromJSONTyped14(json, ignoreDiscriminator) {
11090
11178
  return json;
11091
11179
  }
11092
11180
 
11181
+ // src/api/componentspublic/models/EntitlementPriceBehavior.ts
11182
+ function EntitlementPriceBehaviorFromJSON2(json) {
11183
+ return EntitlementPriceBehaviorFromJSONTyped8(json, false);
11184
+ }
11185
+ function EntitlementPriceBehaviorFromJSONTyped8(json, ignoreDiscriminator) {
11186
+ return json;
11187
+ }
11188
+
11189
+ // src/api/componentspublic/models/ChargeType.ts
11190
+ function ChargeTypeFromJSON2(json) {
11191
+ return ChargeTypeFromJSONTyped7(json, false);
11192
+ }
11193
+ function ChargeTypeFromJSONTyped7(json, ignoreDiscriminator) {
11194
+ return json;
11195
+ }
11196
+
11197
+ // src/api/componentspublic/models/PlanPriceCadence.ts
11198
+ function PlanPriceCadenceFromJSON2(json) {
11199
+ return PlanPriceCadenceFromJSONTyped7(json, false);
11200
+ }
11201
+ function PlanPriceCadenceFromJSONTyped7(json, ignoreDiscriminator) {
11202
+ return json;
11203
+ }
11204
+
11093
11205
  // src/api/componentspublic/models/RuleType.ts
11094
11206
  function RuleTypeFromJSON2(json) {
11095
11207
  return RuleTypeFromJSONTyped5(json, false);
@@ -11192,14 +11304,6 @@ function EntitlementCurrencyPricesResponseDataFromJSONTyped3(json, ignoreDiscrim
11192
11304
  };
11193
11305
  }
11194
11306
 
11195
- // src/api/componentspublic/models/EntitlementPriceBehavior.ts
11196
- function EntitlementPriceBehaviorFromJSON2(json) {
11197
- return EntitlementPriceBehaviorFromJSONTyped8(json, false);
11198
- }
11199
- function EntitlementPriceBehaviorFromJSONTyped8(json, ignoreDiscriminator) {
11200
- return json;
11201
- }
11202
-
11203
11307
  // src/api/componentspublic/models/EntityType.ts
11204
11308
  function EntityTypeFromJSON2(json) {
11205
11309
  return EntityTypeFromJSONTyped9(json, false);
@@ -11261,14 +11365,6 @@ function FeatureEventSourceFromJSONTyped4(json, ignoreDiscriminator) {
11261
11365
  return json;
11262
11366
  }
11263
11367
 
11264
- // src/api/componentspublic/models/FeatureType.ts
11265
- function FeatureTypeFromJSON2(json) {
11266
- return FeatureTypeFromJSONTyped7(json, false);
11267
- }
11268
- function FeatureTypeFromJSONTyped7(json, ignoreDiscriminator) {
11269
- return json;
11270
- }
11271
-
11272
11368
  // src/api/componentspublic/models/PreviewObject.ts
11273
11369
  function PreviewObjectFromJSON2(json) {
11274
11370
  return PreviewObjectFromJSONTyped3(json, false);
@@ -11449,7 +11545,7 @@ function FlagInPlanResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
11449
11545
  }
11450
11546
  return {
11451
11547
  createdAt: new Date(json["created_at"]),
11452
- defaultValue: json["default_value"],
11548
+ defaultValue: json["default_value"] == null ? void 0 : json["default_value"],
11453
11549
  description: json["description"],
11454
11550
  feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON2(json["feature"]),
11455
11551
  featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
@@ -11619,14 +11715,6 @@ function PlanEntitlementResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
11619
11715
  };
11620
11716
  }
11621
11717
 
11622
- // src/api/componentspublic/models/PlanPriceCadence.ts
11623
- function PlanPriceCadenceFromJSON2(json) {
11624
- return PlanPriceCadenceFromJSONTyped7(json, false);
11625
- }
11626
- function PlanPriceCadenceFromJSONTyped7(json, ignoreDiscriminator) {
11627
- return json;
11628
- }
11629
-
11630
11718
  // src/api/componentspublic/models/PlanCreditGrantView.ts
11631
11719
  function PlanCreditGrantViewFromJSON2(json) {
11632
11720
  return PlanCreditGrantViewFromJSONTyped3(json, false);
@@ -11722,6 +11810,14 @@ function PlanCurrencyPricesResponseDataFromJSONTyped5(json, ignoreDiscriminator)
11722
11810
  };
11723
11811
  }
11724
11812
 
11813
+ // src/api/componentspublic/models/RenewalPolicy.ts
11814
+ function RenewalPolicyFromJSON2(json) {
11815
+ return RenewalPolicyFromJSONTyped3(json, false);
11816
+ }
11817
+ function RenewalPolicyFromJSONTyped3(json, ignoreDiscriminator) {
11818
+ return json;
11819
+ }
11820
+
11725
11821
  // src/api/componentspublic/models/PlanVersionResponseData.ts
11726
11822
  function PlanVersionResponseDataFromJSON2(json) {
11727
11823
  return PlanVersionResponseDataFromJSONTyped5(json, false);
@@ -11739,6 +11835,7 @@ function PlanVersionResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
11739
11835
  name: json["name"],
11740
11836
  originalPlanId: json["original_plan_id"] == null ? void 0 : json["original_plan_id"],
11741
11837
  planType: PlanTypeFromJSON2(json["plan_type"]),
11838
+ renewalPolicy: RenewalPolicyFromJSON2(json["renewal_policy"]),
11742
11839
  status: PlanVersionStatusFromJSON2(json["status"]),
11743
11840
  updatedAt: new Date(json["updated_at"]),
11744
11841
  version: json["version"]
@@ -17333,7 +17430,7 @@ var reducer = (state, action) => {
17333
17430
  // src/context/EmbedProvider.tsx
17334
17431
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
17335
17432
  var getCustomHeaders = (sessionId) => ({
17336
- "X-Schematic-Components-Version": "2.34.0",
17433
+ "X-Schematic-Components-Version": "2.34.1",
17337
17434
  "X-Schematic-Session-ID": sessionId
17338
17435
  });
17339
17436
  var normalizeCurrencyFilter = (filter2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematichq/schematic-components",
3
- "version": "2.34.0",
3
+ "version": "2.34.1",
4
4
  "main": "dist/schematic-components.cjs.js",
5
5
  "module": "dist/schematic-components.esm.js",
6
6
  "types": "dist/schematic-components.d.ts",