@shipengine/react-api 3.1.1 → 3.1.2
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,7 @@
|
|
|
1
1
|
import { SE } from "@shipengine/js-api";
|
|
2
2
|
import { MutationProps } from "../../utilities";
|
|
3
3
|
export type UpdateConnectionsCarrierParams<Name extends SE.ConnectionsCarrierName> = {
|
|
4
|
-
|
|
4
|
+
carrierId: string;
|
|
5
5
|
carrierName: Name;
|
|
6
6
|
formData: SE.ConnectionsCarrierSettingsData<Name>;
|
|
7
7
|
};
|
package/index.js
CHANGED
|
@@ -785,11 +785,11 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
785
785
|
"queryFnParams"
|
|
786
786
|
]);
|
|
787
787
|
const { client } = useShipEngine();
|
|
788
|
-
const { carrierName,
|
|
788
|
+
const { carrierName, carrierId } = queryFnParams;
|
|
789
789
|
return reactQuery.useQuery(__spreadProps$e(__spreadValues$e({}, params), {
|
|
790
790
|
onError,
|
|
791
|
-
queryFn: () => client.connections.getCarrierSettings(carrierName,
|
|
792
|
-
queryKey: ["useGetConnectionsCarrierSettings", carrierName,
|
|
791
|
+
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
792
|
+
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
793
793
|
select: (result) => result.data
|
|
794
794
|
}));
|
|
795
795
|
};
|
|
@@ -838,12 +838,12 @@ const useUpdateConnectionsCarrierSettings = (params) => {
|
|
|
838
838
|
return reactQuery.useMutation(__spreadProps$d(__spreadValues$d({}, params), {
|
|
839
839
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
840
840
|
carrierName,
|
|
841
|
-
|
|
841
|
+
carrierId,
|
|
842
842
|
formData
|
|
843
843
|
}) {
|
|
844
844
|
const result = yield client.connections.updateCarrierSettings(
|
|
845
845
|
carrierName,
|
|
846
|
-
|
|
846
|
+
carrierId,
|
|
847
847
|
formData
|
|
848
848
|
);
|
|
849
849
|
return result.data;
|
package/index.mjs
CHANGED
|
@@ -782,11 +782,11 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
782
782
|
"queryFnParams"
|
|
783
783
|
]);
|
|
784
784
|
const { client } = useShipEngine();
|
|
785
|
-
const { carrierName,
|
|
785
|
+
const { carrierName, carrierId } = queryFnParams;
|
|
786
786
|
return useQuery(__spreadProps$e(__spreadValues$e({}, params), {
|
|
787
787
|
onError,
|
|
788
|
-
queryFn: () => client.connections.getCarrierSettings(carrierName,
|
|
789
|
-
queryKey: ["useGetConnectionsCarrierSettings", carrierName,
|
|
788
|
+
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
789
|
+
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
790
790
|
select: (result) => result.data
|
|
791
791
|
}));
|
|
792
792
|
};
|
|
@@ -835,12 +835,12 @@ const useUpdateConnectionsCarrierSettings = (params) => {
|
|
|
835
835
|
return useMutation(__spreadProps$d(__spreadValues$d({}, params), {
|
|
836
836
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
837
837
|
carrierName,
|
|
838
|
-
|
|
838
|
+
carrierId,
|
|
839
839
|
formData
|
|
840
840
|
}) {
|
|
841
841
|
const result = yield client.connections.updateCarrierSettings(
|
|
842
842
|
carrierName,
|
|
843
|
-
|
|
843
|
+
carrierId,
|
|
844
844
|
formData
|
|
845
845
|
);
|
|
846
846
|
return result.data;
|