@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,
|
|
@@ -4863,6 +4864,18 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4863
4864
|
}
|
|
4864
4865
|
|
|
4865
4866
|
// src/api/checkoutexternal/models/UpdatePayInAdvanceRequestBody.ts
|
|
4867
|
+
function UpdatePayInAdvanceRequestBodyFromJSON(json) {
|
|
4868
|
+
return UpdatePayInAdvanceRequestBodyFromJSONTyped(json, false);
|
|
4869
|
+
}
|
|
4870
|
+
function UpdatePayInAdvanceRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4871
|
+
if (json == null) {
|
|
4872
|
+
return json;
|
|
4873
|
+
}
|
|
4874
|
+
return {
|
|
4875
|
+
priceId: json["price_id"],
|
|
4876
|
+
quantity: json["quantity"]
|
|
4877
|
+
};
|
|
4878
|
+
}
|
|
4866
4879
|
function UpdatePayInAdvanceRequestBodyToJSON(json) {
|
|
4867
4880
|
return UpdatePayInAdvanceRequestBodyToJSONTyped(json, false);
|
|
4868
4881
|
}
|
|
@@ -4877,6 +4890,18 @@ function UpdatePayInAdvanceRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4877
4890
|
}
|
|
4878
4891
|
|
|
4879
4892
|
// src/api/checkoutexternal/models/UpdateCreditBundleRequestBody.ts
|
|
4893
|
+
function UpdateCreditBundleRequestBodyFromJSON(json) {
|
|
4894
|
+
return UpdateCreditBundleRequestBodyFromJSONTyped(json, false);
|
|
4895
|
+
}
|
|
4896
|
+
function UpdateCreditBundleRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4897
|
+
if (json == null) {
|
|
4898
|
+
return json;
|
|
4899
|
+
}
|
|
4900
|
+
return {
|
|
4901
|
+
bundleId: json["bundle_id"],
|
|
4902
|
+
quantity: json["quantity"]
|
|
4903
|
+
};
|
|
4904
|
+
}
|
|
4880
4905
|
function UpdateCreditBundleRequestBodyToJSON(json) {
|
|
4881
4906
|
return UpdateCreditBundleRequestBodyToJSONTyped(json, false);
|
|
4882
4907
|
}
|
|
@@ -4891,6 +4916,18 @@ function UpdateCreditBundleRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4891
4916
|
}
|
|
4892
4917
|
|
|
4893
4918
|
// src/api/checkoutexternal/models/CheckoutFieldValue.ts
|
|
4919
|
+
function CheckoutFieldValueFromJSON(json) {
|
|
4920
|
+
return CheckoutFieldValueFromJSONTyped(json, false);
|
|
4921
|
+
}
|
|
4922
|
+
function CheckoutFieldValueFromJSONTyped(json, ignoreDiscriminator) {
|
|
4923
|
+
if (json == null) {
|
|
4924
|
+
return json;
|
|
4925
|
+
}
|
|
4926
|
+
return {
|
|
4927
|
+
id: json["id"],
|
|
4928
|
+
value: json["value"]
|
|
4929
|
+
};
|
|
4930
|
+
}
|
|
4894
4931
|
function CheckoutFieldValueToJSON(json) {
|
|
4895
4932
|
return CheckoutFieldValueToJSONTyped(json, false);
|
|
4896
4933
|
}
|
|
@@ -4905,6 +4942,18 @@ function CheckoutFieldValueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4905
4942
|
}
|
|
4906
4943
|
|
|
4907
4944
|
// src/api/checkoutexternal/models/UpdateAddOnRequestBody.ts
|
|
4945
|
+
function UpdateAddOnRequestBodyFromJSON(json) {
|
|
4946
|
+
return UpdateAddOnRequestBodyFromJSONTyped(json, false);
|
|
4947
|
+
}
|
|
4948
|
+
function UpdateAddOnRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4949
|
+
if (json == null) {
|
|
4950
|
+
return json;
|
|
4951
|
+
}
|
|
4952
|
+
return {
|
|
4953
|
+
addOnId: json["add_on_id"],
|
|
4954
|
+
priceId: json["price_id"]
|
|
4955
|
+
};
|
|
4956
|
+
}
|
|
4908
4957
|
function UpdateAddOnRequestBodyToJSON(json) {
|
|
4909
4958
|
return UpdateAddOnRequestBodyToJSONTyped(json, false);
|
|
4910
4959
|
}
|
|
@@ -4919,6 +4968,20 @@ function UpdateAddOnRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4919
4968
|
}
|
|
4920
4969
|
|
|
4921
4970
|
// src/api/checkoutexternal/models/UpdateAutoTopupOverrideRequestBody.ts
|
|
4971
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSON(json) {
|
|
4972
|
+
return UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, false);
|
|
4973
|
+
}
|
|
4974
|
+
function UpdateAutoTopupOverrideRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
4975
|
+
if (json == null) {
|
|
4976
|
+
return json;
|
|
4977
|
+
}
|
|
4978
|
+
return {
|
|
4979
|
+
autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
|
|
4980
|
+
autoTopupEnabled: json["auto_topup_enabled"] == null ? void 0 : json["auto_topup_enabled"],
|
|
4981
|
+
autoTopupThresholdCredits: json["auto_topup_threshold_credits"] == null ? void 0 : json["auto_topup_threshold_credits"],
|
|
4982
|
+
planCreditGrantId: json["plan_credit_grant_id"]
|
|
4983
|
+
};
|
|
4984
|
+
}
|
|
4922
4985
|
function UpdateAutoTopupOverrideRequestBodyToJSON(json) {
|
|
4923
4986
|
return UpdateAutoTopupOverrideRequestBodyToJSONTyped(json, false);
|
|
4924
4987
|
}
|
|
@@ -4954,6 +5017,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4954
5017
|
credit_bundles: value["creditBundles"].map(
|
|
4955
5018
|
UpdateCreditBundleRequestBodyToJSON
|
|
4956
5019
|
),
|
|
5020
|
+
currency: value["currency"],
|
|
4957
5021
|
custom_field_values: value["customFieldValues"].map(
|
|
4958
5022
|
CheckoutFieldValueToJSON
|
|
4959
5023
|
),
|
|
@@ -4989,6 +5053,143 @@ function CheckoutBundlePurchaseBehaviorFromJSONTyped(json, ignoreDiscriminator)
|
|
|
4989
5053
|
return json;
|
|
4990
5054
|
}
|
|
4991
5055
|
|
|
5056
|
+
// src/api/checkoutexternal/models/CheckoutPriceSnapshot.ts
|
|
5057
|
+
function CheckoutPriceSnapshotFromJSON(json) {
|
|
5058
|
+
return CheckoutPriceSnapshotFromJSONTyped(json, false);
|
|
5059
|
+
}
|
|
5060
|
+
function CheckoutPriceSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
5061
|
+
if (json == null) {
|
|
5062
|
+
return json;
|
|
5063
|
+
}
|
|
5064
|
+
return {
|
|
5065
|
+
amountOff: json["amount_off"],
|
|
5066
|
+
currency: json["currency"],
|
|
5067
|
+
dueNow: json["due_now"],
|
|
5068
|
+
isScheduledDowngrade: json["is_scheduled_downgrade"],
|
|
5069
|
+
newCharges: json["new_charges"],
|
|
5070
|
+
optInRequired: json["opt_in_required"],
|
|
5071
|
+
paymentMethodRequired: json["payment_method_required"],
|
|
5072
|
+
percentOff: json["percent_off"],
|
|
5073
|
+
periodStart: new Date(json["period_start"]),
|
|
5074
|
+
pricedAt: new Date(json["priced_at"]),
|
|
5075
|
+
promoCodeApplied: json["promo_code_applied"],
|
|
5076
|
+
proration: json["proration"],
|
|
5077
|
+
scheduledChangeTime: json["scheduled_change_time"] == null ? void 0 : new Date(json["scheduled_change_time"]),
|
|
5078
|
+
taxAmount: json["tax_amount"] == null ? void 0 : json["tax_amount"],
|
|
5079
|
+
totalPerBillingPeriod: json["total_per_billing_period"],
|
|
5080
|
+
trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
|
|
5081
|
+
};
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
// src/api/checkoutexternal/models/CheckoutStatus.ts
|
|
5085
|
+
function CheckoutStatusFromJSON(json) {
|
|
5086
|
+
return CheckoutStatusFromJSONTyped(json, false);
|
|
5087
|
+
}
|
|
5088
|
+
function CheckoutStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
5089
|
+
return json;
|
|
5090
|
+
}
|
|
5091
|
+
|
|
5092
|
+
// src/api/checkoutexternal/models/CheckoutSelectionsResponseData.ts
|
|
5093
|
+
function CheckoutSelectionsResponseDataFromJSON(json) {
|
|
5094
|
+
return CheckoutSelectionsResponseDataFromJSONTyped(json, false);
|
|
5095
|
+
}
|
|
5096
|
+
function CheckoutSelectionsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5097
|
+
if (json == null) {
|
|
5098
|
+
return json;
|
|
5099
|
+
}
|
|
5100
|
+
return {
|
|
5101
|
+
addOnIds: json["add_on_ids"].map(
|
|
5102
|
+
UpdateAddOnRequestBodyFromJSON
|
|
5103
|
+
),
|
|
5104
|
+
autoTopupOverrides: json["auto_topup_overrides"].map(
|
|
5105
|
+
UpdateAutoTopupOverrideRequestBodyFromJSON
|
|
5106
|
+
),
|
|
5107
|
+
billingEntityId: json["billing_entity_id"] == null ? void 0 : json["billing_entity_id"],
|
|
5108
|
+
couponExternalId: json["coupon_external_id"] == null ? void 0 : json["coupon_external_id"],
|
|
5109
|
+
creditBundles: json["credit_bundles"].map(
|
|
5110
|
+
UpdateCreditBundleRequestBodyFromJSON
|
|
5111
|
+
),
|
|
5112
|
+
customFieldValues: json["custom_field_values"].map(
|
|
5113
|
+
CheckoutFieldValueFromJSON
|
|
5114
|
+
),
|
|
5115
|
+
newPlanId: json["new_plan_id"] == null ? void 0 : json["new_plan_id"],
|
|
5116
|
+
newPriceId: json["new_price_id"] == null ? void 0 : json["new_price_id"],
|
|
5117
|
+
optInAccepted: json["opt_in_accepted"] == null ? void 0 : json["opt_in_accepted"],
|
|
5118
|
+
payInAdvance: json["pay_in_advance"].map(
|
|
5119
|
+
UpdatePayInAdvanceRequestBodyFromJSON
|
|
5120
|
+
),
|
|
5121
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
5122
|
+
promoCode: json["promo_code"] == null ? void 0 : json["promo_code"],
|
|
5123
|
+
skipTrial: json["skip_trial"]
|
|
5124
|
+
};
|
|
5125
|
+
}
|
|
5126
|
+
|
|
5127
|
+
// src/api/checkoutexternal/models/CheckoutProblemSource.ts
|
|
5128
|
+
function CheckoutProblemSourceFromJSON(json) {
|
|
5129
|
+
return CheckoutProblemSourceFromJSONTyped(json, false);
|
|
5130
|
+
}
|
|
5131
|
+
function CheckoutProblemSourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
5132
|
+
return json;
|
|
5133
|
+
}
|
|
5134
|
+
|
|
5135
|
+
// src/api/checkoutexternal/models/CheckoutProblemCode.ts
|
|
5136
|
+
function CheckoutProblemCodeFromJSON(json) {
|
|
5137
|
+
return CheckoutProblemCodeFromJSONTyped(json, false);
|
|
5138
|
+
}
|
|
5139
|
+
function CheckoutProblemCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5140
|
+
return json;
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
// src/api/checkoutexternal/models/Problem.ts
|
|
5144
|
+
function ProblemFromJSON(json) {
|
|
5145
|
+
return ProblemFromJSONTyped(json, false);
|
|
5146
|
+
}
|
|
5147
|
+
function ProblemFromJSONTyped(json, ignoreDiscriminator) {
|
|
5148
|
+
if (json == null) {
|
|
5149
|
+
return json;
|
|
5150
|
+
}
|
|
5151
|
+
return {
|
|
5152
|
+
blocking: json["blocking"],
|
|
5153
|
+
bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
|
|
5154
|
+
code: CheckoutProblemCodeFromJSON(json["code"]),
|
|
5155
|
+
currency: json["currency"] == null ? void 0 : json["currency"],
|
|
5156
|
+
detail: json["detail"] == null ? void 0 : json["detail"],
|
|
5157
|
+
featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
|
|
5158
|
+
fieldId: json["field_id"] == null ? void 0 : json["field_id"],
|
|
5159
|
+
message: json["message"],
|
|
5160
|
+
paymentMethodId: json["payment_method_id"] == null ? void 0 : json["payment_method_id"],
|
|
5161
|
+
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
5162
|
+
priceId: json["price_id"] == null ? void 0 : json["price_id"],
|
|
5163
|
+
source: CheckoutProblemSourceFromJSON(json["source"])
|
|
5164
|
+
};
|
|
5165
|
+
}
|
|
5166
|
+
|
|
5167
|
+
// src/api/checkoutexternal/models/CheckoutDraftResponseData.ts
|
|
5168
|
+
function CheckoutDraftResponseDataFromJSON(json) {
|
|
5169
|
+
return CheckoutDraftResponseDataFromJSONTyped(json, false);
|
|
5170
|
+
}
|
|
5171
|
+
function CheckoutDraftResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5172
|
+
if (json == null) {
|
|
5173
|
+
return json;
|
|
5174
|
+
}
|
|
5175
|
+
return {
|
|
5176
|
+
companyId: json["company_id"],
|
|
5177
|
+
completedAt: json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
|
|
5178
|
+
createdAt: new Date(json["created_at"]),
|
|
5179
|
+
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
5180
|
+
id: json["id"],
|
|
5181
|
+
lastActivityAt: new Date(json["last_activity_at"]),
|
|
5182
|
+
priceSnapshot: json["price_snapshot"] == null ? void 0 : CheckoutPriceSnapshotFromJSON(json["price_snapshot"]),
|
|
5183
|
+
pricedAt: json["priced_at"] == null ? void 0 : new Date(json["priced_at"]),
|
|
5184
|
+
problems: json["problems"].map(ProblemFromJSON),
|
|
5185
|
+
selections: CheckoutSelectionsResponseDataFromJSON(json["selections"]),
|
|
5186
|
+
shareToken: json["share_token"] == null ? void 0 : json["share_token"],
|
|
5187
|
+
status: CheckoutStatusFromJSON(json["status"]),
|
|
5188
|
+
updatedAt: new Date(json["updated_at"]),
|
|
5189
|
+
version: json["version"]
|
|
5190
|
+
};
|
|
5191
|
+
}
|
|
5192
|
+
|
|
4992
5193
|
// src/api/checkoutexternal/models/CheckoutFieldWithValue.ts
|
|
4993
5194
|
function CheckoutFieldWithValueFromJSON(json) {
|
|
4994
5195
|
return CheckoutFieldWithValueFromJSONTyped(json, false);
|
|
@@ -7000,6 +7201,57 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7000
7201
|
};
|
|
7001
7202
|
}
|
|
7002
7203
|
|
|
7204
|
+
// src/api/checkoutexternal/models/CreateCheckoutRequest.ts
|
|
7205
|
+
function CreateCheckoutRequestToJSON(json) {
|
|
7206
|
+
return CreateCheckoutRequestToJSONTyped(json, false);
|
|
7207
|
+
}
|
|
7208
|
+
function CreateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7209
|
+
if (value == null) {
|
|
7210
|
+
return value;
|
|
7211
|
+
}
|
|
7212
|
+
return {
|
|
7213
|
+
add_on_ids: value["addOnIds"].map(
|
|
7214
|
+
UpdateAddOnRequestBodyToJSON
|
|
7215
|
+
),
|
|
7216
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7217
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7218
|
+
),
|
|
7219
|
+
billing_entity_id: value["billingEntityId"],
|
|
7220
|
+
company_id: value["companyId"],
|
|
7221
|
+
coupon_external_id: value["couponExternalId"],
|
|
7222
|
+
credit_bundles: value["creditBundles"].map(
|
|
7223
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7224
|
+
),
|
|
7225
|
+
currency: value["currency"],
|
|
7226
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7227
|
+
CheckoutFieldValueToJSON
|
|
7228
|
+
),
|
|
7229
|
+
new_plan_id: value["newPlanId"],
|
|
7230
|
+
new_price_id: value["newPriceId"],
|
|
7231
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7232
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7233
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7234
|
+
),
|
|
7235
|
+
payment_method_id: value["paymentMethodId"],
|
|
7236
|
+
promo_code: value["promoCode"],
|
|
7237
|
+
skip_trial: value["skipTrial"]
|
|
7238
|
+
};
|
|
7239
|
+
}
|
|
7240
|
+
|
|
7241
|
+
// src/api/checkoutexternal/models/CreateCheckoutResponse.ts
|
|
7242
|
+
function CreateCheckoutResponseFromJSON(json) {
|
|
7243
|
+
return CreateCheckoutResponseFromJSONTyped(json, false);
|
|
7244
|
+
}
|
|
7245
|
+
function CreateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7246
|
+
if (json == null) {
|
|
7247
|
+
return json;
|
|
7248
|
+
}
|
|
7249
|
+
return {
|
|
7250
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7251
|
+
params: json["params"]
|
|
7252
|
+
};
|
|
7253
|
+
}
|
|
7254
|
+
|
|
7003
7255
|
// src/api/checkoutexternal/models/SetupIntentResponseData.ts
|
|
7004
7256
|
function SetupIntentResponseDataFromJSON(json) {
|
|
7005
7257
|
return SetupIntentResponseDataFromJSONTyped(json, false);
|
|
@@ -7155,6 +7407,47 @@ function FetchCustomerBalanceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7155
7407
|
};
|
|
7156
7408
|
}
|
|
7157
7409
|
|
|
7410
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutRequest.ts
|
|
7411
|
+
function FinalizeCheckoutRequestToJSON(json) {
|
|
7412
|
+
return FinalizeCheckoutRequestToJSONTyped(json, false);
|
|
7413
|
+
}
|
|
7414
|
+
function FinalizeCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7415
|
+
if (value == null) {
|
|
7416
|
+
return value;
|
|
7417
|
+
}
|
|
7418
|
+
return {
|
|
7419
|
+
version: value["version"]
|
|
7420
|
+
};
|
|
7421
|
+
}
|
|
7422
|
+
|
|
7423
|
+
// src/api/checkoutexternal/models/FinalizeCheckoutResponse.ts
|
|
7424
|
+
function FinalizeCheckoutResponseFromJSON(json) {
|
|
7425
|
+
return FinalizeCheckoutResponseFromJSONTyped(json, false);
|
|
7426
|
+
}
|
|
7427
|
+
function FinalizeCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7428
|
+
if (json == null) {
|
|
7429
|
+
return json;
|
|
7430
|
+
}
|
|
7431
|
+
return {
|
|
7432
|
+
data: CheckoutResponseDataFromJSON(json["data"]),
|
|
7433
|
+
params: json["params"]
|
|
7434
|
+
};
|
|
7435
|
+
}
|
|
7436
|
+
|
|
7437
|
+
// src/api/checkoutexternal/models/GetCheckoutResponse.ts
|
|
7438
|
+
function GetCheckoutResponseFromJSON(json) {
|
|
7439
|
+
return GetCheckoutResponseFromJSONTyped(json, false);
|
|
7440
|
+
}
|
|
7441
|
+
function GetCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7442
|
+
if (json == null) {
|
|
7443
|
+
return json;
|
|
7444
|
+
}
|
|
7445
|
+
return {
|
|
7446
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7447
|
+
params: json["params"]
|
|
7448
|
+
};
|
|
7449
|
+
}
|
|
7450
|
+
|
|
7158
7451
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDResponseData.ts
|
|
7159
7452
|
function UpdateCheckoutTaxIDResponseDataFromJSON(json) {
|
|
7160
7453
|
return UpdateCheckoutTaxIDResponseDataFromJSONTyped(json, false);
|
|
@@ -7304,7 +7597,8 @@ function HydrateComponentParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7304
7597
|
return json;
|
|
7305
7598
|
}
|
|
7306
7599
|
return {
|
|
7307
|
-
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"]
|
|
7600
|
+
catalogId: json["catalog_id"] == null ? void 0 : json["catalog_id"],
|
|
7601
|
+
includeAddOnIds: json["include_add_on_ids"] == null ? void 0 : json["include_add_on_ids"]
|
|
7308
7602
|
};
|
|
7309
7603
|
}
|
|
7310
7604
|
|
|
@@ -7363,6 +7657,36 @@ function HydrateUpcomingInvoiceResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
7363
7657
|
};
|
|
7364
7658
|
}
|
|
7365
7659
|
|
|
7660
|
+
// src/api/checkoutexternal/models/ListCheckoutsParams.ts
|
|
7661
|
+
function ListCheckoutsParamsFromJSON(json) {
|
|
7662
|
+
return ListCheckoutsParamsFromJSONTyped(json, false);
|
|
7663
|
+
}
|
|
7664
|
+
function ListCheckoutsParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
7665
|
+
if (json == null) {
|
|
7666
|
+
return json;
|
|
7667
|
+
}
|
|
7668
|
+
return {
|
|
7669
|
+
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
7670
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
7671
|
+
offset: json["offset"] == null ? void 0 : json["offset"],
|
|
7672
|
+
statuses: json["statuses"] == null ? void 0 : json["statuses"].map(CheckoutStatusFromJSON)
|
|
7673
|
+
};
|
|
7674
|
+
}
|
|
7675
|
+
|
|
7676
|
+
// src/api/checkoutexternal/models/ListCheckoutsResponse.ts
|
|
7677
|
+
function ListCheckoutsResponseFromJSON(json) {
|
|
7678
|
+
return ListCheckoutsResponseFromJSONTyped(json, false);
|
|
7679
|
+
}
|
|
7680
|
+
function ListCheckoutsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7681
|
+
if (json == null) {
|
|
7682
|
+
return json;
|
|
7683
|
+
}
|
|
7684
|
+
return {
|
|
7685
|
+
data: json["data"].map(CheckoutDraftResponseDataFromJSON),
|
|
7686
|
+
params: ListCheckoutsParamsFromJSON(json["params"])
|
|
7687
|
+
};
|
|
7688
|
+
}
|
|
7689
|
+
|
|
7366
7690
|
// src/api/checkoutexternal/models/ListInvoicesParams.ts
|
|
7367
7691
|
function ListInvoicesParamsFromJSON(json) {
|
|
7368
7692
|
return ListInvoicesParamsFromJSONTyped(json, false);
|
|
@@ -7441,6 +7765,7 @@ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscrim
|
|
|
7441
7765
|
}
|
|
7442
7766
|
return {
|
|
7443
7767
|
amountOff: json["amount_off"],
|
|
7768
|
+
currency: json["currency"],
|
|
7444
7769
|
discountAmount: json["discount_amount"],
|
|
7445
7770
|
discounts: json["discounts"].map(
|
|
7446
7771
|
PreviewSubscriptionDiscountResponseDataFromJSON
|
|
@@ -7565,6 +7890,57 @@ function UpdateCheckoutFieldValuesResponseFromJSONTyped(json, ignoreDiscriminato
|
|
|
7565
7890
|
};
|
|
7566
7891
|
}
|
|
7567
7892
|
|
|
7893
|
+
// src/api/checkoutexternal/models/UpdateCheckoutRequest.ts
|
|
7894
|
+
function UpdateCheckoutRequestToJSON(json) {
|
|
7895
|
+
return UpdateCheckoutRequestToJSONTyped(json, false);
|
|
7896
|
+
}
|
|
7897
|
+
function UpdateCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7898
|
+
if (value == null) {
|
|
7899
|
+
return value;
|
|
7900
|
+
}
|
|
7901
|
+
return {
|
|
7902
|
+
add_on_ids: value["addOnIds"].map(
|
|
7903
|
+
UpdateAddOnRequestBodyToJSON
|
|
7904
|
+
),
|
|
7905
|
+
auto_topup_overrides: value["autoTopupOverrides"].map(
|
|
7906
|
+
UpdateAutoTopupOverrideRequestBodyToJSON
|
|
7907
|
+
),
|
|
7908
|
+
billing_entity_id: value["billingEntityId"],
|
|
7909
|
+
coupon_external_id: value["couponExternalId"],
|
|
7910
|
+
credit_bundles: value["creditBundles"].map(
|
|
7911
|
+
UpdateCreditBundleRequestBodyToJSON
|
|
7912
|
+
),
|
|
7913
|
+
currency: value["currency"],
|
|
7914
|
+
custom_field_values: value["customFieldValues"].map(
|
|
7915
|
+
CheckoutFieldValueToJSON
|
|
7916
|
+
),
|
|
7917
|
+
new_plan_id: value["newPlanId"],
|
|
7918
|
+
new_price_id: value["newPriceId"],
|
|
7919
|
+
opt_in_accepted: value["optInAccepted"],
|
|
7920
|
+
pay_in_advance: value["payInAdvance"].map(
|
|
7921
|
+
UpdatePayInAdvanceRequestBodyToJSON
|
|
7922
|
+
),
|
|
7923
|
+
payment_method_id: value["paymentMethodId"],
|
|
7924
|
+
promo_code: value["promoCode"],
|
|
7925
|
+
skip_trial: value["skipTrial"],
|
|
7926
|
+
version: value["version"]
|
|
7927
|
+
};
|
|
7928
|
+
}
|
|
7929
|
+
|
|
7930
|
+
// src/api/checkoutexternal/models/UpdateCheckoutResponse.ts
|
|
7931
|
+
function UpdateCheckoutResponseFromJSON(json) {
|
|
7932
|
+
return UpdateCheckoutResponseFromJSONTyped(json, false);
|
|
7933
|
+
}
|
|
7934
|
+
function UpdateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
7935
|
+
if (json == null) {
|
|
7936
|
+
return json;
|
|
7937
|
+
}
|
|
7938
|
+
return {
|
|
7939
|
+
data: CheckoutDraftResponseDataFromJSON(json["data"]),
|
|
7940
|
+
params: json["params"]
|
|
7941
|
+
};
|
|
7942
|
+
}
|
|
7943
|
+
|
|
7568
7944
|
// src/api/checkoutexternal/models/UpdateCheckoutTaxIDRequestBody.ts
|
|
7569
7945
|
function UpdateCheckoutTaxIDRequestBodyToJSON(json) {
|
|
7570
7946
|
return UpdateCheckoutTaxIDRequestBodyToJSONTyped(json, false);
|
|
@@ -7695,6 +8071,51 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7695
8071
|
const response = await this.checkoutUnsubscribeRaw(initOverrides);
|
|
7696
8072
|
return await response.value();
|
|
7697
8073
|
}
|
|
8074
|
+
/**
|
|
8075
|
+
* Create checkout
|
|
8076
|
+
*/
|
|
8077
|
+
async createCheckoutRaw(requestParameters, initOverrides) {
|
|
8078
|
+
if (requestParameters["createCheckoutRequest"] == null) {
|
|
8079
|
+
throw new RequiredError(
|
|
8080
|
+
"createCheckoutRequest",
|
|
8081
|
+
'Required parameter "createCheckoutRequest" was null or undefined when calling createCheckout().'
|
|
8082
|
+
);
|
|
8083
|
+
}
|
|
8084
|
+
const queryParameters = {};
|
|
8085
|
+
const headerParameters = {};
|
|
8086
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8087
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8088
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8089
|
+
"X-Schematic-Api-Key"
|
|
8090
|
+
);
|
|
8091
|
+
}
|
|
8092
|
+
const response = await this.request(
|
|
8093
|
+
{
|
|
8094
|
+
path: `/checkouts`,
|
|
8095
|
+
method: "POST",
|
|
8096
|
+
headers: headerParameters,
|
|
8097
|
+
query: queryParameters,
|
|
8098
|
+
body: CreateCheckoutRequestToJSON(
|
|
8099
|
+
requestParameters["createCheckoutRequest"]
|
|
8100
|
+
)
|
|
8101
|
+
},
|
|
8102
|
+
initOverrides
|
|
8103
|
+
);
|
|
8104
|
+
return new JSONApiResponse(
|
|
8105
|
+
response,
|
|
8106
|
+
(jsonValue) => CreateCheckoutResponseFromJSON(jsonValue)
|
|
8107
|
+
);
|
|
8108
|
+
}
|
|
8109
|
+
/**
|
|
8110
|
+
* Create checkout
|
|
8111
|
+
*/
|
|
8112
|
+
async createCheckout(requestParameters, initOverrides) {
|
|
8113
|
+
const response = await this.createCheckoutRaw(
|
|
8114
|
+
requestParameters,
|
|
8115
|
+
initOverrides
|
|
8116
|
+
);
|
|
8117
|
+
return await response.value();
|
|
8118
|
+
}
|
|
7698
8119
|
/**
|
|
7699
8120
|
* Create setup intent
|
|
7700
8121
|
*/
|
|
@@ -7803,6 +8224,104 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
7803
8224
|
const response = await this.fetchCustomerBalanceRaw(initOverrides);
|
|
7804
8225
|
return await response.value();
|
|
7805
8226
|
}
|
|
8227
|
+
/**
|
|
8228
|
+
* Finalize checkout
|
|
8229
|
+
*/
|
|
8230
|
+
async finalizeCheckoutRaw(requestParameters, initOverrides) {
|
|
8231
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8232
|
+
throw new RequiredError(
|
|
8233
|
+
"checkoutId",
|
|
8234
|
+
'Required parameter "checkoutId" was null or undefined when calling finalizeCheckout().'
|
|
8235
|
+
);
|
|
8236
|
+
}
|
|
8237
|
+
if (requestParameters["finalizeCheckoutRequest"] == null) {
|
|
8238
|
+
throw new RequiredError(
|
|
8239
|
+
"finalizeCheckoutRequest",
|
|
8240
|
+
'Required parameter "finalizeCheckoutRequest" was null or undefined when calling finalizeCheckout().'
|
|
8241
|
+
);
|
|
8242
|
+
}
|
|
8243
|
+
const queryParameters = {};
|
|
8244
|
+
const headerParameters = {};
|
|
8245
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8246
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8247
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8248
|
+
"X-Schematic-Api-Key"
|
|
8249
|
+
);
|
|
8250
|
+
}
|
|
8251
|
+
const response = await this.request(
|
|
8252
|
+
{
|
|
8253
|
+
path: `/checkouts/{checkout_id}/finalize`.replace(
|
|
8254
|
+
`{${"checkout_id"}}`,
|
|
8255
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8256
|
+
),
|
|
8257
|
+
method: "POST",
|
|
8258
|
+
headers: headerParameters,
|
|
8259
|
+
query: queryParameters,
|
|
8260
|
+
body: FinalizeCheckoutRequestToJSON(
|
|
8261
|
+
requestParameters["finalizeCheckoutRequest"]
|
|
8262
|
+
)
|
|
8263
|
+
},
|
|
8264
|
+
initOverrides
|
|
8265
|
+
);
|
|
8266
|
+
return new JSONApiResponse(
|
|
8267
|
+
response,
|
|
8268
|
+
(jsonValue) => FinalizeCheckoutResponseFromJSON(jsonValue)
|
|
8269
|
+
);
|
|
8270
|
+
}
|
|
8271
|
+
/**
|
|
8272
|
+
* Finalize checkout
|
|
8273
|
+
*/
|
|
8274
|
+
async finalizeCheckout(requestParameters, initOverrides) {
|
|
8275
|
+
const response = await this.finalizeCheckoutRaw(
|
|
8276
|
+
requestParameters,
|
|
8277
|
+
initOverrides
|
|
8278
|
+
);
|
|
8279
|
+
return await response.value();
|
|
8280
|
+
}
|
|
8281
|
+
/**
|
|
8282
|
+
* Get checkout
|
|
8283
|
+
*/
|
|
8284
|
+
async getCheckoutRaw(requestParameters, initOverrides) {
|
|
8285
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8286
|
+
throw new RequiredError(
|
|
8287
|
+
"checkoutId",
|
|
8288
|
+
'Required parameter "checkoutId" was null or undefined when calling getCheckout().'
|
|
8289
|
+
);
|
|
8290
|
+
}
|
|
8291
|
+
const queryParameters = {};
|
|
8292
|
+
const headerParameters = {};
|
|
8293
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8294
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8295
|
+
"X-Schematic-Api-Key"
|
|
8296
|
+
);
|
|
8297
|
+
}
|
|
8298
|
+
const response = await this.request(
|
|
8299
|
+
{
|
|
8300
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8301
|
+
`{${"checkout_id"}}`,
|
|
8302
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8303
|
+
),
|
|
8304
|
+
method: "GET",
|
|
8305
|
+
headers: headerParameters,
|
|
8306
|
+
query: queryParameters
|
|
8307
|
+
},
|
|
8308
|
+
initOverrides
|
|
8309
|
+
);
|
|
8310
|
+
return new JSONApiResponse(
|
|
8311
|
+
response,
|
|
8312
|
+
(jsonValue) => GetCheckoutResponseFromJSON(jsonValue)
|
|
8313
|
+
);
|
|
8314
|
+
}
|
|
8315
|
+
/**
|
|
8316
|
+
* Get checkout
|
|
8317
|
+
*/
|
|
8318
|
+
async getCheckout(requestParameters, initOverrides) {
|
|
8319
|
+
const response = await this.getCheckoutRaw(
|
|
8320
|
+
requestParameters,
|
|
8321
|
+
initOverrides
|
|
8322
|
+
);
|
|
8323
|
+
return await response.value();
|
|
8324
|
+
}
|
|
7806
8325
|
/**
|
|
7807
8326
|
* Get checkout tax ID
|
|
7808
8327
|
*/
|
|
@@ -8111,6 +8630,9 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8111
8630
|
if (requestParameters["catalogId"] != null) {
|
|
8112
8631
|
queryParameters["catalog_id"] = requestParameters["catalogId"];
|
|
8113
8632
|
}
|
|
8633
|
+
if (requestParameters["includeAddOnIds"] != null) {
|
|
8634
|
+
queryParameters["include_add_on_ids"] = requestParameters["includeAddOnIds"];
|
|
8635
|
+
}
|
|
8114
8636
|
const headerParameters = {};
|
|
8115
8637
|
if (this.configuration && this.configuration.apiKey) {
|
|
8116
8638
|
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
@@ -8188,6 +8710,53 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8188
8710
|
);
|
|
8189
8711
|
return await response.value();
|
|
8190
8712
|
}
|
|
8713
|
+
/**
|
|
8714
|
+
* List checkouts
|
|
8715
|
+
*/
|
|
8716
|
+
async listCheckoutsRaw(requestParameters, initOverrides) {
|
|
8717
|
+
const queryParameters = {};
|
|
8718
|
+
if (requestParameters["companyId"] != null) {
|
|
8719
|
+
queryParameters["company_id"] = requestParameters["companyId"];
|
|
8720
|
+
}
|
|
8721
|
+
if (requestParameters["statuses"] != null) {
|
|
8722
|
+
queryParameters["statuses"] = requestParameters["statuses"];
|
|
8723
|
+
}
|
|
8724
|
+
if (requestParameters["limit"] != null) {
|
|
8725
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
8726
|
+
}
|
|
8727
|
+
if (requestParameters["offset"] != null) {
|
|
8728
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
8729
|
+
}
|
|
8730
|
+
const headerParameters = {};
|
|
8731
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8732
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8733
|
+
"X-Schematic-Api-Key"
|
|
8734
|
+
);
|
|
8735
|
+
}
|
|
8736
|
+
const response = await this.request(
|
|
8737
|
+
{
|
|
8738
|
+
path: `/checkouts`,
|
|
8739
|
+
method: "GET",
|
|
8740
|
+
headers: headerParameters,
|
|
8741
|
+
query: queryParameters
|
|
8742
|
+
},
|
|
8743
|
+
initOverrides
|
|
8744
|
+
);
|
|
8745
|
+
return new JSONApiResponse(
|
|
8746
|
+
response,
|
|
8747
|
+
(jsonValue) => ListCheckoutsResponseFromJSON(jsonValue)
|
|
8748
|
+
);
|
|
8749
|
+
}
|
|
8750
|
+
/**
|
|
8751
|
+
* List checkouts
|
|
8752
|
+
*/
|
|
8753
|
+
async listCheckouts(requestParameters = {}, initOverrides) {
|
|
8754
|
+
const response = await this.listCheckoutsRaw(
|
|
8755
|
+
requestParameters,
|
|
8756
|
+
initOverrides
|
|
8757
|
+
);
|
|
8758
|
+
return await response.value();
|
|
8759
|
+
}
|
|
8191
8760
|
/**
|
|
8192
8761
|
* List invoices
|
|
8193
8762
|
*/
|
|
@@ -8274,6 +8843,60 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
8274
8843
|
);
|
|
8275
8844
|
return await response.value();
|
|
8276
8845
|
}
|
|
8846
|
+
/**
|
|
8847
|
+
* Update checkout
|
|
8848
|
+
*/
|
|
8849
|
+
async updateCheckoutRaw(requestParameters, initOverrides) {
|
|
8850
|
+
if (requestParameters["checkoutId"] == null) {
|
|
8851
|
+
throw new RequiredError(
|
|
8852
|
+
"checkoutId",
|
|
8853
|
+
'Required parameter "checkoutId" was null or undefined when calling updateCheckout().'
|
|
8854
|
+
);
|
|
8855
|
+
}
|
|
8856
|
+
if (requestParameters["updateCheckoutRequest"] == null) {
|
|
8857
|
+
throw new RequiredError(
|
|
8858
|
+
"updateCheckoutRequest",
|
|
8859
|
+
'Required parameter "updateCheckoutRequest" was null or undefined when calling updateCheckout().'
|
|
8860
|
+
);
|
|
8861
|
+
}
|
|
8862
|
+
const queryParameters = {};
|
|
8863
|
+
const headerParameters = {};
|
|
8864
|
+
headerParameters["Content-Type"] = "application/json";
|
|
8865
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8866
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
8867
|
+
"X-Schematic-Api-Key"
|
|
8868
|
+
);
|
|
8869
|
+
}
|
|
8870
|
+
const response = await this.request(
|
|
8871
|
+
{
|
|
8872
|
+
path: `/checkouts/{checkout_id}`.replace(
|
|
8873
|
+
`{${"checkout_id"}}`,
|
|
8874
|
+
encodeURIComponent(String(requestParameters["checkoutId"]))
|
|
8875
|
+
),
|
|
8876
|
+
method: "PUT",
|
|
8877
|
+
headers: headerParameters,
|
|
8878
|
+
query: queryParameters,
|
|
8879
|
+
body: UpdateCheckoutRequestToJSON(
|
|
8880
|
+
requestParameters["updateCheckoutRequest"]
|
|
8881
|
+
)
|
|
8882
|
+
},
|
|
8883
|
+
initOverrides
|
|
8884
|
+
);
|
|
8885
|
+
return new JSONApiResponse(
|
|
8886
|
+
response,
|
|
8887
|
+
(jsonValue) => UpdateCheckoutResponseFromJSON(jsonValue)
|
|
8888
|
+
);
|
|
8889
|
+
}
|
|
8890
|
+
/**
|
|
8891
|
+
* Update checkout
|
|
8892
|
+
*/
|
|
8893
|
+
async updateCheckout(requestParameters, initOverrides) {
|
|
8894
|
+
const response = await this.updateCheckoutRaw(
|
|
8895
|
+
requestParameters,
|
|
8896
|
+
initOverrides
|
|
8897
|
+
);
|
|
8898
|
+
return await response.value();
|
|
8899
|
+
}
|
|
8277
8900
|
/**
|
|
8278
8901
|
* Update checkout field values
|
|
8279
8902
|
*/
|
|
@@ -13054,6 +13677,12 @@ function getSubscriptionPeriod(billingSubscription) {
|
|
|
13054
13677
|
);
|
|
13055
13678
|
return derivePeriod(product?.interval, product?.intervalCount) ?? derivePeriod(billingSubscription.interval);
|
|
13056
13679
|
}
|
|
13680
|
+
function getDefaultPlanPeriod(plans = []) {
|
|
13681
|
+
if (plans.some((plan) => plan.monthlyPrice)) return "month";
|
|
13682
|
+
if (plans.some((plan) => plan.quarterlyPrice)) return "quarter";
|
|
13683
|
+
if (plans.some((plan) => plan.yearlyPrice)) return "year";
|
|
13684
|
+
return "month";
|
|
13685
|
+
}
|
|
13057
13686
|
var ChargeType = {
|
|
13058
13687
|
oneTime: "one_time",
|
|
13059
13688
|
recurring: "recurring",
|
|
@@ -14921,7 +15550,7 @@ var reducer = (state, action) => {
|
|
|
14921
15550
|
// src/context/EmbedProvider.tsx
|
|
14922
15551
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
14923
15552
|
var getCustomHeaders = (sessionId) => ({
|
|
14924
|
-
"X-Schematic-Components-Version": "2.
|
|
15553
|
+
"X-Schematic-Components-Version": "2.28.0",
|
|
14925
15554
|
"X-Schematic-Session-ID": sessionId
|
|
14926
15555
|
});
|
|
14927
15556
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -15119,6 +15748,34 @@ var EmbedProvider = ({
|
|
|
15119
15748
|
),
|
|
15120
15749
|
[hydrateExternal]
|
|
15121
15750
|
);
|
|
15751
|
+
const rehydrateWithParams = useCallback2(
|
|
15752
|
+
async (params) => {
|
|
15753
|
+
const componentId = state.data?.component?.id;
|
|
15754
|
+
if (!componentId || !checkoutApi) {
|
|
15755
|
+
throw new Error(
|
|
15756
|
+
"[Schematic] `rehydrateWithParams` needs a `SchematicEmbed` that has loaded."
|
|
15757
|
+
);
|
|
15758
|
+
}
|
|
15759
|
+
const response = await checkoutApi.hydrateComponent({
|
|
15760
|
+
componentId,
|
|
15761
|
+
includeAddOnIds: params.includeAddOnIds
|
|
15762
|
+
});
|
|
15763
|
+
const returnedIds = new Set(
|
|
15764
|
+
response.data.activeAddOns.map((addOn) => addOn.id)
|
|
15765
|
+
);
|
|
15766
|
+
const missingIds = (params.includeAddOnIds ?? []).filter(
|
|
15767
|
+
(id) => !returnedIds.has(id)
|
|
15768
|
+
);
|
|
15769
|
+
if (missingIds.length > 0) {
|
|
15770
|
+
console.warn(
|
|
15771
|
+
`[Schematic] These included add-ons were left out because each must be an add-on with a billing product: ${missingIds.join(", ")}`
|
|
15772
|
+
);
|
|
15773
|
+
}
|
|
15774
|
+
dispatch({ type: "HYDRATE_COMPONENT", data: response.data });
|
|
15775
|
+
return response.data;
|
|
15776
|
+
},
|
|
15777
|
+
[checkoutApi, state.data?.component?.id]
|
|
15778
|
+
);
|
|
15122
15779
|
const createSetupIntent = useCallback2(async () => {
|
|
15123
15780
|
return checkoutApi?.createSetupIntent();
|
|
15124
15781
|
}, [checkoutApi]);
|
|
@@ -15462,6 +16119,7 @@ var EmbedProvider = ({
|
|
|
15462
16119
|
hydrate: debouncedHydrate,
|
|
15463
16120
|
hydrateComponent: debouncedHydrateComponent,
|
|
15464
16121
|
hydrateExternal: debouncedHydrateExternal,
|
|
16122
|
+
rehydrateWithParams,
|
|
15465
16123
|
createSetupIntent: debouncedCreateSetupIntent,
|
|
15466
16124
|
updatePaymentMethod: debouncedUpdatePaymentMethod,
|
|
15467
16125
|
deletePaymentMethod: debouncedDeletePaymentMethod,
|
|
@@ -19249,7 +19907,7 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19249
19907
|
[data?.featureUsage?.features]
|
|
19250
19908
|
);
|
|
19251
19909
|
const getValidatedPeriod = () => {
|
|
19252
|
-
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
19910
|
+
const requestedPeriod = checkoutState?.period || getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans);
|
|
19253
19911
|
if (checkoutState?.planId) {
|
|
19254
19912
|
const requestedPlan = data?.activePlans?.find(
|
|
19255
19913
|
(plan) => plan.id === checkoutState.planId
|
|
@@ -25678,7 +26336,7 @@ PaymentMethod.displayName = "PaymentMethod";
|
|
|
25678
26336
|
// src/components/elements/payment-method/PaymentMethodDetails.tsx
|
|
25679
26337
|
import { Elements } from "@stripe/react-stripe-js";
|
|
25680
26338
|
|
|
25681
|
-
// node_modules/.pnpm/@stripe+stripe-js@9.
|
|
26339
|
+
// node_modules/.pnpm/@stripe+stripe-js@9.17.0/node_modules/@stripe/stripe-js/dist/index.mjs
|
|
25682
26340
|
function _typeof(obj) {
|
|
25683
26341
|
"@babel/helpers - typeof";
|
|
25684
26342
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -25732,7 +26390,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
|
|
|
25732
26390
|
}
|
|
25733
26391
|
stripe._registerWrapper({
|
|
25734
26392
|
name: "stripe-js",
|
|
25735
|
-
version: "9.
|
|
26393
|
+
version: "9.17.0",
|
|
25736
26394
|
startTime
|
|
25737
26395
|
});
|
|
25738
26396
|
};
|
|
@@ -25810,7 +26468,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
|
|
|
25810
26468
|
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
25811
26469
|
var expectedVersion = RELEASE_TRAIN;
|
|
25812
26470
|
if (isTestKey && version !== expectedVersion) {
|
|
25813
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
26471
|
+
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"));
|
|
25814
26472
|
}
|
|
25815
26473
|
var stripe = maybeStripe.apply(void 0, args);
|
|
25816
26474
|
registerWrapper(stripe, startTime);
|
|
@@ -28063,7 +28721,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
|
|
|
28063
28721
|
[]
|
|
28064
28722
|
);
|
|
28065
28723
|
const [selectedPeriod, setSelectedPeriod] = useState21(
|
|
28066
|
-
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod ||
|
|
28724
|
+
() => getSubscriptionPeriod(data?.company?.billingSubscription) || data?.company?.plan?.planPeriod || getDefaultPlanPeriod(data?.activePlans)
|
|
28067
28725
|
);
|
|
28068
28726
|
const { currencies, invalidFilterEntries } = useAvailableCurrenciesWithInvalid();
|
|
28069
28727
|
const [selectedCurrency, setSelectedCurrency] = useState21(
|