@schematichq/schematic-components 2.31.1 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schematic-components-elements.cjs.js +1717 -244
- package/dist/schematic-components-elements.d.ts +382 -6
- package/dist/schematic-components-elements.esm.js +1668 -187
- package/dist/schematic-components.browser.cjs.js +247 -32
- package/dist/schematic-components.browser.esm.js +247 -32
- package/dist/schematic-components.cjs.js +247 -32
- package/dist/schematic-components.d.ts +127 -0
- package/dist/schematic-components.esm.js +247 -32
- package/package.json +7 -7
|
@@ -5769,6 +5769,132 @@ function CompanyBillingProfileResponseDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
5769
5769
|
};
|
|
5770
5770
|
}
|
|
5771
5771
|
|
|
5772
|
+
// src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
|
|
5773
|
+
var CustomPlanActivationStrategy = {
|
|
5774
|
+
Payment: "on_payment",
|
|
5775
|
+
Publish: "on_publish"
|
|
5776
|
+
};
|
|
5777
|
+
function CustomPlanActivationStrategyFromJSON(json) {
|
|
5778
|
+
return CustomPlanActivationStrategyFromJSONTyped(json, false);
|
|
5779
|
+
}
|
|
5780
|
+
function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
5781
|
+
return json;
|
|
5782
|
+
}
|
|
5783
|
+
|
|
5784
|
+
// src/api/checkoutexternal/models/CompanyContextCustomPlanBillingResponseData.ts
|
|
5785
|
+
function CompanyContextCustomPlanBillingResponseDataFromJSON(json) {
|
|
5786
|
+
return CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, false);
|
|
5787
|
+
}
|
|
5788
|
+
function CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5789
|
+
if (json == null) {
|
|
5790
|
+
return json;
|
|
5791
|
+
}
|
|
5792
|
+
return {
|
|
5793
|
+
activationStrategy: CustomPlanActivationStrategyFromJSON(
|
|
5794
|
+
json["activation_strategy"]
|
|
5795
|
+
),
|
|
5796
|
+
dueAt: new Date(json["due_at"]),
|
|
5797
|
+
invoiceUrl: json["invoice_url"] == null ? void 0 : json["invoice_url"],
|
|
5798
|
+
planId: json["plan_id"],
|
|
5799
|
+
planName: json["plan_name"] == null ? void 0 : json["plan_name"]
|
|
5800
|
+
};
|
|
5801
|
+
}
|
|
5802
|
+
|
|
5803
|
+
// src/api/checkoutexternal/models/CompanyContextPlanResponseData.ts
|
|
5804
|
+
function CompanyContextPlanResponseDataFromJSON(json) {
|
|
5805
|
+
return CompanyContextPlanResponseDataFromJSONTyped(json, false);
|
|
5806
|
+
}
|
|
5807
|
+
function CompanyContextPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5808
|
+
if (json == null) {
|
|
5809
|
+
return json;
|
|
5810
|
+
}
|
|
5811
|
+
return {
|
|
5812
|
+
description: json["description"] == null ? void 0 : json["description"],
|
|
5813
|
+
id: json["id"],
|
|
5814
|
+
includedCreditIds: json["included_credit_ids"],
|
|
5815
|
+
name: json["name"],
|
|
5816
|
+
period: json["period"] == null ? void 0 : json["period"],
|
|
5817
|
+
price: json["price"] == null ? void 0 : json["price"]
|
|
5818
|
+
};
|
|
5819
|
+
}
|
|
5820
|
+
|
|
5821
|
+
// src/api/checkoutexternal/models/CompanyContextScheduledDowngradeResponseData.ts
|
|
5822
|
+
function CompanyContextScheduledDowngradeResponseDataFromJSON(json) {
|
|
5823
|
+
return CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, false);
|
|
5824
|
+
}
|
|
5825
|
+
function CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5826
|
+
if (json == null) {
|
|
5827
|
+
return json;
|
|
5828
|
+
}
|
|
5829
|
+
return {
|
|
5830
|
+
fromPlanId: json["from_plan_id"],
|
|
5831
|
+
fromPlanName: json["from_plan_name"],
|
|
5832
|
+
toPlanId: json["to_plan_id"],
|
|
5833
|
+
toPlanName: json["to_plan_name"]
|
|
5834
|
+
};
|
|
5835
|
+
}
|
|
5836
|
+
|
|
5837
|
+
// src/api/checkoutexternal/models/CompanyContextSubscriptionResponseData.ts
|
|
5838
|
+
function CompanyContextSubscriptionResponseDataFromJSON(json) {
|
|
5839
|
+
return CompanyContextSubscriptionResponseDataFromJSONTyped(json, false);
|
|
5840
|
+
}
|
|
5841
|
+
function CompanyContextSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5842
|
+
if (json == null) {
|
|
5843
|
+
return json;
|
|
5844
|
+
}
|
|
5845
|
+
return {
|
|
5846
|
+
cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
|
|
5847
|
+
cancelAtPeriodEnd: json["cancel_at_period_end"],
|
|
5848
|
+
currency: CurrencyFromJSON(json["currency"]),
|
|
5849
|
+
nextBillAt: json["next_bill_at"] == null ? void 0 : new Date(json["next_bill_at"]),
|
|
5850
|
+
period: json["period"] == null ? void 0 : json["period"],
|
|
5851
|
+
periodEnd: json["period_end"] == null ? void 0 : new Date(json["period_end"]),
|
|
5852
|
+
status: json["status"],
|
|
5853
|
+
trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
|
|
5854
|
+
};
|
|
5855
|
+
}
|
|
5856
|
+
|
|
5857
|
+
// src/api/checkoutexternal/models/CompanyContextResponseData.ts
|
|
5858
|
+
function CompanyContextResponseDataFromJSON(json) {
|
|
5859
|
+
return CompanyContextResponseDataFromJSONTyped(json, false);
|
|
5860
|
+
}
|
|
5861
|
+
function CompanyContextResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5862
|
+
if (json == null) {
|
|
5863
|
+
return json;
|
|
5864
|
+
}
|
|
5865
|
+
return {
|
|
5866
|
+
addOns: json["add_ons"].map(
|
|
5867
|
+
CompanyContextPlanResponseDataFromJSON
|
|
5868
|
+
),
|
|
5869
|
+
customPlanBilling: json["custom_plan_billing"] == null ? void 0 : CompanyContextCustomPlanBillingResponseDataFromJSON(
|
|
5870
|
+
json["custom_plan_billing"]
|
|
5871
|
+
),
|
|
5872
|
+
id: json["id"],
|
|
5873
|
+
name: json["name"],
|
|
5874
|
+
plan: json["plan"] == null ? void 0 : CompanyContextPlanResponseDataFromJSON(json["plan"]),
|
|
5875
|
+
scheduledDowngrade: json["scheduled_downgrade"] == null ? void 0 : CompanyContextScheduledDowngradeResponseDataFromJSON(
|
|
5876
|
+
json["scheduled_downgrade"]
|
|
5877
|
+
),
|
|
5878
|
+
subscription: json["subscription"] == null ? void 0 : CompanyContextSubscriptionResponseDataFromJSON(json["subscription"])
|
|
5879
|
+
};
|
|
5880
|
+
}
|
|
5881
|
+
|
|
5882
|
+
// src/api/checkoutexternal/models/CompanyCreditAutoTopupResponseData.ts
|
|
5883
|
+
function CompanyCreditAutoTopupResponseDataFromJSON(json) {
|
|
5884
|
+
return CompanyCreditAutoTopupResponseDataFromJSONTyped(json, false);
|
|
5885
|
+
}
|
|
5886
|
+
function CompanyCreditAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
5887
|
+
if (json == null) {
|
|
5888
|
+
return json;
|
|
5889
|
+
}
|
|
5890
|
+
return {
|
|
5891
|
+
amount: json["amount"] == null ? void 0 : json["amount"],
|
|
5892
|
+
enabled: json["enabled"],
|
|
5893
|
+
selfService: json["self_service"],
|
|
5894
|
+
thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"]
|
|
5895
|
+
};
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5772
5898
|
// src/api/checkoutexternal/models/CompanyCreditGrantResponseData.ts
|
|
5773
5899
|
function CompanyCreditGrantResponseDataFromJSON(json) {
|
|
5774
5900
|
return CompanyCreditGrantResponseDataFromJSONTyped(json, false);
|
|
@@ -5826,6 +5952,7 @@ function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator
|
|
|
5826
5952
|
return json;
|
|
5827
5953
|
}
|
|
5828
5954
|
return {
|
|
5955
|
+
autoTopup: json["auto_topup"] == null ? void 0 : CompanyCreditAutoTopupResponseDataFromJSON(json["auto_topup"]),
|
|
5829
5956
|
composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
|
|
5830
5957
|
creditDescription: json["credit_description"],
|
|
5831
5958
|
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
@@ -6102,6 +6229,7 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6102
6229
|
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
6103
6230
|
metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
|
|
6104
6231
|
monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
|
|
6232
|
+
quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
|
|
6105
6233
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
6106
6234
|
usage: json["usage"] == null ? void 0 : json["usage"],
|
|
6107
6235
|
valueType: EntitlementValueTypeFromJSON(json["value_type"]),
|
|
@@ -6186,18 +6314,6 @@ function EntityTraitDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6186
6314
|
};
|
|
6187
6315
|
}
|
|
6188
6316
|
|
|
6189
|
-
// src/api/checkoutexternal/models/CustomPlanActivationStrategy.ts
|
|
6190
|
-
var CustomPlanActivationStrategy = {
|
|
6191
|
-
Payment: "on_payment",
|
|
6192
|
-
Publish: "on_publish"
|
|
6193
|
-
};
|
|
6194
|
-
function CustomPlanActivationStrategyFromJSON(json) {
|
|
6195
|
-
return CustomPlanActivationStrategyFromJSONTyped(json, false);
|
|
6196
|
-
}
|
|
6197
|
-
function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
6198
|
-
return json;
|
|
6199
|
-
}
|
|
6200
|
-
|
|
6201
6317
|
// src/api/checkoutexternal/models/CustomPlanBillingStatus.ts
|
|
6202
6318
|
var CustomPlanBillingStatus = {
|
|
6203
6319
|
Active: "active",
|
|
@@ -6234,6 +6350,7 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6234
6350
|
),
|
|
6235
6351
|
billingCycleAnchor: json["billing_cycle_anchor"] == null ? void 0 : new Date(json["billing_cycle_anchor"]),
|
|
6236
6352
|
billingStartDate: json["billing_start_date"] == null ? void 0 : new Date(json["billing_start_date"]),
|
|
6353
|
+
checkoutId: json["checkout_id"] == null ? void 0 : json["checkout_id"],
|
|
6237
6354
|
companyId: json["company_id"],
|
|
6238
6355
|
createdAt: new Date(json["created_at"]),
|
|
6239
6356
|
daysUntilDue: json["days_until_due"],
|
|
@@ -6243,6 +6360,9 @@ function CustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6243
6360
|
paidAt: json["paid_at"] == null ? void 0 : new Date(json["paid_at"]),
|
|
6244
6361
|
planBillingSource: PlanBillingSourceFromJSON(json["plan_billing_source"]),
|
|
6245
6362
|
planId: json["plan_id"],
|
|
6363
|
+
problems: json["problems"].map(
|
|
6364
|
+
CheckoutProblemResponseDataFromJSON
|
|
6365
|
+
),
|
|
6246
6366
|
prorateFirstPeriod: json["prorate_first_period"] == null ? void 0 : json["prorate_first_period"],
|
|
6247
6367
|
publishedAt: json["published_at"] == null ? void 0 : new Date(json["published_at"]),
|
|
6248
6368
|
sendInvoice: json["send_invoice"],
|
|
@@ -6403,6 +6523,7 @@ function ConditionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6403
6523
|
metricPeriodMonthReset: json["metric_period_month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["metric_period_month_reset"]),
|
|
6404
6524
|
metricValue: json["metric_value"] == null ? void 0 : json["metric_value"],
|
|
6405
6525
|
operator: ComparableOperatorFromJSON(json["operator"]),
|
|
6526
|
+
quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
|
|
6406
6527
|
resourceIds: json["resource_ids"],
|
|
6407
6528
|
traitDefinition: json["trait_definition"] == null ? void 0 : TraitDefinitionFromJSON(json["trait_definition"]),
|
|
6408
6529
|
traitValue: json["trait_value"]
|
|
@@ -7340,6 +7461,20 @@ function PlanVersionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7340
7461
|
};
|
|
7341
7462
|
}
|
|
7342
7463
|
|
|
7464
|
+
// src/api/checkoutexternal/models/PlanCreditVisibility.ts
|
|
7465
|
+
function PlanCreditVisibilityFromJSON(json) {
|
|
7466
|
+
return PlanCreditVisibilityFromJSONTyped(json, false);
|
|
7467
|
+
}
|
|
7468
|
+
function PlanCreditVisibilityFromJSONTyped(json, ignoreDiscriminator) {
|
|
7469
|
+
if (json == null) {
|
|
7470
|
+
return json;
|
|
7471
|
+
}
|
|
7472
|
+
return {
|
|
7473
|
+
creditId: json["credit_id"],
|
|
7474
|
+
visible: json["visible"]
|
|
7475
|
+
};
|
|
7476
|
+
}
|
|
7477
|
+
|
|
7343
7478
|
// src/api/checkoutexternal/models/CreditUsageAggregation.ts
|
|
7344
7479
|
function CreditUsageAggregationFromJSON(json) {
|
|
7345
7480
|
return CreditUsageAggregationFromJSONTyped(json, false);
|
|
@@ -7453,6 +7588,9 @@ function CompanyPlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7453
7588
|
controlledBy: BillingProviderTypeFromJSON(json["controlled_by"]),
|
|
7454
7589
|
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
7455
7590
|
createdAt: new Date(json["created_at"]),
|
|
7591
|
+
creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
|
|
7592
|
+
PlanCreditVisibilityFromJSON
|
|
7593
|
+
),
|
|
7456
7594
|
credits: json["credits"].map(
|
|
7457
7595
|
BillingCreditResponseDataFromJSON
|
|
7458
7596
|
),
|
|
@@ -8340,6 +8478,20 @@ function GetCompanyPaymentMethodsResponseFromJSONTyped(json, ignoreDiscriminator
|
|
|
8340
8478
|
};
|
|
8341
8479
|
}
|
|
8342
8480
|
|
|
8481
|
+
// src/api/checkoutexternal/models/GetCompanyResponse.ts
|
|
8482
|
+
function GetCompanyResponseFromJSON(json) {
|
|
8483
|
+
return GetCompanyResponseFromJSONTyped(json, false);
|
|
8484
|
+
}
|
|
8485
|
+
function GetCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
8486
|
+
if (json == null) {
|
|
8487
|
+
return json;
|
|
8488
|
+
}
|
|
8489
|
+
return {
|
|
8490
|
+
data: CompanyContextResponseDataFromJSON(json["data"]),
|
|
8491
|
+
params: json["params"]
|
|
8492
|
+
};
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8343
8495
|
// src/api/checkoutexternal/models/GetCompanyUpcomingInvoiceResponse.ts
|
|
8344
8496
|
function GetCompanyUpcomingInvoiceResponseFromJSON(json) {
|
|
8345
8497
|
return GetCompanyUpcomingInvoiceResponseFromJSONTyped(json, false);
|
|
@@ -9194,6 +9346,38 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
9194
9346
|
const response = await this.getCheckoutTaxIDRaw(initOverrides);
|
|
9195
9347
|
return await response.value();
|
|
9196
9348
|
}
|
|
9349
|
+
/**
|
|
9350
|
+
* Get company
|
|
9351
|
+
*/
|
|
9352
|
+
async getCompanyRaw(initOverrides) {
|
|
9353
|
+
const queryParameters = {};
|
|
9354
|
+
const headerParameters = {};
|
|
9355
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
9356
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
9357
|
+
"X-Schematic-Api-Key"
|
|
9358
|
+
);
|
|
9359
|
+
}
|
|
9360
|
+
const response = await this.request(
|
|
9361
|
+
{
|
|
9362
|
+
path: `/company`,
|
|
9363
|
+
method: "GET",
|
|
9364
|
+
headers: headerParameters,
|
|
9365
|
+
query: queryParameters
|
|
9366
|
+
},
|
|
9367
|
+
initOverrides
|
|
9368
|
+
);
|
|
9369
|
+
return new JSONApiResponse(
|
|
9370
|
+
response,
|
|
9371
|
+
(jsonValue) => GetCompanyResponseFromJSON(jsonValue)
|
|
9372
|
+
);
|
|
9373
|
+
}
|
|
9374
|
+
/**
|
|
9375
|
+
* Get company
|
|
9376
|
+
*/
|
|
9377
|
+
async getCompany(initOverrides) {
|
|
9378
|
+
const response = await this.getCompanyRaw(initOverrides);
|
|
9379
|
+
return await response.value();
|
|
9380
|
+
}
|
|
9197
9381
|
/**
|
|
9198
9382
|
* Get company credit balances
|
|
9199
9383
|
*/
|
|
@@ -10384,9 +10568,9 @@ function BillingCreditLedgerAuthorityFromJSONTyped4(json, ignoreDiscriminator) {
|
|
|
10384
10568
|
|
|
10385
10569
|
// src/api/componentspublic/models/Currency.ts
|
|
10386
10570
|
function CurrencyFromJSON2(json) {
|
|
10387
|
-
return
|
|
10571
|
+
return CurrencyFromJSONTyped34(json, false);
|
|
10388
10572
|
}
|
|
10389
|
-
function
|
|
10573
|
+
function CurrencyFromJSONTyped34(json, ignoreDiscriminator) {
|
|
10390
10574
|
return json;
|
|
10391
10575
|
}
|
|
10392
10576
|
|
|
@@ -11461,6 +11645,20 @@ function PlanVersionResponseDataFromJSONTyped5(json, ignoreDiscriminator) {
|
|
|
11461
11645
|
};
|
|
11462
11646
|
}
|
|
11463
11647
|
|
|
11648
|
+
// src/api/componentspublic/models/PlanCreditVisibility.ts
|
|
11649
|
+
function PlanCreditVisibilityFromJSON2(json) {
|
|
11650
|
+
return PlanCreditVisibilityFromJSONTyped3(json, false);
|
|
11651
|
+
}
|
|
11652
|
+
function PlanCreditVisibilityFromJSONTyped3(json, ignoreDiscriminator) {
|
|
11653
|
+
if (json == null) {
|
|
11654
|
+
return json;
|
|
11655
|
+
}
|
|
11656
|
+
return {
|
|
11657
|
+
creditId: json["credit_id"],
|
|
11658
|
+
visible: json["visible"]
|
|
11659
|
+
};
|
|
11660
|
+
}
|
|
11661
|
+
|
|
11464
11662
|
// src/api/componentspublic/models/PlanViewPublicResponseData.ts
|
|
11465
11663
|
function PlanViewPublicResponseDataFromJSON(json) {
|
|
11466
11664
|
return PlanViewPublicResponseDataFromJSONTyped(json, false);
|
|
@@ -11492,6 +11690,9 @@ function PlanViewPublicResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
11492
11690
|
controlledBy: BillingProviderTypeFromJSON2(json["controlled_by"]),
|
|
11493
11691
|
copiedFromPlanId: json["copied_from_plan_id"] == null ? void 0 : json["copied_from_plan_id"],
|
|
11494
11692
|
createdAt: new Date(json["created_at"]),
|
|
11693
|
+
creditVisibility: json["credit_visibility"] == null ? void 0 : json["credit_visibility"].map(
|
|
11694
|
+
PlanCreditVisibilityFromJSON2
|
|
11695
|
+
),
|
|
11495
11696
|
credits: json["credits"].map(
|
|
11496
11697
|
BillingCreditResponseDataFromJSON2
|
|
11497
11698
|
),
|
|
@@ -15370,6 +15571,17 @@ function getResetCadencePeriod(cadence) {
|
|
|
15370
15571
|
function isPerLicenseGrant(grant) {
|
|
15371
15572
|
return grant.scaling === PlanCreditGrantScaling.PerLicense;
|
|
15372
15573
|
}
|
|
15574
|
+
function getDisplayedPlanCreditGrants(plan) {
|
|
15575
|
+
if (!plan) {
|
|
15576
|
+
return [];
|
|
15577
|
+
}
|
|
15578
|
+
const hidden = new Set(
|
|
15579
|
+
(plan.creditVisibility ?? []).filter((override) => !override.visible).map((override) => override.creditId)
|
|
15580
|
+
);
|
|
15581
|
+
return plan.includedCreditGrants.filter(
|
|
15582
|
+
(grant) => !hidden.has(grant.creditId)
|
|
15583
|
+
);
|
|
15584
|
+
}
|
|
15373
15585
|
function groupPlanCreditGrants(creditGrants) {
|
|
15374
15586
|
const map = creditGrants.reduce(
|
|
15375
15587
|
(acc, grant) => {
|
|
@@ -17015,7 +17227,7 @@ var reducer = (state, action) => {
|
|
|
17015
17227
|
// src/context/EmbedProvider.tsx
|
|
17016
17228
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
17017
17229
|
var getCustomHeaders = (sessionId) => ({
|
|
17018
|
-
"X-Schematic-Components-Version": "2.
|
|
17230
|
+
"X-Schematic-Components-Version": "2.33.0",
|
|
17019
17231
|
"X-Schematic-Session-ID": sessionId
|
|
17020
17232
|
});
|
|
17021
17233
|
var normalizeCurrencyFilter = (filter) => {
|
|
@@ -19859,7 +20071,9 @@ var Plan = ({
|
|
|
19859
20071
|
{ useSelectedPeriod: true },
|
|
19860
20072
|
currency
|
|
19861
20073
|
) || {};
|
|
19862
|
-
const credits = groupPlanCreditGrants(
|
|
20074
|
+
const credits = groupPlanCreditGrants(
|
|
20075
|
+
getDisplayedPlanCreditGrants(plan)
|
|
20076
|
+
);
|
|
19863
20077
|
const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
|
|
19864
20078
|
(entitlement) => !!entitlement.priceBehavior
|
|
19865
20079
|
);
|
|
@@ -20237,8 +20451,8 @@ var Quantity = ({
|
|
|
20237
20451
|
const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
|
|
20238
20452
|
const unitPriceFontSize = 0.875 * settings.theme.typography.text.fontSize;
|
|
20239
20453
|
const planCredits = (0, import_react26.useMemo)(
|
|
20240
|
-
() => groupPlanCreditGrants(selectedPlan
|
|
20241
|
-
[selectedPlan
|
|
20454
|
+
() => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
|
|
20455
|
+
[selectedPlan]
|
|
20242
20456
|
);
|
|
20243
20457
|
const prorationBehavior = data?.checkoutSettings?.prorationBehavior;
|
|
20244
20458
|
const { billDate: renewalDate } = useNextBillDate();
|
|
@@ -21489,16 +21703,17 @@ var CheckoutDialog = ({ top }) => {
|
|
|
21489
21703
|
);
|
|
21490
21704
|
}, [availablePlans, checkoutState, selectedPlanId]);
|
|
21491
21705
|
const [shouldTrial, setShouldTrial] = (0, import_react29.useState)(false);
|
|
21492
|
-
const
|
|
21493
|
-
|
|
21494
|
-
|
|
21706
|
+
const displayedPlanCreditGrants = (0, import_react29.useMemo)(
|
|
21707
|
+
() => getDisplayedPlanCreditGrants(selectedPlan),
|
|
21708
|
+
[selectedPlan]
|
|
21709
|
+
);
|
|
21710
|
+
const planCreditGrants = (0, import_react29.useMemo)(
|
|
21711
|
+
() => mergeCompanyGrants(
|
|
21712
|
+
displayedPlanCreditGrants,
|
|
21495
21713
|
data?.company?.plan?.includedCreditGrants
|
|
21496
|
-
)
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
selectedPlan?.includedCreditGrants,
|
|
21500
|
-
data?.company?.plan?.includedCreditGrants
|
|
21501
|
-
]);
|
|
21714
|
+
),
|
|
21715
|
+
[displayedPlanCreditGrants, data?.company?.plan?.includedCreditGrants]
|
|
21716
|
+
);
|
|
21502
21717
|
const [autoTopupConfigs, setAutoTopupConfigs] = (0, import_react29.useState)(() => {
|
|
21503
21718
|
const initialConfigs = data?.company?.plan?.includedCreditGrants.reduce(
|
|
21504
21719
|
(acc, companyGrant) => {
|
|
@@ -21738,7 +21953,7 @@ var CheckoutDialog = ({ top }) => {
|
|
|
21738
21953
|
description: t2("Choose your base plan")
|
|
21739
21954
|
});
|
|
21740
21955
|
}
|
|
21741
|
-
const hasSelfServiceAutoTopup =
|
|
21956
|
+
const hasSelfServiceAutoTopup = displayedPlanCreditGrants.some(
|
|
21742
21957
|
(grant) => isSelfServiceAutoTopupAvailable(grant)
|
|
21743
21958
|
);
|
|
21744
21959
|
if (hasSelfServiceAutoTopup) {
|
|
@@ -21798,7 +22013,7 @@ var CheckoutDialog = ({ top }) => {
|
|
|
21798
22013
|
data?.customCheckoutFields,
|
|
21799
22014
|
collectTaxId,
|
|
21800
22015
|
availablePlans,
|
|
21801
|
-
|
|
22016
|
+
displayedPlanCreditGrants,
|
|
21802
22017
|
willTrialWithoutPaymentMethod,
|
|
21803
22018
|
payInAdvanceEntitlements,
|
|
21804
22019
|
addOns,
|
|
@@ -24438,8 +24653,8 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
|
|
|
24438
24653
|
data?.company?.plan?.includedCreditGrants
|
|
24439
24654
|
]);
|
|
24440
24655
|
const planCredits = (0, import_react37.useMemo)(
|
|
24441
|
-
() => groupPlanCreditGrants(selectedPlan
|
|
24442
|
-
[selectedPlan
|
|
24656
|
+
() => groupPlanCreditGrants(getDisplayedPlanCreditGrants(selectedPlan)),
|
|
24657
|
+
[selectedPlan]
|
|
24443
24658
|
);
|
|
24444
24659
|
const { payInAdvanceEntitlements } = (0, import_react37.useMemo)(() => {
|
|
24445
24660
|
const payAsYouGoEntitlements = [];
|
|
@@ -29982,7 +30197,7 @@ var Plan2 = ({
|
|
|
29982
30197
|
const currentPlanIndex = plans.findIndex((plan2) => plan2.current);
|
|
29983
30198
|
const isActivePlan = plan.current && currentPeriod === selectedPeriod;
|
|
29984
30199
|
const { price: planPrice, currency: planCurrency } = getPlanPrice(plan, selectedPeriod, { useSelectedPeriod: true }, currency) || {};
|
|
29985
|
-
const credits = groupPlanCreditGrants(plan
|
|
30200
|
+
const credits = groupPlanCreditGrants(getDisplayedPlanCreditGrants(plan));
|
|
29986
30201
|
const hasUsageBasedEntitlements = (plan.entitlements ?? []).some(
|
|
29987
30202
|
(entitlement) => !!entitlement.priceBehavior
|
|
29988
30203
|
);
|
|
@@ -3599,24 +3599,49 @@ export declare interface CheckoutPrefill {
|
|
|
3599
3599
|
* @export
|
|
3600
3600
|
*/
|
|
3601
3601
|
declare const CheckoutProblemCode: {
|
|
3602
|
+
readonly AddOnConflictsWithPlan: "add_on_conflicts_with_plan";
|
|
3603
|
+
readonly AddOnIntervalMismatch: "add_on_interval_mismatch";
|
|
3602
3604
|
readonly AddOnRequiresBilledPlan: "add_on_requires_billed_plan";
|
|
3605
|
+
readonly AddOnUnavailable: "add_on_unavailable";
|
|
3603
3606
|
readonly BillingCycleAnchorConflictsWithTrial: "billing_cycle_anchor_conflicts_with_trial";
|
|
3604
3607
|
readonly BillingCycleAnchorMustBeFuture: "billing_cycle_anchor_must_be_future";
|
|
3608
|
+
readonly BillingCycleAnchorNeedsNewSubscription: "billing_cycle_anchor_needs_new_subscription";
|
|
3609
|
+
readonly BillingCycleAnchorWithoutPlan: "billing_cycle_anchor_without_plan";
|
|
3610
|
+
readonly BillingStartDateMustBePast: "billing_start_date_must_be_past";
|
|
3611
|
+
readonly BillingStartDateNeedsNewSubscription: "billing_start_date_needs_new_subscription";
|
|
3612
|
+
readonly BillingStartDateNeedsRenewalDate: "billing_start_date_needs_renewal_date";
|
|
3613
|
+
readonly BillingStartDateNotBeforeRenewalDate: "billing_start_date_not_before_renewal_date";
|
|
3614
|
+
readonly BillingStartDateTooFarInPast: "billing_start_date_too_far_in_past";
|
|
3605
3615
|
readonly CreditBundleIncompatible: "credit_bundle_incompatible";
|
|
3616
|
+
readonly CreditBundleUnavailable: "credit_bundle_unavailable";
|
|
3617
|
+
readonly CreditBundlesActivateOnPayment: "credit_bundles_activate_on_payment";
|
|
3606
3618
|
readonly CurrencyMismatch: "currency_mismatch";
|
|
3619
|
+
readonly CustomFieldRequired: "custom_field_required";
|
|
3607
3620
|
readonly DiscountIneligible: "discount_ineligible";
|
|
3621
|
+
readonly DowngradeNotPermitted: "downgrade_not_permitted";
|
|
3608
3622
|
readonly FreeFirstPeriodActivatesOnPayment: "free_first_period_activates_on_payment";
|
|
3609
3623
|
readonly InvoiceEmailRequired: "invoice_email_required";
|
|
3610
3624
|
readonly InvoicedSubscriptionConflictsWithTrial: "invoiced_subscription_conflicts_with_trial";
|
|
3625
|
+
readonly InvoicedSubscriptionNeedsNewSubscription: "invoiced_subscription_needs_new_subscription";
|
|
3626
|
+
readonly InvoicedSubscriptionRequiresPlan: "invoiced_subscription_requires_plan";
|
|
3611
3627
|
readonly OptInRequired: "opt_in_required";
|
|
3628
|
+
readonly PayInAdvancePriceInvalid: "pay_in_advance_price_invalid";
|
|
3629
|
+
readonly PayInAdvanceRequired: "pay_in_advance_required";
|
|
3612
3630
|
readonly PaymentMethodRequired: "payment_method_required";
|
|
3631
|
+
readonly PlanNotTrialable: "plan_not_trialable";
|
|
3613
3632
|
readonly PlanUnavailable: "plan_unavailable";
|
|
3614
3633
|
readonly PriceUnavailable: "price_unavailable";
|
|
3615
3634
|
readonly ProrateFirstPeriodWithoutAnchor: "prorate_first_period_without_anchor";
|
|
3616
3635
|
readonly ProviderRejected: "provider_rejected";
|
|
3636
|
+
readonly ScheduledChangeBlocksPurchase: "scheduled_change_blocks_purchase";
|
|
3637
|
+
readonly ScheduledChangePending: "scheduled_change_pending";
|
|
3617
3638
|
readonly SelectionInvalid: "selection_invalid";
|
|
3639
|
+
readonly SubscriptionCurrencyChange: "subscription_currency_change";
|
|
3618
3640
|
readonly TrialEndMustBeFuture: "trial_end_must_be_future";
|
|
3619
3641
|
readonly TrialEndTooFar: "trial_end_too_far";
|
|
3642
|
+
readonly TrialExcludesAddOns: "trial_excludes_add_ons";
|
|
3643
|
+
readonly TrialExcludesUsageBased: "trial_excludes_usage_based";
|
|
3644
|
+
readonly UsagePriceMissingForInterval: "usage_price_missing_for_interval";
|
|
3620
3645
|
readonly UsageOverLimit: "usage_over_limit";
|
|
3621
3646
|
};
|
|
3622
3647
|
|
|
@@ -5002,6 +5027,12 @@ declare interface CompanyPlanDetailResponseData {
|
|
|
5002
5027
|
* @memberof CompanyPlanDetailResponseData
|
|
5003
5028
|
*/
|
|
5004
5029
|
createdAt: Date;
|
|
5030
|
+
/**
|
|
5031
|
+
*
|
|
5032
|
+
* @type {Array<PlanCreditVisibility>}
|
|
5033
|
+
* @memberof CompanyPlanDetailResponseData
|
|
5034
|
+
*/
|
|
5035
|
+
creditVisibility?: Array<PlanCreditVisibility>;
|
|
5005
5036
|
/**
|
|
5006
5037
|
*
|
|
5007
5038
|
* @type {Array<BillingCreditResponseData>}
|
|
@@ -6086,6 +6117,14 @@ declare interface Condition {
|
|
|
6086
6117
|
* @memberof Condition
|
|
6087
6118
|
*/
|
|
6088
6119
|
operator: ComparableOperator;
|
|
6120
|
+
/**
|
|
6121
|
+
*
|
|
6122
|
+
* @type {{ [key: string]: number; }}
|
|
6123
|
+
* @memberof Condition
|
|
6124
|
+
*/
|
|
6125
|
+
quantityRates?: {
|
|
6126
|
+
[key: string]: number;
|
|
6127
|
+
};
|
|
6089
6128
|
/**
|
|
6090
6129
|
*
|
|
6091
6130
|
* @type {Array<string>}
|
|
@@ -7131,6 +7170,12 @@ declare interface CustomPlanBillingResponseData {
|
|
|
7131
7170
|
* @memberof CustomPlanBillingResponseData
|
|
7132
7171
|
*/
|
|
7133
7172
|
billingStartDate?: Date | null;
|
|
7173
|
+
/**
|
|
7174
|
+
* The checkout this billing record was created from, when it was created from one.
|
|
7175
|
+
* @type {string}
|
|
7176
|
+
* @memberof CustomPlanBillingResponseData
|
|
7177
|
+
*/
|
|
7178
|
+
checkoutId?: string | null;
|
|
7134
7179
|
/**
|
|
7135
7180
|
*
|
|
7136
7181
|
* @type {string}
|
|
@@ -7185,6 +7230,12 @@ declare interface CustomPlanBillingResponseData {
|
|
|
7185
7230
|
* @memberof CustomPlanBillingResponseData
|
|
7186
7231
|
*/
|
|
7187
7232
|
planId: string;
|
|
7233
|
+
/**
|
|
7234
|
+
* What the linked checkout still reports wrong, in the order found. Empty when there is no linked checkout or it completed cleanly.
|
|
7235
|
+
* @type {Array<CheckoutProblemResponseData>}
|
|
7236
|
+
* @memberof CustomPlanBillingResponseData
|
|
7237
|
+
*/
|
|
7238
|
+
problems: Array<CheckoutProblemResponseData>;
|
|
7188
7239
|
/**
|
|
7189
7240
|
* Whether the shortened period the renewal date created was billed pro rata when the subscription started. False means that period is free and the first invoice is the one raised on the renewal date.
|
|
7190
7241
|
* @type {boolean}
|
|
@@ -8751,6 +8802,14 @@ declare interface FeatureEntitlement {
|
|
|
8751
8802
|
* @memberof FeatureEntitlement
|
|
8752
8803
|
*/
|
|
8753
8804
|
monthReset?: MetricPeriodMonthReset | null;
|
|
8805
|
+
/**
|
|
8806
|
+
* If the company has a credit-based entitlement for this feature, the credit cost per unit of each quantity an event carries, keyed by quantity key (per token for inference features). Absent when the entitlement prices requests only
|
|
8807
|
+
* @type {{ [key: string]: number; }}
|
|
8808
|
+
* @memberof FeatureEntitlement
|
|
8809
|
+
*/
|
|
8810
|
+
quantityRates?: {
|
|
8811
|
+
[key: string]: number;
|
|
8812
|
+
};
|
|
8754
8813
|
/**
|
|
8755
8814
|
* For usage-based pricing, the soft limit for overage charges or the next tier boundary
|
|
8756
8815
|
* @type {number}
|
|
@@ -11427,6 +11486,68 @@ declare interface PlanCreditGrantView_2 {
|
|
|
11427
11486
|
updatedAt: Date;
|
|
11428
11487
|
}
|
|
11429
11488
|
|
|
11489
|
+
/**
|
|
11490
|
+
* Schematic API
|
|
11491
|
+
* Schematic API
|
|
11492
|
+
*
|
|
11493
|
+
* The version of the OpenAPI document: 0.1
|
|
11494
|
+
*
|
|
11495
|
+
*
|
|
11496
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11497
|
+
* https://openapi-generator.tech
|
|
11498
|
+
* Do not edit the class manually.
|
|
11499
|
+
*/
|
|
11500
|
+
/**
|
|
11501
|
+
*
|
|
11502
|
+
* @export
|
|
11503
|
+
* @interface PlanCreditVisibility
|
|
11504
|
+
*/
|
|
11505
|
+
declare interface PlanCreditVisibility {
|
|
11506
|
+
/**
|
|
11507
|
+
*
|
|
11508
|
+
* @type {string}
|
|
11509
|
+
* @memberof PlanCreditVisibility
|
|
11510
|
+
*/
|
|
11511
|
+
creditId: string;
|
|
11512
|
+
/**
|
|
11513
|
+
*
|
|
11514
|
+
* @type {boolean}
|
|
11515
|
+
* @memberof PlanCreditVisibility
|
|
11516
|
+
*/
|
|
11517
|
+
visible: boolean;
|
|
11518
|
+
}
|
|
11519
|
+
|
|
11520
|
+
/**
|
|
11521
|
+
* Schematic API
|
|
11522
|
+
* Schematic API
|
|
11523
|
+
*
|
|
11524
|
+
* The version of the OpenAPI document: 0.1
|
|
11525
|
+
*
|
|
11526
|
+
*
|
|
11527
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11528
|
+
* https://openapi-generator.tech
|
|
11529
|
+
* Do not edit the class manually.
|
|
11530
|
+
*/
|
|
11531
|
+
/**
|
|
11532
|
+
*
|
|
11533
|
+
* @export
|
|
11534
|
+
* @interface PlanCreditVisibility
|
|
11535
|
+
*/
|
|
11536
|
+
declare interface PlanCreditVisibility_2 {
|
|
11537
|
+
/**
|
|
11538
|
+
*
|
|
11539
|
+
* @type {string}
|
|
11540
|
+
* @memberof PlanCreditVisibility
|
|
11541
|
+
*/
|
|
11542
|
+
creditId: string;
|
|
11543
|
+
/**
|
|
11544
|
+
*
|
|
11545
|
+
* @type {boolean}
|
|
11546
|
+
* @memberof PlanCreditVisibility
|
|
11547
|
+
*/
|
|
11548
|
+
visible: boolean;
|
|
11549
|
+
}
|
|
11550
|
+
|
|
11430
11551
|
/**
|
|
11431
11552
|
*
|
|
11432
11553
|
* @export
|
|
@@ -12701,6 +12822,12 @@ declare interface PlanViewPublicResponseData {
|
|
|
12701
12822
|
* @memberof PlanViewPublicResponseData
|
|
12702
12823
|
*/
|
|
12703
12824
|
createdAt: Date;
|
|
12825
|
+
/**
|
|
12826
|
+
*
|
|
12827
|
+
* @type {Array<PlanCreditVisibility>}
|
|
12828
|
+
* @memberof PlanViewPublicResponseData
|
|
12829
|
+
*/
|
|
12830
|
+
creditVisibility?: Array<PlanCreditVisibility_2>;
|
|
12704
12831
|
/**
|
|
12705
12832
|
*
|
|
12706
12833
|
* @type {Array<BillingCreditResponseData>}
|