@omniumretail/shared-resources 0.3.52 → 0.3.53
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/types/hooks/ASAEGNG/get/getCustomerHistoryQuery.hook.d.ts +2 -2
- package/dist/types/hooks/ASAEGNG/get/getCustomerVouchersQuery.hook.d.ts +2 -2
- package/package.json +1 -1
- package/src/hooks/ASAEGNG/get/getCustomerHistoryQuery.hook.ts +2 -2
- package/src/hooks/ASAEGNG/get/getCustomerVouchersQuery.hook.ts +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
2
|
import { CustomerHistory, ResponseList } from "../../../interfaces";
|
|
3
|
-
interface CustomerHistoryProps extends Omit<UseQueryOptions<ResponseList<"
|
|
3
|
+
interface CustomerHistoryProps extends Omit<UseQueryOptions<ResponseList<"CustomerHistories", CustomerHistory>>, "queryKey"> {
|
|
4
4
|
page: number;
|
|
5
5
|
records: number;
|
|
6
6
|
sortBy: string;
|
|
7
7
|
sortDirection: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const getCustomerHistoryQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerHistoryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"
|
|
9
|
+
export declare const getCustomerHistoryQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerHistoryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"CustomerHistories", CustomerHistory>, unknown>;
|
|
10
10
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
2
|
import { CustomerVoucher, ResponseList } from "../../../interfaces";
|
|
3
|
-
interface CustomerVoucherProps extends Omit<UseQueryOptions<ResponseList<"
|
|
3
|
+
interface CustomerVoucherProps extends Omit<UseQueryOptions<ResponseList<"CustomerVouchers", CustomerVoucher>>, "queryKey"> {
|
|
4
4
|
page: number;
|
|
5
5
|
records: number;
|
|
6
6
|
sortBy: string;
|
|
7
7
|
sortDirection: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const getCustomerVouchersQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerVoucherProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"
|
|
9
|
+
export declare const getCustomerVouchersQueryHook: (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerVoucherProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"CustomerVouchers", CustomerVoucher>, unknown>;
|
|
10
10
|
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { CustomerHistory, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { get } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
interface CustomerHistoryProps extends Omit<UseQueryOptions<ResponseList<"
|
|
5
|
+
interface CustomerHistoryProps extends Omit<UseQueryOptions<ResponseList<"CustomerHistories", CustomerHistory>>, "queryKey"> {
|
|
6
6
|
page: number;
|
|
7
7
|
records: number;
|
|
8
8
|
sortBy: string;
|
|
@@ -12,7 +12,7 @@ interface CustomerHistoryProps extends Omit<UseQueryOptions<ResponseList<"Histor
|
|
|
12
12
|
export const getCustomerHistoryQueryHook = (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerHistoryProps) => {
|
|
13
13
|
return useQuery(
|
|
14
14
|
['CUSTOMER_HISTORY_QUERY', customerId, page, records, sortBy, sortDirection, options],
|
|
15
|
-
() => get<ResponseList<"
|
|
15
|
+
() => get<ResponseList<"CustomerHistories", CustomerHistory>>(`/GNG/Salesforce/CustomerHistories/${customerId}`, {
|
|
16
16
|
pPage: page,
|
|
17
17
|
pRecords: records,
|
|
18
18
|
pSortBy: sortBy,
|
|
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { CustomerVoucher, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { get } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
interface CustomerVoucherProps extends Omit<UseQueryOptions<ResponseList<"
|
|
5
|
+
interface CustomerVoucherProps extends Omit<UseQueryOptions<ResponseList<"CustomerVouchers", CustomerVoucher>>, "queryKey"> {
|
|
6
6
|
page: number;
|
|
7
7
|
records: number;
|
|
8
8
|
sortBy: string;
|
|
@@ -12,7 +12,7 @@ interface CustomerVoucherProps extends Omit<UseQueryOptions<ResponseList<"Vouche
|
|
|
12
12
|
export const getCustomerVouchersQueryHook = (customerId: string, { page, records, sortBy, sortDirection, ...options }: CustomerVoucherProps) => {
|
|
13
13
|
return useQuery(
|
|
14
14
|
['CUSTOMER_VOUCHERS_QUERY', page, records, sortBy, sortDirection, customerId, options],
|
|
15
|
-
() => get<ResponseList<"
|
|
15
|
+
() => get<ResponseList<"CustomerVouchers", CustomerVoucher>>(`/GNG/Salesforce/CustomerVouchers/${customerId}`, {
|
|
16
16
|
pPage: page,
|
|
17
17
|
pRecords: records,
|
|
18
18
|
pSortBy: sortBy,
|