@shipengine/react-api 0.18.0 → 0.19.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/use-upload-rate-card.d.ts +1 -1
- package/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +1 -1
|
@@ -6,4 +6,4 @@ export type UploadRateCardData = {
|
|
|
6
6
|
* @category ShipEngine API Hooks
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
export declare const useUploadRateCard: () => import("react-query").UseMutationResult<import("
|
|
9
|
+
export declare const useUploadRateCard: () => import("react-query").UseMutationResult<import("@shipengine/js-api").RateCard, import("@shipengine/js-api").CodedError[], UploadRateCardData, unknown>;
|
package/index.js
CHANGED
|
@@ -1337,7 +1337,8 @@ const useUploadRateCard = () => {
|
|
|
1337
1337
|
const { client } = useShipEngine();
|
|
1338
1338
|
return reactQuery.useMutation({
|
|
1339
1339
|
mutationFn: (_0) => __async$2(void 0, [_0], function* ({ rateCardId, file }) {
|
|
1340
|
-
|
|
1340
|
+
const result = yield client.rateCards.upload(rateCardId, file);
|
|
1341
|
+
return result.data;
|
|
1341
1342
|
}),
|
|
1342
1343
|
mutationKey: ["useUploadRateCard"],
|
|
1343
1344
|
onError
|
package/index.mjs
CHANGED
|
@@ -1334,7 +1334,8 @@ const useUploadRateCard = () => {
|
|
|
1334
1334
|
const { client } = useShipEngine();
|
|
1335
1335
|
return useMutation({
|
|
1336
1336
|
mutationFn: (_0) => __async$2(void 0, [_0], function* ({ rateCardId, file }) {
|
|
1337
|
-
|
|
1337
|
+
const result = yield client.rateCards.upload(rateCardId, file);
|
|
1338
|
+
return result.data;
|
|
1338
1339
|
}),
|
|
1339
1340
|
mutationKey: ["useUploadRateCard"],
|
|
1340
1341
|
onError
|