@orchestrator-ui/orchestrator-ui-components 1.0.0 → 1.2.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.0.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@1.2.0 build
3
3
  > tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,6 +9,6 @@
9
9
  ESM Build start
10
10
  DTS Build start
11
11
  ESM dist/index.js 2.15 MB
12
- ESM ⚡️ Build success in 842ms
13
- DTS ⚡️ Build success in 12461ms
14
- DTS dist/index.d.ts 120.94 KB
12
+ ESM ⚡️ Build success in 796ms
13
+ DTS ⚡️ Build success in 12368ms
14
+ DTS dist/index.d.ts 121.81 KB
@@ -1,4 +1,4 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.0.0 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@1.2.0 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
@@ -1,34 +1,34 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.0.0 test
2
+ > @orchestrator-ui/orchestrator-ui-components@1.2.0 test
3
3
  > jest
4
4
 
5
- PASS Orchestrator UI Components Tests src/components/WfoForms/formFields/utils.spec.ts
6
5
  PASS Orchestrator UI Components Tests src/pages/processes/timelineUtils.spec.ts
6
+ PASS Orchestrator UI Components Tests src/components/WfoForms/formFields/utils.spec.ts
7
7
  PASS Orchestrator UI Components Tests src/utils/date.spec.ts
8
+ PASS Orchestrator UI Components Tests src/utils/string.spec.ts
8
9
  PASS Orchestrator UI Components Tests src/components/WfoSubscription/utils/utils.spec.ts
9
10
  PASS Orchestrator UI Components Tests src/utils/getProductNamesFromProcess.spec.ts
10
- PASS Orchestrator UI Components Tests src/utils/string.spec.ts
11
- PASS Orchestrator UI Components Tests src/components/WfoTree/treeUtils.spec.ts
12
11
  PASS Orchestrator UI Components Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
12
+ PASS Orchestrator UI Components Tests src/components/WfoTree/treeUtils.spec.ts
13
13
  PASS Orchestrator UI Components Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
14
14
  PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
15
- PASS Orchestrator UI Components Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
16
15
  PASS Orchestrator UI Components Tests src/components/WfoTable/utils/tableUtils.spec.ts
16
+ PASS Orchestrator UI Components Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
17
17
  PASS Orchestrator UI Components Tests src/messages/getTranslationMessages.spec.ts
18
18
  PASS Orchestrator UI Components Tests src/utils/getToastMessage.spec.ts
19
19
  PASS Orchestrator UI Components Tests src/components/WfoTable/utils/columns.spec.ts
20
+ PASS Orchestrator UI Components Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
20
21
  PASS Orchestrator UI Components Tests src/utils/sortObjectKeys.spec.ts
21
22
  PASS Orchestrator UI Components Tests src/utils/getTokenName.spec.ts
22
- PASS Orchestrator UI Components Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
23
- PASS Orchestrator UI Components Tests src/utils/environmentVariables.spec.ts
24
23
  PASS Orchestrator UI Components Tests src/utils/onlyUnique.spec.ts
24
+ PASS Orchestrator UI Components Tests src/utils/environmentVariables.spec.ts
25
25
  PASS Orchestrator UI Components Tests src/utils/uuid.spec.ts
26
- PASS Orchestrator UI Components Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
27
- PASS Orchestrator UI Components Tests src/utils/getTypedFieldFromObject.spec.ts
28
26
  PASS Orchestrator UI Components Tests src/utils/getQueryVariablesForExport.spec.ts
27
+ PASS Orchestrator UI Components Tests src/utils/getTypedFieldFromObject.spec.ts
28
+ PASS Orchestrator UI Components Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
29
29
 
30
30
  Test Suites: 24 passed, 24 total
31
31
  Tests: 144 passed, 144 total
32
32
  Snapshots: 0 total
33
- Time: 4.64 s
33
+ Time: 4.654 s
34
34
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 857b6de: Added option to override the baseQuery with custom baseQuery in RTK
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 2d0c99c: 840 Updates policy resources
14
+
3
15
  ## 1.0.0
4
16
 
5
17
  ### Major Changes
package/dist/index.d.ts CHANGED
@@ -272,6 +272,7 @@ declare type GraphqlFilter<Type> = {
272
272
  field: keyof Type;
273
273
  value: string;
274
274
  };
275
+ declare type FetchFilter<Type> = GraphqlFilter<Type>;
275
276
  declare type GraphqlQueryVariables<Type> = {
276
277
  first?: number;
277
278
  after?: number;
@@ -620,11 +621,11 @@ interface WfoPageTemplateProps {
620
621
  declare const WfoPageTemplate: FC<WfoPageTemplateProps>;
621
622
 
622
623
  declare enum PolicyResource {
623
- NAVIGATION_METADATA = "/orchestrator/metadata",
624
- NAVIGATION_SETTINGS = "/orchestrator/settings",
625
- NAVIGATION_SUBSCRIPTIONS = "/orchestrator/subscriptions",
626
- NAVIGATION_TASKS = "/orchestrator/tasks",
627
- NAVIGATION_WORKFLOWS = "/orchestrator/workflows",
624
+ NAVIGATION_METADATA = "/orchestrator/metadata/",
625
+ NAVIGATION_SETTINGS = "/orchestrator/settings/",
626
+ NAVIGATION_SUBSCRIPTIONS = "/orchestrator/subscriptions/",
627
+ NAVIGATION_TASKS = "/orchestrator/tasks/",
628
+ NAVIGATION_WORKFLOWS = "/orchestrator/processes/",
628
629
  PROCESS_ABORT = "/orchestrator/processes/abort/",
629
630
  PROCESS_DELETE = "/orchestrator/processes/delete/",
630
631
  PROCESS_DETAILS = "/orchestrator/processes/details/",
@@ -959,6 +960,7 @@ declare type CacheNames = {
959
960
  };
960
961
  declare const useRawProcessDetails: (processId: string) => react_query.UseQueryResult<ProcessDetailResultRaw, unknown>;
961
962
  declare const useCacheNames: () => react_query.UseQueryResult<CacheNames, unknown>;
963
+ declare const filterDataByCriteria: <Type>(data: Type[], filterCriteria: GraphqlFilter<Type>[]) => Type[];
962
964
  declare const useFilterQueryWithRest: <Type>(url: string, queryKey: string[], filters?: GraphqlFilter<Type>[] | undefined, refetchInterval?: number | undefined) => react_query.UseQueryResult<any, unknown>;
963
965
 
964
966
  interface SubscriptionAction {
@@ -2894,7 +2896,9 @@ declare enum CacheTags {
2894
2896
  }
2895
2897
  declare type ExtraOptions = {
2896
2898
  baseQueryType?: BaseQueryTypes;
2899
+ apiName?: string;
2897
2900
  };
2901
+ declare const prepareHeaders: (headers: Headers) => Promise<Headers>;
2898
2902
  declare const orchestratorApi: _reduxjs_toolkit_query_react.Api<(args: any, api: _reduxjs_toolkit_query_react.BaseQueryApi, extraOptions: ExtraOptions) => {
2899
2903
  error: _reduxjs_toolkit_query_react.FetchBaseQueryError;
2900
2904
  data?: undefined;
@@ -2911,6 +2915,7 @@ declare const orchestratorApi: _reduxjs_toolkit_query_react.Api<(args: any, api:
2911
2915
 
2912
2916
  declare const useGetCustomersQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2913
2917
  baseQueryType?: BaseQueryTypes | undefined;
2918
+ apiName?: string | undefined;
2914
2919
  }) => {
2915
2920
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
2916
2921
  data?: undefined;
@@ -2931,6 +2936,7 @@ declare type ProcessListResponse = {
2931
2936
  } & BaseGraphQlResult;
2932
2937
  declare const useGetProcessListQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<GraphqlQueryVariables<Process>, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2933
2938
  baseQueryType?: BaseQueryTypes | undefined;
2939
+ apiName?: string | undefined;
2934
2940
  }) => {
2935
2941
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
2936
2942
  data?: undefined;
@@ -2951,6 +2957,7 @@ interface EngineStatusReturnValue {
2951
2957
  }
2952
2958
  declare const useGetEngineStatusQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2953
2959
  baseQueryType?: BaseQueryTypes | undefined;
2960
+ apiName?: string | undefined;
2954
2961
  }) => {
2955
2962
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
2956
2963
  data?: undefined;
@@ -2966,6 +2973,7 @@ declare const useGetEngineStatusQuery: _reduxjs_toolkit_dist_query_react_buildHo
2966
2973
  } | PromiseLike<_reduxjs_toolkit_dist_query_baseQueryTypes.QueryReturnValue<unknown, _rtk_query_graphql_request_base_query_dist_GraphqlBaseQueryTypes.ErrorResponse, {}>>, CacheTags, EngineStatusReturnValue, "orchestratorApi">>;
2967
2974
  declare const useClearCacheMutation: _reduxjs_toolkit_dist_query_react_buildHooks.UseMutation<_reduxjs_toolkit_query.MutationDefinition<string, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2968
2975
  baseQueryType?: BaseQueryTypes | undefined;
2976
+ apiName?: string | undefined;
2969
2977
  }) => {
2970
2978
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
2971
2979
  data?: undefined;
@@ -2981,6 +2989,7 @@ declare const useClearCacheMutation: _reduxjs_toolkit_dist_query_react_buildHook
2981
2989
  } | PromiseLike<_reduxjs_toolkit_dist_query_baseQueryTypes.QueryReturnValue<unknown, _rtk_query_graphql_request_base_query_dist_GraphqlBaseQueryTypes.ErrorResponse, {}>>, CacheTags, void, "orchestratorApi">>;
2982
2990
  declare const useSetEngineStatusMutation: _reduxjs_toolkit_dist_query_react_buildHooks.UseMutation<_reduxjs_toolkit_query.MutationDefinition<boolean, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2983
2991
  baseQueryType?: BaseQueryTypes | undefined;
2992
+ apiName?: string | undefined;
2984
2993
  }) => {
2985
2994
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
2986
2995
  data?: undefined;
@@ -2997,6 +3006,7 @@ declare const useSetEngineStatusMutation: _reduxjs_toolkit_dist_query_react_buil
2997
3006
 
2998
3007
  declare const useStreamMessagesQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, (args: any, api: _reduxjs_toolkit_query.BaseQueryApi, extraOptions: {
2999
3008
  baseQueryType?: BaseQueryTypes | undefined;
3009
+ apiName?: string | undefined;
3000
3010
  }) => {
3001
3011
  error: _reduxjs_toolkit_query.FetchBaseQueryError;
3002
3012
  data?: undefined;
@@ -3026,19 +3036,28 @@ declare const toastMessagesReducer: Reducer<ToastState>;
3026
3036
  declare type OrchestratorConfigSlice = Slice<OrchestratorConfig>;
3027
3037
  declare const getOrchestratorConfigSlice: (config: OrchestratorConfig) => OrchestratorConfigSlice;
3028
3038
 
3039
+ declare type CustomApiConfig = {
3040
+ apiName: string;
3041
+ apiBaseUrl: string;
3042
+ };
3043
+ declare type CustomApiSlice = Slice<CustomApiConfig[]>;
3044
+ declare const getCustomApiSlice: (customApis: CustomApiConfig[]) => CustomApiSlice;
3045
+
3029
3046
  declare type RootState = {
3030
3047
  orchestratorApi: CombinedState<Record<string, never>, 'engineStatus', 'orchestratorApi'>;
3031
3048
  toastMessages: ReturnType<typeof toastMessagesReducer>;
3032
3049
  orchestratorConfig: OrchestratorConfig;
3050
+ customApis: CustomApiConfig[];
3033
3051
  };
3034
- declare const getOrchestratorStore: (orchestratorConfig: OrchestratorConfig) => EnhancedStore<RootState>;
3052
+ declare const getOrchestratorStore: (orchestratorConfig: OrchestratorConfig, customApis: CustomApiConfig[]) => EnhancedStore<RootState>;
3035
3053
  declare type AppDispatch = Dispatch<UnknownAction>;
3036
3054
 
3037
3055
  declare type StoreProviderProps = {
3038
3056
  initialOrchestratorConfig: OrchestratorConfig;
3057
+ customApis?: CustomApiConfig[];
3039
3058
  children: ReactNode;
3040
3059
  };
3041
- declare const StoreProvider: ({ initialOrchestratorConfig, children, }: StoreProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
3060
+ declare const StoreProvider: ({ initialOrchestratorConfig, customApis, children, }: StoreProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
3042
3061
 
3043
3062
  declare const defaultOrchestratorTheme: EuiThemeModifications;
3044
3063
 
@@ -3083,4 +3102,4 @@ declare const getQueryVariablesForExport: <T extends object>(queryVariables: Gra
3083
3102
 
3084
3103
  declare const onlyUnique: (value: string, index: number, array: string[]) => boolean;
3085
3104
 
3086
- export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, ApiClient, ApiClientContext, ApiClientContextProvider, type ApiClientContextProviderProps, type ApiContext, type AppDispatch, type AutoFieldsProps, BadgeType, BaseApiClient, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, CacheTags, ColorModes, type ColumnConfig, type ConfirmDialogActions, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type Customer, CustomerField, type CustomerFieldProps, type CustomersResult, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZES, type DataDisplayParams, type DataDisplayReturnValues, DateField, type DateFieldProps, DividerField, type DividerFieldProps, type EmailAddress, type EmailState, EngineStatus, Environment, ErrorField, type ErrorFieldProps, ErrorsField, type ErrorsFieldProps, type ExternalService, type Field, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, GET_PROCESS_LIST_GRAPHQL_QUERY, GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY, GET_PROCESS_STEPS_GRAPHQL_QUERY, GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY, GET_PRODUCTS_GRAPHQL_QUERY, GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY, GET_RESOURCE_TYPES_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY, GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY, GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY, type GraphQLPageInfo, type GraphQLSort, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, type IPvAnyNetworkFieldProps, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InputForm, IpNetworkField, type KeyValue, LabelField, type LabelFieldProps, ListAddField, type ListAddFieldProps, ListDelField, type ListDelFieldProps, ListField, type ListFieldProps, ListSelectField, type ListSelectFieldProps, Locale, LocationCodeField, type LocationCodeFieldProps, LongTextField, type LongTextFieldProps, MAXIMUM_ITEMS_FOR_BULK_FETCHING, METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY, METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY, METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, NestField, type NestFieldProps, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListItem, type ProcessListResponse, type ProcessListResult, ProcessStatus, type ProcessStatusCounts, type ProcessStepsResult, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductDefinition, type ProductDefinitionsResult, ProductField, type ProductFieldProps, ProductLifecycleStatus, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type RootState, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, type SelectFieldProps, type ShowConfirmDialog, type ShowConfirmDialogType, SortOrder, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, SubscriptionStatus, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TranslationMessagesMap, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, VlanField, type VlanFieldProps, WFO_STATUS_COLOR_FIELD, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBreadcrumbs, WfoCheckmarkCircleFill, WfoChevronDown, WfoChevronUp, WfoCode, WfoCogFill, WfoContactEnvelopeFill, type WfoControlColumn, WfoCubeSolid, WfoDataGridTable, type WfoDataGridTableColumns, type WfoDataGridTableProps, type WfoDataSearch, type WfoDataSorting, WfoDateTime, type WfoDateTimeProps, WfoDropdownButton, WfoEngineStatusBadge, WfoEngineStatusButton, WfoEnvironmentBadge, WfoError, WfoErrorBoundary, type WfoEuiBasicTableColumn, WfoEyeFill, WfoFailedTasksBadge, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInformationModal, type WfoInformationModalProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLoading, WfoLogoutIcon, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoPageHeader, type WfoPageHeaderProps, WfoPageTemplate, type WfoPageTemplateProps, WfoPageUnauthorized, WfoPencil, WfoPencilAlt, WfoPlayCircle, WfoPlayFill, WfoPlusCircleFill, type WfoPolicyRenderFallbackProps, WfoPolicyRenderPageFallback, WfoProcessDetailPage, WfoProcessListSubscriptionsCell, WfoProcessRawData, WfoProcessStatusBadge, type WfoProcessStatusBadgeProps, WfoProcessSubscriptionDelta, WfoProcessesList, type WfoProcessesListProps, type WfoProcessesListSubscriptionsCellProps, WfoProcessesTimeline, WfoProductBlockBadge, type WfoProductBlockBadgeProps, WfoProductBlocksPage, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoRefresh, WfoResourceTypesPage, WfoSearchField, type WfoSearchFieldProps, WfoSearchStrikethrough, type WfoSession, WfoSettingsModal, type WfoSettingsModalProps, WfoSettingsPage, WfoShare, WfoSideMenu, WfoSidebar, type WfoSidebarProps, WfoSortAsc, WfoSortButton, type WfoSortButtonProps, WfoSortButtons, type WfoSortButtonsProps, WfoSortDesc, WfoSortDirectionIcon, type WfoSortDirectionIconProps, WfoStartPage, WfoStartProcessPage, WfoStartTaskButtonComboBox, WfoStatistic, WfoStatus, WfoStatusColorField, type WfoStatusColorFieldProps, WfoStatusDotIcon, WfoStep, WfoStepList, WfoStepListHeader, type WfoStepListHeaderProps, type WfoStepListProps, type WfoStepListRef, type WfoStepProps, WfoStepStatusIcon, type WfoStepStatusIconProps, WfoSubmitModal, type WfoSubmitModalProps, WfoSubscription, WfoSubscriptionActions, type WfoSubscriptionActionsProps, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionsListPage, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTextAnchor, WfoTimeline, type WfoTimelineProps, WfoToastsList, type WfoTreeNodeMap, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoViewList, WfoWarningTriangle, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, addToastMessage, calculateTimeDifference, camelToHuman, clearTableConfigFromLocalStorage, defaultOrchestratorTheme, defaultTasksListTabs, determineNewSortOrder, determinePageIndex, flattenArrayProps, formatDate, formatDateCetWithUtc, getApiClient, getCurrentBrowserLocale, getDataSortHandler, getDate, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getInitialColumnOrder, getNumberValueFromEnvironmentVariable, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProcessListGraphQlQuery, getProcessListSummaryGraphQlQuery, getProductBlockTitle, getProductNamesFromProcess, getProductsQuery, getProductsSummaryQuery, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getSubscriptionDropdownOptionsGraphQlQuery, getSubscriptionsListGraphQlQuery, getSubscriptionsListSummaryGraphQlQuery, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapSortableAndFilterableValuesToTableColumnConfig, onlyUnique, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, processListQuery, removeSuffix, removeToastMessage, renderEmptyElementWhenNotAllowedByPolicy, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, stop, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCacheNames, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useFilterQueryWithRest, useGetCustomersQuery, useGetEngineStatusQuery, useGetProcessListQuery, useGetTranslationMessages, useMutateProcess, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useProcessStatusCountsQuery, useQueryWithFetch, useQueryWithGraphql, useQueryWithGraphqlLazy, useRawProcessDetails, useSetEngineStatusMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionActions, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment };
3105
+ export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, ApiClient, ApiClientContext, ApiClientContextProvider, type ApiClientContextProviderProps, type ApiContext, type AppDispatch, type AutoFieldsProps, BadgeType, BaseApiClient, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, CacheTags, ColorModes, type ColumnConfig, type ConfirmDialogActions, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type CustomApiConfig, type Customer, CustomerField, type CustomerFieldProps, type CustomersResult, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZES, type DataDisplayParams, type DataDisplayReturnValues, DateField, type DateFieldProps, DividerField, type DividerFieldProps, type EmailAddress, type EmailState, EngineStatus, Environment, ErrorField, type ErrorFieldProps, ErrorsField, type ErrorsFieldProps, type ExternalService, type FetchFilter, type Field, type FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, GET_PROCESS_LIST_GRAPHQL_QUERY, GET_PROCESS_LIST_SUMMARY_GRAPHQL_QUERY, GET_PROCESS_STEPS_GRAPHQL_QUERY, GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY, GET_PRODUCTS_GRAPHQL_QUERY, GET_PRODUCTS_SUMMARY_GRAPHQL_QUERY, GET_RESOURCE_TYPES_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_GRAPHQL_QUERY, GET_SUBSCRIPTIONS_LIST_SUMMARY_GRAPHQL_QUERY, GET_SUBSCRIPTION_DETAIL_GRAPHQL_QUERY, GET_SUBSCRIPTION_DROPDOWN_OPTIONS_GRAPHQL_QUERY, type GraphQLPageInfo, type GraphQLSort, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, type IPvAnyNetworkFieldProps, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InputForm, IpNetworkField, type KeyValue, LabelField, type LabelFieldProps, ListAddField, type ListAddFieldProps, ListDelField, type ListDelFieldProps, ListField, type ListFieldProps, ListSelectField, type ListSelectFieldProps, Locale, LocationCodeField, type LocationCodeFieldProps, LongTextField, type LongTextFieldProps, MAXIMUM_ITEMS_FOR_BULK_FETCHING, METADATA_PRODUCT_BLOCKS_TABLE_LOCAL_STORAGE_KEY, METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY, METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, NestField, type NestFieldProps, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListItem, type ProcessListResponse, type ProcessListResult, ProcessStatus, type ProcessStatusCounts, type ProcessStepsResult, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductDefinition, type ProductDefinitionsResult, ProductField, type ProductFieldProps, ProductLifecycleStatus, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type RootState, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, type SelectFieldProps, type ShowConfirmDialog, type ShowConfirmDialogType, SortOrder, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, SubscriptionStatus, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TranslationMessagesMap, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, VlanField, type VlanFieldProps, WFO_STATUS_COLOR_FIELD, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBreadcrumbs, WfoCheckmarkCircleFill, WfoChevronDown, WfoChevronUp, WfoCode, WfoCogFill, WfoContactEnvelopeFill, type WfoControlColumn, WfoCubeSolid, WfoDataGridTable, type WfoDataGridTableColumns, type WfoDataGridTableProps, type WfoDataSearch, type WfoDataSorting, WfoDateTime, type WfoDateTimeProps, WfoDropdownButton, WfoEngineStatusBadge, WfoEngineStatusButton, WfoEnvironmentBadge, WfoError, WfoErrorBoundary, type WfoEuiBasicTableColumn, WfoEyeFill, WfoFailedTasksBadge, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInformationModal, type WfoInformationModalProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLoading, WfoLogoutIcon, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoPageHeader, type WfoPageHeaderProps, WfoPageTemplate, type WfoPageTemplateProps, WfoPageUnauthorized, WfoPencil, WfoPencilAlt, WfoPlayCircle, WfoPlayFill, WfoPlusCircleFill, type WfoPolicyRenderFallbackProps, WfoPolicyRenderPageFallback, WfoProcessDetailPage, WfoProcessListSubscriptionsCell, WfoProcessRawData, WfoProcessStatusBadge, type WfoProcessStatusBadgeProps, WfoProcessSubscriptionDelta, WfoProcessesList, type WfoProcessesListProps, type WfoProcessesListSubscriptionsCellProps, WfoProcessesTimeline, WfoProductBlockBadge, type WfoProductBlockBadgeProps, WfoProductBlocksPage, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoRefresh, WfoResourceTypesPage, WfoSearchField, type WfoSearchFieldProps, WfoSearchStrikethrough, type WfoSession, WfoSettingsModal, type WfoSettingsModalProps, WfoSettingsPage, WfoShare, WfoSideMenu, WfoSidebar, type WfoSidebarProps, WfoSortAsc, WfoSortButton, type WfoSortButtonProps, WfoSortButtons, type WfoSortButtonsProps, WfoSortDesc, WfoSortDirectionIcon, type WfoSortDirectionIconProps, WfoStartPage, WfoStartProcessPage, WfoStartTaskButtonComboBox, WfoStatistic, WfoStatus, WfoStatusColorField, type WfoStatusColorFieldProps, WfoStatusDotIcon, WfoStep, WfoStepList, WfoStepListHeader, type WfoStepListHeaderProps, type WfoStepListProps, type WfoStepListRef, type WfoStepProps, WfoStepStatusIcon, type WfoStepStatusIconProps, WfoSubmitModal, type WfoSubmitModalProps, WfoSubscription, WfoSubscriptionActions, type WfoSubscriptionActionsProps, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionsListPage, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTextAnchor, WfoTimeline, type WfoTimelineProps, WfoToastsList, type WfoTreeNodeMap, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoViewList, WfoWarningTriangle, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, addToastMessage, calculateTimeDifference, camelToHuman, clearTableConfigFromLocalStorage, defaultOrchestratorTheme, defaultTasksListTabs, determineNewSortOrder, determinePageIndex, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getApiClient, getCurrentBrowserLocale, getCustomApiSlice, getDataSortHandler, getDate, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getInitialColumnOrder, getNumberValueFromEnvironmentVariable, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProcessListGraphQlQuery, getProcessListSummaryGraphQlQuery, getProductBlockTitle, getProductNamesFromProcess, getProductsQuery, getProductsSummaryQuery, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getSubscriptionDropdownOptionsGraphQlQuery, getSubscriptionsListGraphQlQuery, getSubscriptionsListSummaryGraphQlQuery, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapSortableAndFilterableValuesToTableColumnConfig, onlyUnique, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, prepareHeaders, processListQuery, removeSuffix, removeToastMessage, renderEmptyElementWhenNotAllowedByPolicy, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, stop, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCacheNames, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useFilterQueryWithRest, useGetCustomersQuery, useGetEngineStatusQuery, useGetProcessListQuery, useGetTranslationMessages, useMutateProcess, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useProcessStatusCountsQuery, useQueryWithFetch, useQueryWithGraphql, useQueryWithGraphqlLazy, useRawProcessDetails, useSetEngineStatusMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionActions, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment };
package/dist/index.js CHANGED
@@ -40407,19 +40407,23 @@ var prepareHeaders = (headers) => __async(void 0, null, function* () {
40407
40407
  var orchestratorApi = createApi2({
40408
40408
  reducerPath: "orchestratorApi",
40409
40409
  baseQuery: (args, api, extraOptions) => {
40410
- const { baseQueryType } = extraOptions || {};
40410
+ var _a;
40411
+ const { baseQueryType, apiName } = extraOptions || {};
40411
40412
  const state = api.getState();
40412
40413
  const { orchestratorApiBaseUrl, graphqlEndpointCore } = state.orchestratorConfig;
40414
+ const customApi = (_a = state.customApis) == null ? void 0 : _a.find(
40415
+ (query) => query.apiName === apiName
40416
+ );
40413
40417
  switch (baseQueryType) {
40414
40418
  case "fetch" /* fetch */:
40415
40419
  const fetchFn = fetchBaseQuery({
40416
- baseUrl: orchestratorApiBaseUrl,
40420
+ baseUrl: customApi ? customApi.apiBaseUrl : orchestratorApiBaseUrl,
40417
40421
  prepareHeaders
40418
40422
  });
40419
40423
  return fetchFn(args, api, {});
40420
40424
  default:
40421
40425
  const graphqlFn = graphqlRequestBaseQuery({
40422
- url: graphqlEndpointCore,
40426
+ url: customApi ? customApi.apiBaseUrl : graphqlEndpointCore,
40423
40427
  prepareHeaders
40424
40428
  });
40425
40429
  return graphqlFn(args, api, {});
@@ -42883,8 +42887,8 @@ var WfoWarningTriangle = ({
42883
42887
  /* @__PURE__ */ jsx41("g", { id: "Symbols", stroke: color, strokeWidth: "1.5", fill: "none", children: /* @__PURE__ */ jsx41("g", { id: "icon/exclamation-triangle", fill: "none", children: /* @__PURE__ */ jsx41(
42884
42888
  "path",
42885
42889
  {
42886
- "stroke-linecap": "round",
42887
- "stroke-linejoin": "round",
42890
+ strokeLinecap: "round",
42891
+ strokeLinejoin: "round",
42888
42892
  d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"
42889
42893
  }
42890
42894
  ) }) })
@@ -43007,14 +43011,25 @@ var getOrchestratorConfigSlice = (config) => {
43007
43011
  });
43008
43012
  };
43009
43013
 
43014
+ // src/rtk/slices/customApis.ts
43015
+ var getCustomApiSlice = (customApis) => {
43016
+ return createSlice({
43017
+ name: "customApis",
43018
+ initialState: customApis,
43019
+ reducers: {}
43020
+ });
43021
+ };
43022
+
43010
43023
  // src/rtk/store.ts
43011
- var getOrchestratorStore = (orchestratorConfig) => {
43024
+ var getOrchestratorStore = (orchestratorConfig, customApis) => {
43012
43025
  const configSlice = getOrchestratorConfigSlice(orchestratorConfig);
43026
+ const customApisSlice = getCustomApiSlice(customApis);
43013
43027
  const orchestratorStore = configureStore({
43014
43028
  reducer: {
43015
43029
  [orchestratorApi.reducerPath]: orchestratorApi.reducer,
43016
43030
  toastMessages: toastMessagesReducer,
43017
- orchestratorConfig: configSlice.reducer
43031
+ orchestratorConfig: configSlice.reducer,
43032
+ customApis: customApisSlice == null ? void 0 : customApisSlice.reducer
43018
43033
  },
43019
43034
  middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(orchestratorApi.middleware)
43020
43035
  });
@@ -43027,9 +43042,10 @@ import { Provider as Provider2 } from "react-redux";
43027
43042
  import { jsx as jsx45 } from "@emotion/react/jsx-runtime";
43028
43043
  var StoreProvider = ({
43029
43044
  initialOrchestratorConfig,
43045
+ customApis = [],
43030
43046
  children
43031
43047
  }) => {
43032
- const store = getOrchestratorStore(initialOrchestratorConfig);
43048
+ const store = getOrchestratorStore(initialOrchestratorConfig, customApis);
43033
43049
  const [orchestratorStore] = useState5(store);
43034
43050
  return /* @__PURE__ */ jsx45(Provider2, { store: orchestratorStore, children });
43035
43051
  };
@@ -43756,11 +43772,11 @@ import { EuiSideNav, EuiSpacer as EuiSpacer3 } from "@elastic/eui";
43756
43772
 
43757
43773
  // src/configuration/policy-resources.ts
43758
43774
  var PolicyResource = /* @__PURE__ */ ((PolicyResource2) => {
43759
- PolicyResource2["NAVIGATION_METADATA"] = "/orchestrator/metadata";
43760
- PolicyResource2["NAVIGATION_SETTINGS"] = "/orchestrator/settings";
43761
- PolicyResource2["NAVIGATION_SUBSCRIPTIONS"] = "/orchestrator/subscriptions";
43762
- PolicyResource2["NAVIGATION_TASKS"] = "/orchestrator/tasks";
43763
- PolicyResource2["NAVIGATION_WORKFLOWS"] = "/orchestrator/workflows";
43775
+ PolicyResource2["NAVIGATION_METADATA"] = "/orchestrator/metadata/";
43776
+ PolicyResource2["NAVIGATION_SETTINGS"] = "/orchestrator/settings/";
43777
+ PolicyResource2["NAVIGATION_SUBSCRIPTIONS"] = "/orchestrator/subscriptions/";
43778
+ PolicyResource2["NAVIGATION_TASKS"] = "/orchestrator/tasks/";
43779
+ PolicyResource2["NAVIGATION_WORKFLOWS"] = "/orchestrator/processes/";
43764
43780
  PolicyResource2["PROCESS_ABORT"] = "/orchestrator/processes/abort/";
43765
43781
  PolicyResource2["PROCESS_DELETE"] = "/orchestrator/processes/delete/";
43766
43782
  PolicyResource2["PROCESS_DETAILS"] = "/orchestrator/processes/details/";
@@ -46415,11 +46431,11 @@ var WfoStartCreateWorkflowButtonComboBox = () => {
46415
46431
  import { Fragment as Fragment5, jsx as jsx61, jsxs as jsxs42 } from "@emotion/react/jsx-runtime";
46416
46432
  var renderEmptyElementWhenNotAllowedByPolicy = (isAllowed) => isAllowed ? void 0 : () => /* @__PURE__ */ jsx61(Fragment5, {});
46417
46433
  var urlPolicyMap = /* @__PURE__ */ new Map([
46418
- [PATH_WORKFLOWS, "/orchestrator/workflows" /* NAVIGATION_WORKFLOWS */],
46419
- [PATH_SUBSCRIPTIONS, "/orchestrator/subscriptions" /* NAVIGATION_SUBSCRIPTIONS */],
46420
- [PATH_METADATA, "/orchestrator/metadata" /* NAVIGATION_METADATA */],
46421
- [PATH_TASKS, "/orchestrator/tasks" /* NAVIGATION_TASKS */],
46422
- [PATH_SETTINGS, "/orchestrator/settings" /* NAVIGATION_SETTINGS */]
46434
+ [PATH_WORKFLOWS, "/orchestrator/processes/" /* NAVIGATION_WORKFLOWS */],
46435
+ [PATH_SUBSCRIPTIONS, "/orchestrator/subscriptions/" /* NAVIGATION_SUBSCRIPTIONS */],
46436
+ [PATH_METADATA, "/orchestrator/metadata/" /* NAVIGATION_METADATA */],
46437
+ [PATH_TASKS, "/orchestrator/tasks/" /* NAVIGATION_TASKS */],
46438
+ [PATH_SETTINGS, "/orchestrator/settings/" /* NAVIGATION_SETTINGS */]
46423
46439
  ]);
46424
46440
  var WfoSidebar = ({ overrideMenuItems }) => {
46425
46441
  const t = useTranslations9("main");
@@ -59498,11 +59514,13 @@ export {
59498
59514
  defaultTasksListTabs,
59499
59515
  determineNewSortOrder,
59500
59516
  determinePageIndex,
59517
+ filterDataByCriteria,
59501
59518
  flattenArrayProps,
59502
59519
  formatDate,
59503
59520
  formatDateCetWithUtc,
59504
59521
  getApiClient,
59505
59522
  getCurrentBrowserLocale,
59523
+ getCustomApiSlice,
59506
59524
  getDataSortHandler,
59507
59525
  getDate,
59508
59526
  getFieldFromProductBlockInstanceValues,
@@ -59547,6 +59565,7 @@ export {
59547
59565
  parseDateToLocaleDateTimeString,
59548
59566
  parseDateToLocaleTimeString,
59549
59567
  parseIsoString,
59568
+ prepareHeaders,
59550
59569
  processListQuery,
59551
59570
  removeSuffix,
59552
59571
  removeToastMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -1,9 +1,9 @@
1
1
  export enum PolicyResource {
2
- NAVIGATION_METADATA = '/orchestrator/metadata',
3
- NAVIGATION_SETTINGS = '/orchestrator/settings',
4
- NAVIGATION_SUBSCRIPTIONS = '/orchestrator/subscriptions',
5
- NAVIGATION_TASKS = '/orchestrator/tasks',
6
- NAVIGATION_WORKFLOWS = '/orchestrator/workflows',
2
+ NAVIGATION_METADATA = '/orchestrator/metadata/',
3
+ NAVIGATION_SETTINGS = '/orchestrator/settings/',
4
+ NAVIGATION_SUBSCRIPTIONS = '/orchestrator/subscriptions/',
5
+ NAVIGATION_TASKS = '/orchestrator/tasks/',
6
+ NAVIGATION_WORKFLOWS = '/orchestrator/processes/',
7
7
  PROCESS_ABORT = '/orchestrator/processes/abort/',
8
8
  PROCESS_DELETE = '/orchestrator/processes/delete/',
9
9
  PROCESS_DETAILS = '/orchestrator/processes/details/',
@@ -29,7 +29,7 @@ export const useCacheNames = () => {
29
29
  );
30
30
  };
31
31
 
32
- const filterDataByCriteria = <Type>(
32
+ export const filterDataByCriteria = <Type>(
33
33
  data: Type[],
34
34
  filterCriteria: GraphqlFilter<Type>[],
35
35
  ): Type[] => {
@@ -18,8 +18,8 @@ export const WfoWarningTriangle: FC<WfoIconProps> = ({
18
18
  <g id="Symbols" stroke={color} strokeWidth="1.5" fill="none">
19
19
  <g id="icon/exclamation-triangle" fill="none">
20
20
  <path
21
- stroke-linecap="round"
22
- stroke-linejoin="round"
21
+ strokeLinecap="round"
22
+ strokeLinejoin="round"
23
23
  d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"
24
24
  />
25
25
  </g>
package/src/rtk/api.ts CHANGED
@@ -21,9 +21,10 @@ export enum CacheTags {
21
21
 
22
22
  type ExtraOptions = {
23
23
  baseQueryType?: BaseQueryTypes;
24
+ apiName?: string;
24
25
  };
25
26
 
26
- const prepareHeaders = async (headers: Headers) => {
27
+ export const prepareHeaders = async (headers: Headers) => {
27
28
  const session = (await getSession()) as WfoSession;
28
29
  if (session?.accessToken) {
29
30
  headers.set('Authorization', `Bearer ${session.accessToken}`);
@@ -34,22 +35,28 @@ const prepareHeaders = async (headers: Headers) => {
34
35
  export const orchestratorApi = createApi({
35
36
  reducerPath: 'orchestratorApi',
36
37
  baseQuery: (args, api, extraOptions: ExtraOptions) => {
37
- const { baseQueryType } = extraOptions || {};
38
+ const { baseQueryType, apiName } = extraOptions || {};
38
39
 
39
40
  const state = api.getState() as RootState;
40
41
  const { orchestratorApiBaseUrl, graphqlEndpointCore } =
41
42
  state.orchestratorConfig;
42
43
 
44
+ const customApi = state.customApis?.find(
45
+ (query) => query.apiName === apiName,
46
+ );
47
+
43
48
  switch (baseQueryType) {
44
49
  case BaseQueryTypes.fetch:
45
50
  const fetchFn = fetchBaseQuery({
46
- baseUrl: orchestratorApiBaseUrl,
51
+ baseUrl: customApi
52
+ ? customApi.apiBaseUrl
53
+ : orchestratorApiBaseUrl,
47
54
  prepareHeaders,
48
55
  });
49
56
  return fetchFn(args, api, {});
50
57
  default:
51
58
  const graphqlFn = graphqlRequestBaseQuery({
52
- url: graphqlEndpointCore,
59
+ url: customApi ? customApi.apiBaseUrl : graphqlEndpointCore,
53
60
  prepareHeaders,
54
61
  });
55
62
  return graphqlFn(args, api, {});
@@ -0,0 +1,18 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import type { Slice } from '@reduxjs/toolkit';
3
+
4
+ export type CustomApiConfig = {
5
+ apiName: string;
6
+ apiBaseUrl: string;
7
+ };
8
+ type CustomApiSlice = Slice<CustomApiConfig[]>;
9
+
10
+ export const getCustomApiSlice = (
11
+ customApis: CustomApiConfig[],
12
+ ): CustomApiSlice => {
13
+ return createSlice({
14
+ name: 'customApis',
15
+ initialState: customApis,
16
+ reducers: {},
17
+ });
18
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './toastMessages';
2
2
  export * from './orchestratorConfig';
3
+ export * from './customApis';
package/src/rtk/store.ts CHANGED
@@ -3,6 +3,7 @@ import type { EnhancedStore } from '@reduxjs/toolkit';
3
3
  import type { Dispatch, UnknownAction } from '@reduxjs/toolkit';
4
4
  import { CombinedState } from '@reduxjs/toolkit/query';
5
5
 
6
+ import { CustomApiConfig, getCustomApiSlice } from '@/rtk/slices';
6
7
  import type { OrchestratorConfig } from '@/types';
7
8
 
8
9
  import { orchestratorApi } from './api';
@@ -16,18 +17,22 @@ export type RootState = {
16
17
  >;
17
18
  toastMessages: ReturnType<typeof toastMessagesReducer>;
18
19
  orchestratorConfig: OrchestratorConfig;
20
+ customApis: CustomApiConfig[];
19
21
  };
20
22
 
21
23
  export const getOrchestratorStore = (
22
24
  orchestratorConfig: OrchestratorConfig,
25
+ customApis: CustomApiConfig[],
23
26
  ): EnhancedStore<RootState> => {
24
27
  const configSlice = getOrchestratorConfigSlice(orchestratorConfig);
28
+ const customApisSlice = getCustomApiSlice(customApis);
25
29
 
26
30
  const orchestratorStore = configureStore({
27
31
  reducer: {
28
32
  [orchestratorApi.reducerPath]: orchestratorApi.reducer,
29
33
  toastMessages: toastMessagesReducer,
30
34
  orchestratorConfig: configSlice.reducer,
35
+ customApis: customApisSlice?.reducer,
31
36
  },
32
37
  middleware: (getDefaultMiddleware) =>
33
38
  getDefaultMiddleware().concat(orchestratorApi.middleware),
@@ -2,20 +2,23 @@ import React, { useState } from 'react';
2
2
  import type { ReactNode } from 'react';
3
3
  import { Provider } from 'react-redux';
4
4
 
5
+ import { CustomApiConfig } from '@/rtk/slices/customApis';
5
6
  import type { OrchestratorConfig } from '@/types';
6
7
 
7
8
  import { getOrchestratorStore } from './store';
8
9
 
9
10
  export type StoreProviderProps = {
10
11
  initialOrchestratorConfig: OrchestratorConfig;
12
+ customApis?: CustomApiConfig[];
11
13
  children: ReactNode;
12
14
  };
13
15
 
14
16
  export const StoreProvider = ({
15
17
  initialOrchestratorConfig,
18
+ customApis = [],
16
19
  children,
17
20
  }: StoreProviderProps) => {
18
- const store = getOrchestratorStore(initialOrchestratorConfig);
21
+ const store = getOrchestratorStore(initialOrchestratorConfig, customApis);
19
22
  const [orchestratorStore] = useState(store);
20
23
 
21
24
  return <Provider store={orchestratorStore}>{children}</Provider>;
@@ -251,6 +251,8 @@ export type GraphqlFilter<Type> = {
251
251
  value: string;
252
252
  };
253
253
 
254
+ export type FetchFilter<Type> = GraphqlFilter<Type>;
255
+
254
256
  export type GraphqlQueryVariables<Type> = {
255
257
  first?: number;
256
258
  after?: number;