@evenicanpm/admin-integrate 1.2.2 → 1.4.0
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/documents/ConfigImport/configuration-import.ts +54 -0
- package/documents/CopyProcess/copy.ts +25 -0
- package/documents/Endpoint/fragments.ts +9 -0
- package/documents/Endpoint/list.ts +30 -0
- package/documents/Process/fragments.ts +22 -0
- package/documents/Process/get-process-details.ts +72 -0
- package/documents/Process/list.ts +24 -0
- package/documents/ProcessConfig/fragments.ts +116 -0
- package/documents/ProcessConfig/read.ts +35 -0
- package/documents/ProcessExecution/fragments.ts +12 -0
- package/documents/ProcessExecution/list.ts +30 -1
- package/documents/ProcessExecutionDetails/fragments.ts +96 -0
- package/documents/ProcessExecutionDetails/read.ts +12 -0
- package/documents/ProcessExport/read.ts +108 -0
- package/documents/ProcessScheduleGroup/read.ts +43 -0
- package/documents/ProcessTask/fragments.ts +288 -0
- package/documents/ProcessTask/read.ts +12 -0
- package/documents/ProcessTemplate/fragments.ts +74 -0
- package/documents/ProcessTemplate/list.ts +67 -0
- package/documents/ProcessTemplate/read.ts +12 -0
- package/documents/RunProcess/run.ts +11 -0
- package/package.json +4 -3
- package/src/api/Integrations/queries/get-process.query.ts +12 -12
- package/src/api/Integrations/queries/get-process.server.ts +7 -2
- package/src/api/configuration/queries/configuration-export.query.ts +48 -0
- package/src/api/configuration/queries/configuration-export.server.ts +9 -0
- package/src/api/configuration/queries/index.ts +1 -0
- package/src/api/dashboard/queries/get-process-executions.query.ts +6 -3
- package/src/api/dashboard/queries/get-process-executions.server.ts +1 -1
- package/src/api/execution-details/queries/get-process-execution-details.query.ts +46 -0
- package/src/api/execution-details/queries/get-process-execution-details.server.ts +11 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.query.ts +48 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.server.ts +11 -0
- package/src/api/execution-details/queries/index.ts +2 -0
- package/src/api/process/mutations/copy-process.mutation.ts +45 -0
- package/src/api/process/mutations/copy-process.server.ts +14 -0
- package/src/api/process/mutations/index.ts +2 -0
- package/src/api/process/mutations/run-process.mutation.ts +41 -0
- package/src/api/process/mutations/run-process.server.ts +14 -0
- package/src/api/process/queries/get-process-by-id.query.ts +85 -0
- package/src/api/process/queries/get-process-by-id.server.ts +20 -0
- package/src/api/process/queries/index.ts +4 -0
- package/src/api/process-config/mutation/index.ts +2 -0
- package/src/api/process-config/mutation/process-config-import.mutation.ts +42 -0
- package/src/api/process-config/mutation/process-config-import.server.ts +14 -0
- package/src/api/process-config/mutation/process-config-merge.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-merge.server.ts +14 -0
- package/src/api/process-task/queries/get-process-task-by-id.query.ts +46 -0
- package/src/api/process-task/queries/get-process-task-by-id.server.ts +9 -0
- package/src/api/process-task/queries/index.ts +1 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/mutation/index.ts +2 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.query.ts +48 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +3 -3
- package/src/api/scheduler/queries/get-process-schedule.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule.server.ts +3 -3
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +6 -3
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +1 -1
- package/src/api/scheduler/queries/index.ts +3 -2
- package/src/api/templates/queries/get-process-template-groups.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-groups.server.ts +11 -0
- package/src/api/templates/queries/get-process-template-records.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-records.server.ts +11 -0
- package/src/api/templates/queries/get-process-template.query.ts +48 -0
- package/src/api/templates/queries/get-process-template.server.ts +9 -0
- package/src/api/templates/queries/get-process-templates.query.ts +45 -0
- package/src/api/templates/queries/get-process-templates.server.ts +9 -0
- package/src/api/templates/queries/index.ts +5 -0
- package/src/api/templates/queries/template-input-search.query.ts +39 -0
- package/src/api/templates/queries/template-input-search.server.ts +42 -0
- package/src/api/templates/queries/types.ts +34 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +33 -6
- package/src/components/button/outlined-icon-button.tsx +2 -2
- package/src/components/core/date-time-popover.tsx +12 -5
- package/src/components/core/drawer-buttons.tsx +52 -0
- package/src/components/core/edited-typography.tsx +2 -2
- package/src/components/core/index.ts +4 -2
- package/src/components/core/loading.tsx +1 -1
- package/src/components/core/status-tag.tsx +97 -0
- package/src/components/core/title-edit.tsx +31 -22
- package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
- package/src/components/dashboard-list/dashboard-list.tsx +20 -16
- package/src/components/data-table/table-header.tsx +6 -8
- package/src/components/data-table/table-pagination.tsx +1 -1
- package/src/components/data-table/table-row.tsx +1 -1
- package/src/components/data-table/table-skeleton.tsx +10 -5
- package/src/components/execution/execution-filter.ts +1 -1
- package/src/components/execution/execution-status-icon.tsx +7 -7
- package/src/components/execution/execution-tag.tsx +12 -77
- package/src/components/execution/index.ts +1 -1
- package/src/components/execution-history-drawer/execution-history-drawer.tsx +202 -0
- package/src/components/execution-history-drawer/executions-card.tsx +85 -0
- package/src/components/execution-history-drawer/index.ts +1 -0
- package/src/components/footer/footer.tsx +10 -6
- package/src/components/header/dashboard-list-header.tsx +12 -7
- package/src/components/header/execution-details-header.tsx +35 -26
- package/src/components/header/header.tsx +10 -3
- package/src/components/header/index.ts +1 -1
- package/src/components/header/integration-details-header.tsx +108 -45
- package/src/components/integration-list/index.ts +2 -1
- package/src/components/integration-list/integration-filter.ts +1 -1
- package/src/components/integration-list/integration-status-icon.tsx +7 -8
- package/src/components/integration-list/integration-tag.tsx +6 -50
- package/src/components/integration-list/list/integration-list-row.tsx +161 -0
- package/src/components/integration-list/list/integration-list-table.tsx +62 -0
- package/src/{pages/integrations/integration-list → components/integration-list/list}/integration-list.tsx +47 -51
- package/src/components/integration-view/animated-svg.tsx +31 -0
- package/src/components/integration-view/edges/default-edge.tsx +2 -6
- package/src/components/integration-view/elk-layout-options.ts +2 -2
- package/src/components/integration-view/elk-types.ts +35 -6
- package/src/components/integration-view/flow-types.tsx +12 -0
- package/src/components/integration-view/integration-view.tsx +562 -56
- package/src/components/integration-view/nodes/add-node.tsx +20 -0
- package/src/components/integration-view/nodes/empty-node.tsx +65 -0
- package/src/components/integration-view/nodes/entry-node.tsx +98 -4
- package/src/components/integration-view/nodes/execution-entry-node.tsx +107 -0
- package/src/components/integration-view/nodes/execution-task-node.tsx +88 -0
- package/src/components/integration-view/nodes/group-node.tsx +33 -13
- package/src/components/integration-view/nodes/row-node.tsx +19 -0
- package/src/components/integration-view/nodes/task-node.tsx +50 -16
- package/src/components/integration-view/task-icon.tsx +193 -0
- package/src/components/integration-view/temp-data/initialElements.tsx +34 -32
- package/src/components/integration-view/types.ts +2 -2
- package/src/components/integration-view/utils/mapping.ts +404 -0
- package/src/components/layouts/main-layout.tsx +3 -4
- package/src/components/layouts/root-container.tsx +5 -11
- package/src/components/link-cards/link-card.tsx +15 -4
- package/src/components/link-cards/styles.ts +1 -1
- package/src/components/list-filter/date-filter.tsx +7 -4
- package/src/components/list-filter/date-range-filter.tsx +15 -7
- package/src/components/list-filter/index.ts +1 -1
- package/src/components/list-filter/list-filter.tsx +31 -26
- package/src/components/list-filter/multi-select-filter.tsx +11 -10
- package/src/components/list-filter/select-filter.tsx +23 -12
- package/src/components/scheduler/day-selector.tsx +29 -15
- package/src/components/scheduler/day-tag.tsx +14 -51
- package/src/components/scheduler/index.ts +2 -1
- package/src/components/scheduler/schedule-drawer/details-reducer.ts +217 -0
- package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +501 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +137 -100
- package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +94 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-skeleton.tsx +1 -2
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details.tsx +10 -14
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +214 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +7 -26
- package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +116 -0
- package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +130 -0
- package/src/components/scheduler/schedule-filter.ts +1 -1
- package/src/components/scheduler/schedule-icon.tsx +5 -6
- package/src/components/scheduler/schedule-integration-icon.tsx +31 -0
- package/src/components/templates/index.ts +1 -0
- package/src/components/templates/inputs/index.tsx +1392 -0
- package/src/components/templates/template-filter.ts +5 -0
- package/src/components/templates/templates-list/index.ts +1 -0
- package/src/components/templates/templates-list/templates-list-row.tsx +55 -0
- package/src/components/templates/templates-list/templates-list-table.tsx +58 -0
- package/src/components/templates/templates-list/templates-list.tsx +253 -0
- package/src/components/templates/types.tsx +76 -0
- package/src/components/templates/wizard.tsx +737 -0
- package/src/hooks/use-breadcrumbs.ts +1 -1
- package/src/hooks/use-recurrence.tsx +1 -2
- package/src/pages/dashboard/dashboard-link-cards.tsx +8 -11
- package/src/pages/dashboard/dashboard-list-sections.tsx +8 -10
- package/src/pages/dashboard/dashboard.tsx +1 -2
- package/src/pages/execution-details/execution-details.tsx +212 -14
- package/src/pages/execution-details/task-execution-details.tsx +160 -0
- package/src/pages/execution-details/task-execution-drawer.tsx +54 -0
- package/src/pages/executions/executions-list/executions-list-row.tsx +21 -27
- package/src/pages/executions/executions-list/executions-list-table.tsx +29 -36
- package/src/pages/executions/executions-list/executions-list.tsx +24 -18
- package/src/pages/executions/executions.tsx +11 -15
- package/src/pages/integration-create/index.ts +1 -0
- package/src/pages/integration-create/integration-create.tsx +216 -0
- package/src/pages/integration-create/pre-creation-step.tsx +84 -0
- package/src/pages/integration-create/select-step.tsx +105 -0
- package/src/pages/integration-create/template-list-step.tsx +77 -0
- package/src/pages/integration-create/wizard-step.tsx +51 -0
- package/src/pages/integration-details/import-process/copy-tasks-list.tsx +265 -0
- package/src/pages/integration-details/import-process/copy-tasks-row.tsx +77 -0
- package/src/pages/integration-details/import-process/import-confirm.tsx +61 -0
- package/src/pages/integration-details/import-process/import-drawer.tsx +48 -0
- package/src/pages/integration-details/import-process/import-process-reducer.ts +90 -0
- package/src/pages/integration-details/import-process/import-process.tsx +149 -0
- package/src/pages/integration-details/index.ts +1 -0
- package/src/pages/integration-details/integration-details.tsx +468 -0
- package/src/pages/integration-details/task-drawer/add-task.tsx +172 -0
- package/src/pages/integration-details/task-drawer/edit-task.tsx +161 -0
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +157 -0
- package/src/pages/integration-details/task-drawer/task-reducer.ts +103 -0
- package/src/pages/integrations/integrations.tsx +11 -14
- package/src/pages/scheduler/scheduler.tsx +12 -24
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +27 -37
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +28 -43
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +48 -21
- package/src/utils/date-functions.ts +69 -0
- package/src/utils/slugify.ts +3 -0
- package/tsconfig.json +12 -4
- package/src/hooks/use-timestamp.tsx +0 -25
- package/src/pages/integrations/integration-list/integration-list-row.tsx +0 -147
- package/src/pages/integrations/integration-list/integration-list-table.tsx +0 -78
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +0 -227
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +0 -77
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +0 -72
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +0 -103
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +0 -101
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +0 -93
- /package/src/{pages/integrations/integration-list → components/integration-list/list}/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/edited-types.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/index.ts +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GetNonScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./get-non-scheduled-processes.server";
|
|
8
|
+
|
|
9
|
+
export const buildNonScheduledProcessesQueryKey = {
|
|
10
|
+
all: () => ["getNonScheduledProcesses"] as const,
|
|
11
|
+
byInput: (variables?: GetNonScheduledProcessesQueryVariables) => [
|
|
12
|
+
"getNonScheduledProcesses",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const getNonScheduledProcesses = {
|
|
18
|
+
queryKey: buildNonScheduledProcessesQueryKey.all(),
|
|
19
|
+
|
|
20
|
+
prefetch: (
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
variables: GetNonScheduledProcessesQueryVariables,
|
|
23
|
+
) =>
|
|
24
|
+
queryClient.prefetchQuery({
|
|
25
|
+
queryKey: buildNonScheduledProcessesQueryKey.byInput(variables),
|
|
26
|
+
queryFn: () => queryFn(variables),
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
fetchData: async (
|
|
30
|
+
queryClient: QueryClient,
|
|
31
|
+
variables: GetNonScheduledProcessesQueryVariables,
|
|
32
|
+
) => {
|
|
33
|
+
return await queryClient.fetchQuery({
|
|
34
|
+
queryKey: buildNonScheduledProcessesQueryKey.byInput(variables),
|
|
35
|
+
queryFn: () => queryFn(variables),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
useData: (
|
|
40
|
+
variables: GetNonScheduledProcessesQueryVariables,
|
|
41
|
+
options?: UseQueryOptions,
|
|
42
|
+
) =>
|
|
43
|
+
useQuery({
|
|
44
|
+
queryKey: buildNonScheduledProcessesQueryKey.byInput(variables),
|
|
45
|
+
queryFn: () => queryFn(variables),
|
|
46
|
+
...options,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetNonScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (
|
|
6
|
+
variables: GetNonScheduledProcessesQueryVariables,
|
|
7
|
+
) => {
|
|
8
|
+
const sdk = await createGraphqlclient();
|
|
9
|
+
const { data } = await sdk.GetNonScheduledProcesses(variables);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GetProcessScheduleGroupDetailsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
2
7
|
import { queryFn } from "./get-process-schedule-group-details.server";
|
|
3
8
|
|
|
4
|
-
import { GetProcessScheduleGroupDetailsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
5
|
-
|
|
6
9
|
export const buildProcessScheduleGroupDetailsQueryKey = {
|
|
7
10
|
all: () => ["getProcessScheduleGroupDetails"] as const,
|
|
8
11
|
byInput: (variables?: GetProcessScheduleGroupDetailsQueryVariables) => [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use server";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
GetProcessScheduleGroupDetailsQueryVariables,
|
|
2
|
+
import type {
|
|
5
3
|
GetProcessScheduleGroupDetailsQuery,
|
|
4
|
+
GetProcessScheduleGroupDetailsQueryVariables,
|
|
6
5
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
7
|
|
|
8
8
|
export const queryFn = async (
|
|
9
9
|
variables: GetProcessScheduleGroupDetailsQueryVariables,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GetProcessScheduleByIdQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
2
7
|
import { queryFn } from "./get-process-schedule.server";
|
|
3
8
|
|
|
4
|
-
import { GetProcessScheduleByIdQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
5
|
-
|
|
6
9
|
export const buildProcessScheduleQueryKey = {
|
|
7
10
|
all: () => ["getProcessScheduleGroupById"] as const,
|
|
8
11
|
byInput: (variables?: GetProcessScheduleByIdQueryVariables) => [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use server";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
GetProcessScheduleByIdQueryVariables,
|
|
2
|
+
import type {
|
|
5
3
|
GetProcessScheduleByIdQuery,
|
|
4
|
+
GetProcessScheduleByIdQueryVariables,
|
|
6
5
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
7
|
|
|
8
8
|
export const queryFn = async (
|
|
9
9
|
variables: GetProcessScheduleByIdQueryVariables,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
2
7
|
import { queryFn } from "./get-scheduled-processes.server";
|
|
3
8
|
|
|
4
|
-
import { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
5
|
-
|
|
6
9
|
export const buildScheduledProcessesQueryKey = {
|
|
7
10
|
all: () => ["getScheduledProcesses"] as const,
|
|
8
11
|
byInput: (variables?: GetScheduledProcessesQueryVariables) => [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use server";
|
|
2
|
+
import type { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
3
|
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
3
|
-
import { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
4
4
|
|
|
5
5
|
export const queryFn = async (
|
|
6
6
|
variables: GetScheduledProcessesQueryVariables,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { getProcessScheduleGroupDetails } from "./get-process-schedule-group-details.query";
|
|
1
|
+
export { getNonScheduledProcesses } from "./get-non-scheduled-processes.query";
|
|
3
2
|
export { getProcessScheduleById } from "./get-process-schedule.query";
|
|
3
|
+
export { getProcessScheduleGroupDetails } from "./get-process-schedule-group-details.query";
|
|
4
|
+
export { getScheduledProcesses } from "./get-scheduled-processes.query";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GetProcessTemplateGroupsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./get-process-template-groups.server";
|
|
8
|
+
|
|
9
|
+
export const buildProcessTemplateGroupsQueryKey = {
|
|
10
|
+
all: () => ["getProcessTemplateGroups"] as const,
|
|
11
|
+
byInput: (variables?: GetProcessTemplateGroupsQueryVariables) => [
|
|
12
|
+
"getProcessTemplateGroups",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const getProcessTemplateGroups = {
|
|
18
|
+
queryKey: buildProcessTemplateGroupsQueryKey.all(),
|
|
19
|
+
|
|
20
|
+
prefetch: (
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
variables: GetProcessTemplateGroupsQueryVariables,
|
|
23
|
+
) =>
|
|
24
|
+
queryClient.prefetchQuery({
|
|
25
|
+
queryKey: buildProcessTemplateGroupsQueryKey.byInput(variables),
|
|
26
|
+
queryFn: () => queryFn(variables),
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
fetchData: async (
|
|
30
|
+
queryClient: QueryClient,
|
|
31
|
+
variables: GetProcessTemplateGroupsQueryVariables,
|
|
32
|
+
) => {
|
|
33
|
+
return await queryClient.fetchQuery({
|
|
34
|
+
queryKey: buildProcessTemplateGroupsQueryKey.byInput(variables),
|
|
35
|
+
queryFn: () => queryFn(variables),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
useData: (
|
|
40
|
+
variables: GetProcessTemplateGroupsQueryVariables,
|
|
41
|
+
options?: UseQueryOptions,
|
|
42
|
+
) =>
|
|
43
|
+
useQuery({
|
|
44
|
+
queryKey: buildProcessTemplateGroupsQueryKey.byInput(variables),
|
|
45
|
+
queryFn: () => queryFn(variables),
|
|
46
|
+
...options,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetProcessTemplateGroupsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (
|
|
6
|
+
variables: GetProcessTemplateGroupsQueryVariables,
|
|
7
|
+
) => {
|
|
8
|
+
const sdk = await createGraphqlclient();
|
|
9
|
+
const { data } = await sdk.GetProcessTemplateGroups(variables);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GetProcessTemplateRecordsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./get-process-template-records.server";
|
|
8
|
+
|
|
9
|
+
export const buildProcessTemplateRecordsQueryKey = {
|
|
10
|
+
all: () => ["getProcessTemplateRecords"] as const,
|
|
11
|
+
byInput: (variables?: GetProcessTemplateRecordsQueryVariables) => [
|
|
12
|
+
"getProcessTemplateRecords",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const getProcessTemplateRecords = {
|
|
18
|
+
queryKey: buildProcessTemplateRecordsQueryKey.all(),
|
|
19
|
+
|
|
20
|
+
prefetch: (
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
variables: GetProcessTemplateRecordsQueryVariables,
|
|
23
|
+
) =>
|
|
24
|
+
queryClient.prefetchQuery({
|
|
25
|
+
queryKey: buildProcessTemplateRecordsQueryKey.byInput(variables),
|
|
26
|
+
queryFn: () => queryFn(variables),
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
fetchData: async (
|
|
30
|
+
queryClient: QueryClient,
|
|
31
|
+
variables: GetProcessTemplateRecordsQueryVariables,
|
|
32
|
+
) => {
|
|
33
|
+
return await queryClient.fetchQuery({
|
|
34
|
+
queryKey: buildProcessTemplateRecordsQueryKey.byInput(variables),
|
|
35
|
+
queryFn: () => queryFn(variables),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
useData: (
|
|
40
|
+
variables: GetProcessTemplateRecordsQueryVariables,
|
|
41
|
+
options?: UseQueryOptions,
|
|
42
|
+
) =>
|
|
43
|
+
useQuery({
|
|
44
|
+
queryKey: buildProcessTemplateRecordsQueryKey.byInput(variables),
|
|
45
|
+
queryFn: () => queryFn(variables),
|
|
46
|
+
...options,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetProcessTemplateRecordsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (
|
|
6
|
+
variables: GetProcessTemplateRecordsQueryVariables,
|
|
7
|
+
) => {
|
|
8
|
+
const sdk = await createGraphqlclient();
|
|
9
|
+
const { data } = await sdk.GetProcessTemplateRecords(variables);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GetProcessTemplateQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./get-process-template.server";
|
|
8
|
+
|
|
9
|
+
export const buildProcessTemplateQueryKey = {
|
|
10
|
+
all: () => ["getProcessTemplate"] as const,
|
|
11
|
+
byInput: (variables?: GetProcessTemplateQueryVariables) => [
|
|
12
|
+
"getProcessTemplate",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const getProcessTemplate = {
|
|
18
|
+
queryKey: buildProcessTemplateQueryKey.all(),
|
|
19
|
+
|
|
20
|
+
prefetch: (
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
variables: GetProcessTemplateQueryVariables,
|
|
23
|
+
) =>
|
|
24
|
+
queryClient.prefetchQuery({
|
|
25
|
+
queryKey: buildProcessTemplateQueryKey.byInput(variables),
|
|
26
|
+
queryFn: () => queryFn(variables),
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
fetchData: async (
|
|
30
|
+
queryClient: QueryClient,
|
|
31
|
+
variables: GetProcessTemplateQueryVariables,
|
|
32
|
+
) => {
|
|
33
|
+
return await queryClient.fetchQuery({
|
|
34
|
+
queryKey: buildProcessTemplateQueryKey.byInput(variables),
|
|
35
|
+
queryFn: () => queryFn(variables),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
useData: (
|
|
40
|
+
variables: GetProcessTemplateQueryVariables,
|
|
41
|
+
options?: UseQueryOptions,
|
|
42
|
+
) =>
|
|
43
|
+
useQuery({
|
|
44
|
+
queryKey: buildProcessTemplateQueryKey.byInput(variables),
|
|
45
|
+
queryFn: () => queryFn(variables),
|
|
46
|
+
...options,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetProcessTemplateQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (variables: GetProcessTemplateQueryVariables) => {
|
|
6
|
+
const sdk = await createGraphqlclient();
|
|
7
|
+
const { data } = await sdk.GetProcessTemplate(variables);
|
|
8
|
+
return data;
|
|
9
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { GetProcessTemplatesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./get-process-templates.server";
|
|
8
|
+
|
|
9
|
+
export const buildProcessTemplatesQueryKey = {
|
|
10
|
+
byInput: (variables?: GetProcessTemplatesQueryVariables) => [
|
|
11
|
+
"getProcessTemplates",
|
|
12
|
+
variables,
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const getProcessTemplates = {
|
|
17
|
+
prefetch: (
|
|
18
|
+
queryClient: QueryClient,
|
|
19
|
+
variables: GetProcessTemplatesQueryVariables,
|
|
20
|
+
) =>
|
|
21
|
+
queryClient.prefetchQuery({
|
|
22
|
+
queryKey: buildProcessTemplatesQueryKey.byInput(variables),
|
|
23
|
+
queryFn: () => queryFn(variables),
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
fetchData: async (
|
|
27
|
+
queryClient: QueryClient,
|
|
28
|
+
variables: GetProcessTemplatesQueryVariables,
|
|
29
|
+
) => {
|
|
30
|
+
return await queryClient.fetchQuery({
|
|
31
|
+
queryKey: buildProcessTemplatesQueryKey.byInput(variables),
|
|
32
|
+
queryFn: () => queryFn(variables),
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
useData: (
|
|
37
|
+
variables: GetProcessTemplatesQueryVariables,
|
|
38
|
+
options?: UseQueryOptions,
|
|
39
|
+
) =>
|
|
40
|
+
useQuery({
|
|
41
|
+
queryKey: buildProcessTemplatesQueryKey.byInput(variables),
|
|
42
|
+
queryFn: () => queryFn(variables),
|
|
43
|
+
...options,
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetProcessTemplatesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (variables: GetProcessTemplatesQueryVariables) => {
|
|
6
|
+
const sdk = await createGraphqlclient();
|
|
7
|
+
const { data } = await sdk.GetProcessTemplates(variables);
|
|
8
|
+
return data;
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { getProcessTemplate } from "./get-process-template.query";
|
|
2
|
+
export { getProcessTemplateGroups } from "./get-process-template-groups.query";
|
|
3
|
+
export { getProcessTemplateRecords } from "./get-process-template-records.query";
|
|
4
|
+
export { getProcessTemplates } from "./get-process-templates.query";
|
|
5
|
+
export { templateInputSearch } from "./template-input-search.query";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CheckUniqueIdentifierQueryVariables,
|
|
3
|
+
GetDataDescriptionsQueryVariables,
|
|
4
|
+
GetSourceEndpointsQueryVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./template-input-search.server";
|
|
8
|
+
import type {
|
|
9
|
+
TemplateInputSearchQueryKey,
|
|
10
|
+
TemplateInputSearchQueryVariables,
|
|
11
|
+
} from "./types";
|
|
12
|
+
|
|
13
|
+
export const buildTemplateSearchQueryKey = {
|
|
14
|
+
getSourceEndpoints: (variables: GetSourceEndpointsQueryVariables) => [
|
|
15
|
+
"getSourceEndpoints",
|
|
16
|
+
variables,
|
|
17
|
+
],
|
|
18
|
+
getDataDescriptions: (variables: GetDataDescriptionsQueryVariables) => [
|
|
19
|
+
"getDataDescriptions",
|
|
20
|
+
variables,
|
|
21
|
+
],
|
|
22
|
+
checkUniqueIdentifier: (variables: CheckUniqueIdentifierQueryVariables) => [
|
|
23
|
+
"checkUniqueIdentifier",
|
|
24
|
+
variables,
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const templateInputSearch = {
|
|
29
|
+
useData: (
|
|
30
|
+
variables: TemplateInputSearchQueryVariables,
|
|
31
|
+
queryKey: TemplateInputSearchQueryKey,
|
|
32
|
+
options?: UseQueryOptions,
|
|
33
|
+
) =>
|
|
34
|
+
useQuery({
|
|
35
|
+
queryKey: buildTemplateSearchQueryKey[queryKey](variables),
|
|
36
|
+
queryFn: () => queryFn(variables, queryKey),
|
|
37
|
+
...options,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
CheckUniqueIdentifierQueryVariables,
|
|
4
|
+
GetDataDescriptionsQueryVariables,
|
|
5
|
+
GetSourceEndpointsQueryVariables,
|
|
6
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
7
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
8
|
+
import type {
|
|
9
|
+
TemplateInputSearchQueryKey,
|
|
10
|
+
TemplateInputSearchQueryVariables,
|
|
11
|
+
} from "./types";
|
|
12
|
+
|
|
13
|
+
export const queryFn = async (
|
|
14
|
+
variables: TemplateInputSearchQueryVariables | string,
|
|
15
|
+
queryKey: TemplateInputSearchQueryKey,
|
|
16
|
+
) => {
|
|
17
|
+
const sdk = await createGraphqlclient();
|
|
18
|
+
|
|
19
|
+
switch (queryKey) {
|
|
20
|
+
case "getSourceEndpoints": {
|
|
21
|
+
const { data } = await sdk.GetSourceEndpoints(
|
|
22
|
+
variables as GetSourceEndpointsQueryVariables,
|
|
23
|
+
);
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
case "getDataDescriptions": {
|
|
27
|
+
const { data } = await sdk.GetDataDescriptions(
|
|
28
|
+
variables as GetDataDescriptionsQueryVariables,
|
|
29
|
+
);
|
|
30
|
+
return data;
|
|
31
|
+
}
|
|
32
|
+
case "checkUniqueIdentifier": {
|
|
33
|
+
const { data } = await sdk.CheckUniqueIdentifier(
|
|
34
|
+
variables as CheckUniqueIdentifierQueryVariables,
|
|
35
|
+
);
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
default: {
|
|
39
|
+
throw new Error(`queryKey "${queryKey}" invalid`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GetDataDescriptionsQuery,
|
|
3
|
+
GetDataDescriptionsQueryVariables,
|
|
4
|
+
GetSourceEndpointsQuery,
|
|
5
|
+
GetSourceEndpointsQueryVariables,
|
|
6
|
+
CheckUniqueIdentifierQuery,
|
|
7
|
+
CheckUniqueIdentifierQueryVariables,
|
|
8
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
9
|
+
|
|
10
|
+
export type TemplateInputSearchQueryVariables =
|
|
11
|
+
| GetSourceEndpointsQueryVariables
|
|
12
|
+
| GetDataDescriptionsQueryVariables
|
|
13
|
+
| CheckUniqueIdentifierQueryVariables;
|
|
14
|
+
|
|
15
|
+
export type TemplateInputSearchQuery =
|
|
16
|
+
| GetSourceEndpointsQuery
|
|
17
|
+
| GetDataDescriptionsQuery
|
|
18
|
+
| CheckUniqueIdentifierQuery;
|
|
19
|
+
|
|
20
|
+
export type TemplateInputSearchQueryKey =
|
|
21
|
+
| "getSourceEndpoints"
|
|
22
|
+
| "getDataDescriptions"
|
|
23
|
+
| "checkUniqueIdentifier";
|
|
24
|
+
|
|
25
|
+
export const isTemplateInputSearchQueryKey = (
|
|
26
|
+
qn: string,
|
|
27
|
+
): qn is TemplateInputSearchQueryKey => {
|
|
28
|
+
const keys: TemplateInputSearchQueryKey[] = [
|
|
29
|
+
"getSourceEndpoints",
|
|
30
|
+
"getDataDescriptions",
|
|
31
|
+
"checkUniqueIdentifier",
|
|
32
|
+
];
|
|
33
|
+
return keys.includes(qn as TemplateInputSearchQueryKey);
|
|
34
|
+
};
|
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
|
|
2
|
+
import { Breadcrumbs, Button, Typography } from "@mui/material";
|
|
4
3
|
// MUI
|
|
5
4
|
import styled from "@mui/material/styles/styled";
|
|
6
|
-
import
|
|
5
|
+
import Link from "next/link";
|
|
6
|
+
import { usePathname, useRouter } from "next/navigation";
|
|
7
7
|
|
|
8
|
-
import { Crumb } from "./types";
|
|
8
|
+
import type { Crumb } from "./types";
|
|
9
9
|
|
|
10
10
|
// STYLED COMPONENTS
|
|
11
11
|
export const Wrapper = styled("div")(({ theme }) => ({
|
|
12
12
|
padding: theme.spacing(0, 1, 3),
|
|
13
|
+
display: "flex",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
justifyContent: "space-between",
|
|
13
16
|
}));
|
|
14
17
|
|
|
15
18
|
type Props = {
|
|
16
19
|
breadcrumbs: Crumb[];
|
|
17
20
|
};
|
|
18
21
|
|
|
19
|
-
export default function IntegrateBreadcrumbs({ breadcrumbs }: Props) {
|
|
22
|
+
export default function IntegrateBreadcrumbs({ breadcrumbs }: Readonly<Props>) {
|
|
23
|
+
const router = useRouter();
|
|
24
|
+
const pathname = usePathname();
|
|
25
|
+
|
|
26
|
+
const showBackButton = /^\/e4integrate\/(integrations|executions)\/\w+/.test(
|
|
27
|
+
pathname || "",
|
|
28
|
+
);
|
|
29
|
+
|
|
20
30
|
return (
|
|
21
31
|
<Wrapper>
|
|
22
32
|
<Breadcrumbs>
|
|
@@ -34,6 +44,23 @@ export default function IntegrateBreadcrumbs({ breadcrumbs }: Props) {
|
|
|
34
44
|
),
|
|
35
45
|
)}
|
|
36
46
|
</Breadcrumbs>
|
|
47
|
+
{showBackButton ? (
|
|
48
|
+
<Button
|
|
49
|
+
variant="text"
|
|
50
|
+
size="small"
|
|
51
|
+
color="info"
|
|
52
|
+
onClick={() => router.back()}
|
|
53
|
+
sx={{
|
|
54
|
+
textTransform: "none",
|
|
55
|
+
minWidth: "auto",
|
|
56
|
+
backgroundColor: "transparent",
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<ArrowBackIosIcon sx={{ width: "14px" }} /> Back
|
|
60
|
+
</Button>
|
|
61
|
+
) : (
|
|
62
|
+
<div />
|
|
63
|
+
)}
|
|
37
64
|
</Wrapper>
|
|
38
65
|
);
|
|
39
66
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { toLongDate } from "@evenicanpm/admin-integrate/utils/date-functions";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Popover,
|
|
5
|
+
type PopoverProps,
|
|
6
|
+
type Theme,
|
|
7
|
+
Typography,
|
|
8
|
+
useTheme,
|
|
9
|
+
} from "@mui/material";
|
|
3
10
|
|
|
4
11
|
interface Props extends PopoverProps {
|
|
5
12
|
dateIsoString: string;
|
|
@@ -8,16 +15,16 @@ interface Props extends PopoverProps {
|
|
|
8
15
|
export default function DateTimePopover({
|
|
9
16
|
dateIsoString,
|
|
10
17
|
...popoverProps
|
|
11
|
-
}: Props) {
|
|
18
|
+
}: Readonly<Props>) {
|
|
12
19
|
const theme = useTheme();
|
|
13
20
|
const styles = getStyles(theme);
|
|
14
21
|
|
|
15
|
-
const
|
|
22
|
+
const formatted = toLongDate(dateIsoString);
|
|
16
23
|
|
|
17
24
|
return (
|
|
18
25
|
<Popover {...popoverProps}>
|
|
19
26
|
<Box sx={styles.popover}>
|
|
20
|
-
<Typography>{
|
|
27
|
+
<Typography>{formatted}</Typography>
|
|
21
28
|
</Box>
|
|
22
29
|
</Popover>
|
|
23
30
|
);
|