@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
|
@@ -2028,6 +2028,7 @@ var initialContext = {
|
|
|
2028
2028
|
hydrate: stub,
|
|
2029
2029
|
hydrateComponent: stub,
|
|
2030
2030
|
hydrateExternal: stub,
|
|
2031
|
+
rehydrateWithParams: stub,
|
|
2031
2032
|
getUpcomingInvoice: stub,
|
|
2032
2033
|
getCustomerBalance: stub,
|
|
2033
2034
|
listInvoices: stub,
|
|
@@ -4834,6 +4835,18 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4834
4835
|
}
|
|
4835
4836
|
|
|
4836
4837
|
// src/api/checkoutexternal/models/UpdatePayInAdvanceRequestBody.ts
|
|
4838
|
+
function UpdatePayInAdvanceRequestBodyFromJSON(json) {
|
|
4839
|
+
return UpdatePayInAdvanceRequestBodyFromJSONTyped(json, false);
|
|
4840
|
+
}
|
|
4841
|
+
function UpdatePayInAdvanceRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4842
|
+
if (json == null) {
|
|
4843
|
+
return json;
|
|
4844
|
+
}
|
|
4845
|
+
return {
|
|
4846
|
+
priceId: json["price_id"],
|
|
4847
|
+
quantity: json["quantity"]
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
4837
4850
|
function UpdatePayInAdvanceRequestBodyToJSON(json) {
|
|
4838
4851
|
return UpdatePayInAdvanceRequestBodyToJSONTyped(json, false);
|
|
4839
4852
|
}
|
|
@@ -4848,6 +4861,18 @@ function UpdatePayInAdvanceRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4848
4861
|
}
|
|
4849
4862
|
|
|
4850
4863
|
// src/api/checkoutexternal/models/UpdateCreditBundleRequestBody.ts
|
|
4864
|
+
function UpdateCreditBundleRequestBodyFromJSON(json) {
|
|
4865
|
+
return UpdateCreditBundleRequestBodyFromJSONTyped(json, false);
|
|
4866
|
+
}
|
|
4867
|
+
function UpdateCreditBundleRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4868
|
+
if (json == null) {
|
|
4869
|
+
return json;
|
|
4870
|
+
}
|
|
4871
|
+
return {
|
|
4872
|
+
bundleId: json["bundle_id"],
|
|
4873
|
+
quantity: json["quantity"]
|
|
4874
|
+
};
|
|
4875
|
+
}
|
|
4851
4876
|
function UpdateCreditBundleRequestBodyToJSON(json) {
|
|
4852
4877
|
return UpdateCreditBundleRequestBodyToJSONTyped(json, false);
|
|
4853
4878
|
}
|
|
@@ -4862,6 +4887,18 @@ function UpdateCreditBundleRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4862
4887
|
}
|
|
4863
4888
|
|
|
4864
4889
|
// src/api/checkoutexternal/models/CheckoutFieldValue.ts
|
|
4890
|
+
function CheckoutFieldValueFromJSON(json) {
|
|
4891
|
+
return CheckoutFieldValueFromJSONTyped(json, false);
|
|
4892
|
+
}
|
|
4893
|
+
function CheckoutFieldValueFromJSONTyped(json, ignoreDiscriminator) {
|
|
4894
|
+
if (json == null) {
|
|
4895
|
+
return json;
|
|
4896
|
+
}
|
|
4897
|
+
return {
|
|
4898
|
+
id: json["id"],
|
|
4899
|
+
value: json["value"]
|
|
4900
|
+
};
|
|
4901
|
+
}
|
|
4865
4902
|
function CheckoutFieldValueToJSON(json) {
|
|
4866
4903
|
return CheckoutFieldValueToJSONTyped(json, false);
|
|
4867
4904
|
}
|
|
@@ -4876,6 +4913,18 @@ function CheckoutFieldValueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4876
4913
|
}
|
|
4877
4914
|
|
|
4878
4915
|
// src/api/checkoutexternal/models/UpdateAddOnRequestBody.ts
|
|
4916
|
+
function UpdateAddOnRequestBodyFromJSON(json) {
|
|
4917
|
+
return UpdateAddOnRequestBodyFromJSONTyped(json, false);
|
|
4918
|
+
}
|
|
4919
|
+
function UpdateAddOnRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4920
|
+
if (json == null) {
|
|
4921
|
+
return json;
|
|
4922
|
+
}
|
|
4923
|
+
return {
|
|
4924
|
+
addOnId: json["add_on_id"],
|
|
4925
|
+
priceId: json["price_id"]
|
|
4926
|
+
};
|
|
4927
|
+
}
|
|
4879
4928
|
function UpdateAddOnRequestBodyToJSON(json) {
|
|
4880
4929
|
return UpdateAddOnRequestBodyToJSONTyped(json, false);
|
|
4881
4930
|
}
|
|
@@ -4890,6 +4939,20 @@ function UpdateAddOnRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4890
4939
|
}
|
|
4891
4940
|
|
|
4892
4941
|
// src/api/checkoutexternal/models/UpdateAutoTopupOverrideRequestBody.ts
|
|
4942
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSON(json) {
|
|
4943
|
+
return UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, false);
|
|
4944
|
+
}
|
|
4945
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4946
|
+
if (json == null) {
|
|
4947
|
+
return json;
|
|
4948
|
+
}
|
|
4949
|
+
return {
|
|
4950
|
+
autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
|
|
4951
|
+
autoTopupEnabled: json["auto_topup_enabled"] == null ? void 0 : json["auto_topup_enabled"],
|
|
4952
|
+
autoTopupThresholdCredits: json["auto_topup_threshold_credits"] == null ? void 0 : json["auto_topup_threshold_credits"],
|
|
4953
|
+
planCreditGrantId: json["plan_credit_grant_id"]
|
|
4954
|
+
};
|
|
4955
|
+
}
|
|
4893
4956
|
function UpdateAutoTopupOverrideRequestBodyToJSON(json) {
|
|
4894
4957
|
return UpdateAutoTopupOverrideRequestBodyToJSONTyped(json, false);
|
|
4895
4958
|
}
|
|
@@ -4925,6 +4988,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4925
4988
|
credit_bundles: value["creditBundles"].map(
|
|
4926
4989
|
UpdateCreditBundleRequestBodyToJSON
|
|
4927
4990
|
),
|
|
4991
|
+
currency: value["currency"],
|
|
4928
4992
|
custom_field_values: value["customFieldValues"].map(
|
|
4929
4993
|
CheckoutFieldValueToJSON
|
|
4930
4994
|
),
|
|
@@ -4960,6 +5024,143 @@ function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator)
|
|
|
4960
5024
|
return json;
|
|
4961
5025
|
}
|
|
4962
5026
|
|
|
5027
|
+
// src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
|
|
5028
|
+
function CheckoutPriceSnapshotFromJSON(json) {
|
|
5029
|
+
return CheckoutPriceSnapshotFromJSONTyped(json, false);
|
|
5030
|
+
}
|
|
5031
|
+
function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
5032
|
+
if (json == null) {
|
|
5033
|
+
return json;
|
|
5034
|
+
}
|
|
5035
|
+
return {
|
|
5036
|
+
amountOff: json["amount_off"],
|
|
5037
|
+
currency: json["currency"],
|
|
5038
|
+
dueNow: json["due_now"],
|
|
5039
|
+
isScheduledDowngrade: json["is_scheduled_downgrade"],
|
|
5040
|
+
newCharges: json["new_charges"],
|
|
5041
|
+
optInRequired: json["opt_in_required"],
|
|
5042
|
+
paymentMethodRequired: json["payment_method_required"],
|
|
5043
|
+
percentOff: json["percent_off"],
|
|
5044
|
+
periodStart: new Date(json["period_start"]),
|
|
5045
|
+
pricedAt: new Date(json["priced_at"]),
|
|
5046
|
+
promoCodeApplied: json["promo_code_applied"],
|
|
5047
|
+
proration: json["proration"],
|
|
5048
|
+
scheduledChangeTime: json["scheduled_change_time"] == null ? void 0 : new Date(json["scheduled_change_time"]),
|
|
5049
|
+
taxAmount: json["tax_amount"] == null ? void 0 : json["tax_amount"],
|
|
5050
|
+
totalPerBillingPeriod: json["total_per_billing_period"],
|
|
5051
|
+
trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
|
|
5052
|
+
};
|
|
5053
|
+
}
|
|
5054
|
+
|
|
5055
|
+
// src/api/checkoutexternal/models/CheckoutStatus.ts
|
|
5056
|
+
function CheckoutStatusFromJSON(json) {
|
|
5057
|
+
return CheckoutStatusFromJSONTyped(json, false);
|
|
5058
|
+
}
|
|
5059
|
+
function CheckoutStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
5060
|
+
return json;
|
|
5061
|
+
}
|
|
5062
|
+
|
|
5063
|
+
// src/api/checkoutexternal/models/CheckoutSelectionsResponseData.ts
|
|
5064
|
+
function CheckoutSelectionsResponseDataFromJSON(json) {
|
|
5065
|
+
return CheckoutSelectionsResponseDataFromJSONTyped(json, false);
|
|
5066
|
+
}
|
|
5067
|
+
function CheckoutSelectionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5068
|
+
if (json == null) {
|
|
5069
|
+
return json;
|
|
5070
|
+
}
|
|
5071
|
+
return {
|
|
5072
|
+
addOnIds: json["add_on_ids"].map(
|
|
5073
|
+
UpdateAddOnRequestBodyFromJSON
|
|
5074
|
+
),
|
|
5075
|
+
autoTopupOverrides: json["auto_topup_overrides"].map(
|
|
5076
|
+
UpdateAutoTopupOverrideRequestBodyFromJSON
|
|
5077
|
+
),
|
|
5078
|
+
billingEntityId: json["billing_entity_id"] == null ? void 0 : json["billing_entity_id"],
|
|
5079
|
+
couponExternalId: json["coupon_external_id"] == null ? void 0 : json["coupon_external_id"],
|
|
5080
|
+
creditBundles: json["credit_bundles"].map(
|
|
5081
|
+
UpdateCreditBundleRequestBodyFromJSON
|
|
5082
|
+
),
|
|
5083
|
+
customFieldValues: json["custom_field_values"].map(
|
|
5084
|
+
CheckoutFieldValueFromJSON
|
|
5085
|
+
),
|
|
5086
|
+
newPlanId: json["new_plan_id"] == null ? void 0 : json["new_plan_id"],
|
|
5087
|
+
newPriceId: json["new_price_id"] == null ? void 0 : json["new_price_id"],
|
|
5088
|
+
optInAccepted: json["opt_in_accepted"] == null ? void 0 : json["opt_in_accepted"],
|
|
5089
|
+
payInAdvance: json["pay_in_advance"].map(
|
|
5090
|
+
UpdatePayInAdvanceRequestBodyFromJSON
|
|
5091
|
+
),
|
|
5092
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
5093
|
+
promoCode: json["promo_code"] == null ? void 0 : json["promo_code"],
|
|
5094
|
+
skipTrial: json["skip_trial"]
|
|
5095
|
+
};
|
|
5096
|
+
}
|
|
5097
|
+
|
|
5098
|
+
// src/api/checkoutexternal/models/CheckoutProblemSource.ts
|
|
5099
|
+
function CheckoutProblemSourceFromJSON(json) {
|
|
5100
|
+
return CheckoutProblemSourceFromJSONTyped(json, false);
|
|
5101
|
+
}
|
|
5102
|
+
function CheckoutProblemSourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
5103
|
+
return json;
|
|
5104
|
+
}
|
|
5105
|
+
|
|
5106
|
+
// src/api/checkoutexternal/models/CheckoutProblemCode.ts
|
|
5107
|
+
function CheckoutProblemCodeFromJSON(json) {
|
|
5108
|
+
return CheckoutProblemCodeFromJSONTyped(json, false);
|
|
5109
|
+
}
|
|
5110
|
+
function CheckoutProblemCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5111
|
+
return json;
|
|
5112
|
+
}
|
|
5113
|
+
|
|
5114
|
+
// src/api/checkoutexternal/models/Problem.ts
|
|
5115
|
+
function ProblemFromJSON(json) {
|
|
5116
|
+
return ProblemFromJSONTyped(json, false);
|
|
5117
|
+
}
|
|
5118
|
+
function ProblemFromJSONTyped(json, ignoreDiscriminator) {
|
|
5119
|
+
if (json == null) {
|
|
5120
|
+
return json;
|
|
5121
|
+
}
|
|
5122
|
+
return {
|
|
5123
|
+
blocking: json["blocking"],
|
|
5124
|
+
bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
|
|
5125
|
+
code: CheckoutProblemCodeFromJSON(json["code"]),
|
|
5126
|
+
currency: json["currency"] == null ? void 0 : json["currency"],
|
|
5127
|
+
detail: json["detail"] == null ? void 0 : json["detail"],
|
|
5128
|
+
featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
|
|
5129
|
+
fieldId: json["field_id"] == null ? void 0 : json["field_id"],
|
|
5130
|
+
message: json["message"],
|
|
5131
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
5132
|
+
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
5133
|
+
priceId: json["price_id"] == null ? void 0 : json["price_id"],
|
|
5134
|
+
source: CheckoutProblemSourceFromJSON(json["source"])
|
|
5135
|
+
};
|
|
5136
|
+
}
|
|
5137
|
+
|
|
5138
|
+
// src/api/checkoutexternal/models/CheckoutDraftResponseData.ts
|
|
5139
|
+
function CheckoutDraftResponseDataFromJSON(json) {
|
|
5140
|
+
return CheckoutDraftResponseDataFromJSONTyped(json, false);
|
|
5141
|
+
}
|
|
5142
|
+
function CheckoutDraftResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5143
|
+
if (json == null) {
|
|
5144
|
+
return json;
|
|
5145
|
+
}
|
|
5146
|
+
return {
|
|
5147
|
+
companyId: json["company_id"],
|
|
5148
|
+
completedAt: json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
|
|
5149
|
+
createdAt: new Date(json["created_at"]),
|
|
5150
|
+
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
5151
|
+
id: json["id"],
|
|
5152
|
+
lastActivityAt: new Date(json["last_activity_at"]),
|
|
5153
|
+
priceSnapshot: json["price_snapshot"] == null ? void 0 : CheckoutPriceSnapshotFromJSON(json["price_snapshot"]),
|
|
5154
|
+
pricedAt: json["priced_at"] == null ? void 0 : new Date(json["priced_at"]),
|
|
5155
|
+
problems: json["problems"].map(ProblemFromJSON),
|
|
5156
|
+
selections: CheckoutSelectionsResponseDataFromJSON(json["selections"]),
|
|
5157
|
+
shareToken: json["share_token"] == null ? void 0 : json["share_token"],
|
|
5158
|
+
status: CheckoutStatusFromJSON(json["status"]),
|
|
5159
|
+
updatedAt: new Date(json["updated_at"]),
|
|
5160
|
+
version: json["version"]
|
|
5161
|
+
};
|
|
5162
|
+
}
|
|
5163
|
+
|
|
4963
5164
|
// src/api/checkoutexternal/models/CheckoutFieldWithValue.ts
|
|
4964
5165
|
function CheckoutFieldWithValueFromJSON(json) {
|
|
4965
5166
|
return CheckoutFieldWithValueFromJSONTyped(json, false);
|
|
@@ -6971,6 +7172,57 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6971
7172
|
};
|
|
6972
7173
|
}
|
|
6973
7174
|
|
|
7175
|
+
// src/api/checkoutexternal/models/CreateCheckoutRequest.ts
|
|
7176
|
+
function CreateCheckoutRequestToJSON(json) {
|
|
7177
|
+
return CreateCheckoutRequestToJSONTyped(json, false);
|
|
7178
|
+
}
|
|
7179
|
+
function CreateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7180
|
+
if (value == null) {
|
|
7181
|
+
return value;
|
|
7182
|
+
}
|
|
7183
|
+
return {
|
|
7184
|
+
add_on_ids: value["addOnIds"].map(
|
|
7185
|
+
UpdateAddOnRequestBodyToJSON
|
|
7186
|
+
),
|
|
7187
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7188
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7189
|
+
),
|
|
7190
|
+
billing_entity_id: value["billingEntityId"],
|
|
7191
|
+
company_id: value["companyId"],
|
|
7192
|
+
coupon_external_id: value["couponExternalId"],
|
|
7193
|
+
credit_bundles: value["creditBundles"].map(
|
|
7194
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7195
|
+
),
|
|
7196
|
+
currency: value["currency"],
|
|
7197
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7198
|
+
CheckoutFieldValueToJSON
|
|
7199
|
+
),
|
|
7200
|
+
new_plan_id: value["newPlanId"],
|
|
7201
|
+
new_price_id: value["newPriceId"],
|
|
7202
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7203
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7204
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7205
|
+
),
|
|
7206
|
+
payment_method_id: value["paymentMethodId"],
|
|
7207
|
+
promo_code: value["promoCode"],
|
|
7208
|
+
skip_trial: value["skipTrial"]
|
|
7209
|
+
};
|
|
7210
|
+
}
|
|
7211
|
+
|
|
7212
|
+
// src/api/checkoutexternal/models/CreateCheckoutResponse.ts
|
|
7213
|
+
function CreateCheckoutResponseFromJSON(json) {
|
|
7214
|
+
return CreateCheckoutResponseFromJSONTyped(json, false);
|
|
7215
|
+
}
|
|
7216
|
+
function CreateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7217
|
+
if (json == null) {
|
|
7218
|
+
return json;
|
|
7219
|
+
}
|
|
7220
|
+
return {
|
|
7221
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7222
|
+
params: json["params"]
|
|
7223
|
+
};
|
|
7224
|
+
}
|
|
7225
|
+
|
|
6974
7226
|
// src/api/checkoutexternal/models/SetupIntentResponseData.ts
|
|
6975
7227
|
function SetupIntentResponseDataFromJSON(json) {
|
|
6976
7228
|
return SetupIntentResponseDataFromJSONTyped(json, false);
|
|
@@ -7126,6 +7378,47 @@ function FetchCustomerBalanceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7126
7378
|
};
|
|
7127
7379
|
}
|
|
7128
7380
|
|
|
7381
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutRequest.ts
|
|
7382
|
+
function FinalizeCheckoutRequestToJSON(json) {
|
|
7383
|
+
return FinalizeCheckoutRequestToJSONTyped(json, false);
|
|
7384
|
+
}
|
|
7385
|
+
function FinalizeCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7386
|
+
if (value == null) {
|
|
7387
|
+
return value;
|
|
7388
|
+
}
|
|
7389
|
+
return {
|
|
7390
|
+
version: value["version"]
|
|
7391
|
+
};
|
|
7392
|
+
}
|
|
7393
|
+
|
|
7394
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutResponse.ts
|
|
7395
|
+
function FinalizeCheckoutResponseFromJSON(json) {
|
|
7396
|
+
return FinalizeCheckoutResponseFromJSONTyped(json, false);
|
|
7397
|
+
}
|
|
7398
|
+
function FinalizeCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7399
|
+
if (json == null) {
|
|
7400
|
+
return json;
|
|
7401
|
+
}
|
|
7402
|
+
return {
|
|
7403
|
+
data: CheckoutResponseDataFromJSON(json["data"]),
|
|
7404
|
+
params: json["params"]
|
|
7405
|
+
};
|
|
7406
|
+
}
|
|
7407
|
+
|
|
7408
|
+
// src/api/checkoutexternal/models/GetCheckoutResponse.ts
|
|
7409
|
+
function GetCheckoutResponseFromJSON(json) {
|
|
7410
|
+
return GetCheckoutResponseFromJSONTyped(json, false);
|
|
7411
|
+
}
|
|
7412
|
+
function GetCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7413
|
+
if (json == null) {
|
|
7414
|
+
return json;
|
|
7415
|
+
}
|
|
7416
|
+
return {
|
|
7417
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7418
|
+
params: json["params"]
|
|
7419
|
+
};
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7129
7422
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDResponseData.ts
|
|
7130
7423
|
function UpdateCheckoutTaxIDResponseDataFromJSON(json) {
|
|
7131
7424
|
return UpdateCheckoutTaxIDResponseDataFromJSONTyped(json, false);
|
|
@@ -7275,7 +7568,8 @@ function HydrateComponentParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7275
7568
|
return json;
|
|
7276
7569
|
}
|
|
7277
7570
|
return {
|
|
7278
|
-
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"]
|
|
7571
|
+
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"],
|
|
7572
|
+
includeAddOnIds: json["include_add_on_ids"] == null ? void 0 : json["include_add_on_ids"]
|
|
7279
7573
|
};
|
|
7280
7574
|
}
|
|
7281
7575
|
|
|
@@ -7334,6 +7628,36 @@ function HydrateUpcomingInvoiceResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
7334
7628
|
};
|
|
7335
7629
|
}
|
|
7336
7630
|
|
|
7631
|
+
// src/api/checkoutexternal/models/ListCheckoutsParams.ts
|
|
7632
|
+
function ListCheckoutsParamsFromJSON(json) {
|
|
7633
|
+
return ListCheckoutsParamsFromJSONTyped(json, false);
|
|
7634
|
+
}
|
|
7635
|
+
function ListCheckoutsParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
7636
|
+
if (json == null) {
|
|
7637
|
+
return json;
|
|
7638
|
+
}
|
|
7639
|
+
return {
|
|
7640
|
+
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
7641
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
7642
|
+
offset: json["offset"] == null ? void 0 : json["offset"],
|
|
7643
|
+
statuses: json["statuses"] == null ? void 0 : json["statuses"].map(CheckoutStatusFromJSON)
|
|
7644
|
+
};
|
|
7645
|
+
}
|
|
7646
|
+
|
|
7647
|
+
// src/api/checkoutexternal/models/ListCheckoutsResponse.ts
|
|
7648
|
+
function ListCheckoutsResponseFromJSON(json) {
|
|
7649
|
+
return ListCheckoutsResponseFromJSONTyped(json, false);
|
|
7650
|
+
}
|
|
7651
|
+
function ListCheckoutsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7652
|
+
if (json == null) {
|
|
7653
|
+
return json;
|
|
7654
|
+
}
|
|
7655
|
+
return {
|
|
7656
|
+
data: json["data"].map(CheckoutDraftResponseDataFromJSON),
|
|
7657
|
+
params: ListCheckoutsParamsFromJSON(json["params"])
|
|
7658
|
+
};
|
|
7659
|
+
}
|
|
7660
|
+
|
|
7337
7661
|
// src/api/checkoutexternal/models/ListInvoicesParams.ts
|
|
7338
7662
|
function ListInvoicesParamsFromJSON(json) {
|
|
7339
7663
|
return ListInvoicesParamsFromJSONTyped(json, false);
|
|
@@ -7412,6 +7736,7 @@ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscrim
|
|
|
7412
7736
|
}
|
|
7413
7737
|
return {
|
|
7414
7738
|
amountOff: json["amount_off"],
|
|
7739
|
+
currency: json["currency"],
|
|
7415
7740
|
discountAmount: json["discount_amount"],
|
|
7416
7741
|
discounts: json["discounts"].map(
|
|
7417
7742
|
PreviewSubscriptionDiscountResponseDataFromJSON
|
|
@@ -7536,6 +7861,57 @@ function UpdateCheckoutFieldValuesResponseFromJSONTyped(json, ignoreDiscriminato
|
|
|
7536
7861
|
};
|
|
7537
7862
|
}
|
|
7538
7863
|
|
|
7864
|
+
// src/api/checkoutexternal/models/UpdateCheckoutRequest.ts
|
|
7865
|
+
function UpdateCheckoutRequestToJSON(json) {
|
|
7866
|
+
return UpdateCheckoutRequestToJSONTyped(json, false);
|
|
7867
|
+
}
|
|
7868
|
+
function UpdateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7869
|
+
if (value == null) {
|
|
7870
|
+
return value;
|
|
7871
|
+
}
|
|
7872
|
+
return {
|
|
7873
|
+
add_on_ids: value["addOnIds"].map(
|
|
7874
|
+
UpdateAddOnRequestBodyToJSON
|
|
7875
|
+
),
|
|
7876
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7877
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7878
|
+
),
|
|
7879
|
+
billing_entity_id: value["billingEntityId"],
|
|
7880
|
+
coupon_external_id: value["couponExternalId"],
|
|
7881
|
+
credit_bundles: value["creditBundles"].map(
|
|
7882
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7883
|
+
),
|
|
7884
|
+
currency: value["currency"],
|
|
7885
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7886
|
+
CheckoutFieldValueToJSON
|
|
7887
|
+
),
|
|
7888
|
+
new_plan_id: value["newPlanId"],
|
|
7889
|
+
new_price_id: value["newPriceId"],
|
|
7890
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7891
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7892
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7893
|
+
),
|
|
7894
|
+
payment_method_id: value["paymentMethodId"],
|
|
7895
|
+
promo_code: value["promoCode"],
|
|
7896
|
+
skip_trial: value["skipTrial"],
|
|
7897
|
+
version: value["version"]
|
|
7898
|
+
};
|
|
7899
|
+
}
|
|
7900
|
+
|
|
7901
|
+
// src/api/checkoutexternal/models/UpdateCheckoutResponse.ts
|
|
7902
|
+
function UpdateCheckoutResponseFromJSON(json) {
|
|
7903
|
+
return UpdateCheckoutResponseFromJSONTyped(json, false);
|
|
7904
|
+
}
|
|
7905
|
+
function UpdateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7906
|
+
if (json == null) {
|
|
7907
|
+
return json;
|
|
7908
|
+
}
|
|
7909
|
+
return {
|
|
7910
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7911
|
+
params: json["params"]
|
|
7912
|
+
};
|
|
7913
|
+
}
|
|
7914
|
+
|
|
7539
7915
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDRequestBody.ts
|
|
7540
7916
|
function UpdateCheckoutTaxIDRequestBodyToJSON(json) {
|
|
7541
7917
|
return UpdateCheckoutTaxIDRequestBodyToJSONTyped(json, false);
|
|
@@ -7666,6 +8042,51 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7666
8042
|
const response = await this.checkoutUnsubscribeRaw(initOverrides);
|
|
7667
8043
|
return await response.value();
|
|
7668
8044
|
}
|
|
8045
|
+
/**
|
|
8046
|
+
* Create checkout
|
|
8047
|
+
*/
|
|
8048
|
+
async createCheckoutRaw(requestParameters, initOverrides) {
|
|
8049
|
+
if (requestParameters["createCheckoutRequest"] == null) {
|
|
8050
|
+
throw new RequiredError(
|
|
8051
|
+
"createCheckoutRequest",
|
|
8052
|
+
'Required parameter "createCheckoutRequest" was null or undefined when calling createCheckout().'
|
|
8053
|
+
);
|
|
8054
|
+
}
|
|
8055
|
+
const queryParameters = {};
|
|
8056
|
+
const headerParameters = {};
|
|
8057
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8058
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8059
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8060
|
+
"X-Schematic-Api-Key"
|
|
8061
|
+
);
|
|
8062
|
+
}
|
|
8063
|
+
const response = await this.request(
|
|
8064
|
+
{
|
|
8065
|
+
path: `/checkouts`,
|
|
8066
|
+
method: "POST",
|
|
8067
|
+
headers: headerParameters,
|
|
8068
|
+
query: queryParameters,
|
|
8069
|
+
body: CreateCheckoutRequestToJSON(
|
|
8070
|
+
requestParameters["createCheckoutRequest"]
|
|
8071
|
+
)
|
|
8072
|
+
},
|
|
8073
|
+
initOverrides
|
|
8074
|
+
);
|
|
8075
|
+
return new JSONApiResponse(
|
|
8076
|
+
response,
|
|
8077
|
+
(jsonValue) => CreateCheckoutResponseFromJSON(jsonValue)
|
|
8078
|
+
);
|
|
8079
|
+
}
|
|
8080
|
+
/**
|
|
8081
|
+
* Create checkout
|
|
8082
|
+
*/
|
|
8083
|
+
async createCheckout(requestParameters, initOverrides) {
|
|
8084
|
+
const response = await this.createCheckoutRaw(
|
|
8085
|
+
requestParameters,
|
|
8086
|
+
initOverrides
|
|
8087
|
+
);
|
|
8088
|
+
return await response.value();
|
|
8089
|
+
}
|
|
7669
8090
|
/**
|
|
7670
8091
|
* Create setup intent
|
|
7671
8092
|
*/
|
|
@@ -7774,6 +8195,104 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7774
8195
|
const response = await this.fetchCustomerBalanceRaw(initOverrides);
|
|
7775
8196
|
return await response.value();
|
|
7776
8197
|
}
|
|
8198
|
+
/**
|
|
8199
|
+
* Finalize checkout
|
|
8200
|
+
*/
|
|
8201
|
+
async finalizeCheckoutRaw(requestParameters, initOverrides) {
|
|
8202
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8203
|
+
throw new RequiredError(
|
|
8204
|
+
"checkoutId",
|
|
8205
|
+
'Required parameter "checkoutId" was null or undefined when calling finalizeCheckout().'
|
|
8206
|
+
);
|
|
8207
|
+
}
|
|
8208
|
+
if (requestParameters["finalizeCheckoutRequest"] == null) {
|
|
8209
|
+
throw new RequiredError(
|
|
8210
|
+
"finalizeCheckoutRequest",
|
|
8211
|
+
'Required parameter "finalizeCheckoutRequest" was null or undefined when calling finalizeCheckout().'
|
|
8212
|
+
);
|
|
8213
|
+
}
|
|
8214
|
+
const queryParameters = {};
|
|
8215
|
+
const headerParameters = {};
|
|
8216
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8217
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8218
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8219
|
+
"X-Schematic-Api-Key"
|
|
8220
|
+
);
|
|
8221
|
+
}
|
|
8222
|
+
const response = await this.request(
|
|
8223
|
+
{
|
|
8224
|
+
path: `/checkouts/{checkout_id}/finalize`.replace(
|
|
8225
|
+
`{${"checkout_id"}}`,
|
|
8226
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8227
|
+
),
|
|
8228
|
+
method: "POST",
|
|
8229
|
+
headers: headerParameters,
|
|
8230
|
+
query: queryParameters,
|
|
8231
|
+
body: FinalizeCheckoutRequestToJSON(
|
|
8232
|
+
requestParameters["finalizeCheckoutRequest"]
|
|
8233
|
+
)
|
|
8234
|
+
},
|
|
8235
|
+
initOverrides
|
|
8236
|
+
);
|
|
8237
|
+
return new JSONApiResponse(
|
|
8238
|
+
response,
|
|
8239
|
+
(jsonValue) => FinalizeCheckoutResponseFromJSON(jsonValue)
|
|
8240
|
+
);
|
|
8241
|
+
}
|
|
8242
|
+
/**
|
|
8243
|
+
* Finalize checkout
|
|
8244
|
+
*/
|
|
8245
|
+
async finalizeCheckout(requestParameters, initOverrides) {
|
|
8246
|
+
const response = await this.finalizeCheckoutRaw(
|
|
8247
|
+
requestParameters,
|
|
8248
|
+
initOverrides
|
|
8249
|
+
);
|
|
8250
|
+
return await response.value();
|
|
8251
|
+
}
|
|
8252
|
+
/**
|
|
8253
|
+
* Get checkout
|
|
8254
|
+
*/
|
|
8255
|
+
async getCheckoutRaw(requestParameters, initOverrides) {
|
|
8256
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8257
|
+
throw new RequiredError(
|
|
8258
|
+
"checkoutId",
|
|
8259
|
+
'Required parameter "checkoutId" was null or undefined when calling getCheckout().'
|
|
8260
|
+
);
|
|
8261
|
+
}
|
|
8262
|
+
const queryParameters = {};
|
|
8263
|
+
const headerParameters = {};
|
|
8264
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8265
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8266
|
+
"X-Schematic-Api-Key"
|
|
8267
|
+
);
|
|
8268
|
+
}
|
|
8269
|
+
const response = await this.request(
|
|
8270
|
+
{
|
|
8271
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8272
|
+
`{${"checkout_id"}}`,
|
|
8273
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8274
|
+
),
|
|
8275
|
+
method: "GET",
|
|
8276
|
+
headers: headerParameters,
|
|
8277
|
+
query: queryParameters
|
|
8278
|
+
},
|
|
8279
|
+
initOverrides
|
|
8280
|
+
);
|
|
8281
|
+
return new JSONApiResponse(
|
|
8282
|
+
response,
|
|
8283
|
+
(jsonValue) => GetCheckoutResponseFromJSON(jsonValue)
|
|
8284
|
+
);
|
|
8285
|
+
}
|
|
8286
|
+
/**
|
|
8287
|
+
* Get checkout
|
|
8288
|
+
*/
|
|
8289
|
+
async getCheckout(requestParameters, initOverrides) {
|
|
8290
|
+
const response = await this.getCheckoutRaw(
|
|
8291
|
+
requestParameters,
|
|
8292
|
+
initOverrides
|
|
8293
|
+
);
|
|
8294
|
+
return await response.value();
|
|
8295
|
+
}
|
|
7777
8296
|
/**
|
|
7778
8297
|
* Get checkout tax ID
|
|
7779
8298
|
*/
|
|
@@ -8082,6 +8601,9 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8082
8601
|
if (requestParameters["catalogId"] != null) {
|
|
8083
8602
|
queryParameters["catalog_id"] = requestParameters["catalogId"];
|
|
8084
8603
|
}
|
|
8604
|
+
if (requestParameters["includeAddOnIds"] != null) {
|
|
8605
|
+
queryParameters["include_add_on_ids"] = requestParameters["includeAddOnIds"];
|
|
8606
|
+
}
|
|
8085
8607
|
const headerParameters = {};
|
|
8086
8608
|
if (this.configuration && this.configuration.apiKey) {
|
|
8087
8609
|
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
@@ -8159,6 +8681,53 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8159
8681
|
);
|
|
8160
8682
|
return await response.value();
|
|
8161
8683
|
}
|
|
8684
|
+
/**
|
|
8685
|
+
* List checkouts
|
|
8686
|
+
*/
|
|
8687
|
+
async listCheckoutsRaw(requestParameters, initOverrides) {
|
|
8688
|
+
const queryParameters = {};
|
|
8689
|
+
if (requestParameters["companyId"] != null) {
|
|
8690
|
+
queryParameters["company_id"] = requestParameters["companyId"];
|
|
8691
|
+
}
|
|
8692
|
+
if (requestParameters["statuses"] != null) {
|
|
8693
|
+
queryParameters["statuses"] = requestParameters["statuses"];
|
|
8694
|
+
}
|
|
8695
|
+
if (requestParameters["limit"] != null) {
|
|
8696
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
8697
|
+
}
|
|
8698
|
+
if (requestParameters["offset"] != null) {
|
|
8699
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
8700
|
+
}
|
|
8701
|
+
const headerParameters = {};
|
|
8702
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8703
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8704
|
+
"X-Schematic-Api-Key"
|
|
8705
|
+
);
|
|
8706
|
+
}
|
|
8707
|
+
const response = await this.request(
|
|
8708
|
+
{
|
|
8709
|
+
path: `/checkouts`,
|
|
8710
|
+
method: "GET",
|
|
8711
|
+
headers: headerParameters,
|
|
8712
|
+
query: queryParameters
|
|
8713
|
+
},
|
|
8714
|
+
initOverrides
|
|
8715
|
+
);
|
|
8716
|
+
return new JSONApiResponse(
|
|
8717
|
+
response,
|
|
8718
|
+
(jsonValue) => ListCheckoutsResponseFromJSON(jsonValue)
|
|
8719
|
+
);
|
|
8720
|
+
}
|
|
8721
|
+
/**
|
|
8722
|
+
* List checkouts
|
|
8723
|
+
*/
|
|
8724
|
+
async listCheckouts(requestParameters = {}, initOverrides) {
|
|
8725
|
+
const response = await this.listCheckoutsRaw(
|
|
8726
|
+
requestParameters,
|
|
8727
|
+
initOverrides
|
|
8728
|
+
);
|
|
8729
|
+
return await response.value();
|
|
8730
|
+
}
|
|
8162
8731
|
/**
|
|
8163
8732
|
* List invoices
|
|
8164
8733
|
*/
|
|
@@ -8245,6 +8814,60 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8245
8814
|
);
|
|
8246
8815
|
return await response.value();
|
|
8247
8816
|
}
|
|
8817
|
+
/**
|
|
8818
|
+
* Update checkout
|
|
8819
|
+
*/
|
|
8820
|
+
async updateCheckoutRaw(requestParameters, initOverrides) {
|
|
8821
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8822
|
+
throw new RequiredError(
|
|
8823
|
+
"checkoutId",
|
|
8824
|
+
'Required parameter "checkoutId" was null or undefined when calling updateCheckout().'
|
|
8825
|
+
);
|
|
8826
|
+
}
|
|
8827
|
+
if (requestParameters["updateCheckoutRequest"] == null) {
|
|
8828
|
+
throw new RequiredError(
|
|
8829
|
+
"updateCheckoutRequest",
|
|
8830
|
+
'Required parameter "updateCheckoutRequest" was null or undefined when calling updateCheckout().'
|
|
8831
|
+
);
|
|
8832
|
+
}
|
|
8833
|
+
const queryParameters = {};
|
|
8834
|
+
const headerParameters = {};
|
|
8835
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8836
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8837
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8838
|
+
"X-Schematic-Api-Key"
|
|
8839
|
+
);
|
|
8840
|
+
}
|
|
8841
|
+
const response = await this.request(
|
|
8842
|
+
{
|
|
8843
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8844
|
+
`{${"checkout_id"}}`,
|
|
8845
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8846
|
+
),
|
|
8847
|
+
method: "PUT",
|
|
8848
|
+
headers: headerParameters,
|
|
8849
|
+
query: queryParameters,
|
|
8850
|
+
body: UpdateCheckoutRequestToJSON(
|
|
8851
|
+
requestParameters["updateCheckoutRequest"]
|
|
8852
|
+
)
|
|
8853
|
+
},
|
|
8854
|
+
initOverrides
|
|
8855
|
+
);
|
|
8856
|
+
return new JSONApiResponse(
|
|
8857
|
+
response,
|
|
8858
|
+
(jsonValue) => UpdateCheckoutResponseFromJSON(jsonValue)
|
|
8859
|
+
);
|
|
8860
|
+
}
|
|
8861
|
+
/**
|
|
8862
|
+
* Update checkout
|
|
8863
|
+
*/
|
|
8864
|
+
async updateCheckout(requestParameters, initOverrides) {
|
|
8865
|
+
const response = await this.updateCheckoutRaw(
|
|
8866
|
+
requestParameters,
|
|
8867
|
+
initOverrides
|
|
8868
|
+
);
|
|
8869
|
+
return await response.value();
|
|
8870
|
+
}
|
|
8248
8871
|
/**
|
|
8249
8872
|
* Update checkout field values
|
|
8250
8873
|
*/
|
|
@@ -13018,6 +13641,12 @@ function getSubscriptionPeriod(billingSubscription) {
|
|
|
13018
13641
|
);
|
|
13019
13642
|
return derivePeriod(product?.interval, product?.intervalCount) ?? derivePeriod(billingSubscription.interval);
|
|
13020
13643
|
}
|
|
13644
|
+
function getDefaultPlanPeriod(plans = []) {
|
|
13645
|
+
if (plans.some((plan) => plan.monthlyPrice)) return "month";
|
|
13646
|
+
if (plans.some((plan) => plan.quarterlyPrice)) return "quarter";
|
|
13647
|
+
if (plans.some((plan) => plan.yearlyPrice)) return "year";
|
|
13648
|
+
return "month";
|
|
13649
|
+
}
|
|
13021
13650
|
var ChargeType = {
|
|
13022
13651
|
oneTime: "one_time",
|
|
13023
13652
|
recurring: "recurring",
|
|
@@ -14885,7 +15514,7 @@ var reducer = (state, action) => {
|
|
|
14885
15514
|
// src/context/EmbedProvider.tsx
|
|
14886
15515
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
14887
15516
|
var getCustomHeaders = (sessionId) => ({
|
|
14888
|
-
"X-Schematic-Components-Version": "2.
|
|
15517
|
+
"X-Schematic-Components-Version": "2.28.0",
|
|
14889
15518
|
"X-Schematic-Session-ID": sessionId
|
|
14890
15519
|
});
|
|
14891
15520
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -15083,6 +15712,34 @@ var EmbedProvider = ({
|
|
|
15083
15712
|
),
|
|
15084
15713
|
[hydrateExternal]
|
|
15085
15714
|
);
|
|
15715
|
+
const rehydrateWithParams = (0, import_react5.useCallback)(
|
|
15716
|
+
async (params) => {
|
|
15717
|
+
const componentId = state.data?.component?.id;
|
|
15718
|
+
if (!componentId || !checkoutApi) {
|
|
15719
|
+
throw new Error(
|
|
15720
|
+
"[Schematic] `rehydrateWithParams` needs a `SchematicEmbed` that has loaded."
|
|
15721
|
+
);
|
|
15722
|
+
}
|
|
15723
|
+
const response = await checkoutApi.hydrateComponent({
|
|
15724
|
+
componentId,
|
|
15725
|
+
includeAddOnIds: params.includeAddOnIds
|
|
15726
|
+
});
|
|
15727
|
+
const returnedIds = new Set(
|
|
15728
|
+
response.data.activeAddOns.map((addOn) => addOn.id)
|
|
15729
|
+
);
|
|
15730
|
+
const missingIds = (params.includeAddOnIds ?? []).filter(
|
|
15731
|
+
(id) => !returnedIds.has(id)
|
|
15732
|
+
);
|
|
15733
|
+
if (missingIds.length > 0) {
|
|
15734
|
+
console.warn(
|
|
15735
|
+
`[Schematic] These included add-ons were left out because each must be an add-on with a billing product: ${missingIds.join(", ")}`
|
|
15736
|
+
);
|
|
15737
|
+
}
|
|
15738
|
+
dispatch({ type: "HYDRATE_COMPONENT", data: response.data });
|
|
15739
|
+
return response.data;
|
|
15740
|
+
},
|
|
15741
|
+
[checkoutApi, state.data?.component?.id]
|
|
15742
|
+
);
|
|
15086
15743
|
const createSetupIntent = (0, import_react5.useCallback)(async () => {
|
|
15087
15744
|
return checkoutApi?.createSetupIntent();
|
|
15088
15745
|
}, [checkoutApi]);
|
|
@@ -15426,6 +16083,7 @@ var EmbedProvider = ({
|
|
|
15426
16083
|
hydrate: debouncedHydrate,
|
|
15427
16084
|
hydrateComponent: debouncedHydrateComponent,
|
|
15428
16085
|
hydrateExternal: debouncedHydrateExternal,
|
|
16086
|
+
rehydrateWithParams,
|
|
15429
16087
|
createSetupIntent: debouncedCreateSetupIntent,
|
|
15430
16088
|
updatePaymentMethod: debouncedUpdatePaymentMethod,
|
|
15431
16089
|
deletePaymentMethod: debouncedDeletePaymentMethod,
|
|
@@ -19194,7 +19852,7 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19194
19852
|
[data?.featureUsage?.features]
|
|
19195
19853
|
);
|
|
19196
19854
|
const getValidatedPeriod = () => {
|
|
19197
|
-
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
19855
|
+
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans);
|
|
19198
19856
|
if (checkoutState?.planId) {
|
|
19199
19857
|
const requestedPlan = data?.activePlans?.find(
|
|
19200
19858
|
(plan) => plan.id === checkoutState.planId
|
|
@@ -25611,7 +26269,7 @@ PaymentMethod.displayName = "PaymentMethod";
|
|
|
25611
26269
|
// src/components/elements/payment-method/PaymentMethodDetails.tsx
|
|
25612
26270
|
var import_react_stripe_js2 = require("@stripe/react-stripe-js");
|
|
25613
26271
|
|
|
25614
|
-
// node_modules/.pnpm/@stripe+stripe-js@9.
|
|
26272
|
+
// node_modules/.pnpm/@stripe+stripe-js@9.17.0/node_modules/@stripe/stripe-js/dist/index.mjs
|
|
25615
26273
|
function _typeof(obj) {
|
|
25616
26274
|
"@babel/helpers - typeof";
|
|
25617
26275
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -25665,7 +26323,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
|
|
|
25665
26323
|
}
|
|
25666
26324
|
stripe._registerWrapper({
|
|
25667
26325
|
name: "stripe-js",
|
|
25668
|
-
version: "9.
|
|
26326
|
+
version: "9.17.0",
|
|
25669
26327
|
startTime
|
|
25670
26328
|
});
|
|
25671
26329
|
};
|
|
@@ -25743,7 +26401,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
|
|
|
25743
26401
|
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
25744
26402
|
var expectedVersion = RELEASE_TRAIN;
|
|
25745
26403
|
if (isTestKey && version !== expectedVersion) {
|
|
25746
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
26404
|
+
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"));
|
|
25747
26405
|
}
|
|
25748
26406
|
var stripe = maybeStripe.apply(void 0, args);
|
|
25749
26407
|
registerWrapper(stripe, startTime);
|
|
@@ -27989,7 +28647,7 @@ var PricingTable = (0, import_react54.forwardRef)(({ className, ...rest }, ref)
|
|
|
27989
28647
|
[]
|
|
27990
28648
|
);
|
|
27991
28649
|
const [selectedPeriod, setSelectedPeriod] = (0, import_react54.useState)(
|
|
27992
|
-
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
28650
|
+
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans)
|
|
27993
28651
|
);
|
|
27994
28652
|
const { currencies, invalidFilterEntries } = useAvailableCurrenciesWithInvalid();
|
|
27995
28653
|
const [selectedCurrency, setSelectedCurrency] = (0, import_react54.useState)(
|