@shipengine/react-api 1.5.1 → 1.6.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.
@@ -5,3 +5,4 @@ export * from "./use-list-funding-sources";
5
5
  export * from "./use-register-carrier";
6
6
  export * from "./use-update-funding-source";
7
7
  export * from "./use-get-funding-source-metadata";
8
+ export * from "./use-get-funding-source-transactions";
@@ -0,0 +1,5 @@
1
+ import { PageableQuery } from "@shipengine/js-api";
2
+ /**
3
+ * @category ShipEngine API Hooks
4
+ */
5
+ export declare const useGetFundingSourceTransactions: (fundingSourceId: string, params?: PageableQuery) => import("@tanstack/react-query").UseQueryResult<import("@shipengine/js-api").FundingSourceTransactionsResponse, import("@shipengine/js-api").CodedError[]>;
package/index.js CHANGED
@@ -641,6 +641,16 @@ const useGetFundingSourceMetadata = () => {
641
641
  });
642
642
  };
643
643
 
644
+ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
645
+ const { client } = useShipEngine();
646
+ return reactQuery.useQuery({
647
+ onError,
648
+ queryFn: () => client.fundingSources.transactions(fundingSourceId, params),
649
+ queryKey: ["useGetFundingSourceTransactions", fundingSourceId],
650
+ select: (result) => result.data
651
+ });
652
+ };
653
+
644
654
  const useGetInsuranceAccount = (insuranceProvider) => {
645
655
  const { client } = useShipEngine();
646
656
  return reactQuery.useQuery({
@@ -1614,6 +1624,7 @@ exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
1614
1624
  exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
1615
1625
  exports.useGetFundingSourceById = useGetFundingSourceById;
1616
1626
  exports.useGetFundingSourceMetadata = useGetFundingSourceMetadata;
1627
+ exports.useGetFundingSourceTransactions = useGetFundingSourceTransactions;
1617
1628
  exports.useGetInsuranceAccount = useGetInsuranceAccount;
1618
1629
  exports.useGetLabel = useGetLabel;
1619
1630
  exports.useGetPackageRatingGroupByCarrier = useGetPackageRatingGroupByCarrier;
package/index.mjs CHANGED
@@ -638,6 +638,16 @@ const useGetFundingSourceMetadata = () => {
638
638
  });
639
639
  };
640
640
 
641
+ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
642
+ const { client } = useShipEngine();
643
+ return useQuery({
644
+ onError,
645
+ queryFn: () => client.fundingSources.transactions(fundingSourceId, params),
646
+ queryKey: ["useGetFundingSourceTransactions", fundingSourceId],
647
+ select: (result) => result.data
648
+ });
649
+ };
650
+
641
651
  const useGetInsuranceAccount = (insuranceProvider) => {
642
652
  const { client } = useShipEngine();
643
653
  return useQuery({
@@ -1582,4 +1592,4 @@ const useGetAccountBillingPlan = () => {
1582
1592
  });
1583
1593
  };
1584
1594
 
1585
- export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDownloadRateCard, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useGetZonesByCarrier, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListShippingRules, useListWarehouses, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
1595
+ export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDownloadRateCard, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useGetZonesByCarrier, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListShippingRules, useListWarehouses, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/react-api",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {