@shipengine/react-api 1.3.0 → 1.3.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.
- package/hooks/carriers/use-add-funds.d.ts +7 -2
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { SE } from "@shipengine/js-api";
|
|
2
|
+
type AddFundsData = {
|
|
3
|
+
carrierId: string;
|
|
4
|
+
funds: SE.Money;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* @category ShipEngine API Hooks
|
|
4
8
|
*
|
|
5
9
|
* @see [ShipEngine Developer Docs](https://www.shipengine.com/docs/carriers/add-funds/)
|
|
6
10
|
* @see [ShipEngine API Reference](https://shipengine.github.io/shipengine-openapi/#operation/add_funds_to_carrier)
|
|
7
11
|
*/
|
|
8
|
-
export declare const useAddFunds: (
|
|
12
|
+
export declare const useAddFunds: () => import("@tanstack/react-query").UseMutationResult<{
|
|
9
13
|
balance: SE.Money;
|
|
10
|
-
}, SE.CodedError[],
|
|
14
|
+
}, SE.CodedError[], AddFundsData, unknown>;
|
|
15
|
+
export {};
|
package/index.js
CHANGED
|
@@ -240,10 +240,10 @@ var __async$n = (__this, __arguments, generator) => {
|
|
|
240
240
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
241
241
|
});
|
|
242
242
|
};
|
|
243
|
-
const useAddFunds = (
|
|
243
|
+
const useAddFunds = () => {
|
|
244
244
|
const { client } = useShipEngine();
|
|
245
245
|
return reactQuery.useMutation({
|
|
246
|
-
mutationFn: (
|
|
246
|
+
mutationFn: (_0) => __async$n(void 0, [_0], function* ({ carrierId, funds }) {
|
|
247
247
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
248
248
|
return result.data;
|
|
249
249
|
}),
|
package/index.mjs
CHANGED
|
@@ -237,10 +237,10 @@ var __async$n = (__this, __arguments, generator) => {
|
|
|
237
237
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
|
-
const useAddFunds = (
|
|
240
|
+
const useAddFunds = () => {
|
|
241
241
|
const { client } = useShipEngine();
|
|
242
242
|
return useMutation({
|
|
243
|
-
mutationFn: (
|
|
243
|
+
mutationFn: (_0) => __async$n(void 0, [_0], function* ({ carrierId, funds }) {
|
|
244
244
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
245
245
|
return result.data;
|
|
246
246
|
}),
|