@omniumretail/shared-resources 0.3.58 → 0.3.60
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/get/getManualPackagesListQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Astt/get/getReconciliationDocumentsQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Astt/mutate/postAsttActionsQuery.hook.d.ts +5 -0
- package/dist/types/hooks/Astt/mutate/updatePackageIdQuery.hook.d.ts +8 -0
- package/dist/types/hooks/index.d.ts +4 -0
- package/dist/types/interfaces/AsttReconciliationDocuments.d.ts +24 -0
- package/dist/types/interfaces/CustomerHistory.d.ts +2 -0
- package/dist/types/interfaces/CustomerVoucher.d.ts +1 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/Astt/get/getManualPackagesListQuery.hook.ts +12 -0
- package/src/hooks/Astt/get/getReconciliationDocumentsQuery.hook.ts +13 -0
- package/src/hooks/Astt/mutate/postAsttActionsQuery.hook.ts +22 -0
- package/src/hooks/Astt/mutate/updatePackageIdQuery.hook.ts +25 -0
- package/src/hooks/index.ts +4 -0
- package/src/interfaces/AsttReconciliationDocuments.ts +28 -0
- package/src/interfaces/CustomerHistory.ts +2 -0
- package/src/interfaces/CustomerVoucher.ts +1 -0
- package/src/interfaces/index.ts +2 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { AsttManualVsYetToBePickedResponse } from '../../../interfaces/AsttReconciliationDocuments';
|
|
3
|
+
export declare const getManualPackagesListQueryHook: ({ ...options }: UseQueryOptions<AsttManualVsYetToBePickedResponse>) => import("@tanstack/react-query").UseQueryResult<AsttManualVsYetToBePickedResponse, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TransferPackage } from '../../..';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getReconciliationDocumentsQueryHook: (transferId: string, { ...options }: UseQueryOptions<TransferPackage>) => import("@tanstack/react-query").UseQueryResult<TransferPackage, unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
|
|
3
|
+
export interface UpdatePackageIdQueryProps extends UseQueryOptions<TransferDocumentsDetails> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
oldPackageId: string;
|
|
6
|
+
newPackageId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const updatePackageIdQuery: ({ transferDocumentId, oldPackageId, newPackageId }: UpdatePackageIdQueryProps) => import("@tanstack/react-query").UseMutationResult<TransferDocumentsDetails, unknown, TransferDocumentsDetails, unknown>;
|
|
@@ -138,6 +138,10 @@ export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
|
|
|
138
138
|
export * from "./Astt/mutate/postMatchingPackageQuery.hook";
|
|
139
139
|
export * from "./Astt/mutate/postManualTransferQuery.hook";
|
|
140
140
|
export * from "./Astt/mutate/postManualPackageQuery.hook";
|
|
141
|
+
export * from "./Astt/mutate/updatePackageIdQuery.hook";
|
|
142
|
+
export * from "./Astt/mutate/postAsttActionsQuery.hook";
|
|
143
|
+
export * from "./Astt/get/getReconciliationDocumentsQuery.hook";
|
|
144
|
+
export * from "./Astt/get/getManualPackagesListQuery.hook";
|
|
141
145
|
export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
|
|
142
146
|
export * from "./Astt/Asgt/get/getTransferDocumentsByIdASTTQuery.hook";
|
|
143
147
|
export * from "./Astt/Asgt/get/getTransferDocumentsByPackageASTTQuery.hook";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AsttReconciliationDocuments {
|
|
2
|
+
ExternalPackageIds: string[];
|
|
3
|
+
TransferDocuments: {
|
|
4
|
+
User: string;
|
|
5
|
+
TransferId: string;
|
|
6
|
+
PackageId: string;
|
|
7
|
+
ExternalPackageId: string | null;
|
|
8
|
+
DocumentDate: string;
|
|
9
|
+
TotalProductsCount: number;
|
|
10
|
+
SourceLocationCode: string;
|
|
11
|
+
DestinationLocationCode: string;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
export interface AsttManualVsYetToBePicked {
|
|
15
|
+
TransferDocumentId: string | null;
|
|
16
|
+
DocumentNumber: string;
|
|
17
|
+
DocumentCreationDate: number;
|
|
18
|
+
TotalProductsCount: number;
|
|
19
|
+
PackagesCount: number;
|
|
20
|
+
}
|
|
21
|
+
export interface AsttManualVsYetToBePickedResponse {
|
|
22
|
+
ManualTransferDocuments: AsttManualVsYetToBePicked[];
|
|
23
|
+
DocumentsYetToBePicked: AsttManualVsYetToBePicked[];
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getAuth0 } from '../../..';
|
|
2
|
+
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
import { AsttManualVsYetToBePickedResponse } from '../../../interfaces/AsttReconciliationDocuments';
|
|
4
|
+
|
|
5
|
+
export const getManualPackagesListQueryHook = ({ ...options }: UseQueryOptions<AsttManualVsYetToBePickedResponse>) => {
|
|
6
|
+
return useQuery(
|
|
7
|
+
['ASTT_MANUAL_PACKAGES_LIST', options],
|
|
8
|
+
() => getAuth0<AsttManualVsYetToBePickedResponse>(`/ASTT/TransferDocuments/ManualVsYetToBePicked`, undefined),
|
|
9
|
+
options
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getAuth0, TransferPackage } from '../../..';
|
|
2
|
+
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
4
|
+
export const getReconciliationDocumentsQueryHook = (transferId: string, { ...options }: UseQueryOptions<TransferPackage>) => {
|
|
5
|
+
return useQuery(
|
|
6
|
+
['ASTT_RECONCILIATION_DOCUMENTS', transferId, options],
|
|
7
|
+
() => getAuth0<TransferPackage>(`/ASTT/TransferDocuments/ReconciliationDocuments`, {
|
|
8
|
+
pTransferDocumentId: transferId,
|
|
9
|
+
}),
|
|
10
|
+
options
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { postAuth0 } from '../../..';
|
|
2
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
|
|
4
|
+
interface AsttActionResponse {
|
|
5
|
+
ActionExternalId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const postAsttActionsQueryHook = (transferId: string, actionName: string) => {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
|
|
11
|
+
return useMutation<AsttActionResponse, unknown, void>(() => {
|
|
12
|
+
return postAuth0(`/ASTT/Actions/GET?`, {
|
|
13
|
+
pActionName: actionName,
|
|
14
|
+
pFlow: "TransferDocuments",
|
|
15
|
+
pFilter: `Id=${transferId}`
|
|
16
|
+
});
|
|
17
|
+
}, {
|
|
18
|
+
onSuccess: (data: AsttActionResponse) => {
|
|
19
|
+
queryClient.setQueryData(['ASTT_ACTIONS'], data);
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
3
|
+
import { TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
|
|
4
|
+
|
|
5
|
+
export interface UpdatePackageIdQueryProps extends UseQueryOptions<TransferDocumentsDetails> {
|
|
6
|
+
transferDocumentId: string;
|
|
7
|
+
oldPackageId: string;
|
|
8
|
+
newPackageId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const updatePackageIdQuery = ({ transferDocumentId, oldPackageId, newPackageId }: UpdatePackageIdQueryProps) => {
|
|
12
|
+
const queryClient = useQueryClient();
|
|
13
|
+
return useMutation<TransferDocumentsDetails, unknown, TransferDocumentsDetails>((data: TransferDocumentsDetails) => {
|
|
14
|
+
return putAuth0(`/ASTT/TransferDocuments/Manual/Package/Id?`, {
|
|
15
|
+
pTransferDocumentId: transferDocumentId,
|
|
16
|
+
pOldPackageId: oldPackageId,
|
|
17
|
+
pNewPackageId: newPackageId
|
|
18
|
+
}, data);
|
|
19
|
+
}, {
|
|
20
|
+
onSuccess: (data: TransferDocumentsDetails) => {
|
|
21
|
+
queryClient.setQueryData(
|
|
22
|
+
['UPDATE_PACKAGE_ID_QUERY'], data);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -161,6 +161,10 @@ export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
|
|
|
161
161
|
export * from "./Astt/mutate/postMatchingPackageQuery.hook";
|
|
162
162
|
export * from "./Astt/mutate/postManualTransferQuery.hook";
|
|
163
163
|
export * from "./Astt/mutate/postManualPackageQuery.hook";
|
|
164
|
+
export * from "./Astt/mutate/updatePackageIdQuery.hook";
|
|
165
|
+
export * from "./Astt/mutate/postAsttActionsQuery.hook";
|
|
166
|
+
export * from "./Astt/get/getReconciliationDocumentsQuery.hook";
|
|
167
|
+
export * from "./Astt/get/getManualPackagesListQuery.hook";
|
|
164
168
|
|
|
165
169
|
//Astt Asgt
|
|
166
170
|
export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
export interface AsttReconciliationDocuments {
|
|
3
|
+
ExternalPackageIds: string[];
|
|
4
|
+
TransferDocuments: {
|
|
5
|
+
User: string;
|
|
6
|
+
TransferId: string;
|
|
7
|
+
PackageId: string;
|
|
8
|
+
ExternalPackageId: string | null;
|
|
9
|
+
DocumentDate: string;
|
|
10
|
+
TotalProductsCount: number;
|
|
11
|
+
SourceLocationCode: string;
|
|
12
|
+
DestinationLocationCode: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface AsttManualVsYetToBePicked {
|
|
17
|
+
TransferDocumentId: string | null;
|
|
18
|
+
DocumentNumber: string;
|
|
19
|
+
DocumentCreationDate: number;
|
|
20
|
+
TotalProductsCount: number;
|
|
21
|
+
PackagesCount: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface AsttManualVsYetToBePickedResponse {
|
|
25
|
+
ManualTransferDocuments: AsttManualVsYetToBePicked[];
|
|
26
|
+
DocumentsYetToBePicked: AsttManualVsYetToBePicked[];
|
|
27
|
+
}
|
|
28
|
+
|
package/src/interfaces/index.ts
CHANGED