@omniumretail/shared-resources 0.3.46 → 0.3.47
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/ASAEGNG/get/getCustomerHistoryQuery.hook.d.ts +10 -0
- package/dist/types/hooks/ASAEGNG/get/getCustomerVouchersQuery.hook.d.ts +10 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/interfaces/CustomerHistory.d.ts +9 -0
- package/dist/types/interfaces/CustomerVoucher.d.ts +11 -0
- package/dist/types/interfaces/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/hooks/ASAEGNG/get/getCustomerHistoryQuery.hook.ts +19 -0
- package/src/hooks/ASAEGNG/get/getCustomerVouchersQuery.hook.ts +19 -0
- package/src/hooks/index.ts +5 -0
- package/src/interfaces/CustomerHistory.ts +9 -0
- package/src/interfaces/CustomerVoucher.ts +11 -0
- package/src/interfaces/index.ts +3 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { CustomerHistory } from "../../../interfaces";
|
|
3
|
+
interface CustomerHistoryProps extends Omit<UseQueryOptions<CustomerHistory>, "queryKey"> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getCustomerHistoryQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerHistoryProps) => import("@tanstack/react-query").UseQueryResult<CustomerHistory, unknown>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { CustomerVoucher } from "../../../interfaces";
|
|
3
|
+
interface CustomerVoucherProps extends Omit<UseQueryOptions<CustomerVoucher>, "queryKey"> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getCustomerVouchersQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerVoucherProps) => import("@tanstack/react-query").UseQueryResult<CustomerVoucher, unknown>;
|
|
10
|
+
export {};
|
|
@@ -407,3 +407,5 @@ export * from "./Others/Vacation/get/getVacationTemplateQuery.hook";
|
|
|
407
407
|
export * from "./Others/changePasswordQuery.hook";
|
|
408
408
|
export * from "./Others/unblockUserQuery.hook";
|
|
409
409
|
export * from "./Others/oneSignalUserQuery.hook";
|
|
410
|
+
export * from "./ASAEGNG/get/getCustomerHistoryQuery.hook";
|
|
411
|
+
export * from "./ASAEGNG/get/getCustomerVouchersQuery.hook";
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { CustomerHistory } from "../../../interfaces";
|
|
3
|
+
import { get } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
interface CustomerHistoryProps extends Omit<UseQueryOptions<CustomerHistory>, "queryKey"> {
|
|
6
|
+
page: number;
|
|
7
|
+
records: number;
|
|
8
|
+
sortBy: string;
|
|
9
|
+
sortDirection: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const getCustomerHistoryQueryHook = (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerHistoryProps) => {
|
|
13
|
+
return useQuery(
|
|
14
|
+
['CUSTOMER_HISTORY_QUERY', customerId, options],
|
|
15
|
+
() => get<CustomerHistory>(`/GNG/Salesforce/CustomerHistories/${customerId}`,
|
|
16
|
+
options
|
|
17
|
+
));
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { CustomerVoucher } from "../../../interfaces";
|
|
3
|
+
import { get } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
interface CustomerVoucherProps extends Omit<UseQueryOptions<CustomerVoucher>, "queryKey"> {
|
|
6
|
+
page: number;
|
|
7
|
+
records: number;
|
|
8
|
+
sortBy: string;
|
|
9
|
+
sortDirection: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const getCustomerVouchersQueryHook = (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerVoucherProps) => {
|
|
13
|
+
return useQuery(
|
|
14
|
+
['CUSTOMER_VOUCHERS_QUERY', customerId, options],
|
|
15
|
+
() => get<CustomerVoucher>(`/GNG/Salesforce/CustomerVouchers/${customerId}`,
|
|
16
|
+
options
|
|
17
|
+
));
|
|
18
|
+
}
|
|
19
|
+
|
package/src/hooks/index.ts
CHANGED
|
@@ -474,3 +474,8 @@ export * from "./Others/Vacation/get/getVacationTemplateQuery.hook";
|
|
|
474
474
|
export * from "./Others/changePasswordQuery.hook";
|
|
475
475
|
export * from "./Others/unblockUserQuery.hook";
|
|
476
476
|
export * from "./Others/oneSignalUserQuery.hook";
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
//ASAEGNG
|
|
480
|
+
export * from "./ASAEGNG/get/getCustomerHistoryQuery.hook";
|
|
481
|
+
export * from "./ASAEGNG/get/getCustomerVouchersQuery.hook";
|
package/src/interfaces/index.ts
CHANGED
|
@@ -73,4 +73,6 @@ export * from './MonitoringComponent';
|
|
|
73
73
|
export * from './FlowList';
|
|
74
74
|
export * from './FlowExecution';
|
|
75
75
|
export * from './Watson';
|
|
76
|
-
export * from './TagsFlow';
|
|
76
|
+
export * from './TagsFlow';
|
|
77
|
+
export * from './CustomerHistory';
|
|
78
|
+
export * from './CustomerVoucher';
|