@omniumretail/shared-resources 0.3.12 → 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 {};
@@ -354,6 +354,8 @@ export * from "./ATIM/BackOffice/mutate/postAttendanceRange.hook";
354
354
  export * from "./ATIM/BackOffice/mutate/useUpdateAttendancesSummary.hook";
355
355
  export * from "./ATIM/BackOffice/mutate/useAttendancesById.hook";
356
356
  export * from "./ATIM/BackOffice/mutate/useScheduleMutateQuery.hook";
357
+ export * from "./Frd/get/getFlowExecutionQuery.hook";
358
+ export * from "./Frd/get/getFlowListQuery.hook";
357
359
  export * from "./Others/useJobTitlesQuery.hook";
358
360
  export * from "./Others/useContractStatesQuery.hook";
359
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 {};
@@ -70,3 +70,5 @@ export * from './Acls';
70
70
  export * from './Macros';
71
71
  export * from './Instances';
72
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.12",
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
+ }
@@ -416,6 +416,10 @@ export * from "./ATIM/BackOffice/mutate/useUpdateAttendancesSummary.hook";
416
416
  export * from "./ATIM/BackOffice/mutate/useAttendancesById.hook";
417
417
  export * from "./ATIM/BackOffice/mutate/useScheduleMutateQuery.hook";
418
418
 
419
+ //Frd
420
+ export * from "./Frd/get/getFlowExecutionQuery.hook";
421
+ export * from "./Frd/get/getFlowListQuery.hook";
422
+
419
423
  //Others
420
424
  export * from "./Others/useJobTitlesQuery.hook";
421
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
+ }
@@ -69,4 +69,6 @@ export * from './MacroInstance';
69
69
  export * from './Acls';
70
70
  export * from './Macros';
71
71
  export * from './Instances';
72
- export * from './MonitoringComponent';
72
+ export * from './MonitoringComponent';
73
+ export * from './FlowList';
74
+ export * from './FlowExecution';