@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.
@@ -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,5 @@
1
+ interface AsttActionResponse {
2
+ ActionExternalId: string;
3
+ }
4
+ export declare const postAsttActionsQueryHook: (transferId: string, actionName: string) => import("@tanstack/react-query").UseMutationResult<AsttActionResponse, unknown, void, unknown>;
5
+ export {};
@@ -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
+ }
@@ -1,5 +1,7 @@
1
1
  export interface CustomerHistory {
2
2
  CustomerId: number;
3
+ CustomerName: string;
4
+ CustomerTotalCoins: number;
3
5
  Coins: number;
4
6
  Type: string;
5
7
  ActivityDescription: string;
@@ -1,5 +1,6 @@
1
1
  export interface CustomerVoucher {
2
2
  CustomerId: number;
3
+ CustomerName: string;
3
4
  VoucherId: string;
4
5
  BeginDate: number;
5
6
  EndDate: number;
@@ -76,3 +76,4 @@ export * from './Watson';
76
76
  export * from './TagsFlow';
77
77
  export * from './CustomerHistory';
78
78
  export * from './CustomerVoucher';
79
+ export * from './AsttReconciliationDocuments';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.58",
3
+ "version": "0.3.60",
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,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
+ }
@@ -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
+
@@ -1,5 +1,7 @@
1
1
  export interface CustomerHistory {
2
2
  CustomerId: number;
3
+ CustomerName: string;
4
+ CustomerTotalCoins: number;
3
5
  Coins: number;
4
6
  Type: string;
5
7
  ActivityDescription: string;
@@ -1,5 +1,6 @@
1
1
  export interface CustomerVoucher{
2
2
  CustomerId: number;
3
+ CustomerName: string;
3
4
  VoucherId: string;
4
5
  BeginDate: number;
5
6
  EndDate: number;
@@ -75,4 +75,5 @@ export * from './FlowExecution';
75
75
  export * from './Watson';
76
76
  export * from './TagsFlow';
77
77
  export * from './CustomerHistory';
78
- export * from './CustomerVoucher';
78
+ export * from './CustomerVoucher';
79
+ export * from './AsttReconciliationDocuments';