@schematichq/schematic-components 2.25.0 → 2.25.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.
|
@@ -7165,6 +7165,22 @@ var JSONApiResponse = class {
|
|
|
7165
7165
|
}
|
|
7166
7166
|
};
|
|
7167
7167
|
|
|
7168
|
+
// src/api/checkoutexternal/models/BillingArrearsAnchor.ts
|
|
7169
|
+
function BillingArrearsAnchorFromJSON(json) {
|
|
7170
|
+
return BillingArrearsAnchorFromJSONTyped(json, false);
|
|
7171
|
+
}
|
|
7172
|
+
function BillingArrearsAnchorFromJSONTyped(json, ignoreDiscriminator) {
|
|
7173
|
+
return json;
|
|
7174
|
+
}
|
|
7175
|
+
|
|
7176
|
+
// src/api/checkoutexternal/models/BillingArrearsCadence.ts
|
|
7177
|
+
function BillingArrearsCadenceFromJSON(json) {
|
|
7178
|
+
return BillingArrearsCadenceFromJSONTyped(json, false);
|
|
7179
|
+
}
|
|
7180
|
+
function BillingArrearsCadenceFromJSONTyped(json, ignoreDiscriminator) {
|
|
7181
|
+
return json;
|
|
7182
|
+
}
|
|
7183
|
+
|
|
7168
7184
|
// src/api/checkoutexternal/models/BillingCollectionMethod.ts
|
|
7169
7185
|
function BillingCollectionMethodFromJSON(json) {
|
|
7170
7186
|
return BillingCollectionMethodFromJSONTyped(json, false);
|
|
@@ -7715,6 +7731,8 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
|
|
|
7715
7731
|
return json;
|
|
7716
7732
|
}
|
|
7717
7733
|
return {
|
|
7734
|
+
arrearsAnchor: json["arrears_anchor"] == null ? void 0 : BillingArrearsAnchorFromJSON(json["arrears_anchor"]),
|
|
7735
|
+
arrearsCadence: json["arrears_cadence"] == null ? void 0 : BillingArrearsCadenceFromJSON(json["arrears_cadence"]),
|
|
7718
7736
|
autoTopupAmount: json["auto_topup_amount"] == null ? void 0 : json["auto_topup_amount"],
|
|
7719
7737
|
autoTopupAmountType: json["auto_topup_amount_type"] == null ? void 0 : json["auto_topup_amount_type"],
|
|
7720
7738
|
autoTopupAvailability: BillingCreditAutoTopupAvailabilityFromJSON(
|
|
@@ -7741,10 +7759,14 @@ function BillingPlanCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminat
|
|
|
7741
7759
|
expiryUnitCount: json["expiry_unit_count"] == null ? void 0 : json["expiry_unit_count"],
|
|
7742
7760
|
id: json["id"],
|
|
7743
7761
|
licenseId: json["license_id"] == null ? void 0 : json["license_id"],
|
|
7762
|
+
overdraftLimit: json["overdraft_limit"] == null ? void 0 : json["overdraft_limit"],
|
|
7744
7763
|
plan: json["plan"] == null ? void 0 : PreviewObjectResponseDataFromJSON(json["plan"]),
|
|
7745
7764
|
planId: json["plan_id"],
|
|
7746
7765
|
planName: json["plan_name"],
|
|
7747
7766
|
planVersionId: json["plan_version_id"] == null ? void 0 : json["plan_version_id"],
|
|
7767
|
+
postpaidEnabled: json["postpaid_enabled"],
|
|
7768
|
+
postpaidRatePerUnit: json["postpaid_rate_per_unit"] == null ? void 0 : json["postpaid_rate_per_unit"],
|
|
7769
|
+
postpaidRatePerUnitDecimal: json["postpaid_rate_per_unit_decimal"] == null ? void 0 : json["postpaid_rate_per_unit_decimal"],
|
|
7748
7770
|
resetCadence: json["reset_cadence"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON(json["reset_cadence"]),
|
|
7749
7771
|
resetStart: json["reset_start"] == null ? void 0 : BillingPlanCreditGrantResetStartFromJSON(json["reset_start"]),
|
|
7750
7772
|
resetType: json["reset_type"] == null ? void 0 : BillingPlanCreditGrantResetTypeFromJSON(json["reset_type"]),
|
|
@@ -8322,6 +8344,8 @@ function CompanyPlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8322
8344
|
return json;
|
|
8323
8345
|
}
|
|
8324
8346
|
return {
|
|
8347
|
+
billingCreditArrearsAnchor: json["billing_credit_arrears_anchor"] == null ? void 0 : BillingArrearsAnchorFromJSON(json["billing_credit_arrears_anchor"]),
|
|
8348
|
+
billingCreditArrearsCadence: json["billing_credit_arrears_cadence"] == null ? void 0 : BillingArrearsCadenceFromJSON(json["billing_credit_arrears_cadence"]),
|
|
8325
8349
|
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
8326
8350
|
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
8327
8351
|
billingCreditAutoTopupAvailability: json["billing_credit_auto_topup_availability"] == null ? void 0 : BillingCreditAutoTopupAvailabilityFromJSON(
|
|
@@ -8339,6 +8363,10 @@ function CompanyPlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8339
8363
|
billingCreditAutoTopupThresholdCredits: json["billing_credit_auto_topup_threshold_credits"] == null ? void 0 : json["billing_credit_auto_topup_threshold_credits"],
|
|
8340
8364
|
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
8341
8365
|
billingCreditCanBuyBundles: json["billing_credit_can_buy_bundles"],
|
|
8366
|
+
billingCreditOverdraftLimit: json["billing_credit_overdraft_limit"] == null ? void 0 : json["billing_credit_overdraft_limit"],
|
|
8367
|
+
billingCreditPostpaidEnabled: json["billing_credit_postpaid_enabled"],
|
|
8368
|
+
billingCreditPostpaidRatePerUnit: json["billing_credit_postpaid_rate_per_unit"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit"],
|
|
8369
|
+
billingCreditPostpaidRatePerUnitDecimal: json["billing_credit_postpaid_rate_per_unit_decimal"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit_decimal"],
|
|
8342
8370
|
companyAutoTopupAmount: json["company_auto_topup_amount"] == null ? void 0 : json["company_auto_topup_amount"],
|
|
8343
8371
|
companyAutoTopupEnabled: json["company_auto_topup_enabled"] == null ? void 0 : json["company_auto_topup_enabled"],
|
|
8344
8372
|
companyAutoTopupThresholdCredits: json["company_auto_topup_threshold_credits"] == null ? void 0 : json["company_auto_topup_threshold_credits"],
|
|
@@ -8850,6 +8878,41 @@ function CompanyDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8850
8878
|
};
|
|
8851
8879
|
}
|
|
8852
8880
|
|
|
8881
|
+
// src/api/checkoutexternal/models/CompanyInvoiceResponseData.ts
|
|
8882
|
+
function CompanyInvoiceResponseDataFromJSON(json) {
|
|
8883
|
+
return CompanyInvoiceResponseDataFromJSONTyped(json, false);
|
|
8884
|
+
}
|
|
8885
|
+
function CompanyInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
8886
|
+
if (json == null) {
|
|
8887
|
+
return json;
|
|
8888
|
+
}
|
|
8889
|
+
return {
|
|
8890
|
+
amountDue: json["amount_due"],
|
|
8891
|
+
createdAt: new Date(json["created_at"]),
|
|
8892
|
+
currency: json["currency"],
|
|
8893
|
+
dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
|
|
8894
|
+
id: json["id"],
|
|
8895
|
+
status: json["status"] == null ? void 0 : InvoiceStatusFromJSON(json["status"]),
|
|
8896
|
+
url: json["url"] == null ? void 0 : json["url"]
|
|
8897
|
+
};
|
|
8898
|
+
}
|
|
8899
|
+
|
|
8900
|
+
// src/api/checkoutexternal/models/CompanyInvoicesResponseData.ts
|
|
8901
|
+
function CompanyInvoicesResponseDataFromJSON(json) {
|
|
8902
|
+
return CompanyInvoicesResponseDataFromJSONTyped(json, false);
|
|
8903
|
+
}
|
|
8904
|
+
function CompanyInvoicesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
8905
|
+
if (json == null) {
|
|
8906
|
+
return json;
|
|
8907
|
+
}
|
|
8908
|
+
return {
|
|
8909
|
+
count: json["count"],
|
|
8910
|
+
invoices: json["invoices"].map(
|
|
8911
|
+
CompanyInvoiceResponseDataFromJSON
|
|
8912
|
+
)
|
|
8913
|
+
};
|
|
8914
|
+
}
|
|
8915
|
+
|
|
8853
8916
|
// src/api/checkoutexternal/models/CompanyOverrideNoteResponseData.ts
|
|
8854
8917
|
function CompanyOverrideNoteResponseDataFromJSON(json) {
|
|
8855
8918
|
return CompanyOverrideNoteResponseDataFromJSONTyped(json, false);
|
|
@@ -9340,6 +9403,8 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9340
9403
|
return json;
|
|
9341
9404
|
}
|
|
9342
9405
|
return {
|
|
9406
|
+
billingCreditArrearsAnchor: json["billing_credit_arrears_anchor"] == null ? void 0 : BillingArrearsAnchorFromJSON(json["billing_credit_arrears_anchor"]),
|
|
9407
|
+
billingCreditArrearsCadence: json["billing_credit_arrears_cadence"] == null ? void 0 : BillingArrearsCadenceFromJSON(json["billing_credit_arrears_cadence"]),
|
|
9343
9408
|
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
9344
9409
|
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
9345
9410
|
billingCreditAutoTopupAvailability: json["billing_credit_auto_topup_availability"] == null ? void 0 : BillingCreditAutoTopupAvailabilityFromJSON(
|
|
@@ -9357,6 +9422,10 @@ function PlanCreditGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9357
9422
|
billingCreditAutoTopupThresholdCredits: json["billing_credit_auto_topup_threshold_credits"] == null ? void 0 : json["billing_credit_auto_topup_threshold_credits"],
|
|
9358
9423
|
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
9359
9424
|
billingCreditCanBuyBundles: json["billing_credit_can_buy_bundles"],
|
|
9425
|
+
billingCreditOverdraftLimit: json["billing_credit_overdraft_limit"] == null ? void 0 : json["billing_credit_overdraft_limit"],
|
|
9426
|
+
billingCreditPostpaidEnabled: json["billing_credit_postpaid_enabled"],
|
|
9427
|
+
billingCreditPostpaidRatePerUnit: json["billing_credit_postpaid_rate_per_unit"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit"],
|
|
9428
|
+
billingCreditPostpaidRatePerUnitDecimal: json["billing_credit_postpaid_rate_per_unit_decimal"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit_decimal"],
|
|
9360
9429
|
companyCreditAmount: json["company_credit_amount"],
|
|
9361
9430
|
createdAt: new Date(json["created_at"]),
|
|
9362
9431
|
credit: json["credit"] == null ? void 0 : BillingCreditViewFromJSON(json["credit"]),
|
|
@@ -9849,6 +9918,7 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9849
9918
|
return json;
|
|
9850
9919
|
}
|
|
9851
9920
|
return {
|
|
9921
|
+
arrearsCadence: json["arrears_cadence"] == null ? void 0 : BillingArrearsCadenceFromJSON(json["arrears_cadence"]),
|
|
9852
9922
|
billingCreditBundleId: json["billing_credit_bundle_id"] == null ? void 0 : json["billing_credit_bundle_id"],
|
|
9853
9923
|
billingCreditId: json["billing_credit_id"],
|
|
9854
9924
|
companyId: json["company_id"],
|
|
@@ -9870,6 +9940,12 @@ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
9870
9940
|
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
9871
9941
|
planName: json["plan_name"] == null ? void 0 : json["plan_name"],
|
|
9872
9942
|
pluralName: json["plural_name"] == null ? void 0 : json["plural_name"],
|
|
9943
|
+
postpaidChargeAmount: json["postpaid_charge_amount"] == null ? void 0 : json["postpaid_charge_amount"],
|
|
9944
|
+
postpaidChargeCurrency: json["postpaid_charge_currency"] == null ? void 0 : json["postpaid_charge_currency"],
|
|
9945
|
+
postpaidChargedCredits: json["postpaid_charged_credits"] == null ? void 0 : json["postpaid_charged_credits"],
|
|
9946
|
+
postpaidPeriodEnd: json["postpaid_period_end"] == null ? void 0 : new Date(json["postpaid_period_end"]),
|
|
9947
|
+
postpaidRate: json["postpaid_rate"] == null ? void 0 : json["postpaid_rate"],
|
|
9948
|
+
postpaidRateDecimal: json["postpaid_rate_decimal"] == null ? void 0 : json["postpaid_rate_decimal"],
|
|
9873
9949
|
price: json["price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["price"]),
|
|
9874
9950
|
quantity: json["quantity"],
|
|
9875
9951
|
quantityRemaining: json["quantity_remaining"],
|
|
@@ -10193,6 +10269,35 @@ function GetCheckoutTaxIDResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
10193
10269
|
};
|
|
10194
10270
|
}
|
|
10195
10271
|
|
|
10272
|
+
// src/api/checkoutexternal/models/GetCompanyInvoicesParams.ts
|
|
10273
|
+
function GetCompanyInvoicesParamsFromJSON(json) {
|
|
10274
|
+
return GetCompanyInvoicesParamsFromJSONTyped(json, false);
|
|
10275
|
+
}
|
|
10276
|
+
function GetCompanyInvoicesParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
10277
|
+
if (json == null) {
|
|
10278
|
+
return json;
|
|
10279
|
+
}
|
|
10280
|
+
return {
|
|
10281
|
+
includePending: json["include_pending"] == null ? void 0 : json["include_pending"],
|
|
10282
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
10283
|
+
offset: json["offset"] == null ? void 0 : json["offset"]
|
|
10284
|
+
};
|
|
10285
|
+
}
|
|
10286
|
+
|
|
10287
|
+
// src/api/checkoutexternal/models/GetCompanyInvoicesResponse.ts
|
|
10288
|
+
function GetCompanyInvoicesResponseFromJSON(json) {
|
|
10289
|
+
return GetCompanyInvoicesResponseFromJSONTyped(json, false);
|
|
10290
|
+
}
|
|
10291
|
+
function GetCompanyInvoicesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
10292
|
+
if (json == null) {
|
|
10293
|
+
return json;
|
|
10294
|
+
}
|
|
10295
|
+
return {
|
|
10296
|
+
data: CompanyInvoicesResponseDataFromJSON(json["data"]),
|
|
10297
|
+
params: GetCompanyInvoicesParamsFromJSON(json["params"])
|
|
10298
|
+
};
|
|
10299
|
+
}
|
|
10300
|
+
|
|
10196
10301
|
// src/api/checkoutexternal/models/GetCreditUsageByUserParams.ts
|
|
10197
10302
|
function GetCreditUsageByUserParamsFromJSON(json) {
|
|
10198
10303
|
return GetCreditUsageByUserParamsFromJSONTyped(json, false);
|
|
@@ -10803,6 +10908,50 @@ var CheckoutexternalApi = class extends BaseAPI {
|
|
|
10803
10908
|
const response = await this.getCheckoutTaxIDRaw(initOverrides);
|
|
10804
10909
|
return await response.value();
|
|
10805
10910
|
}
|
|
10911
|
+
/**
|
|
10912
|
+
* Get company invoices
|
|
10913
|
+
*/
|
|
10914
|
+
async getCompanyInvoicesRaw(requestParameters, initOverrides) {
|
|
10915
|
+
const queryParameters = {};
|
|
10916
|
+
if (requestParameters["includePending"] != null) {
|
|
10917
|
+
queryParameters["include_pending"] = requestParameters["includePending"];
|
|
10918
|
+
}
|
|
10919
|
+
if (requestParameters["limit"] != null) {
|
|
10920
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
10921
|
+
}
|
|
10922
|
+
if (requestParameters["offset"] != null) {
|
|
10923
|
+
queryParameters["offset"] = requestParameters["offset"];
|
|
10924
|
+
}
|
|
10925
|
+
const headerParameters = {};
|
|
10926
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
10927
|
+
headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
|
|
10928
|
+
"X-Schematic-Api-Key"
|
|
10929
|
+
);
|
|
10930
|
+
}
|
|
10931
|
+
const response = await this.request(
|
|
10932
|
+
{
|
|
10933
|
+
path: `/company/invoices`,
|
|
10934
|
+
method: "GET",
|
|
10935
|
+
headers: headerParameters,
|
|
10936
|
+
query: queryParameters
|
|
10937
|
+
},
|
|
10938
|
+
initOverrides
|
|
10939
|
+
);
|
|
10940
|
+
return new JSONApiResponse(
|
|
10941
|
+
response,
|
|
10942
|
+
(jsonValue) => GetCompanyInvoicesResponseFromJSON(jsonValue)
|
|
10943
|
+
);
|
|
10944
|
+
}
|
|
10945
|
+
/**
|
|
10946
|
+
* Get company invoices
|
|
10947
|
+
*/
|
|
10948
|
+
async getCompanyInvoices(requestParameters = {}, initOverrides) {
|
|
10949
|
+
const response = await this.getCompanyInvoicesRaw(
|
|
10950
|
+
requestParameters,
|
|
10951
|
+
initOverrides
|
|
10952
|
+
);
|
|
10953
|
+
return await response.value();
|
|
10954
|
+
}
|
|
10806
10955
|
/**
|
|
10807
10956
|
* Get credit usage by user
|
|
10808
10957
|
*/
|
|
@@ -11552,6 +11701,22 @@ var JSONApiResponse2 = class {
|
|
|
11552
11701
|
}
|
|
11553
11702
|
};
|
|
11554
11703
|
|
|
11704
|
+
// src/api/componentspublic/models/BillingArrearsAnchor.ts
|
|
11705
|
+
function BillingArrearsAnchorFromJSON2(json) {
|
|
11706
|
+
return BillingArrearsAnchorFromJSONTyped5(json, false);
|
|
11707
|
+
}
|
|
11708
|
+
function BillingArrearsAnchorFromJSONTyped5(json, ignoreDiscriminator) {
|
|
11709
|
+
return json;
|
|
11710
|
+
}
|
|
11711
|
+
|
|
11712
|
+
// src/api/componentspublic/models/BillingArrearsCadence.ts
|
|
11713
|
+
function BillingArrearsCadenceFromJSON2(json) {
|
|
11714
|
+
return BillingArrearsCadenceFromJSONTyped6(json, false);
|
|
11715
|
+
}
|
|
11716
|
+
function BillingArrearsCadenceFromJSONTyped6(json, ignoreDiscriminator) {
|
|
11717
|
+
return json;
|
|
11718
|
+
}
|
|
11719
|
+
|
|
11555
11720
|
// src/api/componentspublic/models/BillingCreditAutoTopupAvailability.ts
|
|
11556
11721
|
function BillingCreditAutoTopupAvailabilityFromJSON2(json) {
|
|
11557
11722
|
return BillingCreditAutoTopupAvailabilityFromJSONTyped5(json, false);
|
|
@@ -12529,6 +12694,8 @@ function PlanCreditGrantViewFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
12529
12694
|
return json;
|
|
12530
12695
|
}
|
|
12531
12696
|
return {
|
|
12697
|
+
billingCreditArrearsAnchor: json["billing_credit_arrears_anchor"] == null ? void 0 : BillingArrearsAnchorFromJSON2(json["billing_credit_arrears_anchor"]),
|
|
12698
|
+
billingCreditArrearsCadence: json["billing_credit_arrears_cadence"] == null ? void 0 : BillingArrearsCadenceFromJSON2(json["billing_credit_arrears_cadence"]),
|
|
12532
12699
|
billingCreditAutoTopupAmount: json["billing_credit_auto_topup_amount"] == null ? void 0 : json["billing_credit_auto_topup_amount"],
|
|
12533
12700
|
billingCreditAutoTopupAmountType: json["billing_credit_auto_topup_amount_type"] == null ? void 0 : json["billing_credit_auto_topup_amount_type"],
|
|
12534
12701
|
billingCreditAutoTopupAvailability: json["billing_credit_auto_topup_availability"] == null ? void 0 : BillingCreditAutoTopupAvailabilityFromJSON2(
|
|
@@ -12546,6 +12713,10 @@ function PlanCreditGrantViewFromJSONTyped3(json, ignoreDiscriminator) {
|
|
|
12546
12713
|
billingCreditAutoTopupThresholdCredits: json["billing_credit_auto_topup_threshold_credits"] == null ? void 0 : json["billing_credit_auto_topup_threshold_credits"],
|
|
12547
12714
|
billingCreditAutoTopupThresholdPercent: json["billing_credit_auto_topup_threshold_percent"] == null ? void 0 : json["billing_credit_auto_topup_threshold_percent"],
|
|
12548
12715
|
billingCreditCanBuyBundles: json["billing_credit_can_buy_bundles"],
|
|
12716
|
+
billingCreditOverdraftLimit: json["billing_credit_overdraft_limit"] == null ? void 0 : json["billing_credit_overdraft_limit"],
|
|
12717
|
+
billingCreditPostpaidEnabled: json["billing_credit_postpaid_enabled"],
|
|
12718
|
+
billingCreditPostpaidRatePerUnit: json["billing_credit_postpaid_rate_per_unit"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit"],
|
|
12719
|
+
billingCreditPostpaidRatePerUnitDecimal: json["billing_credit_postpaid_rate_per_unit_decimal"] == null ? void 0 : json["billing_credit_postpaid_rate_per_unit_decimal"],
|
|
12549
12720
|
companyCreditAmount: json["company_credit_amount"],
|
|
12550
12721
|
createdAt: new Date(json["created_at"]),
|
|
12551
12722
|
credit: json["credit"] == null ? void 0 : BillingCreditViewFromJSON2(json["credit"]),
|
|
@@ -13737,6 +13908,18 @@ function buildCreditBundlesRequestBody(creditBundles) {
|
|
|
13737
13908
|
[]
|
|
13738
13909
|
);
|
|
13739
13910
|
}
|
|
13911
|
+
function isCreditOnlyCheckout(options) {
|
|
13912
|
+
const { plan, creditBundles, addOns, period, currency } = options;
|
|
13913
|
+
if (plan) {
|
|
13914
|
+
return false;
|
|
13915
|
+
}
|
|
13916
|
+
if (!creditBundles.some((bundle) => bundle.count > 0)) {
|
|
13917
|
+
return false;
|
|
13918
|
+
}
|
|
13919
|
+
return !addOns.some(
|
|
13920
|
+
(addOn) => addOn.isSelected && !!getAddOnPrice(addOn, period, currency)?.id
|
|
13921
|
+
);
|
|
13922
|
+
}
|
|
13740
13923
|
|
|
13741
13924
|
// src/utils/api/entitlement.ts
|
|
13742
13925
|
var PeriodName = {
|
|
@@ -15006,7 +15189,7 @@ var reducer = (state, action) => {
|
|
|
15006
15189
|
// src/context/EmbedProvider.tsx
|
|
15007
15190
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
15008
15191
|
var getCustomHeaders = (sessionId) => ({
|
|
15009
|
-
"X-Schematic-Components-Version": "2.25.
|
|
15192
|
+
"X-Schematic-Components-Version": "2.25.1",
|
|
15010
15193
|
"X-Schematic-Session-ID": sessionId
|
|
15011
15194
|
});
|
|
15012
15195
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -19429,48 +19612,26 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19429
19612
|
bundleCounts
|
|
19430
19613
|
);
|
|
19431
19614
|
}, [bundleGatingPlanId, data?.creditBundles, bundleCounts]);
|
|
19432
|
-
const selectedPlanPriceId = useMemo15(() => {
|
|
19433
|
-
if (!selectedPlan) {
|
|
19434
|
-
return void 0;
|
|
19435
|
-
}
|
|
19436
|
-
const currencyPrice = getPlanPrice(
|
|
19437
|
-
selectedPlan,
|
|
19438
|
-
planPeriod,
|
|
19439
|
-
{ useSelectedPeriod: true },
|
|
19440
|
-
hasCurrency ? effectiveCurrency : void 0
|
|
19441
|
-
);
|
|
19442
|
-
return currencyPrice?.id ?? (planPeriod === "year" ? selectedPlan.yearlyPrice?.id : planPeriod === "quarter" ? selectedPlan.quarterlyPrice?.id : selectedPlan.monthlyPrice?.id);
|
|
19443
|
-
}, [selectedPlan, planPeriod, hasCurrency, effectiveCurrency]);
|
|
19444
19615
|
const [hasInitialPaymentMethod] = useState9(
|
|
19445
19616
|
() => !!(data?.subscription?.paymentMethod?.externalId || data?.company?.defaultPaymentMethod?.externalId)
|
|
19446
19617
|
);
|
|
19447
|
-
const isCreditOnlyPurchase = useMemo15(
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
return !hasPaidAddOn;
|
|
19465
|
-
}, [
|
|
19466
|
-
data?.company?.billingSubscription,
|
|
19467
|
-
selectedPlanPriceId,
|
|
19468
|
-
creditBundles,
|
|
19469
|
-
addOns,
|
|
19470
|
-
planPeriod,
|
|
19471
|
-
hasCurrency,
|
|
19472
|
-
effectiveCurrency
|
|
19473
|
-
]);
|
|
19618
|
+
const isCreditOnlyPurchase = useMemo15(
|
|
19619
|
+
() => isCreditOnlyCheckout({
|
|
19620
|
+
plan: selectedPlan,
|
|
19621
|
+
creditBundles,
|
|
19622
|
+
addOns,
|
|
19623
|
+
period: planPeriod,
|
|
19624
|
+
currency: hasCurrency ? effectiveCurrency : void 0
|
|
19625
|
+
}),
|
|
19626
|
+
[
|
|
19627
|
+
selectedPlan,
|
|
19628
|
+
creditBundles,
|
|
19629
|
+
addOns,
|
|
19630
|
+
planPeriod,
|
|
19631
|
+
hasCurrency,
|
|
19632
|
+
effectiveCurrency
|
|
19633
|
+
]
|
|
19634
|
+
);
|
|
19474
19635
|
const [usageBasedEntitlements, setUsageBasedEntitlements] = useState9(
|
|
19475
19636
|
() => applyPrefilledQuantities(
|
|
19476
19637
|
(selectedPlan?.entitlements || []).reduce(
|
|
@@ -19765,9 +19926,13 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19765
19926
|
updates.creditBundles || creditBundles,
|
|
19766
19927
|
plan?.id ?? data?.company?.plan?.id
|
|
19767
19928
|
);
|
|
19768
|
-
const isCreditOnly =
|
|
19769
|
-
|
|
19770
|
-
|
|
19929
|
+
const isCreditOnly = isCreditOnlyCheckout({
|
|
19930
|
+
plan,
|
|
19931
|
+
creditBundles: resolvedCreditBundles,
|
|
19932
|
+
addOns: updates.addOns || addOns,
|
|
19933
|
+
period,
|
|
19934
|
+
currency: resolvedCurrency
|
|
19935
|
+
});
|
|
19771
19936
|
if ((!plan || !planPriceId) && !isCreditOnly) {
|
|
19772
19937
|
++previewRequestIdRef.current;
|
|
19773
19938
|
setError(void 0);
|
|
@@ -19907,7 +20072,6 @@ var CheckoutDialog = ({ top }) => {
|
|
|
19907
20072
|
addOnCompatibilityLookup,
|
|
19908
20073
|
data?.company?.plan?.id,
|
|
19909
20074
|
data?.company?.plan?.includedCreditGrants,
|
|
19910
|
-
data?.company?.billingSubscription,
|
|
19911
20075
|
previewCheckout,
|
|
19912
20076
|
planPeriod,
|
|
19913
20077
|
selectedPlan,
|
|
@@ -25445,7 +25609,7 @@ PaymentMethod.displayName = "PaymentMethod";
|
|
|
25445
25609
|
// src/components/elements/payment-method/PaymentMethodDetails.tsx
|
|
25446
25610
|
import { Elements } from "@stripe/react-stripe-js";
|
|
25447
25611
|
|
|
25448
|
-
// node_modules/.pnpm/@stripe+stripe-js@9.
|
|
25612
|
+
// node_modules/.pnpm/@stripe+stripe-js@9.15.0/node_modules/@stripe/stripe-js/dist/index.mjs
|
|
25449
25613
|
function _typeof(obj) {
|
|
25450
25614
|
"@babel/helpers - typeof";
|
|
25451
25615
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -25499,7 +25663,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
|
|
|
25499
25663
|
}
|
|
25500
25664
|
stripe._registerWrapper({
|
|
25501
25665
|
name: "stripe-js",
|
|
25502
|
-
version: "9.
|
|
25666
|
+
version: "9.15.0",
|
|
25503
25667
|
startTime
|
|
25504
25668
|
});
|
|
25505
25669
|
};
|
|
@@ -25577,7 +25741,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
|
|
|
25577
25741
|
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
25578
25742
|
var expectedVersion = RELEASE_TRAIN;
|
|
25579
25743
|
if (isTestKey && version !== expectedVersion) {
|
|
25580
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
25744
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.15.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
25581
25745
|
}
|
|
25582
25746
|
var stripe = maybeStripe.apply(void 0, args);
|
|
25583
25747
|
registerWrapper(stripe, startTime);
|