@omniumretail/shared-resources 0.2.89 → 0.2.91
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/OSUA/MIMO/mutate/postIntegrationDag.hook.d.ts +5 -0
- package/dist/types/hooks/OSUA/MIMO/mutate/updateIntegrationProcess.hook.d.ts +7 -0
- package/dist/types/hooks/OSUA/get/queue/getQueues.hook.d.ts +2 -0
- package/dist/types/hooks/OSUA/get/queue/getQueuesMessages.hook.d.ts +9 -0
- package/dist/types/hooks/OSUA/mutate/postQueuesMessages.hook.d.ts +6 -0
- package/dist/types/hooks/Users/get/getUsersReadmissionQuery.hook.d.ts +11 -0
- package/dist/types/hooks/index.d.ts +6 -8
- package/dist/types/interfaces/Acls.d.ts +1 -1
- package/dist/types/interfaces/OSUA.d.ts +10 -0
- package/package.json +1 -1
- package/src/hooks/OSUA/MIMO/mutate/postIntegrationDag.hook.ts +18 -0
- package/src/hooks/OSUA/MIMO/mutate/updateIntegrationProcess.hook.ts +32 -0
- package/src/hooks/OSUA/get/queue/getQueues.hook.ts +15 -0
- package/src/hooks/OSUA/get/queue/getQueuesMessages.hook.ts +28 -0
- package/src/hooks/OSUA/mutate/postQueuesMessages.hook.ts +21 -0
- package/src/hooks/Users/get/getUsersReadmissionQuery.hook.ts +27 -0
- package/src/hooks/index.ts +6 -13
- package/src/interfaces/Acls.ts +1 -1
- package/src/interfaces/OSUA.ts +11 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VendusIntegration } from "../../../../interfaces";
|
|
2
|
+
export interface IntegrationUpdate {
|
|
3
|
+
type: string;
|
|
4
|
+
status: string;
|
|
5
|
+
date: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const putVendusIntegration: () => import("@tanstack/react-query").UseMutationResult<VendusIntegration, unknown, IntegrationUpdate, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { ResponseList, QueuesMessages } from '../../../../interfaces';
|
|
3
|
+
interface GetQueuesMessagesProps extends UseQueryOptions<ResponseList<"Messages", QueuesMessages>> {
|
|
4
|
+
id?: string;
|
|
5
|
+
page?: number;
|
|
6
|
+
records?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const getQueuesMessages: ({ id, page, records, ...options }: GetQueuesMessagesProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Messages", QueuesMessages>, unknown>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { QueuesMessages } from "../../../interfaces";
|
|
3
|
+
export interface PostQueesMessages extends UseQueryOptions<QueuesMessages> {
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const postQueesMessages: ({ id }: PostQueesMessages) => import("@tanstack/react-query").UseMutationResult<QueuesMessages, unknown, QueuesMessages, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { User, ResponseList } from "../../../interfaces";
|
|
3
|
+
export interface UsersReadmissionQuery extends Omit<UseQueryOptions<ResponseList<"Users", User>>, "queryKey"> {
|
|
4
|
+
tags?: string;
|
|
5
|
+
records: number;
|
|
6
|
+
page: number;
|
|
7
|
+
queryField?: string;
|
|
8
|
+
sortBy?: string;
|
|
9
|
+
sortDirection?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const getUsersReadmissionQueryHook: ({ tags, page, records, queryField, sortBy, sortDirection, ...options }: UsersReadmissionQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
|
|
@@ -65,6 +65,7 @@ export * from "./Users/mutate/useUpdatePermissionsMutateQuery.hook";
|
|
|
65
65
|
export * from "./Users/get/usePermissionByIdQuery.hook";
|
|
66
66
|
export * from "./Users/get/useApplicationQuery.hook";
|
|
67
67
|
export * from "./Users/mutate/deletePermissionMutateQuery.hook";
|
|
68
|
+
export * from "./Users/get/getUsersReadmissionQuery.hook";
|
|
68
69
|
export * from "./Analytics/get/useAnalyticsEvaluationCyclesQuery.hook";
|
|
69
70
|
export * from "./Analytics/get/useAnalyticsUserIdQuery.hook";
|
|
70
71
|
export * from "./Analytics/get/useAnalyticsQuestionsQuery.hook";
|
|
@@ -268,6 +269,8 @@ export * from "./OSUA/get/orders/getOrderDocuments.hook";
|
|
|
268
269
|
export * from "./OSUA/get/faqs/getFaqsQuery.hook";
|
|
269
270
|
export * from "./OSUA/get/eventos/getSitooErrorEvents.hook";
|
|
270
271
|
export * from "./OSUA/get/vouchers/getSalesNumberOsua.hook";
|
|
272
|
+
export * from "./OSUA/get/queue/getQueuesMessages.hook";
|
|
273
|
+
export * from "./OSUA/get/queue/getQueues.hook";
|
|
271
274
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
272
275
|
export * from "./OSUA/mutate/useSetIntegrationToFinished.hook";
|
|
273
276
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
@@ -275,6 +278,7 @@ export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
|
275
278
|
export * from "./OSUA/mutate/postEventsRep.hook";
|
|
276
279
|
export * from "./OSUA/mutate/postVoucher.hook";
|
|
277
280
|
export * from "./OSUA/mutate/putBalanceVouchers.hook";
|
|
281
|
+
export * from "./OSUA/mutate/postQueuesMessages.hook";
|
|
278
282
|
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
279
283
|
export * from "./OSUA/MIMO/get/getProductIntegrationHistory.hook";
|
|
280
284
|
export * from "./OSUA/MIMO/get/useIntegrationDataQuery.hook";
|
|
@@ -284,14 +288,8 @@ export * from "./OSUA/MIMO/get/useErrorHistory.hook";
|
|
|
284
288
|
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
285
289
|
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
286
290
|
export * from "./OSUA/MIMO/mutate/updateErrorHistory.hook";
|
|
287
|
-
export * from "./OSUA/MIMO/mutate/
|
|
288
|
-
export * from "./OSUA/MIMO/
|
|
289
|
-
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
290
|
-
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
291
|
-
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
292
|
-
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
293
|
-
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
294
|
-
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
291
|
+
export * from "./OSUA/MIMO/mutate/updateIntegrationProcess.hook";
|
|
292
|
+
export * from "./OSUA/MIMO/mutate/postIntegrationDag.hook";
|
|
295
293
|
export * from "./ACB/get/getClientBalance.hook";
|
|
296
294
|
export * from "./ACB/mutate/postClientBalance.hook";
|
|
297
295
|
export * from "./ACB/get/getClientBalance.hook";
|
|
@@ -309,3 +309,13 @@ export interface CreateVoucher {
|
|
|
309
309
|
Notes: string;
|
|
310
310
|
Type: string;
|
|
311
311
|
}
|
|
312
|
+
export interface Queues {
|
|
313
|
+
Id: string;
|
|
314
|
+
Source: string;
|
|
315
|
+
Destination: string;
|
|
316
|
+
}
|
|
317
|
+
export interface QueuesMessages {
|
|
318
|
+
Id: string;
|
|
319
|
+
Date: string;
|
|
320
|
+
Message: string;
|
|
321
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { post } from '../../../../services/ApiService';
|
|
3
|
+
|
|
4
|
+
interface IntegrationDagData {
|
|
5
|
+
Result: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const postIntegrationDag = () => {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
return useMutation<IntegrationDagData, unknown, IntegrationDagData>(
|
|
11
|
+
(data: IntegrationDagData) => post('/MIMO/VendusIntegration/DAG', data),
|
|
12
|
+
{
|
|
13
|
+
onSuccess: (data: IntegrationDagData) => {
|
|
14
|
+
queryClient.setQueryData(['VENDUS_INTEGRATION_DAG'], data);
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
|
+
import { putWithParameters } from "../../../../services/ApiService";
|
|
3
|
+
import { VendusIntegration } from "../../../../interfaces";
|
|
4
|
+
|
|
5
|
+
export interface IntegrationUpdate {
|
|
6
|
+
type: string;
|
|
7
|
+
status: string;
|
|
8
|
+
date: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const putVendusIntegration = () => {
|
|
12
|
+
const queryClient = useQueryClient();
|
|
13
|
+
|
|
14
|
+
return useMutation<VendusIntegration, unknown, IntegrationUpdate>(
|
|
15
|
+
(data: IntegrationUpdate) => {
|
|
16
|
+
return putWithParameters(
|
|
17
|
+
`/MIMO/VendusIntegration/UpdateIntegrationProcess?`,
|
|
18
|
+
{
|
|
19
|
+
pType: data.type,
|
|
20
|
+
pStatus: data.status,
|
|
21
|
+
pDate: data.date,
|
|
22
|
+
},
|
|
23
|
+
data
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
onSuccess: (data: VendusIntegration) => {
|
|
28
|
+
queryClient.setQueryData(["UPDATE_VENDUS_INTEGRATION_PROCESS"], data);
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { getAuth0 } from "../../../../services/ApiService";
|
|
3
|
+
import { ResponseList, Queues } from "../../../../interfaces";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const getQueues = () => {
|
|
7
|
+
return useQuery(
|
|
8
|
+
['OSUA_QUEUES'],
|
|
9
|
+
() => getAuth0<ResponseList<"QueueConfigurations", Queues>>('/OSUA/Queues'),
|
|
10
|
+
{
|
|
11
|
+
enabled: true,
|
|
12
|
+
retry: 1
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { getAuth0 } from "../../../../services/ApiService";
|
|
3
|
+
import { ResponseList, QueuesMessages} from '../../../../interfaces';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface GetQueuesMessagesProps extends UseQueryOptions<ResponseList<"Messages", QueuesMessages>> {
|
|
8
|
+
id?: string;
|
|
9
|
+
page?: number;
|
|
10
|
+
records?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const getQueuesMessages = ({
|
|
14
|
+
id,
|
|
15
|
+
page,
|
|
16
|
+
records,
|
|
17
|
+
...options
|
|
18
|
+
}: GetQueuesMessagesProps) => {
|
|
19
|
+
return useQuery(
|
|
20
|
+
['OSUA_QUEUES_MESSAGES', id, page, records],
|
|
21
|
+
() => getAuth0<ResponseList<"Messages", QueuesMessages>>(`/OSUA/Queues/Messages`, {
|
|
22
|
+
pPage: page,
|
|
23
|
+
pRecords: records,
|
|
24
|
+
pQueueName: id
|
|
25
|
+
}),
|
|
26
|
+
options
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseQueryOptions, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
|
+
import { QueuesMessages } from "../../../interfaces";
|
|
3
|
+
import { postAuth0 } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface PostQueesMessages extends UseQueryOptions<QueuesMessages> {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const postQueesMessages = ({ id }: PostQueesMessages) => {
|
|
10
|
+
const queryClient = useQueryClient();
|
|
11
|
+
return useMutation<QueuesMessages, unknown, QueuesMessages>((data: QueuesMessages) => {
|
|
12
|
+
return postAuth0('/OSUA/Queues/Messages?',{
|
|
13
|
+
pQueueName: id,
|
|
14
|
+
}, data);
|
|
15
|
+
}, {
|
|
16
|
+
onSuccess: (data: QueuesMessages) => {
|
|
17
|
+
queryClient.setQueryData(
|
|
18
|
+
['POST_OSUA_QUEUES'], data);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { User, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface UsersReadmissionQuery extends Omit<UseQueryOptions<ResponseList<"Users", User>>, "queryKey"> {
|
|
6
|
+
tags?: string;
|
|
7
|
+
records: number;
|
|
8
|
+
page: number;
|
|
9
|
+
queryField?: string;
|
|
10
|
+
sortBy?: string;
|
|
11
|
+
sortDirection?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const getUsersReadmissionQueryHook = ({ tags, page, records, queryField, sortBy, sortDirection, ...options }: UsersReadmissionQuery) => {
|
|
15
|
+
return useQuery(
|
|
16
|
+
['USER_READMISSION_QUERY', tags, page, records, sortBy, sortDirection, queryField, options],
|
|
17
|
+
() => getAuth0<ResponseList<"Users", User>>('/AACP/Users/Readmission', {
|
|
18
|
+
pPage: page || 1,
|
|
19
|
+
pRecords: records || 50,
|
|
20
|
+
pSortBy: sortBy || 'DisplayName',
|
|
21
|
+
pSortDirection: sortDirection || 'asc',
|
|
22
|
+
pTerms: tags,
|
|
23
|
+
pQuery: queryField
|
|
24
|
+
}),
|
|
25
|
+
options
|
|
26
|
+
);
|
|
27
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -72,6 +72,7 @@ export * from "./Users/mutate/useUpdatePermissionsMutateQuery.hook";
|
|
|
72
72
|
export * from "./Users/get/usePermissionByIdQuery.hook";
|
|
73
73
|
export * from "./Users/get/useApplicationQuery.hook";
|
|
74
74
|
export * from "./Users/mutate/deletePermissionMutateQuery.hook";
|
|
75
|
+
export * from "./Users/get/getUsersReadmissionQuery.hook";
|
|
75
76
|
|
|
76
77
|
//Analytics
|
|
77
78
|
export * from "./Analytics/get/useAnalyticsEvaluationCyclesQuery.hook";
|
|
@@ -312,6 +313,8 @@ export * from "./OSUA/get/orders/getOrderDocuments.hook";
|
|
|
312
313
|
export * from "./OSUA/get/faqs/getFaqsQuery.hook";
|
|
313
314
|
export * from "./OSUA/get/eventos/getSitooErrorEvents.hook";
|
|
314
315
|
export * from "./OSUA/get/vouchers/getSalesNumberOsua.hook";
|
|
316
|
+
export * from "./OSUA/get/queue/getQueuesMessages.hook";
|
|
317
|
+
export * from "./OSUA/get/queue/getQueues.hook";
|
|
315
318
|
|
|
316
319
|
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
317
320
|
export * from "./OSUA/mutate/useSetIntegrationToFinished.hook";
|
|
@@ -320,6 +323,7 @@ export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
|
320
323
|
export * from "./OSUA/mutate/postEventsRep.hook";
|
|
321
324
|
export * from "./OSUA/mutate/postVoucher.hook";
|
|
322
325
|
export * from "./OSUA/mutate/putBalanceVouchers.hook";
|
|
326
|
+
export * from "./OSUA/mutate/postQueuesMessages.hook";
|
|
323
327
|
|
|
324
328
|
|
|
325
329
|
//MIMO
|
|
@@ -334,23 +338,12 @@ export * from "./OSUA/MIMO/get/useErrorHistory.hook";
|
|
|
334
338
|
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
335
339
|
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
336
340
|
export * from "./OSUA/MIMO/mutate/updateErrorHistory.hook";
|
|
341
|
+
export * from "./OSUA/MIMO/mutate/updateIntegrationProcess.hook";
|
|
342
|
+
export * from "./OSUA/MIMO/mutate/postIntegrationDag.hook";
|
|
337
343
|
|
|
338
344
|
|
|
339
|
-
export * from "./OSUA/MIMO/mutate/updateErrorHistory.hook";
|
|
340
|
-
|
|
341
345
|
|
|
342
346
|
|
|
343
|
-
//MIMO
|
|
344
|
-
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
345
|
-
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
346
|
-
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
347
|
-
export * from "./OSUA/mutate/postCreateIntegrationRequest.hook";
|
|
348
|
-
|
|
349
|
-
//MIMO
|
|
350
|
-
export * from "./OSUA/MIMO/get/getIntegrationByName.hook";
|
|
351
|
-
export * from "./OSUA/MIMO/mutate/postProductVendusIntegration.hook";
|
|
352
|
-
export * from "./OSUA/MIMO/mutate/postDagsAdjustStock.hook";
|
|
353
|
-
|
|
354
347
|
//ACB
|
|
355
348
|
export * from "./ACB/get/getClientBalance.hook";
|
|
356
349
|
export * from "./ACB/mutate/postClientBalance.hook";
|
package/src/interfaces/Acls.ts
CHANGED
package/src/interfaces/OSUA.ts
CHANGED
|
@@ -342,6 +342,17 @@ export interface CreateVoucher{
|
|
|
342
342
|
Type: string;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
+
export interface Queues{
|
|
346
|
+
Id: string;
|
|
347
|
+
Source: string;
|
|
348
|
+
Destination: string;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface QueuesMessages{
|
|
352
|
+
Id: string;
|
|
353
|
+
Date: string;
|
|
354
|
+
Message: string;
|
|
355
|
+
}
|
|
345
356
|
|
|
346
357
|
|
|
347
358
|
|