diff --git a/frontend/src/component/integrations/IntegrationList/AvailableIntegrations/AvailableIntegrations.tsx b/frontend/src/component/integrations/IntegrationList/AvailableIntegrations/AvailableIntegrations.tsx index 2625c1d14c..8a072c1a09 100644 --- a/frontend/src/component/integrations/IntegrationList/AvailableIntegrations/AvailableIntegrations.tsx +++ b/frontend/src/component/integrations/IntegrationList/AvailableIntegrations/AvailableIntegrations.tsx @@ -56,6 +56,7 @@ export const AvailableIntegrations: VFC = ({ }) => { const { isEnterprise } = useUiConfig(); const signalsEnabled = useUiFlag('signals'); + const filtered = providers?.filter((provider) => !provider.deprecated); const customProviders = [JIRA_INFO]; const serverSdks = OFFICIAL_SDKS.filter((sdk) => sdk.type === 'server'); @@ -74,7 +75,7 @@ export const AvailableIntegrations: VFC = ({ - {providers + {filtered ?.sort( (a, b) => a.displayName?.localeCompare(b.displayName) || diff --git a/frontend/src/component/integrations/IntegrationList/ConfiguredIntegrations/ConfiguredIntegrations.tsx b/frontend/src/component/integrations/IntegrationList/ConfiguredIntegrations/ConfiguredIntegrations.tsx index 90f1a6e199..5b76845d7a 100644 --- a/frontend/src/component/integrations/IntegrationList/ConfiguredIntegrations/ConfiguredIntegrations.tsx +++ b/frontend/src/component/integrations/IntegrationList/ConfiguredIntegrations/ConfiguredIntegrations.tsx @@ -70,6 +70,7 @@ export const ConfiguredIntegrations: VFC = ({ description={description || ''} link={`/integrations/edit/${id}`} configureActionText='Open' + deprecated={providerConfig?.deprecated} /> ); })} diff --git a/src/lib/services/addon-service.ts b/src/lib/services/addon-service.ts index 5191334c1c..130919d880 100644 --- a/src/lib/services/addon-service.ts +++ b/src/lib/services/addon-service.ts @@ -28,7 +28,7 @@ import type { IAddonDefinition } from '../types/model.js'; import { minutesToMilliseconds } from 'date-fns'; import type EventService from '../features/events/event-service.js'; import { omitKeys } from '../util/index.js'; -import { NotFoundError } from '../error/index.js'; +import { BadDataError, NotFoundError } from '../error/index.js'; import type { IntegrationEventsService } from '../features/integration-events/integration-events-service.js'; import type { IEvent } from '../events/index.js'; @@ -224,6 +224,10 @@ export default class AddonService { const addonConfig = await addonSchema.validateAsync(data); await this.validateKnownProvider(addonConfig); await this.validateRequiredParameters(addonConfig); + const addon = this.addonProviders[addonConfig.provider]; + if (addon.definition.deprecated) { + throw new BadDataError(addon.definition.deprecated); + } const createdAddon = await this.addonStore.insert(addonConfig); await this.addTagTypes(createdAddon.provider);