@shipengine/react-api 3.8.1 → 3.8.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.
- package/hooks/shipments/use-get-shipment-rates.d.ts +7 -5
- package/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +2 -2
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ShipmentRateResponse } from "@shipengine/js-api";
|
|
2
|
-
import {
|
|
2
|
+
import { QueryProps } from "../../utilities";
|
|
3
|
+
type GetShipmentRatesParams = {
|
|
4
|
+
createdAtStart?: string;
|
|
5
|
+
shipmentId?: string;
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* @category ShipEngine API Hooks
|
|
5
9
|
*
|
|
6
10
|
* @see [ShipEngine Developer Docs](https://shipengine.github.io/shipengine-openapi/#operation/list_shipment_rates)
|
|
7
11
|
*/
|
|
8
|
-
export declare const useGetShipmentRates: (params:
|
|
9
|
-
|
|
10
|
-
shipmentId?: string;
|
|
11
|
-
}>) => import("@tanstack/react-query").UseQueryResult<ShipmentRateResponse, import("@shipengine/js-api").CodedError[]>;
|
|
12
|
+
export declare const useGetShipmentRates: (params: QueryProps<ShipmentRateResponse, GetShipmentRatesParams>) => import("@tanstack/react-query").UseQueryResult<ShipmentRateResponse, import("@shipengine/js-api").CodedError[]>;
|
|
13
|
+
export {};
|
package/index.js
CHANGED
|
@@ -1984,7 +1984,8 @@ var __objRest$9 = (source, exclude) => {
|
|
|
1984
1984
|
const useGetShipmentRates = (params) => {
|
|
1985
1985
|
const { client } = useShipEngine();
|
|
1986
1986
|
const _a = params, { queryFnParams } = _a, rest = __objRest$9(_a, ["queryFnParams"]);
|
|
1987
|
-
const
|
|
1987
|
+
const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
|
|
1988
|
+
const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
|
|
1988
1989
|
return reactQuery.useQuery(__spreadProps$b(__spreadValues$c({
|
|
1989
1990
|
enabled: shipmentId !== void 0
|
|
1990
1991
|
}, rest), {
|
package/index.mjs
CHANGED
|
@@ -1981,7 +1981,8 @@ var __objRest$9 = (source, exclude) => {
|
|
|
1981
1981
|
const useGetShipmentRates = (params) => {
|
|
1982
1982
|
const { client } = useShipEngine();
|
|
1983
1983
|
const _a = params, { queryFnParams } = _a, rest = __objRest$9(_a, ["queryFnParams"]);
|
|
1984
|
-
const
|
|
1984
|
+
const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
|
|
1985
|
+
const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
|
|
1985
1986
|
return useQuery(__spreadProps$b(__spreadValues$c({
|
|
1986
1987
|
enabled: shipmentId !== void 0
|
|
1987
1988
|
}, rest), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/react-api",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"tsconfig": "./tsconfig.lib.json"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@shipengine/js-api": "
|
|
20
|
+
"@shipengine/js-api": "3.x",
|
|
21
21
|
"@tanstack/react-query": "4.x",
|
|
22
22
|
"react": "18.x",
|
|
23
23
|
"react-dom": "18.x"
|