import type { components } from '../generated/api.js';
import type { DataSourceId } from '../core/branded-types.js';
import { WorkspaceScopedResource } from './base.js';
import type { ListParams } from '../core/utils.js';
export interface ListDataSourcesParams extends ListParams {
    type?: string;
    status?: string;
}
/**
 * Manage data sources — connections to external databases, warehouses,
 * or data feeds that the platform can query and sync from.
 */
export declare class DataSourcesResource extends WorkspaceScopedResource {
    create(body: components['schemas']['CreateDataSourceRequest']): Promise<{
        connection_config: {
            [x: string]: unknown;
        };
        created_at: string;
        discovered_by: string | null;
        display_name: string | null;
        entity_types: string[] | null;
        field_mappings: {
            [x: string]: unknown;
        };
        health_status: "unknown" | "healthy" | "degraded";
        id: string;
        is_active: boolean;
        is_stale: boolean;
        last_health_check: string | null;
        last_sync_at: string | null;
        last_sync_event_count: number;
        last_sync_status: ("success" | "error") | null;
        name: string;
        source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
        sync_schedule: string | null;
        sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
        updated_at: string;
        workspace_id: string;
    } & import("../index.js").ResponseMetadata>;
    list(params?: ListDataSourcesParams): Promise<{
        continuation_token?: number | null | undefined;
        has_more: boolean;
        items: {
            connection_config: {
                [x: string]: unknown;
            };
            created_at: string;
            discovered_by: string | null;
            display_name: string | null;
            entity_types: string[] | null;
            field_mappings: {
                [x: string]: unknown;
            };
            health_status: "unknown" | "healthy" | "degraded";
            id: string;
            is_active: boolean;
            is_stale: boolean;
            last_health_check: string | null;
            last_sync_at: string | null;
            last_sync_event_count: number;
            last_sync_status: ("success" | "error") | null;
            name: string;
            source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
            sync_schedule: string | null;
            sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
            updated_at: string;
            workspace_id: string;
        }[];
        total?: number | null | undefined;
    } & import("../index.js").ResponseMetadata>;
    listAutoPaging(params?: ListDataSourcesParams): AsyncGenerator<{
        connection_config: {
            [x: string]: unknown;
        };
        created_at: string;
        discovered_by: string | null;
        display_name: string | null;
        entity_types: string[] | null;
        field_mappings: {
            [x: string]: unknown;
        };
        health_status: "unknown" | "healthy" | "degraded";
        id: string;
        is_active: boolean;
        is_stale: boolean;
        last_health_check: string | null;
        last_sync_at: string | null;
        last_sync_event_count: number;
        last_sync_status: ("success" | "error") | null;
        name: string;
        source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
        sync_schedule: string | null;
        sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
        updated_at: string;
        workspace_id: string;
    }, any, any>;
    get(dataSourceId: DataSourceId | string): Promise<{
        connection_config: {
            [x: string]: unknown;
        };
        created_at: string;
        discovered_by: string | null;
        display_name: string | null;
        entity_types: string[] | null;
        field_mappings: {
            [x: string]: unknown;
        };
        health_status: "unknown" | "healthy" | "degraded";
        id: string;
        is_active: boolean;
        is_stale: boolean;
        last_health_check: string | null;
        last_sync_at: string | null;
        last_sync_event_count: number;
        last_sync_status: ("success" | "error") | null;
        name: string;
        source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
        sync_schedule: string | null;
        sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
        updated_at: string;
        workspace_id: string;
    } & import("../index.js").ResponseMetadata>;
    update(dataSourceId: DataSourceId | string, body: components['schemas']['UpdateDataSourceRequest']): Promise<{
        connection_config: {
            [x: string]: unknown;
        };
        created_at: string;
        discovered_by: string | null;
        display_name: string | null;
        entity_types: string[] | null;
        field_mappings: {
            [x: string]: unknown;
        };
        health_status: "unknown" | "healthy" | "degraded";
        id: string;
        is_active: boolean;
        is_stale: boolean;
        last_health_check: string | null;
        last_sync_at: string | null;
        last_sync_event_count: number;
        last_sync_status: ("success" | "error") | null;
        name: string;
        source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
        sync_schedule: string | null;
        sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
        updated_at: string;
        workspace_id: string;
    } & import("../index.js").ResponseMetadata>;
    delete(dataSourceId: DataSourceId | string): Promise<void>;
    /** Get event counts, sync status, and health for a data source */
    getStatus(dataSourceId: DataSourceId | string): Promise<{
        data_source_id: string;
        event_count: number;
        failed_count: number;
        health_status: "unknown" | "healthy" | "degraded";
        is_active: boolean;
        last_sync_at: string | null;
        last_sync_event_count: number;
        last_sync_status: ("success" | "error") | null;
        name: string;
        synced_count: number;
    } & import("../index.js").ResponseMetadata>;
    /** Get daily event timeline + recent sync failures for a data source */
    getSyncHistory(dataSourceId: DataSourceId | string): Promise<{
        data_source_id: string;
        name: string;
        recent_failures: {
            created_at: string | null;
            event_id: string;
            event_type: string;
            fhir_resource_id: string | null;
            fhir_resource_type: string | null;
            sync_error: string | null;
        }[];
        timeline: {
            date: string;
            event_count: number;
            failed_count: number;
            synced_count: number;
        }[];
    } & import("../index.js").ResponseMetadata>;
    /**
     * Trigger a one-off manual sync of a data source.
     *
     * Bypasses the business-hours gate and per-resource cadence counter on
     * connector-runner. Resolves with `{ status: "started", ... }` once the
     * request is queued — the poll itself runs asynchronously. Platform-api
     * returns 409 if the source is already mid-sync (see
     * `TriggerSyncConflictResponse` for the body shape), 503 if
     * connector-runner is unreachable.
     */
    triggerSync(dataSourceId: DataSourceId | string): Promise<{
        data_source_id: string;
        status: "started";
        triggered_at: string;
    } & import("../index.js").ResponseMetadata>;
}
//# sourceMappingURL=data-sources.d.ts.map