@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.
Files changed (215) hide show
  1. package/documents/ConfigImport/configuration-import.ts +54 -0
  2. package/documents/CopyProcess/copy.ts +25 -0
  3. package/documents/Endpoint/fragments.ts +9 -0
  4. package/documents/Endpoint/list.ts +30 -0
  5. package/documents/Process/fragments.ts +22 -0
  6. package/documents/Process/get-process-details.ts +72 -0
  7. package/documents/Process/list.ts +24 -0
  8. package/documents/ProcessConfig/fragments.ts +116 -0
  9. package/documents/ProcessConfig/read.ts +35 -0
  10. package/documents/ProcessExecution/fragments.ts +12 -0
  11. package/documents/ProcessExecution/list.ts +30 -1
  12. package/documents/ProcessExecutionDetails/fragments.ts +96 -0
  13. package/documents/ProcessExecutionDetails/read.ts +12 -0
  14. package/documents/ProcessExport/read.ts +108 -0
  15. package/documents/ProcessScheduleGroup/read.ts +43 -0
  16. package/documents/ProcessTask/fragments.ts +288 -0
  17. package/documents/ProcessTask/read.ts +12 -0
  18. package/documents/ProcessTemplate/fragments.ts +74 -0
  19. package/documents/ProcessTemplate/list.ts +67 -0
  20. package/documents/ProcessTemplate/read.ts +12 -0
  21. package/documents/RunProcess/run.ts +11 -0
  22. package/package.json +4 -3
  23. package/src/api/Integrations/queries/get-process.query.ts +12 -12
  24. package/src/api/Integrations/queries/get-process.server.ts +7 -2
  25. package/src/api/configuration/queries/configuration-export.query.ts +48 -0
  26. package/src/api/configuration/queries/configuration-export.server.ts +9 -0
  27. package/src/api/configuration/queries/index.ts +1 -0
  28. package/src/api/dashboard/queries/get-process-executions.query.ts +6 -3
  29. package/src/api/dashboard/queries/get-process-executions.server.ts +1 -1
  30. package/src/api/execution-details/queries/get-process-execution-details.query.ts +46 -0
  31. package/src/api/execution-details/queries/get-process-execution-details.server.ts +11 -0
  32. package/src/api/execution-details/queries/get-process-executions-by-process.query.ts +48 -0
  33. package/src/api/execution-details/queries/get-process-executions-by-process.server.ts +11 -0
  34. package/src/api/execution-details/queries/index.ts +2 -0
  35. package/src/api/process/mutations/copy-process.mutation.ts +45 -0
  36. package/src/api/process/mutations/copy-process.server.ts +14 -0
  37. package/src/api/process/mutations/index.ts +2 -0
  38. package/src/api/process/mutations/run-process.mutation.ts +41 -0
  39. package/src/api/process/mutations/run-process.server.ts +14 -0
  40. package/src/api/process/queries/get-process-by-id.query.ts +85 -0
  41. package/src/api/process/queries/get-process-by-id.server.ts +20 -0
  42. package/src/api/process/queries/index.ts +4 -0
  43. package/src/api/process-config/mutation/index.ts +2 -0
  44. package/src/api/process-config/mutation/process-config-import.mutation.ts +42 -0
  45. package/src/api/process-config/mutation/process-config-import.server.ts +14 -0
  46. package/src/api/process-config/mutation/process-config-merge.mutation.ts +33 -0
  47. package/src/api/process-config/mutation/process-config-merge.server.ts +14 -0
  48. package/src/api/process-task/queries/get-process-task-by-id.query.ts +46 -0
  49. package/src/api/process-task/queries/get-process-task-by-id.server.ts +9 -0
  50. package/src/api/process-task/queries/index.ts +1 -0
  51. package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +47 -0
  52. package/src/api/scheduler/mutation/create-process-schedule-group-details.server.ts +14 -0
  53. package/src/api/scheduler/mutation/index.ts +2 -0
  54. package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +47 -0
  55. package/src/api/scheduler/mutation/update-process-schedule-group-details.server.ts +14 -0
  56. package/src/api/scheduler/queries/get-non-scheduled-processes.query.ts +48 -0
  57. package/src/api/scheduler/queries/get-non-scheduled-processes.server.ts +11 -0
  58. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +6 -3
  59. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +3 -3
  60. package/src/api/scheduler/queries/get-process-schedule.query.ts +6 -3
  61. package/src/api/scheduler/queries/get-process-schedule.server.ts +3 -3
  62. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +6 -3
  63. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +1 -1
  64. package/src/api/scheduler/queries/index.ts +3 -2
  65. package/src/api/templates/queries/get-process-template-groups.query.ts +48 -0
  66. package/src/api/templates/queries/get-process-template-groups.server.ts +11 -0
  67. package/src/api/templates/queries/get-process-template-records.query.ts +48 -0
  68. package/src/api/templates/queries/get-process-template-records.server.ts +11 -0
  69. package/src/api/templates/queries/get-process-template.query.ts +48 -0
  70. package/src/api/templates/queries/get-process-template.server.ts +9 -0
  71. package/src/api/templates/queries/get-process-templates.query.ts +45 -0
  72. package/src/api/templates/queries/get-process-templates.server.ts +9 -0
  73. package/src/api/templates/queries/index.ts +5 -0
  74. package/src/api/templates/queries/template-input-search.query.ts +39 -0
  75. package/src/api/templates/queries/template-input-search.server.ts +42 -0
  76. package/src/api/templates/queries/types.ts +34 -0
  77. package/src/components/breadcrumbs/breadcrumbs.tsx +33 -6
  78. package/src/components/button/outlined-icon-button.tsx +2 -2
  79. package/src/components/core/date-time-popover.tsx +12 -5
  80. package/src/components/core/drawer-buttons.tsx +52 -0
  81. package/src/components/core/edited-typography.tsx +2 -2
  82. package/src/components/core/index.ts +4 -2
  83. package/src/components/core/loading.tsx +1 -1
  84. package/src/components/core/status-tag.tsx +97 -0
  85. package/src/components/core/title-edit.tsx +31 -22
  86. package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
  87. package/src/components/dashboard-list/dashboard-list.tsx +20 -16
  88. package/src/components/data-table/table-header.tsx +6 -8
  89. package/src/components/data-table/table-pagination.tsx +1 -1
  90. package/src/components/data-table/table-row.tsx +1 -1
  91. package/src/components/data-table/table-skeleton.tsx +10 -5
  92. package/src/components/execution/execution-filter.ts +1 -1
  93. package/src/components/execution/execution-status-icon.tsx +7 -7
  94. package/src/components/execution/execution-tag.tsx +12 -77
  95. package/src/components/execution/index.ts +1 -1
  96. package/src/components/execution-history-drawer/execution-history-drawer.tsx +202 -0
  97. package/src/components/execution-history-drawer/executions-card.tsx +85 -0
  98. package/src/components/execution-history-drawer/index.ts +1 -0
  99. package/src/components/footer/footer.tsx +10 -6
  100. package/src/components/header/dashboard-list-header.tsx +12 -7
  101. package/src/components/header/execution-details-header.tsx +35 -26
  102. package/src/components/header/header.tsx +10 -3
  103. package/src/components/header/index.ts +1 -1
  104. package/src/components/header/integration-details-header.tsx +108 -45
  105. package/src/components/integration-list/index.ts +2 -1
  106. package/src/components/integration-list/integration-filter.ts +1 -1
  107. package/src/components/integration-list/integration-status-icon.tsx +7 -8
  108. package/src/components/integration-list/integration-tag.tsx +6 -50
  109. package/src/components/integration-list/list/integration-list-row.tsx +161 -0
  110. package/src/components/integration-list/list/integration-list-table.tsx +62 -0
  111. package/src/{pages/integrations/integration-list → components/integration-list/list}/integration-list.tsx +47 -51
  112. package/src/components/integration-view/animated-svg.tsx +31 -0
  113. package/src/components/integration-view/edges/default-edge.tsx +2 -6
  114. package/src/components/integration-view/elk-layout-options.ts +2 -2
  115. package/src/components/integration-view/elk-types.ts +35 -6
  116. package/src/components/integration-view/flow-types.tsx +12 -0
  117. package/src/components/integration-view/integration-view.tsx +562 -56
  118. package/src/components/integration-view/nodes/add-node.tsx +20 -0
  119. package/src/components/integration-view/nodes/empty-node.tsx +65 -0
  120. package/src/components/integration-view/nodes/entry-node.tsx +98 -4
  121. package/src/components/integration-view/nodes/execution-entry-node.tsx +107 -0
  122. package/src/components/integration-view/nodes/execution-task-node.tsx +88 -0
  123. package/src/components/integration-view/nodes/group-node.tsx +33 -13
  124. package/src/components/integration-view/nodes/row-node.tsx +19 -0
  125. package/src/components/integration-view/nodes/task-node.tsx +50 -16
  126. package/src/components/integration-view/task-icon.tsx +193 -0
  127. package/src/components/integration-view/temp-data/initialElements.tsx +34 -32
  128. package/src/components/integration-view/types.ts +2 -2
  129. package/src/components/integration-view/utils/mapping.ts +404 -0
  130. package/src/components/layouts/main-layout.tsx +3 -4
  131. package/src/components/layouts/root-container.tsx +5 -11
  132. package/src/components/link-cards/link-card.tsx +15 -4
  133. package/src/components/link-cards/styles.ts +1 -1
  134. package/src/components/list-filter/date-filter.tsx +7 -4
  135. package/src/components/list-filter/date-range-filter.tsx +15 -7
  136. package/src/components/list-filter/index.ts +1 -1
  137. package/src/components/list-filter/list-filter.tsx +31 -26
  138. package/src/components/list-filter/multi-select-filter.tsx +11 -10
  139. package/src/components/list-filter/select-filter.tsx +23 -12
  140. package/src/components/scheduler/day-selector.tsx +29 -15
  141. package/src/components/scheduler/day-tag.tsx +14 -51
  142. package/src/components/scheduler/index.ts +2 -1
  143. package/src/components/scheduler/schedule-drawer/details-reducer.ts +217 -0
  144. package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +501 -0
  145. package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +137 -100
  146. package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +94 -0
  147. package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-skeleton.tsx +1 -2
  148. package/src/{pages → components}/scheduler/schedule-drawer/schedule-details.tsx +10 -14
  149. package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +214 -0
  150. package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +7 -26
  151. package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +116 -0
  152. package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +130 -0
  153. package/src/components/scheduler/schedule-filter.ts +1 -1
  154. package/src/components/scheduler/schedule-icon.tsx +5 -6
  155. package/src/components/scheduler/schedule-integration-icon.tsx +31 -0
  156. package/src/components/templates/index.ts +1 -0
  157. package/src/components/templates/inputs/index.tsx +1392 -0
  158. package/src/components/templates/template-filter.ts +5 -0
  159. package/src/components/templates/templates-list/index.ts +1 -0
  160. package/src/components/templates/templates-list/templates-list-row.tsx +55 -0
  161. package/src/components/templates/templates-list/templates-list-table.tsx +58 -0
  162. package/src/components/templates/templates-list/templates-list.tsx +253 -0
  163. package/src/components/templates/types.tsx +76 -0
  164. package/src/components/templates/wizard.tsx +737 -0
  165. package/src/hooks/use-breadcrumbs.ts +1 -1
  166. package/src/hooks/use-recurrence.tsx +1 -2
  167. package/src/pages/dashboard/dashboard-link-cards.tsx +8 -11
  168. package/src/pages/dashboard/dashboard-list-sections.tsx +8 -10
  169. package/src/pages/dashboard/dashboard.tsx +1 -2
  170. package/src/pages/execution-details/execution-details.tsx +212 -14
  171. package/src/pages/execution-details/task-execution-details.tsx +160 -0
  172. package/src/pages/execution-details/task-execution-drawer.tsx +54 -0
  173. package/src/pages/executions/executions-list/executions-list-row.tsx +21 -27
  174. package/src/pages/executions/executions-list/executions-list-table.tsx +29 -36
  175. package/src/pages/executions/executions-list/executions-list.tsx +24 -18
  176. package/src/pages/executions/executions.tsx +11 -15
  177. package/src/pages/integration-create/index.ts +1 -0
  178. package/src/pages/integration-create/integration-create.tsx +216 -0
  179. package/src/pages/integration-create/pre-creation-step.tsx +84 -0
  180. package/src/pages/integration-create/select-step.tsx +105 -0
  181. package/src/pages/integration-create/template-list-step.tsx +77 -0
  182. package/src/pages/integration-create/wizard-step.tsx +51 -0
  183. package/src/pages/integration-details/import-process/copy-tasks-list.tsx +265 -0
  184. package/src/pages/integration-details/import-process/copy-tasks-row.tsx +77 -0
  185. package/src/pages/integration-details/import-process/import-confirm.tsx +61 -0
  186. package/src/pages/integration-details/import-process/import-drawer.tsx +48 -0
  187. package/src/pages/integration-details/import-process/import-process-reducer.ts +90 -0
  188. package/src/pages/integration-details/import-process/import-process.tsx +149 -0
  189. package/src/pages/integration-details/index.ts +1 -0
  190. package/src/pages/integration-details/integration-details.tsx +468 -0
  191. package/src/pages/integration-details/task-drawer/add-task.tsx +172 -0
  192. package/src/pages/integration-details/task-drawer/edit-task.tsx +161 -0
  193. package/src/pages/integration-details/task-drawer/task-drawer.tsx +157 -0
  194. package/src/pages/integration-details/task-drawer/task-reducer.ts +103 -0
  195. package/src/pages/integrations/integrations.tsx +11 -14
  196. package/src/pages/scheduler/scheduler.tsx +12 -24
  197. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +27 -37
  198. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +28 -43
  199. package/src/pages/scheduler/schedules-list/schedules-list.tsx +48 -21
  200. package/src/utils/date-functions.ts +69 -0
  201. package/src/utils/slugify.ts +3 -0
  202. package/tsconfig.json +12 -4
  203. package/src/hooks/use-timestamp.tsx +0 -25
  204. package/src/pages/integrations/integration-list/integration-list-row.tsx +0 -147
  205. package/src/pages/integrations/integration-list/integration-list-table.tsx +0 -78
  206. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +0 -227
  207. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +0 -77
  208. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +0 -72
  209. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +0 -103
  210. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +0 -101
  211. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +0 -93
  212. /package/src/{pages/integrations/integration-list → components/integration-list/list}/index.ts +0 -0
  213. /package/src/{pages → components}/scheduler/schedule-drawer/edited/edited-types.ts +0 -0
  214. /package/src/{pages → components}/scheduler/schedule-drawer/edited/index.ts +0 -0
  215. /package/src/{pages → components}/scheduler/schedule-drawer/index.ts +0 -0
@@ -10,3 +10,46 @@ const GetProcessScheduleGroupDetails = gql`
10
10
  }
11
11
  }
12
12
  `;
13
+
14
+ const UpdateProcessSchedule = gql`
15
+ ${PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD}
16
+ mutation UpdateProcessScheduleGroupDetails($input: ProcessScheduleGroupDetailsUpdate!) {
17
+ updateProcessScheduleGroupDetails(input: $input) {
18
+ id
19
+ name
20
+ code
21
+ startDate
22
+ interval
23
+ intervalUnitId
24
+ isMonday
25
+ isTuesday
26
+ isWednesday
27
+ isThursday
28
+ isFriday
29
+ isSaturday
30
+ isSunday
31
+ isDisabled
32
+ }
33
+ }
34
+ `;
35
+
36
+ const CreateProcessSchedule = gql`
37
+ mutation CreateProcessScheduleGroupDetails($input: ProcessScheduleGroupDetailsCreate!) {
38
+ createProcessScheduleGroupDetails(input: $input) {
39
+ id
40
+ name
41
+ code
42
+ startDate
43
+ isMonday
44
+ isTuesday
45
+ isWednesday
46
+ isThursday
47
+ isFriday
48
+ isSaturday
49
+ isSunday
50
+ isDisabled
51
+ created
52
+ modified
53
+ }
54
+ }
55
+ `;
@@ -0,0 +1,288 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PROCESS_TASK_FRAGMENT_SM = gql`
4
+ fragment e4ProcessTaskFragmentSM on ProcessTask {
5
+ id
6
+ processTaskType {
7
+ id
8
+ name
9
+ }
10
+ endpoint {
11
+ id
12
+ templateConfig
13
+ name
14
+ processTemplate {
15
+ id
16
+ }
17
+ }
18
+ name
19
+ code
20
+ params
21
+ preExecutionProcedure
22
+ executionProcedure
23
+ postExecutionProcedure
24
+ sort
25
+ parallelProcessingGroup
26
+ extendedFields
27
+ properties
28
+ maxEndpointMessageAttempts
29
+ created
30
+ modified
31
+ }
32
+ `;
33
+
34
+ export const PROCESS_TASK_FRAGMENT_XL = gql`
35
+ fragment e4ProcessTaskFragmentXL on ProcessTask {
36
+ id
37
+ process {
38
+ id
39
+ processScheduleGroup {
40
+ id
41
+ name
42
+ code
43
+ isDisabled
44
+ created
45
+ modified
46
+ }
47
+ processTasks {
48
+ id
49
+ name
50
+ code
51
+ params
52
+ preExecutionProcedure
53
+ executionProcedure
54
+ postExecutionProcedure
55
+ sort
56
+ parallelProcessingGroup
57
+ extendedFields
58
+ properties
59
+ maxEndpointMessageAttempts
60
+ created
61
+ modified
62
+ }
63
+ name
64
+ code
65
+ nextExecutionDate
66
+ previousExecutionDate
67
+ orchestratorInstanceId
68
+ maxConcurrentExecutions
69
+ allowParallelProcessExecution
70
+ allowParallelTaskExecution
71
+ sort
72
+ processIcon
73
+ isScheduled
74
+ isTriggered
75
+ extendedFields
76
+ created
77
+ modified
78
+ maxRetryAttempts
79
+ timeout
80
+ }
81
+ processTaskType {
82
+ id
83
+ name
84
+ code
85
+ created
86
+ modified
87
+ paramSchema
88
+ }
89
+ endpoint {
90
+ id
91
+ depot {
92
+ id
93
+ depotGroup {
94
+ id
95
+ parentId
96
+ rootId
97
+ code
98
+ name
99
+ extendedFields
100
+ sort
101
+ tier
102
+ breadcrumbIds
103
+ created
104
+ modified
105
+ }
106
+ name
107
+ code
108
+ url
109
+ sort
110
+ extendedFields
111
+ created
112
+ modified
113
+ }
114
+ endpointType {
115
+ id
116
+ rootId
117
+ parentId
118
+ name
119
+ code
120
+ tier
121
+ sort
122
+ breadcrumbIds
123
+ metadataSchema
124
+ created
125
+ modified
126
+ }
127
+ endpointStatus {
128
+ id
129
+ name
130
+ code
131
+ extendedFields
132
+ created
133
+ modified
134
+ }
135
+ entity {
136
+ id
137
+ entityGroup {
138
+ id
139
+ parentId
140
+ rootId
141
+ code
142
+ name
143
+ extendedFields
144
+ sort
145
+ tier
146
+ breadcrumbIds
147
+ created
148
+ modified
149
+ }
150
+ entityType {
151
+ id
152
+ name
153
+ code
154
+ extendedFields
155
+ created
156
+ modified
157
+ }
158
+ parentId
159
+ rootId
160
+ tier
161
+ name
162
+ code
163
+ displayName
164
+ sourceEntityName
165
+ entitySchema
166
+ enableParse
167
+ created
168
+ modified
169
+ extendedFields
170
+ }
171
+ document {
172
+ id
173
+ documentType {
174
+ id
175
+ rootId
176
+ parentId
177
+ tier
178
+ sort
179
+ name
180
+ code
181
+ metadataSchema
182
+ created
183
+ modified
184
+ }
185
+ documentGroup {
186
+ id
187
+ parentId
188
+ rootId
189
+ code
190
+ name
191
+ extendedFields
192
+ sort
193
+ tier
194
+ breadcrumbIds
195
+ created
196
+ modified
197
+ }
198
+ name
199
+ code
200
+ metadata
201
+ extendedFields
202
+ created
203
+ modified
204
+ }
205
+ defaultProcessTaskType {
206
+ id
207
+ name
208
+ code
209
+ created
210
+ modified
211
+ paramSchema
212
+ }
213
+ processTemplate {
214
+ id
215
+ name
216
+ isActive
217
+ created
218
+ modified
219
+ pages {
220
+ id
221
+ title
222
+ description
223
+ sort
224
+ inputs {
225
+ id
226
+ label
227
+ fieldName
228
+ inputType
229
+ isRequired
230
+ sort
231
+ placeholder
232
+ helpText
233
+ validationRegex
234
+ queryName
235
+ created
236
+ modified
237
+ schemas {
238
+ id
239
+ fieldKey
240
+ label
241
+ inputType
242
+ defaultValue
243
+ validationRegex
244
+ options {
245
+ id
246
+ label
247
+ }
248
+ sort
249
+ isRequired
250
+ }
251
+ }
252
+ }
253
+ }
254
+ templateConfig
255
+ name
256
+ displayName
257
+ code
258
+ stagingTableSchema
259
+ stagingTableName
260
+ metadata
261
+ collectionPropertyName
262
+ isPublish
263
+ created
264
+ modified
265
+ }
266
+ orchestrationType {
267
+ id
268
+ name
269
+ code
270
+ extendedFields
271
+ created
272
+ modified
273
+ }
274
+ name
275
+ code
276
+ params
277
+ preExecutionProcedure
278
+ executionProcedure
279
+ postExecutionProcedure
280
+ sort
281
+ parallelProcessingGroup
282
+ extendedFields
283
+ properties
284
+ maxEndpointMessageAttempts
285
+ created
286
+ modified
287
+ }
288
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PROCESS_TASK_FRAGMENT_SM } from "./fragments";
4
+
5
+ const _GetProcessTaskById = gql`
6
+ ${PROCESS_TASK_FRAGMENT_SM}
7
+ query GetProcessTaskById($id: ID!) {
8
+ processTaskById(id: $id) {
9
+ ...e4ProcessTaskFragmentSM
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,74 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PROCESS_TEMPLATE_FRAGMENT = gql`
4
+ fragment e4ProcessTemplateFragment on ProcessTemplate {
5
+ id
6
+ name
7
+ isActive
8
+ created
9
+ modified
10
+ pages {
11
+ id
12
+ title
13
+ description
14
+ sort
15
+ inputs {
16
+ id
17
+ label
18
+ fieldName
19
+ inputType
20
+ isRequired
21
+ isEditableAfterCreate
22
+ sort
23
+ placeholder
24
+ helpText
25
+ validationRegex
26
+ queryName
27
+ created
28
+ modified
29
+ defaultValue
30
+ schemas {
31
+ id
32
+ fieldKey
33
+ label
34
+ inputType
35
+ defaultValue
36
+ validationRegex
37
+ options {
38
+ id
39
+ label
40
+ }
41
+ sort
42
+ isRequired
43
+ }
44
+ }
45
+ }
46
+ }
47
+ `;
48
+
49
+ export const PROCESS_TEMPLATE_FRAGMENT_XS = gql`
50
+ fragment e4ProcessTemplateFragmentXS on ProcessTemplate {
51
+ id
52
+ name
53
+ isActive
54
+ }
55
+ `;
56
+
57
+ export const PROCESS_TEMPLATE_RECORD_FRAGMENT = gql`
58
+ fragment e4ProcessTemplateRecordFragment on ProcessTemplateRecord {
59
+ id
60
+ name
61
+ isActive
62
+ created
63
+ modified
64
+ isGroup
65
+ }
66
+ `;
67
+
68
+ export const PROCESS_TEMPLATE_GROUP_FRAGMENT = gql`
69
+ fragment e4ProcessTemplateGroupFragment on ProcessTemplateGroup {
70
+ id
71
+ name
72
+ isActive
73
+ }
74
+ `;
@@ -0,0 +1,67 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import {
4
+ PROCESS_TEMPLATE_FRAGMENT_XS,
5
+ PROCESS_TEMPLATE_GROUP_FRAGMENT,
6
+ PROCESS_TEMPLATE_RECORD_FRAGMENT,
7
+ } from "./fragments";
8
+
9
+ const _GetProcessTemplateRecords = gql`
10
+ ${PROCESS_TEMPLATE_RECORD_FRAGMENT}
11
+ query GetProcessTemplateRecords($input: FilterQueryInput) {
12
+ processTemplateRecords(input: $input) {
13
+ nodes {
14
+ ...e4ProcessTemplateRecordFragment
15
+ }
16
+ pageInfo {
17
+ top
18
+ skip
19
+ sort
20
+ sortDesc
21
+ search
22
+ resultsReturned
23
+ }
24
+ recordCount
25
+ }
26
+ }
27
+ `;
28
+
29
+ const _GetProcessTemplateGroups = gql`
30
+ ${PROCESS_TEMPLATE_GROUP_FRAGMENT}
31
+ query GetProcessTemplateGroups($input: FilterQueryInput) {
32
+ processTemplateGroups(input: $input) {
33
+ nodes {
34
+ ...e4ProcessTemplateGroupFragment
35
+ }
36
+ pageInfo {
37
+ top
38
+ skip
39
+ sort
40
+ sortDesc
41
+ search
42
+ resultsReturned
43
+ }
44
+ recordCount
45
+ }
46
+ }
47
+ `;
48
+
49
+ const _GetProcessTemplates = gql`
50
+ ${PROCESS_TEMPLATE_FRAGMENT_XS}
51
+ query GetProcessTemplates($input: FilterQueryInput) {
52
+ processTemplates(input: $input) {
53
+ nodes {
54
+ ...e4ProcessTemplateFragmentXS
55
+ }
56
+ pageInfo {
57
+ top
58
+ skip
59
+ sort
60
+ sortDesc
61
+ search
62
+ resultsReturned
63
+ }
64
+ recordCount
65
+ }
66
+ }
67
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PROCESS_TEMPLATE_FRAGMENT } from "./fragments";
4
+
5
+ const GetProcessTemplate = gql`
6
+ ${PROCESS_TEMPLATE_FRAGMENT}
7
+ query GetProcessTemplate($input: ProcessTemplateFilter) {
8
+ processTemplate(input: $input) {
9
+ ...e4ProcessTemplateFragment
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,11 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const _RUN_PROCESS_WEBHOOK = gql`
4
+ mutation RunProcessWebhook($input: ProcessRun) {
5
+ runProcessWebhook(input: $input) {
6
+ id
7
+ status
8
+ message
9
+ }
10
+ }
11
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evenicanpm/admin-integrate",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "description": "e4Integrate Admin Panel",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -17,7 +17,8 @@
17
17
  "@dnd-kit/modifiers": "^9.0.0",
18
18
  "@dnd-kit/sortable": "^10.0.0",
19
19
  "@xyflow/react": "^12.8.4",
20
- "elkjs": "^0.10.0"
20
+ "elkjs": "^0.10.0",
21
+ "lodash": "^4.17.21"
21
22
  },
22
- "gitHead": "608903e897229fead2b663cd82c019451ed65a45"
23
+ "gitHead": "0614726ec6b7ce9564706514a6b756b390a13e96"
23
24
  }
@@ -1,12 +1,12 @@
1
- import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
- import { queryFn } from "./get-process.server";
3
-
1
+ import type { GetProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
2
  import {
5
- GetProcessesQuery,
6
- GetProcessesQueryVariables,
7
- } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
3
+ type QueryClient,
4
+ type UseQueryOptions,
5
+ useQuery,
6
+ } from "@tanstack/react-query";
7
+ import { queryFn } from "./get-process.server";
8
8
 
9
- export const buildProcessExecutionsQueryKey = {
9
+ export const buildProcessesQueryKey = {
10
10
  all: () => ["getProcesses"] as const,
11
11
  byInput: (variables?: GetProcessesQueryVariables) => [
12
12
  "getProcesses",
@@ -15,14 +15,14 @@ export const buildProcessExecutionsQueryKey = {
15
15
  };
16
16
 
17
17
  export const getProcesses = {
18
- queryKey: buildProcessExecutionsQueryKey.all(),
18
+ queryKey: buildProcessesQueryKey.all(),
19
19
 
20
20
  prefetch: (
21
21
  queryClient: QueryClient,
22
22
  variables?: GetProcessesQueryVariables,
23
23
  ) =>
24
24
  queryClient.prefetchQuery({
25
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
25
+ queryKey: buildProcessesQueryKey.byInput(variables),
26
26
  queryFn: () => queryFn(variables),
27
27
  }),
28
28
 
@@ -31,7 +31,7 @@ export const getProcesses = {
31
31
  variables?: GetProcessesQueryVariables,
32
32
  ) => {
33
33
  return await queryClient.fetchQuery({
34
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
34
+ queryKey: buildProcessesQueryKey.byInput(variables),
35
35
  queryFn: () => queryFn(variables),
36
36
  });
37
37
  },
@@ -40,8 +40,8 @@ export const getProcesses = {
40
40
  variables?: GetProcessesQueryVariables,
41
41
  options?: UseQueryOptions,
42
42
  ) =>
43
- useQuery<GetProcessesQuery>({
44
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
43
+ useQuery({
44
+ queryKey: buildProcessesQueryKey.byInput(variables),
45
45
  queryFn: () => queryFn(variables),
46
46
  ...options,
47
47
  }),
@@ -1,8 +1,13 @@
1
1
  "use server";
2
+ import type {
3
+ GetProcessesQuery,
4
+ GetProcessesQueryVariables,
5
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
2
6
  import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
- import { GetProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
7
 
5
- export const queryFn = async (variables?: GetProcessesQueryVariables) => {
8
+ export const queryFn = async (
9
+ variables?: GetProcessesQueryVariables,
10
+ ): Promise<GetProcessesQuery> => {
6
11
  const sdk = await createGraphqlclient();
7
12
  const { data } = await sdk.GetProcesses(variables);
8
13
  return data;
@@ -0,0 +1,48 @@
1
+ import type { ConfigurationExportQueryVariables } 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 "./configuration-export.server";
8
+
9
+ export const buildConfigurationExportQueryKey = {
10
+ all: () => ["configurationExport"] as const,
11
+ byInput: (variables?: ConfigurationExportQueryVariables) => [
12
+ "configurationExport",
13
+ variables,
14
+ ],
15
+ };
16
+
17
+ export const configurationExport = {
18
+ queryKey: buildConfigurationExportQueryKey.all(),
19
+
20
+ prefetch: (
21
+ queryClient: QueryClient,
22
+ variables: ConfigurationExportQueryVariables,
23
+ ) =>
24
+ queryClient.prefetchQuery({
25
+ queryKey: buildConfigurationExportQueryKey.byInput(variables),
26
+ queryFn: () => queryFn(variables),
27
+ }),
28
+
29
+ fetchData: async (
30
+ queryClient: QueryClient,
31
+ variables: ConfigurationExportQueryVariables,
32
+ ) => {
33
+ return await queryClient.fetchQuery({
34
+ queryKey: buildConfigurationExportQueryKey.byInput(variables),
35
+ queryFn: () => queryFn(variables),
36
+ });
37
+ },
38
+
39
+ useData: (
40
+ variables: ConfigurationExportQueryVariables,
41
+ options?: UseQueryOptions,
42
+ ) =>
43
+ useQuery({
44
+ queryKey: buildConfigurationExportQueryKey.byInput(variables),
45
+ queryFn: () => queryFn(variables),
46
+ ...options,
47
+ }),
48
+ };
@@ -0,0 +1,9 @@
1
+ "use server";
2
+ import type { ConfigurationExportQueryVariables } 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: ConfigurationExportQueryVariables) => {
6
+ const sdk = await createGraphqlclient();
7
+ const { data } = await sdk.ConfigurationExport(variables);
8
+ return data;
9
+ };
@@ -0,0 +1 @@
1
+ export { configurationExport } from "./configuration-export.query";
@@ -1,8 +1,11 @@
1
- import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
1
+ import type { GetProcessExecutionsQueryVariables } 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-executions.server";
3
8
 
4
- import { GetProcessExecutionsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
5
-
6
9
  export const buildProcessExecutionsQueryKey = {
7
10
  all: () => ["getProcessExecutions"] as const,
8
11
  byInput: (variables?: GetProcessExecutionsQueryVariables) => [
@@ -1,6 +1,6 @@
1
1
  "use server";
2
+ import type { GetProcessExecutionsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
2
3
  import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
- import { GetProcessExecutionsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
4
 
5
5
  export const queryFn = async (
6
6
  variables: GetProcessExecutionsQueryVariables,