@omniumretail/shared-resources 0.3.11 → 0.3.13

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.
@@ -0,0 +1,12 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { FlowExecution, ResponseList } from "../../../interfaces";
3
+ interface FlowExecutionProps extends Omit<UseQueryOptions<ResponseList<"Executions", FlowExecution>>, "queryKey"> {
4
+ page: number;
5
+ records: number;
6
+ sortBy: string;
7
+ sortDirection: string;
8
+ terms?: string;
9
+ query?: string;
10
+ }
11
+ export declare const getFlowExecutionQuery: ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowExecutionProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Executions", FlowExecution>, unknown>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { FlowList, ResponseList } from "../../../interfaces";
3
+ interface FlowListProps extends Omit<UseQueryOptions<ResponseList<"FlowConfigurationResponses", FlowList>>, "queryKey"> {
4
+ page: number;
5
+ records: number;
6
+ sortBy: string;
7
+ sortDirection: string;
8
+ terms?: string;
9
+ query?: string;
10
+ }
11
+ export declare const getFlowListQuery: ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowListProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"FlowConfigurationResponses", FlowList>, unknown>;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { MonitoringComponent, ResponseList } from "../../../interfaces";
3
+ interface MonitoringComponentProps extends Omit<UseQueryOptions<ResponseList<"Components", MonitoringComponent>>, "queryKey"> {
4
+ page: number;
5
+ records: number;
6
+ sortBy: string;
7
+ sortDirection: string;
8
+ terms?: string;
9
+ query?: string;
10
+ getStatus: boolean;
11
+ }
12
+ export declare const getMonitoringComponentQueryHook: ({ page, records, sortBy, sortDirection, terms, query, getStatus, ...options }: MonitoringComponentProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Components", MonitoringComponent>, unknown>;
13
+ export {};
@@ -330,6 +330,7 @@ export * from './Orch/get/getInstanceByIdQuery.hook';
330
330
  export * from './Orch/others/runMacrosQuery.hook';
331
331
  export * from './Orch/others/reprocessingInstanceQuery.hook';
332
332
  export * from './Orch/get/getMacrosUserQuery.hook';
333
+ export * from './Orch/get/getMonitoringComponents.hook';
333
334
  export * from "./ATIM/BackOffice/get/useEmployeeWorklogDetails.hook";
334
335
  export * from "./ATIM/BackOffice/get/useEmployeeQueryHook.hook";
335
336
  export * from "./ATIM/BackOffice/get/useStoresQueryHook.hook";
@@ -353,6 +354,8 @@ export * from "./ATIM/BackOffice/mutate/postAttendanceRange.hook";
353
354
  export * from "./ATIM/BackOffice/mutate/useUpdateAttendancesSummary.hook";
354
355
  export * from "./ATIM/BackOffice/mutate/useAttendancesById.hook";
355
356
  export * from "./ATIM/BackOffice/mutate/useScheduleMutateQuery.hook";
357
+ export * from "./Frd/get/getFlowExecutionQuery.hook";
358
+ export * from "./Frd/get/getFlowListQuery.hook";
356
359
  export * from "./Others/useJobTitlesQuery.hook";
357
360
  export * from "./Others/useContractStatesQuery.hook";
358
361
  export * from "./Others/useApplicationDataQuery.hook";
@@ -0,0 +1,29 @@
1
+ export interface FlowExecution {
2
+ Id: string;
3
+ FlowId: string;
4
+ ExecutionDate: number;
5
+ UserName: string;
6
+ UserId: string;
7
+ FileUrl: string;
8
+ Status: string;
9
+ State: string;
10
+ Duration: number;
11
+ NotificationUser: boolean;
12
+ EndDate: number;
13
+ Stage: string;
14
+ Parameters: Parameter[];
15
+ }
16
+ interface Parameter {
17
+ Name: string;
18
+ Type: string;
19
+ Description: string;
20
+ Required: boolean;
21
+ DefaultValue: string;
22
+ Value: string;
23
+ Options: Option[];
24
+ IsMultiSelect: boolean;
25
+ }
26
+ interface Option {
27
+ Option1: string;
28
+ }
29
+ export {};
@@ -0,0 +1,30 @@
1
+ export interface FlowList {
2
+ Id: string;
3
+ Name: string;
4
+ Description: string;
5
+ Folder: string;
6
+ ValidationFileUrl: string;
7
+ OutputFileUrl: string;
8
+ InputPath: string;
9
+ OutputPath: string;
10
+ TemporaryPath: string;
11
+ MaxRetries: number;
12
+ TimeOutDuration: string;
13
+ Parameters: Parameter[];
14
+ State: string;
15
+ }
16
+ interface Parameter {
17
+ Id: string;
18
+ Name: string;
19
+ Type: string;
20
+ Description: string;
21
+ Required: boolean;
22
+ DefaultValue: string;
23
+ Options: Option[];
24
+ IsMultiSelect: boolean;
25
+ }
26
+ interface Option {
27
+ Id: string;
28
+ Option1: string;
29
+ }
30
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface MonitoringComponent {
2
+ Name: string;
3
+ Customer: string;
4
+ Status: string;
5
+ }
@@ -69,3 +69,6 @@ export * from './MacroInstance';
69
69
  export * from './Acls';
70
70
  export * from './Macros';
71
71
  export * from './Instances';
72
+ export * from './MonitoringComponent';
73
+ export * from './FlowList';
74
+ export * from './FlowExecution';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -0,0 +1,27 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { FlowExecution, ResponseList } from "../../../interfaces";
3
+ import { getAuth0 } from "../../../services/ApiService";
4
+
5
+ interface FlowExecutionProps extends Omit<UseQueryOptions<ResponseList<"Executions", FlowExecution>>, "queryKey"> {
6
+ page: number;
7
+ records: number;
8
+ sortBy: string;
9
+ sortDirection: string;
10
+ terms?: string;
11
+ query?: string;
12
+ }
13
+
14
+ export const getFlowExecutionQuery = ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowExecutionProps) => {
15
+ return useQuery(
16
+ ['FLOW_EXECUTION_QUERY', page, records, sortBy, sortDirection, terms, query, options],
17
+ () => getAuth0<ResponseList<"Executions", FlowExecution>>(`/FRD/Execution`, {
18
+ pPage: page || 1,
19
+ pRecords: records || 50,
20
+ pSortBy: sortBy || "Name",
21
+ pSortDirection: sortDirection || "asc",
22
+ pTerms: terms || "",
23
+ pQuery: query || ""
24
+ }),
25
+ options
26
+ );
27
+ }
@@ -0,0 +1,27 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { FlowList, ResponseList } from "../../../interfaces";
3
+ import { getAuth0 } from "../../../services/ApiService";
4
+
5
+ interface FlowListProps extends Omit<UseQueryOptions<ResponseList<"FlowConfigurationResponses", FlowList>>, "queryKey"> {
6
+ page: number;
7
+ records: number;
8
+ sortBy: string;
9
+ sortDirection: string;
10
+ terms?: string;
11
+ query?: string;
12
+ }
13
+
14
+ export const getFlowListQuery = ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowListProps) => {
15
+ return useQuery(
16
+ ['FLOW_LIST_QUERY', page, records, sortBy, sortDirection, terms, query, options],
17
+ () => getAuth0<ResponseList<"FlowConfigurationResponses", FlowList>>(`/FRD/FlowConfiguration`, {
18
+ pPage: page || 1,
19
+ pRecords: records || 50,
20
+ pSortBy: sortBy || "Name",
21
+ pSortDirection: sortDirection || "asc",
22
+ pTerms: terms || "",
23
+ pQuery: query || ""
24
+ }),
25
+ options
26
+ );
27
+ }
@@ -0,0 +1,29 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { MonitoringComponent, ResponseList } from "../../../interfaces";
3
+ import { getAuth0 } from "../../../services/ApiService";
4
+
5
+ interface MonitoringComponentProps extends Omit<UseQueryOptions<ResponseList<"Components", MonitoringComponent>>, "queryKey"> {
6
+ page: number;
7
+ records: number;
8
+ sortBy: string;
9
+ sortDirection: string;
10
+ terms?: string;
11
+ query?: string;
12
+ getStatus: boolean;
13
+ }
14
+
15
+ export const getMonitoringComponentQueryHook = ({ page, records, sortBy, sortDirection, terms, query, getStatus, ...options }: MonitoringComponentProps) => {
16
+ return useQuery(
17
+ ['MONITORINGCOMPONENTS_QUERY', page, records, sortBy, sortDirection, terms, query, getStatus, options],
18
+ () => getAuth0<ResponseList<"Components", MonitoringComponent>>(`/ORQ/Monitoring`, {
19
+ pPage: page,
20
+ pRecords: records,
21
+ pSortBy: sortBy,
22
+ pSortDirection: sortDirection,
23
+ pTerms: terms || "",
24
+ pQuery: query || "",
25
+ pGetStatus : getStatus
26
+ }),
27
+ options
28
+ );
29
+ }
@@ -387,6 +387,7 @@ export * from './Orch/get/getInstanceByIdQuery.hook';
387
387
  export * from './Orch/others/runMacrosQuery.hook';
388
388
  export * from './Orch/others/reprocessingInstanceQuery.hook';
389
389
  export * from './Orch/get/getMacrosUserQuery.hook';
390
+ export * from './Orch/get/getMonitoringComponents.hook';
390
391
 
391
392
  //BackofficeAtim
392
393
  export * from "./ATIM/BackOffice/get/useEmployeeWorklogDetails.hook";
@@ -415,6 +416,10 @@ export * from "./ATIM/BackOffice/mutate/useUpdateAttendancesSummary.hook";
415
416
  export * from "./ATIM/BackOffice/mutate/useAttendancesById.hook";
416
417
  export * from "./ATIM/BackOffice/mutate/useScheduleMutateQuery.hook";
417
418
 
419
+ //Frd
420
+ export * from "./Frd/get/getFlowExecutionQuery.hook";
421
+ export * from "./Frd/get/getFlowListQuery.hook";
422
+
418
423
  //Others
419
424
  export * from "./Others/useJobTitlesQuery.hook";
420
425
  export * from "./Others/useContractStatesQuery.hook";
@@ -0,0 +1,31 @@
1
+ export interface FlowExecution {
2
+ Id: string;
3
+ FlowId: string;
4
+ ExecutionDate: number;
5
+ UserName: string;
6
+ UserId: string;
7
+ FileUrl: string;
8
+ Status: string;
9
+ State: string;
10
+ Duration: number;
11
+ NotificationUser: boolean;
12
+ EndDate: number;
13
+ Stage: string;
14
+ Parameters: Parameter[];
15
+ }
16
+
17
+ interface Parameter {
18
+ Name: string;
19
+ Type: string;
20
+ Description: string;
21
+ Required: boolean;
22
+ DefaultValue: string;
23
+ Value: string;
24
+ Options: Option[];
25
+ IsMultiSelect: boolean;
26
+ }
27
+
28
+ interface Option {
29
+ Option1: string;
30
+ }
31
+
@@ -0,0 +1,31 @@
1
+ export interface FlowList {
2
+ Id: string;
3
+ Name: string;
4
+ Description: string;
5
+ Folder: string;
6
+ ValidationFileUrl: string;
7
+ OutputFileUrl: string;
8
+ InputPath: string;
9
+ OutputPath: string;
10
+ TemporaryPath: string;
11
+ MaxRetries: number;
12
+ TimeOutDuration: string;
13
+ Parameters: Parameter[];
14
+ State: string;
15
+ }
16
+
17
+ interface Parameter {
18
+ Id: string;
19
+ Name: string;
20
+ Type: string;
21
+ Description: string;
22
+ Required: boolean;
23
+ DefaultValue: string;
24
+ Options: Option[];
25
+ IsMultiSelect: boolean;
26
+ }
27
+
28
+ interface Option {
29
+ Id: string;
30
+ Option1: string;
31
+ }
@@ -0,0 +1,6 @@
1
+
2
+ export interface MonitoringComponent {
3
+ Name: string;
4
+ Customer: string;
5
+ Status: string;
6
+ }
@@ -69,3 +69,6 @@ export * from './MacroInstance';
69
69
  export * from './Acls';
70
70
  export * from './Macros';
71
71
  export * from './Instances';
72
+ export * from './MonitoringComponent';
73
+ export * from './FlowList';
74
+ export * from './FlowExecution';