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,9 +6,19 @@ import {
ApiV2OrganizationSourceRecordsRead404Response,
V2OrganizationSourceRecordsList200Response,
V2OrganizationSourceRecordsList400Response,
ApiV1SourcesRefreshCreate202Response,
ApiV1SourcesRefreshCreate400Response,
ApiV1SourcesRefreshCreate403Response,
ApiV1SourcesRefreshCreate404Response,
ApiV1SourcesRefreshCreate409Response,
} from './generated-zod/contract.ts';
const schemas = new Map([
['refresh:202', ApiV1SourcesRefreshCreate202Response],
['refresh:400', ApiV1SourcesRefreshCreate400Response],
['refresh:403', ApiV1SourcesRefreshCreate403Response],
['refresh:404', ApiV1SourcesRefreshCreate404Response],
['refresh:409', ApiV1SourcesRefreshCreate409Response],
['list:200', V2OrganizationSourceRecordsList200Response],
['list:400', V2OrganizationSourceRecordsList400Response],
['detail:200', ApiV2OrganizationSourceRecordsRead200Response],
@@ -17,7 +27,10 @@ const schemas = new Map([
]);
const requiredCases = new Set([
'mixed-list', 'empty-list', 'invalid-list', 'invalid-detail', 'missing-detail',
...['budget_ubpandnubp', 'fns_sme_support_recipients', 'sro_membership_check', 'fssp_enforcement_proceedings', 'checko_leasing', 'checko_messages', 'checko_licenses']
'stock_exchange_activity-spb-detail', 'missing-refresh',
...['fssp_enforcement_proceedings', 'checko_leasing', 'checko_messages', 'checko_licenses', 'stock_exchange_activity']
.flatMap(source => ['forbidden', 'invalid', 'accepted', 'conflict'].map(kind => `${source}-refresh-${kind}`)),
...['budget_ubpandnubp', 'fns_sme_support_recipients', 'sro_membership_check', 'fssp_enforcement_proceedings', 'checko_leasing', 'checko_messages', 'checko_licenses', 'stock_exchange_activity']
.flatMap(source => [`${source}-list`, `${source}-detail`]),
]);