UNPKG

@replit/connectors

Version:

The official TypeScript library for the Replit API

1,187 lines (1,186 loc) 1.51 MB
import * as TopLevelAPI from "./top-level.mjs"; import { OffsetPagination, type OffsetPaginationParams } from "../core/pagination.mjs"; export type ListConnectionsResponsesOffsetPagination = OffsetPagination<ListConnectionsResponse>; export type ListConnectorConfigsResponsesOffsetPagination = OffsetPagination<ListConnectorConfigsResponse>; export type ListConnectorsResponsesOffsetPagination = OffsetPagination<ListConnectorsResponse>; export type ListEventsResponsesOffsetPagination = OffsetPagination<ListEventsResponse>; export interface Connector { name: string; /** * Instructions for AI agents on how to use this connector effectively */ agent_instructions?: string; /** * Whether a single user can have multiple connections */ allows_multiple_connections?: boolean; /** * Tiers this connector is available in */ audience?: Array<'free' | 'paid' | 'enterprise'>; auth_type?: 'BASIC' | 'OAUTH1' | 'OAUTH2' | 'OAUTH2CC' | 'API_KEY' | 'CUSTOM'; connect_ui?: Connector.ConnectUi; /** * Human-readable description of what this connector does */ description?: string; display_name?: string; has_openint_credentials?: boolean; /** * Whether this connector uses shared (API key) authentication */ is_shared?: boolean; /** * Related URLs for the connector provider */ links?: Connector.Links; logo_url?: string; /** * MCP server configuration, derived from connector metadata */ mcp?: Connector.Mcp; openint_allowed_scopes?: Array<string>; openint_default_scopes?: Array<string>; /** * Language-specific packages and code snippets */ packages?: Connector.Packages; platforms?: Array<'web' | 'mobile' | 'desktop' | 'local' | 'cloud'>; required_scopes?: Array<string>; schemas?: Connector.Schemas; scopes?: Array<Connector.Scope>; stage?: 'disabled' | 'staff' | 'eap' | 'beta' | 'ga' | 'alpha' | 'hidden'; /** * Industry verticals this connector belongs to */ verticals?: Array<string>; webhook_registration_input?: unknown; } export declare namespace Connector { interface ConnectUi { flow?: string; pre_connect_input?: string; } /** * Related URLs for the connector provider */ interface Links { api_docs_url?: string; web_url?: string; } /** * MCP server configuration, derived from connector metadata */ interface Mcp { mcp_server_base_url: string; url_pattern_to_catch: string; } /** * Language-specific packages and code snippets */ interface Packages { javascript?: Array<Packages.Javascript>; python?: Array<Packages.Python>; } namespace Packages { interface Javascript { package_name: string; package_version: string; /** * Connector-specific code (imports, validations, client factory) that gets * composed with the shared connection-fetching boilerplate at serve time. If * omitted, a generic SDK-based proxy snippet is auto-generated. */ code_snippet?: string; } interface Python { package_name: string; package_version: string; /** * Connector-specific code (imports, validations, client factory) that gets * composed with the shared connection-fetching boilerplate at serve time. If * omitted, a generic SDK-based proxy snippet is auto-generated. */ code_snippet?: string; } } interface Schemas { connect_input?: unknown; connect_output?: unknown; connection_settings?: unknown; connector_config?: unknown; integration_data?: unknown; pre_connect_input?: unknown; public_connection_settings?: unknown; webhook_events?: unknown; webhook_registration_input?: unknown; } interface Scope { scope: string; description?: string; display_name?: string; } } export interface Integration { id: string; connector_name: 'acme-apikey' | 'acme-oauth2' | 'agentmail' | 'amplitude' | 'apollo' | 'asana' | 'ashby' | 'bigquery' | 'bitbucket' | 'bitbucket-source-control' | 'box' | 'brave' | 'calendly' | 'clickup' | 'confluence' | 'custom-mcp' | 'databricks' | 'databricks-m2m' | 'discord' | 'dropbox' | 'elevenlabs' | 'figma' | 'github' | 'github-source-control' | 'gitlab-source-control' | 'google-calendar' | 'google-docs' | 'google-drive' | 'google-mail' | 'google-sheet' | 'google-slides' | 'hex' | 'hubspot' | 'instagram' | 'jira' | 'linear' | 'microsoft-fabric' | 'mobile-maps' | 'monday' | 'notion' | 'onedrive' | 'openai' | 'outlook' | 'plaid' | 'postgres' | 'resend' | 'revenuecat' | 'salesforce' | 'segment' | 'sendgrid' | 'sharepoint' | 'slack' | 'slack-agent' | 'slack-agent-builder' | 'slack-deployed-agent' | 'snowflake' | 'spotify' | 'sproutsocial' | 'stripe' | 'stripe-agent-sandbox' | 'todoist' | 'twilio' | 'workato' | 'x' | 'youtube' | 'zendesk' | 'zoom'; created_at: string; external: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; name: string; standard: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; updated_at: string; auth_type?: string | null; category?: string | null; logo_url?: string | null; platforms?: Array<'web' | 'mobile' | 'desktop'> | null; stage?: 'alpha' | 'beta' | 'ga' | null; version?: string | null; } export interface AssignConnectionResponse { /** * The id of the connection, starts with `conn_` */ id: string; /** * Whether the assignment and subscription to webhooks (if auto_subscribe_webhooks * is true) were successful. If false, the error field will contain the reason why * the operation failed. */ success: boolean; assignments?: Array<AssignConnectionResponse.Assignment>; /** * The reason why the operation failed. */ error?: string; } export declare namespace AssignConnectionResponse { interface Assignment { repl_id: string; webhook_url?: string; } } export interface CheckConnectionResponse { id: string; health_check_result?: { [key: string]: unknown; } | null; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; } export type ConnectorRpcResponse = { [key: string]: unknown; }; /** * The connection details */ export type CreateConnectionResponse = CreateConnectionResponse.ConnectorAcmeApikeyDiscriminatedConnectionData | CreateConnectionResponse.ConnectorAcmeOauth2DiscriminatedConnectionData | CreateConnectionResponse.ConnectorAgentmailDiscriminatedConnectionData | CreateConnectionResponse.ConnectorAmplitudeDiscriminatedConnectionData | CreateConnectionResponse.ConnectorAsanaDiscriminatedConnectionData | CreateConnectionResponse.ConnectorAshbyDiscriminatedConnectionData | CreateConnectionResponse.ConnectorBigqueryDiscriminatedConnectionData | CreateConnectionResponse.ConnectorBitbucketSourceControlDiscriminatedConnectionData | CreateConnectionResponse.ConnectorBitbucketDiscriminatedConnectionData | CreateConnectionResponse.ConnectorBoxDiscriminatedConnectionData | CreateConnectionResponse.ConnectorBraveDiscriminatedConnectionData | CreateConnectionResponse.ConnectorCalendlyDiscriminatedConnectionData | CreateConnectionResponse.ConnectorClickupDiscriminatedConnectionData | CreateConnectionResponse.ConnectorConfluenceDiscriminatedConnectionData | CreateConnectionResponse.ConnectorDatabricksDiscriminatedConnectionData | CreateConnectionResponse.ConnectorDiscordDiscriminatedConnectionData | CreateConnectionResponse.ConnectorDropboxDiscriminatedConnectionData | CreateConnectionResponse.ConnectorElevenlabsDiscriminatedConnectionData | CreateConnectionResponse.ConnectorFigmaDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGitHubSourceControlDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGitHubDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGitlabSourceControlDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleCalendarDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleDocsDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleDriveDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleMailDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleSheetDiscriminatedConnectionData | CreateConnectionResponse.ConnectorGoogleSlidesDiscriminatedConnectionData | CreateConnectionResponse.ConnectorHexDiscriminatedConnectionData | CreateConnectionResponse.ConnectorHubspotDiscriminatedConnectionData | CreateConnectionResponse.ConnectorInstagramDiscriminatedConnectionData | CreateConnectionResponse.ConnectorJiraDiscriminatedConnectionData | CreateConnectionResponse.ConnectorLinearDiscriminatedConnectionData | CreateConnectionResponse.ConnectorMicrosoftFabricDiscriminatedConnectionData | CreateConnectionResponse.ConnectorMondayDiscriminatedConnectionData | CreateConnectionResponse.ConnectorNotionDiscriminatedConnectionData | CreateConnectionResponse.ConnectorOnedriveDiscriminatedConnectionData | CreateConnectionResponse.ConnectorOpenAIDiscriminatedConnectionData | CreateConnectionResponse.ConnectorOutlookDiscriminatedConnectionData | CreateConnectionResponse.ConnectorRevenuecatDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSalesforceDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSegmentDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSharepointDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSlackDeployedAgentDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSlackDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSnowflakeDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSpotifyDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSproutsocialDiscriminatedConnectionData | CreateConnectionResponse.ConnectorTodoistDiscriminatedConnectionData | CreateConnectionResponse.ConnectorXDiscriminatedConnectionData | CreateConnectionResponse.ConnectorYoutubeDiscriminatedConnectionData | CreateConnectionResponse.ConnectorZendeskDiscriminatedConnectionData | CreateConnectionResponse.ConnectorZoomDiscriminatedConnectionData | CreateConnectionResponse.ConnectorApolloDiscriminatedConnectionData | CreateConnectionResponse.ConnectorCustomMcpDiscriminatedConnectionData | CreateConnectionResponse.ConnectorDatabricksM2mDiscriminatedConnectionData | CreateConnectionResponse.ConnectorMobileMapsDiscriminatedConnectionData | CreateConnectionResponse.ConnectorPlaidDiscriminatedConnectionData | CreateConnectionResponse.ConnectorPostgresDiscriminatedConnectionData | CreateConnectionResponse.ConnectorResendDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSendgridDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSlackAgentDiscriminatedConnectionData | CreateConnectionResponse.ConnectorSlackAgentBuilderDiscriminatedConnectionData | CreateConnectionResponse.ConnectorStripeDiscriminatedConnectionData | CreateConnectionResponse.ConnectorStripeAgentSandboxDiscriminatedConnectionData | CreateConnectionResponse.ConnectorTwilioDiscriminatedConnectionData | CreateConnectionResponse.ConnectorWorkatoDiscriminatedConnectionData; export declare namespace CreateConnectionResponse { interface ConnectorAcmeApikeyDiscriminatedConnectionData { connector_name: 'acme-apikey'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAcmeApikeyDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAcmeApikeyDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAcmeApikeyDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { /** * Your Acme API key */ api_key: string; } } interface ConnectorAcmeOauth2DiscriminatedConnectionData { connector_name: 'acme-oauth2'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAcmeOauth2DiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAcmeOauth2DiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAcmeOauth2DiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorAgentmailDiscriminatedConnectionData { connector_name: 'agentmail'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAgentmailDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAgentmailDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAgentmailDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { /** * Your AgentMail API key */ api_key: string; } } interface ConnectorAmplitudeDiscriminatedConnectionData { connector_name: 'amplitude'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAmplitudeDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAmplitudeDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAmplitudeDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { /** * Your Amplitude project API key */ api_key: string; /** * Your Amplitude project secret key */ secret_key: string; } } interface ConnectorAsanaDiscriminatedConnectionData { connector_name: 'asana'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAsanaDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAsanaDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAsanaDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorAshbyDiscriminatedConnectionData { connector_name: 'ashby'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorAshbyDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorAshbyDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorAshbyDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { /** * Your Ashby API key. Create one in Admin → Integrations → API Keys */ api_key: string; } } interface ConnectorBigqueryDiscriminatedConnectionData { connector_name: 'bigquery'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorBigqueryDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorBigqueryDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorBigqueryDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Your Google Cloud Project ID (e.g., my-project-123). This is required to make * API calls to BigQuery. */ project_id: string; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorBitbucketSourceControlDiscriminatedConnectionData { connector_name: 'bitbucket-source-control'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorBitbucketSourceControlDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorBitbucketSourceControlDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorBitbucketSourceControlDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; /** * API base URL for Bitbucket. For Bitbucket Data Center, use * https://<your-host>/rest/api/1.0. */ api_base_url?: string; /** * Base URL for Bitbucket. Set to your Bitbucket Data Center URL for on-prem. */ base_url?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorBitbucketDiscriminatedConnectionData { connector_name: 'bitbucket'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorBitbucketDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorBitbucketDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorBitbucketDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorBoxDiscriminatedConnectionData { connector_name: 'box'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorBoxDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorBoxDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorBoxDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorBraveDiscriminatedConnectionData { connector_name: 'brave'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorBraveDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorBraveDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorBraveDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { /** * Brave Search API subscription token */ api_key: string; } } interface ConnectorCalendlyDiscriminatedConnectionData { connector_name: 'calendly'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorCalendlyDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorCalendlyDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorCalendlyDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string; /** * Client ID used for the connection */ client_id?: string; expires_at?: string; expires_in?: number; raw?: { [key: string]: unknown; }; refresh_token?: string; scope?: string; token_type?: string; } } } } interface ConnectorClickupDiscriminatedConnectionData { connector_name: 'clickup'; id?: string; connector?: TopLevelAPI.Connector; connector_config_id?: string | null; created_at?: string; credentials_last_checked?: string | null; credentials_last_fetched?: string | null; customer_id?: string | null; disabled?: boolean | null; display_name?: string | null; environment?: 'production' | 'development'; health_check_result?: ConnectorClickupDiscriminatedConnectionData.HealthCheckResult | null; integration?: TopLevelAPI.Integration; integration_id?: string | null; /** * JSON object can can be used to associate arbitrary metadata to avoid needing a * separate 1-1 table just for simple key values in your application. During * updates this object will be shallowly merged */ metadata?: { [key: string]: unknown; } | null; public_settings?: unknown; settings?: ConnectorClickupDiscriminatedConnectionData.Settings; status?: 'healthy' | 'disconnected' | 'error' | 'manual' | 'unknown' | null; status_message?: string | null; toon_schema?: string; updated_at?: string; webhook_config?: string | number | boolean | { [key: string]: unknown; } | Array<unknown> | null; webhook_identifier?: string | null; webhook_provider?: string | null; } namespace ConnectorClickupDiscriminatedConnectionData { interface HealthCheckResult { checked_at: string; field_validations?: { [key: string]: HealthCheckResult.FieldValidations; }; } namespace HealthCheckResult { interface FieldValidations { status: 'valid' | 'invalid'; error?: string; } } interface Settings { oauth: Settings.OAuth; /** * Same as oauth.credentials.access_token, but more convenient to access. Optional * for backward compatibility until we remove the oauth field */ access_token?: string; } namespace Settings { interface OAuth { created_at?: string; /** * Output of the postConnect hook for oauth2 connectors */ credentials?: OAuth.Credentials; last_fetched_at?: string; metadata?: { [key: string]: unknown; } | null; updated_at?: string; } namespace OAuth { /** * Output of the postConnect hook for oauth2 connectors */ interface Credentials { access_token: string;