@shipengine/react-api 3.1.1 → 3.2.0
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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SE } from "@shipengine/js-api";
|
|
1
|
+
import { SandboxableMutation, SE } from "@shipengine/js-api";
|
|
2
2
|
/**
|
|
3
3
|
* @category ShipEngine API Hooks
|
|
4
4
|
*
|
|
5
5
|
* No documentation available for this endpoint
|
|
6
6
|
*/
|
|
7
|
-
export declare const useAddSandboxCarriers: () => import("@tanstack/react-query").UseMutationResult<void, SE.CodedError[], SE.SandboxMethodParams
|
|
7
|
+
export declare const useAddSandboxCarriers: () => import("@tanstack/react-query").UseMutationResult<void, SE.CodedError[], SandboxableMutation<SE.SandboxMethodParams>, unknown>;
|
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;
|
|
@@ -2536,11 +2536,8 @@ var __async$4 = (__this, __arguments, generator) => {
|
|
|
2536
2536
|
const useAddSandboxCarriers = () => {
|
|
2537
2537
|
const { client } = useShipEngine();
|
|
2538
2538
|
return reactQuery.useMutation({
|
|
2539
|
-
mutationFn: (
|
|
2540
|
-
const result = yield client.sellers.addSandboxCarriers(
|
|
2541
|
-
sellerId,
|
|
2542
|
-
tryReuseCarrierConnection
|
|
2543
|
-
});
|
|
2539
|
+
mutationFn: (props) => __async$4(void 0, null, function* () {
|
|
2540
|
+
const result = yield client.sellers.addSandboxCarriers(props);
|
|
2544
2541
|
return result.data;
|
|
2545
2542
|
}),
|
|
2546
2543
|
mutationKey: ["useAddSandboxCarriers"],
|
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;
|
|
@@ -2533,11 +2533,8 @@ var __async$4 = (__this, __arguments, generator) => {
|
|
|
2533
2533
|
const useAddSandboxCarriers = () => {
|
|
2534
2534
|
const { client } = useShipEngine();
|
|
2535
2535
|
return useMutation({
|
|
2536
|
-
mutationFn: (
|
|
2537
|
-
const result = yield client.sellers.addSandboxCarriers(
|
|
2538
|
-
sellerId,
|
|
2539
|
-
tryReuseCarrierConnection
|
|
2540
|
-
});
|
|
2536
|
+
mutationFn: (props) => __async$4(void 0, null, function* () {
|
|
2537
|
+
const result = yield client.sellers.addSandboxCarriers(props);
|
|
2541
2538
|
return result.data;
|
|
2542
2539
|
}),
|
|
2543
2540
|
mutationKey: ["useAddSandboxCarriers"],
|