@orchestrator-ui/orchestrator-ui-components 6.4.0 → 6.6.1

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 (45) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-lint.log +2 -2
  3. package/.turbo/turbo-test.log +5 -5
  4. package/CHANGELOG.md +24 -0
  5. package/dist/index.d.ts +23 -93
  6. package/dist/index.js +1025 -640
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/WfoAgent/ExportButton/ExportButton.tsx +96 -0
  10. package/src/components/WfoAgent/ExportButton/index.ts +1 -0
  11. package/src/components/WfoAgent/ExportButton/styles.ts +69 -0
  12. package/src/components/WfoAgent/ToolProgress/DiscoverFilterPathsDisplay.tsx +114 -0
  13. package/src/components/WfoAgent/ToolProgress/RunSearchDisplay.tsx +34 -0
  14. package/src/components/WfoAgent/{FilterDisplay/FilterDisplay.tsx → ToolProgress/SetFilterTreeDisplay.tsx} +25 -72
  15. package/src/components/WfoAgent/ToolProgress/StartNewSearchDisplay.tsx +62 -0
  16. package/src/components/WfoAgent/ToolProgress/ToolProgress.tsx +138 -0
  17. package/src/components/WfoAgent/ToolProgress/index.ts +1 -0
  18. package/src/components/WfoAgent/ToolProgress/styles.ts +50 -0
  19. package/src/components/WfoAgent/WfoAgent/WfoAgent.tsx +78 -51
  20. package/src/components/WfoAgent/index.ts +0 -1
  21. package/src/components/WfoInlineEdit/WfoInlineEdit.tsx +5 -1
  22. package/src/components/WfoInlineNoteEdit/WfoSubscriptionDetailNoteEdit.tsx +1 -1
  23. package/src/components/WfoMetadata/WfoMetadataDescriptionField.tsx +3 -1
  24. package/src/components/WfoPydanticForm/fields/WfoArrayField/WfoArrayField.tsx +15 -6
  25. package/src/components/WfoPydanticForm/fields/WfoReactSelect/styles.ts +5 -1
  26. package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +6 -10
  27. package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx +4 -4
  28. package/src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx +18 -34
  29. package/src/components/WfoSearchPage/WfoSearchResults/index.ts +0 -1
  30. package/src/components/WfoSearchPage/utils.ts +12 -112
  31. package/src/components/WfoSubscription/WfoCustomerDescriptionsField.tsx +1 -1
  32. package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActions.tsx +137 -46
  33. package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionsMenuItem.tsx +27 -33
  34. package/src/components/WfoSubscription/WfoSubscriptionActions/styles.ts +3 -1
  35. package/src/components/WfoSubscription/WfoTargetTypeIcon.tsx +37 -6
  36. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +1 -0
  37. package/src/configuration/version.ts +1 -1
  38. package/src/hooks/useSearchPagination.ts +2 -2
  39. package/src/messages/en-GB.json +3 -3
  40. package/src/messages/nl-NL.json +2 -0
  41. package/src/rtk/endpoints/agentExport.ts +23 -0
  42. package/src/types/search.ts +8 -70
  43. package/src/components/WfoAgent/FilterDisplay/index.ts +0 -1
  44. package/src/components/WfoSearchPage/WfoSearchResults/WfoSubscriptionDetailModal.tsx +0 -55
  45. /package/src/components/WfoAgent/{FilterDisplay/styles.ts → ToolProgress/SetFilterTreeDisplay.styles.ts} +0 -0
@@ -1,6 +1,8 @@
1
1
  import React, { FC, useState } from 'react';
2
2
 
3
3
  import { useTranslations } from 'next-intl';
4
+ import Link from 'next/link';
5
+ import { useRouter } from 'next/router';
4
6
 
5
7
  import {
6
8
  EuiButton,
@@ -12,14 +14,23 @@ import {
12
14
  EuiTitle,
13
15
  } from '@elastic/eui';
14
16
 
15
- import { WfoInSyncField } from '@/components';
17
+ import {
18
+ PATH_START_NEW_TASK,
19
+ PATH_START_NEW_WORKFLOW,
20
+ PATH_TASKS,
21
+ PATH_WORKFLOWS,
22
+ WfoInSyncField,
23
+ } from '@/components';
16
24
  import { WfoSubscriptionActionsMenuItem } from '@/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionsMenuItem';
17
25
  import { PolicyResource } from '@/configuration/policy-resources';
18
- import { usePolicy } from '@/hooks';
26
+ import { usePolicy, useShowToastMessage } from '@/hooks';
19
27
  import { WfoDotsHorizontal } from '@/icons/WfoDotsHorizontal';
20
- import { useGetSubscriptionDetailQuery } from '@/rtk';
21
- import { useGetSubscriptionActionsQuery } from '@/rtk/endpoints/subscriptionActions';
22
- import { WorkflowTarget } from '@/types';
28
+ import {
29
+ useGetSubscriptionActionsQuery,
30
+ useGetSubscriptionDetailQuery,
31
+ useStartProcessMutation,
32
+ } from '@/rtk';
33
+ import { ToastTypes, WorkflowTarget } from '@/types';
23
34
 
24
35
  type MenuBlockProps = {
25
36
  title: string;
@@ -43,6 +54,7 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
43
54
  }) => {
44
55
  const t = useTranslations('subscriptions.detail.actions');
45
56
  const [isPopoverOpen, setPopover] = useState(false);
57
+ const router = useRouter();
46
58
  const disableQuery = isLoading || (!isPopoverOpen && compactMode);
47
59
  const {
48
60
  data: subscriptionActions,
@@ -51,6 +63,8 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
51
63
  { subscriptionId },
52
64
  { skip: disableQuery },
53
65
  );
66
+ const { showToastMessage } = useShowToastMessage();
67
+ const [startProcess] = useStartProcessMutation();
54
68
 
55
69
  const { data: subscriptionDetail } = useGetSubscriptionDetailQuery(
56
70
  {
@@ -89,23 +103,87 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
89
103
  SUBSCRIPTION_TERMINATE,
90
104
  SET_IN_SYNC,
91
105
  } = PolicyResource;
106
+
107
+ const redirectToUrl = (actionName: string, isTask: boolean = false) => {
108
+ const path = isTask ? PATH_START_NEW_TASK : PATH_START_NEW_WORKFLOW;
109
+
110
+ const url = {
111
+ pathname: `${path}/${actionName}`,
112
+ query: {
113
+ subscriptionId,
114
+ },
115
+ };
116
+ router.push(url);
117
+ };
118
+
119
+ const silentlyStartAction = (
120
+ actionName: string,
121
+ isTask: boolean = false,
122
+ ) => {
123
+ startProcess({
124
+ workflowName: actionName,
125
+ userInputs: [
126
+ {
127
+ subscription_id: subscriptionId,
128
+ },
129
+ ],
130
+ })
131
+ .unwrap()
132
+ .then((result) => {
133
+ closePopover();
134
+ const processUrl = `${isTask ? PATH_TASKS : PATH_WORKFLOWS}/${result.id}`;
135
+
136
+ showToastMessage(
137
+ ToastTypes.SUCCESS,
138
+ <Link href={processUrl}>{processUrl}</Link>,
139
+ t('actionStarted'),
140
+ );
141
+ })
142
+ .catch((error) => {
143
+ showToastMessage(
144
+ ToastTypes.ERROR,
145
+ t('actionStartFailed'),
146
+ t('actionStartFailed'),
147
+ );
148
+ console.error('Failed to set subscription in sync.', error);
149
+ });
150
+ };
151
+
152
+ const handleActionClick = (
153
+ actionName: string,
154
+ compactMode: boolean,
155
+ isTask: boolean = false,
156
+ ) => {
157
+ if (compactMode) {
158
+ silentlyStartAction(actionName, isTask);
159
+ } else {
160
+ redirectToUrl(actionName, isTask);
161
+ }
162
+ };
163
+
92
164
  const compactItems = (
93
165
  <>
94
166
  {isAllowed(SUBSCRIPTION_VALIDATE + subscriptionId) &&
95
167
  subscriptionActions?.validate && (
96
168
  <>
97
169
  {!compactMode && <MenuBlock title={t('tasks')} />}
98
- {subscriptionActions.validate.map((action, index) => (
99
- <WfoSubscriptionActionsMenuItem
100
- key={`s_${index}`}
101
- action={action}
102
- index={index}
103
- target={WorkflowTarget.VALIDATE}
104
- isTask
105
- subscriptionId={subscriptionId}
106
- setPopover={setPopover}
107
- />
108
- ))}
170
+ {subscriptionActions.validate.map(
171
+ (subscriptionAction, index) => (
172
+ <WfoSubscriptionActionsMenuItem
173
+ key={`s_${index}`}
174
+ subscriptionAction={subscriptionAction}
175
+ target={WorkflowTarget.VALIDATE}
176
+ setPopover={setPopover}
177
+ onClick={() =>
178
+ handleActionClick(
179
+ subscriptionAction.name,
180
+ compactMode,
181
+ true,
182
+ )
183
+ }
184
+ />
185
+ ),
186
+ )}
109
187
  </>
110
188
  )}
111
189
 
@@ -113,16 +191,23 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
113
191
  (subscriptionActions?.reconcile?.length ?? 0) > 0 && (
114
192
  <>
115
193
  {!compactMode && <MenuBlock title={t('reconcile')} />}
116
- {subscriptionActions?.reconcile.map((action, index) => (
117
- <WfoSubscriptionActionsMenuItem
118
- key={`r_${index}`}
119
- action={action}
120
- index={index}
121
- target={WorkflowTarget.RECONCILE}
122
- subscriptionId={subscriptionId}
123
- setPopover={setPopover}
124
- />
125
- ))}
194
+ {subscriptionActions?.reconcile.map(
195
+ (subscriptionAction, index) => (
196
+ <WfoSubscriptionActionsMenuItem
197
+ key={`r_${index}`}
198
+ subscriptionAction={subscriptionAction}
199
+ target={WorkflowTarget.RECONCILE}
200
+ setPopover={setPopover}
201
+ onClick={() =>
202
+ handleActionClick(
203
+ subscriptionAction.name,
204
+ compactMode,
205
+ false,
206
+ )
207
+ }
208
+ />
209
+ ),
210
+ )}
126
211
  </>
127
212
  )}
128
213
 
@@ -144,16 +229,19 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
144
229
  subscriptionActions?.modify && (
145
230
  <>
146
231
  <MenuBlock title={t('modify')} />
147
- {subscriptionActions.modify.map((action, index) => (
148
- <WfoSubscriptionActionsMenuItem
149
- key={`m_${index}`}
150
- action={action}
151
- index={index}
152
- target={WorkflowTarget.MODIFY}
153
- subscriptionId={subscriptionId}
154
- setPopover={setPopover}
155
- />
156
- ))}
232
+ {subscriptionActions.modify.map(
233
+ (subscriptionAction, index) => (
234
+ <WfoSubscriptionActionsMenuItem
235
+ key={`m_${index}`}
236
+ subscriptionAction={subscriptionAction}
237
+ target={WorkflowTarget.MODIFY}
238
+ setPopover={setPopover}
239
+ onClick={() => {
240
+ redirectToUrl(subscriptionAction.name);
241
+ }}
242
+ />
243
+ ),
244
+ )}
157
245
  </>
158
246
  )}
159
247
  {compactItems}
@@ -161,16 +249,19 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
161
249
  subscriptionActions?.terminate && (
162
250
  <>
163
251
  <MenuBlock title={t('terminate')} />
164
- {subscriptionActions.terminate.map((action, index) => (
165
- <WfoSubscriptionActionsMenuItem
166
- key={`t_${index}`}
167
- action={action}
168
- index={index}
169
- target={WorkflowTarget.TERMINATE}
170
- subscriptionId={subscriptionId}
171
- setPopover={setPopover}
172
- />
173
- ))}
252
+ {subscriptionActions.terminate.map(
253
+ (subscriptionAction, index) => (
254
+ <WfoSubscriptionActionsMenuItem
255
+ key={`t_${index}`}
256
+ subscriptionAction={subscriptionAction}
257
+ target={WorkflowTarget.TERMINATE}
258
+ setPopover={setPopover}
259
+ onClick={() => {
260
+ redirectToUrl(subscriptionAction.name);
261
+ }}
262
+ />
263
+ ),
264
+ )}
174
265
  </>
175
266
  )}
176
267
  </>
@@ -1,16 +1,10 @@
1
1
  import React, { FC } from 'react';
2
2
 
3
3
  import { useTranslations } from 'next-intl';
4
- import Link from 'next/link';
5
- import { useRouter } from 'next/router';
6
4
 
7
5
  import { EuiContextMenuItem, EuiToolTip } from '@elastic/eui';
8
6
 
9
7
  import { flattenArrayProps } from '@/components';
10
- import {
11
- PATH_START_NEW_TASK,
12
- PATH_START_NEW_WORKFLOW,
13
- } from '@/components/WfoPageTemplate';
14
8
  import { WfoSubscriptionActionExpandableMenuItem } from '@/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionExpandableMenuItem';
15
9
  import { getSubscriptionActionStyles } from '@/components/WfoSubscription/WfoSubscriptionActions/styles';
16
10
  import {
@@ -24,21 +18,16 @@ import { SubscriptionAction, WorkflowTarget } from '@/types';
24
18
  import { WfoTargetTypeIcon } from '../WfoTargetTypeIcon';
25
19
 
26
20
  interface MenuItemProps {
27
- key: string;
28
- action: SubscriptionAction;
29
- index: number;
21
+ subscriptionAction: SubscriptionAction;
30
22
  target: WorkflowTarget;
31
- isTask?: boolean;
32
- isDisabled?: boolean;
33
- subscriptionId: string;
34
23
  setPopover: (isOpen: boolean) => void;
24
+ onClick: () => void;
35
25
  }
36
26
 
37
27
  export const WfoSubscriptionActionsMenuItem: FC<MenuItemProps> = ({
38
- action,
28
+ subscriptionAction,
29
+ onClick,
39
30
  target,
40
- isTask = false,
41
- subscriptionId,
42
31
  setPopover,
43
32
  }) => {
44
33
  const {
@@ -50,41 +39,38 @@ export const WfoSubscriptionActionsMenuItem: FC<MenuItemProps> = ({
50
39
  } = useWithOrchestratorTheme(getSubscriptionActionStyles);
51
40
 
52
41
  const { isEngineRunningNow } = useCheckEngineStatus();
53
- const router = useRouter();
54
42
  const t = useTranslations('subscriptions.detail.actions');
55
43
  const { theme } = useOrchestratorTheme();
56
44
 
57
45
  const linkIt = (actionItem: React.ReactNode) => {
58
- const path = isTask ? PATH_START_NEW_TASK : PATH_START_NEW_WORKFLOW;
59
- const url = {
60
- pathname: `${path}/${action.name}`,
61
- query: { subscriptionId },
62
- };
63
-
64
46
  const handleLinkClick = async (e: React.MouseEvent) => {
65
47
  e.preventDefault();
66
48
  setPopover(false);
49
+
67
50
  if (await isEngineRunningNow()) {
68
- router.push(url);
51
+ onClick();
69
52
  }
70
53
  };
71
54
 
72
55
  return (
73
- <Link href={url} onClick={handleLinkClick}>
74
- <div css={linkMenuItemStyle}>{actionItem}</div>
75
- </Link>
56
+ <div css={linkMenuItemStyle} onClick={handleLinkClick}>
57
+ {actionItem}
58
+ </div>
76
59
  );
77
60
  };
78
61
 
79
62
  const tooltipIt = (actionItem: React.ReactNode) => {
80
- if (!action.reason) return actionItem;
81
- const tooltipContent = t(action.reason, flattenArrayProps(action));
63
+ if (!subscriptionAction.reason) return actionItem;
64
+ const tooltipContent = t(
65
+ subscriptionAction.reason,
66
+ flattenArrayProps(subscriptionAction),
67
+ );
82
68
 
83
69
  return (
84
70
  <div css={tooltipMenuItemStyle}>
85
71
  <EuiToolTip position="top" content={tooltipContent}>
86
72
  <WfoSubscriptionActionExpandableMenuItem
87
- subscriptionAction={action}
73
+ subscriptionAction={subscriptionAction}
88
74
  onClickLockedRelation={() => setPopover(false)}
89
75
  >
90
76
  {actionItem}
@@ -95,7 +81,7 @@ export const WfoSubscriptionActionsMenuItem: FC<MenuItemProps> = ({
95
81
  };
96
82
 
97
83
  const getIcon = () =>
98
- action.reason ? (
84
+ subscriptionAction.reason ? (
99
85
  <div css={disabledIconStyle}>
100
86
  <WfoTargetTypeIcon target={target} disabled />
101
87
  <div css={secondaryIconStyle}>
@@ -113,10 +99,18 @@ export const WfoSubscriptionActionsMenuItem: FC<MenuItemProps> = ({
113
99
  );
114
100
 
115
101
  const ActionItem = () => (
116
- <EuiContextMenuItem icon={getIcon()} disabled={!!action.reason}>
117
- {action.description}
102
+ <EuiContextMenuItem
103
+ icon={getIcon()}
104
+ disabled={!!subscriptionAction.reason}
105
+ css={{
106
+ whiteSpace: 'nowrap',
107
+ }}
108
+ >
109
+ {subscriptionAction.description}
118
110
  </EuiContextMenuItem>
119
111
  );
120
112
 
121
- return action?.reason ? tooltipIt(<ActionItem />) : linkIt(<ActionItem />);
113
+ return subscriptionAction?.reason
114
+ ? tooltipIt(<ActionItem />)
115
+ : linkIt(<ActionItem />);
122
116
  };
@@ -35,6 +35,7 @@ export const getSubscriptionActionStyles = ({ theme }: WfoTheme) => {
35
35
  '&>:hover': {
36
36
  backgroundColor: theme.colors.lightestShade,
37
37
  borderRadius: theme.border.radius.medium,
38
+ cursor: 'pointer',
38
39
  },
39
40
  '.euiToolTipAnchor': {
40
41
  width: '100%',
@@ -60,7 +61,8 @@ export const getSubscriptionActionStyles = ({ theme }: WfoTheme) => {
60
61
  });
61
62
 
62
63
  const secondaryIconStyle = css({
63
- transform: 'translate(-11px, -8px);',
64
+ position: 'absolute',
65
+ transform: 'translate(13px, -8px);',
64
66
  });
65
67
 
66
68
  const spinnerSecondaryIconStyle = css({
@@ -1,6 +1,6 @@
1
1
  import React, { FC } from 'react';
2
2
 
3
- import { EuiAvatar } from '@elastic/eui';
3
+ import { css } from '@emotion/css';
4
4
 
5
5
  import { useOrchestratorTheme } from '@/hooks';
6
6
  import { WorkflowTarget } from '@/types';
@@ -17,17 +17,48 @@ interface WfoInSyncCompactIconProps {
17
17
  isLoading?: boolean;
18
18
  }
19
19
 
20
+ interface IconProps {
21
+ targetLetter: string;
22
+ backgroundColor: string;
23
+ }
24
+ const Icon = ({ targetLetter, backgroundColor }: IconProps) => {
25
+ const { theme } = useOrchestratorTheme();
26
+ const size = theme.size.l;
27
+ return (
28
+ <div
29
+ aria-label={targetLetter}
30
+ role="img"
31
+ title={targetLetter}
32
+ className={css({
33
+ backgroundColor: backgroundColor,
34
+ borderRadius: '50%',
35
+ color: theme.colors.ghost,
36
+ alignItems: 'center',
37
+ justifyContent: 'center',
38
+ fontWeight: 500,
39
+ fontSize: theme.size.m,
40
+ display: 'flex',
41
+ height: size,
42
+ width: size,
43
+ })}
44
+ >
45
+ {targetLetter}
46
+ </div>
47
+ );
48
+ };
49
+
20
50
  export const WfoTargetTypeIcon: FC<WfoTargetTypeIconProps> = ({
21
51
  target,
22
52
  disabled = false,
23
53
  }) => {
24
54
  const { theme } = useOrchestratorTheme();
25
-
26
- const color = disabled
55
+ const backGroundColor = disabled
27
56
  ? theme.colors.lightShade
28
57
  : getWorkflowTargetColor(target, theme);
29
- const name = getWorkflowTargetIconContent(target);
30
- return <EuiAvatar name={name} size="s" color={color} />;
58
+ const targetLetter = getWorkflowTargetIconContent(target);
59
+ return (
60
+ <Icon targetLetter={targetLetter} backgroundColor={backGroundColor} />
61
+ );
31
62
  };
32
63
 
33
64
  export const WfoInSyncCompactIcon: FC<WfoInSyncCompactIconProps> = ({
@@ -37,5 +68,5 @@ export const WfoInSyncCompactIcon: FC<WfoInSyncCompactIconProps> = ({
37
68
 
38
69
  const color = disabled ? theme.colors.lightShade : theme.colors.danger;
39
70
  const name = 'S';
40
- return <EuiAvatar name={name} size="s" color={color} />;
71
+ return <Icon targetLetter={name} backgroundColor={color} />;
41
72
  };
@@ -167,6 +167,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
167
167
  note: {
168
168
  columnType: ColumnType.DATA,
169
169
  label: t('note'),
170
+ width: '300px',
170
171
  renderData: (cellValue, row) => {
171
172
  return (
172
173
  <WfoSubscriptionNoteEdit
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.4.0';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.6.1';
@@ -5,15 +5,15 @@ import { Query } from '@elastic/eui';
5
5
  import { buildSearchParams } from '@/components/WfoSearchPage/utils';
6
6
  import { useSearchWithPaginationMutation } from '@/rtk/endpoints';
7
7
  import {
8
- AnySearchResult,
9
8
  EntityKind,
10
9
  Group,
11
10
  PaginatedSearchResults,
11
+ SearchResult,
12
12
  } from '@/types';
13
13
 
14
14
  interface PageHistoryItem {
15
15
  page: number;
16
- results: AnySearchResult[];
16
+ results: SearchResult[];
17
17
  cursor: number | null;
18
18
  }
19
19
 
@@ -312,6 +312,8 @@
312
312
  "tasks": "Tasks",
313
313
  "terminate": "Terminate workflow",
314
314
  "reconcile": "Reconcile workflow",
315
+ "actionStarted": "Action started",
316
+ "actionStartFailed": "Action failed",
315
317
  "actions": "Actions",
316
318
  "lockedBySubscriptions": "This action is locked by the following subscriptions:",
317
319
  "notAvailable": "Not available",
@@ -475,7 +477,6 @@
475
477
  "title": "Search results",
476
478
  "page": {
477
479
  "filledParameters": "Filled parameters",
478
- "results": "Results",
479
480
  "emptyGroup": "Empty group",
480
481
  "searchQuery": "Search query",
481
482
  "activeFilters": "Active filters",
@@ -484,7 +485,7 @@
484
485
  "action": "Action",
485
486
  "copilot": {
486
487
  "title": "Database assistant",
487
- "initial": "Ask me things such as:\n• *Find active subscriptions for Surf*\n• *Show terminated workflows”*\n\nThe filled template and results will appear on the left."
488
+ "initial": "Ask me things such as:\n• *Find active subscriptions*\n• *Show terminated workflows”*\n\nThe filled template and results will appear on the left."
488
489
  }
489
490
  }
490
491
  },
@@ -521,7 +522,6 @@
521
522
  "resultsOnPage": "{resultCount} result(s) on this page",
522
523
  "searchResultsPagination": "Search results pagination",
523
524
  "viewDetails": "View details",
524
- "closeButton": "Close",
525
525
  "selectOrEnterValue": "Select or type value",
526
526
  "enterValue": "Enter value",
527
527
  "fromNumber": "From",
@@ -314,6 +314,8 @@
314
314
  "reconcileSubscription": "Reconcile subscription",
315
315
  "validateSubscription": "Validate subscription",
316
316
  "actions": "Acties",
317
+ "actionStarted": "Actie gestart",
318
+ "actionStartFailed": "Actie mislukt",
317
319
  "lockedBySubscriptions": "Deze actie is geblokkeerd door de volgende subscriptions:",
318
320
  "subscription": {
319
321
  "no_modify_deleted_related_objects": "Deze subscription kan niet worden gewijzigd omdat het verwijzingen bevat naar andere systemen die zijn verwijderd.",
@@ -0,0 +1,23 @@
1
+ import { BaseQueryTypes, orchestratorApi } from '@/rtk';
2
+ import { GraphQLPageInfo } from '@/types';
3
+
4
+ export type AgentExportResponse = {
5
+ page: object[];
6
+ pageInfo?: GraphQLPageInfo;
7
+ };
8
+
9
+ const agentExportApi = orchestratorApi.injectEndpoints({
10
+ endpoints: (builder) => ({
11
+ getAgentExport: builder.query<AgentExportResponse, string>({
12
+ query: (downloadUrl) => ({
13
+ url: downloadUrl,
14
+ method: 'GET',
15
+ }),
16
+ extraOptions: {
17
+ baseQueryType: BaseQueryTypes.fetch,
18
+ },
19
+ }),
20
+ }),
21
+ });
22
+
23
+ export const { useLazyGetAgentExportQuery } = agentExportApi;
@@ -1,85 +1,23 @@
1
1
  export type EntityKind = 'SUBSCRIPTION' | 'PRODUCT' | 'WORKFLOW' | 'PROCESS';
2
2
 
3
- export interface SubscriptionMatchingField {
3
+ export interface MatchingField {
4
4
  text: string;
5
5
  path: string;
6
6
  highlight_indices: [number, number][];
7
7
  }
8
8
 
9
- export interface SubscriptionSearchResult {
9
+ export interface SearchResult {
10
+ entity_id: string;
11
+ entity_type: EntityKind;
12
+ entity_title: string;
10
13
  score: number;
11
14
  perfect_match: number;
12
- matching_field?: SubscriptionMatchingField | null;
13
- subscription: {
14
- subscription_id: string;
15
- description: string;
16
- product: {
17
- name: string;
18
- description: string;
19
- };
20
- };
15
+ matching_field?: MatchingField | null;
21
16
  }
22
17
 
23
- export interface ProcessSearchResult {
24
- score: number;
25
- perfect_match: number;
26
- matching_field?: SubscriptionMatchingField | null;
27
- process: {
28
- processId: string;
29
- workflowName: string;
30
- workflowId: string;
31
- status: string;
32
- isTask: boolean;
33
- createdBy?: string | null;
34
- startedAt: string;
35
- lastModifiedAt: string;
36
- lastStep?: string | null;
37
- failedReason?: string | null;
38
- subscriptionIds?: string[] | null;
39
- };
40
- }
41
-
42
- export interface ProductSearchResult {
43
- score: number;
44
- perfect_match: number;
45
- matching_field?: SubscriptionMatchingField | null;
46
- product: {
47
- product_id: string;
48
- name: string;
49
- product_type: string;
50
- tag?: string | null;
51
- description?: string | null;
52
- status?: string | null;
53
- created_at?: string | null;
54
- };
55
- }
56
-
57
- export interface WorkflowSearchResult {
58
- score: number;
59
- perfect_match: number;
60
- matching_field?: SubscriptionMatchingField | null;
61
- workflow: {
62
- name: string;
63
- products: {
64
- product_type: string;
65
- product_id: string;
66
- name: string;
67
- }[];
68
- description?: string | null;
69
- created_at?: string | null;
70
- };
71
- }
72
-
73
- /** Union of all search results */
74
- export type AnySearchResult =
75
- | SubscriptionSearchResult
76
- | ProcessSearchResult
77
- | ProductSearchResult
78
- | WorkflowSearchResult;
79
-
80
18
  /** Paginated search results */
81
19
  export type PaginatedSearchResults = {
82
- data: AnySearchResult[];
20
+ data: SearchResult[];
83
21
  page_info: {
84
22
  has_next_page: boolean;
85
23
  next_page_cursor: number | null;
@@ -138,7 +76,7 @@ type ActionType = 'select';
138
76
  type BaseSearchParameters = {
139
77
  query?: string | null;
140
78
 
141
- filters?: PathFilter[] | null;
79
+ filters?: PathFilter[] | Group | null;
142
80
 
143
81
  action: ActionType;
144
82
  };
@@ -1 +0,0 @@
1
- export * from './FilterDisplay';