@omniumretail/shared-resources 0.1.36 → 0.1.38
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/getTransferDocumentsByIdQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Astt/getTransferDocumentsByPackageQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Astt/getTransferDocumentsQuery.hook.d.ts +12 -0
- package/dist/types/hooks/Astt/getTransferStatesQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Others/getUserEmailStatusQuery.hook.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +5 -0
- package/dist/types/interfaces/TransferDocuments.d.ts +23 -0
- package/dist/types/interfaces/TransferPackage.d.ts +10 -0
- package/dist/types/interfaces/TransferStates.d.ts +7 -0
- package/dist/types/interfaces/UserEmailStatus.d.ts +13 -0
- package/dist/types/interfaces/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/hooks/Astt/getTransferDocumentsByIdQuery.hook.ts +10 -0
- package/src/hooks/Astt/getTransferDocumentsByPackageQuery.hook.ts +10 -0
- package/src/hooks/Astt/getTransferDocumentsQuery.hook.ts +31 -0
- package/src/hooks/Astt/getTransferStatesQuery.hook.ts +13 -0
- package/src/hooks/Others/getUserEmailStatusQuery.hook.ts +21 -0
- package/src/hooks/index.ts +7 -0
- package/src/interfaces/TransferDocuments.ts +25 -0
- package/src/interfaces/TransferPackage.ts +11 -0
- package/src/interfaces/TransferStates.ts +8 -0
- package/src/interfaces/UserEmailStatus.ts +14 -0
- package/src/interfaces/index.ts +4 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TransferDocuments } from '../../';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getTransferDocumentsByIdQueryHook: (transferId: string, { ...options }: UseQueryOptions<TransferDocuments>) => import("@tanstack/react-query").UseQueryResult<TransferDocuments, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TransferPackage } from '../../';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getTransferDocumentsByPackageQueryHook: (transferId: string, transferPackageId: string, { ...options }: UseQueryOptions<TransferPackage>) => import("@tanstack/react-query").UseQueryResult<TransferPackage, unknown>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferDocuments, ResponseList } from "../../interfaces";
|
|
3
|
+
export interface TransferDocumentsProps extends UseQueryOptions<ResponseList<"TransferDocuments", TransferDocuments>> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
beginCreationDate?: number;
|
|
9
|
+
endCreationDate?: number;
|
|
10
|
+
transferStateId?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const getTransferDocumentsQueryHook: ({ page, records, sortBy, sortDirection, beginCreationDate, endCreationDate, transferStateId }: TransferDocumentsProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"TransferDocuments", TransferDocuments>, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { UserEmailStatus, ResponseList } from "../../interfaces";
|
|
3
|
+
interface UserEmailStatusQueryProps extends Omit<UseQueryOptions<ResponseList<"UserStatus", UserEmailStatus>>, "queryKey"> {
|
|
4
|
+
page?: number;
|
|
5
|
+
records?: number;
|
|
6
|
+
tags?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const getUserEmailStatusQuery: ({ page, records, tags, ...options }: UserEmailStatusQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"UserStatus", UserEmailStatus>, unknown>;
|
|
9
|
+
export {};
|
|
@@ -43,6 +43,10 @@ export * from './Roles/get/useAllRolesQuery.hook';
|
|
|
43
43
|
export * from './AsvProduct/get/getProductsByRefQuery.hook';
|
|
44
44
|
export * from './AsvProduct/get/getProductsByStoreQuery.hook';
|
|
45
45
|
export * from './AsvProduct/get/getProductsStockDetailsQuery.hook';
|
|
46
|
+
export * from './Astt/getTransferDocumentsQuery.hook';
|
|
47
|
+
export * from './Astt/getTransferDocumentsByIdQuery.hook';
|
|
48
|
+
export * from './Astt/getTransferDocumentsByPackageQuery.hook';
|
|
49
|
+
export * from './Astt/getTransferStatesQuery.hook';
|
|
46
50
|
export * from './Others/useJobTitlesQuery.hook';
|
|
47
51
|
export * from './Others/useContractStatesQuery.hook';
|
|
48
52
|
export * from './Others/useApplicationDataQuery.hook';
|
|
@@ -55,3 +59,4 @@ export * from './Others/postVerifyUserQuery.hook';
|
|
|
55
59
|
export * from './Others/postVerifyImageQuery.hook';
|
|
56
60
|
export * from './Others/getWeeklyWorkloadQuery.hook';
|
|
57
61
|
export * from './Others/getNotificationTitleQuery.hook';
|
|
62
|
+
export * from './Others/getUserEmailStatusQuery.hook';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface TransferDocuments {
|
|
2
|
+
Id: string;
|
|
3
|
+
DocumentNumber: string;
|
|
4
|
+
TransferState: string;
|
|
5
|
+
TransferType: string;
|
|
6
|
+
SourceLocationName: string;
|
|
7
|
+
DestinationLocationName: string;
|
|
8
|
+
ShippingCourier: string;
|
|
9
|
+
CreationDate: number;
|
|
10
|
+
TotalProductsCount: number;
|
|
11
|
+
ScannedProductsCount: number;
|
|
12
|
+
PackagesCount: number;
|
|
13
|
+
Notes: string;
|
|
14
|
+
Details: TransferDocumentsDetails[];
|
|
15
|
+
}
|
|
16
|
+
export interface TransferDocumentsDetails {
|
|
17
|
+
PackageName: string;
|
|
18
|
+
PackageType: string;
|
|
19
|
+
PackageId: string;
|
|
20
|
+
TotalProductsCount: number;
|
|
21
|
+
PickedProductsCount: number;
|
|
22
|
+
PackageState: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface TransferPackage {
|
|
2
|
+
PackageIdReferencePackageId: string;
|
|
3
|
+
PackageIdDescriptionPackageId: string;
|
|
4
|
+
PackageIdCustom1PackageId: string;
|
|
5
|
+
PackageIdCustom2PackageId: string;
|
|
6
|
+
PackageIdCustom3PackageId: string;
|
|
7
|
+
PackageIdExpectedQuantityPackageId: number;
|
|
8
|
+
PackageIdPickedQuantityPackageId: number;
|
|
9
|
+
PackageIdItemStatePackageId: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface UserEmailStatus {
|
|
2
|
+
MessageId: string;
|
|
3
|
+
Email: string;
|
|
4
|
+
Supervisor: string;
|
|
5
|
+
Store: string;
|
|
6
|
+
Delivery: boolean;
|
|
7
|
+
Open: boolean;
|
|
8
|
+
Accessed: boolean;
|
|
9
|
+
ValidateUser: boolean;
|
|
10
|
+
EvaluationCycleName: string;
|
|
11
|
+
AnswerStarted: boolean;
|
|
12
|
+
AnswerFinished: boolean;
|
|
13
|
+
}
|
|
@@ -29,3 +29,7 @@ export * from './VerifyImage';
|
|
|
29
29
|
export * from './Workload';
|
|
30
30
|
export * from './AsvProductsStockDetails';
|
|
31
31
|
export * from './NotificationTitle';
|
|
32
|
+
export * from './TransferDocuments';
|
|
33
|
+
export * from './TransferPackage';
|
|
34
|
+
export * from './TransferStates';
|
|
35
|
+
export * from './UserEmailStatus';
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { get, TransferDocuments } from '../../';
|
|
2
|
+
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
4
|
+
export const getTransferDocumentsByIdQueryHook = (transferId: string, {...options} : UseQueryOptions<TransferDocuments>) => {
|
|
5
|
+
return useQuery(
|
|
6
|
+
['ASTT_TRANSFER_DOCUMENTS_BY_ID', transferId],
|
|
7
|
+
() => get<TransferDocuments>(`/ASTT/TransferDocuments/${transferId}`),
|
|
8
|
+
options
|
|
9
|
+
);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { get, TransferPackage } from '../../';
|
|
2
|
+
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
4
|
+
export const getTransferDocumentsByPackageQueryHook = (transferId: string, transferPackageId: string, {...options} : UseQueryOptions<TransferPackage>) => {
|
|
5
|
+
return useQuery(
|
|
6
|
+
['ASTT_TRANSFER_DOCUMENTS_BY_PACKAGE', transferId, transferPackageId],
|
|
7
|
+
() => get<TransferPackage>(`/ASTT/TransferDocuments/${transferId}/${transferPackageId}/Products`),
|
|
8
|
+
options
|
|
9
|
+
);
|
|
10
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferDocuments, ResponseList } from "../../interfaces";
|
|
3
|
+
import { get } from "../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface TransferDocumentsProps extends UseQueryOptions<ResponseList<"TransferDocuments", TransferDocuments>> {
|
|
6
|
+
page: number;
|
|
7
|
+
records: number;
|
|
8
|
+
sortBy: string;
|
|
9
|
+
sortDirection: string;
|
|
10
|
+
beginCreationDate?: number;
|
|
11
|
+
endCreationDate?: number;
|
|
12
|
+
transferStateId?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getTransferDocumentsQueryHook = ({ page, records, sortBy, sortDirection, beginCreationDate, endCreationDate, transferStateId }: TransferDocumentsProps) => {
|
|
16
|
+
return useQuery(
|
|
17
|
+
['ASTT_TRANSFER_DOCUMENTS', page, records, sortBy, sortDirection, beginCreationDate, endCreationDate, transferStateId],
|
|
18
|
+
() => get<ResponseList<"TransferDocuments", TransferDocuments>>('/ASTT/TransferDocuments', {
|
|
19
|
+
pPage: page|| 1,
|
|
20
|
+
pRecords: records || 50,
|
|
21
|
+
pSortBy: sortBy || "DocumentCreationDate",
|
|
22
|
+
pSortDirection: sortDirection || "asc",
|
|
23
|
+
pBeginCreationDate: beginCreationDate,
|
|
24
|
+
pEndCreationDate: endCreationDate,
|
|
25
|
+
pTransferStateId: transferStateId
|
|
26
|
+
}),
|
|
27
|
+
{
|
|
28
|
+
keepPreviousData: true,
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferStates } from "../../interfaces";
|
|
3
|
+
import { get } from "../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export const getTransfeStatesQueryHook = ({}: UseQueryOptions<TransferStates>) => {
|
|
6
|
+
return useQuery(
|
|
7
|
+
['ASTT_STATUS'],
|
|
8
|
+
() => get<TransferStates>('/ASTT/TransferStates'),
|
|
9
|
+
{
|
|
10
|
+
keepPreviousData: true,
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { UserEmailStatus, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
interface UserEmailStatusQueryProps extends Omit<UseQueryOptions<ResponseList<"UserStatus", UserEmailStatus>>, "queryKey"> {
|
|
6
|
+
page?: number;
|
|
7
|
+
records?: number;
|
|
8
|
+
tags?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const getUserEmailStatusQuery = ({ page, records, tags, ...options }: UserEmailStatusQueryProps) => {
|
|
12
|
+
return useQuery(
|
|
13
|
+
['USER_EMAIL_STATUS', page, records, tags],
|
|
14
|
+
() => getAuth0<ResponseList<"UserStatus", UserEmailStatus>>('/APE/Validation', {
|
|
15
|
+
pPage: page || 1,
|
|
16
|
+
pRecords: records || 50,
|
|
17
|
+
pTerms: tags
|
|
18
|
+
}),
|
|
19
|
+
options
|
|
20
|
+
);
|
|
21
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -61,6 +61,12 @@ export * from './AsvProduct/get/getProductsByRefQuery.hook';
|
|
|
61
61
|
export * from './AsvProduct/get/getProductsByStoreQuery.hook';
|
|
62
62
|
export * from './AsvProduct/get/getProductsStockDetailsQuery.hook';
|
|
63
63
|
|
|
64
|
+
//Astt
|
|
65
|
+
export * from './Astt/getTransferDocumentsQuery.hook';
|
|
66
|
+
export * from './Astt/getTransferDocumentsByIdQuery.hook';
|
|
67
|
+
export * from './Astt/getTransferDocumentsByPackageQuery.hook';
|
|
68
|
+
export * from './Astt/getTransferStatesQuery.hook';
|
|
69
|
+
|
|
64
70
|
//Others
|
|
65
71
|
export * from './Others/useJobTitlesQuery.hook';
|
|
66
72
|
export * from './Others/useContractStatesQuery.hook';
|
|
@@ -74,3 +80,4 @@ export * from './Others/postVerifyUserQuery.hook';
|
|
|
74
80
|
export * from './Others/postVerifyImageQuery.hook';
|
|
75
81
|
export * from './Others/getWeeklyWorkloadQuery.hook';
|
|
76
82
|
export * from './Others/getNotificationTitleQuery.hook';
|
|
83
|
+
export * from './Others/getUserEmailStatusQuery.hook';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
export interface TransferDocuments {
|
|
3
|
+
Id: string;
|
|
4
|
+
DocumentNumber: string;
|
|
5
|
+
TransferState: string;
|
|
6
|
+
TransferType: string;
|
|
7
|
+
SourceLocationName: string;
|
|
8
|
+
DestinationLocationName: string;
|
|
9
|
+
ShippingCourier: string;
|
|
10
|
+
CreationDate: number;
|
|
11
|
+
TotalProductsCount: number;
|
|
12
|
+
ScannedProductsCount: number;
|
|
13
|
+
PackagesCount: number;
|
|
14
|
+
Notes: string;
|
|
15
|
+
Details: TransferDocumentsDetails[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TransferDocumentsDetails {
|
|
19
|
+
PackageName: string;
|
|
20
|
+
PackageType: string;
|
|
21
|
+
PackageId: string;
|
|
22
|
+
TotalProductsCount: number;
|
|
23
|
+
PickedProductsCount: number;
|
|
24
|
+
PackageState: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
export interface TransferPackage {
|
|
3
|
+
PackageIdReferencePackageId: string;
|
|
4
|
+
PackageIdDescriptionPackageId: string;
|
|
5
|
+
PackageIdCustom1PackageId: string;
|
|
6
|
+
PackageIdCustom2PackageId: string;
|
|
7
|
+
PackageIdCustom3PackageId: string;
|
|
8
|
+
PackageIdExpectedQuantityPackageId: number;
|
|
9
|
+
PackageIdPickedQuantityPackageId: number;
|
|
10
|
+
PackageIdItemStatePackageId: string
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
export interface UserEmailStatus {
|
|
3
|
+
MessageId: string;
|
|
4
|
+
Email: string;
|
|
5
|
+
Supervisor: string;
|
|
6
|
+
Store: string;
|
|
7
|
+
Delivery: boolean;
|
|
8
|
+
Open: boolean;
|
|
9
|
+
Accessed: boolean;
|
|
10
|
+
ValidateUser: boolean;
|
|
11
|
+
EvaluationCycleName: string;
|
|
12
|
+
AnswerStarted: boolean;
|
|
13
|
+
AnswerFinished: boolean;
|
|
14
|
+
}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -29,3 +29,7 @@ export * from './VerifyImage';
|
|
|
29
29
|
export * from './Workload';
|
|
30
30
|
export * from './AsvProductsStockDetails';
|
|
31
31
|
export * from './NotificationTitle';
|
|
32
|
+
export * from './TransferDocuments';
|
|
33
|
+
export * from './TransferPackage';
|
|
34
|
+
export * from './TransferStates';
|
|
35
|
+
export * from './UserEmailStatus';
|