@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.
@@ -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: (carrierId: string) => import("@tanstack/react-query").UseMutationResult<{
12
+ export declare const useAddFunds: () => import("@tanstack/react-query").UseMutationResult<{
9
13
  balance: SE.Money;
10
- }, SE.CodedError[], SE.Money, unknown>;
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 = (carrierId) => {
243
+ const useAddFunds = () => {
244
244
  const { client } = useShipEngine();
245
245
  return reactQuery.useMutation({
246
- mutationFn: (funds) => __async$n(void 0, null, function* () {
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 = (carrierId) => {
240
+ const useAddFunds = () => {
241
241
  const { client } = useShipEngine();
242
242
  return useMutation({
243
- mutationFn: (funds) => __async$n(void 0, null, function* () {
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
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/react-api",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {