@omniumretail/shared-resources 0.3.48 → 0.3.50

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 { TransferDocumentManual, TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
2
+ export declare const postManualTransferQueryHook: (bodyType?: string) => import("@tanstack/react-query").UseMutationResult<TransferDocumentsDetails, unknown, TransferDocumentManual, unknown>;
@@ -0,0 +1,6 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import { TransferPickProductsList, TransferPickProductsMatched } from '../../../interfaces/TransferPickProducts';
3
+ export interface MatchingPackageMutateProps extends UseQueryOptions<TransferPickProductsMatched> {
4
+ transferDocumentId: string;
5
+ }
6
+ export declare const postMatchingPackageQueryHook: ({ transferDocumentId }: MatchingPackageMutateProps) => import("@tanstack/react-query").UseMutationResult<TransferPickProductsMatched, unknown, TransferPickProductsList[], unknown>;
@@ -135,6 +135,8 @@ export * from "./Astt/get/getProductsListingQuery.hook";
135
135
  export * from "./Astt/get/getBarcodesPrintQuery.hook";
136
136
  export * from "./Astt/get/getBarcodesListingQuery.hook";
137
137
  export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
138
+ export * from "./Astt/mutate/postMatchingPackageQuery.hook";
139
+ export * from "./Astt/mutate/postManualTransferQuery.hook";
138
140
  export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
139
141
  export * from "./Astt/Asgt/get/getTransferDocumentsByIdASTTQuery.hook";
140
142
  export * from "./Astt/Asgt/get/getTransferDocumentsByPackageASTTQuery.hook";
@@ -46,3 +46,10 @@ export interface ProductMovement {
46
46
  Movement: number;
47
47
  VendusId: string;
48
48
  }
49
+ export interface TransferDocumentManual {
50
+ TransferDocumentId: string;
51
+ DocumentNumber: string;
52
+ LocationCode: string;
53
+ Image: any;
54
+ UserId: string;
55
+ }
@@ -23,3 +23,7 @@ export interface TransferPickProductsRemoved {
23
23
  Quantity: number;
24
24
  PickedMethod: string;
25
25
  }
26
+ export interface TransferPickProductsMatched {
27
+ MatchFound: boolean;
28
+ PackageId: string | null;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.48",
3
+ "version": "0.3.50",
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,16 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { TransferDocumentManual, TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
3
+ import { postAuth0 } from '../../../services/ApiService';
4
+
5
+ export const postManualTransferQueryHook = (bodyType?: string) => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<TransferDocumentsDetails, unknown, TransferDocumentManual>((data: any) => {
8
+ return postAuth0(`/ASTT/TransferDocuments/Manual`, undefined, data, bodyType);
9
+ }, {
10
+ onSuccess: (data: TransferDocumentsDetails) => {
11
+ queryClient.setQueryData(
12
+ ['MANUAL_TRANSFER_QUERY'], data);
13
+ },
14
+ });
15
+ }
16
+
@@ -0,0 +1,22 @@
1
+ import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { TransferPickProductsList, TransferPickProductsMatched } from '../../../interfaces/TransferPickProducts';
3
+ import { postAuth0 } from '../../../services/ApiService';
4
+
5
+ export interface MatchingPackageMutateProps extends UseQueryOptions<TransferPickProductsMatched> {
6
+ transferDocumentId: string;
7
+ }
8
+
9
+ export const postMatchingPackageQueryHook = ({ transferDocumentId }: MatchingPackageMutateProps) => {
10
+ const queryClient = useQueryClient();
11
+ return useMutation<TransferPickProductsMatched, unknown, TransferPickProductsList[]>((data: TransferPickProductsList[]) => {
12
+ return postAuth0(`/ASTT/TransferDocuments/MatchingPackage?`, {
13
+ pTransferDocumentId: transferDocumentId,
14
+ }, data);
15
+ }, {
16
+ onSuccess: (data: TransferPickProductsMatched) => {
17
+ queryClient.setQueryData(
18
+ ['MATCHING_PACKAGE_QUERY'], data);
19
+ },
20
+ });
21
+ }
22
+
@@ -158,6 +158,8 @@ export * from "./Astt/get/getProductsListingQuery.hook";
158
158
  export * from "./Astt/get/getBarcodesPrintQuery.hook";
159
159
  export * from "./Astt/get/getBarcodesListingQuery.hook";
160
160
  export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
161
+ export * from "./Astt/mutate/postMatchingPackageQuery.hook";
162
+ export * from "./Astt/mutate/postManualTransferQuery.hook";
161
163
 
162
164
  //Astt Asgt
163
165
  export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
@@ -42,7 +42,7 @@ export interface TransferDocument {
42
42
  export interface ProductMovement {
43
43
  DocNr: string;
44
44
  TypeOfDocument: string;
45
- Date: string;
45
+ Date: string;
46
46
  Store: string;
47
47
  StoreFrom: string;
48
48
  ProductTitle: string;
@@ -50,6 +50,13 @@ export interface ProductMovement {
50
50
  Movement: number;
51
51
  VendusId: string;
52
52
  }
53
-
54
-
55
-
53
+
54
+ export interface TransferDocumentManual {
55
+ TransferDocumentId: string;
56
+ DocumentNumber: string;
57
+ LocationCode: string;
58
+ Image: any;
59
+ UserId: string;
60
+ }
61
+
62
+
@@ -26,4 +26,9 @@ export interface TransferPickProductsRemoved {
26
26
  Barcode: string;
27
27
  Quantity: number;
28
28
  PickedMethod: string;
29
+ }
30
+
31
+ export interface TransferPickProductsMatched {
32
+ MatchFound: boolean;
33
+ PackageId: string | null;
29
34
  }