@shipengine/react-api 0.5.1 → 0.5.3
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.
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see [ShipEngine Developer Docs](https://shipengine.github.io/shipengine-openapi/#operation/list_shipment_rates)
|
|
5
5
|
*/
|
|
6
|
-
export declare const useGetShipmentRates: (shipmentId
|
|
6
|
+
export declare const useGetShipmentRates: (shipmentId?: string, createdAtStart?: string) => import("react-query").UseQueryResult<import("@shipengine/js-api").ShipmentRateResponse, import("@shipengine/js-api").CodedError[]>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/js-api";
|
|
2
|
-
export type UpdateAccountSettingsData = SE.AccountSettings;
|
|
3
2
|
/**
|
|
4
3
|
* @category ShipEngine API Hooks
|
|
5
4
|
* */
|
|
6
|
-
export declare const useUpdateAccountSettings: () => import("react-query").UseMutationResult<
|
|
7
|
-
defaultLabelLayout: string;
|
|
8
|
-
dimension: string;
|
|
9
|
-
weight: string;
|
|
10
|
-
}, SE.CodedError[], SE.AccountSettings, unknown>;
|
|
5
|
+
export declare const useUpdateAccountSettings: () => import("react-query").UseMutationResult<SE.AccountSettings, SE.CodedError[], Partial<SE.AccountSettings>, unknown>;
|
package/index.js
CHANGED
|
@@ -746,14 +746,10 @@ var __async$6 = (__this, __arguments, generator) => {
|
|
|
746
746
|
});
|
|
747
747
|
};
|
|
748
748
|
const useUpdateAccountSettings = () => {
|
|
749
|
+
const { client } = useShipEngine();
|
|
749
750
|
return reactQuery.useMutation({
|
|
750
|
-
mutationFn: (
|
|
751
|
-
const result = yield
|
|
752
|
-
data: { defaultLabelLayout: "4x6", dimension: "inch", weight: "ounce" },
|
|
753
|
-
errors: [],
|
|
754
|
-
isLoading: false,
|
|
755
|
-
isValidating: false
|
|
756
|
-
});
|
|
751
|
+
mutationFn: (settings) => __async$6(void 0, null, function* () {
|
|
752
|
+
const result = yield client.accountSettings.update(settings);
|
|
757
753
|
return result.data;
|
|
758
754
|
}),
|
|
759
755
|
mutationKey: ["useUpdateAccountSettings"],
|
package/index.mjs
CHANGED
|
@@ -743,14 +743,10 @@ var __async$6 = (__this, __arguments, generator) => {
|
|
|
743
743
|
});
|
|
744
744
|
};
|
|
745
745
|
const useUpdateAccountSettings = () => {
|
|
746
|
+
const { client } = useShipEngine();
|
|
746
747
|
return useMutation({
|
|
747
|
-
mutationFn: (
|
|
748
|
-
const result = yield
|
|
749
|
-
data: { defaultLabelLayout: "4x6", dimension: "inch", weight: "ounce" },
|
|
750
|
-
errors: [],
|
|
751
|
-
isLoading: false,
|
|
752
|
-
isValidating: false
|
|
753
|
-
});
|
|
748
|
+
mutationFn: (settings) => __async$6(void 0, null, function* () {
|
|
749
|
+
const result = yield client.accountSettings.update(settings);
|
|
754
750
|
return result.data;
|
|
755
751
|
}),
|
|
756
752
|
mutationKey: ["useUpdateAccountSettings"],
|