diff --git a/types/src/connectors/api_handlers/connector_configuration.ts b/types/src/connectors/api_handlers/connector_configuration.ts index ae974995c1c74..49fd698279775 100644 --- a/types/src/connectors/api_handlers/connector_configuration.ts +++ b/types/src/connectors/api_handlers/connector_configuration.ts @@ -2,14 +2,6 @@ import * as t from "io-ts"; import { WebCrawlerConfigurationType } from "../webcrawler"; -export const UpdateConnectorConfigurationTypeSchema = t.type({ - configuration: t.unknown, -}); - -export type UpdateConnectorConfigurationType = t.TypeOf< - typeof UpdateConnectorConfigurationTypeSchema ->; - export const WebCrawlerConfigurationTypeSchema = t.type({ url: t.string, depth: t.union([ @@ -41,3 +33,11 @@ export type ConnectorConfigurations = { confluence: null; intercom: null; }; + +export const UpdateConnectorConfigurationTypeSchema = t.type({ + configuration: t.union([WebCrawlerConfigurationTypeSchema, t.null]), +}); + +export type UpdateConnectorConfigurationType = t.TypeOf< + typeof UpdateConnectorConfigurationTypeSchema +>;