@orchestrator-ui/orchestrator-ui-components 1.30.0 → 1.30.2

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.30.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.2 build
3
3
  > tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,7 +8,7 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  DTS Build start
11
- ESM dist/index.js 1.86 MB
12
- ESM ⚡️ Build success in 708ms
13
- DTS ⚡️ Build success in 13880ms
14
- DTS dist/index.d.ts 174.39 KB
11
+ ESM dist/index.js 1.87 MB
12
+ ESM ⚡️ Build success in 680ms
13
+ DTS ⚡️ Build success in 14518ms
14
+ DTS dist/index.d.ts 174.58 KB
@@ -1,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.0 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.2 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
5
5
 
@@ -1,13 +1,13 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.0 test
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.2 test
3
3
  > jest
4
4
 
5
5
  PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
- PASS Wfo-UI Tests src/utils/date.spec.ts
7
6
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
8
- PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
7
+ PASS Wfo-UI Tests src/utils/date.spec.ts
9
8
  PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
10
9
  PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
10
+ PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
11
11
  PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
12
12
  PASS Wfo-UI Tests src/utils/string.spec.ts
13
13
  PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
@@ -15,26 +15,26 @@ PASS Wfo-UI Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
15
15
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
16
16
  PASS Wfo-UI Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
17
17
  PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
18
- PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
19
18
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
19
+ PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
20
20
  PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
21
- PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
22
21
  PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
22
+ PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
23
23
  PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
24
24
  PASS Wfo-UI Tests src/utils/sortObjectKeys.spec.ts
25
25
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
26
- PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
27
26
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
27
+ PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
28
28
  PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
29
29
  PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
30
30
  PASS Wfo-UI Tests src/utils/uuid.spec.ts
31
31
  PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
32
- PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
33
32
  PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
33
+ PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
34
34
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
35
35
 
36
36
  Test Suites: 30 passed, 30 total
37
37
  Tests: 169 passed, 169 total
38
38
  Snapshots: 0 total
39
- Time: 3.864 s
39
+ Time: 3.938 s
40
40
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 1.30.2
4
+
5
+ ### Patch Changes
6
+
7
+ - fe3e991: Fixes websocket connection without authorization
8
+
9
+ ## 1.30.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 6f308f9: Fix not logging out when token expires
14
+
3
15
  ## 1.30.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -45,7 +45,11 @@ declare enum HttpStatus {
45
45
  FormNotComplete = 510,
46
46
  BadGateway = 502,
47
47
  BadRequest = 400,
48
- ServiceUnavailable = 503
48
+ ServiceUnavailable = 503,
49
+ Unauthorized = 401,
50
+ Forbidden = 403,
51
+ Ok = 200,
52
+ MultipleChoices = 300
49
53
  }
50
54
  declare type ExtraOptions = {
51
55
  baseQueryType?: BaseQueryTypes;
@@ -53,6 +57,7 @@ declare type ExtraOptions = {
53
57
  };
54
58
  declare const prepareHeaders: (headers: Headers) => Promise<Headers>;
55
59
  declare const handlePromiseErrorWithCallback: <T>(promise: Promise<unknown>, status: HttpStatus, callbackAction: (json: T) => void) => Promise<unknown>;
60
+ declare const catchErrorResponse: (response: Response, authActive: boolean) => Promise<any>;
56
61
  declare const orchestratorApi: _reduxjs_toolkit_query_react.Api<(args: any, api: _reduxjs_toolkit_query_react.BaseQueryApi, extraOptions: ExtraOptions) => {
57
62
  error: _reduxjs_toolkit_query_react.FetchBaseQueryError;
58
63
  data?: undefined;
@@ -4121,4 +4126,4 @@ declare const optionalArrayMapper: <T, U>(data: T[] | undefined, mapper: (input:
4121
4126
 
4122
4127
  declare const filterDataByCriteria: <Type>(data: Type[], filterCriteria: GraphqlFilter<Type>[]) => Type[];
4123
4128
 
4124
- export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, type AppDispatch, type AutoFieldsProps, BadgeType, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, CACHETAG_TYPE_LIST, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, type CacheTag, CacheTagType, ColorModes, type ColumnConfig, type ConfirmDialogHandler, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonAutocomplete, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type CustomApiConfig, type Customer, type CustomerDescriptions, CustomerField, type CustomerFieldProps, type CustomerWithSubscriptionCount, type CustomersResult, type CustomersWithSubscriptionCountResult, 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 FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, type FormValidationError, type GraphQLPageInfo, type GraphQLSort, type GraphQlResultPage, type GraphQlSinglePage, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, HttpStatus, IPAM_ENDPOINT, IPAM_FREE_SUBNETS_ENDPOINT, IPAM_IP_BLOCKS_ENDPOINT, IPAM_PREFIX_FILTERS_ENDPOINT, type IPvAnyNetworkFieldProps, type ImsNode, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPort, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InUseByRelationDetail, type InUseByRelationsDetailResponse, type InUseByRelationsDetailResult, type InitialOrchestratorStoreConfig, type InputForm, type IpBlock, IpNetworkField, type IpPrefix, 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_TASKS_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, type MetaDataTab, NUMBER_OF_ITEMS_REPRESENTING_ALL_ITEMS, NestField, type NestFieldProps, type NodeSubscriptionOption, type NodeSubscriptionOptionsResult, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorComponentOverride, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_TASKS, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, PROCESSES_ENDPOINT, PROCESSES_RESUME_ALL_ENDPOINT, PROCESS_ABORT_ENDPOINT, PROCESS_RESUME_ENDPOINT, PROCESS_STATUS_COUNTS_ENDPOINT, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, PortMode, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListExportItem, type ProcessListItem, type ProcessListResponse, type ProcessListResult, type ProcessListSummaryResponse, ProcessStatus, type ProcessStepsResult, type ProcessSummary, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductBlocksResponse, type ProductDefinition, type ProductDefinitionsResult, ProductLifecycleStatus, ProductTag, type ProductsResponse, type ProductsSummary, type ProductsSummaryResponse, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, RelatedSubscriptionsQuery, type RelatedSubscriptionsResponse, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type ResourceTypesResponse, type RootState, SETTINGS_CACHE_ENDPOINT, SETTINGS_CACHE_NAMES_ENDPOINT, SETTINGS_ENDPOINT, SETTINGS_SEARCH_INDEX_RESET_ENDPOINT, SETTINGS_STATUS_ENDPOINT, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, SUBSCRIPTION_ACTIONS_ENDPOINT, type SelectFieldProps, type ServicePort, type SortOption, SortOrder, type StartComboBoxOption, type StartOptionsResponse, type StartOptionsResult, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionActions, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResponse, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResponse, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, type SubscriptionListItem, type SubscriptionListResponse, type SubscriptionListSummaryResponse, SubscriptionStatus, type SubscriptionSummary, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, type SummaryCardButtonConfig, type SummaryCardListItem, SummaryCardStatus, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, type TaskDefinition, type TaskDefinitionsResult, type TaskListItem, type TasksResponse, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, type ValueOverrideConfiguration, type ValueOverrideFunction, VlanField, type VlanFieldProps, type VlanRange, WFO_STATUS_COLOR_FIELD, type WfValueOnlyTableProps, WfoActiveWorkflowsSummaryCard, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBoltFill, WfoBoltSlashFill, 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, WfoExpandableField, type WfoExpandableFieldProps, WfoExternalLink, WfoEyeFill, WfoFailedTasksBadge, WfoFailedTasksSummaryCard, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInSyncField, WfoInformationModal, type WfoInformationModalProps, WfoInlineJson, type WfoInlineJsonProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLatestActiveSubscriptionsSummaryCard, WfoLatestOutOfSyncSubscriptionSummaryCard, WfoLoading, WfoLogoutIcon, WfoMenuItemLink, WfoMetadataPageLayout, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoMyWorkflowsSummaryCard, type WfoMyWorkflowsSummaryCardProps, WfoNoResults, 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, WfoProductBlockKeyValueRow, type WfoProductBlockKeyValueRowProps, WfoProductBlocksPage, WfoProductInformationWithLink, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoProductsSummaryCard, WfoRefresh, WfoRelatedSubscriptions, WfoResetTextSearchIndexButton, 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, WfoStartWorkflowButtonComboBox, 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, type WfoSubscriptionDetailGeneralConfiguration, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionListTab, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionSyncStatusBadge, type WfoSubscriptionSyncStatusBadgeProps, WfoSubscriptionsList, WfoSubscriptionsListPage, type WfoSubscriptionsListProps, WfoSummaryCard, WfoSummaryCardHeader, type WfoSummaryCardHeaderProps, WfoSummaryCardList, WfoSummaryCardListItem, type WfoSummaryCardListItemProps, type WfoSummaryCardListProps, type WfoSummaryCardProps, WfoSummaryCards, type WfoSummaryCardsProps, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTasksPage, WfoTextAnchor, type WfoTheme, WfoTimeline, type WfoTimelineProps, WfoTitleWithWebsocketBadge, WfoToastsList, WfoTrash, type WfoTreeNodeMap, WfoUserInputForm, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoValueOnlyTable, type WfoValueOnlyTableDataType, WfoViewList, WfoWarningTriangle, WfoWebsocketStatusBadge, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsListTabType, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, type WorkflowsResponse, addToastMessage, calculateTimeDifference, camelToHuman, clearTableConfigFromLocalStorage, csvDownloadHandler, defaultOrchestratorTheme, defaultTasksListTabs, defaultWorkflowsListTabs, determineNewSortOrder, determinePageIndex, emptyOrchestratorConfig, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getConcatenatedPagedResult, getConcatenatedResult, getCsvFileNameWithDate, getCurrentBrowserLocale, getCustomApiSlice, getDataSortHandler, getDate, getEnvironmentVariables, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getFormFieldsBaseStyle, getInitialColumnOrder, getLastUncompletedProcess, getLatestTaskDate, getNumberOfColumns, getNumberValueFromEnvironmentVariable, getOrchestratorComponentOverrideSlice, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProductBlockTitle, getProductNamesFromProcess, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getStyles, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, getWorkflowsListTabTypeFromString, graphQlWorkflowListMapper, handlePromiseErrorWithCallback, imsPortIdFieldStyling, initiateCsvFileDownload, ipPrefixTableFieldStyling, ipamStates, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapGraphQlSubscriptionsResultToPageInfo, mapGraphQlSubscriptionsResultToSubscriptionListItems, mapProcessSummaryToSummaryCardListItem, mapSortableAndFilterableValuesToTableColumnConfig, mapSubscriptionSummaryToSummaryCardListItem, mapWorkflowDefinitionToWorkflowListItem, menuItemIsAllowed, metaDataTabs, onlyUnique, optionalArrayMapper, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, prepareHeaders, processListQuery, processListSummaryQuery, processStepsQuery, productBlocksQuery, products, productsSummary, removeSuffix, removeToastMessage, resourceTypesQuery, selectOrchestratorConfig, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, splitPrefixStyling, stop, subscriptionDetailQuery, subscriptionInUseByRelationQuery, subscriptionListQuery, subscriptionListSummaryQuery, subscriptionListTabs, subscriptionsDropdownOptionsQuery, tasksQuery, toOptionalArrayEntry, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useGetCacheNamesQuery, useGetCustomerQuery, useGetCustomersQuery, useGetCustomersWithSubscriptionCountQuery, useGetEngineStatusQuery, useGetInUseByRelationDetailsQuery, useGetOrchestratorConfig, useGetProcessListQuery, useGetProcessListSummaryQuery, useGetProductBlocksQuery, useGetProductsQuery, useGetProductsSummaryQuery, useGetRelatedSubscriptionsQuery, useGetResourceTypesQuery, useGetSubscriptionDetailQuery, useGetSubscriptionListQuery, useGetSubscriptionSummaryListQuery, useGetSubscriptionsDropdownOptionsQuery, useGetTaskOptionsQuery, useGetTasksQuery, useGetTimeLineItemsQuery, useGetTranslationMessages, useGetWorkflowOptionsQuery, useGetWorkflowsQuery, useLazyGetProcessListQuery, useLazyGetProductBlocksQuery, useLazyGetProductsQuery, useLazyGetResourceTypesQuery, useLazyGetSubscriptionListQuery, useLazyGetTasksQuery, useLazyGetWorkflowsQuery, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useResetTextSearchIndexMutation, useSetEngineStatusMutation, useSetSubscriptionInSyncMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionDetailValueOverride, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment, workflowFieldMapper, workflowsQuery };
4129
+ export { ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, AcceptField, type AcceptFieldProps, type AppDispatch, type AutoFieldsProps, BadgeType, type BaseGraphQlResult, BaseQueryTypes, BoolField, type BoolFieldProps, CACHETAG_TYPE_LIST, COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY, COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY, type CacheNames, type CacheOption, type CacheTag, CacheTagType, ColorModes, type ColumnConfig, type ConfirmDialogHandler, ConfirmationDialogContext, ConfirmationDialogContextWrapper, ConfirmationDialogProvider, ConnectedSelectField, ContactPersonAutocomplete, ContactPersonNameField, type ContactPersonNameFieldProps, CreateForm, type CustomApiConfig, type Customer, type CustomerDescriptions, CustomerField, type CustomerFieldProps, type CustomerWithSubscriptionCount, type CustomersResult, type CustomersWithSubscriptionCountResult, 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 FieldProps$1 as FieldProps, type FieldValue, type FilterQuery, type FixedInputDefinition, type Form, type FormNotCompleteResponse, type FormValidationError, type GraphQLPageInfo, type GraphQLSort, type GraphQlResultPage, type GraphQlSinglePage, type GraphqlFilter, type GraphqlQueryVariables, type GroupedStep, HIDDEN_KEYS, type HeaderBadgeProps, HttpStatus, IPAM_ENDPOINT, IPAM_FREE_SUBNETS_ENDPOINT, IPAM_IP_BLOCKS_ENDPOINT, IPAM_PREFIX_FILTERS_ENDPOINT, type IPvAnyNetworkFieldProps, type ImsNode, ImsNodeIdField, type ImsNodeIdFieldProps, type ImsPort, type ImsPortFieldProps, ImsPortIdField, type InUseByRelation, type InUseByRelationDetail, type InUseByRelationsDetailResponse, type InUseByRelationsDetailResult, type InitialOrchestratorStoreConfig, type InputForm, type IpBlock, IpNetworkField, type IpPrefix, 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_TASKS_TABLE_LOCAL_STORAGE_KEY, METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY, type MetaDataTab, NUMBER_OF_ITEMS_REPRESENTING_ALL_ITEMS, NestField, type NestFieldProps, type NodeSubscriptionOption, type NodeSubscriptionOptionsResult, type Nullable, NumField, type NumFieldProps, OptGroupField, type OptGroupFieldProps, type OrchestratorComponentOverride, type OrchestratorConfig, OrchestratorConfigContext, OrchestratorConfigProvider, type OrchestratorConfigProviderProps, PATH_METADATA, PATH_METADATA_PRODUCTS, PATH_METADATA_PRODUCT_BLOCKS, PATH_METADATA_RESOURCE_TYPES, PATH_METADATA_TASKS, PATH_METADATA_WORKFLOWS, PATH_SETTINGS, PATH_START, PATH_START_NEW_TASK, PATH_START_NEW_WORKFLOW, PATH_SUBSCRIPTIONS, PATH_TASKS, PATH_WORKFLOWS, PROCESSES_ENDPOINT, PROCESSES_RESUME_ALL_ENDPOINT, PROCESS_ABORT_ENDPOINT, PROCESS_RESUME_ENDPOINT, PROCESS_STATUS_COUNTS_ENDPOINT, type Pagination, type Policy, PolicyContext, PolicyContextProvider, type PolicyProviderProps, PolicyResource, PortMode, type Process, type ProcessDetail, type ProcessDetailResultRaw, ProcessDoneStatuses, type ProcessListExportItem, type ProcessListItem, type ProcessListResponse, type ProcessListResult, type ProcessListSummaryResponse, ProcessStatus, type ProcessStepsResult, type ProcessSummary, type ProcessesDetailResult, type ProductBlockDefinition, type ProductBlockDefinitionsResult, type ProductBlockInstance, type ProductBlocksResponse, type ProductDefinition, type ProductDefinitionsResult, ProductLifecycleStatus, ProductTag, type ProductsResponse, type ProductsSummary, type ProductsSummaryResponse, RENDER_ALL, RESOURCE_TYPE_FIELD_DESCRIPTION, RESOURCE_TYPE_FIELD_ID, RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS, RESOURCE_TYPE_FIELD_TYPE, RadioField, type RadioFieldProps, type RelatedSubscription, RelatedSubscriptionsQuery, type RelatedSubscriptionsResponse, type RelatedSubscriptionsResult, RenderDirection, type ResourceTypeDefinition, type ResourceTypeDefinitionsResult, type ResourceTypesResponse, type RootState, SETTINGS_CACHE_ENDPOINT, SETTINGS_CACHE_NAMES_ENDPOINT, SETTINGS_ENDPOINT, SETTINGS_SEARCH_INDEX_RESET_ENDPOINT, SETTINGS_STATUS_ENDPOINT, STEP_STATE_HIDDEN_KEYS, SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY, SUBSCRIPTION_ACTIONS_ENDPOINT, type SelectFieldProps, type ServicePort, type SortOption, SortOrder, type StartComboBoxOption, type StartOptionsResponse, type StartOptionsResult, type StartProcessStep, type Step, type StepListItem, type StepState, StepStatus, StoreProvider, type StoreProviderProps, type StoredTableConfig, SubmitField, type SubmitFieldProps, type Subscription, type SubscriptionAction, type SubscriptionActions, type SubscriptionDetail, type SubscriptionDetailProcess, type SubscriptionDetailResponse, type SubscriptionDetailResult, SubscriptionDetailTab, type SubscriptionDropdownOption, type SubscriptionDropdownOptionsResponse, type SubscriptionDropdownOptionsResult, SubscriptionField, type SubscriptionFieldProps, SubscriptionKeyValueBlock, type SubscriptionListItem, type SubscriptionListResponse, type SubscriptionListSummaryResponse, SubscriptionStatus, type SubscriptionSummary, SubscriptionSummaryField, type SubscriptionSummaryFieldProps, type SubscriptionsResult, type SummaryCardButtonConfig, type SummaryCardListItem, SummaryCardStatus, SummaryField, type SummaryFieldProps, type TableColumnKeys, type TableConfig, TableSettingsModal, type TableSettingsModalProps, type TaskDefinition, type TaskDefinitionsResult, type TaskListItem, type TasksResponse, TextField, type TextFieldProps, type TimelineItem, TimelinePosition, TimestampField, type TimestampFieldProps, type ToastState, ToastTypes, type TreeBlock, TreeContext, type TreeContextType, TreeProvider, type TreeProviderProps, UnconnectedSelectField, type UserInputForm, UserInputFormWizard, type ValidationError, type ValidationErrorContext, type ValueOverrideConfiguration, type ValueOverrideFunction, VlanField, type VlanFieldProps, type VlanRange, WFO_STATUS_COLOR_FIELD, type WfValueOnlyTableProps, WfoActiveWorkflowsSummaryCard, WfoArrowNarrowDown, WfoArrowNarrowUp, WfoArrowsExpand, WfoAuth, WfoBadge, type WfoBadgeProps, WfoBasicTable, type WfoBasicTableColumns, type WfoBasicTableColumnsWithControlColumns, type WfoBasicTableProps, WfoBell, WfoBoltFill, WfoBoltSlashFill, 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, WfoExpandableField, type WfoExpandableFieldProps, WfoExternalLink, WfoEyeFill, WfoFailedTasksBadge, WfoFailedTasksSummaryCard, type WfoFilterTab, WfoFilterTabs, type WfoFilterTabsProps, WfoFirstPartUUID, type WfoFirstUUIDPartProps, WfoFlushSettings, WfoHeaderBadge, type WfoIconProps, WfoInSyncField, WfoInformationModal, type WfoInformationModalProps, WfoInlineJson, type WfoInlineJsonProps, WfoInsyncIcon, WfoIsAllowedToRender, type WfoIsAllowedToRenderProps, WfoJsonCodeBlock, type WfoJsonCodeBlockProps, WfoKeyCell, type WfoKeyCellProps, WfoKeyValueTable, type WfoKeyValueTableDataType, type WfoKeyValueTableProps, WfoLatestActiveSubscriptionsSummaryCard, WfoLatestOutOfSyncSubscriptionSummaryCard, WfoLoading, WfoLogoutIcon, WfoMenuItemLink, WfoMetadataPageLayout, WfoMinusCircleFill, WfoMinusCircleOutline, WfoModifySettings, WfoMyWorkflowsSummaryCard, type WfoMyWorkflowsSummaryCardProps, WfoNoResults, 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, WfoProductBlockKeyValueRow, type WfoProductBlockKeyValueRowProps, WfoProductBlocksPage, WfoProductInformationWithLink, WfoProductStatusBadge, type WfoProductStatusBadgeProps, WfoProductsPage, WfoProductsSummaryCard, WfoRefresh, WfoRelatedSubscriptions, WfoResetTextSearchIndexButton, 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, WfoStartWorkflowButtonComboBox, 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, type WfoSubscriptionDetailGeneralConfiguration, WfoSubscriptionDetailPage, WfoSubscriptionDetailTree, WfoSubscriptionGeneral, WfoSubscriptionListTab, WfoSubscriptionProductBlock, WfoSubscriptionStatusBadge, type WfoSubscriptionStatusBadgeProps, WfoSubscriptionSyncStatusBadge, type WfoSubscriptionSyncStatusBadgeProps, WfoSubscriptionsList, WfoSubscriptionsListPage, type WfoSubscriptionsListProps, WfoSummaryCard, WfoSummaryCardHeader, type WfoSummaryCardHeaderProps, WfoSummaryCardList, WfoSummaryCardListItem, type WfoSummaryCardListItemProps, type WfoSummaryCardListProps, type WfoSummaryCardProps, WfoSummaryCards, type WfoSummaryCardsProps, type WfoTableColumns, type WfoTableColumnsWithExtraNonDataFields, type WfoTableControlColumnConfig, type WfoTableDataColumnConfig, WfoTableHeaderCell, type WfoTableHeaderCellProps, WfoTableWithFilter, type WfoTableWithFilterProps, WfoTasksListPage, WfoTasksListTabType, WfoTasksPage, WfoTextAnchor, type WfoTheme, WfoTimeline, type WfoTimelineProps, WfoTitleWithWebsocketBadge, WfoToastsList, WfoTrash, type WfoTreeNodeMap, WfoUserInputForm, type WfoUserProfile, WfoValueCell, type WfoValueCellProps, WfoValueOnlyTable, type WfoValueOnlyTableDataType, WfoViewList, WfoWarningTriangle, WfoWebsocketStatusBadge, WfoWorkflowStepList, type WfoWorkflowStepListProps, WfoWorkflowTargetBadge, type WfoWorkflowTargetBadgeProps, WfoWorkflowsListPage, WfoWorkflowsListTabType, WfoWorkflowsPage, WfoXCircleFill, type WorkflowDefinition, type WorkflowDefinitionsResult, type WorkflowListItem, WorkflowTarget, type WorkflowsResponse, addToastMessage, calculateTimeDifference, camelToHuman, catchErrorResponse, clearTableConfigFromLocalStorage, csvDownloadHandler, defaultOrchestratorTheme, defaultTasksListTabs, defaultWorkflowsListTabs, determineNewSortOrder, determinePageIndex, emptyOrchestratorConfig, filterDataByCriteria, flattenArrayProps, formatDate, formatDateCetWithUtc, getConcatenatedPagedResult, getConcatenatedResult, getCsvFileNameWithDate, getCurrentBrowserLocale, getCustomApiSlice, getDataSortHandler, getDate, getEnvironmentVariables, getFieldFromProductBlockInstanceValues, getFirstUuidPart, getFormFieldsBaseStyle, getInitialColumnOrder, getLastUncompletedProcess, getLatestTaskDate, getNumberOfColumns, getNumberValueFromEnvironmentVariable, getOrchestratorComponentOverrideSlice, getOrchestratorConfigSlice, getOrchestratorStore, getPageChangeHandler, getProductBlockTitle, getProductNamesFromProcess, getQueryStringHandler, getQueryVariablesForExport, getSortDirectionFromString, getStatusBadgeColor, getStepContent, getStyles, getTableConfigFromLocalStorage, getTasksListTabTypeFromString, getTypedFieldFromObject, getWfoBasicTableStyles, getWorkflowTargetColor, getWorkflowTargetIconContent, getWorkflowsListTabTypeFromString, graphQlWorkflowListMapper, handlePromiseErrorWithCallback, imsPortIdFieldStyling, initiateCsvFileDownload, ipPrefixTableFieldStyling, ipamStates, isToday, isUuid4, isValidLocalStorageTableConfig, localMomentToUtcTimestamp, mapColumnSortToEuiDataGridSorting, mapGraphQlSubscriptionsResultToPageInfo, mapGraphQlSubscriptionsResultToSubscriptionListItems, mapProcessSummaryToSummaryCardListItem, mapSortableAndFilterableValuesToTableColumnConfig, mapSubscriptionSummaryToSummaryCardListItem, mapWorkflowDefinitionToWorkflowListItem, menuItemIsAllowed, metaDataTabs, onlyUnique, optionalArrayMapper, orchestratorApi, parseDate, parseDateOrTimeRelativeToToday, parseDateRelativeToToday, parseDateToLocaleDateString, parseDateToLocaleDateTimeString, parseDateToLocaleTimeString, parseIsoString, prepareHeaders, processListQuery, processListSummaryQuery, processStepsQuery, productBlocksQuery, products, productsSummary, removeSuffix, removeToastMessage, resourceTypesQuery, selectOrchestratorConfig, setTableConfigToLocalStorage, snakeToHuman, snakeToKebab, splitPrefixStyling, stop, subscriptionDetailQuery, subscriptionInUseByRelationQuery, subscriptionListQuery, subscriptionListSummaryQuery, subscriptionListTabs, subscriptionsDropdownOptionsQuery, tasksQuery, toOptionalArrayEntry, toastMessagesReducer, toastMessagesSlice, upperCaseFirstChar, urlPolicyMap, useCheckEngineStatus, useClearCacheMutation, useDataDisplayParams, useGetCacheNamesQuery, useGetCustomerQuery, useGetCustomersQuery, useGetCustomersWithSubscriptionCountQuery, useGetEngineStatusQuery, useGetInUseByRelationDetailsQuery, useGetOrchestratorConfig, useGetProcessListQuery, useGetProcessListSummaryQuery, useGetProductBlocksQuery, useGetProductsQuery, useGetProductsSummaryQuery, useGetRelatedSubscriptionsQuery, useGetResourceTypesQuery, useGetSubscriptionDetailQuery, useGetSubscriptionListQuery, useGetSubscriptionSummaryListQuery, useGetSubscriptionsDropdownOptionsQuery, useGetTaskOptionsQuery, useGetTasksQuery, useGetTimeLineItemsQuery, useGetTranslationMessages, useGetWorkflowOptionsQuery, useGetWorkflowsQuery, useLazyGetProcessListQuery, useLazyGetProductBlocksQuery, useLazyGetProductsQuery, useLazyGetResourceTypesQuery, useLazyGetSubscriptionListQuery, useLazyGetTasksQuery, useLazyGetWorkflowsQuery, useOrchestratorConfig, useOrchestratorTheme, usePolicy, useResetTextSearchIndexMutation, useSetEngineStatusMutation, useSetSubscriptionInSyncMutation, useShowToastMessage, useStoredTableConfig, useStreamMessagesQuery, useSubscriptionDetailValueOverride, useWfoSession, useWithOrchestratorTheme, utcTimestampToLocalMoment, workflowFieldMapper, workflowsQuery };
package/dist/index.js CHANGED
@@ -32627,6 +32627,10 @@ var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
32627
32627
  HttpStatus2[HttpStatus2["BadGateway"] = 502] = "BadGateway";
32628
32628
  HttpStatus2[HttpStatus2["BadRequest"] = 400] = "BadRequest";
32629
32629
  HttpStatus2[HttpStatus2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
32630
+ HttpStatus2[HttpStatus2["Unauthorized"] = 401] = "Unauthorized";
32631
+ HttpStatus2[HttpStatus2["Forbidden"] = 403] = "Forbidden";
32632
+ HttpStatus2[HttpStatus2["Ok"] = 200] = "Ok";
32633
+ HttpStatus2[HttpStatus2["MultipleChoices"] = 300] = "MultipleChoices";
32630
32634
  return HttpStatus2;
32631
32635
  })(HttpStatus || {});
32632
32636
  var prepareHeaders = (headers) => __async(void 0, null, function* () {
@@ -32645,6 +32649,19 @@ var handlePromiseErrorWithCallback = (promise, status, callbackAction) => {
32645
32649
  }
32646
32650
  });
32647
32651
  };
32652
+ var isUnauthorized = (status) => status === 401 /* Unauthorized */ || status === 403 /* Forbidden */;
32653
+ var isNotSuccessful = (status) => status < 200 /* Ok */ || status >= 300 /* MultipleChoices */;
32654
+ var catchErrorResponse = (response, authActive) => __async(void 0, null, function* () {
32655
+ const status = response.status;
32656
+ if (isNotSuccessful(status)) {
32657
+ console.error(status, response.body);
32658
+ }
32659
+ if (isUnauthorized(status) && authActive) {
32660
+ signOut();
32661
+ } else {
32662
+ return response.json();
32663
+ }
32664
+ });
32648
32665
  var orchestratorApi = createApi2({
32649
32666
  reducerPath: "orchestratorApi",
32650
32667
  baseQuery: (args, api, extraOptions) => {
@@ -32659,7 +32676,8 @@ var orchestratorApi = createApi2({
32659
32676
  case "fetch" /* fetch */:
32660
32677
  const fetchFn = fetchBaseQuery({
32661
32678
  baseUrl: customApi ? customApi.apiBaseUrl : orchestratorApiBaseUrl,
32662
- prepareHeaders
32679
+ prepareHeaders,
32680
+ responseHandler: (response) => catchErrorResponse(response, authActive)
32663
32681
  });
32664
32682
  return fetchFn(args, api, {});
32665
32683
  default:
@@ -33933,8 +33951,14 @@ var getToastMessage = (type, text, title) => {
33933
33951
  // src/rtk/endpoints/streamMessages.ts
33934
33952
  var getWebSocket = (url) => __async(void 0, null, function* () {
33935
33953
  const session = yield getSession2();
33936
- const token = (session == null ? void 0 : session.accessToken) ? ["base64.bearer.token", session == null ? void 0 : session.accessToken] : "";
33937
- return new WebSocket(url, token);
33954
+ if (session == null ? void 0 : session.accessToken) {
33955
+ return new WebSocket(url, [
33956
+ "base64.bearer.token",
33957
+ session == null ? void 0 : session.accessToken
33958
+ ]);
33959
+ } else {
33960
+ return new WebSocket(url);
33961
+ }
33938
33962
  });
33939
33963
  var PING_INTERVAL_MS = 45e3;
33940
33964
  var DEBOUNCE_CLOSE_INTERVAL_MS = 6e4;
@@ -39629,7 +39653,7 @@ import {
39629
39653
  } from "@elastic/eui";
39630
39654
 
39631
39655
  // src/components/WfoTable/utils/constants.ts
39632
- var DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 50, 100];
39656
+ var DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 50, 100, 0];
39633
39657
  var DEFAULT_PAGE_SIZE = 15;
39634
39658
  var ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY = "activeProcessesListTable";
39635
39659
  var COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY = "completedProcessesListTable";
@@ -46488,7 +46512,6 @@ var WfoProcessListSubscriptionsCell = ({
46488
46512
  import { useRef as useRef6 } from "react";
46489
46513
 
46490
46514
  // src/rtk/endpoints/processDetail.ts
46491
- import { signOut as signOut3 } from "next-auth/react";
46492
46515
  var processDetailQuery = `query ProcessDetail($processId: String!) {
46493
46516
  processes(filterBy: { value: $processId, field: "processId" }) {
46494
46517
  page {
@@ -46524,14 +46547,6 @@ var processDetailQuery = `query ProcessDetail($processId: String!) {
46524
46547
  }
46525
46548
  }
46526
46549
  }`;
46527
- var catchErrorResponse = (_, meta) => {
46528
- if (meta.response.status < 200 || meta.response.status >= 300) {
46529
- console.error(meta.response.status, meta.response.body);
46530
- }
46531
- if (meta.response.status === 401 || meta.response.status === 403) {
46532
- signOut3();
46533
- }
46534
- };
46535
46550
  var processDetailApi = orchestratorApi.injectEndpoints({
46536
46551
  endpoints: (builder) => ({
46537
46552
  getProcessDetail: builder.query({
@@ -46572,7 +46587,6 @@ var processDetailApi = orchestratorApi.injectEndpoints({
46572
46587
  url: `${PROCESSES_ENDPOINT}/${PROCESSES_RESUME_ALL_ENDPOINT}`,
46573
46588
  method: "PUT"
46574
46589
  }),
46575
- transformErrorResponse: catchErrorResponse,
46576
46590
  extraOptions: {
46577
46591
  baseQueryType: "fetch" /* fetch */
46578
46592
  },
@@ -46587,7 +46601,6 @@ var processDetailApi = orchestratorApi.injectEndpoints({
46587
46601
  },
46588
46602
  body: "{}"
46589
46603
  }),
46590
- transformErrorResponse: catchErrorResponse,
46591
46604
  extraOptions: {
46592
46605
  baseQueryType: "fetch" /* fetch */
46593
46606
  },
@@ -46598,7 +46611,6 @@ var processDetailApi = orchestratorApi.injectEndpoints({
46598
46611
  url: `${PROCESSES_ENDPOINT}/${processId}`,
46599
46612
  method: "DELETE"
46600
46613
  }),
46601
- transformErrorResponse: catchErrorResponse,
46602
46614
  extraOptions: {
46603
46615
  baseQueryType: "fetch" /* fetch */
46604
46616
  },
@@ -46609,7 +46621,6 @@ var processDetailApi = orchestratorApi.injectEndpoints({
46609
46621
  url: `${PROCESSES_ENDPOINT}/${processId}/${PROCESS_ABORT_ENDPOINT}`,
46610
46622
  method: "PUT"
46611
46623
  }),
46612
- transformErrorResponse: catchErrorResponse,
46613
46624
  extraOptions: {
46614
46625
  baseQueryType: "fetch" /* fetch */
46615
46626
  },
@@ -51324,6 +51335,7 @@ export {
51324
51335
  addToastMessage,
51325
51336
  calculateTimeDifference,
51326
51337
  camelToHuman,
51338
+ catchErrorResponse,
51327
51339
  clearTableConfigFromLocalStorage,
51328
51340
  csvDownloadHandler,
51329
51341
  defaultOrchestratorTheme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "1.30.0",
3
+ "version": "1.30.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -1,4 +1,4 @@
1
- export const DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 50, 100];
1
+ export const DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 50, 100, 0];
2
2
  export const DEFAULT_PAGE_SIZE = 15;
3
3
 
4
4
  export const ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY =
package/src/rtk/api.ts CHANGED
@@ -19,6 +19,10 @@ export enum HttpStatus {
19
19
  BadGateway = 502,
20
20
  BadRequest = 400,
21
21
  ServiceUnavailable = 503,
22
+ Unauthorized = 401,
23
+ Forbidden = 403,
24
+ Ok = 200,
25
+ MultipleChoices = 300,
22
26
  }
23
27
 
24
28
  type ExtraOptions = {
@@ -48,6 +52,27 @@ export const handlePromiseErrorWithCallback = <T>(
48
52
  });
49
53
  };
50
54
 
55
+ const isUnauthorized = (status: HttpStatus) =>
56
+ status === HttpStatus.Unauthorized || status === HttpStatus.Forbidden;
57
+ const isNotSuccessful = (status: HttpStatus) =>
58
+ status < HttpStatus.Ok || status >= HttpStatus.MultipleChoices;
59
+
60
+ export const catchErrorResponse = async (
61
+ response: Response,
62
+ authActive: boolean,
63
+ ) => {
64
+ const status = response.status;
65
+
66
+ if (isNotSuccessful(status)) {
67
+ console.error(status, response.body);
68
+ }
69
+ if (isUnauthorized(status) && authActive) {
70
+ signOut();
71
+ } else {
72
+ return response.json();
73
+ }
74
+ };
75
+
51
76
  export const orchestratorApi = createApi({
52
77
  reducerPath: 'orchestratorApi',
53
78
  baseQuery: (args, api, extraOptions: ExtraOptions) => {
@@ -68,6 +93,8 @@ export const orchestratorApi = createApi({
68
93
  ? customApi.apiBaseUrl
69
94
  : orchestratorApiBaseUrl,
70
95
  prepareHeaders,
96
+ responseHandler: (response) =>
97
+ catchErrorResponse(response, authActive),
71
98
  });
72
99
  return fetchFn(args, api, {});
73
100
  default:
@@ -1,7 +1,3 @@
1
- import { signOut } from 'next-auth/react';
2
-
3
- import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
4
-
5
1
  import {
6
2
  PROCESSES_ENDPOINT,
7
3
  PROCESSES_RESUME_ALL_ENDPOINT,
@@ -57,18 +53,6 @@ export type ProcessDetailResponse = {
57
53
  processes: ProcessDetail[];
58
54
  };
59
55
 
60
- const catchErrorResponse = (
61
- _: FetchBaseQueryError,
62
- meta: { response: Response },
63
- ) => {
64
- if (meta.response.status < 200 || meta.response.status >= 300) {
65
- console.error(meta.response.status, meta.response.body);
66
- }
67
- if (meta.response.status === 401 || meta.response.status === 403) {
68
- signOut();
69
- }
70
- };
71
-
72
56
  const processDetailApi = orchestratorApi.injectEndpoints({
73
57
  endpoints: (builder) => ({
74
58
  getProcessDetail: builder.query<
@@ -118,7 +102,6 @@ const processDetailApi = orchestratorApi.injectEndpoints({
118
102
  url: `${PROCESSES_ENDPOINT}/${PROCESSES_RESUME_ALL_ENDPOINT}`,
119
103
  method: 'PUT',
120
104
  }),
121
- transformErrorResponse: catchErrorResponse,
122
105
  extraOptions: {
123
106
  baseQueryType: BaseQueryTypes.fetch,
124
107
  },
@@ -133,7 +116,6 @@ const processDetailApi = orchestratorApi.injectEndpoints({
133
116
  },
134
117
  body: '{}',
135
118
  }),
136
- transformErrorResponse: catchErrorResponse,
137
119
  extraOptions: {
138
120
  baseQueryType: BaseQueryTypes.fetch,
139
121
  },
@@ -144,7 +126,6 @@ const processDetailApi = orchestratorApi.injectEndpoints({
144
126
  url: `${PROCESSES_ENDPOINT}/${processId}`,
145
127
  method: 'DELETE',
146
128
  }),
147
- transformErrorResponse: catchErrorResponse,
148
129
  extraOptions: {
149
130
  baseQueryType: BaseQueryTypes.fetch,
150
131
  },
@@ -155,7 +136,6 @@ const processDetailApi = orchestratorApi.injectEndpoints({
155
136
  url: `${PROCESSES_ENDPOINT}/${processId}/${PROCESS_ABORT_ENDPOINT}`,
156
137
  method: 'PUT',
157
138
  }),
158
- transformErrorResponse: catchErrorResponse,
159
139
  extraOptions: {
160
140
  baseQueryType: BaseQueryTypes.fetch,
161
141
  },
@@ -13,11 +13,15 @@ import { orchestratorApi } from '../api';
13
13
  const getWebSocket = async (url: string) => {
14
14
  const session = (await getSession()) as WfoSession;
15
15
 
16
- const token = session?.accessToken
17
- ? ['base64.bearer.token', session?.accessToken]
18
- : '';
19
- // Implemented authentication taking this into account: https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api/77060459#77060459
20
- return new WebSocket(url, token);
16
+ if (session?.accessToken) {
17
+ // Implemented authentication taking this into account: https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api/77060459#77060459
18
+ return new WebSocket(url, [
19
+ 'base64.bearer.token',
20
+ session?.accessToken,
21
+ ]);
22
+ } else {
23
+ return new WebSocket(url);
24
+ }
21
25
  };
22
26
 
23
27
  const PING_INTERVAL_MS = 45000; // Recommended values are between 30 and 60 seconds