@omniumretail/shared-resources 0.1.33 → 0.1.35

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.
@@ -1,7 +1,7 @@
1
1
  import { UseQueryOptions } from "@tanstack/react-query";
2
- import { AsvProductsStockDetails, ResponseList } from "../../../interfaces";
3
- export interface ProductsStockDetailsProps extends UseQueryOptions<ResponseList<"", AsvProductsStockDetails>> {
2
+ import { AsvProductsStockDetails } from "../../../interfaces";
3
+ export interface ProductsStockDetailsProps extends UseQueryOptions<AsvProductsStockDetails> {
4
4
  reference: string;
5
5
  storeCode: string;
6
6
  }
7
- export declare const getProductsStockDetailsQueryHook: ({ reference, storeCode }: ProductsStockDetailsProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"", AsvProductsStockDetails>, unknown>;
7
+ export declare const getProductsStockDetailsQueryHook: ({ reference, storeCode }: ProductsStockDetailsProps) => import("@tanstack/react-query").UseQueryResult<AsvProductsStockDetails, unknown>;
@@ -0,0 +1,8 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { NotificationTitle, ResponseList } from "../../interfaces";
3
+ interface NotificationTitleQueryHookQueryProps extends Omit<UseQueryOptions<ResponseList<"NotificationTypes", NotificationTitle>>, "queryKey"> {
4
+ page?: number;
5
+ records?: number;
6
+ }
7
+ export declare const getNotificationTitleQueryHook: ({ page, records, ...options }: NotificationTitleQueryHookQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"NotificationTypes", NotificationTitle>, unknown>;
8
+ export {};
@@ -54,3 +54,4 @@ export * from './Others/postCheckoutsMutateQuery.hook';
54
54
  export * from './Others/postVerifyUserQuery.hook';
55
55
  export * from './Others/postVerifyImageQuery.hook';
56
56
  export * from './Others/getWeeklyWorkloadQuery.hook';
57
+ export * from './Others/getNotificationTitleQuery.hook';
@@ -0,0 +1,7 @@
1
+ export interface NotificationTitle {
2
+ Id: string;
3
+ IsContentTypeHTML: boolean;
4
+ Subject: string;
5
+ Body: string;
6
+ Status: string;
7
+ }
@@ -28,3 +28,4 @@ export * from './VerifyUser';
28
28
  export * from './VerifyImage';
29
29
  export * from './Workload';
30
30
  export * from './AsvProductsStockDetails';
31
+ export * from './NotificationTitle';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
2
  import { AsvProductsStockDetails, ResponseList } from "../../../interfaces";
3
3
  import { get } from "../../../services/ApiService";
4
4
 
5
- export interface ProductsStockDetailsProps extends UseQueryOptions<ResponseList<"", AsvProductsStockDetails>> {
5
+ export interface ProductsStockDetailsProps extends UseQueryOptions<AsvProductsStockDetails> {
6
6
  reference: string;
7
7
  storeCode: string;
8
8
  }
@@ -10,7 +10,7 @@ export interface ProductsStockDetailsProps extends UseQueryOptions<ResponseList<
10
10
  export const getProductsStockDetailsQueryHook = ({ reference, storeCode }: ProductsStockDetailsProps) => {
11
11
  return useQuery(
12
12
  ['ASV_PRODUCT_STOCK_DETAILS', reference, storeCode],
13
- () => get<ResponseList<"", AsvProductsStockDetails>>('/ASV/Products/StockDetails', {
13
+ () => get<AsvProductsStockDetails>('/ASV/Products/StockDetails', {
14
14
  pReference: reference,
15
15
  pStoreCode: storeCode
16
16
  }),
@@ -0,0 +1,19 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { NotificationTitle, ResponseList } from "../../interfaces";
3
+ import { getAuth0 } from "../../services/ApiService";
4
+
5
+ interface NotificationTitleQueryHookQueryProps extends Omit<UseQueryOptions<ResponseList<"NotificationTypes", NotificationTitle>>, "queryKey"> {
6
+ page?: number;
7
+ records?: number;
8
+ }
9
+
10
+ export const getNotificationTitleQueryHook = ({ page, records, ...options }: NotificationTitleQueryHookQueryProps) => {
11
+ return useQuery(
12
+ ['NOTIFICATION_TITLE_QUERY', page, records],
13
+ () => getAuth0<ResponseList<"NotificationTypes", NotificationTitle>>('/APE/NotificationType', {
14
+ pPage: page || 1,
15
+ pRecords: records || 999999
16
+ }),
17
+ options
18
+ );
19
+ }
@@ -73,3 +73,4 @@ export * from './Others/postCheckoutsMutateQuery.hook';
73
73
  export * from './Others/postVerifyUserQuery.hook';
74
74
  export * from './Others/postVerifyImageQuery.hook';
75
75
  export * from './Others/getWeeklyWorkloadQuery.hook';
76
+ export * from './Others/getNotificationTitleQuery.hook';
@@ -0,0 +1,8 @@
1
+
2
+ export interface NotificationTitle {
3
+ Id: string;
4
+ IsContentTypeHTML: boolean;
5
+ Subject: string;
6
+ Body: string;
7
+ Status: string;
8
+ }
@@ -28,3 +28,4 @@ export * from './VerifyUser';
28
28
  export * from './VerifyImage';
29
29
  export * from './Workload';
30
30
  export * from './AsvProductsStockDetails';
31
+ export * from './NotificationTitle';