@squidcloud/client
    Preparing search index...

    Class IntegrationClient

    IntegrationClient manages integrations within an application, providing methods for listing, retrieving, updating, and deleting integrations.

    Index
    • Stops the active relationship-inference run of a database integration. The run still writes what it found so far, and ends as 'cancelled'.

      Parameters

      • integrationId: string

        The ID of the database integration.

      Returns Promise<void>

      A promise that resolves when the run is asked to stop.

    • Stops the active synthetic-data run of a database integration. The rows it wrote stay, and it ends as 'cancelled'.

      Parameters

      • integrationId: string

        The ID of the database integration.

      Returns Promise<void>

      A promise that resolves when the run is asked to stop.

    • Deletes the integration with the given ID.

      Parameters

      • integrationId: string

        The ID of the integration to delete.

      Returns Promise<void>

      A promise that resolves when the integration has been deleted.

    • Deletes multiple integrations by their IDs.

      Parameters

      • integrationIds: string[]

        An array of integration IDs to delete.

      Returns Promise<void>

      A promise that resolves when all deletions are complete.

    • Disables an integration. Runtime access is rejected and sync jobs skip it until it is enabled again.

      Parameters

      • integrationId: string

        The ID of the integration to disable.

      Returns Promise<void>

      A promise that resolves when the integration has been disabled.

    • Discovers the schema of a data connection (database). Connects to the database and introspects its structure including tables, columns, and relationships.

      Type Parameters

      • SchemaType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the database integration.

      Returns Promise<DiscoverDataConnectionSchemaResponse<SchemaType>>

      A promise that resolves with the discovered schema and collection readiness information.

    • Discovers the schema from an uploaded OpenAPI specification file. Parses the OpenAPI spec file that was previously uploaded to the integration.

      Type Parameters

      • SchemaType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the API integration with the uploaded spec file.

      Returns Promise<DiscoverOpenApiSchemaResponse<SchemaType>>

      A promise that resolves with the discovered API schema.

    • Enables a disabled integration. The integration becomes available again for runtime access and sync jobs.

      Parameters

      • integrationId: string

        The ID of the integration to enable.

      Returns Promise<void>

      A promise that resolves when the integration has been enabled.

    • Retrieves the integration by its ID. Disabled integrations are returned too - check the enabled field of the result (false means disabled).

      Type Parameters

      • ConfigurationType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the integration to retrieve.

      Returns Promise<IntegrationInfo<ConfigurationType> | undefined>

      A promise that resolves with the integration info, or undefined if not found.

    • Retrieves the integration's schema by its ID.

      Type Parameters

      • SchemaType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the integration to retrieve.

      Returns Promise<SchemaType | undefined>

      A promise that resolves with the integration schema, or undefined if not found.

    • Searches a connector's own record of files/folders at a path — for connectors (SharePoint, and any future file/folder-hierarchy connector) that track more than the AI knowledge base ledger does. Returns { supported: false } when the integration's type doesn't support this. The connector's own executable requires an API key, so this call fails unless the Squid instance is authenticated with one.

      Parameters

      • integrationId: string

        The ID of the integration to search.

      • path: string

        The path, folder, or filename to search for.

      Returns Promise<ConnectorPathStatusResult>

      A promise that resolves to the connector's path-status result.

    • Returns the latest relationship-inference run of a database integration, with its progress and findings.

      Type Parameters

      • ItemType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the database integration.

      Returns Promise<RelationshipInferenceRun<ItemType> | undefined>

      A promise that resolves with the run, or undefined when the integration never had one.

    • Returns the latest synthetic-data run of a database integration, with what it wrote to each table.

      Parameters

      • integrationId: string

        The ID of the database integration.

      Returns Promise<SyntheticDataRun | undefined>

      A promise that resolves with the run, or undefined when the integration never had one.

    • Lists all enabled integrations for the current application.

      Type Parameters

      • ConfigurationType = Record<string, any>

      Parameters

      • Optionaltype:
            | "bedrock"
            | "vertex"
            | "postgres"
            | "ai_agents"
            | "active_directory"
            | "ai_chatbot"
            | "algolia"
            | "alloydb"
            | "api"
            | "auth0"
            | "azure_blob"
            | "azure_cosmosdb"
            | "azure_postgresql"
            | "azure_sql"
            | "bigquery"
            | "bitbucket"
            | "built_in_azure_blob"
            | "built_in_db"
            | "built_in_gcs"
            | "built_in_queue"
            | "built_in_s3"
            | "cassandra"
            | "clickhouse"
            | "cloudsql"
            | "cockroach"
            | "cognito"
            | "connected_knowledgebases"
            | "confluence"
            | "confluent"
            | "datadog"
            | "db2"
            | "descope"
            | "documentdb"
            | "azure-entra-external-id"
            | "azure-entra-id"
            | "dynamodb"
            | "elasticsearch"
            | "firebase_auth"
            | "firestore"
            | "gcs"
            | "generic_site_ingester"
            | "github"
            | "google_calendar"
            | "google_docs"
            | "google_drive"
            | "graphql"
            | "hubspot"
            | "jira"
            | "jira_jsm"
            | "jwt_hmac"
            | "jwt_rsa"
            | "kafka"
            | "keycloak"
            | "linear"
            | "mariadb"
            | "monday"
            | "mongo"
            | "mssql"
            | "databricks"
            | "databricks_genie"
            | "azure_ai_search"
            | "mysql"
            | "newrelic"
            | "okta"
            | "onedrive"
            | "outlook"
            | "oracledb"
            | "pinecone"
            | "redis"
            | "s3"
            | "salesforce"
            | "salesforce_db"
            | "sap_hana"
            | "sentry"
            | "snowflake"
            | "spanner"
            | "xata"
            | "zendesk"
            | "servicenow_csm"
            | "freshdesk"
            | "mail"
            | "slack"
            | "twilio"
            | "elevenlabs"
            | "openai_voice"
            | "mcp"
            | "a2a"
            | "legend"
            | "teams"
            | "openai_compatible"
            | "openai_compatible_embedding"
            | "bedrock_embedding"
            | "sharepoint"

        (Optional) Filter by integration type.

      • Optionaloptions: ListIntegrationsOptions

        (Optional) Pass includeDisabled: true to also list disabled integrations.

      Returns Promise<IntegrationInfo<ConfigurationType>[]>

      A promise that resolves with a list of integrations.

    • Sets the integration's schema by its ID.

      Type Parameters

      • SchemaType = Record<string, any>

      Parameters

      • integrationId: string

        The ID of the integration to update.

      • schema: SchemaType

        The schema to set for the integration.

      Returns Promise<void>

      A promise that resolves when the schema has been updated.

    • Starts inferring relationships from the data of a database integration, in the background, over its stored schema. It finds relationships no foreign key declares, discriminator columns, and columns that depend on each other, and writes the findings at the minimum confidence or above into the stored schema. Fails while another run of the integration is active.

      Parameters

      • integrationId: string

        The ID of the database integration.

      • Optionaloptions: RelationshipInferenceOptions

        (Optional) What to look for and how much to spend on it.

      Returns Promise<string>

      A promise that resolves with the run's job ID, for squid.job().awaitJob(jobId) on a client with an API key.

    • Starts filling a dev database with fictional rows, in the background, over its stored schema, which is discovered, described and stored first when the integration has none. The rows are only added: existing rows stay. Each run is self-contained, so the rows it adds reference each other, and existing rows only in tables it does not fill or through a required self-reference, which needs a row to start from. Existing rows are sent to the configured AI provider as format examples. Fails outside dev environments and while another run of the integration is active. PostgreSQL only.

      Parameters

      • integrationId: string

        The ID of the database integration.

      • options: SyntheticDataOptions

        What to generate, how much, and optionally which tables.

      Returns Promise<string>

      A promise that resolves with the run's job ID, for squid.jobs().awaitJob(jobId).

    • Tests a data connection (database) to verify it is working. Attempts to connect to the database and perform a basic operation to validate connectivity. This can be used to test connection settings before saving the integration.

      Type Parameters

      • ConfigurationType = Record<string, any>

      Parameters

      Returns Promise<TestDataConnectionResponse>

      A promise that resolves with the test result indicating success or failure with an optional error message.