@omniumretail/shared-resources 0.2.47 → 0.2.48

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.
@@ -2,5 +2,6 @@ import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { Rfid, ResponseList } from "../../../interfaces";
3
3
  export interface RfidQueryHookProps extends UseQueryOptions<ResponseList<"Barcodes", Rfid>> {
4
4
  delay: number;
5
+ storeId: string;
5
6
  }
6
- export declare const getRfidQueryHook: ({ delay, ...options }: RfidQueryHookProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Barcodes", Rfid>, unknown>;
7
+ export declare const getRfidQueryHook: ({ delay, storeId, ...options }: RfidQueryHookProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Barcodes", Rfid>, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.2.47",
3
+ "version": "0.2.48",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -4,13 +4,15 @@ import { getAuth0 } from "../../../services/ApiService";
4
4
 
5
5
  export interface RfidQueryHookProps extends UseQueryOptions<ResponseList<"Barcodes", Rfid>> {
6
6
  delay: number;
7
+ storeId: string;
7
8
  }
8
9
 
9
- export const getRfidQueryHook = ({ delay, ...options }: RfidQueryHookProps) => {
10
+ export const getRfidQueryHook = ({ delay, storeId, ...options }: RfidQueryHookProps) => {
10
11
  return useQuery(
11
- ['ASTT_RFID', delay, options],
12
+ ['ASTT_RFID', delay, storeId, options],
12
13
  () => getAuth0<ResponseList<"Barcodes", Rfid>>('/ASTT/RFID', {
13
14
  pDelay: delay|| 3,
15
+ pStoreId: storeId
14
16
  }),
15
17
  options
16
18
  );
@@ -4,7 +4,9 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query';
4
4
  export const getTransferDocumentsByIdQueryHook = (transferId: string, {...options} : UseQueryOptions<TransferDocuments>) => {
5
5
  return useQuery(
6
6
  ['ASTT_TRANSFER_DOCUMENTS_BY_ID', transferId, options],
7
- () => getAuth0<TransferDocuments>(`/ASTT/TransferDocuments/${transferId}`),
7
+ () => getAuth0<TransferDocuments>(`/ASTT/TransferDocuments`, {
8
+ pTransferDocumentId: transferId
9
+ }),
8
10
  options
9
11
  );
10
12
  };
@@ -10,7 +10,10 @@ export interface TransferDocumentsMutateProps extends UseQueryOptions<TransferPi
10
10
  export const postTransferDocumentsMutateQueryHook = ({ transferDocumentId, packageId }: TransferDocumentsMutateProps) => {
11
11
  const queryClient = useQueryClient();
12
12
  return useMutation<TransferPickProducts, unknown, TransferPickProducts>((data: TransferPickProducts) => {
13
- return postAuth0(`/ASTT/TransferDocuments/${transferDocumentId}/${packageId}/Products/Picking`, undefined, data);
13
+ return postAuth0(`/ASTT/TransferDocuments/Products/Picking?`, {
14
+ pTransferDocumentId: transferDocumentId,
15
+ pPackageId: packageId
16
+ }, data);
14
17
  }, {
15
18
  onSuccess: (data: TransferPickProducts) => {
16
19
  queryClient.setQueryData(
@@ -9,7 +9,9 @@ export interface TransferDocumentsStateMutateProps extends UseQueryOptions<Trans
9
9
  export const putTransferDocumentsStateMutateQueryHook = ({ transferDocumentId }: TransferDocumentsStateMutateProps) => {
10
10
  const queryClient = useQueryClient();
11
11
  return useMutation<TransferDocumentState, unknown, TransferDocumentState>((data: TransferDocumentState) => {
12
- return putAuth0(`/ASTT/TransferDocuments/${transferDocumentId}`, undefined, data);
12
+ return putAuth0(`/ASTT/TransferDocuments?`, {
13
+ pTransferDocumentId: transferDocumentId
14
+ }, data);
13
15
  }, {
14
16
  onSuccess: (data: TransferDocumentState) => {
15
17
  queryClient.setQueryData(