import { AdapterBase } from '../sdk/adapter-base';
import { AdapterReceiveResult, AdapterSendResult, AdapterValidateResult } from '../sdk/adapter-types';

/**
 * dbis.adapter.swift-iso
 * Scaffold adapter for SWIFT ISO 20022 messages.
 */
export class SwiftIsoAdapter extends AdapterBase {
	async validate(_: Record<string, unknown>): Promise<AdapterValidateResult> {
		return { ok: true };
	}
	async send(outboxRecord: { txnId: string; payloadHash: string; envelope: unknown }): Promise<AdapterSendResult> {
		return { status: 'SENT', railMessageId: `ISO-${outboxRecord.txnId}` };
	}
	async receive(_: unknown): Promise<AdapterReceiveResult> {
		return { status: 'ACK', railMessageId: `ISO-ACK-${Date.now()}` };
	}
}

