whatsapp-crm-common
Version:
Componentes compartidos para servicios de WhatsApp CRM - Common utilities and types for WhatsApp CRM system
36 lines • 1.37 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SyncRepository = void 0;
const base_repository_1 = __importDefault(require("./base-repository"));
class SyncRepository extends base_repository_1.default {
/**
* Guarda los metadatos de sincronización en la base de datos
*/
async guardarMetadatos(client, metadatos, tenantId, agentId) {
const query = `
INSERT INTO sync_metadata
(sync_type, is_latest, progress, peer_data_request_session_id, completed, tenant_id, agent_id)
VALUES ($1, $2, $3, $4, $5, $6, $7)
`;
await client.query(query, [
metadatos.syncType,
metadatos.isLatest,
metadatos.progress,
metadatos.peerDataRequestSessionId,
metadatos.completado,
tenantId,
agentId,
]);
}
async guardarSyncEnBD(tenantId, agentId, syncData) {
// Implementation for saving sync data to the database
}
async obtenerSyncDeBD(tenantId, agentId) {
// Implementation for retrieving sync data from the database
}
}
exports.SyncRepository = SyncRepository;
//# sourceMappingURL=sync-repository.js.map