@schematichq/schematic-components 2.10.0 → 2.10.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/dist/schematic-components.cjs.js +345 -256
- package/dist/schematic-components.d.ts +402 -318
- package/dist/schematic-components.esm.js +345 -256
- package/package.json +7 -7
|
@@ -2179,6 +2179,7 @@ var Logger = class _Logger {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
forward(args, lvl, prefix2, debugOnly) {
|
|
2181
2181
|
if (debugOnly && !this.debug) return null;
|
|
2182
|
+
args = args.map((a3) => isString(a3) ? a3.replace(/[\r\n\x00-\x1F\x7F]/g, " ") : a3);
|
|
2182
2183
|
if (isString(args[0])) args[0] = `${prefix2}${this.prefix} ${args[0]}`;
|
|
2183
2184
|
return this.logger[lvl](args);
|
|
2184
2185
|
}
|
|
@@ -3077,8 +3078,8 @@ var Interpolator = class {
|
|
|
3077
3078
|
this.prefix = prefix2 ? regexEscape(prefix2) : prefixEscaped || "{{";
|
|
3078
3079
|
this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || "}}";
|
|
3079
3080
|
this.formatSeparator = formatSeparator || ",";
|
|
3080
|
-
this.unescapePrefix = unescapeSuffix ? "" : unescapePrefix
|
|
3081
|
-
this.unescapeSuffix = this.unescapePrefix ? "" : unescapeSuffix
|
|
3081
|
+
this.unescapePrefix = unescapeSuffix ? "" : unescapePrefix ? regexEscape(unescapePrefix) : "-";
|
|
3082
|
+
this.unescapeSuffix = this.unescapePrefix ? "" : unescapeSuffix ? regexEscape(unescapeSuffix) : "";
|
|
3082
3083
|
this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape("$t(");
|
|
3083
3084
|
this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(")");
|
|
3084
3085
|
this.nestingOptionsSeparator = nestingOptionsSeparator || ",";
|
|
@@ -3125,6 +3126,9 @@ var Interpolator = class {
|
|
|
3125
3126
|
});
|
|
3126
3127
|
};
|
|
3127
3128
|
this.resetRegExp();
|
|
3129
|
+
if (!this.escapeValue && typeof str === "string" && /\$t\([^)]*\{[^}]*\{\{/.test(str)) {
|
|
3130
|
+
this.logger.warn("nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");
|
|
3131
|
+
}
|
|
3128
3132
|
const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
|
3129
3133
|
const skipOnVariables = options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
3130
3134
|
const todos = [{
|
|
@@ -7489,23 +7493,18 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
7489
7493
|
}
|
|
7490
7494
|
|
|
7491
7495
|
// node_modules/uuid/dist/rng.js
|
|
7492
|
-
var getRandomValues;
|
|
7493
7496
|
var rnds8 = new Uint8Array(16);
|
|
7494
7497
|
function rng() {
|
|
7495
|
-
|
|
7496
|
-
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
7497
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
7498
|
-
}
|
|
7499
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
7500
|
-
}
|
|
7501
|
-
return getRandomValues(rnds8);
|
|
7498
|
+
return crypto.getRandomValues(rnds8);
|
|
7502
7499
|
}
|
|
7503
7500
|
|
|
7504
|
-
// node_modules/uuid/dist/native.js
|
|
7505
|
-
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
7506
|
-
var native_default = { randomUUID };
|
|
7507
|
-
|
|
7508
7501
|
// node_modules/uuid/dist/v4.js
|
|
7502
|
+
function v4(options, buf, offset) {
|
|
7503
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
7504
|
+
return crypto.randomUUID();
|
|
7505
|
+
}
|
|
7506
|
+
return _v4(options, buf, offset);
|
|
7507
|
+
}
|
|
7509
7508
|
function _v4(options, buf, offset) {
|
|
7510
7509
|
options = options || {};
|
|
7511
7510
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
@@ -7526,12 +7525,6 @@ function _v4(options, buf, offset) {
|
|
|
7526
7525
|
}
|
|
7527
7526
|
return unsafeStringify(rnds);
|
|
7528
7527
|
}
|
|
7529
|
-
function v4(options, buf, offset) {
|
|
7530
|
-
if (native_default.randomUUID && !buf && !options) {
|
|
7531
|
-
return native_default.randomUUID();
|
|
7532
|
-
}
|
|
7533
|
-
return _v4(options, buf, offset);
|
|
7534
|
-
}
|
|
7535
7528
|
var v4_default = v4;
|
|
7536
7529
|
|
|
7537
7530
|
// src/api/checkoutexternal/runtime.ts
|
|
@@ -7888,6 +7881,7 @@ function BillingProductPriceResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
7888
7881
|
interval: BillingProductPriceIntervalFromJSON(json["interval"]),
|
|
7889
7882
|
isActive: json["is_active"],
|
|
7890
7883
|
meterId: json["meter_id"] == null ? void 0 : json["meter_id"],
|
|
7884
|
+
nickname: json["nickname"] == null ? void 0 : json["nickname"],
|
|
7891
7885
|
packageSize: json["package_size"],
|
|
7892
7886
|
price: json["price"],
|
|
7893
7887
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
@@ -7934,6 +7928,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7934
7928
|
meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
|
|
7935
7929
|
meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
|
|
7936
7930
|
meterId: json["meter_id"] == null ? void 0 : json["meter_id"],
|
|
7931
|
+
nickname: json["nickname"] == null ? void 0 : json["nickname"],
|
|
7937
7932
|
packageSize: json["package_size"],
|
|
7938
7933
|
price: json["price"],
|
|
7939
7934
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
@@ -8052,6 +8047,7 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8052
8047
|
externalPriceId: json["external_price_id"],
|
|
8053
8048
|
id: json["id"],
|
|
8054
8049
|
interval: BillingProductPriceIntervalFromJSON(json["interval"]),
|
|
8050
|
+
nickname: json["nickname"] == null ? void 0 : json["nickname"],
|
|
8055
8051
|
price: json["price"],
|
|
8056
8052
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
8057
8053
|
providerType: BillingProviderTypeFromJSON(json["provider_type"]),
|
|
@@ -8681,6 +8677,22 @@ function CompanyCustomerBalanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8681
8677
|
};
|
|
8682
8678
|
}
|
|
8683
8679
|
|
|
8680
|
+
// src/api/checkoutexternal/models/MetricPeriodMonthReset.ts
|
|
8681
|
+
function MetricPeriodMonthResetFromJSON(json) {
|
|
8682
|
+
return MetricPeriodMonthResetFromJSONTyped(json, false);
|
|
8683
|
+
}
|
|
8684
|
+
function MetricPeriodMonthResetFromJSONTyped(json, ignoreDiscriminator) {
|
|
8685
|
+
return json;
|
|
8686
|
+
}
|
|
8687
|
+
|
|
8688
|
+
// src/api/checkoutexternal/models/MetricPeriod.ts
|
|
8689
|
+
function MetricPeriodFromJSON(json) {
|
|
8690
|
+
return MetricPeriodFromJSONTyped(json, false);
|
|
8691
|
+
}
|
|
8692
|
+
function MetricPeriodFromJSONTyped(json, ignoreDiscriminator) {
|
|
8693
|
+
return json;
|
|
8694
|
+
}
|
|
8695
|
+
|
|
8684
8696
|
// src/api/checkoutexternal/models/CompanyEventPeriodMetricsResponseData.ts
|
|
8685
8697
|
function CompanyEventPeriodMetricsResponseDataFromJSON(json) {
|
|
8686
8698
|
return CompanyEventPeriodMetricsResponseDataFromJSONTyped(json, false);
|
|
@@ -8697,8 +8709,8 @@ function CompanyEventPeriodMetricsResponseDataFromJSONTyped(json, ignoreDiscrimi
|
|
|
8697
8709
|
createdAt: new Date(json["created_at"]),
|
|
8698
8710
|
environmentId: json["environment_id"],
|
|
8699
8711
|
eventSubtype: json["event_subtype"],
|
|
8700
|
-
monthReset: json["month_reset"],
|
|
8701
|
-
period: json["period"],
|
|
8712
|
+
monthReset: MetricPeriodMonthResetFromJSON(json["month_reset"]),
|
|
8713
|
+
period: MetricPeriodFromJSON(json["period"]),
|
|
8702
8714
|
validUntil: json["valid_until"] == null ? void 0 : new Date(json["valid_until"]),
|
|
8703
8715
|
value: json["value"]
|
|
8704
8716
|
};
|
|
@@ -8822,9 +8834,9 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8822
8834
|
eventName: json["event_name"] == null ? void 0 : json["event_name"],
|
|
8823
8835
|
featureId: json["feature_id"],
|
|
8824
8836
|
featureKey: json["feature_key"],
|
|
8825
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
8837
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
8826
8838
|
metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
|
|
8827
|
-
monthReset: json["month_reset"] == null ? void 0 : json["month_reset"],
|
|
8839
|
+
monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
|
|
8828
8840
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
8829
8841
|
usage: json["usage"] == null ? void 0 : json["usage"],
|
|
8830
8842
|
valueType: EntitlementValueTypeFromJSON(json["value_type"])
|
|
@@ -8962,6 +8974,22 @@ function TraitDefinitionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8962
8974
|
};
|
|
8963
8975
|
}
|
|
8964
8976
|
|
|
8977
|
+
// src/api/checkoutexternal/models/ComparableOperator.ts
|
|
8978
|
+
function ComparableOperatorFromJSON(json) {
|
|
8979
|
+
return ComparableOperatorFromJSONTyped(json, false);
|
|
8980
|
+
}
|
|
8981
|
+
function ComparableOperatorFromJSONTyped(json, ignoreDiscriminator) {
|
|
8982
|
+
return json;
|
|
8983
|
+
}
|
|
8984
|
+
|
|
8985
|
+
// src/api/checkoutexternal/models/ConditionType.ts
|
|
8986
|
+
function ConditionTypeFromJSON(json) {
|
|
8987
|
+
return ConditionTypeFromJSONTyped(json, false);
|
|
8988
|
+
}
|
|
8989
|
+
function ConditionTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
8990
|
+
return json;
|
|
8991
|
+
}
|
|
8992
|
+
|
|
8965
8993
|
// src/api/checkoutexternal/models/Condition.ts
|
|
8966
8994
|
function ConditionFromJSON(json) {
|
|
8967
8995
|
return ConditionFromJSONTyped(json, false);
|
|
@@ -8973,22 +9001,30 @@ function ConditionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8973
9001
|
return {
|
|
8974
9002
|
accountId: json["account_id"],
|
|
8975
9003
|
comparisonTraitDefinition: json["comparison_trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["comparison_trait_definition"]),
|
|
8976
|
-
conditionType: json["condition_type"],
|
|
9004
|
+
conditionType: ConditionTypeFromJSON(json["condition_type"]),
|
|
8977
9005
|
consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
|
|
8978
9006
|
creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
|
|
8979
9007
|
environmentId: json["environment_id"],
|
|
8980
9008
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
8981
9009
|
id: json["id"],
|
|
8982
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
8983
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
9010
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
9011
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
8984
9012
|
metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
|
|
8985
|
-
operator: json["operator"],
|
|
9013
|
+
operator: ComparableOperatorFromJSON(json["operator"]),
|
|
8986
9014
|
resourceIds: json["resource_ids"],
|
|
8987
9015
|
traitDefinition: json["trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["trait_definition"]),
|
|
8988
9016
|
traitValue: json["trait_value"]
|
|
8989
9017
|
};
|
|
8990
9018
|
}
|
|
8991
9019
|
|
|
9020
|
+
// src/api/checkoutexternal/models/RuleType.ts
|
|
9021
|
+
function RuleTypeFromJSON(json) {
|
|
9022
|
+
return RuleTypeFromJSONTyped(json, false);
|
|
9023
|
+
}
|
|
9024
|
+
function RuleTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
9025
|
+
return json;
|
|
9026
|
+
}
|
|
9027
|
+
|
|
8992
9028
|
// src/api/checkoutexternal/models/ConditionGroup.ts
|
|
8993
9029
|
function ConditionGroupFromJSON(json) {
|
|
8994
9030
|
return ConditionGroupFromJSONTyped(json, false);
|
|
@@ -9021,7 +9057,7 @@ function RuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9021
9057
|
id: json["id"],
|
|
9022
9058
|
name: json["name"],
|
|
9023
9059
|
priority: json["priority"],
|
|
9024
|
-
ruleType: json["rule_type"],
|
|
9060
|
+
ruleType: RuleTypeFromJSON(json["rule_type"]),
|
|
9025
9061
|
value: json["value"]
|
|
9026
9062
|
};
|
|
9027
9063
|
}
|
|
@@ -9172,7 +9208,7 @@ function FeatureResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9172
9208
|
icon: json["icon"],
|
|
9173
9209
|
id: json["id"],
|
|
9174
9210
|
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
|
|
9175
|
-
|
|
9211
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
9176
9212
|
name: json["name"],
|
|
9177
9213
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
9178
9214
|
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
@@ -9199,8 +9235,8 @@ function CompanyOverrideResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9199
9235
|
feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
|
|
9200
9236
|
featureId: json["feature_id"],
|
|
9201
9237
|
id: json["id"],
|
|
9202
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
9203
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
9238
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
9239
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
9204
9240
|
notes: json["notes"].map(
|
|
9205
9241
|
CompanyOverrideNoteResponseDataFromJSON
|
|
9206
9242
|
),
|
|
@@ -9227,6 +9263,117 @@ function CompanyPlanInvalidReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9227
9263
|
return json;
|
|
9228
9264
|
}
|
|
9229
9265
|
|
|
9266
|
+
// src/api/checkoutexternal/models/EntitlementCurrencyPricesResponseData.ts
|
|
9267
|
+
function EntitlementCurrencyPricesResponseDataFromJSON(json) {
|
|
9268
|
+
return EntitlementCurrencyPricesResponseDataFromJSONTyped(json, false);
|
|
9269
|
+
}
|
|
9270
|
+
function EntitlementCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9271
|
+
if (json == null) {
|
|
9272
|
+
return json;
|
|
9273
|
+
}
|
|
9274
|
+
return {
|
|
9275
|
+
currency: json["currency"],
|
|
9276
|
+
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_price"]),
|
|
9277
|
+
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_price"])
|
|
9278
|
+
};
|
|
9279
|
+
}
|
|
9280
|
+
|
|
9281
|
+
// src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
|
|
9282
|
+
var EntitlementPriceBehavior = {
|
|
9283
|
+
CreditBurndown: "credit_burndown",
|
|
9284
|
+
Overage: "overage",
|
|
9285
|
+
PayAsYouGo: "pay_as_you_go",
|
|
9286
|
+
PayInAdvance: "pay_in_advance",
|
|
9287
|
+
Tier: "tier"
|
|
9288
|
+
};
|
|
9289
|
+
function EntitlementPriceBehaviorFromJSON(json) {
|
|
9290
|
+
return EntitlementPriceBehaviorFromJSONTyped(json, false);
|
|
9291
|
+
}
|
|
9292
|
+
function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
|
|
9293
|
+
return json;
|
|
9294
|
+
}
|
|
9295
|
+
|
|
9296
|
+
// src/api/checkoutexternal/models/PlanIcon.ts
|
|
9297
|
+
function PlanIconFromJSON(json) {
|
|
9298
|
+
return PlanIconFromJSONTyped(json, false);
|
|
9299
|
+
}
|
|
9300
|
+
function PlanIconFromJSONTyped(json, ignoreDiscriminator) {
|
|
9301
|
+
return json;
|
|
9302
|
+
}
|
|
9303
|
+
|
|
9304
|
+
// src/api/checkoutexternal/models/PlanType.ts
|
|
9305
|
+
function PlanTypeFromJSON(json) {
|
|
9306
|
+
return PlanTypeFromJSONTyped(json, false);
|
|
9307
|
+
}
|
|
9308
|
+
function PlanTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
9309
|
+
return json;
|
|
9310
|
+
}
|
|
9311
|
+
|
|
9312
|
+
// src/api/checkoutexternal/models/PlanResponseData.ts
|
|
9313
|
+
function PlanResponseDataFromJSON(json) {
|
|
9314
|
+
return PlanResponseDataFromJSONTyped(json, false);
|
|
9315
|
+
}
|
|
9316
|
+
function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9317
|
+
if (json == null) {
|
|
9318
|
+
return json;
|
|
9319
|
+
}
|
|
9320
|
+
return {
|
|
9321
|
+
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
9322
|
+
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
9323
|
+
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
9324
|
+
createdAt: new Date(json["created_at"]),
|
|
9325
|
+
description: json["description"],
|
|
9326
|
+
icon: PlanIconFromJSON(json["icon"]),
|
|
9327
|
+
id: json["id"],
|
|
9328
|
+
name: json["name"],
|
|
9329
|
+
planType: PlanTypeFromJSON(json["plan_type"]),
|
|
9330
|
+
updatedAt: new Date(json["updated_at"])
|
|
9331
|
+
};
|
|
9332
|
+
}
|
|
9333
|
+
|
|
9334
|
+
// src/api/checkoutexternal/models/PlanEntitlementResponseData.ts
|
|
9335
|
+
function PlanEntitlementResponseDataFromJSON(json) {
|
|
9336
|
+
return PlanEntitlementResponseDataFromJSONTyped(json, false);
|
|
9337
|
+
}
|
|
9338
|
+
function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9339
|
+
if (json == null) {
|
|
9340
|
+
return json;
|
|
9341
|
+
}
|
|
9342
|
+
return {
|
|
9343
|
+
billingLinkedResource: json["billing_linked_resource"] == null ? void 0 : BillingLinkedResourceResponseDataFromJSON(
|
|
9344
|
+
json["billing_linked_resource"]
|
|
9345
|
+
),
|
|
9346
|
+
billingThreshold: json["billing_threshold"] == null ? void 0 : json["billing_threshold"],
|
|
9347
|
+
consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
|
|
9348
|
+
createdAt: new Date(json["created_at"]),
|
|
9349
|
+
currencyPrices: json["currency_prices"].map(
|
|
9350
|
+
EntitlementCurrencyPricesResponseDataFromJSON
|
|
9351
|
+
),
|
|
9352
|
+
environmentId: json["environment_id"],
|
|
9353
|
+
feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
|
|
9354
|
+
featureId: json["feature_id"],
|
|
9355
|
+
id: json["id"],
|
|
9356
|
+
meteredMonthlyPrice: json["metered_monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["metered_monthly_price"]),
|
|
9357
|
+
meteredYearlyPrice: json["metered_yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["metered_yearly_price"]),
|
|
9358
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
9359
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
9360
|
+
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
|
|
9361
|
+
planId: json["plan_id"],
|
|
9362
|
+
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
9363
|
+
ruleId: json["rule_id"],
|
|
9364
|
+
ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
|
|
9365
|
+
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
9366
|
+
updatedAt: new Date(json["updated_at"]),
|
|
9367
|
+
usageBasedProduct: json["usage_based_product"] == null ? void 0 : BillingProductResponseDataFromJSON(json["usage_based_product"]),
|
|
9368
|
+
valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
|
|
9369
|
+
valueCredit: json["value_credit"] == null ? void 0 : BillingCreditResponseDataFromJSON(json["value_credit"]),
|
|
9370
|
+
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
9371
|
+
valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
|
|
9372
|
+
valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
|
|
9373
|
+
valueType: EntitlementValueTypeFromJSON(json["value_type"])
|
|
9374
|
+
};
|
|
9375
|
+
}
|
|
9376
|
+
|
|
9230
9377
|
// src/api/checkoutexternal/models/PreviewObject.ts
|
|
9231
9378
|
function PreviewObjectFromJSON(json) {
|
|
9232
9379
|
return PreviewObjectFromJSONTyped(json, false);
|
|
@@ -9273,16 +9420,16 @@ function RuleConditionDetailResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
9273
9420
|
comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["comparison_trait"]),
|
|
9274
9421
|
comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
|
|
9275
9422
|
conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
|
|
9276
|
-
conditionType: json["condition_type"],
|
|
9423
|
+
conditionType: ConditionTypeFromJSON(json["condition_type"]),
|
|
9277
9424
|
createdAt: new Date(json["created_at"]),
|
|
9278
9425
|
environmentId: json["environment_id"],
|
|
9279
9426
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
9280
9427
|
flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
|
|
9281
9428
|
id: json["id"],
|
|
9282
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
9283
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
9429
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
9430
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
9284
9431
|
metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
|
|
9285
|
-
operator: json["operator"],
|
|
9432
|
+
operator: ComparableOperatorFromJSON(json["operator"]),
|
|
9286
9433
|
resourceIds: json["resource_ids"],
|
|
9287
9434
|
resources: json["resources"].map(
|
|
9288
9435
|
PreviewObjectResponseDataFromJSON
|
|
@@ -9338,7 +9485,7 @@ function RuleDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9338
9485
|
id: json["id"],
|
|
9339
9486
|
name: json["name"],
|
|
9340
9487
|
priority: json["priority"],
|
|
9341
|
-
ruleType: json["rule_type"],
|
|
9488
|
+
ruleType: RuleTypeFromJSON(json["rule_type"]),
|
|
9342
9489
|
updatedAt: new Date(json["updated_at"]),
|
|
9343
9490
|
value: json["value"]
|
|
9344
9491
|
};
|
|
@@ -9352,11 +9499,11 @@ function FlagTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9352
9499
|
return json;
|
|
9353
9500
|
}
|
|
9354
9501
|
|
|
9355
|
-
// src/api/checkoutexternal/models/
|
|
9356
|
-
function
|
|
9357
|
-
return
|
|
9502
|
+
// src/api/checkoutexternal/models/FlagInPlanResponseData.ts
|
|
9503
|
+
function FlagInPlanResponseDataFromJSON(json) {
|
|
9504
|
+
return FlagInPlanResponseDataFromJSONTyped(json, false);
|
|
9358
9505
|
}
|
|
9359
|
-
function
|
|
9506
|
+
function FlagInPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9360
9507
|
if (json == null) {
|
|
9361
9508
|
return json;
|
|
9362
9509
|
}
|
|
@@ -9370,18 +9517,18 @@ function FlagDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9370
9517
|
id: json["id"],
|
|
9371
9518
|
key: json["key"],
|
|
9372
9519
|
lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
|
|
9373
|
-
|
|
9520
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
9374
9521
|
name: json["name"],
|
|
9375
9522
|
rules: json["rules"].map(RuleDetailResponseDataFromJSON),
|
|
9376
9523
|
updatedAt: new Date(json["updated_at"])
|
|
9377
9524
|
};
|
|
9378
9525
|
}
|
|
9379
9526
|
|
|
9380
|
-
// src/api/checkoutexternal/models/
|
|
9381
|
-
function
|
|
9382
|
-
return
|
|
9527
|
+
// src/api/checkoutexternal/models/FeatureInPlanResponseData.ts
|
|
9528
|
+
function FeatureInPlanResponseDataFromJSON(json) {
|
|
9529
|
+
return FeatureInPlanResponseDataFromJSONTyped(json, false);
|
|
9383
9530
|
}
|
|
9384
|
-
function
|
|
9531
|
+
function FeatureInPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9385
9532
|
if (json == null) {
|
|
9386
9533
|
return json;
|
|
9387
9534
|
}
|
|
@@ -9394,11 +9541,11 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9394
9541
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
9395
9542
|
eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON(json["event_summary"]),
|
|
9396
9543
|
featureType: FeatureTypeFromJSON(json["feature_type"]),
|
|
9397
|
-
flags: json["flags"].map(
|
|
9544
|
+
flags: json["flags"].map(FlagInPlanResponseDataFromJSON),
|
|
9398
9545
|
icon: json["icon"],
|
|
9399
9546
|
id: json["id"],
|
|
9400
9547
|
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON(json["lifecycle_phase"]),
|
|
9401
|
-
|
|
9548
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
9402
9549
|
name: json["name"],
|
|
9403
9550
|
plans: json["plans"].map(PreviewObjectFromJSON),
|
|
9404
9551
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
@@ -9409,117 +9556,6 @@ function FeatureDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9409
9556
|
};
|
|
9410
9557
|
}
|
|
9411
9558
|
|
|
9412
|
-
// src/api/checkoutexternal/models/EntitlementCurrencyPricesResponseData.ts
|
|
9413
|
-
function EntitlementCurrencyPricesResponseDataFromJSON(json) {
|
|
9414
|
-
return EntitlementCurrencyPricesResponseDataFromJSONTyped(json, false);
|
|
9415
|
-
}
|
|
9416
|
-
function EntitlementCurrencyPricesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9417
|
-
if (json == null) {
|
|
9418
|
-
return json;
|
|
9419
|
-
}
|
|
9420
|
-
return {
|
|
9421
|
-
currency: json["currency"],
|
|
9422
|
-
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_price"]),
|
|
9423
|
-
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["yearly_price"])
|
|
9424
|
-
};
|
|
9425
|
-
}
|
|
9426
|
-
|
|
9427
|
-
// src/api/checkoutexternal/models/EntitlementPriceBehavior.ts
|
|
9428
|
-
var EntitlementPriceBehavior = {
|
|
9429
|
-
CreditBurndown: "credit_burndown",
|
|
9430
|
-
Overage: "overage",
|
|
9431
|
-
PayAsYouGo: "pay_as_you_go",
|
|
9432
|
-
PayInAdvance: "pay_in_advance",
|
|
9433
|
-
Tier: "tier"
|
|
9434
|
-
};
|
|
9435
|
-
function EntitlementPriceBehaviorFromJSON(json) {
|
|
9436
|
-
return EntitlementPriceBehaviorFromJSONTyped(json, false);
|
|
9437
|
-
}
|
|
9438
|
-
function EntitlementPriceBehaviorFromJSONTyped(json, ignoreDiscriminator) {
|
|
9439
|
-
return json;
|
|
9440
|
-
}
|
|
9441
|
-
|
|
9442
|
-
// src/api/checkoutexternal/models/PlanIcon.ts
|
|
9443
|
-
function PlanIconFromJSON(json) {
|
|
9444
|
-
return PlanIconFromJSONTyped(json, false);
|
|
9445
|
-
}
|
|
9446
|
-
function PlanIconFromJSONTyped(json, ignoreDiscriminator) {
|
|
9447
|
-
return json;
|
|
9448
|
-
}
|
|
9449
|
-
|
|
9450
|
-
// src/api/checkoutexternal/models/PlanType.ts
|
|
9451
|
-
function PlanTypeFromJSON(json) {
|
|
9452
|
-
return PlanTypeFromJSONTyped(json, false);
|
|
9453
|
-
}
|
|
9454
|
-
function PlanTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
9455
|
-
return json;
|
|
9456
|
-
}
|
|
9457
|
-
|
|
9458
|
-
// src/api/checkoutexternal/models/PlanResponseData.ts
|
|
9459
|
-
function PlanResponseDataFromJSON(json) {
|
|
9460
|
-
return PlanResponseDataFromJSONTyped(json, false);
|
|
9461
|
-
}
|
|
9462
|
-
function PlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9463
|
-
if (json == null) {
|
|
9464
|
-
return json;
|
|
9465
|
-
}
|
|
9466
|
-
return {
|
|
9467
|
-
audienceType: json["audience_type"] == null ? void 0 : json["audience_type"],
|
|
9468
|
-
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
9469
|
-
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
9470
|
-
createdAt: new Date(json["created_at"]),
|
|
9471
|
-
description: json["description"],
|
|
9472
|
-
icon: PlanIconFromJSON(json["icon"]),
|
|
9473
|
-
id: json["id"],
|
|
9474
|
-
name: json["name"],
|
|
9475
|
-
planType: PlanTypeFromJSON(json["plan_type"]),
|
|
9476
|
-
updatedAt: new Date(json["updated_at"])
|
|
9477
|
-
};
|
|
9478
|
-
}
|
|
9479
|
-
|
|
9480
|
-
// src/api/checkoutexternal/models/PlanEntitlementResponseData.ts
|
|
9481
|
-
function PlanEntitlementResponseDataFromJSON(json) {
|
|
9482
|
-
return PlanEntitlementResponseDataFromJSONTyped(json, false);
|
|
9483
|
-
}
|
|
9484
|
-
function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
9485
|
-
if (json == null) {
|
|
9486
|
-
return json;
|
|
9487
|
-
}
|
|
9488
|
-
return {
|
|
9489
|
-
billingLinkedResource: json["billing_linked_resource"] == null ? void 0 : BillingLinkedResourceResponseDataFromJSON(
|
|
9490
|
-
json["billing_linked_resource"]
|
|
9491
|
-
),
|
|
9492
|
-
billingThreshold: json["billing_threshold"] == null ? void 0 : json["billing_threshold"],
|
|
9493
|
-
consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
|
|
9494
|
-
createdAt: new Date(json["created_at"]),
|
|
9495
|
-
currencyPrices: json["currency_prices"].map(
|
|
9496
|
-
EntitlementCurrencyPricesResponseDataFromJSON
|
|
9497
|
-
),
|
|
9498
|
-
environmentId: json["environment_id"],
|
|
9499
|
-
feature: json["feature"] == null ? void 0 : FeatureResponseDataFromJSON(json["feature"]),
|
|
9500
|
-
featureId: json["feature_id"],
|
|
9501
|
-
id: json["id"],
|
|
9502
|
-
meteredMonthlyPrice: json["metered_monthly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["metered_monthly_price"]),
|
|
9503
|
-
meteredYearlyPrice: json["metered_yearly_price"] == null ? void 0 : BillingPriceViewFromJSON(json["metered_yearly_price"]),
|
|
9504
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
9505
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
9506
|
-
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
|
|
9507
|
-
planId: json["plan_id"],
|
|
9508
|
-
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
9509
|
-
ruleId: json["rule_id"],
|
|
9510
|
-
ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
|
|
9511
|
-
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
9512
|
-
updatedAt: new Date(json["updated_at"]),
|
|
9513
|
-
usageBasedProduct: json["usage_based_product"] == null ? void 0 : BillingProductResponseDataFromJSON(json["usage_based_product"]),
|
|
9514
|
-
valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
|
|
9515
|
-
valueCredit: json["value_credit"] == null ? void 0 : BillingCreditResponseDataFromJSON(json["value_credit"]),
|
|
9516
|
-
valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
|
|
9517
|
-
valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
|
|
9518
|
-
valueTraitId: json["value_trait_id"] == null ? void 0 : json["value_trait_id"],
|
|
9519
|
-
valueType: EntitlementValueTypeFromJSON(json["value_type"])
|
|
9520
|
-
};
|
|
9521
|
-
}
|
|
9522
|
-
|
|
9523
9559
|
// src/api/checkoutexternal/models/CustomPlanConfig.ts
|
|
9524
9560
|
function CustomPlanConfigFromJSON(json) {
|
|
9525
9561
|
return CustomPlanConfigFromJSONTyped(json, false);
|
|
@@ -9652,15 +9688,15 @@ function FeatureUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9652
9688
|
entitlementId: json["entitlement_id"],
|
|
9653
9689
|
entitlementSource: json["entitlement_source"] == null ? void 0 : json["entitlement_source"],
|
|
9654
9690
|
entitlementType: EntitlementTypeFromJSON(json["entitlement_type"]),
|
|
9655
|
-
feature: json["feature"] == null ? void 0 :
|
|
9691
|
+
feature: json["feature"] == null ? void 0 : FeatureInPlanResponseDataFromJSON(json["feature"]),
|
|
9656
9692
|
hasValidAllocation: json["has_valid_allocation"] == null ? void 0 : json["has_valid_allocation"],
|
|
9657
9693
|
isUnlimited: json["is_unlimited"] == null ? void 0 : json["is_unlimited"],
|
|
9658
9694
|
metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
|
|
9659
|
-
monthReset: json["month_reset"] == null ? void 0 : json["month_reset"],
|
|
9695
|
+
monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
|
|
9660
9696
|
monthlyUsageBasedPrice: json["monthly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_usage_based_price"]),
|
|
9661
9697
|
overuse: json["overuse"] == null ? void 0 : json["overuse"],
|
|
9662
9698
|
percentUsed: json["percent_used"] == null ? void 0 : json["percent_used"],
|
|
9663
|
-
period: json["period"] == null ? void 0 : json["period"],
|
|
9699
|
+
period: json["period"] == null ? void 0 : MetricPeriodFromJSON(json["period"]),
|
|
9664
9700
|
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON(json["plan"]),
|
|
9665
9701
|
planEntitlement: json["plan_entitlement"] == null ? void 0 : PlanEntitlementResponseDataFromJSON(json["plan_entitlement"]),
|
|
9666
9702
|
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
@@ -9691,7 +9727,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9691
9727
|
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
9692
9728
|
companyName: json["company_name"] == null ? void 0 : json["company_name"],
|
|
9693
9729
|
compatiblePlanIds: json["compatible_plan_ids"],
|
|
9694
|
-
controlledBy: json["controlled_by"],
|
|
9730
|
+
controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
|
|
9695
9731
|
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
9696
9732
|
createdAt: new Date(json["created_at"]),
|
|
9697
9733
|
currencyPrices: json["currency_prices"].map(
|
|
@@ -9706,7 +9742,7 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9706
9742
|
PlanEntitlementResponseDataFromJSON
|
|
9707
9743
|
),
|
|
9708
9744
|
features: json["features"].map(
|
|
9709
|
-
|
|
9745
|
+
FeatureInPlanResponseDataFromJSON
|
|
9710
9746
|
),
|
|
9711
9747
|
icon: PlanIconFromJSON(json["icon"]),
|
|
9712
9748
|
id: json["id"],
|
|
@@ -9758,6 +9794,7 @@ function CompanySubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
9758
9794
|
products: json["products"].map(
|
|
9759
9795
|
BillingProductForSubscriptionResponseDataFromJSON
|
|
9760
9796
|
),
|
|
9797
|
+
providerType: BillingProviderTypeFromJSON(json["provider_type"]),
|
|
9761
9798
|
status: json["status"],
|
|
9762
9799
|
subscriptionExternalId: json["subscription_external_id"],
|
|
9763
9800
|
totalPrice: json["total_price"],
|
|
@@ -9854,7 +9891,7 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9854
9891
|
companyCount: json["company_count"],
|
|
9855
9892
|
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
9856
9893
|
companyName: json["company_name"] == null ? void 0 : json["company_name"],
|
|
9857
|
-
controlledBy: json["controlled_by"],
|
|
9894
|
+
controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
|
|
9858
9895
|
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
9859
9896
|
createdAt: new Date(json["created_at"]),
|
|
9860
9897
|
currencyPrices: json["currency_prices"].map(
|
|
@@ -9863,7 +9900,7 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9863
9900
|
description: json["description"],
|
|
9864
9901
|
draftVersion: json["draft_version"] == null ? void 0 : PlanVersionResponseDataFromJSON(json["draft_version"]),
|
|
9865
9902
|
features: json["features"].map(
|
|
9866
|
-
|
|
9903
|
+
FeatureInPlanResponseDataFromJSON
|
|
9867
9904
|
),
|
|
9868
9905
|
icon: PlanIconFromJSON(json["icon"]),
|
|
9869
9906
|
id: json["id"],
|
|
@@ -9977,8 +10014,8 @@ function UsageBasedEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
9977
10014
|
consumptionRate: json["consumption_rate"] == null ? void 0 : json["consumption_rate"],
|
|
9978
10015
|
featureId: json["feature_id"],
|
|
9979
10016
|
meteredPrice: json["metered_price"] == null ? void 0 : BillingPriceViewFromJSON(json["metered_price"]),
|
|
9980
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
9981
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
10017
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
10018
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
9982
10019
|
monthlyUsageBasedPrice: json["monthly_usage_based_price"] == null ? void 0 : BillingPriceViewFromJSON(json["monthly_usage_based_price"]),
|
|
9983
10020
|
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON(json["price_behavior"]),
|
|
9984
10021
|
valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
|
|
@@ -11103,9 +11140,9 @@ function BillingProductPriceIntervalFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
11103
11140
|
|
|
11104
11141
|
// src/api/componentspublic/models/BillingProviderType.ts
|
|
11105
11142
|
function BillingProviderTypeFromJSON2(json) {
|
|
11106
|
-
return
|
|
11143
|
+
return BillingProviderTypeFromJSONTyped18(json, false);
|
|
11107
11144
|
}
|
|
11108
|
-
function
|
|
11145
|
+
function BillingProviderTypeFromJSONTyped18(json, ignoreDiscriminator) {
|
|
11109
11146
|
return json;
|
|
11110
11147
|
}
|
|
11111
11148
|
|
|
@@ -11130,6 +11167,7 @@ function BillingPriceResponseDataFromJSONTyped9(json, ignoreDiscriminator) {
|
|
|
11130
11167
|
externalPriceId: json["external_price_id"],
|
|
11131
11168
|
id: json["id"],
|
|
11132
11169
|
interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
|
|
11170
|
+
nickname: json["nickname"] == null ? void 0 : json["nickname"],
|
|
11133
11171
|
price: json["price"],
|
|
11134
11172
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
11135
11173
|
providerType: BillingProviderTypeFromJSON2(json["provider_type"]),
|
|
@@ -11268,6 +11306,7 @@ function BillingPriceViewFromJSONTyped8(json, ignoreDiscriminator) {
|
|
|
11268
11306
|
meterEventName: json["meter_event_name"] == null ? void 0 : json["meter_event_name"],
|
|
11269
11307
|
meterEventPayloadKey: json["meter_event_payload_key"] == null ? void 0 : json["meter_event_payload_key"],
|
|
11270
11308
|
meterId: json["meter_id"] == null ? void 0 : json["meter_id"],
|
|
11309
|
+
nickname: json["nickname"] == null ? void 0 : json["nickname"],
|
|
11271
11310
|
packageSize: json["package_size"],
|
|
11272
11311
|
price: json["price"],
|
|
11273
11312
|
priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
|
|
@@ -11421,6 +11460,38 @@ function EntitlementValueTypeFromJSONTyped7(json, ignoreDiscriminator) {
|
|
|
11421
11460
|
return json;
|
|
11422
11461
|
}
|
|
11423
11462
|
|
|
11463
|
+
// src/api/componentspublic/models/MetricPeriodMonthReset.ts
|
|
11464
|
+
function MetricPeriodMonthResetFromJSON2(json) {
|
|
11465
|
+
return MetricPeriodMonthResetFromJSONTyped11(json, false);
|
|
11466
|
+
}
|
|
11467
|
+
function MetricPeriodMonthResetFromJSONTyped11(json, ignoreDiscriminator) {
|
|
11468
|
+
return json;
|
|
11469
|
+
}
|
|
11470
|
+
|
|
11471
|
+
// src/api/componentspublic/models/MetricPeriod.ts
|
|
11472
|
+
function MetricPeriodFromJSON2(json) {
|
|
11473
|
+
return MetricPeriodFromJSONTyped11(json, false);
|
|
11474
|
+
}
|
|
11475
|
+
function MetricPeriodFromJSONTyped11(json, ignoreDiscriminator) {
|
|
11476
|
+
return json;
|
|
11477
|
+
}
|
|
11478
|
+
|
|
11479
|
+
// src/api/componentspublic/models/RuleType.ts
|
|
11480
|
+
function RuleTypeFromJSON2(json) {
|
|
11481
|
+
return RuleTypeFromJSONTyped5(json, false);
|
|
11482
|
+
}
|
|
11483
|
+
function RuleTypeFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11484
|
+
return json;
|
|
11485
|
+
}
|
|
11486
|
+
|
|
11487
|
+
// src/api/componentspublic/models/ComparableOperator.ts
|
|
11488
|
+
function ComparableOperatorFromJSON2(json) {
|
|
11489
|
+
return ComparableOperatorFromJSONTyped5(json, false);
|
|
11490
|
+
}
|
|
11491
|
+
function ComparableOperatorFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11492
|
+
return json;
|
|
11493
|
+
}
|
|
11494
|
+
|
|
11424
11495
|
// src/api/componentspublic/models/CompatiblePlans.ts
|
|
11425
11496
|
function CompatiblePlansFromJSON2(json) {
|
|
11426
11497
|
return CompatiblePlansFromJSONTyped3(json, false);
|
|
@@ -11467,6 +11538,14 @@ function ComponentDisplaySettingsFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
11467
11538
|
};
|
|
11468
11539
|
}
|
|
11469
11540
|
|
|
11541
|
+
// src/api/componentspublic/models/ConditionType.ts
|
|
11542
|
+
function ConditionTypeFromJSON2(json) {
|
|
11543
|
+
return ConditionTypeFromJSONTyped5(json, false);
|
|
11544
|
+
}
|
|
11545
|
+
function ConditionTypeFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11546
|
+
return json;
|
|
11547
|
+
}
|
|
11548
|
+
|
|
11470
11549
|
// src/api/componentspublic/models/CustomPlanConfig.ts
|
|
11471
11550
|
function CustomPlanConfigFromJSON2(json) {
|
|
11472
11551
|
return CustomPlanConfigFromJSONTyped3(json, false);
|
|
@@ -11602,16 +11681,16 @@ function RuleConditionDetailResponseDataFromJSONTyped4(json, ignoreDiscriminator
|
|
|
11602
11681
|
comparisonTrait: json["comparison_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON2(json["comparison_trait"]),
|
|
11603
11682
|
comparisonTraitId: json["comparison_trait_id"] == null ? void 0 : json["comparison_trait_id"],
|
|
11604
11683
|
conditionGroupId: json["condition_group_id"] == null ? void 0 : json["condition_group_id"],
|
|
11605
|
-
conditionType: json["condition_type"],
|
|
11684
|
+
conditionType: ConditionTypeFromJSON2(json["condition_type"]),
|
|
11606
11685
|
createdAt: new Date(json["created_at"]),
|
|
11607
11686
|
environmentId: json["environment_id"],
|
|
11608
11687
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
11609
11688
|
flagId: json["flag_id"] == null ? void 0 : json["flag_id"],
|
|
11610
11689
|
id: json["id"],
|
|
11611
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
11612
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
11690
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON2(json["metric_period"]),
|
|
11691
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON2(json["metric_period_month_reset"]),
|
|
11613
11692
|
metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
|
|
11614
|
-
operator: json["operator"],
|
|
11693
|
+
operator: ComparableOperatorFromJSON2(json["operator"]),
|
|
11615
11694
|
resourceIds: json["resource_ids"],
|
|
11616
11695
|
resources: json["resources"].map(
|
|
11617
11696
|
PreviewObjectResponseDataFromJSON2
|
|
@@ -11667,7 +11746,7 @@ function RuleDetailResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
11667
11746
|
id: json["id"],
|
|
11668
11747
|
name: json["name"],
|
|
11669
11748
|
priority: json["priority"],
|
|
11670
|
-
ruleType: json["rule_type"],
|
|
11749
|
+
ruleType: RuleTypeFromJSON2(json["rule_type"]),
|
|
11671
11750
|
updatedAt: new Date(json["updated_at"]),
|
|
11672
11751
|
value: json["value"]
|
|
11673
11752
|
};
|
|
@@ -11689,7 +11768,7 @@ function FeatureResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
11689
11768
|
icon: json["icon"],
|
|
11690
11769
|
id: json["id"],
|
|
11691
11770
|
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
|
|
11692
|
-
|
|
11771
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
11693
11772
|
name: json["name"],
|
|
11694
11773
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
11695
11774
|
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
@@ -11706,11 +11785,11 @@ function FlagTypeFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
11706
11785
|
return json;
|
|
11707
11786
|
}
|
|
11708
11787
|
|
|
11709
|
-
// src/api/componentspublic/models/
|
|
11710
|
-
function
|
|
11711
|
-
return
|
|
11788
|
+
// src/api/componentspublic/models/FlagInPlanResponseData.ts
|
|
11789
|
+
function FlagInPlanResponseDataFromJSON2(json) {
|
|
11790
|
+
return FlagInPlanResponseDataFromJSONTyped3(json, false);
|
|
11712
11791
|
}
|
|
11713
|
-
function
|
|
11792
|
+
function FlagInPlanResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
11714
11793
|
if (json == null) {
|
|
11715
11794
|
return json;
|
|
11716
11795
|
}
|
|
@@ -11724,18 +11803,18 @@ function FlagDetailResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
11724
11803
|
id: json["id"],
|
|
11725
11804
|
key: json["key"],
|
|
11726
11805
|
lastCheckedAt: json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
|
|
11727
|
-
|
|
11806
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
11728
11807
|
name: json["name"],
|
|
11729
11808
|
rules: json["rules"].map(RuleDetailResponseDataFromJSON2),
|
|
11730
11809
|
updatedAt: new Date(json["updated_at"])
|
|
11731
11810
|
};
|
|
11732
11811
|
}
|
|
11733
11812
|
|
|
11734
|
-
// src/api/componentspublic/models/
|
|
11735
|
-
function
|
|
11736
|
-
return
|
|
11813
|
+
// src/api/componentspublic/models/FeatureInPlanResponseData.ts
|
|
11814
|
+
function FeatureInPlanResponseDataFromJSON2(json) {
|
|
11815
|
+
return FeatureInPlanResponseDataFromJSONTyped6(json, false);
|
|
11737
11816
|
}
|
|
11738
|
-
function
|
|
11817
|
+
function FeatureInPlanResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
|
|
11739
11818
|
if (json == null) {
|
|
11740
11819
|
return json;
|
|
11741
11820
|
}
|
|
@@ -11748,11 +11827,11 @@ function FeatureDetailResponseDataFromJSONTyped6(json, ignoreDiscriminator) {
|
|
|
11748
11827
|
eventSubtype: json["event_subtype"] == null ? void 0 : json["event_subtype"],
|
|
11749
11828
|
eventSummary: json["event_summary"] == null ? void 0 : EventSummaryResponseDataFromJSON2(json["event_summary"]),
|
|
11750
11829
|
featureType: FeatureTypeFromJSON2(json["feature_type"]),
|
|
11751
|
-
flags: json["flags"].map(
|
|
11830
|
+
flags: json["flags"].map(FlagInPlanResponseDataFromJSON2),
|
|
11752
11831
|
icon: json["icon"],
|
|
11753
11832
|
id: json["id"],
|
|
11754
11833
|
lifecyclePhase: json["lifecycle_phase"] == null ? void 0 : FeatureLifecyclePhaseFromJSON2(json["lifecycle_phase"]),
|
|
11755
|
-
|
|
11834
|
+
maintainerAccountMemberId: json["maintainer_account_member_id"] == null ? void 0 : json["maintainer_account_member_id"],
|
|
11756
11835
|
name: json["name"],
|
|
11757
11836
|
plans: json["plans"].map(PreviewObjectFromJSON2),
|
|
11758
11837
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
@@ -11779,66 +11858,6 @@ function GenericPreviewObjectFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
11779
11858
|
};
|
|
11780
11859
|
}
|
|
11781
11860
|
|
|
11782
|
-
// src/api/componentspublic/models/PlanCreditGrantView.ts
|
|
11783
|
-
function PlanCreditGrantViewFromJSON2(json) {
|
|
11784
|
-
return PlanCreditGrantViewFromJSONTyped4(json, false);
|
|
11785
|
-
}
|
|
11786
|
-
function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
|
|
11787
|
-
if (json == null) {
|
|
11788
|
-
return json;
|
|
11789
|
-
}
|
|
11790
|
-
return {
|
|
11791
|
-
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
11792
|
-
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
11793
|
-
billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
|
|
11794
|
-
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(
|
|
11795
|
-
json["billing_credit_auto_topup_expiry_type"]
|
|
11796
|
-
),
|
|
11797
|
-
billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(
|
|
11798
|
-
json["billing_credit_auto_topup_expiry_unit"]
|
|
11799
|
-
),
|
|
11800
|
-
billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
|
|
11801
|
-
billingCreditAutoTopupThresholdCredits: json["billing_credit_auto_topup_threshold_credits"] == null ? void 0 : json["billing_credit_auto_topup_threshold_credits"],
|
|
11802
|
-
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
11803
|
-
createdAt: new Date(json["created_at"]),
|
|
11804
|
-
credit: json["credit"] == null ? void 0 : BillingCreditViewFromJSON2(json["credit"]),
|
|
11805
|
-
creditAmount: json["credit_amount"],
|
|
11806
|
-
creditDescription: json["credit_description"],
|
|
11807
|
-
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
11808
|
-
creditId: json["credit_id"],
|
|
11809
|
-
creditName: json["credit_name"],
|
|
11810
|
-
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(json["expiry_type"]),
|
|
11811
|
-
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(json["expiry_unit"]),
|
|
11812
|
-
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
11813
|
-
id: json["id"],
|
|
11814
|
-
plan: json["plan"] == null ? void 0 : GenericPreviewObjectFromJSON2(json["plan"]),
|
|
11815
|
-
planId: json["plan_id"],
|
|
11816
|
-
planVersionId: json["plan_version_id"] == null ? void 0 : json["plan_version_id"],
|
|
11817
|
-
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
11818
|
-
resetCadence: json["reset_cadence"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON2(json["reset_cadence"]),
|
|
11819
|
-
resetStart: json["reset_start"] == null ? void 0 : BillingPlanCreditGrantResetStartFromJSON2(json["reset_start"]),
|
|
11820
|
-
resetType: BillingPlanCreditGrantResetTypeFromJSON2(json["reset_type"]),
|
|
11821
|
-
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
11822
|
-
updatedAt: new Date(json["updated_at"])
|
|
11823
|
-
};
|
|
11824
|
-
}
|
|
11825
|
-
|
|
11826
|
-
// src/api/componentspublic/models/PlanCurrencyPricesResponseData.ts
|
|
11827
|
-
function PlanCurrencyPricesResponseDataFromJSON2(json) {
|
|
11828
|
-
return PlanCurrencyPricesResponseDataFromJSONTyped5(json, false);
|
|
11829
|
-
}
|
|
11830
|
-
function PlanCurrencyPricesResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11831
|
-
if (json == null) {
|
|
11832
|
-
return json;
|
|
11833
|
-
}
|
|
11834
|
-
return {
|
|
11835
|
-
currency: json["currency"],
|
|
11836
|
-
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
|
|
11837
|
-
oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
|
|
11838
|
-
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["yearly_price"])
|
|
11839
|
-
};
|
|
11840
|
-
}
|
|
11841
|
-
|
|
11842
11861
|
// src/api/componentspublic/models/PlanIcon.ts
|
|
11843
11862
|
function PlanIconFromJSON2(json) {
|
|
11844
11863
|
return PlanIconFromJSONTyped7(json, false);
|
|
@@ -11901,8 +11920,8 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
11901
11920
|
id: json["id"],
|
|
11902
11921
|
meteredMonthlyPrice: json["metered_monthly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["metered_monthly_price"]),
|
|
11903
11922
|
meteredYearlyPrice: json["metered_yearly_price"] == null ? void 0 : BillingPriceViewFromJSON2(json["metered_yearly_price"]),
|
|
11904
|
-
metricPeriod: json["metric_period"] == null ? void 0 : json["metric_period"],
|
|
11905
|
-
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : json["metric_period_month_reset"],
|
|
11923
|
+
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON2(json["metric_period"]),
|
|
11924
|
+
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON2(json["metric_period_month_reset"]),
|
|
11906
11925
|
plan: json["plan"] == null ? void 0 : PlanResponseDataFromJSON2(json["plan"]),
|
|
11907
11926
|
planId: json["plan_id"],
|
|
11908
11927
|
priceBehavior: json["price_behavior"] == null ? void 0 : EntitlementPriceBehaviorFromJSON2(json["price_behavior"]),
|
|
@@ -11920,6 +11939,66 @@ function PlanEntitlementResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
11920
11939
|
};
|
|
11921
11940
|
}
|
|
11922
11941
|
|
|
11942
|
+
// src/api/componentspublic/models/PlanCreditGrantView.ts
|
|
11943
|
+
function PlanCreditGrantViewFromJSON2(json) {
|
|
11944
|
+
return PlanCreditGrantViewFromJSONTyped4(json, false);
|
|
11945
|
+
}
|
|
11946
|
+
function PlanCreditGrantViewFromJSONTyped4(json, ignoreDiscriminator) {
|
|
11947
|
+
if (json == null) {
|
|
11948
|
+
return json;
|
|
11949
|
+
}
|
|
11950
|
+
return {
|
|
11951
|
+
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
11952
|
+
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
11953
|
+
billingCreditAutoTopupEnabled: json["billing_credit_auto_topup_enabled"],
|
|
11954
|
+
billingCreditAutoTopupExpiryType: json["billing_credit_auto_topup_expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(
|
|
11955
|
+
json["billing_credit_auto_topup_expiry_type"]
|
|
11956
|
+
),
|
|
11957
|
+
billingCreditAutoTopupExpiryUnit: json["billing_credit_auto_topup_expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(
|
|
11958
|
+
json["billing_credit_auto_topup_expiry_unit"]
|
|
11959
|
+
),
|
|
11960
|
+
billingCreditAutoTopupExpiryUnitCount: json["billing_credit_auto_topup_expiry_unit_count"] == null ? void 0 : json["billing_credit_auto_topup_expiry_unit_count"],
|
|
11961
|
+
billingCreditAutoTopupThresholdCredits: json["billing_credit_auto_topup_threshold_credits"] == null ? void 0 : json["billing_credit_auto_topup_threshold_credits"],
|
|
11962
|
+
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
11963
|
+
createdAt: new Date(json["created_at"]),
|
|
11964
|
+
credit: json["credit"] == null ? void 0 : BillingCreditViewFromJSON2(json["credit"]),
|
|
11965
|
+
creditAmount: json["credit_amount"],
|
|
11966
|
+
creditDescription: json["credit_description"],
|
|
11967
|
+
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
11968
|
+
creditId: json["credit_id"],
|
|
11969
|
+
creditName: json["credit_name"],
|
|
11970
|
+
expiryType: json["expiry_type"] == null ? void 0 : BillingCreditExpiryTypeFromJSON2(json["expiry_type"]),
|
|
11971
|
+
expiryUnit: json["expiry_unit"] == null ? void 0 : BillingCreditExpiryUnitFromJSON2(json["expiry_unit"]),
|
|
11972
|
+
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
11973
|
+
id: json["id"],
|
|
11974
|
+
plan: json["plan"] == null ? void 0 : GenericPreviewObjectFromJSON2(json["plan"]),
|
|
11975
|
+
planId: json["plan_id"],
|
|
11976
|
+
planVersionId: json["plan_version_id"] == null ? void 0 : json["plan_version_id"],
|
|
11977
|
+
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
11978
|
+
resetCadence: json["reset_cadence"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON2(json["reset_cadence"]),
|
|
11979
|
+
resetStart: json["reset_start"] == null ? void 0 : BillingPlanCreditGrantResetStartFromJSON2(json["reset_start"]),
|
|
11980
|
+
resetType: BillingPlanCreditGrantResetTypeFromJSON2(json["reset_type"]),
|
|
11981
|
+
singularName: json["singular_name"] == null ? void 0 : json["singular_name"],
|
|
11982
|
+
updatedAt: new Date(json["updated_at"])
|
|
11983
|
+
};
|
|
11984
|
+
}
|
|
11985
|
+
|
|
11986
|
+
// src/api/componentspublic/models/PlanCurrencyPricesResponseData.ts
|
|
11987
|
+
function PlanCurrencyPricesResponseDataFromJSON2(json) {
|
|
11988
|
+
return PlanCurrencyPricesResponseDataFromJSONTyped5(json, false);
|
|
11989
|
+
}
|
|
11990
|
+
function PlanCurrencyPricesResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11991
|
+
if (json == null) {
|
|
11992
|
+
return json;
|
|
11993
|
+
}
|
|
11994
|
+
return {
|
|
11995
|
+
currency: json["currency"],
|
|
11996
|
+
monthlyPrice: json["monthly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["monthly_price"]),
|
|
11997
|
+
oneTimePrice: json["one_time_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["one_time_price"]),
|
|
11998
|
+
yearlyPrice: json["yearly_price"] == null ? void 0 : BillingPriceResponseDataFromJSON2(json["yearly_price"])
|
|
11999
|
+
};
|
|
12000
|
+
}
|
|
12001
|
+
|
|
11923
12002
|
// src/api/componentspublic/models/PlanVersionStatus.ts
|
|
11924
12003
|
function PlanVersionStatusFromJSON2(json) {
|
|
11925
12004
|
return PlanVersionStatusFromJSONTyped3(json, false);
|
|
@@ -11971,7 +12050,7 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
11971
12050
|
companyId: json["company_id"] == null ? void 0 : json["company_id"],
|
|
11972
12051
|
companyName: json["company_name"] == null ? void 0 : json["company_name"],
|
|
11973
12052
|
compatiblePlanIds: json["compatible_plan_ids"],
|
|
11974
|
-
controlledBy: json["controlled_by"],
|
|
12053
|
+
controlledBy: BillingProviderTypeFromJSON2(json["controlled_by"]),
|
|
11975
12054
|
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
11976
12055
|
createdAt: new Date(json["created_at"]),
|
|
11977
12056
|
currencyPrices: json["currency_prices"].map(
|
|
@@ -11985,7 +12064,7 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
11985
12064
|
PlanEntitlementResponseDataFromJSON2
|
|
11986
12065
|
),
|
|
11987
12066
|
features: json["features"].map(
|
|
11988
|
-
|
|
12067
|
+
FeatureInPlanResponseDataFromJSON2
|
|
11989
12068
|
),
|
|
11990
12069
|
icon: PlanIconFromJSON2(json["icon"]),
|
|
11991
12070
|
id: json["id"],
|
|
@@ -13382,7 +13461,7 @@ var reducer = (state, action) => {
|
|
|
13382
13461
|
// src/context/EmbedProvider.tsx
|
|
13383
13462
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13384
13463
|
var getCustomHeaders = (sessionId) => ({
|
|
13385
|
-
"X-Schematic-Components-Version": "2.10.
|
|
13464
|
+
"X-Schematic-Components-Version": "2.10.1",
|
|
13386
13465
|
"X-Schematic-Session-ID": sessionId
|
|
13387
13466
|
});
|
|
13388
13467
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -14541,6 +14620,7 @@ var Dialog = ut2.dialog(
|
|
|
14541
14620
|
height: fit-content;
|
|
14542
14621
|
max-height: 100dvh;
|
|
14543
14622
|
margin: ${$top}px 0 0;
|
|
14623
|
+
padding: 0;
|
|
14544
14624
|
background-color: ${theme.card.background};
|
|
14545
14625
|
box-shadow:
|
|
14546
14626
|
0px 1px 20px 0px #1018280f,
|
|
@@ -16764,7 +16844,7 @@ var createActiveUsageBasedEntitlementsReducer = (entitlements, period) => (acc,
|
|
|
16764
16844
|
);
|
|
16765
16845
|
const allocation = featureUsage?.allocation ?? entitlement.valueNumeric ?? 0;
|
|
16766
16846
|
const usage = featureUsage?.usage ?? 0;
|
|
16767
|
-
const quantity =
|
|
16847
|
+
const quantity = entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance ? allocation : 0;
|
|
16768
16848
|
acc.push({
|
|
16769
16849
|
...entitlement,
|
|
16770
16850
|
allocation,
|
|
@@ -19022,7 +19102,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
19022
19102
|
total += planPrice;
|
|
19023
19103
|
}
|
|
19024
19104
|
const addOnCost = addOns.reduce((sum, addOn) => {
|
|
19025
|
-
if (addOn.isSelected) {
|
|
19105
|
+
if (addOn.isSelected && addOn.chargeType !== ChargeType.oneTime) {
|
|
19026
19106
|
sum += getAddOnPrice(addOn, planPeriod, currency)?.price ?? 0;
|
|
19027
19107
|
}
|
|
19028
19108
|
return sum;
|
|
@@ -19033,6 +19113,11 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
19033
19113
|
0
|
|
19034
19114
|
);
|
|
19035
19115
|
total += payInAdvanceCost;
|
|
19116
|
+
const addOnPayInAdvanceCost = addOnPayInAdvanceEntitlements.reduce(
|
|
19117
|
+
(sum, entitlement) => sum + entitlement.quantity * (getEntitlementPrice(entitlement, planPeriod, currency)?.price ?? 0),
|
|
19118
|
+
0
|
|
19119
|
+
);
|
|
19120
|
+
total += addOnPayInAdvanceCost;
|
|
19036
19121
|
return formatCurrency(total, resolvedCurrency);
|
|
19037
19122
|
}, [
|
|
19038
19123
|
selectedPlan,
|
|
@@ -19040,6 +19125,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
19040
19125
|
planPeriod,
|
|
19041
19126
|
addOns,
|
|
19042
19127
|
payInAdvanceEntitlements,
|
|
19128
|
+
addOnPayInAdvanceEntitlements,
|
|
19043
19129
|
currency
|
|
19044
19130
|
]);
|
|
19045
19131
|
const {
|
|
@@ -19268,7 +19354,8 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
19268
19354
|
}, [t3, unsubscribe, setError, setIsLoading, setLayout]);
|
|
19269
19355
|
const isSelectedPlanTrialable = selectedPlan?.companyCanTrial === true && selectedPlan?.isTrialable === true;
|
|
19270
19356
|
const button = useMemo14(() => {
|
|
19271
|
-
const
|
|
19357
|
+
const hasEntitlementDowngrade = payInAdvanceEntitlements.some((e2) => e2.quantity < e2.usage) || addOnPayInAdvanceEntitlements.some((e2) => e2.quantity < e2.usage);
|
|
19358
|
+
const canCheckout = error !== t3("Downgrade not permitted.") && !hasEntitlementDowngrade;
|
|
19272
19359
|
const isSticky = !isButtonInView;
|
|
19273
19360
|
switch (layout) {
|
|
19274
19361
|
case "checkout":
|
|
@@ -19328,7 +19415,9 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
19328
19415
|
paymentMethod,
|
|
19329
19416
|
paymentMethodId,
|
|
19330
19417
|
handleCheckout,
|
|
19331
|
-
handleUnsubscribe
|
|
19418
|
+
handleUnsubscribe,
|
|
19419
|
+
payInAdvanceEntitlements,
|
|
19420
|
+
addOnPayInAdvanceEntitlements
|
|
19332
19421
|
]);
|
|
19333
19422
|
useLayoutEffect6(() => {
|
|
19334
19423
|
const element = buttonRef.current;
|