@schematichq/schematic-components 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/schematic-components.cjs.js +696 -200
- package/dist/schematic-components.d.ts +923 -412
- package/dist/schematic-components.esm.js +735 -239
- package/package.json +19 -26
|
@@ -4915,6 +4915,46 @@ var JSONApiResponse = class {
|
|
|
4915
4915
|
}
|
|
4916
4916
|
};
|
|
4917
4917
|
|
|
4918
|
+
// src/api/checkoutexternal/models/BillingCreditBundleStatus.ts
|
|
4919
|
+
function BillingCreditBundleStatusFromJSON(json) {
|
|
4920
|
+
return BillingCreditBundleStatusFromJSONTyped(json, false);
|
|
4921
|
+
}
|
|
4922
|
+
function BillingCreditBundleStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
4923
|
+
return json;
|
|
4924
|
+
}
|
|
4925
|
+
|
|
4926
|
+
// src/api/checkoutexternal/models/BillingCreditBundleType.ts
|
|
4927
|
+
function BillingCreditBundleTypeFromJSON(json) {
|
|
4928
|
+
return BillingCreditBundleTypeFromJSONTyped(json, false);
|
|
4929
|
+
}
|
|
4930
|
+
function BillingCreditBundleTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
4931
|
+
return json;
|
|
4932
|
+
}
|
|
4933
|
+
|
|
4934
|
+
// src/api/checkoutexternal/models/BillingCreditExpiryType.ts
|
|
4935
|
+
function BillingCreditExpiryTypeFromJSON(json) {
|
|
4936
|
+
return BillingCreditExpiryTypeFromJSONTyped(json, false);
|
|
4937
|
+
}
|
|
4938
|
+
function BillingCreditExpiryTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
4939
|
+
return json;
|
|
4940
|
+
}
|
|
4941
|
+
|
|
4942
|
+
// src/api/checkoutexternal/models/BillingProductPriceInterval.ts
|
|
4943
|
+
function BillingProductPriceIntervalFromJSON(json) {
|
|
4944
|
+
return BillingProductPriceIntervalFromJSONTyped(json, false);
|
|
4945
|
+
}
|
|
4946
|
+
function BillingProductPriceIntervalFromJSONTyped(json, ignoreDiscriminator) {
|
|
4947
|
+
return json;
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4950
|
+
// src/api/checkoutexternal/models/BillingTiersMode.ts
|
|
4951
|
+
function BillingTiersModeFromJSON(json) {
|
|
4952
|
+
return BillingTiersModeFromJSONTyped(json, false);
|
|
4953
|
+
}
|
|
4954
|
+
function BillingTiersModeFromJSONTyped(json, ignoreDiscriminator) {
|
|
4955
|
+
return json;
|
|
4956
|
+
}
|
|
4957
|
+
|
|
4918
4958
|
// src/api/checkoutexternal/models/BillingProductPriceResponseData.ts
|
|
4919
4959
|
function BillingProductPriceResponseDataFromJSON(json) {
|
|
4920
4960
|
return BillingProductPriceResponseDataFromJSONTyped(json, false);
|
|
@@ -4928,7 +4968,7 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
4928
4968
|
createdAt: new Date(json["created_at"]),
|
|
4929
4969
|
currency: json["currency"],
|
|
4930
4970
|
id: json["id"],
|
|
4931
|
-
interval: json["interval"],
|
|
4971
|
+
interval: BillingProductPriceIntervalFromJSON(json["interval"]),
|
|
4932
4972
|
isActive: json["is_active"],
|
|
4933
4973
|
meterId: json["meter_id"] == null ? void 0 : json["meter_id"],
|
|
4934
4974
|
packageSize: json["package_size"],
|
|
@@ -4936,12 +4976,20 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
4936
4976
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
4937
4977
|
priceExternalId: json["price_external_id"],
|
|
4938
4978
|
productExternalId: json["product_external_id"],
|
|
4939
|
-
tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
|
|
4979
|
+
tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"]),
|
|
4940
4980
|
updatedAt: new Date(json["updated_at"]),
|
|
4941
4981
|
usageType: json["usage_type"]
|
|
4942
4982
|
};
|
|
4943
4983
|
}
|
|
4944
4984
|
|
|
4985
|
+
// src/api/checkoutexternal/models/BillingCreditExpiryUnit.ts
|
|
4986
|
+
function BillingCreditExpiryUnitFromJSON(json) {
|
|
4987
|
+
return BillingCreditExpiryUnitFromJSONTyped(json, false);
|
|
4988
|
+
}
|
|
4989
|
+
function BillingCreditExpiryUnitFromJSONTyped(json, ignoreDiscriminator) {
|
|
4990
|
+
return json;
|
|
4991
|
+
}
|
|
4992
|
+
|
|
4945
4993
|
// src/api/checkoutexternal/models/BillingCreditBundleView.ts
|
|
4946
4994
|
function BillingCreditBundleViewFromJSON(json) {
|
|
4947
4995
|
return BillingCreditBundleViewFromJSONTyped(json, false);
|
|
@@ -4952,14 +5000,14 @@ function BillingCreditBundleViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4952
5000
|
}
|
|
4953
5001
|
return {
|
|
4954
5002
|
billingInvoiceId: json["billing_invoice_id"] == null ? void 0 : json["billing_invoice_id"],
|
|
4955
|
-
bundleType: json["bundle_type"],
|
|
5003
|
+
bundleType: BillingCreditBundleTypeFromJSON(json["bundle_type"]),
|
|
4956
5004
|
createdAt: new Date(json["created_at"]),
|
|
4957
5005
|
creditDescription: json["credit_description"] == null ? void 0 : json["credit_description"],
|
|
4958
5006
|
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
4959
5007
|
creditId: json["credit_id"],
|
|
4960
5008
|
creditName: json["credit_name"],
|
|
4961
|
-
expiryType: json["expiry_type"],
|
|
4962
|
-
expiryUnit: json["expiry_unit"],
|
|
5009
|
+
expiryType: BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
|
|
5010
|
+
expiryUnit: BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
|
|
4963
5011
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
4964
5012
|
hasGrants: json["has_grants"],
|
|
4965
5013
|
id: json["id"],
|
|
@@ -4968,12 +5016,36 @@ function BillingCreditBundleViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4968
5016
|
price: json["price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["price"]),
|
|
4969
5017
|
quantity: json["quantity"] == null ? void 0 : json["quantity"],
|
|
4970
5018
|
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
4971
|
-
status: json["status"],
|
|
5019
|
+
status: BillingCreditBundleStatusFromJSON(json["status"]),
|
|
4972
5020
|
unitPrice: json["unit_price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["unit_price"]),
|
|
4973
5021
|
updatedAt: new Date(json["updated_at"])
|
|
4974
5022
|
};
|
|
4975
5023
|
}
|
|
4976
5024
|
|
|
5025
|
+
// src/api/checkoutexternal/models/BillingCreditBurnStrategy.ts
|
|
5026
|
+
function BillingCreditBurnStrategyFromJSON(json) {
|
|
5027
|
+
return BillingCreditBurnStrategyFromJSONTyped(json, false);
|
|
5028
|
+
}
|
|
5029
|
+
function BillingCreditBurnStrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
5030
|
+
return json;
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
// src/api/checkoutexternal/models/BillingCreditGrantReason.ts
|
|
5034
|
+
function BillingCreditGrantReasonFromJSON(json) {
|
|
5035
|
+
return BillingCreditGrantReasonFromJSONTyped(json, false);
|
|
5036
|
+
}
|
|
5037
|
+
function BillingCreditGrantReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
5038
|
+
return json;
|
|
5039
|
+
}
|
|
5040
|
+
|
|
5041
|
+
// src/api/checkoutexternal/models/BillingCreditGrantZeroedOutReason.ts
|
|
5042
|
+
function BillingCreditGrantZeroedOutReasonFromJSON(json) {
|
|
5043
|
+
return BillingCreditGrantZeroedOutReasonFromJSONTyped(json, false);
|
|
5044
|
+
}
|
|
5045
|
+
function BillingCreditGrantZeroedOutReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
5046
|
+
return json;
|
|
5047
|
+
}
|
|
5048
|
+
|
|
4977
5049
|
// src/api/checkoutexternal/models/BillingProductResponseData.ts
|
|
4978
5050
|
function BillingProductResponseDataFromJSON(json) {
|
|
4979
5051
|
return BillingProductResponseDataFromJSONTyped(json, false);
|
|
@@ -5010,13 +5082,21 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5010
5082
|
currency: json["currency"],
|
|
5011
5083
|
externalPriceId: json["external_price_id"],
|
|
5012
5084
|
id: json["id"],
|
|
5013
|
-
interval: json["interval"],
|
|
5085
|
+
interval: BillingProductPriceIntervalFromJSON(json["interval"]),
|
|
5014
5086
|
price: json["price"],
|
|
5015
5087
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
5016
5088
|
scheme: json["scheme"]
|
|
5017
5089
|
};
|
|
5018
5090
|
}
|
|
5019
5091
|
|
|
5092
|
+
// src/api/checkoutexternal/models/BillingCreditRolloverPolicy.ts
|
|
5093
|
+
function BillingCreditRolloverPolicyFromJSON(json) {
|
|
5094
|
+
return BillingCreditRolloverPolicyFromJSONTyped(json, false);
|
|
5095
|
+
}
|
|
5096
|
+
function BillingCreditRolloverPolicyFromJSONTyped(json, ignoreDiscriminator) {
|
|
5097
|
+
return json;
|
|
5098
|
+
}
|
|
5099
|
+
|
|
5020
5100
|
// src/api/checkoutexternal/models/BillingCreditResponseData.ts
|
|
5021
5101
|
function BillingCreditResponseDataFromJSON(json) {
|
|
5022
5102
|
return BillingCreditResponseDataFromJSONTyped(json, false);
|
|
@@ -5026,11 +5106,15 @@ function BillingCreditResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5026
5106
|
return json;
|
|
5027
5107
|
}
|
|
5028
5108
|
return {
|
|
5029
|
-
burnStrategy: json["burn_strategy"],
|
|
5109
|
+
burnStrategy: BillingCreditBurnStrategyFromJSON(json["burn_strategy"]),
|
|
5030
5110
|
createdAt: new Date(json["created_at"]),
|
|
5031
|
-
defaultExpiryUnit:
|
|
5111
|
+
defaultExpiryUnit: BillingCreditExpiryUnitFromJSON(
|
|
5112
|
+
json["default_expiry_unit"]
|
|
5113
|
+
),
|
|
5032
5114
|
defaultExpiryUnitCount: json["default_expiry_unit_count"] == null ? void 0 : json["default_expiry_unit_count"],
|
|
5033
|
-
defaultRolloverPolicy:
|
|
5115
|
+
defaultRolloverPolicy: BillingCreditRolloverPolicyFromJSON(
|
|
5116
|
+
json["default_rollover_policy"]
|
|
5117
|
+
),
|
|
5034
5118
|
description: json["description"],
|
|
5035
5119
|
icon: json["icon"] == null ? void 0 : json["icon"],
|
|
5036
5120
|
id: json["id"],
|
|
@@ -5043,6 +5127,30 @@ function BillingCreditResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5043
5127
|
};
|
|
5044
5128
|
}
|
|
5045
5129
|
|
|
5130
|
+
// src/api/checkoutexternal/models/BillingPlanCreditGrantResetCadence.ts
|
|
5131
|
+
function BillingPlanCreditGrantResetCadenceFromJSON(json) {
|
|
5132
|
+
return BillingPlanCreditGrantResetCadenceFromJSONTyped(json, false);
|
|
5133
|
+
}
|
|
5134
|
+
function BillingPlanCreditGrantResetCadenceFromJSONTyped(json, ignoreDiscriminator) {
|
|
5135
|
+
return json;
|
|
5136
|
+
}
|
|
5137
|
+
|
|
5138
|
+
// src/api/checkoutexternal/models/BillingPlanCreditGrantResetStart.ts
|
|
5139
|
+
function BillingPlanCreditGrantResetStartFromJSON(json) {
|
|
5140
|
+
return BillingPlanCreditGrantResetStartFromJSONTyped(json, false);
|
|
5141
|
+
}
|
|
5142
|
+
function BillingPlanCreditGrantResetStartFromJSONTyped(json, ignoreDiscriminator) {
|
|
5143
|
+
return json;
|
|
5144
|
+
}
|
|
5145
|
+
|
|
5146
|
+
// src/api/checkoutexternal/models/BillingPlanCreditGrantResetType.ts
|
|
5147
|
+
function BillingPlanCreditGrantResetTypeFromJSON(json) {
|
|
5148
|
+
return BillingPlanCreditGrantResetTypeFromJSONTyped(json, false);
|
|
5149
|
+
}
|
|
5150
|
+
function BillingPlanCreditGrantResetTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5151
|
+
return json;
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5046
5154
|
// src/api/checkoutexternal/models/BillingPlanCreditGrantResponseData.ts
|
|
5047
5155
|
function BillingPlanCreditGrantResponseDataFromJSON(json) {
|
|
5048
5156
|
return BillingPlanCreditGrantResponseDataFromJSONTyped(json, false);
|
|
@@ -5055,8 +5163,8 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
|
|
|
5055
5163
|
autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
|
|
5056
5164
|
autoTopupAmountType: json["auto_topup_amount_type"] == null ? void 0 : json["auto_topup_amount_type"],
|
|
5057
5165
|
autoTopupEnabled: json["auto_topup_enabled"],
|
|
5058
|
-
autoTopupExpiryType: json["auto_topup_expiry_type"] == null ? void 0 : json["auto_topup_expiry_type"],
|
|
5059
|
-
autoTopupExpiryUnit: json["auto_topup_expiry_unit"] == null ? void 0 : json["auto_topup_expiry_unit"],
|
|
5166
|
+
autoTopupExpiryType: json["auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["auto_topup_expiry_type"]),
|
|
5167
|
+
autoTopupExpiryUnit: json["auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["auto_topup_expiry_unit"]),
|
|
5060
5168
|
autoTopupExpiryUnitCount: json["auto_topup_expiry_unit_count"] == null ? void 0 : json["auto_topup_expiry_unit_count"],
|
|
5061
5169
|
autoTopupThresholdPercent: json["auto_topup_threshold_percent"] == null ? void 0 : json["auto_topup_threshold_percent"],
|
|
5062
5170
|
createdAt: new Date(json["created_at"]),
|
|
@@ -5065,19 +5173,29 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
|
|
|
5065
5173
|
creditName: json["credit_name"],
|
|
5066
5174
|
creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
|
|
5067
5175
|
creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
|
|
5068
|
-
expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
|
|
5069
|
-
expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
|
|
5176
|
+
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
|
|
5177
|
+
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
|
|
5070
5178
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
5071
5179
|
id: json["id"],
|
|
5072
5180
|
planId: json["plan_id"],
|
|
5073
5181
|
planName: json["plan_name"],
|
|
5074
|
-
resetCadence:
|
|
5075
|
-
|
|
5076
|
-
|
|
5182
|
+
resetCadence: BillingPlanCreditGrantResetCadenceFromJSON(
|
|
5183
|
+
json["reset_cadence"]
|
|
5184
|
+
),
|
|
5185
|
+
resetStart: BillingPlanCreditGrantResetStartFromJSON(json["reset_start"]),
|
|
5186
|
+
resetType: json["reset_type"] == null ? void 0 : BillingPlanCreditGrantResetTypeFromJSON(json["reset_type"]),
|
|
5077
5187
|
updatedAt: new Date(json["updated_at"])
|
|
5078
5188
|
};
|
|
5079
5189
|
}
|
|
5080
5190
|
|
|
5191
|
+
// src/api/checkoutexternal/models/BillingPriceUsageType.ts
|
|
5192
|
+
function BillingPriceUsageTypeFromJSON(json) {
|
|
5193
|
+
return BillingPriceUsageTypeFromJSONTyped(json, false);
|
|
5194
|
+
}
|
|
5195
|
+
function BillingPriceUsageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5196
|
+
return json;
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5081
5199
|
// src/api/checkoutexternal/models/BillingProductPriceTierResponseData.ts
|
|
5082
5200
|
function BillingProductPriceTierResponseDataFromJSON(json) {
|
|
5083
5201
|
return BillingProductPriceTierResponseDataFromJSONTyped(json, false);
|
|
@@ -5107,7 +5225,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5107
5225
|
createdAt: new Date(json["created_at"]),
|
|
5108
5226
|
currency: json["currency"],
|
|
5109
5227
|
id: json["id"],
|
|
5110
|
-
interval: json["interval"],
|
|
5228
|
+
interval: BillingProductPriceIntervalFromJSON(json["interval"]),
|
|
5111
5229
|
isActive: json["is_active"],
|
|
5112
5230
|
meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
|
|
5113
5231
|
meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
|
|
@@ -5123,7 +5241,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5123
5241
|
productExternalId: json["product_external_id"],
|
|
5124
5242
|
productId: json["product_id"],
|
|
5125
5243
|
productName: json["product_name"],
|
|
5126
|
-
tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
|
|
5244
|
+
tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON(json["tiers_mode"]),
|
|
5127
5245
|
updatedAt: new Date(json["updated_at"]),
|
|
5128
5246
|
usageType: json["usage_type"]
|
|
5129
5247
|
};
|
|
@@ -5188,7 +5306,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
|
|
|
5188
5306
|
subscriptionId: json["subscription_id"],
|
|
5189
5307
|
subscriptionItemExternalId: json["subscription_item_external_id"] == null ? void 0 : json["subscription_item_external_id"],
|
|
5190
5308
|
updatedAt: new Date(json["updated_at"]),
|
|
5191
|
-
usageType: json["usage_type"]
|
|
5309
|
+
usageType: BillingPriceUsageTypeFromJSON(json["usage_type"])
|
|
5192
5310
|
};
|
|
5193
5311
|
}
|
|
5194
5312
|
|
|
@@ -5218,6 +5336,14 @@ function BillingSubscriptionDiscountViewFromJSONTyped(json, ignoreDiscriminator)
|
|
|
5218
5336
|
};
|
|
5219
5337
|
}
|
|
5220
5338
|
|
|
5339
|
+
// src/api/checkoutexternal/models/BillingSubscriptionTrialEndSetting.ts
|
|
5340
|
+
function BillingSubscriptionTrialEndSettingFromJSON(json) {
|
|
5341
|
+
return BillingSubscriptionTrialEndSettingFromJSONTyped(json, false);
|
|
5342
|
+
}
|
|
5343
|
+
function BillingSubscriptionTrialEndSettingFromJSONTyped(json, ignoreDiscriminator) {
|
|
5344
|
+
return json;
|
|
5345
|
+
}
|
|
5346
|
+
|
|
5221
5347
|
// src/api/checkoutexternal/models/InvoiceResponseData.ts
|
|
5222
5348
|
function InvoiceResponseDataFromJSON(json) {
|
|
5223
5349
|
return InvoiceResponseDataFromJSONTyped(json, false);
|
|
@@ -5311,7 +5437,7 @@ function BillingSubscriptionViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5311
5437
|
subscriptionExternalId: json["subscription_external_id"],
|
|
5312
5438
|
totalPrice: json["total_price"],
|
|
5313
5439
|
trialEnd: json["trial_end"] == null ? void 0 : json["trial_end"],
|
|
5314
|
-
trialEndSetting: json["trial_end_setting"] == null ? void 0 : json["trial_end_setting"]
|
|
5440
|
+
trialEndSetting: json["trial_end_setting"] == null ? void 0 : BillingSubscriptionTrialEndSettingFromJSON(json["trial_end_setting"])
|
|
5315
5441
|
};
|
|
5316
5442
|
}
|
|
5317
5443
|
|
|
@@ -5372,6 +5498,14 @@ function ChangeSubscriptionRequestBodyToJSON(value) {
|
|
|
5372
5498
|
};
|
|
5373
5499
|
}
|
|
5374
5500
|
|
|
5501
|
+
// src/api/checkoutexternal/models/ChargeType.ts
|
|
5502
|
+
function ChargeTypeFromJSON(json) {
|
|
5503
|
+
return ChargeTypeFromJSONTyped(json, false);
|
|
5504
|
+
}
|
|
5505
|
+
function ChargeTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5506
|
+
return json;
|
|
5507
|
+
}
|
|
5508
|
+
|
|
5375
5509
|
// src/api/checkoutexternal/models/CheckoutResponseData.ts
|
|
5376
5510
|
function CheckoutResponseDataFromJSON(json) {
|
|
5377
5511
|
return CheckoutResponseDataFromJSONTyped(json, false);
|
|
@@ -5401,7 +5535,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5401
5535
|
subscriptionExternalId: json["subscription_external_id"],
|
|
5402
5536
|
totalPrice: json["total_price"],
|
|
5403
5537
|
trialEnd: json["trial_end"] == null ? void 0 : json["trial_end"],
|
|
5404
|
-
trialEndSetting: json["trial_end_setting"] == null ? void 0 : json["trial_end_setting"]
|
|
5538
|
+
trialEndSetting: json["trial_end_setting"] == null ? void 0 : BillingSubscriptionTrialEndSettingFromJSON(json["trial_end_setting"])
|
|
5405
5539
|
};
|
|
5406
5540
|
}
|
|
5407
5541
|
|
|
@@ -5508,8 +5642,12 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5508
5642
|
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
5509
5643
|
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
5510
5644
|
billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
|
|
5511
|
-
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 :
|
|
5512
|
-
|
|
5645
|
+
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(
|
|
5646
|
+
json["billing_credit_auto_topup_expiry_type"]
|
|
5647
|
+
),
|
|
5648
|
+
billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(
|
|
5649
|
+
json["billing_credit_auto_topup_expiry_unit"]
|
|
5650
|
+
),
|
|
5513
5651
|
billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
|
|
5514
5652
|
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
5515
5653
|
createdAt: new Date(json["created_at"]),
|
|
@@ -5518,16 +5656,18 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5518
5656
|
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
5519
5657
|
creditId: json["credit_id"],
|
|
5520
5658
|
creditName: json["credit_name"],
|
|
5521
|
-
expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
|
|
5522
|
-
expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
|
|
5659
|
+
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
|
|
5660
|
+
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
|
|
5523
5661
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
5524
5662
|
id: json["id"],
|
|
5525
5663
|
planId: json["plan_id"],
|
|
5526
5664
|
planName: json["plan_name"],
|
|
5527
5665
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
5528
|
-
resetCadence:
|
|
5529
|
-
|
|
5530
|
-
|
|
5666
|
+
resetCadence: BillingPlanCreditGrantResetCadenceFromJSON(
|
|
5667
|
+
json["reset_cadence"]
|
|
5668
|
+
),
|
|
5669
|
+
resetStart: BillingPlanCreditGrantResetStartFromJSON(json["reset_start"]),
|
|
5670
|
+
resetType: BillingPlanCreditGrantResetTypeFromJSON(json["reset_type"]),
|
|
5531
5671
|
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
5532
5672
|
updatedAt: new Date(json["updated_at"])
|
|
5533
5673
|
};
|
|
@@ -5557,6 +5697,14 @@ function CompanyPlanWithBillingSubViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5557
5697
|
};
|
|
5558
5698
|
}
|
|
5559
5699
|
|
|
5700
|
+
// src/api/checkoutexternal/models/EntityType.ts
|
|
5701
|
+
function EntityTypeFromJSON(json) {
|
|
5702
|
+
return EntityTypeFromJSONTyped(json, false);
|
|
5703
|
+
}
|
|
5704
|
+
function EntityTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5705
|
+
return json;
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5560
5708
|
// src/api/checkoutexternal/models/EntityKeyDefinitionResponseData.ts
|
|
5561
5709
|
function EntityKeyDefinitionResponseDataFromJSON(json) {
|
|
5562
5710
|
return EntityKeyDefinitionResponseDataFromJSONTyped(json, false);
|
|
@@ -5567,7 +5715,7 @@ function EntityKeyDefinitionResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
5567
5715
|
}
|
|
5568
5716
|
return {
|
|
5569
5717
|
createdAt: new Date(json["created_at"]),
|
|
5570
|
-
entityType: json["entity_type"],
|
|
5718
|
+
entityType: EntityTypeFromJSON(json["entity_type"]),
|
|
5571
5719
|
id: json["id"],
|
|
5572
5720
|
key: json["key"],
|
|
5573
5721
|
updatedAt: new Date(json["updated_at"])
|
|
@@ -5587,7 +5735,7 @@ function EntityKeyDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5587
5735
|
definition: json["definition"] == null ? void 0 : EntityKeyDefinitionResponseDataFromJSON(json["definition"]),
|
|
5588
5736
|
definitionId: json["definition_id"],
|
|
5589
5737
|
entityId: json["entity_id"],
|
|
5590
|
-
entityType: json["entity_type"],
|
|
5738
|
+
entityType: EntityTypeFromJSON(json["entity_type"]),
|
|
5591
5739
|
environmentId: json["environment_id"],
|
|
5592
5740
|
id: json["id"],
|
|
5593
5741
|
key: json["key"],
|
|
@@ -5596,6 +5744,14 @@ function EntityKeyDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5596
5744
|
};
|
|
5597
5745
|
}
|
|
5598
5746
|
|
|
5747
|
+
// src/api/checkoutexternal/models/TraitType.ts
|
|
5748
|
+
function TraitTypeFromJSON(json) {
|
|
5749
|
+
return TraitTypeFromJSONTyped(json, false);
|
|
5750
|
+
}
|
|
5751
|
+
function TraitTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5752
|
+
return json;
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5599
5755
|
// src/api/checkoutexternal/models/EntityTraitDefinitionResponseData.ts
|
|
5600
5756
|
function EntityTraitDefinitionResponseDataFromJSON(json) {
|
|
5601
5757
|
return EntityTraitDefinitionResponseDataFromJSONTyped(json, false);
|
|
@@ -5607,10 +5763,10 @@ function EntityTraitDefinitionResponseDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
5607
5763
|
return {
|
|
5608
5764
|
createdAt: new Date(json["created_at"]),
|
|
5609
5765
|
displayName: json["display_name"],
|
|
5610
|
-
entityType: json["entity_type"],
|
|
5766
|
+
entityType: EntityTypeFromJSON(json["entity_type"]),
|
|
5611
5767
|
hierarchy: json["hierarchy"],
|
|
5612
5768
|
id: json["id"],
|
|
5613
|
-
traitType: json["trait_type"],
|
|
5769
|
+
traitType: TraitTypeFromJSON(json["trait_type"]),
|
|
5614
5770
|
updatedAt: new Date(json["updated_at"])
|
|
5615
5771
|
};
|
|
5616
5772
|
}
|
|
@@ -5644,7 +5800,7 @@ function TraitDefinitionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5644
5800
|
}
|
|
5645
5801
|
return {
|
|
5646
5802
|
comparableType: json["comparable_type"],
|
|
5647
|
-
entityType: json["entity_type"],
|
|
5803
|
+
entityType: EntityTypeFromJSON(json["entity_type"]),
|
|
5648
5804
|
id: json["id"]
|
|
5649
5805
|
};
|
|
5650
5806
|
}
|
|
@@ -5790,6 +5946,30 @@ function CompanyOverrideNoteResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
5790
5946
|
};
|
|
5791
5947
|
}
|
|
5792
5948
|
|
|
5949
|
+
// src/api/checkoutexternal/models/EntitlementValueType.ts
|
|
5950
|
+
function EntitlementValueTypeFromJSON(json) {
|
|
5951
|
+
return EntitlementValueTypeFromJSONTyped(json, false);
|
|
5952
|
+
}
|
|
5953
|
+
function EntitlementValueTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5954
|
+
return json;
|
|
5955
|
+
}
|
|
5956
|
+
|
|
5957
|
+
// src/api/checkoutexternal/models/FeatureType.ts
|
|
5958
|
+
function FeatureTypeFromJSON(json) {
|
|
5959
|
+
return FeatureTypeFromJSONTyped(json, false);
|
|
5960
|
+
}
|
|
5961
|
+
function FeatureTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5962
|
+
return json;
|
|
5963
|
+
}
|
|
5964
|
+
|
|
5965
|
+
// src/api/checkoutexternal/models/FeatureLifecyclePhase.ts
|
|
5966
|
+
function FeatureLifecyclePhaseFromJSON(json) {
|
|
5967
|
+
return FeatureLifecyclePhaseFromJSONTyped(json, false);
|
|
5968
|
+
}
|
|
5969
|
+
function FeatureLifecyclePhaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
5970
|
+
return json;
|
|
5971
|
+
}
|
|
5972
|
+
|
|
5793
5973
|
// src/api/checkoutexternal/models/FeatureResponseData.ts
|
|
5794
5974
|
function FeatureResponseDataFromJSON(json) {
|
|
5795
5975
|
return FeatureResponseDataFromJSONTyped(json, false);
|
|
@@ -5802,10 +5982,10 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5802
5982
|
createdAt: new Date(json["created_at"]),
|
|
5803
5983
|
description: json["description"],
|
|
5804
5984
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
5805
|
-
featureType: json["feature_type"],
|
|
5985
|
+
featureType: FeatureTypeFromJSON(json["feature_type"]),
|
|
5806
5986
|
icon: json["icon"],
|
|
5807
5987
|
id: json["id"],
|
|
5808
|
-
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
|
|
5988
|
+
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
|
|
5809
5989
|
maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
|
|
5810
5990
|
name: json["name"],
|
|
5811
5991
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
@@ -5845,7 +6025,7 @@ function CompanyOverrideResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5845
6025
|
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
5846
6026
|
valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
|
|
5847
6027
|
valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
|
|
5848
|
-
valueType: json["value_type"]
|
|
6028
|
+
valueType: EntitlementValueTypeFromJSON(json["value_type"])
|
|
5849
6029
|
};
|
|
5850
6030
|
}
|
|
5851
6031
|
|
|
@@ -5927,7 +6107,7 @@ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
5927
6107
|
),
|
|
5928
6108
|
ruleId: json["rule_id"],
|
|
5929
6109
|
trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["trait"]),
|
|
5930
|
-
traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
|
|
6110
|
+
traitEntityType: json["trait_entity_type"] == null ? void 0 : EntityTypeFromJSON(json["trait_entity_type"]),
|
|
5931
6111
|
traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
|
|
5932
6112
|
traitValue: json["trait_value"],
|
|
5933
6113
|
updatedAt: new Date(json["updated_at"])
|
|
@@ -5982,6 +6162,14 @@ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5982
6162
|
};
|
|
5983
6163
|
}
|
|
5984
6164
|
|
|
6165
|
+
// src/api/checkoutexternal/models/FlagType.ts
|
|
6166
|
+
function FlagTypeFromJSON(json) {
|
|
6167
|
+
return FlagTypeFromJSONTyped(json, false);
|
|
6168
|
+
}
|
|
6169
|
+
function FlagTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
6170
|
+
return json;
|
|
6171
|
+
}
|
|
6172
|
+
|
|
5985
6173
|
// src/api/checkoutexternal/models/FlagDetailResponseData.ts
|
|
5986
6174
|
function FlagDetailResponseDataFromJSON(json) {
|
|
5987
6175
|
return FlagDetailResponseDataFromJSONTyped(json, false);
|
|
@@ -5996,7 +6184,7 @@ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5996
6184
|
description: json["description"],
|
|
5997
6185
|
feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
|
|
5998
6186
|
featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
|
|
5999
|
-
flagType: json["flag_type"],
|
|
6187
|
+
flagType: FlagTypeFromJSON(json["flag_type"]),
|
|
6000
6188
|
id: json["id"],
|
|
6001
6189
|
key: json["key"],
|
|
6002
6190
|
lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
|
|
@@ -6020,11 +6208,11 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6020
6208
|
description: json["description"],
|
|
6021
6209
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
6022
6210
|
eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
|
|
6023
|
-
featureType: json["feature_type"],
|
|
6211
|
+
featureType: FeatureTypeFromJSON(json["feature_type"]),
|
|
6024
6212
|
flags: json["flags"].map(FlagDetailResponseDataFromJSON),
|
|
6025
6213
|
icon: json["icon"],
|
|
6026
6214
|
id: json["id"],
|
|
6027
|
-
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
|
|
6215
|
+
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
|
|
6028
6216
|
maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
|
|
6029
6217
|
name: json["name"],
|
|
6030
6218
|
plans: json["plans"].map(PreviewObjectFromJSON),
|
|
@@ -6036,6 +6224,30 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6036
6224
|
};
|
|
6037
6225
|
}
|
|
6038
6226
|
|
|
6227
|
+
// src/api/checkoutexternal/models/PlanControlledByType.ts
|
|
6228
|
+
function PlanControlledByTypeFromJSON(json) {
|
|
6229
|
+
return PlanControlledByTypeFromJSONTyped(json, false);
|
|
6230
|
+
}
|
|
6231
|
+
function PlanControlledByTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
6232
|
+
return json;
|
|
6233
|
+
}
|
|
6234
|
+
|
|
6235
|
+
// src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
|
|
6236
|
+
function EntitlementPriceBehaviorFromJSON(json) {
|
|
6237
|
+
return EntitlementPriceBehaviorFromJSONTyped(json, false);
|
|
6238
|
+
}
|
|
6239
|
+
function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
|
|
6240
|
+
return json;
|
|
6241
|
+
}
|
|
6242
|
+
|
|
6243
|
+
// src/api/checkoutexternal/models/PlanType.ts
|
|
6244
|
+
function PlanTypeFromJSON(json) {
|
|
6245
|
+
return PlanTypeFromJSONTyped(json, false);
|
|
6246
|
+
}
|
|
6247
|
+
function PlanTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
6248
|
+
return json;
|
|
6249
|
+
}
|
|
6250
|
+
|
|
6039
6251
|
// src/api/checkoutexternal/models/PlanResponseData.ts
|
|
6040
6252
|
function PlanResponseDataFromJSON(json) {
|
|
6041
6253
|
return PlanResponseDataFromJSONTyped(json, false);
|
|
@@ -6051,7 +6263,7 @@ function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6051
6263
|
icon: json["icon"],
|
|
6052
6264
|
id: json["id"],
|
|
6053
6265
|
name: json["name"],
|
|
6054
|
-
planType: json["plan_type"],
|
|
6266
|
+
planType: PlanTypeFromJSON(json["plan_type"]),
|
|
6055
6267
|
updatedAt: new Date(json["updated_at"])
|
|
6056
6268
|
};
|
|
6057
6269
|
}
|
|
@@ -6078,7 +6290,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6078
6290
|
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
6079
6291
|
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
|
|
6080
6292
|
planId: json["plan_id"],
|
|
6081
|
-
priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
|
|
6293
|
+
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
6082
6294
|
ruleId: json["rule_id"],
|
|
6083
6295
|
ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
|
|
6084
6296
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
@@ -6089,7 +6301,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6089
6301
|
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
6090
6302
|
valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
|
|
6091
6303
|
valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
|
|
6092
|
-
valueType: json["value_type"]
|
|
6304
|
+
valueType: EntitlementValueTypeFromJSON(json["value_type"])
|
|
6093
6305
|
};
|
|
6094
6306
|
}
|
|
6095
6307
|
|
|
@@ -6119,11 +6331,19 @@ function CreditGrantDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6119
6331
|
return {
|
|
6120
6332
|
creditTypeIcon: json["credit_type_icon"] == null ? void 0 : json["credit_type_icon"],
|
|
6121
6333
|
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
6122
|
-
grantReason: json["grant_reason"],
|
|
6334
|
+
grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
|
|
6123
6335
|
quantity: json["quantity"]
|
|
6124
6336
|
};
|
|
6125
6337
|
}
|
|
6126
6338
|
|
|
6339
|
+
// src/api/checkoutexternal/models/EntitlementType.ts
|
|
6340
|
+
function EntitlementTypeFromJSON(json) {
|
|
6341
|
+
return EntitlementTypeFromJSONTyped(json, false);
|
|
6342
|
+
}
|
|
6343
|
+
function EntitlementTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
6344
|
+
return json;
|
|
6345
|
+
}
|
|
6346
|
+
|
|
6127
6347
|
// src/api/checkoutexternal/models/FeatureUsageResponseData.ts
|
|
6128
6348
|
function FeatureUsageResponseDataFromJSON(json) {
|
|
6129
6349
|
return FeatureUsageResponseDataFromJSONTyped(json, false);
|
|
@@ -6135,14 +6355,14 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6135
6355
|
return {
|
|
6136
6356
|
access: json["access"],
|
|
6137
6357
|
allocation: json["allocation"] == null ? void 0 : json["allocation"],
|
|
6138
|
-
allocationType: json["allocation_type"],
|
|
6358
|
+
allocationType: EntitlementValueTypeFromJSON(json["allocation_type"]),
|
|
6139
6359
|
companyOverride: json["company_override"] == null ? void 0 : CompanyOverrideResponseDataFromJSON(json["company_override"]),
|
|
6140
6360
|
creditConsumptionRate: json["credit_consumption_rate"] == null ? void 0 : json["credit_consumption_rate"],
|
|
6141
6361
|
creditGrantCounts: json["credit_grant_counts"] == null ? void 0 : json["credit_grant_counts"],
|
|
6142
6362
|
creditGrantDetails: json["credit_grant_details"] == null ? void 0 : json["credit_grant_details"].map(
|
|
6143
6363
|
CreditGrantDetailFromJSON
|
|
6144
6364
|
),
|
|
6145
|
-
creditGrantReason: json["credit_grant_reason"] == null ? void 0 : json["credit_grant_reason"],
|
|
6365
|
+
creditGrantReason: json["credit_grant_reason"] == null ? void 0 : BillingCreditGrantReasonFromJSON(json["credit_grant_reason"]),
|
|
6146
6366
|
creditRemaining: json["credit_remaining"] == null ? void 0 : json["credit_remaining"],
|
|
6147
6367
|
creditTotal: json["credit_total"] == null ? void 0 : json["credit_total"],
|
|
6148
6368
|
creditTypeIcon: json["credit_type_icon"] == null ? void 0 : json["credit_type_icon"],
|
|
@@ -6152,7 +6372,7 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6152
6372
|
entitlementExpirationDate: json["entitlement_expiration_date"] == null ? void 0 : new Date(json["entitlement_expiration_date"]),
|
|
6153
6373
|
entitlementId: json["entitlement_id"],
|
|
6154
6374
|
entitlementSource: json["entitlement_source"] == null ? void 0 : json["entitlement_source"],
|
|
6155
|
-
entitlementType: json["entitlement_type"],
|
|
6375
|
+
entitlementType: EntitlementTypeFromJSON(json["entitlement_type"]),
|
|
6156
6376
|
feature: json["feature"] == null ? void 0 : FeatureDetailResponseDataFromJSON(json["feature"]),
|
|
6157
6377
|
hasValidAllocation: json["has_valid_allocation"] == null ? void 0 : json["has_valid_allocation"],
|
|
6158
6378
|
isUnlimited: json["is_unlimited"] == null ? void 0 : json["is_unlimited"],
|
|
@@ -6164,7 +6384,7 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6164
6384
|
period: json["period"] == null ? void 0 : json["period"],
|
|
6165
6385
|
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
|
|
6166
6386
|
planEntitlement: json["plan_entitlement"] == null ? void 0 : PlanEntitlementResponseDataFromJSON(json["plan_entitlement"]),
|
|
6167
|
-
priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
|
|
6387
|
+
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
6168
6388
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
6169
6389
|
usage: json["usage"] == null ? void 0 : json["usage"],
|
|
6170
6390
|
yearlyUsageBasedPrice: json["yearly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_usage_based_price"])
|
|
@@ -6182,11 +6402,11 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6182
6402
|
return {
|
|
6183
6403
|
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
6184
6404
|
billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON(json["billing_product"]),
|
|
6185
|
-
chargeType: json["charge_type"],
|
|
6405
|
+
chargeType: ChargeTypeFromJSON(json["charge_type"]),
|
|
6186
6406
|
companyCanTrial: json["company_can_trial"],
|
|
6187
6407
|
companyCount: json["company_count"],
|
|
6188
6408
|
compatiblePlanIds: json["compatible_plan_ids"],
|
|
6189
|
-
controlledBy: json["controlled_by"],
|
|
6409
|
+
controlledBy: PlanControlledByTypeFromJSON(json["controlled_by"]),
|
|
6190
6410
|
createdAt: new Date(json["created_at"]),
|
|
6191
6411
|
current: json["current"],
|
|
6192
6412
|
custom: json["custom"],
|
|
@@ -6203,6 +6423,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6203
6423
|
includedCreditGrants: json["included_credit_grants"].map(
|
|
6204
6424
|
PlanCreditGrantViewFromJSON
|
|
6205
6425
|
),
|
|
6426
|
+
invalidReason: json["invalid_reason"] == null ? void 0 : json["invalid_reason"],
|
|
6206
6427
|
isCustom: json["is_custom"],
|
|
6207
6428
|
isDefault: json["is_default"],
|
|
6208
6429
|
isFree: json["is_free"],
|
|
@@ -6210,7 +6431,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6210
6431
|
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
|
|
6211
6432
|
name: json["name"],
|
|
6212
6433
|
oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
|
|
6213
|
-
planType: json["plan_type"],
|
|
6434
|
+
planType: PlanTypeFromJSON(json["plan_type"]),
|
|
6214
6435
|
trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
|
|
6215
6436
|
updatedAt: new Date(json["updated_at"]),
|
|
6216
6437
|
usageViolations: json["usage_violations"].map(
|
|
@@ -6295,6 +6516,14 @@ function ComponentCheckoutSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6295
6516
|
};
|
|
6296
6517
|
}
|
|
6297
6518
|
|
|
6519
|
+
// src/api/checkoutexternal/models/ComponentEntityType.ts
|
|
6520
|
+
function ComponentEntityTypeFromJSON(json) {
|
|
6521
|
+
return ComponentEntityTypeFromJSONTyped(json, false);
|
|
6522
|
+
}
|
|
6523
|
+
function ComponentEntityTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
6524
|
+
return json;
|
|
6525
|
+
}
|
|
6526
|
+
|
|
6298
6527
|
// src/api/checkoutexternal/models/PlanDetailResponseData.ts
|
|
6299
6528
|
function PlanDetailResponseDataFromJSON(json) {
|
|
6300
6529
|
return PlanDetailResponseDataFromJSONTyped(json, false);
|
|
@@ -6306,9 +6535,9 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6306
6535
|
return {
|
|
6307
6536
|
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
6308
6537
|
billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON(json["billing_product"]),
|
|
6309
|
-
chargeType: json["charge_type"],
|
|
6538
|
+
chargeType: ChargeTypeFromJSON(json["charge_type"]),
|
|
6310
6539
|
companyCount: json["company_count"],
|
|
6311
|
-
controlledBy: json["controlled_by"],
|
|
6540
|
+
controlledBy: PlanControlledByTypeFromJSON(json["controlled_by"]),
|
|
6312
6541
|
createdAt: new Date(json["created_at"]),
|
|
6313
6542
|
description: json["description"],
|
|
6314
6543
|
features: json["features"].map(
|
|
@@ -6325,7 +6554,7 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6325
6554
|
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["monthly_price"]),
|
|
6326
6555
|
name: json["name"],
|
|
6327
6556
|
oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["one_time_price"]),
|
|
6328
|
-
planType: json["plan_type"],
|
|
6557
|
+
planType: PlanTypeFromJSON(json["plan_type"]),
|
|
6329
6558
|
trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
|
|
6330
6559
|
updatedAt: new Date(json["updated_at"]),
|
|
6331
6560
|
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON(json["yearly_price"])
|
|
@@ -6366,10 +6595,10 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6366
6595
|
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
6367
6596
|
creditName: json["credit_name"],
|
|
6368
6597
|
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
6369
|
-
expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
|
|
6370
|
-
expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
|
|
6598
|
+
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON(json["expiry_type"]),
|
|
6599
|
+
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON(json["expiry_unit"]),
|
|
6371
6600
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
6372
|
-
grantReason: json["grant_reason"],
|
|
6601
|
+
grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
|
|
6373
6602
|
id: json["id"],
|
|
6374
6603
|
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
6375
6604
|
planName: json["plan_name"] == null ? void 0 : json["plan_name"],
|
|
@@ -6383,7 +6612,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6383
6612
|
updatedAt: new Date(json["updated_at"]),
|
|
6384
6613
|
validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"]),
|
|
6385
6614
|
zeroedOutDate: json["zeroed_out_date"] == null ? void 0 : new Date(json["zeroed_out_date"]),
|
|
6386
|
-
zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : json["zeroed_out_reason"]
|
|
6615
|
+
zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : BillingCreditGrantZeroedOutReasonFromJSON(json["zeroed_out_reason"])
|
|
6387
6616
|
};
|
|
6388
6617
|
}
|
|
6389
6618
|
|
|
@@ -6403,14 +6632,22 @@ function UsageBasedEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
6403
6632
|
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
6404
6633
|
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
6405
6634
|
monthlyUsageBasedPrice: json["monthly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_usage_based_price"]),
|
|
6406
|
-
priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
|
|
6635
|
+
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
6407
6636
|
valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
|
|
6408
6637
|
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
6409
|
-
valueType: json["value_type"],
|
|
6638
|
+
valueType: EntitlementValueTypeFromJSON(json["value_type"]),
|
|
6410
6639
|
yearlyUsageBasedPrice: json["yearly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_usage_based_price"])
|
|
6411
6640
|
};
|
|
6412
6641
|
}
|
|
6413
6642
|
|
|
6643
|
+
// src/api/checkoutexternal/models/ComponentState.ts
|
|
6644
|
+
function ComponentStateFromJSON(json) {
|
|
6645
|
+
return ComponentStateFromJSONTyped(json, false);
|
|
6646
|
+
}
|
|
6647
|
+
function ComponentStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
6648
|
+
return json;
|
|
6649
|
+
}
|
|
6650
|
+
|
|
6414
6651
|
// src/api/checkoutexternal/models/ComponentResponseData.ts
|
|
6415
6652
|
function ComponentResponseDataFromJSON(json) {
|
|
6416
6653
|
return ComponentResponseDataFromJSONTyped(json, false);
|
|
@@ -6424,8 +6661,8 @@ function ComponentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6424
6661
|
createdAt: new Date(json["created_at"]),
|
|
6425
6662
|
id: json["id"],
|
|
6426
6663
|
name: json["name"],
|
|
6427
|
-
state: json["state"],
|
|
6428
|
-
type: json["type"],
|
|
6664
|
+
state: ComponentStateFromJSON(json["state"]),
|
|
6665
|
+
type: ComponentEntityTypeFromJSON(json["type"]),
|
|
6429
6666
|
updatedAt: new Date(json["updated_at"])
|
|
6430
6667
|
};
|
|
6431
6668
|
}
|
|
@@ -6479,6 +6716,9 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6479
6716
|
defaultPlan: json["default_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["default_plan"]),
|
|
6480
6717
|
featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"]),
|
|
6481
6718
|
postTrialPlan: json["post_trial_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["post_trial_plan"]),
|
|
6719
|
+
preventSelfServiceDowngrade: json["prevent_self_service_downgrade"],
|
|
6720
|
+
preventSelfServiceDowngradeButtonText: json["prevent_self_service_downgrade_button_text"] == null ? void 0 : json["prevent_self_service_downgrade_button_text"],
|
|
6721
|
+
preventSelfServiceDowngradeUrl: json["prevent_self_service_downgrade_url"] == null ? void 0 : json["prevent_self_service_downgrade_url"],
|
|
6482
6722
|
showCredits: json["show_credits"],
|
|
6483
6723
|
showPeriodToggle: json["show_period_toggle"],
|
|
6484
6724
|
showZeroPriceAsFree: json["show_zero_price_as_free"],
|
|
@@ -7466,6 +7706,30 @@ var JSONApiResponse2 = class {
|
|
|
7466
7706
|
}
|
|
7467
7707
|
};
|
|
7468
7708
|
|
|
7709
|
+
// src/api/componentspublic/models/BillingCreditBurnStrategy.ts
|
|
7710
|
+
function BillingCreditBurnStrategyFromJSON2(json) {
|
|
7711
|
+
return BillingCreditBurnStrategyFromJSONTyped3(json, false);
|
|
7712
|
+
}
|
|
7713
|
+
function BillingCreditBurnStrategyFromJSONTyped3(json, ignoreDiscriminator) {
|
|
7714
|
+
return json;
|
|
7715
|
+
}
|
|
7716
|
+
|
|
7717
|
+
// src/api/componentspublic/models/BillingCreditExpiryType.ts
|
|
7718
|
+
function BillingCreditExpiryTypeFromJSON2(json) {
|
|
7719
|
+
return BillingCreditExpiryTypeFromJSONTyped6(json, false);
|
|
7720
|
+
}
|
|
7721
|
+
function BillingCreditExpiryTypeFromJSONTyped6(json, ignoreDiscriminator) {
|
|
7722
|
+
return json;
|
|
7723
|
+
}
|
|
7724
|
+
|
|
7725
|
+
// src/api/componentspublic/models/BillingCreditExpiryUnit.ts
|
|
7726
|
+
function BillingCreditExpiryUnitFromJSON2(json) {
|
|
7727
|
+
return BillingCreditExpiryUnitFromJSONTyped7(json, false);
|
|
7728
|
+
}
|
|
7729
|
+
function BillingCreditExpiryUnitFromJSONTyped7(json, ignoreDiscriminator) {
|
|
7730
|
+
return json;
|
|
7731
|
+
}
|
|
7732
|
+
|
|
7469
7733
|
// src/api/componentspublic/models/BillingProductResponseData.ts
|
|
7470
7734
|
function BillingProductResponseDataFromJSON2(json) {
|
|
7471
7735
|
return BillingProductResponseDataFromJSONTyped4(json, false);
|
|
@@ -7490,6 +7754,14 @@ function BillingProductResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
7490
7754
|
};
|
|
7491
7755
|
}
|
|
7492
7756
|
|
|
7757
|
+
// src/api/componentspublic/models/BillingProductPriceInterval.ts
|
|
7758
|
+
function BillingProductPriceIntervalFromJSON2(json) {
|
|
7759
|
+
return BillingProductPriceIntervalFromJSONTyped5(json, false);
|
|
7760
|
+
}
|
|
7761
|
+
function BillingProductPriceIntervalFromJSONTyped5(json, ignoreDiscriminator) {
|
|
7762
|
+
return json;
|
|
7763
|
+
}
|
|
7764
|
+
|
|
7493
7765
|
// src/api/componentspublic/models/BillingPriceResponseData.ts
|
|
7494
7766
|
function BillingPriceResponseDataFromJSON2(json) {
|
|
7495
7767
|
return BillingPriceResponseDataFromJSONTyped7(json, false);
|
|
@@ -7502,13 +7774,21 @@ function BillingPriceResponseDataFromJSONTyped7(json, ignoreDiscriminator) {
|
|
|
7502
7774
|
currency: json["currency"],
|
|
7503
7775
|
externalPriceId: json["external_price_id"],
|
|
7504
7776
|
id: json["id"],
|
|
7505
|
-
interval: json["interval"],
|
|
7777
|
+
interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
|
|
7506
7778
|
price: json["price"],
|
|
7507
7779
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
7508
7780
|
scheme: json["scheme"]
|
|
7509
7781
|
};
|
|
7510
7782
|
}
|
|
7511
7783
|
|
|
7784
|
+
// src/api/componentspublic/models/BillingCreditRolloverPolicy.ts
|
|
7785
|
+
function BillingCreditRolloverPolicyFromJSON2(json) {
|
|
7786
|
+
return BillingCreditRolloverPolicyFromJSONTyped3(json, false);
|
|
7787
|
+
}
|
|
7788
|
+
function BillingCreditRolloverPolicyFromJSONTyped3(json, ignoreDiscriminator) {
|
|
7789
|
+
return json;
|
|
7790
|
+
}
|
|
7791
|
+
|
|
7512
7792
|
// src/api/componentspublic/models/BillingCreditResponseData.ts
|
|
7513
7793
|
function BillingCreditResponseDataFromJSON2(json) {
|
|
7514
7794
|
return BillingCreditResponseDataFromJSONTyped3(json, false);
|
|
@@ -7518,11 +7798,15 @@ function BillingCreditResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7518
7798
|
return json;
|
|
7519
7799
|
}
|
|
7520
7800
|
return {
|
|
7521
|
-
burnStrategy: json["burn_strategy"],
|
|
7801
|
+
burnStrategy: BillingCreditBurnStrategyFromJSON2(json["burn_strategy"]),
|
|
7522
7802
|
createdAt: new Date(json["created_at"]),
|
|
7523
|
-
defaultExpiryUnit:
|
|
7803
|
+
defaultExpiryUnit: BillingCreditExpiryUnitFromJSON2(
|
|
7804
|
+
json["default_expiry_unit"]
|
|
7805
|
+
),
|
|
7524
7806
|
defaultExpiryUnitCount: json["default_expiry_unit_count"] == null ? void 0 : json["default_expiry_unit_count"],
|
|
7525
|
-
defaultRolloverPolicy:
|
|
7807
|
+
defaultRolloverPolicy: BillingCreditRolloverPolicyFromJSON2(
|
|
7808
|
+
json["default_rollover_policy"]
|
|
7809
|
+
),
|
|
7526
7810
|
description: json["description"],
|
|
7527
7811
|
icon: json["icon"] == null ? void 0 : json["icon"],
|
|
7528
7812
|
id: json["id"],
|
|
@@ -7535,6 +7819,30 @@ function BillingCreditResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7535
7819
|
};
|
|
7536
7820
|
}
|
|
7537
7821
|
|
|
7822
|
+
// src/api/componentspublic/models/BillingPlanCreditGrantResetCadence.ts
|
|
7823
|
+
function BillingPlanCreditGrantResetCadenceFromJSON2(json) {
|
|
7824
|
+
return BillingPlanCreditGrantResetCadenceFromJSONTyped4(json, false);
|
|
7825
|
+
}
|
|
7826
|
+
function BillingPlanCreditGrantResetCadenceFromJSONTyped4(json, ignoreDiscriminator) {
|
|
7827
|
+
return json;
|
|
7828
|
+
}
|
|
7829
|
+
|
|
7830
|
+
// src/api/componentspublic/models/BillingPlanCreditGrantResetStart.ts
|
|
7831
|
+
function BillingPlanCreditGrantResetStartFromJSON2(json) {
|
|
7832
|
+
return BillingPlanCreditGrantResetStartFromJSONTyped4(json, false);
|
|
7833
|
+
}
|
|
7834
|
+
function BillingPlanCreditGrantResetStartFromJSONTyped4(json, ignoreDiscriminator) {
|
|
7835
|
+
return json;
|
|
7836
|
+
}
|
|
7837
|
+
|
|
7838
|
+
// src/api/componentspublic/models/BillingPlanCreditGrantResetType.ts
|
|
7839
|
+
function BillingPlanCreditGrantResetTypeFromJSON2(json) {
|
|
7840
|
+
return BillingPlanCreditGrantResetTypeFromJSONTyped4(json, false);
|
|
7841
|
+
}
|
|
7842
|
+
function BillingPlanCreditGrantResetTypeFromJSONTyped4(json, ignoreDiscriminator) {
|
|
7843
|
+
return json;
|
|
7844
|
+
}
|
|
7845
|
+
|
|
7538
7846
|
// src/api/componentspublic/models/BillingProductPriceTierResponseData.ts
|
|
7539
7847
|
function BillingProductPriceTierResponseDataFromJSON2(json) {
|
|
7540
7848
|
return BillingProductPriceTierResponseDataFromJSONTyped4(json, false);
|
|
@@ -7551,6 +7859,14 @@ function BillingProductPriceTierResponseDataFromJSONTyped4(json, ignoreDiscrimin
|
|
|
7551
7859
|
};
|
|
7552
7860
|
}
|
|
7553
7861
|
|
|
7862
|
+
// src/api/componentspublic/models/BillingTiersMode.ts
|
|
7863
|
+
function BillingTiersModeFromJSON2(json) {
|
|
7864
|
+
return BillingTiersModeFromJSONTyped4(json, false);
|
|
7865
|
+
}
|
|
7866
|
+
function BillingTiersModeFromJSONTyped4(json, ignoreDiscriminator) {
|
|
7867
|
+
return json;
|
|
7868
|
+
}
|
|
7869
|
+
|
|
7554
7870
|
// src/api/componentspublic/models/BillingPriceView.ts
|
|
7555
7871
|
function BillingPriceViewFromJSON2(json) {
|
|
7556
7872
|
return BillingPriceViewFromJSONTyped5(json, false);
|
|
@@ -7564,7 +7880,7 @@ function BillingPriceViewFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7564
7880
|
createdAt: new Date(json["created_at"]),
|
|
7565
7881
|
currency: json["currency"],
|
|
7566
7882
|
id: json["id"],
|
|
7567
|
-
interval: json["interval"],
|
|
7883
|
+
interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
|
|
7568
7884
|
isActive: json["is_active"],
|
|
7569
7885
|
meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
|
|
7570
7886
|
meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
|
|
@@ -7580,7 +7896,7 @@ function BillingPriceViewFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7580
7896
|
productExternalId: json["product_external_id"],
|
|
7581
7897
|
productId: json["product_id"],
|
|
7582
7898
|
productName: json["product_name"],
|
|
7583
|
-
tiersMode: json["tiers_mode"] == null ? void 0 : json["tiers_mode"],
|
|
7899
|
+
tiersMode: json["tiers_mode"] == null ? void 0 : BillingTiersModeFromJSON2(json["tiers_mode"]),
|
|
7584
7900
|
updatedAt: new Date(json["updated_at"]),
|
|
7585
7901
|
usageType: json["usage_type"]
|
|
7586
7902
|
};
|
|
@@ -7614,6 +7930,14 @@ function BillingProductDetailResponseDataFromJSONTyped5(json, ignoreDiscriminato
|
|
|
7614
7930
|
};
|
|
7615
7931
|
}
|
|
7616
7932
|
|
|
7933
|
+
// src/api/componentspublic/models/ChargeType.ts
|
|
7934
|
+
function ChargeTypeFromJSON2(json) {
|
|
7935
|
+
return ChargeTypeFromJSONTyped5(json, false);
|
|
7936
|
+
}
|
|
7937
|
+
function ChargeTypeFromJSONTyped5(json, ignoreDiscriminator) {
|
|
7938
|
+
return json;
|
|
7939
|
+
}
|
|
7940
|
+
|
|
7617
7941
|
// src/api/componentspublic/models/CompatiblePlans.ts
|
|
7618
7942
|
function CompatiblePlansFromJSON2(json) {
|
|
7619
7943
|
return CompatiblePlansFromJSONTyped3(json, false);
|
|
@@ -7657,6 +7981,38 @@ function CustomPlanConfigFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7657
7981
|
};
|
|
7658
7982
|
}
|
|
7659
7983
|
|
|
7984
|
+
// src/api/componentspublic/models/EntitlementPriceBehavior.ts
|
|
7985
|
+
function EntitlementPriceBehaviorFromJSON2(json) {
|
|
7986
|
+
return EntitlementPriceBehaviorFromJSONTyped5(json, false);
|
|
7987
|
+
}
|
|
7988
|
+
function EntitlementPriceBehaviorFromJSONTyped5(json, ignoreDiscriminator) {
|
|
7989
|
+
return json;
|
|
7990
|
+
}
|
|
7991
|
+
|
|
7992
|
+
// src/api/componentspublic/models/EntitlementValueType.ts
|
|
7993
|
+
function EntitlementValueTypeFromJSON2(json) {
|
|
7994
|
+
return EntitlementValueTypeFromJSONTyped6(json, false);
|
|
7995
|
+
}
|
|
7996
|
+
function EntitlementValueTypeFromJSONTyped6(json, ignoreDiscriminator) {
|
|
7997
|
+
return json;
|
|
7998
|
+
}
|
|
7999
|
+
|
|
8000
|
+
// src/api/componentspublic/models/EntityType.ts
|
|
8001
|
+
function EntityTypeFromJSON2(json) {
|
|
8002
|
+
return EntityTypeFromJSONTyped9(json, false);
|
|
8003
|
+
}
|
|
8004
|
+
function EntityTypeFromJSONTyped9(json, ignoreDiscriminator) {
|
|
8005
|
+
return json;
|
|
8006
|
+
}
|
|
8007
|
+
|
|
8008
|
+
// src/api/componentspublic/models/TraitType.ts
|
|
8009
|
+
function TraitTypeFromJSON2(json) {
|
|
8010
|
+
return TraitTypeFromJSONTyped3(json, false);
|
|
8011
|
+
}
|
|
8012
|
+
function TraitTypeFromJSONTyped3(json, ignoreDiscriminator) {
|
|
8013
|
+
return json;
|
|
8014
|
+
}
|
|
8015
|
+
|
|
7660
8016
|
// src/api/componentspublic/models/EntityTraitDefinitionResponseData.ts
|
|
7661
8017
|
function EntityTraitDefinitionResponseDataFromJSON2(json) {
|
|
7662
8018
|
return EntityTraitDefinitionResponseDataFromJSONTyped7(json, false);
|
|
@@ -7668,10 +8024,10 @@ function EntityTraitDefinitionResponseDataFromJSONTyped7(json, ignoreDiscriminat
|
|
|
7668
8024
|
return {
|
|
7669
8025
|
createdAt: new Date(json["created_at"]),
|
|
7670
8026
|
displayName: json["display_name"],
|
|
7671
|
-
entityType: json["entity_type"],
|
|
8027
|
+
entityType: EntityTypeFromJSON2(json["entity_type"]),
|
|
7672
8028
|
hierarchy: json["hierarchy"],
|
|
7673
8029
|
id: json["id"],
|
|
7674
|
-
traitType: json["trait_type"],
|
|
8030
|
+
traitType: TraitTypeFromJSON2(json["trait_type"]),
|
|
7675
8031
|
updatedAt: new Date(json["updated_at"])
|
|
7676
8032
|
};
|
|
7677
8033
|
}
|
|
@@ -7694,6 +8050,14 @@ function EventSummaryResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7694
8050
|
};
|
|
7695
8051
|
}
|
|
7696
8052
|
|
|
8053
|
+
// src/api/componentspublic/models/FeatureType.ts
|
|
8054
|
+
function FeatureTypeFromJSON2(json) {
|
|
8055
|
+
return FeatureTypeFromJSONTyped4(json, false);
|
|
8056
|
+
}
|
|
8057
|
+
function FeatureTypeFromJSONTyped4(json, ignoreDiscriminator) {
|
|
8058
|
+
return json;
|
|
8059
|
+
}
|
|
8060
|
+
|
|
7697
8061
|
// src/api/componentspublic/models/PreviewObject.ts
|
|
7698
8062
|
function PreviewObjectFromJSON2(json) {
|
|
7699
8063
|
return PreviewObjectFromJSONTyped3(json, false);
|
|
@@ -7710,6 +8074,14 @@ function PreviewObjectFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7710
8074
|
};
|
|
7711
8075
|
}
|
|
7712
8076
|
|
|
8077
|
+
// src/api/componentspublic/models/FeatureLifecyclePhase.ts
|
|
8078
|
+
function FeatureLifecyclePhaseFromJSON2(json) {
|
|
8079
|
+
return FeatureLifecyclePhaseFromJSONTyped4(json, false);
|
|
8080
|
+
}
|
|
8081
|
+
function FeatureLifecyclePhaseFromJSONTyped4(json, ignoreDiscriminator) {
|
|
8082
|
+
return json;
|
|
8083
|
+
}
|
|
8084
|
+
|
|
7713
8085
|
// src/api/componentspublic/models/PreviewObjectResponseData.ts
|
|
7714
8086
|
function PreviewObjectResponseDataFromJSON2(json) {
|
|
7715
8087
|
return PreviewObjectResponseDataFromJSONTyped3(json, false);
|
|
@@ -7754,7 +8126,7 @@ function RuleConditionDetailResponseDataFromJSONTyped4(json, ignoreDiscriminator
|
|
|
7754
8126
|
),
|
|
7755
8127
|
ruleId: json["rule_id"],
|
|
7756
8128
|
trait: json["trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON2(json["trait"]),
|
|
7757
|
-
traitEntityType: json["trait_entity_type"] == null ? void 0 : json["trait_entity_type"],
|
|
8129
|
+
traitEntityType: json["trait_entity_type"] == null ? void 0 : EntityTypeFromJSON2(json["trait_entity_type"]),
|
|
7758
8130
|
traitId: json["trait_id"] == null ? void 0 : json["trait_id"],
|
|
7759
8131
|
traitValue: json["trait_value"],
|
|
7760
8132
|
updatedAt: new Date(json["updated_at"])
|
|
@@ -7821,10 +8193,10 @@ function FeatureResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7821
8193
|
createdAt: new Date(json["created_at"]),
|
|
7822
8194
|
description: json["description"],
|
|
7823
8195
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
7824
|
-
featureType: json["feature_type"],
|
|
8196
|
+
featureType: FeatureTypeFromJSON2(json["feature_type"]),
|
|
7825
8197
|
icon: json["icon"],
|
|
7826
8198
|
id: json["id"],
|
|
7827
|
-
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
|
|
8199
|
+
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
|
|
7828
8200
|
maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
|
|
7829
8201
|
name: json["name"],
|
|
7830
8202
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
@@ -7834,6 +8206,14 @@ function FeatureResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7834
8206
|
};
|
|
7835
8207
|
}
|
|
7836
8208
|
|
|
8209
|
+
// src/api/componentspublic/models/FlagType.ts
|
|
8210
|
+
function FlagTypeFromJSON2(json) {
|
|
8211
|
+
return FlagTypeFromJSONTyped4(json, false);
|
|
8212
|
+
}
|
|
8213
|
+
function FlagTypeFromJSONTyped4(json, ignoreDiscriminator) {
|
|
8214
|
+
return json;
|
|
8215
|
+
}
|
|
8216
|
+
|
|
7837
8217
|
// src/api/componentspublic/models/FlagDetailResponseData.ts
|
|
7838
8218
|
function FlagDetailResponseDataFromJSON2(json) {
|
|
7839
8219
|
return FlagDetailResponseDataFromJSONTyped3(json, false);
|
|
@@ -7848,7 +8228,7 @@ function FlagDetailResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
7848
8228
|
description: json["description"],
|
|
7849
8229
|
feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON2(json["feature"]),
|
|
7850
8230
|
featureId: json["feature_id"] == null ? void 0 : json["feature_id"],
|
|
7851
|
-
flagType: json["flag_type"],
|
|
8231
|
+
flagType: FlagTypeFromJSON2(json["flag_type"]),
|
|
7852
8232
|
id: json["id"],
|
|
7853
8233
|
key: json["key"],
|
|
7854
8234
|
lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
|
|
@@ -7872,11 +8252,11 @@ function FeatureDetailResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
|
|
|
7872
8252
|
description: json["description"],
|
|
7873
8253
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
7874
8254
|
eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON2(json["event_summary"]),
|
|
7875
|
-
featureType: json["feature_type"],
|
|
8255
|
+
featureType: FeatureTypeFromJSON2(json["feature_type"]),
|
|
7876
8256
|
flags: json["flags"].map(FlagDetailResponseDataFromJSON2),
|
|
7877
8257
|
icon: json["icon"],
|
|
7878
8258
|
id: json["id"],
|
|
7879
|
-
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : json["lifecycle_phase"],
|
|
8259
|
+
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
|
|
7880
8260
|
maintainerId: json["maintainer_id"] == null ? void 0 : json["maintainer_id"],
|
|
7881
8261
|
name: json["name"],
|
|
7882
8262
|
plans: json["plans"].map(PreviewObjectFromJSON2),
|
|
@@ -7888,6 +8268,14 @@ function FeatureDetailResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
|
|
|
7888
8268
|
};
|
|
7889
8269
|
}
|
|
7890
8270
|
|
|
8271
|
+
// src/api/componentspublic/models/PlanControlledByType.ts
|
|
8272
|
+
function PlanControlledByTypeFromJSON2(json) {
|
|
8273
|
+
return PlanControlledByTypeFromJSONTyped5(json, false);
|
|
8274
|
+
}
|
|
8275
|
+
function PlanControlledByTypeFromJSONTyped5(json, ignoreDiscriminator) {
|
|
8276
|
+
return json;
|
|
8277
|
+
}
|
|
8278
|
+
|
|
7891
8279
|
// src/api/componentspublic/models/PlanCreditGrantView.ts
|
|
7892
8280
|
function PlanCreditGrantViewFromJSON2(json) {
|
|
7893
8281
|
return PlanCreditGrantViewFromJSONTyped4(json, false);
|
|
@@ -7900,8 +8288,12 @@ function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
7900
8288
|
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
7901
8289
|
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
7902
8290
|
billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
|
|
7903
|
-
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 :
|
|
7904
|
-
|
|
8291
|
+
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(
|
|
8292
|
+
json["billing_credit_auto_topup_expiry_type"]
|
|
8293
|
+
),
|
|
8294
|
+
billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(
|
|
8295
|
+
json["billing_credit_auto_topup_expiry_unit"]
|
|
8296
|
+
),
|
|
7905
8297
|
billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
|
|
7906
8298
|
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
7907
8299
|
createdAt: new Date(json["created_at"]),
|
|
@@ -7910,21 +8302,31 @@ function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
7910
8302
|
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
7911
8303
|
creditId: json["credit_id"],
|
|
7912
8304
|
creditName: json["credit_name"],
|
|
7913
|
-
expiryType: json["expiry_type"] == null ? void 0 : json["expiry_type"],
|
|
7914
|
-
expiryUnit: json["expiry_unit"] == null ? void 0 : json["expiry_unit"],
|
|
8305
|
+
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(json["expiry_type"]),
|
|
8306
|
+
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(json["expiry_unit"]),
|
|
7915
8307
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
7916
8308
|
id: json["id"],
|
|
7917
8309
|
planId: json["plan_id"],
|
|
7918
8310
|
planName: json["plan_name"],
|
|
7919
8311
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
7920
|
-
resetCadence:
|
|
7921
|
-
|
|
7922
|
-
|
|
8312
|
+
resetCadence: BillingPlanCreditGrantResetCadenceFromJSON2(
|
|
8313
|
+
json["reset_cadence"]
|
|
8314
|
+
),
|
|
8315
|
+
resetStart: BillingPlanCreditGrantResetStartFromJSON2(json["reset_start"]),
|
|
8316
|
+
resetType: BillingPlanCreditGrantResetTypeFromJSON2(json["reset_type"]),
|
|
7923
8317
|
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
7924
8318
|
updatedAt: new Date(json["updated_at"])
|
|
7925
8319
|
};
|
|
7926
8320
|
}
|
|
7927
8321
|
|
|
8322
|
+
// src/api/componentspublic/models/PlanType.ts
|
|
8323
|
+
function PlanTypeFromJSON2(json) {
|
|
8324
|
+
return PlanTypeFromJSONTyped6(json, false);
|
|
8325
|
+
}
|
|
8326
|
+
function PlanTypeFromJSONTyped6(json, ignoreDiscriminator) {
|
|
8327
|
+
return json;
|
|
8328
|
+
}
|
|
8329
|
+
|
|
7928
8330
|
// src/api/componentspublic/models/PlanResponseData.ts
|
|
7929
8331
|
function PlanResponseDataFromJSON2(json) {
|
|
7930
8332
|
return PlanResponseDataFromJSONTyped4(json, false);
|
|
@@ -7940,7 +8342,7 @@ function PlanResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
7940
8342
|
icon: json["icon"],
|
|
7941
8343
|
id: json["id"],
|
|
7942
8344
|
name: json["name"],
|
|
7943
|
-
planType: json["plan_type"],
|
|
8345
|
+
planType: PlanTypeFromJSON2(json["plan_type"]),
|
|
7944
8346
|
updatedAt: new Date(json["updated_at"])
|
|
7945
8347
|
};
|
|
7946
8348
|
}
|
|
@@ -7967,7 +8369,7 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7967
8369
|
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
7968
8370
|
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON2(json["plan"]),
|
|
7969
8371
|
planId: json["plan_id"],
|
|
7970
|
-
priceBehavior: json["price_behavior"] == null ? void 0 : json["price_behavior"],
|
|
8372
|
+
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON2(json["price_behavior"]),
|
|
7971
8373
|
ruleId: json["rule_id"],
|
|
7972
8374
|
ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
|
|
7973
8375
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
@@ -7978,7 +8380,7 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
7978
8380
|
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
7979
8381
|
valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON2(json["value_trait"]),
|
|
7980
8382
|
valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
|
|
7981
|
-
valueType: json["value_type"]
|
|
8383
|
+
valueType: EntitlementValueTypeFromJSON2(json["value_type"])
|
|
7982
8384
|
};
|
|
7983
8385
|
}
|
|
7984
8386
|
|
|
@@ -7993,10 +8395,10 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7993
8395
|
return {
|
|
7994
8396
|
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
7995
8397
|
billingProduct: json["billing_product"] == null ? void 0 : BillingProductDetailResponseDataFromJSON2(json["billing_product"]),
|
|
7996
|
-
chargeType: json["charge_type"],
|
|
8398
|
+
chargeType: ChargeTypeFromJSON2(json["charge_type"]),
|
|
7997
8399
|
companyCount: json["company_count"],
|
|
7998
8400
|
compatiblePlanIds: json["compatible_plan_ids"],
|
|
7999
|
-
controlledBy: json["controlled_by"],
|
|
8401
|
+
controlledBy: PlanControlledByTypeFromJSON2(json["controlled_by"]),
|
|
8000
8402
|
createdAt: new Date(json["created_at"]),
|
|
8001
8403
|
custom: json["custom"],
|
|
8002
8404
|
customPlanConfig: json["custom_plan_config"] == null ? void 0 : CustomPlanConfigFromJSON2(json["custom_plan_config"]),
|
|
@@ -8019,7 +8421,7 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8019
8421
|
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
|
|
8020
8422
|
name: json["name"],
|
|
8021
8423
|
oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
|
|
8022
|
-
planType: json["plan_type"],
|
|
8424
|
+
planType: PlanTypeFromJSON2(json["plan_type"]),
|
|
8023
8425
|
trialDays: json["trial_days"] == null ? void 0 : json["trial_days"],
|
|
8024
8426
|
updatedAt: new Date(json["updated_at"]),
|
|
8025
8427
|
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["yearly_price"])
|
|
@@ -8134,7 +8536,8 @@ function normalize(data) {
|
|
|
8134
8536
|
taxCollectionEnabled: false
|
|
8135
8537
|
},
|
|
8136
8538
|
creditBundles: [],
|
|
8137
|
-
creditGrants: []
|
|
8539
|
+
creditGrants: [],
|
|
8540
|
+
preventSelfServiceDowngrade: false
|
|
8138
8541
|
});
|
|
8139
8542
|
}
|
|
8140
8543
|
var reducer = (state, action) => {
|
|
@@ -8255,12 +8658,29 @@ var reducer = (state, action) => {
|
|
|
8255
8658
|
};
|
|
8256
8659
|
}
|
|
8257
8660
|
case "SET_PLANID_BYPASS": {
|
|
8661
|
+
const isStringFormat = typeof action.config === "string";
|
|
8662
|
+
const config = isStringFormat ? { planId: action.config, hideSkipped: false } : action.config;
|
|
8663
|
+
let bypassPlanSelection;
|
|
8664
|
+
let bypassAddOnSelection;
|
|
8665
|
+
if (config.skipped !== void 0) {
|
|
8666
|
+
bypassPlanSelection = config.skipped.planStage ?? false;
|
|
8667
|
+
bypassAddOnSelection = config.skipped.addOnStage ?? false;
|
|
8668
|
+
} else if (isStringFormat) {
|
|
8669
|
+
bypassPlanSelection = true;
|
|
8670
|
+
bypassAddOnSelection = false;
|
|
8671
|
+
} else {
|
|
8672
|
+
bypassPlanSelection = false;
|
|
8673
|
+
bypassAddOnSelection = false;
|
|
8674
|
+
}
|
|
8258
8675
|
return {
|
|
8259
8676
|
...state,
|
|
8260
8677
|
layout: "checkout",
|
|
8261
8678
|
checkoutState: {
|
|
8262
|
-
planId:
|
|
8263
|
-
bypassPlanSelection
|
|
8679
|
+
...config.planId && { planId: config.planId },
|
|
8680
|
+
bypassPlanSelection,
|
|
8681
|
+
bypassAddOnSelection,
|
|
8682
|
+
...config.addOnIds && { addOnIds: config.addOnIds },
|
|
8683
|
+
hideSkippedStages: config.hideSkipped ?? false
|
|
8264
8684
|
}
|
|
8265
8685
|
};
|
|
8266
8686
|
}
|
|
@@ -8270,7 +8690,7 @@ var reducer = (state, action) => {
|
|
|
8270
8690
|
// src/context/EmbedProvider.tsx
|
|
8271
8691
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8272
8692
|
var getCustomHeaders = (sessionId) => ({
|
|
8273
|
-
"X-Schematic-Components-Version": "2.
|
|
8693
|
+
"X-Schematic-Components-Version": "2.3.1",
|
|
8274
8694
|
"X-Schematic-Session-ID": sessionId
|
|
8275
8695
|
});
|
|
8276
8696
|
var EmbedProvider = ({
|
|
@@ -8562,8 +8982,8 @@ var EmbedProvider = ({
|
|
|
8562
8982
|
const setCheckoutState = useCallback2((state2) => {
|
|
8563
8983
|
dispatch({ type: "SET_CHECKOUT_STATE", state: state2 });
|
|
8564
8984
|
}, []);
|
|
8565
|
-
const initializeWithPlan = useCallback2((
|
|
8566
|
-
dispatch({ type: "SET_PLANID_BYPASS",
|
|
8985
|
+
const initializeWithPlan = useCallback2((config) => {
|
|
8986
|
+
dispatch({ type: "SET_PLANID_BYPASS", config });
|
|
8567
8987
|
}, []);
|
|
8568
8988
|
useEffect(() => {
|
|
8569
8989
|
const element = document.getElementById(
|
|
@@ -8934,10 +9354,10 @@ var Box = dt("div")((props) => {
|
|
|
8934
9354
|
for (const [key, value] of Object.entries(props.$viewport || {})) {
|
|
8935
9355
|
styles.push(lt`
|
|
8936
9356
|
${{
|
|
8937
|
-
sm: "@container (min-width: 640px)",
|
|
8938
|
-
md: "@container (min-width: 768px)",
|
|
8939
|
-
lg: "@container (min-width: 1024px)",
|
|
8940
|
-
xl: "@container (min-width: 1280px)",
|
|
9357
|
+
"sm": "@container (min-width: 640px)",
|
|
9358
|
+
"md": "@container (min-width: 768px)",
|
|
9359
|
+
"lg": "@container (min-width: 1024px)",
|
|
9360
|
+
"xl": "@container (min-width: 1280px)",
|
|
8941
9361
|
"2xl": "@container (min-width: 1536px)"
|
|
8942
9362
|
}[key] || key} {
|
|
8943
9363
|
${Object.entries(value || {}).reduce(reducer2, [])}
|
|
@@ -9435,8 +9855,8 @@ var Overlay = dt(Box)`
|
|
|
9435
9855
|
scrollbar-gutter: stable both-edges;
|
|
9436
9856
|
`;
|
|
9437
9857
|
var Modal = dt.div.attrs({
|
|
9438
|
-
tabIndex: 0,
|
|
9439
|
-
role: "dialog",
|
|
9858
|
+
"tabIndex": 0,
|
|
9859
|
+
"role": "dialog",
|
|
9440
9860
|
"aria-modal": true
|
|
9441
9861
|
})`
|
|
9442
9862
|
position: relative;
|
|
@@ -10279,9 +10699,6 @@ var StageButton = ({
|
|
|
10279
10699
|
checkout,
|
|
10280
10700
|
checkoutStage,
|
|
10281
10701
|
checkoutStages,
|
|
10282
|
-
hasAddOns,
|
|
10283
|
-
hasPayInAdvanceEntitlements,
|
|
10284
|
-
hasCreditBundles,
|
|
10285
10702
|
hasPaymentMethod,
|
|
10286
10703
|
hasPlan,
|
|
10287
10704
|
inEditMode,
|
|
@@ -10296,7 +10713,31 @@ var StageButton = ({
|
|
|
10296
10713
|
}) => {
|
|
10297
10714
|
const { t: t2 } = useTranslation5();
|
|
10298
10715
|
const isDisabled = isLoading || !hasPlan || inEditMode;
|
|
10716
|
+
const getNextStageId = (currentStageId) => {
|
|
10717
|
+
if (!checkoutStages) return void 0;
|
|
10718
|
+
const currentIndex = checkoutStages.findIndex(
|
|
10719
|
+
(s2) => s2.id === currentStageId
|
|
10720
|
+
);
|
|
10721
|
+
return checkoutStages[currentIndex + 1]?.id;
|
|
10722
|
+
};
|
|
10723
|
+
const getStageDisplayName = (stageId) => {
|
|
10724
|
+
switch (stageId) {
|
|
10725
|
+
case "usage":
|
|
10726
|
+
return t2("Usage");
|
|
10727
|
+
case "addons":
|
|
10728
|
+
return t2("Addons");
|
|
10729
|
+
case "addonsUsage":
|
|
10730
|
+
return t2("Add-ons Quantity");
|
|
10731
|
+
case "credits":
|
|
10732
|
+
return t2("Credits");
|
|
10733
|
+
case "checkout":
|
|
10734
|
+
return t2("Checkout");
|
|
10735
|
+
default:
|
|
10736
|
+
return t2("Checkout");
|
|
10737
|
+
}
|
|
10738
|
+
};
|
|
10299
10739
|
if (checkoutStage === "plan") {
|
|
10740
|
+
const nextStage = getNextStageId("plan");
|
|
10300
10741
|
if (isSelectedPlanTrialable && trialPaymentMethodRequired && shouldTrial) {
|
|
10301
10742
|
return /* @__PURE__ */ jsx14(
|
|
10302
10743
|
Button,
|
|
@@ -10326,9 +10767,7 @@ var StageButton = ({
|
|
|
10326
10767
|
}
|
|
10327
10768
|
);
|
|
10328
10769
|
}
|
|
10329
|
-
if (!isPaymentMethodRequired && !
|
|
10330
|
-
(stage) => stage.id === "usage" || stage.id === "addons" || stage.id === "credits"
|
|
10331
|
-
)) {
|
|
10770
|
+
if (!isPaymentMethodRequired && !nextStage) {
|
|
10332
10771
|
return /* @__PURE__ */ jsx14(
|
|
10333
10772
|
NoPaymentRequired,
|
|
10334
10773
|
{
|
|
@@ -10345,27 +10784,23 @@ var StageButton = ({
|
|
|
10345
10784
|
type: "button",
|
|
10346
10785
|
disabled: isDisabled,
|
|
10347
10786
|
onClick: async () => {
|
|
10348
|
-
setCheckoutStage?.(
|
|
10349
|
-
hasPayInAdvanceEntitlements ? "usage" : hasAddOns ? "addons" : hasCreditBundles ? "credits" : "checkout"
|
|
10350
|
-
);
|
|
10787
|
+
setCheckoutStage?.(nextStage ?? "checkout");
|
|
10351
10788
|
},
|
|
10352
10789
|
$isLoading: isLoading,
|
|
10353
10790
|
$fullWidth: true,
|
|
10354
10791
|
$size: isSticky ? "sm" : "md",
|
|
10355
10792
|
children: /* @__PURE__ */ jsxs8(Flex, { $gap: "0.5rem", $justifyContent: "center", $alignItems: "center", children: [
|
|
10356
10793
|
t2("Next"),
|
|
10357
|
-
":",
|
|
10358
|
-
|
|
10359
|
-
hasPayInAdvanceEntitlements ? t2("Usage") : hasAddOns ? t2("Addons") : hasCreditBundles ? t2("Credits") : t2("Checkout"),
|
|
10794
|
+
": ",
|
|
10795
|
+
getStageDisplayName(nextStage),
|
|
10360
10796
|
/* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
|
|
10361
10797
|
] })
|
|
10362
10798
|
}
|
|
10363
10799
|
);
|
|
10364
10800
|
}
|
|
10365
10801
|
if (checkoutStage === "usage") {
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
)) {
|
|
10802
|
+
const nextStage = getNextStageId("usage");
|
|
10803
|
+
if (!isPaymentMethodRequired && !nextStage) {
|
|
10369
10804
|
return /* @__PURE__ */ jsx14(
|
|
10370
10805
|
NoPaymentRequired,
|
|
10371
10806
|
{
|
|
@@ -10382,9 +10817,7 @@ var StageButton = ({
|
|
|
10382
10817
|
type: "button",
|
|
10383
10818
|
disabled: isDisabled,
|
|
10384
10819
|
onClick: async () => {
|
|
10385
|
-
setCheckoutStage?.(
|
|
10386
|
-
hasAddOns ? "addons" : hasCreditBundles ? "credits" : "checkout"
|
|
10387
|
-
);
|
|
10820
|
+
setCheckoutStage?.(nextStage ?? "checkout");
|
|
10388
10821
|
},
|
|
10389
10822
|
$isLoading: isLoading,
|
|
10390
10823
|
$fullWidth: true,
|
|
@@ -10398,9 +10831,8 @@ var StageButton = ({
|
|
|
10398
10831
|
$padding: "0 1rem",
|
|
10399
10832
|
children: [
|
|
10400
10833
|
t2("Next"),
|
|
10401
|
-
":",
|
|
10402
|
-
|
|
10403
|
-
hasAddOns ? t2("Addons") : hasCreditBundles ? t2("Credits") : t2("Checkout"),
|
|
10834
|
+
": ",
|
|
10835
|
+
getStageDisplayName(nextStage),
|
|
10404
10836
|
/* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
|
|
10405
10837
|
]
|
|
10406
10838
|
}
|
|
@@ -10409,13 +10841,8 @@ var StageButton = ({
|
|
|
10409
10841
|
);
|
|
10410
10842
|
}
|
|
10411
10843
|
if (checkoutStage === "addons") {
|
|
10412
|
-
const
|
|
10413
|
-
|
|
10414
|
-
);
|
|
10415
|
-
const hasCreditsStage = checkoutStages?.some(
|
|
10416
|
-
(stage) => stage.id === "credits"
|
|
10417
|
-
);
|
|
10418
|
-
if (!isPaymentMethodRequired && !hasAddonsUsageStage && !hasCreditsStage) {
|
|
10844
|
+
const nextStage = getNextStageId("addons");
|
|
10845
|
+
if (!isPaymentMethodRequired && !nextStage) {
|
|
10419
10846
|
return /* @__PURE__ */ jsx14(
|
|
10420
10847
|
NoPaymentRequired,
|
|
10421
10848
|
{
|
|
@@ -10432,9 +10859,7 @@ var StageButton = ({
|
|
|
10432
10859
|
type: "button",
|
|
10433
10860
|
disabled: isDisabled,
|
|
10434
10861
|
onClick: async () => {
|
|
10435
|
-
setCheckoutStage?.(
|
|
10436
|
-
hasAddonsUsageStage ? "addonsUsage" : hasCreditsStage ? "credits" : "checkout"
|
|
10437
|
-
);
|
|
10862
|
+
setCheckoutStage?.(nextStage ?? "checkout");
|
|
10438
10863
|
},
|
|
10439
10864
|
$isLoading: isLoading,
|
|
10440
10865
|
$fullWidth: true,
|
|
@@ -10447,9 +10872,8 @@ var StageButton = ({
|
|
|
10447
10872
|
$padding: "0 1rem",
|
|
10448
10873
|
children: [
|
|
10449
10874
|
t2("Next"),
|
|
10450
|
-
":",
|
|
10451
|
-
|
|
10452
|
-
hasAddonsUsageStage ? t2("Add-ons Quantity") : hasCreditsStage ? t2("Credits") : t2("Checkout"),
|
|
10875
|
+
": ",
|
|
10876
|
+
getStageDisplayName(nextStage),
|
|
10453
10877
|
/* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
|
|
10454
10878
|
]
|
|
10455
10879
|
}
|
|
@@ -10458,7 +10882,8 @@ var StageButton = ({
|
|
|
10458
10882
|
);
|
|
10459
10883
|
}
|
|
10460
10884
|
if (checkoutStage === "addonsUsage") {
|
|
10461
|
-
|
|
10885
|
+
const nextStage = getNextStageId("addonsUsage");
|
|
10886
|
+
if (!isPaymentMethodRequired && !nextStage) {
|
|
10462
10887
|
return /* @__PURE__ */ jsx14(
|
|
10463
10888
|
NoPaymentRequired,
|
|
10464
10889
|
{
|
|
@@ -10475,7 +10900,7 @@ var StageButton = ({
|
|
|
10475
10900
|
type: "button",
|
|
10476
10901
|
disabled: isDisabled,
|
|
10477
10902
|
onClick: async () => {
|
|
10478
|
-
setCheckoutStage?.(
|
|
10903
|
+
setCheckoutStage?.(nextStage ?? "checkout");
|
|
10479
10904
|
},
|
|
10480
10905
|
$isLoading: isLoading,
|
|
10481
10906
|
$fullWidth: true,
|
|
@@ -10490,7 +10915,7 @@ var StageButton = ({
|
|
|
10490
10915
|
children: [
|
|
10491
10916
|
t2("Next"),
|
|
10492
10917
|
": ",
|
|
10493
|
-
|
|
10918
|
+
getStageDisplayName(nextStage),
|
|
10494
10919
|
/* @__PURE__ */ jsx14(Icon3, { name: "arrow-right" })
|
|
10495
10920
|
]
|
|
10496
10921
|
}
|
|
@@ -10702,6 +11127,10 @@ var Sidebar = forwardRef7(
|
|
|
10702
11127
|
}, [charges]);
|
|
10703
11128
|
const updatedUsageBasedEntitlements = useMemo6(() => {
|
|
10704
11129
|
const changedUsageBasedEntitlements = [];
|
|
11130
|
+
const allSelectedUsageBasedEntitlements = [
|
|
11131
|
+
...usageBasedEntitlements,
|
|
11132
|
+
...addOnUsageBasedEntitlements
|
|
11133
|
+
];
|
|
10705
11134
|
const addedUsageBasedEntitlements = selectedPlan ? usageBasedEntitlements.reduce(
|
|
10706
11135
|
(acc, selected) => {
|
|
10707
11136
|
const changed = currentUsageBasedEntitlements.find(
|
|
@@ -10721,9 +11150,10 @@ var Sidebar = forwardRef7(
|
|
|
10721
11150
|
) : [];
|
|
10722
11151
|
const removedUsageBasedEntitlements = selectedPlan ? currentUsageBasedEntitlements.reduce(
|
|
10723
11152
|
(acc, current) => {
|
|
10724
|
-
const
|
|
10725
|
-
(entitlement) => entitlement.id
|
|
10726
|
-
)
|
|
11153
|
+
const existsInSelected = allSelectedUsageBasedEntitlements.some(
|
|
11154
|
+
(entitlement) => entitlement.id === current.entitlementId
|
|
11155
|
+
);
|
|
11156
|
+
const match2 = !existsInSelected && currentEntitlements.find(
|
|
10727
11157
|
(usage) => usage.entitlementId === current.entitlementId
|
|
10728
11158
|
);
|
|
10729
11159
|
if (match2) {
|
|
@@ -10749,7 +11179,8 @@ var Sidebar = forwardRef7(
|
|
|
10749
11179
|
selectedPlan,
|
|
10750
11180
|
currentEntitlements,
|
|
10751
11181
|
currentUsageBasedEntitlements,
|
|
10752
|
-
usageBasedEntitlements
|
|
11182
|
+
usageBasedEntitlements,
|
|
11183
|
+
addOnUsageBasedEntitlements
|
|
10753
11184
|
]);
|
|
10754
11185
|
const selectedAddOns = useMemo6(
|
|
10755
11186
|
() => addOns.filter((addOn) => addOn.isSelected),
|
|
@@ -10937,9 +11368,6 @@ var Sidebar = forwardRef7(
|
|
|
10937
11368
|
checkout: handleCheckout,
|
|
10938
11369
|
checkoutStage,
|
|
10939
11370
|
checkoutStages,
|
|
10940
|
-
hasAddOns: addOns.length > 0,
|
|
10941
|
-
hasPayInAdvanceEntitlements: payInAdvanceEntitlements.length > 0,
|
|
10942
|
-
hasCreditBundles: creditBundles.length > 0,
|
|
10943
11371
|
hasPaymentMethod: typeof paymentMethod !== "undefined" || typeof paymentMethodId === "string",
|
|
10944
11372
|
hasPlan: typeof selectedPlan !== "undefined",
|
|
10945
11373
|
inEditMode: settings.mode === "edit",
|
|
@@ -11803,7 +12231,7 @@ var Checkout = ({
|
|
|
11803
12231
|
if (!isPaymentMethodRequired) {
|
|
11804
12232
|
return null;
|
|
11805
12233
|
}
|
|
11806
|
-
return /* @__PURE__ */ jsxs11(Flex, { $
|
|
12234
|
+
return /* @__PURE__ */ jsxs11(Flex, { $flexDirection: "column", $gap: "1.5rem", children: [
|
|
11807
12235
|
/* @__PURE__ */ jsx17(
|
|
11808
12236
|
PaymentMethodDetails,
|
|
11809
12237
|
{
|
|
@@ -12778,20 +13206,13 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
12778
13206
|
);
|
|
12779
13207
|
const [isLoading, setIsLoading] = useState10(false);
|
|
12780
13208
|
const [error, setError] = useState10();
|
|
12781
|
-
const {
|
|
12782
|
-
currentPlanId,
|
|
12783
|
-
currentEntitlements,
|
|
12784
|
-
showPeriodToggle,
|
|
12785
|
-
trialPaymentMethodRequired
|
|
12786
|
-
} = useMemo8(() => {
|
|
13209
|
+
const { currentEntitlements, showPeriodToggle, trialPaymentMethodRequired } = useMemo8(() => {
|
|
12787
13210
|
return {
|
|
12788
|
-
currentPlanId: data?.company?.plan?.id,
|
|
12789
13211
|
currentEntitlements: data?.featureUsage ? data.featureUsage.features : [],
|
|
12790
13212
|
showPeriodToggle: data?.showPeriodToggle ?? true,
|
|
12791
13213
|
trialPaymentMethodRequired: data?.trialPaymentMethodRequired === true
|
|
12792
13214
|
};
|
|
12793
13215
|
}, [
|
|
12794
|
-
data?.company?.plan?.id,
|
|
12795
13216
|
data?.featureUsage,
|
|
12796
13217
|
data?.showPeriodToggle,
|
|
12797
13218
|
data?.trialPaymentMethodRequired
|
|
@@ -12819,8 +13240,12 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
12819
13240
|
const [addOns, setAddOns] = useState10(() => {
|
|
12820
13241
|
return availableAddOns.map((addOn) => ({
|
|
12821
13242
|
...addOn,
|
|
12822
|
-
isSelected:
|
|
12823
|
-
|
|
13243
|
+
isSelected: (
|
|
13244
|
+
// Check if bypassed with specific add-on IDs
|
|
13245
|
+
checkoutState?.addOnIds?.includes(addOn.id) || // Check if single add-on ID provided
|
|
13246
|
+
(typeof checkoutState?.addOnId !== "undefined" ? addOn.id === checkoutState.addOnId : (data?.company?.addOns || []).some(
|
|
13247
|
+
(currentAddOn) => addOn.id === currentAddOn.id
|
|
13248
|
+
))
|
|
12824
13249
|
)
|
|
12825
13250
|
}));
|
|
12826
13251
|
});
|
|
@@ -12840,19 +13265,47 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
12840
13265
|
)
|
|
12841
13266
|
);
|
|
12842
13267
|
const [addOnUsageBasedEntitlements, setAddOnUsageBasedEntitlements] = useState10(() => {
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
13268
|
+
const currentAddOnEntitlements = (data?.company?.addOns || []).flatMap(
|
|
13269
|
+
(currentAddOn) => {
|
|
13270
|
+
const availableAddOn = availableAddOns.find(
|
|
13271
|
+
(available) => available.id === currentAddOn.id
|
|
13272
|
+
);
|
|
13273
|
+
if (!availableAddOn) return [];
|
|
13274
|
+
return availableAddOn.entitlements.reduce(
|
|
13275
|
+
createActiveUsageBasedEntitlementsReducer(
|
|
13276
|
+
currentEntitlements,
|
|
13277
|
+
planPeriod
|
|
13278
|
+
),
|
|
13279
|
+
[]
|
|
13280
|
+
);
|
|
13281
|
+
}
|
|
13282
|
+
);
|
|
13283
|
+
const bypassAddOnEntitlements = (checkoutState?.addOnIds || []).flatMap(
|
|
13284
|
+
(addOnId) => {
|
|
13285
|
+
const availableAddOn = availableAddOns.find(
|
|
13286
|
+
(available) => available.id === addOnId
|
|
13287
|
+
);
|
|
13288
|
+
if (!availableAddOn) return [];
|
|
13289
|
+
return availableAddOn.entitlements.filter(
|
|
13290
|
+
(entitlement) => entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */
|
|
13291
|
+
).map((entitlement) => ({
|
|
13292
|
+
...entitlement,
|
|
13293
|
+
allocation: entitlement.valueNumeric || 0,
|
|
13294
|
+
usage: 0,
|
|
13295
|
+
quantity: 1
|
|
13296
|
+
}));
|
|
13297
|
+
}
|
|
13298
|
+
);
|
|
13299
|
+
const allEntitlements = [...currentAddOnEntitlements];
|
|
13300
|
+
for (const bypassEnt of bypassAddOnEntitlements) {
|
|
13301
|
+
const exists = currentAddOnEntitlements.some(
|
|
13302
|
+
(current) => current.featureId === bypassEnt.featureId
|
|
12854
13303
|
);
|
|
12855
|
-
|
|
13304
|
+
if (!exists) {
|
|
13305
|
+
allEntitlements.push(bypassEnt);
|
|
13306
|
+
}
|
|
13307
|
+
}
|
|
13308
|
+
return allEntitlements;
|
|
12856
13309
|
});
|
|
12857
13310
|
const payInAdvanceEntitlements = useMemo8(
|
|
12858
13311
|
() => usageBasedEntitlements.filter(
|
|
@@ -12941,6 +13394,10 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
12941
13394
|
isPaymentMethodRequired
|
|
12942
13395
|
]);
|
|
12943
13396
|
const [hasSkippedInitialPlan, setHasSkippedInitialPlan] = useState10(false);
|
|
13397
|
+
const [hasSkippedInitialAddOns, setHasSkippedInitialAddOns] = useState10(false);
|
|
13398
|
+
const [isBypassLoading, setIsBypassLoading] = useState10(
|
|
13399
|
+
() => checkoutState?.bypassPlanSelection || checkoutState?.bypassAddOnSelection
|
|
13400
|
+
);
|
|
12944
13401
|
const [checkoutStage, setCheckoutStage] = useState10(() => {
|
|
12945
13402
|
if (checkoutState?.addOnId) {
|
|
12946
13403
|
return "addons";
|
|
@@ -12954,24 +13411,35 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
12954
13411
|
if (checkoutState?.credits) {
|
|
12955
13412
|
return "credits";
|
|
12956
13413
|
}
|
|
12957
|
-
if (
|
|
13414
|
+
if (checkoutState?.bypassPlanSelection) {
|
|
12958
13415
|
return checkoutStages.some((stage) => stage.id === "usage") ? "usage" : checkoutStages.some((stage) => stage.id === "addons") ? "addons" : checkoutStages.some((stage) => stage.id === "addonsUsage") ? "addonsUsage" : checkoutStages.some((stage) => stage.id === "credits") ? "credits" : checkoutStages.some((stage) => stage.id === "checkout") ? "checkout" : checkoutStages[0]?.id || "plan";
|
|
12959
13416
|
}
|
|
12960
13417
|
return "plan";
|
|
12961
13418
|
});
|
|
12962
13419
|
useEffect5(() => {
|
|
12963
13420
|
if (checkoutState?.bypassPlanSelection && checkoutStage === "plan" && !hasSkippedInitialPlan) {
|
|
12964
|
-
const
|
|
13421
|
+
const currentIndex = checkoutStages.findIndex((s2) => s2.id === "plan");
|
|
13422
|
+
const nextStage = checkoutStages[currentIndex + 1];
|
|
12965
13423
|
if (nextStage) {
|
|
12966
13424
|
setHasSkippedInitialPlan(true);
|
|
12967
13425
|
setCheckoutStage(nextStage.id);
|
|
12968
13426
|
}
|
|
12969
13427
|
}
|
|
13428
|
+
if (checkoutState?.bypassAddOnSelection && checkoutStage === "addons" && !hasSkippedInitialAddOns) {
|
|
13429
|
+
const currentIndex = checkoutStages.findIndex((s2) => s2.id === "addons");
|
|
13430
|
+
const nextStage = checkoutStages[currentIndex + 1];
|
|
13431
|
+
if (nextStage) {
|
|
13432
|
+
setHasSkippedInitialAddOns(true);
|
|
13433
|
+
setCheckoutStage(nextStage.id);
|
|
13434
|
+
}
|
|
13435
|
+
}
|
|
12970
13436
|
}, [
|
|
12971
13437
|
checkoutStages,
|
|
12972
13438
|
checkoutState?.bypassPlanSelection,
|
|
13439
|
+
checkoutState?.bypassAddOnSelection,
|
|
12973
13440
|
checkoutStage,
|
|
12974
|
-
hasSkippedInitialPlan
|
|
13441
|
+
hasSkippedInitialPlan,
|
|
13442
|
+
hasSkippedInitialAddOns
|
|
12975
13443
|
]);
|
|
12976
13444
|
const handlePreviewCheckout = useCallback9(
|
|
12977
13445
|
async (updates) => {
|
|
@@ -13082,6 +13550,9 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13082
13550
|
setError(msg);
|
|
13083
13551
|
} finally {
|
|
13084
13552
|
setIsLoading(false);
|
|
13553
|
+
if (isBypassLoading) {
|
|
13554
|
+
setIsBypassLoading(false);
|
|
13555
|
+
}
|
|
13085
13556
|
}
|
|
13086
13557
|
},
|
|
13087
13558
|
[
|
|
@@ -13094,7 +13565,8 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13094
13565
|
addOns,
|
|
13095
13566
|
creditBundles,
|
|
13096
13567
|
shouldTrial,
|
|
13097
|
-
promoCode
|
|
13568
|
+
promoCode,
|
|
13569
|
+
isBypassLoading
|
|
13098
13570
|
]
|
|
13099
13571
|
);
|
|
13100
13572
|
const selectPlan = useCallback9(
|
|
@@ -13241,34 +13713,29 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13241
13713
|
},
|
|
13242
13714
|
[handlePreviewCheckout]
|
|
13243
13715
|
);
|
|
13716
|
+
const hasInitializedPlan = useRef6(false);
|
|
13244
13717
|
useEffect5(() => {
|
|
13245
|
-
if (selectedPlan) {
|
|
13718
|
+
if (!hasInitializedPlan.current && selectedPlan) {
|
|
13719
|
+
hasInitializedPlan.current = true;
|
|
13246
13720
|
selectPlan({ plan: selectedPlan, period: currentPeriod });
|
|
13247
13721
|
}
|
|
13248
|
-
}, []);
|
|
13722
|
+
}, [selectedPlan, currentPeriod, selectPlan]);
|
|
13249
13723
|
useEffect5(() => {
|
|
13250
13724
|
if (checkoutState?.planId) {
|
|
13251
13725
|
const plan = availablePlans.find(
|
|
13252
13726
|
(plan2) => plan2.id === checkoutState.planId
|
|
13253
13727
|
);
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
useEffect5(() => {
|
|
13258
|
-
if (checkoutState?.addOnId) {
|
|
13259
|
-
const checkoutStateAddOn = availableAddOns.find(
|
|
13260
|
-
(addOn) => addOn.id === checkoutState.addOnId
|
|
13261
|
-
);
|
|
13262
|
-
setAddOns(
|
|
13263
|
-
(prev2) => prev2.map((addOn) => ({
|
|
13264
|
-
...addOn,
|
|
13265
|
-
...addOn.id === checkoutStateAddOn?.id && {
|
|
13266
|
-
isSelected: true
|
|
13267
|
-
}
|
|
13268
|
-
}))
|
|
13269
|
-
);
|
|
13728
|
+
if (plan && plan.id !== selectedPlan?.id) {
|
|
13729
|
+
selectPlan({ plan, period: currentPeriod });
|
|
13730
|
+
}
|
|
13270
13731
|
}
|
|
13271
|
-
}, [
|
|
13732
|
+
}, [
|
|
13733
|
+
availablePlans,
|
|
13734
|
+
checkoutState?.planId,
|
|
13735
|
+
currentPeriod,
|
|
13736
|
+
selectPlan,
|
|
13737
|
+
selectedPlan?.id
|
|
13738
|
+
]);
|
|
13272
13739
|
useEffect5(() => {
|
|
13273
13740
|
setAddOns((prevAddOns) => {
|
|
13274
13741
|
return availableAddOns.filter((availAddOn) => {
|
|
@@ -13310,7 +13777,36 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13310
13777
|
const activeCheckoutStage = checkoutStages.find(
|
|
13311
13778
|
(stage) => stage.id === checkoutStage
|
|
13312
13779
|
);
|
|
13313
|
-
const
|
|
13780
|
+
const visibleStages = useMemo8(() => {
|
|
13781
|
+
if (!checkoutState?.hideSkippedStages) {
|
|
13782
|
+
return checkoutStages;
|
|
13783
|
+
}
|
|
13784
|
+
return checkoutStages.filter((stage) => {
|
|
13785
|
+
if (stage.id === "plan" && checkoutState.bypassPlanSelection) {
|
|
13786
|
+
return false;
|
|
13787
|
+
}
|
|
13788
|
+
if (stage.id === "addons" && checkoutState.bypassAddOnSelection) {
|
|
13789
|
+
return false;
|
|
13790
|
+
}
|
|
13791
|
+
return true;
|
|
13792
|
+
});
|
|
13793
|
+
}, [checkoutStages, checkoutState]);
|
|
13794
|
+
const navigableStages = useMemo8(() => {
|
|
13795
|
+
return checkoutStages.filter((stage) => {
|
|
13796
|
+
if (stage.id === "plan" && checkoutState?.bypassPlanSelection) {
|
|
13797
|
+
return false;
|
|
13798
|
+
}
|
|
13799
|
+
if (stage.id === "addons" && checkoutState?.bypassAddOnSelection) {
|
|
13800
|
+
return false;
|
|
13801
|
+
}
|
|
13802
|
+
return true;
|
|
13803
|
+
});
|
|
13804
|
+
}, [
|
|
13805
|
+
checkoutStages,
|
|
13806
|
+
checkoutState?.bypassPlanSelection,
|
|
13807
|
+
checkoutState?.bypassAddOnSelection
|
|
13808
|
+
]);
|
|
13809
|
+
const shouldShowBypassOverlay = isBypassLoading || checkoutState?.bypassPlanSelection && checkoutStage === "plan" && !hasSkippedInitialPlan || checkoutState?.bypassAddOnSelection && checkoutStage === "addons" && !hasSkippedInitialAddOns;
|
|
13314
13810
|
return /* @__PURE__ */ jsxs16(Modal2, { ref: modalRef, size: "lg", top, children: [
|
|
13315
13811
|
shouldShowBypassOverlay && /* @__PURE__ */ jsx22(
|
|
13316
13812
|
Flex,
|
|
@@ -13344,12 +13840,12 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13344
13840
|
$gap: "1rem"
|
|
13345
13841
|
}
|
|
13346
13842
|
},
|
|
13347
|
-
children:
|
|
13843
|
+
children: visibleStages.map((stage, index, stages) => /* @__PURE__ */ jsx22(
|
|
13348
13844
|
Navigation,
|
|
13349
13845
|
{
|
|
13350
13846
|
name: stage.name,
|
|
13351
13847
|
index,
|
|
13352
|
-
activeIndex:
|
|
13848
|
+
activeIndex: visibleStages.findIndex(
|
|
13353
13849
|
(s2) => s2.id === checkoutStage
|
|
13354
13850
|
),
|
|
13355
13851
|
isLast: index === stages.length - 1,
|
|
@@ -13494,7 +13990,7 @@ var CheckoutDialog = ({ top = 0 }) => {
|
|
|
13494
13990
|
creditBundles,
|
|
13495
13991
|
charges,
|
|
13496
13992
|
checkoutStage,
|
|
13497
|
-
checkoutStages,
|
|
13993
|
+
checkoutStages: navigableStages,
|
|
13498
13994
|
error,
|
|
13499
13995
|
isLoading,
|
|
13500
13996
|
isPaymentMethodRequired,
|
|
@@ -15757,7 +16253,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
|
|
|
15757
16253
|
}
|
|
15758
16254
|
stripe._registerWrapper({
|
|
15759
16255
|
name: "stripe-js",
|
|
15760
|
-
version: "8.
|
|
16256
|
+
version: "8.4.0",
|
|
15761
16257
|
startTime
|
|
15762
16258
|
});
|
|
15763
16259
|
};
|
|
@@ -15832,7 +16328,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
|
|
|
15832
16328
|
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
15833
16329
|
var expectedVersion = RELEASE_TRAIN;
|
|
15834
16330
|
if (isTestKey && version !== expectedVersion) {
|
|
15835
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.
|
|
16331
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("8.4.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
15836
16332
|
}
|
|
15837
16333
|
var stripe = maybeStripe.apply(void 0, args);
|
|
15838
16334
|
registerWrapper(stripe, startTime);
|
|
@@ -15871,7 +16367,7 @@ var loadStripe = function loadStripe2() {
|
|
|
15871
16367
|
// src/components/elements/payment-method/PaymentMethodDetails.tsx
|
|
15872
16368
|
import { useCallback as useCallback12, useEffect as useEffect7, useMemo as useMemo20, useState as useState17 } from "react";
|
|
15873
16369
|
import { useTranslation as useTranslation26 } from "react-i18next";
|
|
15874
|
-
import {
|
|
16370
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
15875
16371
|
var resolveDesignProps6 = () => {
|
|
15876
16372
|
return {
|
|
15877
16373
|
header: {
|
|
@@ -16026,7 +16522,7 @@ var PaymentMethodDetails = ({
|
|
|
16026
16522
|
showPaymentForm,
|
|
16027
16523
|
initializePaymentMethod
|
|
16028
16524
|
]);
|
|
16029
|
-
return /* @__PURE__ */ jsxs31(
|
|
16525
|
+
return /* @__PURE__ */ jsxs31(Flex, { $position: "relative", $flexDirection: "column", $gap: "1.5rem", children: [
|
|
16030
16526
|
/* @__PURE__ */ jsx42(
|
|
16031
16527
|
Flex,
|
|
16032
16528
|
{
|
|
@@ -16197,9 +16693,9 @@ var AddOn = ({ addOn, currency, layout }) => {
|
|
|
16197
16693
|
};
|
|
16198
16694
|
|
|
16199
16695
|
// src/components/elements/plan-manager/UsageDetails.tsx
|
|
16200
|
-
import { Fragment as
|
|
16696
|
+
import { Fragment as Fragment17, useMemo as useMemo21 } from "react";
|
|
16201
16697
|
import { useTranslation as useTranslation27 } from "react-i18next";
|
|
16202
|
-
import { Fragment as
|
|
16698
|
+
import { Fragment as Fragment18, jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
16203
16699
|
var UsageDetails2 = ({
|
|
16204
16700
|
entitlement,
|
|
16205
16701
|
period,
|
|
@@ -16222,9 +16718,9 @@ var UsageDetails2 = ({
|
|
|
16222
16718
|
let index = 0;
|
|
16223
16719
|
if (entitlement.priceBehavior === "overage" /* Overage */) {
|
|
16224
16720
|
acc.push(
|
|
16225
|
-
amount > 0 ? /* @__PURE__ */ jsx44(
|
|
16721
|
+
amount > 0 ? /* @__PURE__ */ jsx44(Fragment17, { children: t2("X additional", {
|
|
16226
16722
|
amount
|
|
16227
|
-
}) }, index) : /* @__PURE__ */ jsxs33(
|
|
16723
|
+
}) }, index) : /* @__PURE__ */ jsxs33(Fragment17, { children: [
|
|
16228
16724
|
t2("Additional"),
|
|
16229
16725
|
": "
|
|
16230
16726
|
] }, index)
|
|
@@ -16235,16 +16731,16 @@ var UsageDetails2 = ({
|
|
|
16235
16731
|
if (entitlement.priceBehavior !== "tier" /* Tiered */ && entitlement.feature && typeof price === "number" && !amount) {
|
|
16236
16732
|
const packageSize = billingPrice?.packageSize ?? 1;
|
|
16237
16733
|
acc.push(
|
|
16238
|
-
/* @__PURE__ */ jsxs33(
|
|
16734
|
+
/* @__PURE__ */ jsxs33(Fragment17, { children: [
|
|
16239
16735
|
formatCurrency(price, billingPrice?.currency),
|
|
16240
16736
|
/* @__PURE__ */ jsxs33("sub", { children: [
|
|
16241
16737
|
"/",
|
|
16242
|
-
packageSize > 1 && /* @__PURE__ */ jsxs33(
|
|
16738
|
+
packageSize > 1 && /* @__PURE__ */ jsxs33(Fragment18, { children: [
|
|
16243
16739
|
packageSize,
|
|
16244
16740
|
" "
|
|
16245
16741
|
] }),
|
|
16246
16742
|
getFeatureName(entitlement.feature, packageSize),
|
|
16247
|
-
entitlement.feature.featureType === "trait" /* Trait */ && /* @__PURE__ */ jsxs33(
|
|
16743
|
+
entitlement.feature.featureType === "trait" /* Trait */ && /* @__PURE__ */ jsxs33(Fragment18, { children: [
|
|
16248
16744
|
"/",
|
|
16249
16745
|
shortenPeriod(period)
|
|
16250
16746
|
] })
|
|
@@ -16256,7 +16752,7 @@ var UsageDetails2 = ({
|
|
|
16256
16752
|
if (showCredits && entitlement.priceBehavior === "credit_burndown" /* Credit */ && entitlement.planEntitlement?.consumptionRate && entitlement.planEntitlement?.valueCredit) {
|
|
16257
16753
|
const creditAmount = entitlement.planEntitlement.consumptionRate * amount;
|
|
16258
16754
|
acc.push(
|
|
16259
|
-
creditAmount > 0 ? /* @__PURE__ */ jsxs33(
|
|
16755
|
+
creditAmount > 0 ? /* @__PURE__ */ jsxs33(Fragment17, { children: [
|
|
16260
16756
|
creditAmount,
|
|
16261
16757
|
" ",
|
|
16262
16758
|
getFeatureName(
|
|
@@ -16265,7 +16761,7 @@ var UsageDetails2 = ({
|
|
|
16265
16761
|
),
|
|
16266
16762
|
" ",
|
|
16267
16763
|
t2("used")
|
|
16268
|
-
] }, index) : /* @__PURE__ */ jsxs33(
|
|
16764
|
+
] }, index) : /* @__PURE__ */ jsxs33(Fragment17, { children: [
|
|
16269
16765
|
entitlement.planEntitlement.consumptionRate,
|
|
16270
16766
|
" ",
|
|
16271
16767
|
getFeatureName(
|
|
@@ -16294,7 +16790,7 @@ var UsageDetails2 = ({
|
|
|
16294
16790
|
$flexWrap: "wrap",
|
|
16295
16791
|
$gap: "0.5rem",
|
|
16296
16792
|
children: [
|
|
16297
|
-
/* @__PURE__ */ jsx44(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" && quantity > 0 ? /* @__PURE__ */ jsxs33(
|
|
16793
|
+
/* @__PURE__ */ jsx44(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" && quantity > 0 ? /* @__PURE__ */ jsxs33(Fragment18, { children: [
|
|
16298
16794
|
quantity,
|
|
16299
16795
|
" ",
|
|
16300
16796
|
entitlement.feature.name
|
|
@@ -16334,7 +16830,7 @@ var UsageDetails2 = ({
|
|
|
16334
16830
|
};
|
|
16335
16831
|
|
|
16336
16832
|
// src/components/elements/plan-manager/PlanManager.tsx
|
|
16337
|
-
import { Fragment as
|
|
16833
|
+
import { Fragment as Fragment19, jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
16338
16834
|
var resolveDesignProps7 = (props) => {
|
|
16339
16835
|
return {
|
|
16340
16836
|
header: {
|
|
@@ -16455,7 +16951,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
|
|
|
16455
16951
|
const isUsageBasedPlan2 = isFreePlan2 && usageBasedEntitlements.length > 0;
|
|
16456
16952
|
return { isFreePlan: isFreePlan2, isUsageBasedPlan: isUsageBasedPlan2 };
|
|
16457
16953
|
}, [currentPlan, usageBasedEntitlements]);
|
|
16458
|
-
return /* @__PURE__ */ jsxs34(
|
|
16954
|
+
return /* @__PURE__ */ jsxs34(Fragment19, { children: [
|
|
16459
16955
|
isTrialSubscription && !willSubscriptionCancel ? /* @__PURE__ */ jsxs34(
|
|
16460
16956
|
Notice,
|
|
16461
16957
|
{
|
|
@@ -16616,7 +17112,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
|
|
|
16616
17112
|
" ",
|
|
16617
17113
|
getFeatureName(group, group.quantity),
|
|
16618
17114
|
" ",
|
|
16619
|
-
subscriptionInterval && /* @__PURE__ */ jsxs34(
|
|
17115
|
+
subscriptionInterval && /* @__PURE__ */ jsxs34(Fragment19, { children: [
|
|
16620
17116
|
t2("per"),
|
|
16621
17117
|
" ",
|
|
16622
17118
|
t2(subscriptionInterval)
|
|
@@ -16647,7 +17143,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
|
|
|
16647
17143
|
typeof planCreditGrant.billingCreditAutoTopupThresholdPercent === "number" ? t2("Auto-topup enabled at X%", {
|
|
16648
17144
|
threshold: planCreditGrant.billingCreditAutoTopupThresholdPercent
|
|
16649
17145
|
}) : t2("Auto-topup enabled"),
|
|
16650
|
-
planCreditGrant.billingCreditAutoTopupAmount && /* @__PURE__ */ jsxs34(
|
|
17146
|
+
planCreditGrant.billingCreditAutoTopupAmount && /* @__PURE__ */ jsxs34(Fragment19, { children: [
|
|
16651
17147
|
" ",
|
|
16652
17148
|
"(+",
|
|
16653
17149
|
planCreditGrant.billingCreditAutoTopupAmount,
|
|
@@ -16787,7 +17283,7 @@ PlanManager.displayName = "PlanManager";
|
|
|
16787
17283
|
|
|
16788
17284
|
// src/components/elements/pricing-table/PricingTable.tsx
|
|
16789
17285
|
import {
|
|
16790
|
-
Fragment as
|
|
17286
|
+
Fragment as Fragment23,
|
|
16791
17287
|
forwardRef as forwardRef15,
|
|
16792
17288
|
useCallback as useCallback13,
|
|
16793
17289
|
useEffect as useEffect8,
|
|
@@ -16798,7 +17294,7 @@ import { useTranslation as useTranslation32 } from "react-i18next";
|
|
|
16798
17294
|
// src/components/elements/pricing-table/AddOn.tsx
|
|
16799
17295
|
import { useMemo as useMemo23 } from "react";
|
|
16800
17296
|
import { useTranslation as useTranslation29 } from "react-i18next";
|
|
16801
|
-
import { Fragment as
|
|
17297
|
+
import { Fragment as Fragment20, jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
16802
17298
|
function renderMeteredEntitlementPricing2({
|
|
16803
17299
|
priceBehavior,
|
|
16804
17300
|
softLimit,
|
|
@@ -16810,7 +17306,7 @@ function renderMeteredEntitlementPricing2({
|
|
|
16810
17306
|
isTiered
|
|
16811
17307
|
}) {
|
|
16812
17308
|
if (priceBehavior === "overage" /* Overage */ && softLimit) {
|
|
16813
|
-
return /* @__PURE__ */ jsxs35(
|
|
17309
|
+
return /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
16814
17310
|
"Additional: ",
|
|
16815
17311
|
formatCurrency(price, currency),
|
|
16816
17312
|
"/",
|
|
@@ -16821,10 +17317,10 @@ function renderMeteredEntitlementPricing2({
|
|
|
16821
17317
|
] });
|
|
16822
17318
|
}
|
|
16823
17319
|
if (priceBehavior === "pay_as_you_go" /* PayAsYouGo */ || priceBehavior === "pay_in_advance" /* PayInAdvance */) {
|
|
16824
|
-
return /* @__PURE__ */ jsxs35(
|
|
17320
|
+
return /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
16825
17321
|
formatCurrency(price, currency),
|
|
16826
17322
|
"/",
|
|
16827
|
-
packageSize > 1 && /* @__PURE__ */ jsxs35(
|
|
17323
|
+
packageSize > 1 && /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
16828
17324
|
packageSize,
|
|
16829
17325
|
" "
|
|
16830
17326
|
] }),
|
|
@@ -16835,7 +17331,7 @@ function renderMeteredEntitlementPricing2({
|
|
|
16835
17331
|
] });
|
|
16836
17332
|
}
|
|
16837
17333
|
if (isTiered) {
|
|
16838
|
-
return /* @__PURE__ */ jsx46(
|
|
17334
|
+
return /* @__PURE__ */ jsx46(Fragment20, { children: "Tier-based pricing" });
|
|
16839
17335
|
}
|
|
16840
17336
|
return null;
|
|
16841
17337
|
}
|
|
@@ -16922,7 +17418,7 @@ var AddOn2 = ({ addOn, sharedProps, selectedPeriod }) => {
|
|
|
16922
17418
|
{
|
|
16923
17419
|
"data-testid": "sch-addon-price",
|
|
16924
17420
|
display: layout.plans.name.fontStyle,
|
|
16925
|
-
children: shouldShowUsageBased2(addOnPrice ?? 0, displayableEntitlements) ? t2("Usage-based") : /* @__PURE__ */ jsxs35(
|
|
17421
|
+
children: shouldShowUsageBased2(addOnPrice ?? 0, displayableEntitlements) ? t2("Usage-based") : /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
16926
17422
|
formatCurrency(addOnPrice ?? 0, addOnCurrency),
|
|
16927
17423
|
/* @__PURE__ */ jsxs35("sub", { children: [
|
|
16928
17424
|
"/",
|
|
@@ -17086,7 +17582,7 @@ import { useTranslation as useTranslation31 } from "react-i18next";
|
|
|
17086
17582
|
|
|
17087
17583
|
// src/components/elements/pricing-table/Entitlement.tsx
|
|
17088
17584
|
import { useTranslation as useTranslation30 } from "react-i18next";
|
|
17089
|
-
import { Fragment as
|
|
17585
|
+
import { Fragment as Fragment21, jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
17090
17586
|
var Entitlement = ({
|
|
17091
17587
|
entitlement,
|
|
17092
17588
|
sharedProps,
|
|
@@ -17123,17 +17619,17 @@ var Entitlement = ({
|
|
|
17123
17619
|
),
|
|
17124
17620
|
entitlement.feature?.name && /* @__PURE__ */ jsxs36(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
|
|
17125
17621
|
/* @__PURE__ */ jsxs36(Flex, { $flexDirection: "column", $justifyContent: "center", $flexGrow: 1, children: [
|
|
17126
|
-
/* @__PURE__ */ jsx47(Text, { children: typeof entitlementPrice === "number" && (entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */ || entitlement.priceBehavior === "pay_as_you_go" /* PayAsYouGo */) ? /* @__PURE__ */ jsxs36(
|
|
17622
|
+
/* @__PURE__ */ jsx47(Text, { children: typeof entitlementPrice === "number" && (entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */ || entitlement.priceBehavior === "pay_as_you_go" /* PayAsYouGo */) ? /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17127
17623
|
formatCurrency(entitlementPrice, entitlementCurrency),
|
|
17128
17624
|
" ",
|
|
17129
17625
|
t2("per"),
|
|
17130
17626
|
" ",
|
|
17131
|
-
entitlementPackageSize > 1 && /* @__PURE__ */ jsxs36(
|
|
17627
|
+
entitlementPackageSize > 1 && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17132
17628
|
formatNumber(entitlementPackageSize),
|
|
17133
17629
|
" "
|
|
17134
17630
|
] }),
|
|
17135
17631
|
getFeatureName(entitlement.feature, entitlementPackageSize),
|
|
17136
|
-
entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */ && /* @__PURE__ */ jsxs36(
|
|
17632
|
+
entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */ && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17137
17633
|
" ",
|
|
17138
17634
|
t2("per"),
|
|
17139
17635
|
" ",
|
|
@@ -17145,7 +17641,7 @@ var Entitlement = ({
|
|
|
17145
17641
|
entitlement,
|
|
17146
17642
|
period: selectedPeriod
|
|
17147
17643
|
}
|
|
17148
|
-
) : showCredits && entitlement.priceBehavior === "credit_burndown" /* Credit */ && entitlement.valueCredit && entitlement.consumptionRate ? /* @__PURE__ */ jsxs36(
|
|
17644
|
+
) : showCredits && entitlement.priceBehavior === "credit_burndown" /* Credit */ && entitlement.valueCredit && entitlement.consumptionRate ? /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17149
17645
|
formatNumber(entitlement.consumptionRate),
|
|
17150
17646
|
" ",
|
|
17151
17647
|
getFeatureName(
|
|
@@ -17156,7 +17652,7 @@ var Entitlement = ({
|
|
|
17156
17652
|
t2("per"),
|
|
17157
17653
|
" ",
|
|
17158
17654
|
getFeatureName(entitlement.feature, 1)
|
|
17159
|
-
] }) : entitlement.priceBehavior === "credit_burndown" /* Credit */ && creditBasedEntitlementLimit ? /* @__PURE__ */ jsx47(
|
|
17655
|
+
] }) : entitlement.priceBehavior === "credit_burndown" /* Credit */ && creditBasedEntitlementLimit ? /* @__PURE__ */ jsx47(Fragment21, { children: creditBasedEntitlementLimit?.period ? t2("Up to X units per period", {
|
|
17160
17656
|
amount: formatNumber(creditBasedEntitlementLimit.limit),
|
|
17161
17657
|
units: getFeatureName(
|
|
17162
17658
|
entitlement.feature,
|
|
@@ -17169,17 +17665,17 @@ var Entitlement = ({
|
|
|
17169
17665
|
entitlement.feature,
|
|
17170
17666
|
creditBasedEntitlementLimit.limit
|
|
17171
17667
|
)
|
|
17172
|
-
}) }) : entitlement.valueType === "numeric" /* Numeric */ || entitlement.valueType === "unlimited" /* Unlimited */ || entitlement.valueType === "trait" /* Trait */ ? /* @__PURE__ */ jsxs36(
|
|
17668
|
+
}) }) : entitlement.valueType === "numeric" /* Numeric */ || entitlement.valueType === "unlimited" /* Unlimited */ || entitlement.valueType === "trait" /* Trait */ ? /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17173
17669
|
entitlement.valueType === "unlimited" /* Unlimited */ && !entitlement.priceBehavior ? t2("Unlimited", {
|
|
17174
17670
|
item: getFeatureName(entitlement.feature)
|
|
17175
|
-
}) : /* @__PURE__ */ jsxs36(
|
|
17176
|
-
typeof limit === "number" && /* @__PURE__ */ jsxs36(
|
|
17671
|
+
}) : /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17672
|
+
typeof limit === "number" && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17177
17673
|
formatNumber(limit),
|
|
17178
17674
|
" "
|
|
17179
17675
|
] }),
|
|
17180
17676
|
getFeatureName(entitlement.feature, limit)
|
|
17181
17677
|
] }),
|
|
17182
|
-
metricPeriodName && /* @__PURE__ */ jsxs36(
|
|
17678
|
+
metricPeriodName && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17183
17679
|
" ",
|
|
17184
17680
|
t2("per"),
|
|
17185
17681
|
" ",
|
|
@@ -17197,12 +17693,12 @@ var Entitlement = ({
|
|
|
17197
17693
|
" ",
|
|
17198
17694
|
formatCurrency(entitlementPrice, entitlementCurrency),
|
|
17199
17695
|
"/",
|
|
17200
|
-
entitlementPackageSize > 1 && /* @__PURE__ */ jsxs36(
|
|
17696
|
+
entitlementPackageSize > 1 && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17201
17697
|
formatNumber(entitlementPackageSize),
|
|
17202
17698
|
" "
|
|
17203
17699
|
] }),
|
|
17204
17700
|
getFeatureName(entitlement.feature, entitlementPackageSize),
|
|
17205
|
-
entitlement.feature.featureType === "trait" /* Trait */ && /* @__PURE__ */ jsxs36(
|
|
17701
|
+
entitlement.feature.featureType === "trait" /* Trait */ && /* @__PURE__ */ jsxs36(Fragment21, { children: [
|
|
17206
17702
|
"/",
|
|
17207
17703
|
shortenPeriod(selectedPeriod)
|
|
17208
17704
|
] })
|
|
@@ -17249,7 +17745,7 @@ var Entitlement = ({
|
|
|
17249
17745
|
};
|
|
17250
17746
|
|
|
17251
17747
|
// src/components/elements/pricing-table/Plan.tsx
|
|
17252
|
-
import { Fragment as
|
|
17748
|
+
import { Fragment as Fragment22, jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
17253
17749
|
var Plan2 = ({
|
|
17254
17750
|
plan,
|
|
17255
17751
|
index,
|
|
@@ -17382,7 +17878,7 @@ var Plan2 = ({
|
|
|
17382
17878
|
credit.quantity,
|
|
17383
17879
|
" ",
|
|
17384
17880
|
getFeatureName(credit, credit.quantity),
|
|
17385
|
-
credit.period && /* @__PURE__ */ jsxs37(
|
|
17881
|
+
credit.period && /* @__PURE__ */ jsxs37(Fragment22, { children: [
|
|
17386
17882
|
" ",
|
|
17387
17883
|
t2("per"),
|
|
17388
17884
|
" ",
|
|
@@ -17549,7 +18045,7 @@ var Plan2 = ({
|
|
|
17549
18045
|
};
|
|
17550
18046
|
|
|
17551
18047
|
// src/components/elements/pricing-table/PricingTable.tsx
|
|
17552
|
-
import { Fragment as
|
|
18048
|
+
import { Fragment as Fragment24, jsx as jsx49, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
17553
18049
|
var resolveDesignProps8 = (props) => {
|
|
17554
18050
|
return {
|
|
17555
18051
|
showPeriodToggle: props.showPeriodToggle ?? true,
|
|
@@ -17665,7 +18161,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
|
|
|
17665
18161
|
rest.callToActionUrl,
|
|
17666
18162
|
rest.callToActionTarget
|
|
17667
18163
|
);
|
|
17668
|
-
const Wrapper = typeof data?.component === "undefined" ? Container :
|
|
18164
|
+
const Wrapper = typeof data?.component === "undefined" ? Container : Fragment23;
|
|
17669
18165
|
return /* @__PURE__ */ jsx49(Wrapper, { children: /* @__PURE__ */ jsxs38(
|
|
17670
18166
|
FussyChild,
|
|
17671
18167
|
{
|
|
@@ -17741,7 +18237,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
|
|
|
17741
18237
|
}
|
|
17742
18238
|
)
|
|
17743
18239
|
] }),
|
|
17744
|
-
/* @__PURE__ */ jsx49(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs38(
|
|
18240
|
+
/* @__PURE__ */ jsx49(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs38(Fragment24, { children: [
|
|
17745
18241
|
props.header.isVisible && /* @__PURE__ */ jsx49(
|
|
17746
18242
|
Flex,
|
|
17747
18243
|
{
|
|
@@ -22351,7 +22847,7 @@ var Loading = () => {
|
|
|
22351
22847
|
$alignItems: "center",
|
|
22352
22848
|
$justifyContent: "center",
|
|
22353
22849
|
$padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
|
|
22354
|
-
children: /* @__PURE__ */ jsx53(Loader, { $color:
|
|
22850
|
+
children: /* @__PURE__ */ jsx53(Loader, { $color: settings.theme.primary, $size: "2xl" })
|
|
22355
22851
|
}
|
|
22356
22852
|
);
|
|
22357
22853
|
};
|