@evenicanpm/admin-integrate 1.2.2 → 1.3.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 +22 -0
- package/documents/Process/fragments.ts +22 -0
- package/documents/Process/get-process-details.ts +73 -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/ProcessScheduleGroup/read.ts +43 -0
- package/documents/ProcessTask/fragments.ts +285 -0
- package/documents/ProcessTask/read.ts +12 -0
- package/documents/ProcessTemplate/fragments.ts +69 -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/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 +48 -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 +33 -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 +45 -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 +34 -0
- package/src/api/templates/queries/template-input-search.server.ts +35 -0
- package/src/api/templates/queries/types.ts +28 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +32 -5
- package/src/components/button/outlined-icon-button.tsx +2 -2
- package/src/components/core/date-time-popover.tsx +11 -4
- package/src/components/core/drawer-buttons.tsx +52 -0
- package/src/components/core/edited-typography.tsx +1 -1
- 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 +18 -11
- package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
- package/src/components/dashboard-list/dashboard-list.tsx +19 -15
- package/src/components/data-table/table-header.tsx +5 -7
- 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 +9 -4
- 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 +203 -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 +104 -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 +1 -1
- 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 +10 -0
- package/src/components/integration-view/integration-view.tsx +990 -55
- 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 +19 -13
- package/src/components/integration-view/nodes/row-node.tsx +19 -0
- package/src/components/integration-view/nodes/task-node.tsx +14 -8
- package/src/components/integration-view/task-icon.tsx +193 -0
- package/src/components/integration-view/temp-data/initialElements.tsx +36 -32
- package/src/components/integration-view/types.ts +2 -2
- package/src/components/layouts/main-layout.tsx +2 -3
- package/src/components/layouts/root-container.tsx +3 -6
- 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 +4 -3
- package/src/components/list-filter/date-range-filter.tsx +11 -5
- package/src/components/list-filter/index.ts +1 -1
- package/src/components/list-filter/list-filter.tsx +30 -25
- package/src/components/list-filter/multi-select-filter.tsx +11 -10
- package/src/components/list-filter/select-filter.tsx +13 -8
- 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 +503 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +136 -99
- 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 +9 -13
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +218 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +6 -25
- 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 +1351 -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 +75 -0
- package/src/components/templates/wizard.tsx +689 -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 +7 -9
- package/src/pages/dashboard/dashboard.tsx +1 -2
- package/src/pages/execution-details/execution-details.tsx +211 -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 +28 -35
- 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 +174 -0
- package/src/pages/integration-create/pre-creation-step.tsx +12 -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 +50 -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 +221 -0
- package/src/pages/integration-details/task-drawer/add-task.tsx +120 -0
- package/src/pages/integration-details/task-drawer/edit-task.tsx +175 -0
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +139 -0
- package/src/pages/integration-details/task-drawer/task-reducer.ts +73 -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 +27 -42
- 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 { CopyProcessMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
+
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
|
+
import { buildProcessScheduleGroupDetailsQueryKey } from "@evenicanpm/admin-integrate/api/scheduler/queries/get-process-schedule-group-details.query";
|
|
5
|
+
import { buildScheduledProcessesQueryKey } from "@evenicanpm/admin-integrate/api/scheduler/queries/get-scheduled-processes.query";
|
|
6
|
+
import { useMutation } from "@tanstack/react-query";
|
|
7
|
+
import { mutationFn } from "./copy-process.server";
|
|
8
|
+
|
|
9
|
+
export const buildCopyProcessMutationKey = {
|
|
10
|
+
all: () => ["copyProcess"] as const,
|
|
11
|
+
byInput: (variables?: CopyProcessMutationVariables) => [
|
|
12
|
+
"copyProcess",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const copyProcess = () => {
|
|
18
|
+
const queryClient = getQueryClient();
|
|
19
|
+
|
|
20
|
+
return useMutation({
|
|
21
|
+
mutationKey: buildCopyProcessMutationKey.all(),
|
|
22
|
+
|
|
23
|
+
mutationFn: async (variables: CopyProcessMutationVariables) => {
|
|
24
|
+
return mutationFn(variables);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
Promise.all([
|
|
29
|
+
queryClient.invalidateQueries({
|
|
30
|
+
queryKey: buildScheduledProcessesQueryKey.all(),
|
|
31
|
+
}),
|
|
32
|
+
queryClient.invalidateQueries({
|
|
33
|
+
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
34
|
+
}),
|
|
35
|
+
queryClient.invalidateQueries({
|
|
36
|
+
queryKey: buildProcessByIdQueryKey.all(),
|
|
37
|
+
}),
|
|
38
|
+
queryClient.invalidateQueries({
|
|
39
|
+
queryKey: buildProcessByIdQueryKey.allWithTasks(),
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
onError: (error) => {
|
|
45
|
+
console.error("CopyProcess failed:", error);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
CopyProcessMutation,
|
|
4
|
+
CopyProcessMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const mutationFn = async (
|
|
9
|
+
variables: CopyProcessMutationVariables,
|
|
10
|
+
): Promise<CopyProcessMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.CopyProcess(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { RunProcessWebhookMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
+
import { buildProcessExecutionsQueryKey } from "@evenicanpm/admin-integrate/api/dashboard/queries/get-process-executions.query";
|
|
4
|
+
import { buildProcessExecutionDetailsQueryKey } from "@evenicanpm/admin-integrate/api/execution-details/queries/get-process-execution-details.query";
|
|
5
|
+
import { buildProcessExecutionsByProcessQueryKey } from "@evenicanpm/admin-integrate/api/execution-details/queries/get-process-executions-by-process.query";
|
|
6
|
+
import { useMutation } from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./run-process.server";
|
|
8
|
+
|
|
9
|
+
export const buildRunProcessMutationKey = {
|
|
10
|
+
webhook: () => ["runProcessWebhook"] as const,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const runProcessWebhook = () => {
|
|
14
|
+
const queryClient = getQueryClient();
|
|
15
|
+
|
|
16
|
+
return useMutation({
|
|
17
|
+
mutationKey: buildRunProcessMutationKey.webhook(),
|
|
18
|
+
|
|
19
|
+
mutationFn: async (variables: RunProcessWebhookMutationVariables) => {
|
|
20
|
+
return await queryFn(variables);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
onSuccess: () => {
|
|
24
|
+
Promise.all([
|
|
25
|
+
queryClient.invalidateQueries({
|
|
26
|
+
queryKey: buildProcessExecutionsQueryKey.all(),
|
|
27
|
+
}),
|
|
28
|
+
queryClient.invalidateQueries({
|
|
29
|
+
queryKey: buildProcessExecutionDetailsQueryKey.all(),
|
|
30
|
+
}),
|
|
31
|
+
queryClient.invalidateQueries({
|
|
32
|
+
queryKey: buildProcessExecutionsByProcessQueryKey.all(),
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
onError: (error) => {
|
|
38
|
+
console.error("RunProcessWebhook failed:", error);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
RunProcessWebhookMutation,
|
|
4
|
+
RunProcessWebhookMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (
|
|
9
|
+
variables: RunProcessWebhookMutationVariables,
|
|
10
|
+
): Promise<RunProcessWebhookMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.RunProcessWebhook(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GetProcessByIdQueryVariables,
|
|
3
|
+
GetProcessByIdWithTasksQueryVariables,
|
|
4
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
5
|
+
import {
|
|
6
|
+
type QueryClient,
|
|
7
|
+
type UseQueryOptions,
|
|
8
|
+
useQuery,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { queryFn, queryFnTasks } from "./get-process-by-id.server";
|
|
11
|
+
|
|
12
|
+
export const buildProcessByIdQueryKey = {
|
|
13
|
+
all: () => ["getProcessById"] as const,
|
|
14
|
+
byInput: (variables?: GetProcessByIdQueryVariables) => [
|
|
15
|
+
"getProcessById",
|
|
16
|
+
variables,
|
|
17
|
+
],
|
|
18
|
+
allWithTasks: () => ["getProcessByIdWithTasks"] as const,
|
|
19
|
+
withTasks: (variables?: GetProcessByIdWithTasksQueryVariables) => [
|
|
20
|
+
"getProcessByIdWithTasks",
|
|
21
|
+
variables,
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const getProcessById = {
|
|
26
|
+
prefetch: (
|
|
27
|
+
queryClient: QueryClient,
|
|
28
|
+
variables: GetProcessByIdQueryVariables,
|
|
29
|
+
) =>
|
|
30
|
+
queryClient.prefetchQuery({
|
|
31
|
+
queryKey: buildProcessByIdQueryKey.byInput(variables),
|
|
32
|
+
queryFn: () => queryFn(variables),
|
|
33
|
+
}),
|
|
34
|
+
|
|
35
|
+
fetchData: async (
|
|
36
|
+
queryClient: QueryClient,
|
|
37
|
+
variables: GetProcessByIdQueryVariables,
|
|
38
|
+
) => {
|
|
39
|
+
return await queryClient.fetchQuery({
|
|
40
|
+
queryKey: buildProcessByIdQueryKey.byInput(variables),
|
|
41
|
+
queryFn: () => queryFn(variables),
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
useData: (
|
|
46
|
+
variables: GetProcessByIdQueryVariables,
|
|
47
|
+
options?: UseQueryOptions,
|
|
48
|
+
) =>
|
|
49
|
+
useQuery({
|
|
50
|
+
queryKey: buildProcessByIdQueryKey.byInput(variables),
|
|
51
|
+
queryFn: () => queryFn(variables),
|
|
52
|
+
...options,
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const getProcessByIdWithTasks = {
|
|
57
|
+
prefetch: (
|
|
58
|
+
queryClient: QueryClient,
|
|
59
|
+
variables: GetProcessByIdWithTasksQueryVariables,
|
|
60
|
+
) =>
|
|
61
|
+
queryClient.prefetchQuery({
|
|
62
|
+
queryKey: buildProcessByIdQueryKey.withTasks(variables),
|
|
63
|
+
queryFn: () => queryFnTasks(variables),
|
|
64
|
+
}),
|
|
65
|
+
|
|
66
|
+
fetchData: async (
|
|
67
|
+
queryClient: QueryClient,
|
|
68
|
+
variables: GetProcessByIdWithTasksQueryVariables,
|
|
69
|
+
) => {
|
|
70
|
+
return await queryClient.fetchQuery({
|
|
71
|
+
queryKey: buildProcessByIdQueryKey.withTasks(variables),
|
|
72
|
+
queryFn: () => queryFnTasks(variables),
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
useData: (
|
|
77
|
+
variables: GetProcessByIdWithTasksQueryVariables,
|
|
78
|
+
options?: UseQueryOptions,
|
|
79
|
+
) =>
|
|
80
|
+
useQuery({
|
|
81
|
+
queryKey: buildProcessByIdQueryKey.withTasks(variables),
|
|
82
|
+
queryFn: () => queryFnTasks(variables),
|
|
83
|
+
...options,
|
|
84
|
+
}),
|
|
85
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
GetProcessByIdQueryVariables,
|
|
4
|
+
GetProcessByIdWithTasksQueryVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (variables: GetProcessByIdQueryVariables) => {
|
|
9
|
+
const sdk = await createGraphqlclient();
|
|
10
|
+
const { data } = await sdk.GetProcessById(variables);
|
|
11
|
+
return data;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const queryFnTasks = async (
|
|
15
|
+
variables: GetProcessByIdWithTasksQueryVariables,
|
|
16
|
+
) => {
|
|
17
|
+
const sdk = await createGraphqlclient();
|
|
18
|
+
const { data } = await sdk.GetProcessByIdWithTasks(variables);
|
|
19
|
+
return data;
|
|
20
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ConfigurationImportMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { queryFn } from "./process-config-import.server";
|
|
4
|
+
|
|
5
|
+
export const buildProcessScheduleGroupDetailsQueryKey = {
|
|
6
|
+
all: () => ["configurationImport"] as const,
|
|
7
|
+
byInput: (variables?: ConfigurationImportMutationVariables) => [
|
|
8
|
+
"configurationImport",
|
|
9
|
+
variables,
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const processConfigImport = () => {
|
|
14
|
+
const queryClient = useQueryClient();
|
|
15
|
+
|
|
16
|
+
return useMutation({
|
|
17
|
+
mutationKey: ["configurationImport"],
|
|
18
|
+
|
|
19
|
+
mutationFn: async (variables: ConfigurationImportMutationVariables) => {
|
|
20
|
+
return await queryFn(variables);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
onSuccess: () => {
|
|
24
|
+
queryClient.invalidateQueries({
|
|
25
|
+
queryKey: ["getScheduledProcesses"],
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
onError: (error) => {
|
|
30
|
+
console.error("Update failed:", error);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
ConfigurationImportMutation,
|
|
4
|
+
ConfigurationImportMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (
|
|
9
|
+
variables: ConfigurationImportMutationVariables,
|
|
10
|
+
): Promise<ConfigurationImportMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.ConfigurationImport(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ConfigurationMergeMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { queryFn } from "./process-config-merge.server";
|
|
4
|
+
|
|
5
|
+
export const buildProcessScheduleGroupDetailsQueryKey = {
|
|
6
|
+
all: () => ["configurationMerge"] as const,
|
|
7
|
+
byInput: (variables?: ConfigurationMergeMutationVariables) => [
|
|
8
|
+
"configurationMerge",
|
|
9
|
+
variables,
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const processConfigMerge = () => {
|
|
14
|
+
const queryClient = useQueryClient();
|
|
15
|
+
|
|
16
|
+
return useMutation({
|
|
17
|
+
mutationKey: ["configurationMerge"],
|
|
18
|
+
|
|
19
|
+
mutationFn: async (variables: ConfigurationMergeMutationVariables) => {
|
|
20
|
+
return await queryFn(variables);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
onSuccess: () => {
|
|
24
|
+
queryClient.invalidateQueries({
|
|
25
|
+
queryKey: ["getScheduledProcesses"],
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
onError: (error) => {
|
|
30
|
+
console.error("Update failed:", error);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
ConfigurationMergeMutation,
|
|
4
|
+
ConfigurationMergeMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (
|
|
9
|
+
variables: ConfigurationMergeMutationVariables,
|
|
10
|
+
): Promise<ConfigurationMergeMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.ConfigurationMerge(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { GetProcessByIdQueryVariables as GetProcessTaskByIdQueryVariables } 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-task-by-id.server";
|
|
8
|
+
|
|
9
|
+
export const buildProcessTaskByIdQueryKey = {
|
|
10
|
+
byInput: (variables?: GetProcessTaskByIdQueryVariables) => [
|
|
11
|
+
"getProcessTaskById",
|
|
12
|
+
variables,
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const getProcessTaskById = {
|
|
17
|
+
prefetch: (
|
|
18
|
+
queryClient: QueryClient,
|
|
19
|
+
variables: GetProcessTaskByIdQueryVariables,
|
|
20
|
+
) =>
|
|
21
|
+
queryClient.prefetchQuery({
|
|
22
|
+
queryKey: buildProcessTaskByIdQueryKey.byInput(variables),
|
|
23
|
+
queryFn: () => queryFn(variables),
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
fetchData: async (
|
|
27
|
+
queryClient: QueryClient,
|
|
28
|
+
variables: GetProcessTaskByIdQueryVariables,
|
|
29
|
+
) => {
|
|
30
|
+
return await queryClient.fetchQuery({
|
|
31
|
+
queryKey: buildProcessTaskByIdQueryKey.byInput(variables),
|
|
32
|
+
queryFn: () => queryFn(variables),
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
useData: (
|
|
37
|
+
variables: GetProcessTaskByIdQueryVariables,
|
|
38
|
+
options?: UseQueryOptions,
|
|
39
|
+
) =>
|
|
40
|
+
useQuery({
|
|
41
|
+
queryKey: buildProcessTaskByIdQueryKey.byInput(variables),
|
|
42
|
+
queryFn: () => queryFn(variables),
|
|
43
|
+
...options,
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { GetProcessTaskByIdQueryVariables } 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: GetProcessTaskByIdQueryVariables) => {
|
|
6
|
+
const sdk = await createGraphqlclient();
|
|
7
|
+
const { data } = await sdk.GetProcessTaskById(variables);
|
|
8
|
+
return data;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getProcessTaskById } from "./get-process-task-by-id.query";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CreateProcessScheduleGroupDetailsMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
+
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
|
+
import { useMutation } from "@tanstack/react-query";
|
|
5
|
+
import { buildProcessScheduleGroupDetailsQueryKey } from "../queries/get-process-schedule-group-details.query";
|
|
6
|
+
import { buildScheduledProcessesQueryKey } from "../queries/get-scheduled-processes.query";
|
|
7
|
+
import { queryFn } from "./create-process-schedule-group-details.server";
|
|
8
|
+
|
|
9
|
+
export const buildCreateProcessScheduleGroupDetailsMutationKey = {
|
|
10
|
+
all: () => ["createProcessScheduleGroupDetails"] as const,
|
|
11
|
+
byInput: (variables?: CreateProcessScheduleGroupDetailsMutationVariables) => [
|
|
12
|
+
"createProcessScheduleGroupDetails",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const createProcessScheduleGroupDetails = () => {
|
|
18
|
+
const queryClient = getQueryClient();
|
|
19
|
+
|
|
20
|
+
return useMutation({
|
|
21
|
+
mutationKey: ["createProcessScheduleGroupDetails"],
|
|
22
|
+
|
|
23
|
+
mutationFn: async (
|
|
24
|
+
variables: CreateProcessScheduleGroupDetailsMutationVariables,
|
|
25
|
+
) => {
|
|
26
|
+
return await queryFn(variables);
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
onSuccess: () => {
|
|
30
|
+
Promise.all([
|
|
31
|
+
queryClient.invalidateQueries({
|
|
32
|
+
queryKey: buildScheduledProcessesQueryKey.all(),
|
|
33
|
+
}),
|
|
34
|
+
queryClient.invalidateQueries({
|
|
35
|
+
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
36
|
+
}),
|
|
37
|
+
queryClient.invalidateQueries({
|
|
38
|
+
queryKey: buildProcessByIdQueryKey.all(),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
onError: (error) => {
|
|
44
|
+
console.error("Create failed:", error);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
CreateProcessScheduleGroupDetailsMutation,
|
|
4
|
+
CreateProcessScheduleGroupDetailsMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (
|
|
9
|
+
variables: CreateProcessScheduleGroupDetailsMutationVariables,
|
|
10
|
+
): Promise<CreateProcessScheduleGroupDetailsMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.CreateProcessScheduleGroupDetails(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { UpdateProcessScheduleGroupDetailsMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
+
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
|
+
import { useMutation } from "@tanstack/react-query";
|
|
5
|
+
import { buildProcessScheduleGroupDetailsQueryKey } from "../queries/get-process-schedule-group-details.query";
|
|
6
|
+
import { buildScheduledProcessesQueryKey } from "../queries/get-scheduled-processes.query";
|
|
7
|
+
import { queryFn } from "./update-process-schedule-group-details.server";
|
|
8
|
+
|
|
9
|
+
export const buildUpdateProcessScheduleGroupDetailsMutationKey = {
|
|
10
|
+
all: () => ["updateProcessScheduleGroupDetails"] as const,
|
|
11
|
+
byInput: (variables?: UpdateProcessScheduleGroupDetailsMutationVariables) => [
|
|
12
|
+
"updateProcessScheduleGroupDetails",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const updateProcessScheduleGroupDetails = () => {
|
|
18
|
+
const queryClient = getQueryClient();
|
|
19
|
+
|
|
20
|
+
return useMutation({
|
|
21
|
+
mutationKey: ["updateProcessScheduleGroupDetails"],
|
|
22
|
+
|
|
23
|
+
mutationFn: async (
|
|
24
|
+
variables: UpdateProcessScheduleGroupDetailsMutationVariables,
|
|
25
|
+
) => {
|
|
26
|
+
return await queryFn(variables);
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
onSuccess: () => {
|
|
30
|
+
Promise.all([
|
|
31
|
+
queryClient.invalidateQueries({
|
|
32
|
+
queryKey: buildScheduledProcessesQueryKey.all(),
|
|
33
|
+
}),
|
|
34
|
+
queryClient.invalidateQueries({
|
|
35
|
+
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
36
|
+
}),
|
|
37
|
+
queryClient.invalidateQueries({
|
|
38
|
+
queryKey: buildProcessByIdQueryKey.all(),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
onError: (error) => {
|
|
44
|
+
console.error("Update failed:", error);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type {
|
|
3
|
+
UpdateProcessScheduleGroupDetailsMutation,
|
|
4
|
+
UpdateProcessScheduleGroupDetailsMutationVariables,
|
|
5
|
+
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
6
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
7
|
+
|
|
8
|
+
export const queryFn = async (
|
|
9
|
+
variables: UpdateProcessScheduleGroupDetailsMutationVariables,
|
|
10
|
+
): Promise<UpdateProcessScheduleGroupDetailsMutation> => {
|
|
11
|
+
const sdk = await createGraphqlclient();
|
|
12
|
+
const { data } = await sdk.UpdateProcessScheduleGroupDetails(variables);
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
@@ -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,
|