@omniumretail/shared-resources 0.1.37 → 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.
@@ -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 {};
@@ -59,3 +59,4 @@ export * from './Others/postVerifyUserQuery.hook';
59
59
  export * from './Others/postVerifyImageQuery.hook';
60
60
  export * from './Others/getWeeklyWorkloadQuery.hook';
61
61
  export * from './Others/getNotificationTitleQuery.hook';
62
+ export * from './Others/getUserEmailStatusQuery.hook';
@@ -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
+ }
@@ -32,3 +32,4 @@ export * from './NotificationTitle';
32
32
  export * from './TransferDocuments';
33
33
  export * from './TransferPackage';
34
34
  export * from './TransferStates';
35
+ export * from './UserEmailStatus';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
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,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
+ }
@@ -80,3 +80,4 @@ export * from './Others/postVerifyUserQuery.hook';
80
80
  export * from './Others/postVerifyImageQuery.hook';
81
81
  export * from './Others/getWeeklyWorkloadQuery.hook';
82
82
  export * from './Others/getNotificationTitleQuery.hook';
83
+ export * from './Others/getUserEmailStatusQuery.hook';
@@ -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
+ }
@@ -32,3 +32,4 @@ export * from './NotificationTitle';
32
32
  export * from './TransferDocuments';
33
33
  export * from './TransferPackage';
34
34
  export * from './TransferStates';
35
+ export * from './UserEmailStatus';