@omniumretail/shared-resources 0.3.21 → 0.3.22
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/dist/bundle.js +1 -1
- package/dist/types/hooks/Astt/Asgt/mutate/postRfidASGTMutateQuery.hook.d.ts +5 -3
- package/dist/types/hooks/Astt/get/getRfidQuery.hook.d.ts +3 -1
- package/package.json +1 -1
- package/src/hooks/Astt/Asgt/mutate/postRfidASGTMutateQuery.hook.ts +10 -4
- package/src/hooks/Astt/get/getRfidQuery.hook.ts +8 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
1
2
|
import { Rfid } from '../../../../interfaces';
|
|
2
|
-
interface RfidInventoryRequest {
|
|
3
|
+
export interface RfidInventoryRequest extends UseQueryOptions<Rfid> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
packageId: string;
|
|
3
6
|
Tag: string;
|
|
4
7
|
}
|
|
5
|
-
export declare const postRfidInventoryMutateQueryHook: () => import("@tanstack/react-query").UseMutationResult<Rfid, unknown, RfidInventoryRequest[], unknown>;
|
|
6
|
-
export {};
|
|
8
|
+
export declare const postRfidInventoryMutateQueryHook: ({ transferDocumentId, packageId }: RfidInventoryRequest) => import("@tanstack/react-query").UseMutationResult<Rfid, unknown, RfidInventoryRequest[], unknown>;
|
|
@@ -3,5 +3,7 @@ import { Rfid, ResponseList } from "../../../interfaces";
|
|
|
3
3
|
export interface RfidQueryHookProps extends UseQueryOptions<ResponseList<"Barcodes", Rfid>> {
|
|
4
4
|
delay: number;
|
|
5
5
|
storeId: string;
|
|
6
|
+
transferDocumentId: string;
|
|
7
|
+
packageId: string;
|
|
6
8
|
}
|
|
7
|
-
export declare const getRfidQueryHook: ({ delay, storeId, ...options }: RfidQueryHookProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Barcodes", Rfid>, unknown>;
|
|
9
|
+
export declare const getRfidQueryHook: ({ delay, storeId, transferDocumentId, packageId, ...options }: RfidQueryHookProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Barcodes", Rfid>, unknown>;
|
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
1
|
+
import { useMutation, useQueryClient, UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import { postAuth0 } from '../../../../services/ApiService';
|
|
3
3
|
import { ResponseList } from '../../../../interfaces/ResponseList';
|
|
4
4
|
import { Rfid, RfidBarcodes } from '../../../../interfaces';
|
|
5
5
|
|
|
6
|
-
interface RfidInventoryRequest {
|
|
6
|
+
export interface RfidInventoryRequest extends UseQueryOptions<Rfid> {
|
|
7
|
+
transferDocumentId: string;
|
|
8
|
+
packageId: string;
|
|
7
9
|
Tag: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
|
|
13
|
+
export const postRfidInventoryMutateQueryHook = ({ transferDocumentId, packageId }: RfidInventoryRequest) => {
|
|
11
14
|
const queryClient = useQueryClient();
|
|
12
15
|
return useMutation<Rfid, unknown, RfidInventoryRequest[]>((data) => {
|
|
13
|
-
return postAuth0<ResponseList<"Barcodes", RfidBarcodes>>(`/ASTT/RFID`,
|
|
16
|
+
return postAuth0<ResponseList<"Barcodes", RfidBarcodes>>(`/ASTT/RFID`, {
|
|
17
|
+
pTransferDocumentId: transferDocumentId,
|
|
18
|
+
pPackageId: packageId
|
|
19
|
+
}, data);
|
|
14
20
|
}, {
|
|
15
21
|
onSuccess: (data) => {
|
|
16
22
|
queryClient.setQueryData(
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
2
|
import { Rfid, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
|
+
import { tr } from "date-fns/locale";
|
|
4
5
|
|
|
5
6
|
export interface RfidQueryHookProps extends UseQueryOptions<ResponseList<"Barcodes", Rfid>> {
|
|
6
7
|
delay: number;
|
|
7
8
|
storeId: string;
|
|
9
|
+
transferDocumentId: string;
|
|
10
|
+
packageId: string;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
export const getRfidQueryHook = ({ delay, storeId, ...options }: RfidQueryHookProps) => {
|
|
13
|
+
export const getRfidQueryHook = ({ delay, storeId, transferDocumentId, packageId, ...options }: RfidQueryHookProps) => {
|
|
11
14
|
return useQuery(
|
|
12
|
-
['ASTT_RFID', delay, storeId, options],
|
|
15
|
+
['ASTT_RFID', delay, storeId, transferDocumentId, packageId, options],
|
|
13
16
|
() => getAuth0<ResponseList<"Barcodes", Rfid>>('/ASTT/RFID', {
|
|
14
17
|
pDelay: delay|| 3,
|
|
15
|
-
pStoreId: storeId
|
|
18
|
+
pStoreId: storeId,
|
|
19
|
+
pTransferDocumentId: transferDocumentId,
|
|
20
|
+
pPackageId: packageId
|
|
16
21
|
}),
|
|
17
22
|
options
|
|
18
23
|
);
|