import { logger } from '@/infrastructure/monitoring/logger';

/**
 * dbis.control.outbox
 * Persist send intent and payload hash before adapter send. Supports safe retries.
 */
export class GatewayOutboxService {
	async persistSendIntent(params: {
		txnId: string;
		adapterId: string;
		payloadHash: string;
	}): Promise<{ status: 'PERSISTED' }> {
		logger.info('GatewayOutboxService.persistSendIntent', { txnId: params.txnId, adapterId: params.adapterId });
		// Insert into gateway_outbox (DAO omitted for scaffolding)
		return { status: 'PERSISTED' as const };
	}
}

export const gatewayOutboxService = new GatewayOutboxService();

