@omniumretail/shared-resources 0.2.65 → 0.2.67
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/Asgt/get/getProductsPickedASGTQuery.hook.d.ts +6 -0
- package/dist/types/hooks/Others/getBellNotificationsQuery.hook.d.ts +13 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/interfaces/BellNotification.d.ts +15 -0
- package/dist/types/interfaces/ProductsPickedTransfers.d.ts +8 -0
- package/dist/types/interfaces/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/hooks/Asgt/get/getProductsPickedASGTQuery.hook.ts +19 -0
- package/src/hooks/Others/getBellNotificationsQuery.hook.ts +28 -0
- package/src/hooks/index.ts +2 -0
- package/src/interfaces/BellNotification.ts +17 -0
- package/src/interfaces/ProductsPickedTransfers.ts +8 -0
- package/src/interfaces/index.ts +3 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { PickedProducts, ResponseList } from "../../../interfaces";
|
|
3
|
+
export interface ProductsPickedASGTProps extends UseQueryOptions<ResponseList<"PickedProducts", PickedProducts>> {
|
|
4
|
+
query?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const getProductsPickedASGT: ({ query, ...options }: ProductsPickedASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"PickedProducts", PickedProducts>, unknown>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { BellNotification, ResponseList } from "../../interfaces";
|
|
3
|
+
interface BellNotificationProps extends Omit<UseQueryOptions<ResponseList<"Notifications", BellNotification>>, "queryKey"> {
|
|
4
|
+
page?: number;
|
|
5
|
+
records?: number;
|
|
6
|
+
sortBy?: string;
|
|
7
|
+
sortDirection?: string;
|
|
8
|
+
query?: string;
|
|
9
|
+
language?: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const getBellNotificationQueryHook: ({ page, records, sortBy, sortDirection, query, language, userId, ...options }: BellNotificationProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Notifications", BellNotification>, unknown>;
|
|
13
|
+
export {};
|
|
@@ -134,6 +134,7 @@ export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
|
134
134
|
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
135
135
|
export * from "./Asgt/mutate/createPackageASGTMutateQuery.hook";
|
|
136
136
|
export * from "./Asgt/mutate/createTransferASGTMutateQuery.hook";
|
|
137
|
+
export * from "./Asgt/get/getProductsPickedASGTQuery.hook";
|
|
137
138
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
138
139
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
139
140
|
export * from "./ATIM/PicaPonto/mutate/postVerifyUserQuery.hook";
|
|
@@ -310,3 +311,4 @@ export * from "./Others/getRegulationQuery.hook";
|
|
|
310
311
|
export * from "./Others/useRegulationQuery.hook";
|
|
311
312
|
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
312
313
|
export * from "./Others//editFieldsByBulkQuery.hook";
|
|
314
|
+
export * from "./Others/getBellNotificationsQuery.hook";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Criticality {
|
|
2
|
+
Id: string;
|
|
3
|
+
Name: string;
|
|
4
|
+
ColorHex: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BellNotification {
|
|
7
|
+
Id: string;
|
|
8
|
+
Title: string;
|
|
9
|
+
Description: string;
|
|
10
|
+
RedirectURL: string;
|
|
11
|
+
Icon: string;
|
|
12
|
+
ExpirationDate: number;
|
|
13
|
+
Criticality: Criticality;
|
|
14
|
+
IsRead: boolean;
|
|
15
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from './Answer';
|
|
|
12
12
|
export * from './AnalyticsUserId';
|
|
13
13
|
export * from './Cart';
|
|
14
14
|
export * from './ProductsHierarchies';
|
|
15
|
+
export * from './ProductsPickedTransfers';
|
|
15
16
|
export * from './Brand';
|
|
16
17
|
export * from './Countries';
|
|
17
18
|
export * from './Roles';
|
|
@@ -60,3 +61,4 @@ export * from './Bulk';
|
|
|
60
61
|
export * from './AttendanceIssues';
|
|
61
62
|
export * from './Bwg';
|
|
62
63
|
export * from './ReasonCodes';
|
|
64
|
+
export * from './BellNotification';
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { PickedProducts, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface ProductsPickedASGTProps extends UseQueryOptions<ResponseList<"PickedProducts", PickedProducts>> {
|
|
6
|
+
query?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const getProductsPickedASGT = ({ query, ...options }: ProductsPickedASGTProps) => {
|
|
10
|
+
return useQuery(
|
|
11
|
+
['ASGT_PICKED_PRODUCTS', query, options],
|
|
12
|
+
() => getAuth0<ResponseList<"PickedProducts", PickedProducts>>('/ASGT/TransferDocuments/Products/Picked', {
|
|
13
|
+
|
|
14
|
+
pQuery: query
|
|
15
|
+
}),
|
|
16
|
+
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { BellNotification, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
interface BellNotificationProps extends Omit<UseQueryOptions<ResponseList<"Notifications", BellNotification>>, "queryKey"> {
|
|
6
|
+
page?: number;
|
|
7
|
+
records?: number;
|
|
8
|
+
sortBy?: string;
|
|
9
|
+
sortDirection?: string;
|
|
10
|
+
query?: string;
|
|
11
|
+
language?: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getBellNotificationQueryHook = ({ page, records, sortBy, sortDirection, query, language, userId, ...options }: BellNotificationProps) => {
|
|
16
|
+
return useQuery(
|
|
17
|
+
['BELL_NOTIFICATION_QUERY', page, records, sortBy, sortDirection, query, language, userId, options],
|
|
18
|
+
() => getAuth0<ResponseList<"Notifications", BellNotification>>(`/ANOT/Notifications/${userId}`, {
|
|
19
|
+
pPage: page || 1,
|
|
20
|
+
pRecords: records || 50,
|
|
21
|
+
pSortBy: sortBy || "Name",
|
|
22
|
+
pSortDirection: sortDirection || "asc",
|
|
23
|
+
pQuery: query || "",
|
|
24
|
+
pLanguage: language || "PT"
|
|
25
|
+
}),
|
|
26
|
+
options
|
|
27
|
+
);
|
|
28
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -159,6 +159,7 @@ export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
|
159
159
|
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
160
160
|
export * from "./Asgt/mutate/createPackageASGTMutateQuery.hook";
|
|
161
161
|
export * from "./Asgt/mutate/createTransferASGTMutateQuery.hook";
|
|
162
|
+
export * from "./Asgt/get/getProductsPickedASGTQuery.hook";
|
|
162
163
|
|
|
163
164
|
//ATIM
|
|
164
165
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
@@ -372,3 +373,4 @@ export * from "./Others/getRegulationQuery.hook";
|
|
|
372
373
|
export * from "./Others/useRegulationQuery.hook";
|
|
373
374
|
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
374
375
|
export * from "./Others//editFieldsByBulkQuery.hook";
|
|
376
|
+
export * from "./Others/getBellNotificationsQuery.hook";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Criticality {
|
|
2
|
+
Id: string;
|
|
3
|
+
Name: string;
|
|
4
|
+
ColorHex: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface BellNotification {
|
|
8
|
+
Id: string;
|
|
9
|
+
Title: string;
|
|
10
|
+
Description: string;
|
|
11
|
+
RedirectURL: string;
|
|
12
|
+
Icon: string;
|
|
13
|
+
ExpirationDate: number;
|
|
14
|
+
Criticality: Criticality;
|
|
15
|
+
IsRead: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
package/src/interfaces/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './Answer';
|
|
|
12
12
|
export * from './AnalyticsUserId';
|
|
13
13
|
export * from './Cart';
|
|
14
14
|
export * from './ProductsHierarchies';
|
|
15
|
+
export * from './ProductsPickedTransfers';
|
|
15
16
|
export * from './Brand';
|
|
16
17
|
export * from './Countries';
|
|
17
18
|
export * from './Roles';
|
|
@@ -59,4 +60,5 @@ export * from './MIMO';
|
|
|
59
60
|
export * from './Bulk';
|
|
60
61
|
export * from './AttendanceIssues';
|
|
61
62
|
export * from './Bwg';
|
|
62
|
-
export * from './ReasonCodes';
|
|
63
|
+
export * from './ReasonCodes';
|
|
64
|
+
export * from './BellNotification';
|