import { Socket } from "socket.io-client";
import { executeFullDalpuriSync, executeForcedIncrementalDalpuriSync } from "dalpuri";

/**
 * Execute a full sync from Dalpuri (ConnectWise) to the API database.
 * This is the main entry point for the dalpuri sync worker.
 */
export async function executeFullSync(_workerSocket: Socket): Promise<void> {
  return executeFullDalpuriSync();
}

/**
 * Execute an incremental sync from Dalpuri (ConnectWise) to the API database.
 * Called every 5 seconds via PgBoss from the API process interval.
 */
export async function executeIncrementalSync(): Promise<void> {
  return executeForcedIncrementalDalpuriSync();
}
