@omniumretail/shared-resources 0.3.73 → 0.3.74

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 { NotificationApplication } from "../../../interfaces/Anot";
3
+ export declare const getNotificationApplications: ({ ...options }: UseQueryOptions<NotificationApplication>) => import("@tanstack/react-query").UseQueryResult<NotificationApplication, unknown>;
@@ -0,0 +1,6 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ interface SupportedLanguagesResponse {
3
+ SupportedLanguages: string[];
4
+ }
5
+ export declare const getNotificationLanguages: ({ ...options }: UseQueryOptions<SupportedLanguagesResponse>) => import("@tanstack/react-query").UseQueryResult<SupportedLanguagesResponse, unknown>;
6
+ export {};
@@ -400,6 +400,8 @@ export * from "./ASAEGNG/get/getCustomersQuery.hook";
400
400
  export * from "./Anot/get/getNotificationsTypeQuery.hook";
401
401
  export * from "./Anot/mutate/useNotificationTypeQuery.hook";
402
402
  export * from "./Anot/get/getNotificationTypeByIdQuery.hook";
403
+ export * from "./Anot/get/getNotificationApplicationsQuery.hook";
404
+ export * from "./Anot/get/getNotificationLanguagesQuery.hook";
403
405
  export * from "./Others/useJobTitlesQuery.hook";
404
406
  export * from "./Others/useContractStatesQuery.hook";
405
407
  export * from "./Others/useApplicationDataQuery.hook";
@@ -21,3 +21,9 @@ export interface NotificationContentsInterface {
21
21
  Description: string;
22
22
  LanguageISO2: string;
23
23
  }
24
+ export interface NotificationApplication {
25
+ Id: string;
26
+ Key: string;
27
+ Name: string;
28
+ Status: string;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.73",
3
+ "version": "0.3.74",
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,11 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { getAuth0 } from "../../../services/ApiService";
3
+ import { NotificationApplication } from "../../../interfaces/Anot";
4
+
5
+ export const getNotificationApplications = ({...options} : UseQueryOptions<NotificationApplication>) => {
6
+ return useQuery(
7
+ ['NOTIFICATION_APPLICATIONS', options],
8
+ () => getAuth0<NotificationApplication>(`/AACP/Applications`),
9
+ options
10
+ );
11
+ }
@@ -0,0 +1,15 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { getAuth0 } from "../../../services/ApiService";
3
+
4
+ interface SupportedLanguagesResponse {
5
+ SupportedLanguages: string[];
6
+ }
7
+
8
+ export const getNotificationLanguages = ({...options} : UseQueryOptions<SupportedLanguagesResponse>) => {
9
+ return useQuery(
10
+ ['NOTIFICATION_LANGUAGES', options],
11
+ () => getAuth0<SupportedLanguagesResponse>(`/ANOT/Configurations/SupportedLanguages`),
12
+ options
13
+ );
14
+ }
15
+
@@ -469,6 +469,8 @@ export * from "./ASAEGNG/get/getCustomersQuery.hook";
469
469
  export * from "./Anot/get/getNotificationsTypeQuery.hook";
470
470
  export * from "./Anot/mutate/useNotificationTypeQuery.hook";
471
471
  export * from "./Anot/get/getNotificationTypeByIdQuery.hook";
472
+ export * from "./Anot/get/getNotificationApplicationsQuery.hook";
473
+ export * from "./Anot/get/getNotificationLanguagesQuery.hook";
472
474
 
473
475
  //Others
474
476
  export * from "./Others/useJobTitlesQuery.hook";
@@ -22,4 +22,11 @@ export interface NotificationContentsInterface {
22
22
  Title: string;
23
23
  Description: string;
24
24
  LanguageISO2: string;
25
- }
25
+ }
26
+
27
+ export interface NotificationApplication {
28
+ Id: string;
29
+ Key: string;
30
+ Name: string;
31
+ Status: string;
32
+ }