@omniumretail/shared-resources 0.2.31 → 0.2.33
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/ATIM/BackOffice/get/useEmployeeWorklogDetails.hook.d.ts +1 -2
- package/dist/types/hooks/OSUA/MIMO/get/getProductIntegrationHistory.hook.d.ts +9 -0
- package/dist/types/hooks/Others/editFieldsByBulkQuery.hook.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +6 -15
- package/dist/types/interfaces/Bulk.d.ts +9 -0
- package/dist/types/interfaces/MIMO.d.ts +5 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/ATIM/BackOffice/get/useEmployeeQueryHook.hook.ts +1 -2
- package/src/hooks/ATIM/BackOffice/get/useEmployeeWorklogDetails.hook.ts +1 -5
- package/src/hooks/OSUA/MIMO/get/getProductIntegrationHistory.hook.ts +25 -0
- package/src/hooks/Others/editFieldsByBulkQuery.hook.ts +15 -0
- package/src/hooks/index.ts +8 -19
- package/src/interfaces/Bulk.ts +11 -0
- package/src/interfaces/MIMO.ts +6 -0
- package/src/interfaces/index.ts +2 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
2
|
import { ResponseList, EmployeesWorklog } from "../../../../interfaces";
|
|
3
3
|
interface EmployeesWithTimekeepingProps extends UseQueryOptions<ResponseList<"EmployeesWorkLog", EmployeesWorklog>> {
|
|
4
|
-
storeId?: string;
|
|
5
4
|
startDate?: number;
|
|
6
5
|
endDate?: number;
|
|
7
6
|
search?: string;
|
|
@@ -12,5 +11,5 @@ interface EmployeesWithTimekeepingProps extends UseQueryOptions<ResponseList<"Em
|
|
|
12
11
|
terms?: string;
|
|
13
12
|
query?: string;
|
|
14
13
|
}
|
|
15
|
-
export declare const useEmployeeWorklogDetails: ({
|
|
14
|
+
export declare const useEmployeeWorklogDetails: ({ startDate, endDate, search, page, records, sortBy, sortDirection, terms, query, }: EmployeesWithTimekeepingProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"EmployeesWorklog", EmployeesWorklog>, unknown>;
|
|
16
15
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { ProductIntegrationHistory } from "../../../../interfaces";
|
|
3
|
+
export interface getIntegrationProductHistoryProps extends UseQueryOptions<ProductIntegrationHistory> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getIntegrationProductHistory: ({ page, records, sortBy, sortDirection }: getIntegrationProductHistoryProps) => import("@tanstack/react-query").UseQueryResult<ProductIntegrationHistory, unknown>;
|
|
@@ -239,6 +239,11 @@ export * from "./OSUA/get/orders/getOrderDocuments.hook";
|
|
|
239
239
|
export * from "./OSUA/get/faqs/getFaqsQuery.hook";
|
|
240
240
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
241
241
|
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
242
|
+
export * from "./OSUA/MIMO/get/getProductIntegrationHistory.hook";
|
|
243
|
+
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
244
|
+
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
245
|
+
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
246
|
+
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
242
247
|
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
243
248
|
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
244
249
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
@@ -278,18 +283,4 @@ export * from "./Others/getUserEmailStatusQuery.hook";
|
|
|
278
283
|
export * from "./Others/getRegulationQuery.hook";
|
|
279
284
|
export * from "./Others/useRegulationQuery.hook";
|
|
280
285
|
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
281
|
-
export * from "./Others
|
|
282
|
-
export * from "./Others/useContractStatesQuery.hook";
|
|
283
|
-
export * from "./Others/useApplicationDataQuery.hook";
|
|
284
|
-
export * from "./Others/useTermNotificationQuery.hook";
|
|
285
|
-
export * from "./Others/useCustomersQuery.hook";
|
|
286
|
-
export * from "./Others/useCountriesQuery.hook";
|
|
287
|
-
export * from "./Others/useCreateNotification.hook";
|
|
288
|
-
export * from "./Others/postCheckoutsMutateQuery.hook";
|
|
289
|
-
export * from "./Others/postVerifyImageQuery.hook";
|
|
290
|
-
export * from "./Others/getWeeklyWorkloadQuery.hook";
|
|
291
|
-
export * from "./Others/getNotificationTitleQuery.hook";
|
|
292
|
-
export * from "./Others/getUserEmailStatusQuery.hook";
|
|
293
|
-
export * from "./Others/getRegulationQuery.hook";
|
|
294
|
-
export * from "./Others/useRegulationQuery.hook";
|
|
295
|
-
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
286
|
+
export * from "./Others//editFieldsByBulkQuery.hook";
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { ResponseList, EmployeesWorklog } from "../../../../interfaces";
|
|
|
5
5
|
|
|
6
6
|
interface EmployeesWithTimekeepingProps
|
|
7
7
|
extends UseQueryOptions<ResponseList<"EmployeesWorkLog", EmployeesWorklog>> {
|
|
8
|
-
storeId?: string;
|
|
9
8
|
startDate?: number;
|
|
10
9
|
endDate?: number;
|
|
11
10
|
search?: string;
|
|
@@ -18,7 +17,6 @@ interface EmployeesWithTimekeepingProps
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
export const useEmployeeWorklogDetails = ({
|
|
21
|
-
storeId,
|
|
22
20
|
startDate,
|
|
23
21
|
endDate,
|
|
24
22
|
search,
|
|
@@ -32,7 +30,6 @@ export const useEmployeeWorklogDetails = ({
|
|
|
32
30
|
return useQuery<ResponseList<"EmployeesWorklog", EmployeesWorklog>>(
|
|
33
31
|
[
|
|
34
32
|
"EMPLOYEES_WITH_TIMEKEEPING",
|
|
35
|
-
storeId,
|
|
36
33
|
startDate,
|
|
37
34
|
endDate,
|
|
38
35
|
search,
|
|
@@ -47,7 +44,6 @@ export const useEmployeeWorklogDetails = ({
|
|
|
47
44
|
getAuth0<ResponseList<"EmployeesWorklog", EmployeesWorklog>>(
|
|
48
45
|
"/ATIM/EmployeesWorklogDetails",
|
|
49
46
|
{
|
|
50
|
-
pStoreId: storeId,
|
|
51
47
|
pPage: page || 1,
|
|
52
48
|
pRecords: records,
|
|
53
49
|
pStartDate: startDate || getDateToUnix(new Date()),
|
|
@@ -60,7 +56,7 @@ export const useEmployeeWorklogDetails = ({
|
|
|
60
56
|
),
|
|
61
57
|
{
|
|
62
58
|
suspense: false,
|
|
63
|
-
enabled: !!
|
|
59
|
+
enabled: !!startDate && !!endDate,
|
|
64
60
|
}
|
|
65
61
|
);
|
|
66
62
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { ProductIntegrationHistory } from "../../../../interfaces";
|
|
3
|
+
import { get } from "../../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface getIntegrationProductHistoryProps extends UseQueryOptions<ProductIntegrationHistory > {
|
|
6
|
+
page: number;
|
|
7
|
+
records: number;
|
|
8
|
+
sortBy: string;
|
|
9
|
+
sortDirection: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const getIntegrationProductHistory = ({ page, records, sortBy, sortDirection }: getIntegrationProductHistoryProps) => {
|
|
13
|
+
return useQuery(
|
|
14
|
+
['GET_MIMO_INTEGRATION_PROD_HISTORY', page, records, sortBy, sortDirection],
|
|
15
|
+
() => get<ProductIntegrationHistory >('/MIMO/Shopify/Product/ProductIntegrationHistory', {
|
|
16
|
+
pPage: page,
|
|
17
|
+
pRecords: records,
|
|
18
|
+
pSortBy: sortBy,
|
|
19
|
+
pSortDirection: sortDirection,
|
|
20
|
+
}),
|
|
21
|
+
{
|
|
22
|
+
keepPreviousData: true,
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Bulk } from '../../interfaces';
|
|
3
|
+
import { putAuth0 } from '../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const editFieldsByBulkQueryHook = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<Bulk, unknown, Bulk>((data: Bulk) => {
|
|
8
|
+
return putAuth0(`/AACP/Users/BulkUpdate?`, undefined, data);
|
|
9
|
+
}, {
|
|
10
|
+
onSuccess: (data: Bulk) => {
|
|
11
|
+
queryClient.setQueryData(
|
|
12
|
+
['BULK_QUERY'], data);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -277,6 +277,13 @@ export * from "./OSUA/get/faqs/getFaqsQuery.hook";
|
|
|
277
277
|
|
|
278
278
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
279
279
|
|
|
280
|
+
//MIMO
|
|
281
|
+
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
282
|
+
export * from "./OSUA/MIMO/get/getProductIntegrationHistory.hook";
|
|
283
|
+
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
284
|
+
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
285
|
+
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
286
|
+
|
|
280
287
|
//MIMO
|
|
281
288
|
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
282
289
|
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
@@ -295,7 +302,6 @@ export * from "./ACB/get/getClientBalance.hook";
|
|
|
295
302
|
export * from "./ACB/mutate/postClientBalance.hook";
|
|
296
303
|
|
|
297
304
|
//BackofficeAtim
|
|
298
|
-
|
|
299
305
|
export * from "./ATIM/BackOffice/get/useEmployeeWorklogDetails.hook";
|
|
300
306
|
export * from "./ATIM/BackOffice/get/useEmployeeQueryHook.hook";
|
|
301
307
|
export * from "./ATIM/BackOffice/get/useStoresQueryHook.hook";
|
|
@@ -327,21 +333,4 @@ export * from "./Others/getUserEmailStatusQuery.hook";
|
|
|
327
333
|
export * from "./Others/getRegulationQuery.hook";
|
|
328
334
|
export * from "./Others/useRegulationQuery.hook";
|
|
329
335
|
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
export * from "./Others/useJobTitlesQuery.hook";
|
|
333
|
-
export * from "./Others/useContractStatesQuery.hook";
|
|
334
|
-
export * from "./Others/useApplicationDataQuery.hook";
|
|
335
|
-
export * from "./Others/useTermNotificationQuery.hook";
|
|
336
|
-
export * from "./Others/useCustomersQuery.hook";
|
|
337
|
-
export * from "./Others/useCountriesQuery.hook";
|
|
338
|
-
export * from "./Others/useCreateNotification.hook";
|
|
339
|
-
export * from "./Others/postCheckoutsMutateQuery.hook";
|
|
340
|
-
export * from "./Others/postVerifyImageQuery.hook";
|
|
341
|
-
export * from "./Others/getWeeklyWorkloadQuery.hook";
|
|
342
|
-
export * from "./Others/getNotificationTitleQuery.hook";
|
|
343
|
-
export * from "./Others/getUserEmailStatusQuery.hook";
|
|
344
|
-
export * from "./Others/getRegulationQuery.hook";
|
|
345
|
-
export * from "./Others/useRegulationQuery.hook";
|
|
346
|
-
export * from "./Others/postUserAuthenticationQuery.hook";
|
|
347
|
-
|
|
336
|
+
export * from "./Others//editFieldsByBulkQuery.hook";
|
package/src/interfaces/MIMO.ts
CHANGED
package/src/interfaces/index.ts
CHANGED