@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.
@@ -82,7 +82,7 @@ __export(index_exports, {
82
82
  });
83
83
  module.exports = __toCommonJS(index_exports);
84
84
 
85
- // node_modules/.pnpm/@schematichq+schematic-js@1.16.1/node_modules/@schematichq/schematic-js/dist/schematic.esm.js
85
+ // node_modules/.pnpm/@schematichq+schematic-js@1.18.0/node_modules/@schematichq/schematic-js/dist/schematic.esm.js
86
86
  var __create2 = Object.create;
87
87
  var __defProp2 = Object.defineProperty;
88
88
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -1413,7 +1413,7 @@ var ContextSignatureManager = class {
1413
1413
  }
1414
1414
  }
1415
1415
  };
1416
- var version = "1.16.1";
1416
+ var version = "1.18.0";
1417
1417
  var DEFAULT_CATALOG_QUERY = {};
1418
1418
  function normalizeCatalogQuery(query) {
1419
1419
  return query.catalogId === void 0 ? {} : { catalogId: query.catalogId };
@@ -1474,6 +1474,11 @@ __export2(models_exports, {
1474
1474
  BillingStrategyFromJSONTyped: () => BillingStrategyFromJSONTyped5,
1475
1475
  BillingStrategyToJSON: () => BillingStrategyToJSON2,
1476
1476
  BillingStrategyToJSONTyped: () => BillingStrategyToJSONTyped5,
1477
+ BillingSubscriptionPauseBehavior: () => BillingSubscriptionPauseBehavior,
1478
+ BillingSubscriptionPauseBehaviorFromJSON: () => BillingSubscriptionPauseBehaviorFromJSON,
1479
+ BillingSubscriptionPauseBehaviorFromJSONTyped: () => BillingSubscriptionPauseBehaviorFromJSONTyped,
1480
+ BillingSubscriptionPauseBehaviorToJSON: () => BillingSubscriptionPauseBehaviorToJSON,
1481
+ BillingSubscriptionPauseBehaviorToJSONTyped: () => BillingSubscriptionPauseBehaviorToJSONTyped,
1477
1482
  BillingSubscriptionTrialEndSetting: () => BillingSubscriptionTrialEndSetting,
1478
1483
  BillingSubscriptionTrialEndSettingFromJSON: () => BillingSubscriptionTrialEndSettingFromJSON,
1479
1484
  BillingSubscriptionTrialEndSettingFromJSONTyped: () => BillingSubscriptionTrialEndSettingFromJSONTyped,
@@ -1521,9 +1526,9 @@ __export2(models_exports, {
1521
1526
  CatalogCurrencyPricesResponseDataToJSON: () => CatalogCurrencyPricesResponseDataToJSON2,
1522
1527
  CatalogCurrencyPricesResponseDataToJSONTyped: () => CatalogCurrencyPricesResponseDataToJSONTyped4,
1523
1528
  CatalogCustomPlanCTAResponseDataFromJSON: () => CatalogCustomPlanCTAResponseDataFromJSON2,
1524
- CatalogCustomPlanCTAResponseDataFromJSONTyped: () => CatalogCustomPlanCTAResponseDataFromJSONTyped3,
1529
+ CatalogCustomPlanCTAResponseDataFromJSONTyped: () => CatalogCustomPlanCTAResponseDataFromJSONTyped4,
1525
1530
  CatalogCustomPlanCTAResponseDataToJSON: () => CatalogCustomPlanCTAResponseDataToJSON2,
1526
- CatalogCustomPlanCTAResponseDataToJSONTyped: () => CatalogCustomPlanCTAResponseDataToJSONTyped3,
1531
+ CatalogCustomPlanCTAResponseDataToJSONTyped: () => CatalogCustomPlanCTAResponseDataToJSONTyped4,
1527
1532
  CatalogPlanEntitlementResponseDataFromJSON: () => CatalogPlanEntitlementResponseDataFromJSON2,
1528
1533
  CatalogPlanEntitlementResponseDataFromJSONTyped: () => CatalogPlanEntitlementResponseDataFromJSONTyped2,
1529
1534
  CatalogPlanEntitlementResponseDataToJSON: () => CatalogPlanEntitlementResponseDataToJSON2,
@@ -1842,6 +1847,10 @@ __export2(models_exports, {
1842
1847
  GetCompanyUpcomingInvoiceResponseFromJSONTyped: () => GetCompanyUpcomingInvoiceResponseFromJSONTyped,
1843
1848
  GetCompanyUpcomingInvoiceResponseToJSON: () => GetCompanyUpcomingInvoiceResponseToJSON,
1844
1849
  GetCompanyUpcomingInvoiceResponseToJSONTyped: () => GetCompanyUpcomingInvoiceResponseToJSONTyped,
1850
+ GetInvoiceLinkResponseFromJSON: () => GetInvoiceLinkResponseFromJSON,
1851
+ GetInvoiceLinkResponseFromJSONTyped: () => GetInvoiceLinkResponseFromJSONTyped,
1852
+ GetInvoiceLinkResponseToJSON: () => GetInvoiceLinkResponseToJSON,
1853
+ GetInvoiceLinkResponseToJSONTyped: () => GetInvoiceLinkResponseToJSONTyped,
1845
1854
  GetPublicCatalogByIDResponseFromJSON: () => GetPublicCatalogByIDResponseFromJSON,
1846
1855
  GetPublicCatalogByIDResponseFromJSONTyped: () => GetPublicCatalogByIDResponseFromJSONTyped,
1847
1856
  GetPublicCatalogByIDResponseToJSON: () => GetPublicCatalogByIDResponseToJSON,
@@ -1850,6 +1859,10 @@ __export2(models_exports, {
1850
1859
  GetPublicCatalogResponseFromJSONTyped: () => GetPublicCatalogResponseFromJSONTyped,
1851
1860
  GetPublicCatalogResponseToJSON: () => GetPublicCatalogResponseToJSON,
1852
1861
  GetPublicCatalogResponseToJSONTyped: () => GetPublicCatalogResponseToJSONTyped,
1862
+ InvoiceLinkFromJSON: () => InvoiceLinkFromJSON,
1863
+ InvoiceLinkFromJSONTyped: () => InvoiceLinkFromJSONTyped,
1864
+ InvoiceLinkToJSON: () => InvoiceLinkToJSON,
1865
+ InvoiceLinkToJSONTyped: () => InvoiceLinkToJSONTyped,
1853
1866
  InvoiceStatus: () => InvoiceStatus,
1854
1867
  InvoiceStatusFromJSON: () => InvoiceStatusFromJSON,
1855
1868
  InvoiceStatusFromJSONTyped: () => InvoiceStatusFromJSONTyped,
@@ -1974,6 +1987,7 @@ __export2(models_exports, {
1974
1987
  instanceOfBillingProductPriceInterval: () => instanceOfBillingProductPriceInterval,
1975
1988
  instanceOfBillingProviderType: () => instanceOfBillingProviderType,
1976
1989
  instanceOfBillingStrategy: () => instanceOfBillingStrategy,
1990
+ instanceOfBillingSubscriptionPauseBehavior: () => instanceOfBillingSubscriptionPauseBehavior,
1977
1991
  instanceOfBillingSubscriptionTrialEndSetting: () => instanceOfBillingSubscriptionTrialEndSetting,
1978
1992
  instanceOfBillingTiersMode: () => instanceOfBillingTiersMode,
1979
1993
  instanceOfCatalogAutoTopupResponseData: () => instanceOfCatalogAutoTopupResponseData,
@@ -2062,8 +2076,10 @@ __export2(models_exports, {
2062
2076
  instanceOfGetCompanyPaymentMethodsResponse: () => instanceOfGetCompanyPaymentMethodsResponse,
2063
2077
  instanceOfGetCompanyResponse: () => instanceOfGetCompanyResponse,
2064
2078
  instanceOfGetCompanyUpcomingInvoiceResponse: () => instanceOfGetCompanyUpcomingInvoiceResponse,
2079
+ instanceOfGetInvoiceLinkResponse: () => instanceOfGetInvoiceLinkResponse,
2065
2080
  instanceOfGetPublicCatalogByIDResponse: () => instanceOfGetPublicCatalogByIDResponse,
2066
2081
  instanceOfGetPublicCatalogResponse: () => instanceOfGetPublicCatalogResponse,
2082
+ instanceOfInvoiceLink: () => instanceOfInvoiceLink,
2067
2083
  instanceOfInvoiceStatus: () => instanceOfInvoiceStatus,
2068
2084
  instanceOfListCheckoutsParams: () => instanceOfListCheckoutsParams,
2069
2085
  instanceOfListCheckoutsResponse: () => instanceOfListCheckoutsResponse,
@@ -2402,6 +2418,36 @@ function BillingStrategyToJSON2(value) {
2402
2418
  function BillingStrategyToJSONTyped5(value, ignoreDiscriminator) {
2403
2419
  return value;
2404
2420
  }
2421
+ var BillingSubscriptionPauseBehavior = {
2422
+ KeepAsDraft: "keep_as_draft",
2423
+ MarkUncollectible: "mark_uncollectible",
2424
+ Void: "void"
2425
+ };
2426
+ function instanceOfBillingSubscriptionPauseBehavior(value) {
2427
+ for (const key in BillingSubscriptionPauseBehavior) {
2428
+ if (Object.prototype.hasOwnProperty.call(
2429
+ BillingSubscriptionPauseBehavior,
2430
+ key
2431
+ )) {
2432
+ if (BillingSubscriptionPauseBehavior[key] === value) {
2433
+ return true;
2434
+ }
2435
+ }
2436
+ }
2437
+ return false;
2438
+ }
2439
+ function BillingSubscriptionPauseBehaviorFromJSON(json) {
2440
+ return BillingSubscriptionPauseBehaviorFromJSONTyped(json, false);
2441
+ }
2442
+ function BillingSubscriptionPauseBehaviorFromJSONTyped(json, ignoreDiscriminator) {
2443
+ return json;
2444
+ }
2445
+ function BillingSubscriptionPauseBehaviorToJSON(value) {
2446
+ return value;
2447
+ }
2448
+ function BillingSubscriptionPauseBehaviorToJSONTyped(value, ignoreDiscriminator) {
2449
+ return value;
2450
+ }
2405
2451
  var BillingSubscriptionTrialEndSetting = {
2406
2452
  Cancel: "cancel",
2407
2453
  Subscribe: "subscribe"
@@ -3042,6 +3088,35 @@ function CatalogUsageViolationResponseDataToJSONTyped(value, ignoreDiscriminator
3042
3088
  usage: value["usage"]
3043
3089
  };
3044
3090
  }
3091
+ function instanceOfCatalogCustomPlanCTAResponseData(value) {
3092
+ return true;
3093
+ }
3094
+ function CatalogCustomPlanCTAResponseDataFromJSON2(json) {
3095
+ return CatalogCustomPlanCTAResponseDataFromJSONTyped4(json, false);
3096
+ }
3097
+ function CatalogCustomPlanCTAResponseDataFromJSONTyped4(json, ignoreDiscriminator) {
3098
+ if (json == null) {
3099
+ return json;
3100
+ }
3101
+ return {
3102
+ ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
3103
+ ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
3104
+ priceText: json["price_text"] == null ? void 0 : json["price_text"]
3105
+ };
3106
+ }
3107
+ function CatalogCustomPlanCTAResponseDataToJSON2(json) {
3108
+ return CatalogCustomPlanCTAResponseDataToJSONTyped4(json, false);
3109
+ }
3110
+ function CatalogCustomPlanCTAResponseDataToJSONTyped4(value, ignoreDiscriminator = false) {
3111
+ if (value == null) {
3112
+ return value;
3113
+ }
3114
+ return {
3115
+ cta_text: value["ctaText"],
3116
+ cta_url: value["ctaUrl"],
3117
+ price_text: value["priceText"]
3118
+ };
3119
+ }
3045
3120
  var EntitlementValueType = {
3046
3121
  Boolean: "boolean",
3047
3122
  Credit: "credit",
@@ -3475,6 +3550,7 @@ function instanceOfCatalogCompanyPlanResponseData(value) {
3475
3550
  if (!("currencyPrices" in value) || value["currencyPrices"] === void 0)
3476
3551
  return false;
3477
3552
  if (!("current" in value) || value["current"] === void 0) return false;
3553
+ if (!("custom" in value) || value["custom"] === void 0) return false;
3478
3554
  if (!("description" in value) || value["description"] === void 0)
3479
3555
  return false;
3480
3556
  if (!("entitlements" in value) || value["entitlements"] === void 0)
@@ -3513,6 +3589,8 @@ function CatalogCompanyPlanResponseDataFromJSONTyped(json, ignoreDiscriminator)
3513
3589
  CatalogCurrencyPricesResponseDataFromJSON2
3514
3590
  ),
3515
3591
  current: json["current"],
3592
+ custom: json["custom"],
3593
+ customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON2(json["custom_plan_cta"]),
3516
3594
  description: json["description"],
3517
3595
  entitlements: json["entitlements"].map(
3518
3596
  CatalogPlanEntitlementResponseDataFromJSON2
@@ -3558,6 +3636,10 @@ function CatalogCompanyPlanResponseDataToJSONTyped(value, ignoreDiscriminator =
3558
3636
  CatalogCurrencyPricesResponseDataToJSON2
3559
3637
  ),
3560
3638
  current: value["current"],
3639
+ custom: value["custom"],
3640
+ custom_plan_cta: CatalogCustomPlanCTAResponseDataToJSON2(
3641
+ value["customPlanCta"]
3642
+ ),
3561
3643
  description: value["description"],
3562
3644
  entitlements: value["entitlements"].map(
3563
3645
  CatalogPlanEntitlementResponseDataToJSON2
@@ -3653,35 +3735,6 @@ function CatalogCreditBundleResponseDataToJSONTyped2(value, ignoreDiscriminator
3653
3735
  unit_price: CatalogPriceResponseDataToJSON2(value["unitPrice"])
3654
3736
  };
3655
3737
  }
3656
- function instanceOfCatalogCustomPlanCTAResponseData(value) {
3657
- return true;
3658
- }
3659
- function CatalogCustomPlanCTAResponseDataFromJSON2(json) {
3660
- return CatalogCustomPlanCTAResponseDataFromJSONTyped3(json, false);
3661
- }
3662
- function CatalogCustomPlanCTAResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
3663
- if (json == null) {
3664
- return json;
3665
- }
3666
- return {
3667
- ctaText: json["cta_text"] == null ? void 0 : json["cta_text"],
3668
- ctaUrl: json["cta_url"] == null ? void 0 : json["cta_url"],
3669
- priceText: json["price_text"] == null ? void 0 : json["price_text"]
3670
- };
3671
- }
3672
- function CatalogCustomPlanCTAResponseDataToJSON2(json) {
3673
- return CatalogCustomPlanCTAResponseDataToJSONTyped3(json, false);
3674
- }
3675
- function CatalogCustomPlanCTAResponseDataToJSONTyped3(value, ignoreDiscriminator = false) {
3676
- if (value == null) {
3677
- return value;
3678
- }
3679
- return {
3680
- cta_text: value["ctaText"],
3681
- cta_url: value["ctaUrl"],
3682
- price_text: value["priceText"]
3683
- };
3684
- }
3685
3738
  function instanceOfCatalogPlanRefResponseData(value) {
3686
3739
  if (!("id" in value) || value["id"] === void 0) return false;
3687
3740
  if (!("name" in value) || value["name"] === void 0) return false;
@@ -3720,6 +3773,7 @@ function instanceOfCatalogPlanResponseData(value) {
3720
3773
  return false;
3721
3774
  if (!("currencyPrices" in value) || value["currencyPrices"] === void 0)
3722
3775
  return false;
3776
+ if (!("custom" in value) || value["custom"] === void 0) return false;
3723
3777
  if (!("description" in value) || value["description"] === void 0)
3724
3778
  return false;
3725
3779
  if (!("entitlements" in value) || value["entitlements"] === void 0)
@@ -3750,6 +3804,8 @@ function CatalogPlanResponseDataFromJSONTyped2(json, ignoreDiscriminator) {
3750
3804
  currencyPrices: json["currency_prices"].map(
3751
3805
  CatalogCurrencyPricesResponseDataFromJSON2
3752
3806
  ),
3807
+ custom: json["custom"],
3808
+ customPlanCta: json["custom_plan_cta"] == null ? void 0 : CatalogCustomPlanCTAResponseDataFromJSON2(json["custom_plan_cta"]),
3753
3809
  description: json["description"],
3754
3810
  entitlements: json["entitlements"].map(
3755
3811
  CatalogPlanEntitlementResponseDataFromJSON2
@@ -3785,6 +3841,10 @@ function CatalogPlanResponseDataToJSONTyped2(value, ignoreDiscriminator = false)
3785
3841
  currency_prices: value["currencyPrices"].map(
3786
3842
  CatalogCurrencyPricesResponseDataToJSON2
3787
3843
  ),
3844
+ custom: value["custom"],
3845
+ custom_plan_cta: CatalogCustomPlanCTAResponseDataToJSON2(
3846
+ value["customPlanCta"]
3847
+ ),
3788
3848
  description: value["description"],
3789
3849
  entitlements: value["entitlements"].map(
3790
3850
  CatalogPlanEntitlementResponseDataToJSON2
@@ -4649,6 +4709,7 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4649
4709
  return json;
4650
4710
  }
4651
4711
  return {
4712
+ accessRevokedAt: json["access_revoked_at"] == null ? void 0 : new Date(json["access_revoked_at"]),
4652
4713
  applicationId: json["application_id"] == null ? void 0 : json["application_id"],
4653
4714
  cancelAt: json["cancel_at"] == null ? void 0 : json["cancel_at"],
4654
4715
  cancelAtPeriodEnd: json["cancel_at_period_end"],
@@ -4663,6 +4724,9 @@ function CheckoutResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4663
4724
  id: json["id"],
4664
4725
  interval: json["interval"],
4665
4726
  metadata: json["metadata"] == null ? void 0 : json["metadata"],
4727
+ pauseBehavior: json["pause_behavior"] == null ? void 0 : BillingSubscriptionPauseBehaviorFromJSON(json["pause_behavior"]),
4728
+ pauseResumesAt: json["pause_resumes_at"] == null ? void 0 : json["pause_resumes_at"],
4729
+ pausedAt: json["paused_at"] == null ? void 0 : new Date(json["paused_at"]),
4666
4730
  periodEnd: json["period_end"],
4667
4731
  periodStart: json["period_start"],
4668
4732
  providerType: BillingProviderTypeFromJSON2(json["provider_type"]),
@@ -4685,6 +4749,7 @@ function CheckoutResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
4685
4749
  return value;
4686
4750
  }
4687
4751
  return {
4752
+ access_revoked_at: value["accessRevokedAt"] == null ? void 0 : value["accessRevokedAt"].toISOString(),
4688
4753
  application_id: value["applicationId"],
4689
4754
  cancel_at: value["cancelAt"],
4690
4755
  cancel_at_period_end: value["cancelAtPeriodEnd"],
@@ -4699,6 +4764,11 @@ function CheckoutResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
4699
4764
  id: value["id"],
4700
4765
  interval: value["interval"],
4701
4766
  metadata: value["metadata"],
4767
+ pause_behavior: BillingSubscriptionPauseBehaviorToJSON(
4768
+ value["pauseBehavior"]
4769
+ ),
4770
+ pause_resumes_at: value["pauseResumesAt"],
4771
+ paused_at: value["pausedAt"] == null ? void 0 : value["pausedAt"].toISOString(),
4702
4772
  period_end: value["periodEnd"],
4703
4773
  period_start: value["periodStart"],
4704
4774
  provider_type: BillingProviderTypeToJSON2(value["providerType"]),
@@ -6717,6 +6787,64 @@ function GetCompanyUpcomingInvoiceResponseToJSONTyped(value, ignoreDiscriminator
6717
6787
  params: value["params"]
6718
6788
  };
6719
6789
  }
6790
+ function instanceOfInvoiceLink(value) {
6791
+ if (!("id" in value) || value["id"] === void 0) return false;
6792
+ if (!("url" in value) || value["url"] === void 0) return false;
6793
+ return true;
6794
+ }
6795
+ function InvoiceLinkFromJSON(json) {
6796
+ return InvoiceLinkFromJSONTyped(json, false);
6797
+ }
6798
+ function InvoiceLinkFromJSONTyped(json, ignoreDiscriminator) {
6799
+ if (json == null) {
6800
+ return json;
6801
+ }
6802
+ return {
6803
+ id: json["id"],
6804
+ url: json["url"]
6805
+ };
6806
+ }
6807
+ function InvoiceLinkToJSON(json) {
6808
+ return InvoiceLinkToJSONTyped(json, false);
6809
+ }
6810
+ function InvoiceLinkToJSONTyped(value, ignoreDiscriminator = false) {
6811
+ if (value == null) {
6812
+ return value;
6813
+ }
6814
+ return {
6815
+ id: value["id"],
6816
+ url: value["url"]
6817
+ };
6818
+ }
6819
+ function instanceOfGetInvoiceLinkResponse(value) {
6820
+ if (!("data" in value) || value["data"] === void 0) return false;
6821
+ if (!("params" in value) || value["params"] === void 0) return false;
6822
+ return true;
6823
+ }
6824
+ function GetInvoiceLinkResponseFromJSON(json) {
6825
+ return GetInvoiceLinkResponseFromJSONTyped(json, false);
6826
+ }
6827
+ function GetInvoiceLinkResponseFromJSONTyped(json, ignoreDiscriminator) {
6828
+ if (json == null) {
6829
+ return json;
6830
+ }
6831
+ return {
6832
+ data: InvoiceLinkFromJSON(json["data"]),
6833
+ params: json["params"]
6834
+ };
6835
+ }
6836
+ function GetInvoiceLinkResponseToJSON(json) {
6837
+ return GetInvoiceLinkResponseToJSONTyped(json, false);
6838
+ }
6839
+ function GetInvoiceLinkResponseToJSONTyped(value, ignoreDiscriminator = false) {
6840
+ if (value == null) {
6841
+ return value;
6842
+ }
6843
+ return {
6844
+ data: InvoiceLinkToJSON(value["data"]),
6845
+ params: value["params"]
6846
+ };
6847
+ }
6720
6848
  function instanceOfPublicCatalogResponseData(value) {
6721
6849
  if (!("addOns" in value) || value["addOns"] === void 0) return false;
6722
6850
  if (!("capabilities" in value) || value["capabilities"] === void 0)
@@ -8009,6 +8137,10 @@ var SchematicBillingClient = class {
8009
8137
  return { invoices: decoded.invoices, count: decoded.count };
8010
8138
  });
8011
8139
  }
8140
+ fetchInvoiceLink(id) {
8141
+ const path = `/components/invoices/${encodeURIComponent(id)}/link`;
8142
+ return this.session.request(path).then((body) => InvoiceLinkFromJSON(dataOf(body, path)).url);
8143
+ }
8012
8144
  fetchUpcomingInvoice() {
8013
8145
  const path = "/company/upcoming-invoice";
8014
8146
  return this.session.request(path, { noContentOn: [204] }).then((body) => {
@@ -10734,6 +10866,13 @@ var BillingStore = class {
10734
10866
  const taxIds = await this._client.updateTaxId(taxId);
10735
10867
  this.taxIds.seed(SINGLETON, taxIds);
10736
10868
  }
10869
+ /**
10870
+ * The current hosted URL for invoice `id`, which the listed `url` can
10871
+ * outlive. A pass-through: the answer is for one click, not to keep.
10872
+ */
10873
+ fetchInvoiceLink(id) {
10874
+ return this._client.fetchInvoiceLink?.(id) ?? Promise.reject(new Error("The billing client cannot read invoice links."));
10875
+ }
10737
10876
  /**
10738
10877
  * The checkout calls pass straight through: a checkout in progress is one
10739
10878
  * reader's cart, not a resource to share, and `useCheckout` holds it.
@@ -10878,6 +11017,7 @@ var ACTION_NAMES = [
10878
11017
  "setDefaultPaymentMethod",
10879
11018
  "removePaymentMethod",
10880
11019
  "createSetupIntent",
11020
+ "fetchInvoiceLink",
10881
11021
  "unsubscribe",
10882
11022
  "updateTaxId",
10883
11023
  "createCheckout",
@@ -11087,7 +11227,14 @@ function useInvoices(query = DEFAULT_INVOICE_QUERY) {
11087
11227
  () => source.loadMoreInvoices(params),
11088
11228
  [params, source]
11089
11229
  );
11090
- return (0, import_react3.useMemo)(() => ({ ...handle, loadMore }), [handle, loadMore]);
11230
+ const fetchLink = (0, import_react3.useCallback)(
11231
+ (id) => actionsOf(source).fetchInvoiceLink(id),
11232
+ [source]
11233
+ );
11234
+ return (0, import_react3.useMemo)(
11235
+ () => ({ ...handle, loadMore, fetchLink }),
11236
+ [handle, loadMore, fetchLink]
11237
+ );
11091
11238
  }
11092
11239
  function useUpcomingInvoice() {
11093
11240
  return useBillingResource("upcomingInvoice", SINGLETON);
@@ -11354,6 +11501,7 @@ function BillingProvider({
11354
11501
  setDefaultPaymentMethod: (externalId) => store.setDefaultPaymentMethod(externalId),
11355
11502
  removePaymentMethod: (id) => store.removePaymentMethod(id),
11356
11503
  createSetupIntent: () => store.createSetupIntent(),
11504
+ fetchInvoiceLink: (id) => store.fetchInvoiceLink(id),
11357
11505
  unsubscribe: () => store.unsubscribe(),
11358
11506
  updateTaxId: (taxId) => store.updateTaxId(taxId),
11359
11507
  createCheckout: (selections) => store.createCheckout(selections),
@@ -11429,7 +11577,7 @@ function staticSource(data) {
11429
11577
  }
11430
11578
 
11431
11579
  // src/version.ts
11432
- var version2 = "1.16.1";
11580
+ var version2 = "1.18.0";
11433
11581
 
11434
11582
  // src/context/schematic.tsx
11435
11583
  var import_jsx_runtime4 = require("react/jsx-runtime");