import type { Connection } from '../../models/Connection.js';
import type { SyncDeploymentResult, ReportedSyncJobStatus, SyncCommand } from '../../models/Sync.js';
import { SyncStatus } from '../../models/Sync.js';
import type { ServiceResponse } from '../../models/Generic.js';
import type { LogContext, LogContextGetter } from '@nangohq/logs';
import type { Orchestrator, RecordsServiceInterface } from '../../clients/orchestrator.js';
import type { DBEnvironment, IncomingFlowConfig } from '@nangohq/types';
export declare const syncCommandToOperation: {
    readonly PAUSE: "pause";
    readonly UNPAUSE: "unpause";
    readonly RUN: "request_run";
    readonly RUN_FULL: "request_run_full";
    readonly CANCEL: "cancel";
};
export interface CreateSyncArgs {
    connections: Connection[];
    providerConfigKey: string;
    environmentId: number;
    sync: IncomingFlowConfig;
    syncName: string;
}
export declare class SyncManagerService {
    createSyncForConnection(nangoConnectionId: number, logContextGetter: LogContextGetter, orchestrator: Orchestrator): Promise<void>;
    createSyncForConnections(connections: Connection[], syncName: string, providerConfigKey: string, environmentId: number, sync: IncomingFlowConfig, logContextGetter: LogContextGetter, orchestrator: Orchestrator, debug?: boolean, logCtx?: LogContext): Promise<boolean>;
    createSyncs(syncArgs: CreateSyncArgs[], logContextGetter: LogContextGetter, orchestrator: Orchestrator, debug?: boolean, logCtx?: LogContext): Promise<boolean>;
    /**
     * Delete
     * @desc delete a sync and all the related objects
     * 1) sync config files
     * 2) sync config
     */
    deleteConfig(syncConfigId: number, environmentId: number): Promise<void>;
    softDeleteSync(syncId: string, environmentId: number, orchestrator: Orchestrator): Promise<void>;
    softDeleteSyncsByConnection(connection: Connection, orchestrator: Orchestrator): Promise<void>;
    deleteSyncsByProviderConfig(environmentId: number, providerConfigKey: string, orchestrator: Orchestrator): Promise<void>;
    runSyncCommand({ recordsService, orchestrator, environment, providerConfigKey, syncNames, command, logContextGetter, connectionId, initiator }: {
        recordsService: RecordsServiceInterface;
        orchestrator: Orchestrator;
        environment: DBEnvironment;
        providerConfigKey: string;
        syncNames: string[];
        command: SyncCommand;
        logContextGetter: LogContextGetter;
        connectionId?: string;
        initiator: string;
    }): Promise<ServiceResponse<boolean>>;
    getSyncStatus(environmentId: number, providerConfigKey: string, syncNames: string[], orchestrator: Orchestrator, connectionId?: string, includeJobStatus?: boolean, optionalConnection?: Connection | null): Promise<ServiceResponse<ReportedSyncJobStatus[] | void>>;
    classifySyncStatus(jobStatus: SyncStatus, scheduleState: 'STARTED' | 'PAUSED' | 'DELETED'): SyncStatus;
    /**
     * Trigger If Connections Exist
     * @desc for the recently deploy flows, create the sync and trigger it if there are connections
     */
    triggerIfConnectionsExist(flows: SyncDeploymentResult[], environmentId: number, logContextGetter: LogContextGetter, orchestrator: Orchestrator): Promise<void>;
    private syncStatus;
}
declare const _default: SyncManagerService;
export default _default;
