@shipengine/react-api 1.11.4 → 1.11.5
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.
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { SE } from "@shipengine/js-api";
|
|
2
|
+
type AddFundsData = {
|
|
3
|
+
fundingSourceId: string;
|
|
4
|
+
funds: SE.Money;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* @category ShipEngine API Hooks
|
|
4
8
|
*
|
|
5
9
|
* @see [ShipEngine API Reference](https://auctane.atlassian.net/wiki/spaces/~6272e3473d0b58006947a648/pages/3628370266/ShipEngine+Funding+Sources+API#PUT-v1/funding_sources/%7Bfunding_source_id%7D/add_funds)
|
|
6
10
|
*/
|
|
7
|
-
export declare const useFundingSourcesAddFunds: (
|
|
11
|
+
export declare const useFundingSourcesAddFunds: () => import("@tanstack/react-query").UseMutationResult<SE.AddFundsResponse, SE.CodedError[], AddFundsData, unknown>;
|
|
12
|
+
export {};
|
package/index.js
CHANGED
|
@@ -633,10 +633,10 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
633
633
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
634
634
|
});
|
|
635
635
|
};
|
|
636
|
-
const useFundingSourcesAddFunds = (
|
|
636
|
+
const useFundingSourcesAddFunds = () => {
|
|
637
637
|
const { client } = useShipEngine();
|
|
638
638
|
return reactQuery.useMutation({
|
|
639
|
-
mutationFn: (
|
|
639
|
+
mutationFn: (_0) => __async$m(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
640
640
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
641
641
|
return result.data;
|
|
642
642
|
}),
|
package/index.mjs
CHANGED
|
@@ -630,10 +630,10 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
630
630
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
631
631
|
});
|
|
632
632
|
};
|
|
633
|
-
const useFundingSourcesAddFunds = (
|
|
633
|
+
const useFundingSourcesAddFunds = () => {
|
|
634
634
|
const { client } = useShipEngine();
|
|
635
635
|
return useMutation({
|
|
636
|
-
mutationFn: (
|
|
636
|
+
mutationFn: (_0) => __async$m(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
637
637
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
638
638
|
return result.data;
|
|
639
639
|
}),
|