@schematichq/schematic-components 2.26.0 → 2.28.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.
- package/README.md +91 -0
- package/dist/schematic-components-elements.cjs.js +324 -10
- package/dist/schematic-components-elements.d.ts +169 -0
- package/dist/schematic-components-elements.esm.js +317 -2
- package/dist/schematic-components.browser.cjs.js +665 -7
- package/dist/schematic-components.browser.esm.js +665 -7
- package/dist/schematic-components.cjs.js +665 -7
- package/dist/schematic-components.d.ts +34 -0
- package/dist/schematic-components.esm.js +665 -7
- package/package.json +8 -8
|
@@ -1932,6 +1932,7 @@ var initialContext = {
|
|
|
1932
1932
|
hydrate: stub,
|
|
1933
1933
|
hydrateComponent: stub,
|
|
1934
1934
|
hydrateExternal: stub,
|
|
1935
|
+
rehydrateWithParams: stub,
|
|
1935
1936
|
getUpcomingInvoice: stub,
|
|
1936
1937
|
getCustomerBalance: stub,
|
|
1937
1938
|
listInvoices: stub,
|
|
@@ -4738,6 +4739,18 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4738
4739
|
}
|
|
4739
4740
|
|
|
4740
4741
|
// src/api/checkoutexternal/models/UpdatePayInAdvanceRequestBody.ts
|
|
4742
|
+
function UpdatePayInAdvanceRequestBodyFromJSON(json) {
|
|
4743
|
+
return UpdatePayInAdvanceRequestBodyFromJSONTyped(json, false);
|
|
4744
|
+
}
|
|
4745
|
+
function UpdatePayInAdvanceRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4746
|
+
if (json == null) {
|
|
4747
|
+
return json;
|
|
4748
|
+
}
|
|
4749
|
+
return {
|
|
4750
|
+
priceId: json["price_id"],
|
|
4751
|
+
quantity: json["quantity"]
|
|
4752
|
+
};
|
|
4753
|
+
}
|
|
4741
4754
|
function UpdatePayInAdvanceRequestBodyToJSON(json) {
|
|
4742
4755
|
return UpdatePayInAdvanceRequestBodyToJSONTyped(json, false);
|
|
4743
4756
|
}
|
|
@@ -4752,6 +4765,18 @@ function UpdatePayInAdvanceRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4752
4765
|
}
|
|
4753
4766
|
|
|
4754
4767
|
// src/api/checkoutexternal/models/UpdateCreditBundleRequestBody.ts
|
|
4768
|
+
function UpdateCreditBundleRequestBodyFromJSON(json) {
|
|
4769
|
+
return UpdateCreditBundleRequestBodyFromJSONTyped(json, false);
|
|
4770
|
+
}
|
|
4771
|
+
function UpdateCreditBundleRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4772
|
+
if (json == null) {
|
|
4773
|
+
return json;
|
|
4774
|
+
}
|
|
4775
|
+
return {
|
|
4776
|
+
bundleId: json["bundle_id"],
|
|
4777
|
+
quantity: json["quantity"]
|
|
4778
|
+
};
|
|
4779
|
+
}
|
|
4755
4780
|
function UpdateCreditBundleRequestBodyToJSON(json) {
|
|
4756
4781
|
return UpdateCreditBundleRequestBodyToJSONTyped(json, false);
|
|
4757
4782
|
}
|
|
@@ -4766,6 +4791,18 @@ function UpdateCreditBundleRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4766
4791
|
}
|
|
4767
4792
|
|
|
4768
4793
|
// src/api/checkoutexternal/models/CheckoutFieldValue.ts
|
|
4794
|
+
function CheckoutFieldValueFromJSON(json) {
|
|
4795
|
+
return CheckoutFieldValueFromJSONTyped(json, false);
|
|
4796
|
+
}
|
|
4797
|
+
function CheckoutFieldValueFromJSONTyped(json, ignoreDiscriminator) {
|
|
4798
|
+
if (json == null) {
|
|
4799
|
+
return json;
|
|
4800
|
+
}
|
|
4801
|
+
return {
|
|
4802
|
+
id: json["id"],
|
|
4803
|
+
value: json["value"]
|
|
4804
|
+
};
|
|
4805
|
+
}
|
|
4769
4806
|
function CheckoutFieldValueToJSON(json) {
|
|
4770
4807
|
return CheckoutFieldValueToJSONTyped(json, false);
|
|
4771
4808
|
}
|
|
@@ -4780,6 +4817,18 @@ function CheckoutFieldValueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4780
4817
|
}
|
|
4781
4818
|
|
|
4782
4819
|
// src/api/checkoutexternal/models/UpdateAddOnRequestBody.ts
|
|
4820
|
+
function UpdateAddOnRequestBodyFromJSON(json) {
|
|
4821
|
+
return UpdateAddOnRequestBodyFromJSONTyped(json, false);
|
|
4822
|
+
}
|
|
4823
|
+
function UpdateAddOnRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4824
|
+
if (json == null) {
|
|
4825
|
+
return json;
|
|
4826
|
+
}
|
|
4827
|
+
return {
|
|
4828
|
+
addOnId: json["add_on_id"],
|
|
4829
|
+
priceId: json["price_id"]
|
|
4830
|
+
};
|
|
4831
|
+
}
|
|
4783
4832
|
function UpdateAddOnRequestBodyToJSON(json) {
|
|
4784
4833
|
return UpdateAddOnRequestBodyToJSONTyped(json, false);
|
|
4785
4834
|
}
|
|
@@ -4794,6 +4843,20 @@ function UpdateAddOnRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4794
4843
|
}
|
|
4795
4844
|
|
|
4796
4845
|
// src/api/checkoutexternal/models/UpdateAutoTopupOverrideRequestBody.ts
|
|
4846
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSON(json) {
|
|
4847
|
+
return UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, false);
|
|
4848
|
+
}
|
|
4849
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4850
|
+
if (json == null) {
|
|
4851
|
+
return json;
|
|
4852
|
+
}
|
|
4853
|
+
return {
|
|
4854
|
+
autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
|
|
4855
|
+
autoTopupEnabled: json["auto_topup_enabled"] == null ? void 0 : json["auto_topup_enabled"],
|
|
4856
|
+
autoTopupThresholdCredits: json["auto_topup_threshold_credits"] == null ? void 0 : json["auto_topup_threshold_credits"],
|
|
4857
|
+
planCreditGrantId: json["plan_credit_grant_id"]
|
|
4858
|
+
};
|
|
4859
|
+
}
|
|
4797
4860
|
function UpdateAutoTopupOverrideRequestBodyToJSON(json) {
|
|
4798
4861
|
return UpdateAutoTopupOverrideRequestBodyToJSONTyped(json, false);
|
|
4799
4862
|
}
|
|
@@ -4829,6 +4892,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4829
4892
|
credit_bundles: value["creditBundles"].map(
|
|
4830
4893
|
UpdateCreditBundleRequestBodyToJSON
|
|
4831
4894
|
),
|
|
4895
|
+
currency: value["currency"],
|
|
4832
4896
|
custom_field_values: value["customFieldValues"].map(
|
|
4833
4897
|
CheckoutFieldValueToJSON
|
|
4834
4898
|
),
|
|
@@ -4864,6 +4928,143 @@ function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator)
|
|
|
4864
4928
|
return json;
|
|
4865
4929
|
}
|
|
4866
4930
|
|
|
4931
|
+
// src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
|
|
4932
|
+
function CheckoutPriceSnapshotFromJSON(json) {
|
|
4933
|
+
return CheckoutPriceSnapshotFromJSONTyped(json, false);
|
|
4934
|
+
}
|
|
4935
|
+
function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
4936
|
+
if (json == null) {
|
|
4937
|
+
return json;
|
|
4938
|
+
}
|
|
4939
|
+
return {
|
|
4940
|
+
amountOff: json["amount_off"],
|
|
4941
|
+
currency: json["currency"],
|
|
4942
|
+
dueNow: json["due_now"],
|
|
4943
|
+
isScheduledDowngrade: json["is_scheduled_downgrade"],
|
|
4944
|
+
newCharges: json["new_charges"],
|
|
4945
|
+
optInRequired: json["opt_in_required"],
|
|
4946
|
+
paymentMethodRequired: json["payment_method_required"],
|
|
4947
|
+
percentOff: json["percent_off"],
|
|
4948
|
+
periodStart: new Date(json["period_start"]),
|
|
4949
|
+
pricedAt: new Date(json["priced_at"]),
|
|
4950
|
+
promoCodeApplied: json["promo_code_applied"],
|
|
4951
|
+
proration: json["proration"],
|
|
4952
|
+
scheduledChangeTime: json["scheduled_change_time"] == null ? void 0 : new Date(json["scheduled_change_time"]),
|
|
4953
|
+
taxAmount: json["tax_amount"] == null ? void 0 : json["tax_amount"],
|
|
4954
|
+
totalPerBillingPeriod: json["total_per_billing_period"],
|
|
4955
|
+
trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
|
|
4956
|
+
};
|
|
4957
|
+
}
|
|
4958
|
+
|
|
4959
|
+
// src/api/checkoutexternal/models/CheckoutStatus.ts
|
|
4960
|
+
function CheckoutStatusFromJSON(json) {
|
|
4961
|
+
return CheckoutStatusFromJSONTyped(json, false);
|
|
4962
|
+
}
|
|
4963
|
+
function CheckoutStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
4964
|
+
return json;
|
|
4965
|
+
}
|
|
4966
|
+
|
|
4967
|
+
// src/api/checkoutexternal/models/CheckoutSelectionsResponseData.ts
|
|
4968
|
+
function CheckoutSelectionsResponseDataFromJSON(json) {
|
|
4969
|
+
return CheckoutSelectionsResponseDataFromJSONTyped(json, false);
|
|
4970
|
+
}
|
|
4971
|
+
function CheckoutSelectionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
4972
|
+
if (json == null) {
|
|
4973
|
+
return json;
|
|
4974
|
+
}
|
|
4975
|
+
return {
|
|
4976
|
+
addOnIds: json["add_on_ids"].map(
|
|
4977
|
+
UpdateAddOnRequestBodyFromJSON
|
|
4978
|
+
),
|
|
4979
|
+
autoTopupOverrides: json["auto_topup_overrides"].map(
|
|
4980
|
+
UpdateAutoTopupOverrideRequestBodyFromJSON
|
|
4981
|
+
),
|
|
4982
|
+
billingEntityId: json["billing_entity_id"] == null ? void 0 : json["billing_entity_id"],
|
|
4983
|
+
couponExternalId: json["coupon_external_id"] == null ? void 0 : json["coupon_external_id"],
|
|
4984
|
+
creditBundles: json["credit_bundles"].map(
|
|
4985
|
+
UpdateCreditBundleRequestBodyFromJSON
|
|
4986
|
+
),
|
|
4987
|
+
customFieldValues: json["custom_field_values"].map(
|
|
4988
|
+
CheckoutFieldValueFromJSON
|
|
4989
|
+
),
|
|
4990
|
+
newPlanId: json["new_plan_id"] == null ? void 0 : json["new_plan_id"],
|
|
4991
|
+
newPriceId: json["new_price_id"] == null ? void 0 : json["new_price_id"],
|
|
4992
|
+
optInAccepted: json["opt_in_accepted"] == null ? void 0 : json["opt_in_accepted"],
|
|
4993
|
+
payInAdvance: json["pay_in_advance"].map(
|
|
4994
|
+
UpdatePayInAdvanceRequestBodyFromJSON
|
|
4995
|
+
),
|
|
4996
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
4997
|
+
promoCode: json["promo_code"] == null ? void 0 : json["promo_code"],
|
|
4998
|
+
skipTrial: json["skip_trial"]
|
|
4999
|
+
};
|
|
5000
|
+
}
|
|
5001
|
+
|
|
5002
|
+
// src/api/checkoutexternal/models/CheckoutProblemSource.ts
|
|
5003
|
+
function CheckoutProblemSourceFromJSON(json) {
|
|
5004
|
+
return CheckoutProblemSourceFromJSONTyped(json, false);
|
|
5005
|
+
}
|
|
5006
|
+
function CheckoutProblemSourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
5007
|
+
return json;
|
|
5008
|
+
}
|
|
5009
|
+
|
|
5010
|
+
// src/api/checkoutexternal/models/CheckoutProblemCode.ts
|
|
5011
|
+
function CheckoutProblemCodeFromJSON(json) {
|
|
5012
|
+
return CheckoutProblemCodeFromJSONTyped(json, false);
|
|
5013
|
+
}
|
|
5014
|
+
function CheckoutProblemCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5015
|
+
return json;
|
|
5016
|
+
}
|
|
5017
|
+
|
|
5018
|
+
// src/api/checkoutexternal/models/Problem.ts
|
|
5019
|
+
function ProblemFromJSON(json) {
|
|
5020
|
+
return ProblemFromJSONTyped(json, false);
|
|
5021
|
+
}
|
|
5022
|
+
function ProblemFromJSONTyped(json, ignoreDiscriminator) {
|
|
5023
|
+
if (json == null) {
|
|
5024
|
+
return json;
|
|
5025
|
+
}
|
|
5026
|
+
return {
|
|
5027
|
+
blocking: json["blocking"],
|
|
5028
|
+
bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
|
|
5029
|
+
code: CheckoutProblemCodeFromJSON(json["code"]),
|
|
5030
|
+
currency: json["currency"] == null ? void 0 : json["currency"],
|
|
5031
|
+
detail: json["detail"] == null ? void 0 : json["detail"],
|
|
5032
|
+
featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
|
|
5033
|
+
fieldId: json["field_id"] == null ? void 0 : json["field_id"],
|
|
5034
|
+
message: json["message"],
|
|
5035
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
5036
|
+
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
5037
|
+
priceId: json["price_id"] == null ? void 0 : json["price_id"],
|
|
5038
|
+
source: CheckoutProblemSourceFromJSON(json["source"])
|
|
5039
|
+
};
|
|
5040
|
+
}
|
|
5041
|
+
|
|
5042
|
+
// src/api/checkoutexternal/models/CheckoutDraftResponseData.ts
|
|
5043
|
+
function CheckoutDraftResponseDataFromJSON(json) {
|
|
5044
|
+
return CheckoutDraftResponseDataFromJSONTyped(json, false);
|
|
5045
|
+
}
|
|
5046
|
+
function CheckoutDraftResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5047
|
+
if (json == null) {
|
|
5048
|
+
return json;
|
|
5049
|
+
}
|
|
5050
|
+
return {
|
|
5051
|
+
companyId: json["company_id"],
|
|
5052
|
+
completedAt: json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
|
|
5053
|
+
createdAt: new Date(json["created_at"]),
|
|
5054
|
+
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
5055
|
+
id: json["id"],
|
|
5056
|
+
lastActivityAt: new Date(json["last_activity_at"]),
|
|
5057
|
+
priceSnapshot: json["price_snapshot"] == null ? void 0 : CheckoutPriceSnapshotFromJSON(json["price_snapshot"]),
|
|
5058
|
+
pricedAt: json["priced_at"] == null ? void 0 : new Date(json["priced_at"]),
|
|
5059
|
+
problems: json["problems"].map(ProblemFromJSON),
|
|
5060
|
+
selections: CheckoutSelectionsResponseDataFromJSON(json["selections"]),
|
|
5061
|
+
shareToken: json["share_token"] == null ? void 0 : json["share_token"],
|
|
5062
|
+
status: CheckoutStatusFromJSON(json["status"]),
|
|
5063
|
+
updatedAt: new Date(json["updated_at"]),
|
|
5064
|
+
version: json["version"]
|
|
5065
|
+
};
|
|
5066
|
+
}
|
|
5067
|
+
|
|
4867
5068
|
// src/api/checkoutexternal/models/CheckoutFieldWithValue.ts
|
|
4868
5069
|
function CheckoutFieldWithValueFromJSON(json) {
|
|
4869
5070
|
return CheckoutFieldWithValueFromJSONTyped(json, false);
|
|
@@ -6875,6 +7076,57 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6875
7076
|
};
|
|
6876
7077
|
}
|
|
6877
7078
|
|
|
7079
|
+
// src/api/checkoutexternal/models/CreateCheckoutRequest.ts
|
|
7080
|
+
function CreateCheckoutRequestToJSON(json) {
|
|
7081
|
+
return CreateCheckoutRequestToJSONTyped(json, false);
|
|
7082
|
+
}
|
|
7083
|
+
function CreateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7084
|
+
if (value == null) {
|
|
7085
|
+
return value;
|
|
7086
|
+
}
|
|
7087
|
+
return {
|
|
7088
|
+
add_on_ids: value["addOnIds"].map(
|
|
7089
|
+
UpdateAddOnRequestBodyToJSON
|
|
7090
|
+
),
|
|
7091
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7092
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7093
|
+
),
|
|
7094
|
+
billing_entity_id: value["billingEntityId"],
|
|
7095
|
+
company_id: value["companyId"],
|
|
7096
|
+
coupon_external_id: value["couponExternalId"],
|
|
7097
|
+
credit_bundles: value["creditBundles"].map(
|
|
7098
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7099
|
+
),
|
|
7100
|
+
currency: value["currency"],
|
|
7101
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7102
|
+
CheckoutFieldValueToJSON
|
|
7103
|
+
),
|
|
7104
|
+
new_plan_id: value["newPlanId"],
|
|
7105
|
+
new_price_id: value["newPriceId"],
|
|
7106
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7107
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7108
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7109
|
+
),
|
|
7110
|
+
payment_method_id: value["paymentMethodId"],
|
|
7111
|
+
promo_code: value["promoCode"],
|
|
7112
|
+
skip_trial: value["skipTrial"]
|
|
7113
|
+
};
|
|
7114
|
+
}
|
|
7115
|
+
|
|
7116
|
+
// src/api/checkoutexternal/models/CreateCheckoutResponse.ts
|
|
7117
|
+
function CreateCheckoutResponseFromJSON(json) {
|
|
7118
|
+
return CreateCheckoutResponseFromJSONTyped(json, false);
|
|
7119
|
+
}
|
|
7120
|
+
function CreateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7121
|
+
if (json == null) {
|
|
7122
|
+
return json;
|
|
7123
|
+
}
|
|
7124
|
+
return {
|
|
7125
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7126
|
+
params: json["params"]
|
|
7127
|
+
};
|
|
7128
|
+
}
|
|
7129
|
+
|
|
6878
7130
|
// src/api/checkoutexternal/models/SetupIntentResponseData.ts
|
|
6879
7131
|
function SetupIntentResponseDataFromJSON(json) {
|
|
6880
7132
|
return SetupIntentResponseDataFromJSONTyped(json, false);
|
|
@@ -7030,6 +7282,47 @@ function FetchCustomerBalanceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7030
7282
|
};
|
|
7031
7283
|
}
|
|
7032
7284
|
|
|
7285
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutRequest.ts
|
|
7286
|
+
function FinalizeCheckoutRequestToJSON(json) {
|
|
7287
|
+
return FinalizeCheckoutRequestToJSONTyped(json, false);
|
|
7288
|
+
}
|
|
7289
|
+
function FinalizeCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7290
|
+
if (value == null) {
|
|
7291
|
+
return value;
|
|
7292
|
+
}
|
|
7293
|
+
return {
|
|
7294
|
+
version: value["version"]
|
|
7295
|
+
};
|
|
7296
|
+
}
|
|
7297
|
+
|
|
7298
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutResponse.ts
|
|
7299
|
+
function FinalizeCheckoutResponseFromJSON(json) {
|
|
7300
|
+
return FinalizeCheckoutResponseFromJSONTyped(json, false);
|
|
7301
|
+
}
|
|
7302
|
+
function FinalizeCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7303
|
+
if (json == null) {
|
|
7304
|
+
return json;
|
|
7305
|
+
}
|
|
7306
|
+
return {
|
|
7307
|
+
data: CheckoutResponseDataFromJSON(json["data"]),
|
|
7308
|
+
params: json["params"]
|
|
7309
|
+
};
|
|
7310
|
+
}
|
|
7311
|
+
|
|
7312
|
+
// src/api/checkoutexternal/models/GetCheckoutResponse.ts
|
|
7313
|
+
function GetCheckoutResponseFromJSON(json) {
|
|
7314
|
+
return GetCheckoutResponseFromJSONTyped(json, false);
|
|
7315
|
+
}
|
|
7316
|
+
function GetCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7317
|
+
if (json == null) {
|
|
7318
|
+
return json;
|
|
7319
|
+
}
|
|
7320
|
+
return {
|
|
7321
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7322
|
+
params: json["params"]
|
|
7323
|
+
};
|
|
7324
|
+
}
|
|
7325
|
+
|
|
7033
7326
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDResponseData.ts
|
|
7034
7327
|
function UpdateCheckoutTaxIDResponseDataFromJSON(json) {
|
|
7035
7328
|
return UpdateCheckoutTaxIDResponseDataFromJSONTyped(json, false);
|
|
@@ -7179,7 +7472,8 @@ function HydrateComponentParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7179
7472
|
return json;
|
|
7180
7473
|
}
|
|
7181
7474
|
return {
|
|
7182
|
-
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"]
|
|
7475
|
+
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"],
|
|
7476
|
+
includeAddOnIds: json["include_add_on_ids"] == null ? void 0 : json["include_add_on_ids"]
|
|
7183
7477
|
};
|
|
7184
7478
|
}
|
|
7185
7479
|
|
|
@@ -7238,6 +7532,36 @@ function HydrateUpcomingInvoiceResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
7238
7532
|
};
|
|
7239
7533
|
}
|
|
7240
7534
|
|
|
7535
|
+
// src/api/checkoutexternal/models/ListCheckoutsParams.ts
|
|
7536
|
+
function ListCheckoutsParamsFromJSON(json) {
|
|
7537
|
+
return ListCheckoutsParamsFromJSONTyped(json, false);
|
|
7538
|
+
}
|
|
7539
|
+
function ListCheckoutsParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
7540
|
+
if (json == null) {
|
|
7541
|
+
return json;
|
|
7542
|
+
}
|
|
7543
|
+
return {
|
|
7544
|
+
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
7545
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
7546
|
+
offset: json["offset"] == null ? void 0 : json["offset"],
|
|
7547
|
+
statuses: json["statuses"] == null ? void 0 : json["statuses"].map(CheckoutStatusFromJSON)
|
|
7548
|
+
};
|
|
7549
|
+
}
|
|
7550
|
+
|
|
7551
|
+
// src/api/checkoutexternal/models/ListCheckoutsResponse.ts
|
|
7552
|
+
function ListCheckoutsResponseFromJSON(json) {
|
|
7553
|
+
return ListCheckoutsResponseFromJSONTyped(json, false);
|
|
7554
|
+
}
|
|
7555
|
+
function ListCheckoutsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7556
|
+
if (json == null) {
|
|
7557
|
+
return json;
|
|
7558
|
+
}
|
|
7559
|
+
return {
|
|
7560
|
+
data: json["data"].map(CheckoutDraftResponseDataFromJSON),
|
|
7561
|
+
params: ListCheckoutsParamsFromJSON(json["params"])
|
|
7562
|
+
};
|
|
7563
|
+
}
|
|
7564
|
+
|
|
7241
7565
|
// src/api/checkoutexternal/models/ListInvoicesParams.ts
|
|
7242
7566
|
function ListInvoicesParamsFromJSON(json) {
|
|
7243
7567
|
return ListInvoicesParamsFromJSONTyped(json, false);
|
|
@@ -7316,6 +7640,7 @@ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscrim
|
|
|
7316
7640
|
}
|
|
7317
7641
|
return {
|
|
7318
7642
|
amountOff: json["amount_off"],
|
|
7643
|
+
currency: json["currency"],
|
|
7319
7644
|
discountAmount: json["discount_amount"],
|
|
7320
7645
|
discounts: json["discounts"].map(
|
|
7321
7646
|
PreviewSubscriptionDiscountResponseDataFromJSON
|
|
@@ -7440,6 +7765,57 @@ function UpdateCheckoutFieldValuesResponseFromJSONTyped(json, ignoreDiscriminato
|
|
|
7440
7765
|
};
|
|
7441
7766
|
}
|
|
7442
7767
|
|
|
7768
|
+
// src/api/checkoutexternal/models/UpdateCheckoutRequest.ts
|
|
7769
|
+
function UpdateCheckoutRequestToJSON(json) {
|
|
7770
|
+
return UpdateCheckoutRequestToJSONTyped(json, false);
|
|
7771
|
+
}
|
|
7772
|
+
function UpdateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7773
|
+
if (value == null) {
|
|
7774
|
+
return value;
|
|
7775
|
+
}
|
|
7776
|
+
return {
|
|
7777
|
+
add_on_ids: value["addOnIds"].map(
|
|
7778
|
+
UpdateAddOnRequestBodyToJSON
|
|
7779
|
+
),
|
|
7780
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7781
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7782
|
+
),
|
|
7783
|
+
billing_entity_id: value["billingEntityId"],
|
|
7784
|
+
coupon_external_id: value["couponExternalId"],
|
|
7785
|
+
credit_bundles: value["creditBundles"].map(
|
|
7786
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7787
|
+
),
|
|
7788
|
+
currency: value["currency"],
|
|
7789
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7790
|
+
CheckoutFieldValueToJSON
|
|
7791
|
+
),
|
|
7792
|
+
new_plan_id: value["newPlanId"],
|
|
7793
|
+
new_price_id: value["newPriceId"],
|
|
7794
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7795
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7796
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7797
|
+
),
|
|
7798
|
+
payment_method_id: value["paymentMethodId"],
|
|
7799
|
+
promo_code: value["promoCode"],
|
|
7800
|
+
skip_trial: value["skipTrial"],
|
|
7801
|
+
version: value["version"]
|
|
7802
|
+
};
|
|
7803
|
+
}
|
|
7804
|
+
|
|
7805
|
+
// src/api/checkoutexternal/models/UpdateCheckoutResponse.ts
|
|
7806
|
+
function UpdateCheckoutResponseFromJSON(json) {
|
|
7807
|
+
return UpdateCheckoutResponseFromJSONTyped(json, false);
|
|
7808
|
+
}
|
|
7809
|
+
function UpdateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7810
|
+
if (json == null) {
|
|
7811
|
+
return json;
|
|
7812
|
+
}
|
|
7813
|
+
return {
|
|
7814
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7815
|
+
params: json["params"]
|
|
7816
|
+
};
|
|
7817
|
+
}
|
|
7818
|
+
|
|
7443
7819
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDRequestBody.ts
|
|
7444
7820
|
function UpdateCheckoutTaxIDRequestBodyToJSON(json) {
|
|
7445
7821
|
return UpdateCheckoutTaxIDRequestBodyToJSONTyped(json, false);
|
|
@@ -7570,6 +7946,51 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7570
7946
|
const response = await this.checkoutUnsubscribeRaw(initOverrides);
|
|
7571
7947
|
return await response.value();
|
|
7572
7948
|
}
|
|
7949
|
+
/**
|
|
7950
|
+
* Create checkout
|
|
7951
|
+
*/
|
|
7952
|
+
async createCheckoutRaw(requestParameters, initOverrides) {
|
|
7953
|
+
if (requestParameters["createCheckoutRequest"] == null) {
|
|
7954
|
+
throw new RequiredError(
|
|
7955
|
+
"createCheckoutRequest",
|
|
7956
|
+
'Required parameter "createCheckoutRequest" was null or undefined when calling createCheckout().'
|
|
7957
|
+
);
|
|
7958
|
+
}
|
|
7959
|
+
const queryParameters = {};
|
|
7960
|
+
const headerParameters = {};
|
|
7961
|
+
headerParameters["Content-Type"] = "application/json";
|
|
7962
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
7963
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
7964
|
+
"X-Schematic-Api-Key"
|
|
7965
|
+
);
|
|
7966
|
+
}
|
|
7967
|
+
const response = await this.request(
|
|
7968
|
+
{
|
|
7969
|
+
path: `/checkouts`,
|
|
7970
|
+
method: "POST",
|
|
7971
|
+
headers: headerParameters,
|
|
7972
|
+
query: queryParameters,
|
|
7973
|
+
body: CreateCheckoutRequestToJSON(
|
|
7974
|
+
requestParameters["createCheckoutRequest"]
|
|
7975
|
+
)
|
|
7976
|
+
},
|
|
7977
|
+
initOverrides
|
|
7978
|
+
);
|
|
7979
|
+
return new JSONApiResponse(
|
|
7980
|
+
response,
|
|
7981
|
+
(jsonValue) => CreateCheckoutResponseFromJSON(jsonValue)
|
|
7982
|
+
);
|
|
7983
|
+
}
|
|
7984
|
+
/**
|
|
7985
|
+
* Create checkout
|
|
7986
|
+
*/
|
|
7987
|
+
async createCheckout(requestParameters, initOverrides) {
|
|
7988
|
+
const response = await this.createCheckoutRaw(
|
|
7989
|
+
requestParameters,
|
|
7990
|
+
initOverrides
|
|
7991
|
+
);
|
|
7992
|
+
return await response.value();
|
|
7993
|
+
}
|
|
7573
7994
|
/**
|
|
7574
7995
|
* Create setup intent
|
|
7575
7996
|
*/
|
|
@@ -7678,6 +8099,104 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7678
8099
|
const response = await this.fetchCustomerBalanceRaw(initOverrides);
|
|
7679
8100
|
return await response.value();
|
|
7680
8101
|
}
|
|
8102
|
+
/**
|
|
8103
|
+
* Finalize checkout
|
|
8104
|
+
*/
|
|
8105
|
+
async finalizeCheckoutRaw(requestParameters, initOverrides) {
|
|
8106
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8107
|
+
throw new RequiredError(
|
|
8108
|
+
"checkoutId",
|
|
8109
|
+
'Required parameter "checkoutId" was null or undefined when calling finalizeCheckout().'
|
|
8110
|
+
);
|
|
8111
|
+
}
|
|
8112
|
+
if (requestParameters["finalizeCheckoutRequest"] == null) {
|
|
8113
|
+
throw new RequiredError(
|
|
8114
|
+
"finalizeCheckoutRequest",
|
|
8115
|
+
'Required parameter "finalizeCheckoutRequest" was null or undefined when calling finalizeCheckout().'
|
|
8116
|
+
);
|
|
8117
|
+
}
|
|
8118
|
+
const queryParameters = {};
|
|
8119
|
+
const headerParameters = {};
|
|
8120
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8121
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8122
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8123
|
+
"X-Schematic-Api-Key"
|
|
8124
|
+
);
|
|
8125
|
+
}
|
|
8126
|
+
const response = await this.request(
|
|
8127
|
+
{
|
|
8128
|
+
path: `/checkouts/{checkout_id}/finalize`.replace(
|
|
8129
|
+
`{${"checkout_id"}}`,
|
|
8130
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8131
|
+
),
|
|
8132
|
+
method: "POST",
|
|
8133
|
+
headers: headerParameters,
|
|
8134
|
+
query: queryParameters,
|
|
8135
|
+
body: FinalizeCheckoutRequestToJSON(
|
|
8136
|
+
requestParameters["finalizeCheckoutRequest"]
|
|
8137
|
+
)
|
|
8138
|
+
},
|
|
8139
|
+
initOverrides
|
|
8140
|
+
);
|
|
8141
|
+
return new JSONApiResponse(
|
|
8142
|
+
response,
|
|
8143
|
+
(jsonValue) => FinalizeCheckoutResponseFromJSON(jsonValue)
|
|
8144
|
+
);
|
|
8145
|
+
}
|
|
8146
|
+
/**
|
|
8147
|
+
* Finalize checkout
|
|
8148
|
+
*/
|
|
8149
|
+
async finalizeCheckout(requestParameters, initOverrides) {
|
|
8150
|
+
const response = await this.finalizeCheckoutRaw(
|
|
8151
|
+
requestParameters,
|
|
8152
|
+
initOverrides
|
|
8153
|
+
);
|
|
8154
|
+
return await response.value();
|
|
8155
|
+
}
|
|
8156
|
+
/**
|
|
8157
|
+
* Get checkout
|
|
8158
|
+
*/
|
|
8159
|
+
async getCheckoutRaw(requestParameters, initOverrides) {
|
|
8160
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8161
|
+
throw new RequiredError(
|
|
8162
|
+
"checkoutId",
|
|
8163
|
+
'Required parameter "checkoutId" was null or undefined when calling getCheckout().'
|
|
8164
|
+
);
|
|
8165
|
+
}
|
|
8166
|
+
const queryParameters = {};
|
|
8167
|
+
const headerParameters = {};
|
|
8168
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8169
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8170
|
+
"X-Schematic-Api-Key"
|
|
8171
|
+
);
|
|
8172
|
+
}
|
|
8173
|
+
const response = await this.request(
|
|
8174
|
+
{
|
|
8175
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8176
|
+
`{${"checkout_id"}}`,
|
|
8177
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8178
|
+
),
|
|
8179
|
+
method: "GET",
|
|
8180
|
+
headers: headerParameters,
|
|
8181
|
+
query: queryParameters
|
|
8182
|
+
},
|
|
8183
|
+
initOverrides
|
|
8184
|
+
);
|
|
8185
|
+
return new JSONApiResponse(
|
|
8186
|
+
response,
|
|
8187
|
+
(jsonValue) => GetCheckoutResponseFromJSON(jsonValue)
|
|
8188
|
+
);
|
|
8189
|
+
}
|
|
8190
|
+
/**
|
|
8191
|
+
* Get checkout
|
|
8192
|
+
*/
|
|
8193
|
+
async getCheckout(requestParameters, initOverrides) {
|
|
8194
|
+
const response = await this.getCheckoutRaw(
|
|
8195
|
+
requestParameters,
|
|
8196
|
+
initOverrides
|
|
8197
|
+
);
|
|
8198
|
+
return await response.value();
|
|
8199
|
+
}
|
|
7681
8200
|
/**
|
|
7682
8201
|
* Get checkout tax ID
|
|
7683
8202
|
*/
|
|
@@ -7986,6 +8505,9 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7986
8505
|
if (requestParameters["catalogId"] != null) {
|
|
7987
8506
|
queryParameters["catalog_id"] = requestParameters["catalogId"];
|
|
7988
8507
|
}
|
|
8508
|
+
if (requestParameters["includeAddOnIds"] != null) {
|
|
8509
|
+
queryParameters["include_add_on_ids"] = requestParameters["includeAddOnIds"];
|
|
8510
|
+
}
|
|
7989
8511
|
const headerParameters = {};
|
|
7990
8512
|
if (this.configuration && this.configuration.apiKey) {
|
|
7991
8513
|
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
@@ -8063,6 +8585,53 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8063
8585
|
);
|
|
8064
8586
|
return await response.value();
|
|
8065
8587
|
}
|
|
8588
|
+
/**
|
|
8589
|
+
* List checkouts
|
|
8590
|
+
*/
|
|
8591
|
+
async listCheckoutsRaw(requestParameters, initOverrides) {
|
|
8592
|
+
const queryParameters = {};
|
|
8593
|
+
if (requestParameters["companyId"] != null) {
|
|
8594
|
+
queryParameters["company_id"] = requestParameters["companyId"];
|
|
8595
|
+
}
|
|
8596
|
+
if (requestParameters["statuses"] != null) {
|
|
8597
|
+
queryParameters["statuses"] = requestParameters["statuses"];
|
|
8598
|
+
}
|
|
8599
|
+
if (requestParameters["limit"] != null) {
|
|
8600
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
8601
|
+
}
|
|
8602
|
+
if (requestParameters["offset"] != null) {
|
|
8603
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
8604
|
+
}
|
|
8605
|
+
const headerParameters = {};
|
|
8606
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8607
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8608
|
+
"X-Schematic-Api-Key"
|
|
8609
|
+
);
|
|
8610
|
+
}
|
|
8611
|
+
const response = await this.request(
|
|
8612
|
+
{
|
|
8613
|
+
path: `/checkouts`,
|
|
8614
|
+
method: "GET",
|
|
8615
|
+
headers: headerParameters,
|
|
8616
|
+
query: queryParameters
|
|
8617
|
+
},
|
|
8618
|
+
initOverrides
|
|
8619
|
+
);
|
|
8620
|
+
return new JSONApiResponse(
|
|
8621
|
+
response,
|
|
8622
|
+
(jsonValue) => ListCheckoutsResponseFromJSON(jsonValue)
|
|
8623
|
+
);
|
|
8624
|
+
}
|
|
8625
|
+
/**
|
|
8626
|
+
* List checkouts
|
|
8627
|
+
*/
|
|
8628
|
+
async listCheckouts(requestParameters = {}, initOverrides) {
|
|
8629
|
+
const response = await this.listCheckoutsRaw(
|
|
8630
|
+
requestParameters,
|
|
8631
|
+
initOverrides
|
|
8632
|
+
);
|
|
8633
|
+
return await response.value();
|
|
8634
|
+
}
|
|
8066
8635
|
/**
|
|
8067
8636
|
* List invoices
|
|
8068
8637
|
*/
|
|
@@ -8149,6 +8718,60 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8149
8718
|
);
|
|
8150
8719
|
return await response.value();
|
|
8151
8720
|
}
|
|
8721
|
+
/**
|
|
8722
|
+
* Update checkout
|
|
8723
|
+
*/
|
|
8724
|
+
async updateCheckoutRaw(requestParameters, initOverrides) {
|
|
8725
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8726
|
+
throw new RequiredError(
|
|
8727
|
+
"checkoutId",
|
|
8728
|
+
'Required parameter "checkoutId" was null or undefined when calling updateCheckout().'
|
|
8729
|
+
);
|
|
8730
|
+
}
|
|
8731
|
+
if (requestParameters["updateCheckoutRequest"] == null) {
|
|
8732
|
+
throw new RequiredError(
|
|
8733
|
+
"updateCheckoutRequest",
|
|
8734
|
+
'Required parameter "updateCheckoutRequest" was null or undefined when calling updateCheckout().'
|
|
8735
|
+
);
|
|
8736
|
+
}
|
|
8737
|
+
const queryParameters = {};
|
|
8738
|
+
const headerParameters = {};
|
|
8739
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8740
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8741
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8742
|
+
"X-Schematic-Api-Key"
|
|
8743
|
+
);
|
|
8744
|
+
}
|
|
8745
|
+
const response = await this.request(
|
|
8746
|
+
{
|
|
8747
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8748
|
+
`{${"checkout_id"}}`,
|
|
8749
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8750
|
+
),
|
|
8751
|
+
method: "PUT",
|
|
8752
|
+
headers: headerParameters,
|
|
8753
|
+
query: queryParameters,
|
|
8754
|
+
body: UpdateCheckoutRequestToJSON(
|
|
8755
|
+
requestParameters["updateCheckoutRequest"]
|
|
8756
|
+
)
|
|
8757
|
+
},
|
|
8758
|
+
initOverrides
|
|
8759
|
+
);
|
|
8760
|
+
return new JSONApiResponse(
|
|
8761
|
+
response,
|
|
8762
|
+
(jsonValue) => UpdateCheckoutResponseFromJSON(jsonValue)
|
|
8763
|
+
);
|
|
8764
|
+
}
|
|
8765
|
+
/**
|
|
8766
|
+
* Update checkout
|
|
8767
|
+
*/
|
|
8768
|
+
async updateCheckout(requestParameters, initOverrides) {
|
|
8769
|
+
const response = await this.updateCheckoutRaw(
|
|
8770
|
+
requestParameters,
|
|
8771
|
+
initOverrides
|
|
8772
|
+
);
|
|
8773
|
+
return await response.value();
|
|
8774
|
+
}
|
|
8152
8775
|
/**
|
|
8153
8776
|
* Update checkout field values
|
|
8154
8777
|
*/
|
|
@@ -12929,6 +13552,12 @@ function getSubscriptionPeriod(billingSubscription) {
|
|
|
12929
13552
|
);
|
|
12930
13553
|
return derivePeriod(product?.interval, product?.intervalCount) ?? derivePeriod(billingSubscription.interval);
|
|
12931
13554
|
}
|
|
13555
|
+
function getDefaultPlanPeriod(plans = []) {
|
|
13556
|
+
if (plans.some((plan) => plan.monthlyPrice)) return "month";
|
|
13557
|
+
if (plans.some((plan) => plan.quarterlyPrice)) return "quarter";
|
|
13558
|
+
if (plans.some((plan) => plan.yearlyPrice)) return "year";
|
|
13559
|
+
return "month";
|
|
13560
|
+
}
|
|
12932
13561
|
var ChargeType = {
|
|
12933
13562
|
oneTime: "one_time",
|
|
12934
13563
|
recurring: "recurring",
|
|
@@ -14796,7 +15425,7 @@ var reducer = (state, action) => {
|
|
|
14796
15425
|
// src/context/EmbedProvider.tsx
|
|
14797
15426
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
14798
15427
|
var getCustomHeaders = (sessionId) => ({
|
|
14799
|
-
"X-Schematic-Components-Version": "2.
|
|
15428
|
+
"X-Schematic-Components-Version": "2.28.0",
|
|
14800
15429
|
"X-Schematic-Session-ID": sessionId
|
|
14801
15430
|
});
|
|
14802
15431
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -14994,6 +15623,34 @@ var EmbedProvider = ({
|
|
|
14994
15623
|
),
|
|
14995
15624
|
[hydrateExternal]
|
|
14996
15625
|
);
|
|
15626
|
+
const rehydrateWithParams = useCallback2(
|
|
15627
|
+
async (params) => {
|
|
15628
|
+
const componentId = state.data?.component?.id;
|
|
15629
|
+
if (!componentId || !checkoutApi) {
|
|
15630
|
+
throw new Error(
|
|
15631
|
+
"[Schematic] `rehydrateWithParams` needs a `SchematicEmbed` that has loaded."
|
|
15632
|
+
);
|
|
15633
|
+
}
|
|
15634
|
+
const response = await checkoutApi.hydrateComponent({
|
|
15635
|
+
componentId,
|
|
15636
|
+
includeAddOnIds: params.includeAddOnIds
|
|
15637
|
+
});
|
|
15638
|
+
const returnedIds = new Set(
|
|
15639
|
+
response.data.activeAddOns.map((addOn) => addOn.id)
|
|
15640
|
+
);
|
|
15641
|
+
const missingIds = (params.includeAddOnIds ?? []).filter(
|
|
15642
|
+
(id) => !returnedIds.has(id)
|
|
15643
|
+
);
|
|
15644
|
+
if (missingIds.length > 0) {
|
|
15645
|
+
console.warn(
|
|
15646
|
+
`[Schematic] These included add-ons were left out because each must be an add-on with a billing product: ${missingIds.join(", ")}`
|
|
15647
|
+
);
|
|
15648
|
+
}
|
|
15649
|
+
dispatch({ type: "HYDRATE_COMPONENT", data: response.data });
|
|
15650
|
+
return response.data;
|
|
15651
|
+
},
|
|
15652
|
+
[checkoutApi, state.data?.component?.id]
|
|
15653
|
+
);
|
|
14997
15654
|
const createSetupIntent = useCallback2(async () => {
|
|
14998
15655
|
return checkoutApi?.createSetupIntent();
|
|
14999
15656
|
}, [checkoutApi]);
|
|
@@ -15337,6 +15994,7 @@ var EmbedProvider = ({
|
|
|
15337
15994
|
hydrate: debouncedHydrate,
|
|
15338
15995
|
hydrateComponent: debouncedHydrateComponent,
|
|
15339
15996
|
hydrateExternal: debouncedHydrateExternal,
|
|
15997
|
+
rehydrateWithParams,
|
|
15340
15998
|
createSetupIntent: debouncedCreateSetupIntent,
|
|
15341
15999
|
updatePaymentMethod: debouncedUpdatePaymentMethod,
|
|
15342
16000
|
deletePaymentMethod: debouncedDeletePaymentMethod,
|
|
@@ -19124,7 +19782,7 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19124
19782
|
[data?.featureUsage?.features]
|
|
19125
19783
|
);
|
|
19126
19784
|
const getValidatedPeriod = () => {
|
|
19127
|
-
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
19785
|
+
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans);
|
|
19128
19786
|
if (checkoutState?.planId) {
|
|
19129
19787
|
const requestedPlan = data?.activePlans?.find(
|
|
19130
19788
|
(plan) => plan.id === checkoutState.planId
|
|
@@ -25553,7 +26211,7 @@ PaymentMethod.displayName = "PaymentMethod";
|
|
|
25553
26211
|
// src/components/elements/payment-method/PaymentMethodDetails.tsx
|
|
25554
26212
|
import { Elements } from "@stripe/react-stripe-js";
|
|
25555
26213
|
|
|
25556
|
-
// node_modules/.pnpm/@stripe+stripe-js@9.
|
|
26214
|
+
// node_modules/.pnpm/@stripe+stripe-js@9.17.0/node_modules/@stripe/stripe-js/dist/index.mjs
|
|
25557
26215
|
function _typeof(obj) {
|
|
25558
26216
|
"@babel/helpers - typeof";
|
|
25559
26217
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -25607,7 +26265,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
|
|
|
25607
26265
|
}
|
|
25608
26266
|
stripe._registerWrapper({
|
|
25609
26267
|
name: "stripe-js",
|
|
25610
|
-
version: "9.
|
|
26268
|
+
version: "9.17.0",
|
|
25611
26269
|
startTime
|
|
25612
26270
|
});
|
|
25613
26271
|
};
|
|
@@ -25685,7 +26343,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
|
|
|
25685
26343
|
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
25686
26344
|
var expectedVersion = RELEASE_TRAIN;
|
|
25687
26345
|
if (isTestKey && version !== expectedVersion) {
|
|
25688
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
26346
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
25689
26347
|
}
|
|
25690
26348
|
var stripe = maybeStripe.apply(void 0, args);
|
|
25691
26349
|
registerWrapper(stripe, startTime);
|
|
@@ -27938,7 +28596,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
|
|
|
27938
28596
|
[]
|
|
27939
28597
|
);
|
|
27940
28598
|
const [selectedPeriod, setSelectedPeriod] = useState21(
|
|
27941
|
-
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
28599
|
+
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans)
|
|
27942
28600
|
);
|
|
27943
28601
|
const { currencies, invalidFilterEntries } = useAvailableCurrenciesWithInvalid();
|
|
27944
28602
|
const [selectedCurrency, setSelectedCurrency] = useState21(
|