@schematichq/schematic-react 1.16.1 → 1.18.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-react.cjs.js +183 -35
- package/dist/schematic-react.d.ts +155 -61
- package/dist/schematic-react.esm.js +183 -35
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@schematichq+schematic-js@1.
|
|
1
|
+
// node_modules/.pnpm/@schematichq+schematic-js@1.18.0/node_modules/@schematichq/schematic-js/dist/schematic.esm.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1329,7 +1329,7 @@ var ContextSignatureManager = class {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
1331
|
};
|
|
1332
|
-
var version = "1.
|
|
1332
|
+
var version = "1.18.0";
|
|
1333
1333
|
var DEFAULT_CATALOG_QUERY = {};
|
|
1334
1334
|
function normalizeCatalogQuery(query) {
|
|
1335
1335
|
return query.catalogId === void 0 ? {} : { catalogId: query.catalogId };
|
|
@@ -1390,6 +1390,11 @@ __export(models_exports, {
|
|
|
1390
1390
|
BillingStrategyFromJSONTyped: () => BillingStrategyFromJSONTyped5,
|
|
1391
1391
|
BillingStrategyToJSON: () => BillingStrategyToJSON2,
|
|
1392
1392
|
BillingStrategyToJSONTyped: () => BillingStrategyToJSONTyped5,
|
|
1393
|
+
BillingSubscriptionPauseBehavior: () => BillingSubscriptionPauseBehavior,
|
|
1394
|
+
BillingSubscriptionPauseBehaviorFromJSON: () => BillingSubscriptionPauseBehaviorFromJSON,
|
|
1395
|
+
BillingSubscriptionPauseBehaviorFromJSONTyped: () => BillingSubscriptionPauseBehaviorFromJSONTyped,
|
|
1396
|
+
BillingSubscriptionPauseBehaviorToJSON: () => BillingSubscriptionPauseBehaviorToJSON,
|
|
1397
|
+
BillingSubscriptionPauseBehaviorToJSONTyped: () => BillingSubscriptionPauseBehaviorToJSONTyped,
|
|
1393
1398
|
BillingSubscriptionTrialEndSetting: () => BillingSubscriptionTrialEndSetting,
|
|
1394
1399
|
BillingSubscriptionTrialEndSettingFromJSON: () => BillingSubscriptionTrialEndSettingFromJSON,
|
|
1395
1400
|
BillingSubscriptionTrialEndSettingFromJSONTyped: () => BillingSubscriptionTrialEndSettingFromJSONTyped,
|
|
@@ -1437,9 +1442,9 @@ __export(models_exports, {
|
|
|
1437
1442
|
CatalogCurrencyPricesResponseDataToJSON: () => CatalogCurrencyPricesResponseDataToJSON2,
|
|
1438
1443
|
CatalogCurrencyPricesResponseDataToJSONTyped: () => CatalogCurrencyPricesResponseDataToJSONTyped4,
|
|
1439
1444
|
CatalogCustomPlanCTAResponseDataFromJSON: () => CatalogCustomPlanCTAResponseDataFromJSON2,
|
|
1440
|
-
CatalogCustomPlanCTAResponseDataFromJSONTyped: () =>
|
|
1445
|
+
CatalogCustomPlanCTAResponseDataFromJSONTyped: () => CatalogCustomPlanCTAResponseDataFromJSONTyped4,
|
|
1441
1446
|
CatalogCustomPlanCTAResponseDataToJSON: () => CatalogCustomPlanCTAResponseDataToJSON2,
|
|
1442
|
-
CatalogCustomPlanCTAResponseDataToJSONTyped: () =>
|
|
1447
|
+
CatalogCustomPlanCTAResponseDataToJSONTyped: () => CatalogCustomPlanCTAResponseDataToJSONTyped4,
|
|
1443
1448
|
CatalogPlanEntitlementResponseDataFromJSON: () => CatalogPlanEntitlementResponseDataFromJSON2,
|
|
1444
1449
|
CatalogPlanEntitlementResponseDataFromJSONTyped: () => CatalogPlanEntitlementResponseDataFromJSONTyped2,
|
|
1445
1450
|
CatalogPlanEntitlementResponseDataToJSON: () => CatalogPlanEntitlementResponseDataToJSON2,
|
|
@@ -1758,6 +1763,10 @@ __export(models_exports, {
|
|
|
1758
1763
|
GetCompanyUpcomingInvoiceResponseFromJSONTyped: () => GetCompanyUpcomingInvoiceResponseFromJSONTyped,
|
|
1759
1764
|
GetCompanyUpcomingInvoiceResponseToJSON: () => GetCompanyUpcomingInvoiceResponseToJSON,
|
|
1760
1765
|
GetCompanyUpcomingInvoiceResponseToJSONTyped: () => GetCompanyUpcomingInvoiceResponseToJSONTyped,
|
|
1766
|
+
GetInvoiceLinkResponseFromJSON: () => GetInvoiceLinkResponseFromJSON,
|
|
1767
|
+
GetInvoiceLinkResponseFromJSONTyped: () => GetInvoiceLinkResponseFromJSONTyped,
|
|
1768
|
+
GetInvoiceLinkResponseToJSON: () => GetInvoiceLinkResponseToJSON,
|
|
1769
|
+
GetInvoiceLinkResponseToJSONTyped: () => GetInvoiceLinkResponseToJSONTyped,
|
|
1761
1770
|
GetPublicCatalogByIDResponseFromJSON: () => GetPublicCatalogByIDResponseFromJSON,
|
|
1762
1771
|
GetPublicCatalogByIDResponseFromJSONTyped: () => GetPublicCatalogByIDResponseFromJSONTyped,
|
|
1763
1772
|
GetPublicCatalogByIDResponseToJSON: () => GetPublicCatalogByIDResponseToJSON,
|
|
@@ -1766,6 +1775,10 @@ __export(models_exports, {
|
|
|
1766
1775
|
GetPublicCatalogResponseFromJSONTyped: () => GetPublicCatalogResponseFromJSONTyped,
|
|
1767
1776
|
GetPublicCatalogResponseToJSON: () => GetPublicCatalogResponseToJSON,
|
|
1768
1777
|
GetPublicCatalogResponseToJSONTyped: () => GetPublicCatalogResponseToJSONTyped,
|
|
1778
|
+
InvoiceLinkFromJSON: () => InvoiceLinkFromJSON,
|
|
1779
|
+
InvoiceLinkFromJSONTyped: () => InvoiceLinkFromJSONTyped,
|
|
1780
|
+
InvoiceLinkToJSON: () => InvoiceLinkToJSON,
|
|
1781
|
+
InvoiceLinkToJSONTyped: () => InvoiceLinkToJSONTyped,
|
|
1769
1782
|
InvoiceStatus: () => InvoiceStatus,
|
|
1770
1783
|
InvoiceStatusFromJSON: () => InvoiceStatusFromJSON,
|
|
1771
1784
|
InvoiceStatusFromJSONTyped: () => InvoiceStatusFromJSONTyped,
|
|
@@ -1890,6 +1903,7 @@ __export(models_exports, {
|
|
|
1890
1903
|
instanceOfBillingProductPriceInterval: () => instanceOfBillingProductPriceInterval,
|
|
1891
1904
|
instanceOfBillingProviderType: () => instanceOfBillingProviderType,
|
|
1892
1905
|
instanceOfBillingStrategy: () => instanceOfBillingStrategy,
|
|
1906
|
+
instanceOfBillingSubscriptionPauseBehavior: () => instanceOfBillingSubscriptionPauseBehavior,
|
|
1893
1907
|
instanceOfBillingSubscriptionTrialEndSetting: () => instanceOfBillingSubscriptionTrialEndSetting,
|
|
1894
1908
|
instanceOfBillingTiersMode: () => instanceOfBillingTiersMode,
|
|
1895
1909
|
instanceOfCatalogAutoTopupResponseData: () => instanceOfCatalogAutoTopupResponseData,
|
|
@@ -1978,8 +1992,10 @@ __export(models_exports, {
|
|
|
1978
1992
|
instanceOfGetCompanyPaymentMethodsResponse: () => instanceOfGetCompanyPaymentMethodsResponse,
|
|
1979
1993
|
instanceOfGetCompanyResponse: () => instanceOfGetCompanyResponse,
|
|
1980
1994
|
instanceOfGetCompanyUpcomingInvoiceResponse: () => instanceOfGetCompanyUpcomingInvoiceResponse,
|
|
1995
|
+
instanceOfGetInvoiceLinkResponse: () => instanceOfGetInvoiceLinkResponse,
|
|
1981
1996
|
instanceOfGetPublicCatalogByIDResponse: () => instanceOfGetPublicCatalogByIDResponse,
|
|
1982
1997
|
instanceOfGetPublicCatalogResponse: () => instanceOfGetPublicCatalogResponse,
|
|
1998
|
+
instanceOfInvoiceLink: () => instanceOfInvoiceLink,
|
|
1983
1999
|
instanceOfInvoiceStatus: () => instanceOfInvoiceStatus,
|
|
1984
2000
|
instanceOfListCheckoutsParams: () => instanceOfListCheckoutsParams,
|
|
1985
2001
|
instanceOfListCheckoutsResponse: () => instanceOfListCheckoutsResponse,
|
|
@@ -2318,6 +2334,36 @@ function BillingStrategyToJSON2(value) {
|
|
|
2318
2334
|
function BillingStrategyToJSONTyped5(value, ignoreDiscriminator) {
|
|
2319
2335
|
return value;
|
|
2320
2336
|
}
|
|
2337
|
+
var BillingSubscriptionPauseBehavior = {
|
|
2338
|
+
KeepAsDraft: "keep_as_draft",
|
|
2339
|
+
MarkUncollectible: "mark_uncollectible",
|
|
2340
|
+
Void: "void"
|
|
2341
|
+
};
|
|
2342
|
+
function instanceOfBillingSubscriptionPauseBehavior(value) {
|
|
2343
|
+
for (const key in BillingSubscriptionPauseBehavior) {
|
|
2344
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
2345
|
+
BillingSubscriptionPauseBehavior,
|
|
2346
|
+
key
|
|
2347
|
+
)) {
|
|
2348
|
+
if (BillingSubscriptionPauseBehavior[key] === value) {
|
|
2349
|
+
return true;
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
return false;
|
|
2354
|
+
}
|
|
2355
|
+
function BillingSubscriptionPauseBehaviorFromJSON(json) {
|
|
2356
|
+
return BillingSubscriptionPauseBehaviorFromJSONTyped(json, false);
|
|
2357
|
+
}
|
|
2358
|
+
function BillingSubscriptionPauseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
|
|
2359
|
+
return json;
|
|
2360
|
+
}
|
|
2361
|
+
function BillingSubscriptionPauseBehaviorToJSON(value) {
|
|
2362
|
+
return value;
|
|
2363
|
+
}
|
|
2364
|
+
function BillingSubscriptionPauseBehaviorToJSONTyped(value, ignoreDiscriminator) {
|
|
2365
|
+
return value;
|
|
2366
|
+
}
|
|
2321
2367
|
var BillingSubscriptionTrialEndSetting = {
|
|
2322
2368
|
Cancel: "cancel",
|
|
2323
2369
|
Subscribe: "subscribe"
|
|
@@ -2958,6 +3004,35 @@ function CatalogUsageViolationResponseDataToJSONTyped(value, ignoreDiscriminator
|
|
|
2958
3004
|
usage: value["usage"]
|
|
2959
3005
|
};
|
|
2960
3006
|
}
|
|
3007
|
+
function instanceOfCatalogCustomPlanCTAResponseData(value) {
|
|
3008
|
+
return true;
|
|
3009
|
+
}
|
|
3010
|
+
function CatalogCustomPlanCTAResponseDataFromJSON2(json) {
|
|
3011
|
+
return CatalogCustomPlanCTAResponseDataFromJSONTyped4(json, false);
|
|
3012
|
+
}
|
|
3013
|
+
function CatalogCustomPlanCTAResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
|
|
3014
|
+
if (json == null) {
|
|
3015
|
+
return json;
|
|
3016
|
+
}
|
|
3017
|
+
return {
|
|
3018
|
+
ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
|
|
3019
|
+
ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
|
|
3020
|
+
priceText: json["price_text"] == null ? void 0 : json["price_text"]
|
|
3021
|
+
};
|
|
3022
|
+
}
|
|
3023
|
+
function CatalogCustomPlanCTAResponseDataToJSON2(json) {
|
|
3024
|
+
return CatalogCustomPlanCTAResponseDataToJSONTyped4(json, false);
|
|
3025
|
+
}
|
|
3026
|
+
function CatalogCustomPlanCTAResponseDataToJSONTyped4(value, ignoreDiscriminator = false) {
|
|
3027
|
+
if (value == null) {
|
|
3028
|
+
return value;
|
|
3029
|
+
}
|
|
3030
|
+
return {
|
|
3031
|
+
cta_text: value["ctaText"],
|
|
3032
|
+
cta_url: value["ctaUrl"],
|
|
3033
|
+
price_text: value["priceText"]
|
|
3034
|
+
};
|
|
3035
|
+
}
|
|
2961
3036
|
var EntitlementValueType = {
|
|
2962
3037
|
Boolean: "boolean",
|
|
2963
3038
|
Credit: "credit",
|
|
@@ -3391,6 +3466,7 @@ function instanceOfCatalogCompanyPlanResponseData(value) {
|
|
|
3391
3466
|
if (!("currencyPrices" in value) || value["currencyPrices"] === void 0)
|
|
3392
3467
|
return false;
|
|
3393
3468
|
if (!("current" in value) || value["current"] === void 0) return false;
|
|
3469
|
+
if (!("custom" in value) || value["custom"] === void 0) return false;
|
|
3394
3470
|
if (!("description" in value) || value["description"] === void 0)
|
|
3395
3471
|
return false;
|
|
3396
3472
|
if (!("entitlements" in value) || value["entitlements"] === void 0)
|
|
@@ -3429,6 +3505,8 @@ function CatalogCompanyPlanResponseDataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
3429
3505
|
CatalogCurrencyPricesResponseDataFromJSON2
|
|
3430
3506
|
),
|
|
3431
3507
|
current: json["current"],
|
|
3508
|
+
custom: json["custom"],
|
|
3509
|
+
customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON2(json["custom_plan_cta"]),
|
|
3432
3510
|
description: json["description"],
|
|
3433
3511
|
entitlements: json["entitlements"].map(
|
|
3434
3512
|
CatalogPlanEntitlementResponseDataFromJSON2
|
|
@@ -3474,6 +3552,10 @@ function CatalogCompanyPlanResponseDataToJSONTyped(value, ignoreDiscriminator =
|
|
|
3474
3552
|
CatalogCurrencyPricesResponseDataToJSON2
|
|
3475
3553
|
),
|
|
3476
3554
|
current: value["current"],
|
|
3555
|
+
custom: value["custom"],
|
|
3556
|
+
custom_plan_cta: CatalogCustomPlanCTAResponseDataToJSON2(
|
|
3557
|
+
value["customPlanCta"]
|
|
3558
|
+
),
|
|
3477
3559
|
description: value["description"],
|
|
3478
3560
|
entitlements: value["entitlements"].map(
|
|
3479
3561
|
CatalogPlanEntitlementResponseDataToJSON2
|
|
@@ -3569,35 +3651,6 @@ function CatalogCreditBundleResponseDataToJSONTyped2(value, ignoreDiscriminator
|
|
|
3569
3651
|
unit_price: CatalogPriceResponseDataToJSON2(value["unitPrice"])
|
|
3570
3652
|
};
|
|
3571
3653
|
}
|
|
3572
|
-
function instanceOfCatalogCustomPlanCTAResponseData(value) {
|
|
3573
|
-
return true;
|
|
3574
|
-
}
|
|
3575
|
-
function CatalogCustomPlanCTAResponseDataFromJSON2(json) {
|
|
3576
|
-
return CatalogCustomPlanCTAResponseDataFromJSONTyped3(json, false);
|
|
3577
|
-
}
|
|
3578
|
-
function CatalogCustomPlanCTAResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
|
|
3579
|
-
if (json == null) {
|
|
3580
|
-
return json;
|
|
3581
|
-
}
|
|
3582
|
-
return {
|
|
3583
|
-
ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
|
|
3584
|
-
ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
|
|
3585
|
-
priceText: json["price_text"] == null ? void 0 : json["price_text"]
|
|
3586
|
-
};
|
|
3587
|
-
}
|
|
3588
|
-
function CatalogCustomPlanCTAResponseDataToJSON2(json) {
|
|
3589
|
-
return CatalogCustomPlanCTAResponseDataToJSONTyped3(json, false);
|
|
3590
|
-
}
|
|
3591
|
-
function CatalogCustomPlanCTAResponseDataToJSONTyped3(value, ignoreDiscriminator = false) {
|
|
3592
|
-
if (value == null) {
|
|
3593
|
-
return value;
|
|
3594
|
-
}
|
|
3595
|
-
return {
|
|
3596
|
-
cta_text: value["ctaText"],
|
|
3597
|
-
cta_url: value["ctaUrl"],
|
|
3598
|
-
price_text: value["priceText"]
|
|
3599
|
-
};
|
|
3600
|
-
}
|
|
3601
3654
|
function instanceOfCatalogPlanRefResponseData(value) {
|
|
3602
3655
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3603
3656
|
if (!("name" in value) || value["name"] === void 0) return false;
|
|
@@ -3636,6 +3689,7 @@ function instanceOfCatalogPlanResponseData(value) {
|
|
|
3636
3689
|
return false;
|
|
3637
3690
|
if (!("currencyPrices" in value) || value["currencyPrices"] === void 0)
|
|
3638
3691
|
return false;
|
|
3692
|
+
if (!("custom" in value) || value["custom"] === void 0) return false;
|
|
3639
3693
|
if (!("description" in value) || value["description"] === void 0)
|
|
3640
3694
|
return false;
|
|
3641
3695
|
if (!("entitlements" in value) || value["entitlements"] === void 0)
|
|
@@ -3666,6 +3720,8 @@ function CatalogPlanResponseDataFromJSONTyped2(json, ignoreDiscriminator) {
|
|
|
3666
3720
|
currencyPrices: json["currency_prices"].map(
|
|
3667
3721
|
CatalogCurrencyPricesResponseDataFromJSON2
|
|
3668
3722
|
),
|
|
3723
|
+
custom: json["custom"],
|
|
3724
|
+
customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON2(json["custom_plan_cta"]),
|
|
3669
3725
|
description: json["description"],
|
|
3670
3726
|
entitlements: json["entitlements"].map(
|
|
3671
3727
|
CatalogPlanEntitlementResponseDataFromJSON2
|
|
@@ -3701,6 +3757,10 @@ function CatalogPlanResponseDataToJSONTyped2(value, ignoreDiscriminator = false)
|
|
|
3701
3757
|
currency_prices: value["currencyPrices"].map(
|
|
3702
3758
|
CatalogCurrencyPricesResponseDataToJSON2
|
|
3703
3759
|
),
|
|
3760
|
+
custom: value["custom"],
|
|
3761
|
+
custom_plan_cta: CatalogCustomPlanCTAResponseDataToJSON2(
|
|
3762
|
+
value["customPlanCta"]
|
|
3763
|
+
),
|
|
3704
3764
|
description: value["description"],
|
|
3705
3765
|
entitlements: value["entitlements"].map(
|
|
3706
3766
|
CatalogPlanEntitlementResponseDataToJSON2
|
|
@@ -4565,6 +4625,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4565
4625
|
return json;
|
|
4566
4626
|
}
|
|
4567
4627
|
return {
|
|
4628
|
+
accessRevokedAt: json["access_revoked_at"] == null ? void 0 : new Date(json["access_revoked_at"]),
|
|
4568
4629
|
applicationId: json["application_id"] == null ? void 0 : json["application_id"],
|
|
4569
4630
|
cancelAt: json["cancel_at"] == null ? void 0 : json["cancel_at"],
|
|
4570
4631
|
cancelAtPeriodEnd: json["cancel_at_period_end"],
|
|
@@ -4579,6 +4640,9 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4579
4640
|
id: json["id"],
|
|
4580
4641
|
interval: json["interval"],
|
|
4581
4642
|
metadata: json["metadata"] == null ? void 0 : json["metadata"],
|
|
4643
|
+
pauseBehavior: json["pause_behavior"] == null ? void 0 : BillingSubscriptionPauseBehaviorFromJSON(json["pause_behavior"]),
|
|
4644
|
+
pauseResumesAt: json["pause_resumes_at"] == null ? void 0 : json["pause_resumes_at"],
|
|
4645
|
+
pausedAt: json["paused_at"] == null ? void 0 : new Date(json["paused_at"]),
|
|
4582
4646
|
periodEnd: json["period_end"],
|
|
4583
4647
|
periodStart: json["period_start"],
|
|
4584
4648
|
providerType: BillingProviderTypeFromJSON2(json["provider_type"]),
|
|
@@ -4601,6 +4665,7 @@ function CheckoutResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4601
4665
|
return value;
|
|
4602
4666
|
}
|
|
4603
4667
|
return {
|
|
4668
|
+
access_revoked_at: value["accessRevokedAt"] == null ? void 0 : value["accessRevokedAt"].toISOString(),
|
|
4604
4669
|
application_id: value["applicationId"],
|
|
4605
4670
|
cancel_at: value["cancelAt"],
|
|
4606
4671
|
cancel_at_period_end: value["cancelAtPeriodEnd"],
|
|
@@ -4615,6 +4680,11 @@ function CheckoutResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4615
4680
|
id: value["id"],
|
|
4616
4681
|
interval: value["interval"],
|
|
4617
4682
|
metadata: value["metadata"],
|
|
4683
|
+
pause_behavior: BillingSubscriptionPauseBehaviorToJSON(
|
|
4684
|
+
value["pauseBehavior"]
|
|
4685
|
+
),
|
|
4686
|
+
pause_resumes_at: value["pauseResumesAt"],
|
|
4687
|
+
paused_at: value["pausedAt"] == null ? void 0 : value["pausedAt"].toISOString(),
|
|
4618
4688
|
period_end: value["periodEnd"],
|
|
4619
4689
|
period_start: value["periodStart"],
|
|
4620
4690
|
provider_type: BillingProviderTypeToJSON2(value["providerType"]),
|
|
@@ -6633,6 +6703,64 @@ function GetCompanyUpcomingInvoiceResponseToJSONTyped(value, ignoreDiscriminator
|
|
|
6633
6703
|
params: value["params"]
|
|
6634
6704
|
};
|
|
6635
6705
|
}
|
|
6706
|
+
function instanceOfInvoiceLink(value) {
|
|
6707
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
6708
|
+
if (!("url" in value) || value["url"] === void 0) return false;
|
|
6709
|
+
return true;
|
|
6710
|
+
}
|
|
6711
|
+
function InvoiceLinkFromJSON(json) {
|
|
6712
|
+
return InvoiceLinkFromJSONTyped(json, false);
|
|
6713
|
+
}
|
|
6714
|
+
function InvoiceLinkFromJSONTyped(json, ignoreDiscriminator) {
|
|
6715
|
+
if (json == null) {
|
|
6716
|
+
return json;
|
|
6717
|
+
}
|
|
6718
|
+
return {
|
|
6719
|
+
id: json["id"],
|
|
6720
|
+
url: json["url"]
|
|
6721
|
+
};
|
|
6722
|
+
}
|
|
6723
|
+
function InvoiceLinkToJSON(json) {
|
|
6724
|
+
return InvoiceLinkToJSONTyped(json, false);
|
|
6725
|
+
}
|
|
6726
|
+
function InvoiceLinkToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6727
|
+
if (value == null) {
|
|
6728
|
+
return value;
|
|
6729
|
+
}
|
|
6730
|
+
return {
|
|
6731
|
+
id: value["id"],
|
|
6732
|
+
url: value["url"]
|
|
6733
|
+
};
|
|
6734
|
+
}
|
|
6735
|
+
function instanceOfGetInvoiceLinkResponse(value) {
|
|
6736
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
6737
|
+
if (!("params" in value) || value["params"] === void 0) return false;
|
|
6738
|
+
return true;
|
|
6739
|
+
}
|
|
6740
|
+
function GetInvoiceLinkResponseFromJSON(json) {
|
|
6741
|
+
return GetInvoiceLinkResponseFromJSONTyped(json, false);
|
|
6742
|
+
}
|
|
6743
|
+
function GetInvoiceLinkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
6744
|
+
if (json == null) {
|
|
6745
|
+
return json;
|
|
6746
|
+
}
|
|
6747
|
+
return {
|
|
6748
|
+
data: InvoiceLinkFromJSON(json["data"]),
|
|
6749
|
+
params: json["params"]
|
|
6750
|
+
};
|
|
6751
|
+
}
|
|
6752
|
+
function GetInvoiceLinkResponseToJSON(json) {
|
|
6753
|
+
return GetInvoiceLinkResponseToJSONTyped(json, false);
|
|
6754
|
+
}
|
|
6755
|
+
function GetInvoiceLinkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6756
|
+
if (value == null) {
|
|
6757
|
+
return value;
|
|
6758
|
+
}
|
|
6759
|
+
return {
|
|
6760
|
+
data: InvoiceLinkToJSON(value["data"]),
|
|
6761
|
+
params: value["params"]
|
|
6762
|
+
};
|
|
6763
|
+
}
|
|
6636
6764
|
function instanceOfPublicCatalogResponseData(value) {
|
|
6637
6765
|
if (!("addOns" in value) || value["addOns"] === void 0) return false;
|
|
6638
6766
|
if (!("capabilities" in value) || value["capabilities"] === void 0)
|
|
@@ -7925,6 +8053,10 @@ var SchematicBillingClient = class {
|
|
|
7925
8053
|
return { invoices: decoded.invoices, count: decoded.count };
|
|
7926
8054
|
});
|
|
7927
8055
|
}
|
|
8056
|
+
fetchInvoiceLink(id) {
|
|
8057
|
+
const path = `/components/invoices/${encodeURIComponent(id)}/link`;
|
|
8058
|
+
return this.session.request(path).then((body) => InvoiceLinkFromJSON(dataOf(body, path)).url);
|
|
8059
|
+
}
|
|
7928
8060
|
fetchUpcomingInvoice() {
|
|
7929
8061
|
const path = "/company/upcoming-invoice";
|
|
7930
8062
|
return this.session.request(path, { noContentOn: [204] }).then((body) => {
|
|
@@ -10650,6 +10782,13 @@ var BillingStore = class {
|
|
|
10650
10782
|
const taxIds = await this._client.updateTaxId(taxId);
|
|
10651
10783
|
this.taxIds.seed(SINGLETON, taxIds);
|
|
10652
10784
|
}
|
|
10785
|
+
/**
|
|
10786
|
+
* The current hosted URL for invoice `id`, which the listed `url` can
|
|
10787
|
+
* outlive. A pass-through: the answer is for one click, not to keep.
|
|
10788
|
+
*/
|
|
10789
|
+
fetchInvoiceLink(id) {
|
|
10790
|
+
return this._client.fetchInvoiceLink?.(id) ?? Promise.reject(new Error("The billing client cannot read invoice links."));
|
|
10791
|
+
}
|
|
10653
10792
|
/**
|
|
10654
10793
|
* The checkout calls pass straight through: a checkout in progress is one
|
|
10655
10794
|
* reader's cart, not a resource to share, and `useCheckout` holds it.
|
|
@@ -10794,6 +10933,7 @@ var ACTION_NAMES = [
|
|
|
10794
10933
|
"setDefaultPaymentMethod",
|
|
10795
10934
|
"removePaymentMethod",
|
|
10796
10935
|
"createSetupIntent",
|
|
10936
|
+
"fetchInvoiceLink",
|
|
10797
10937
|
"unsubscribe",
|
|
10798
10938
|
"updateTaxId",
|
|
10799
10939
|
"createCheckout",
|
|
@@ -11010,7 +11150,14 @@ function useInvoices(query = DEFAULT_INVOICE_QUERY) {
|
|
|
11010
11150
|
() => source.loadMoreInvoices(params),
|
|
11011
11151
|
[params, source]
|
|
11012
11152
|
);
|
|
11013
|
-
|
|
11153
|
+
const fetchLink = useCallback(
|
|
11154
|
+
(id) => actionsOf(source).fetchInvoiceLink(id),
|
|
11155
|
+
[source]
|
|
11156
|
+
);
|
|
11157
|
+
return useMemo3(
|
|
11158
|
+
() => ({ ...handle, loadMore, fetchLink }),
|
|
11159
|
+
[handle, loadMore, fetchLink]
|
|
11160
|
+
);
|
|
11014
11161
|
}
|
|
11015
11162
|
function useUpcomingInvoice() {
|
|
11016
11163
|
return useBillingResource("upcomingInvoice", SINGLETON);
|
|
@@ -11277,6 +11424,7 @@ function BillingProvider({
|
|
|
11277
11424
|
setDefaultPaymentMethod: (externalId) => store.setDefaultPaymentMethod(externalId),
|
|
11278
11425
|
removePaymentMethod: (id) => store.removePaymentMethod(id),
|
|
11279
11426
|
createSetupIntent: () => store.createSetupIntent(),
|
|
11427
|
+
fetchInvoiceLink: (id) => store.fetchInvoiceLink(id),
|
|
11280
11428
|
unsubscribe: () => store.unsubscribe(),
|
|
11281
11429
|
updateTaxId: (taxId) => store.updateTaxId(taxId),
|
|
11282
11430
|
createCheckout: (selections) => store.createCheckout(selections),
|
|
@@ -11352,7 +11500,7 @@ function staticSource(data) {
|
|
|
11352
11500
|
}
|
|
11353
11501
|
|
|
11354
11502
|
// src/version.ts
|
|
11355
|
-
var version2 = "1.
|
|
11503
|
+
var version2 = "1.18.0";
|
|
11356
11504
|
|
|
11357
11505
|
// src/context/schematic.tsx
|
|
11358
11506
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematichq/schematic-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"main": "dist/schematic-react.cjs.js",
|
|
5
5
|
"module": "dist/schematic-react.esm.js",
|
|
6
6
|
"types": "dist/schematic-react.d.ts",
|
|
@@ -33,28 +33,28 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@eslint/js": "^10.0.1",
|
|
36
|
-
"@microsoft/api-extractor": "^7.
|
|
37
|
-
"@schematichq/schematic-js": "^1.
|
|
36
|
+
"@microsoft/api-extractor": "^7.60.1",
|
|
37
|
+
"@schematichq/schematic-js": "^1.18.0",
|
|
38
38
|
"@testing-library/dom": "^10.4.2",
|
|
39
39
|
"@testing-library/jest-dom": "^7.0.1",
|
|
40
40
|
"@testing-library/react": "^16.3.3",
|
|
41
41
|
"@types/react": "^19.3.0",
|
|
42
|
-
"@vitest/browser": "^5.0
|
|
42
|
+
"@vitest/browser": "^5.1.0",
|
|
43
43
|
"esbuild": "^0.28.2",
|
|
44
|
-
"eslint": "^10.
|
|
44
|
+
"eslint": "^10.14.0",
|
|
45
45
|
"eslint-plugin-import": "^2.32.0",
|
|
46
46
|
"eslint-plugin-react": "^7.37.5",
|
|
47
47
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
48
|
-
"globals": "^17.
|
|
48
|
+
"globals": "^17.14.0",
|
|
49
49
|
"happy-dom": "^21.0.4",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
|
-
"jsdom": "^
|
|
52
|
-
"prettier": "^3.9.
|
|
53
|
-
"react": "^19.3.
|
|
54
|
-
"react-dom": "^19.3.
|
|
51
|
+
"jsdom": "^31.0.0",
|
|
52
|
+
"prettier": "^3.9.10",
|
|
53
|
+
"react": "^19.3.1",
|
|
54
|
+
"react-dom": "^19.3.1",
|
|
55
55
|
"typescript": "^6.0.3",
|
|
56
|
-
"typescript-eslint": "^8.
|
|
57
|
-
"vitest": "^5.0
|
|
56
|
+
"typescript-eslint": "^8.72.1",
|
|
57
|
+
"vitest": "^5.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">=18"
|