@omniumretail/shared-resources 0.3.55 → 0.3.57

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.
@@ -0,0 +1,2 @@
1
+ import { TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
2
+ export declare const postManualPackageQueryHook: (transferDocumentId: string) => import("@tanstack/react-query").UseMutationResult<TransferDocumentsDetails, unknown, TransferDocumentsDetails, unknown>;
@@ -137,6 +137,7 @@ export * from "./Astt/get/getBarcodesListingQuery.hook";
137
137
  export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
138
138
  export * from "./Astt/mutate/postMatchingPackageQuery.hook";
139
139
  export * from "./Astt/mutate/postManualTransferQuery.hook";
140
+ export * from "./Astt/mutate/postManualPackageQuery.hook";
140
141
  export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
141
142
  export * from "./Astt/Asgt/get/getTransferDocumentsByIdASTTQuery.hook";
142
143
  export * from "./Astt/Asgt/get/getTransferDocumentsByPackageASTTQuery.hook";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.55",
3
+ "version": "0.3.57",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -0,0 +1,18 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
3
+ import { postAuth0 } from '../../../services/ApiService';
4
+
5
+ export const postManualPackageQueryHook = (transferDocumentId: string) => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<TransferDocumentsDetails, unknown, TransferDocumentsDetails>((data: TransferDocumentsDetails) => {
8
+ return postAuth0(`/ASTT/TransferDocuments/Manual/Packages?`, {
9
+ pTransferDocumentId: transferDocumentId
10
+ }, data);
11
+ }, {
12
+ onSuccess: (data: TransferDocumentsDetails) => {
13
+ queryClient.setQueryData(
14
+ ['MANUAL_PACKAGE_QUERY'], data);
15
+ },
16
+ });
17
+ }
18
+
@@ -160,6 +160,7 @@ export * from "./Astt/get/getBarcodesListingQuery.hook";
160
160
  export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
161
161
  export * from "./Astt/mutate/postMatchingPackageQuery.hook";
162
162
  export * from "./Astt/mutate/postManualTransferQuery.hook";
163
+ export * from "./Astt/mutate/postManualPackageQuery.hook";
163
164
 
164
165
  //Astt Asgt
165
166
  export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";