feat: expose unified exchange activity APIs and exports

This commit is contained in:
Aleksandr Meshchryakov
2026-10-05 17:33:33 +02:00
parent d69ba600d4
commit 3ce9898c0e
30 changed files with 1324 additions and 85 deletions

View File

@@ -6,6 +6,12 @@ import type {
} from './generated/schemas';
export function recordLabel(record: OrganizationSourceRecordList): string {
if (record.source_group === 'stock_exchange_activity') {
const type: 'exchange_instrument' = record.record_type;
const duration: string | null | undefined = record.payload.duration?.value;
const yieldValue: string | null | undefined = record.payload.yield?.value;
return type + record.payload.exchange + (duration || '') + (yieldValue || '');
}
if (record.source_group === 'budget_process_registry') {
const type: 'budget_registry_organization' = record.record_type;
return type + record.payload.registry.code;