feat: expose Checko section APIs and completion counters
This commit is contained in:
@@ -26,6 +26,9 @@ const variants = [
|
||||
['SroMembership', 'sro_membership', 'sro_membership_check', 'sro_membership', 'SroMembership'],
|
||||
];
|
||||
const extendedVariants = [
|
||||
['CheckoLeasing', 'leasing', 'checko_leasing', 'leasing_contract', 'CheckoLeasing'],
|
||||
['CheckoMessage', 'company_messages', 'checko_messages', 'company_message', 'CheckoMessage'],
|
||||
['CheckoLicense', 'company_licenses', 'checko_licenses', 'company_license', 'CheckoLicense'],
|
||||
['FsspEnforcementProceeding', 'enforcement_proceedings', 'fssp_enforcement_proceedings', 'enforcement_proceeding', 'FsspEnforcementProceeding'],
|
||||
['IntegratedStructure', 'integrated_structure_documents', 'integrated_structures', 'integrated_structure', 'IntegratedStructure'],
|
||||
['FedresursCompanyProfile', 'fedresurs_company_profile', 'fedresurs_company_profile', 'company_profile', 'FedresursCompanyProfile'],
|
||||
@@ -144,6 +147,9 @@ for (const [prefix, group, source, recordType, payloadPrefix] of extendedVariant
|
||||
schema.properties.status = { type: 'string' };
|
||||
schema.properties.payload = ref(payloadName);
|
||||
schema.properties.organization = ref('SroSourceRecordOrganization');
|
||||
if (['leasing', 'company_messages', 'company_licenses'].includes(group)) {
|
||||
schema.properties.organization = ref('FsspSourceRecordOrganization');
|
||||
}
|
||||
if (group === 'enforcement_proceedings') {
|
||||
schema.required = [...new Set([...schema.required, 'extension_uid', 'record_date', 'amount', 'url', 'legacy_model', 'legacy_pk', 'load_batch', 'financial_lines'])];
|
||||
schema.properties.status = { type: 'string', enum: ['unknown', 'ended', 'terminated'] };
|
||||
|
||||
@@ -17,7 +17,7 @@ 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']
|
||||
...['budget_ubpandnubp', 'fns_sme_support_recipients', 'sro_membership_check', 'fssp_enforcement_proceedings', 'checko_leasing', 'checko_messages', 'checko_licenses']
|
||||
.flatMap(source => [`${source}-list`, `${source}-detail`]),
|
||||
]);
|
||||
|
||||
|
||||
@@ -971,5 +971,197 @@
|
||||
"raw_columns",
|
||||
"source_row_number"
|
||||
]
|
||||
},
|
||||
"CheckoMessageListPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message_guid": {
|
||||
"type": "string"
|
||||
},
|
||||
"publication_raw": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"publication_date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"nullable": true
|
||||
},
|
||||
"message_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"message_type_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"publisher_identifier": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_identifiers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"source_url": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"fetched_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"upstream": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message_guid",
|
||||
"publication_raw",
|
||||
"publication_date",
|
||||
"message_type",
|
||||
"message_type_name",
|
||||
"publisher_identifier",
|
||||
"participant_identifiers",
|
||||
"source_url",
|
||||
"fetched_at",
|
||||
"upstream"
|
||||
]
|
||||
},
|
||||
"CheckoMessageDetailPayload": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CheckoMessageListPayload"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CheckoLeasingListPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message_guid": {
|
||||
"type": "string"
|
||||
},
|
||||
"publication_raw": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"publication_date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"nullable": true
|
||||
},
|
||||
"message_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"message_type_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"publisher_identifier": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_identifiers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"source_url": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"fetched_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"upstream": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"lease_event_type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message_guid",
|
||||
"publication_raw",
|
||||
"publication_date",
|
||||
"message_type",
|
||||
"message_type_name",
|
||||
"publisher_identifier",
|
||||
"participant_identifiers",
|
||||
"source_url",
|
||||
"fetched_at",
|
||||
"upstream",
|
||||
"lease_event_type"
|
||||
]
|
||||
},
|
||||
"CheckoLeasingDetailPayload": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CheckoLeasingListPayload"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CheckoLicenseListPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"license_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"issued_on": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"valid_from": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"nullable": true
|
||||
},
|
||||
"valid_until": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"nullable": true
|
||||
},
|
||||
"authority": {
|
||||
"type": "string"
|
||||
},
|
||||
"activities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"source_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"fetched_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"upstream": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"license_number",
|
||||
"issued_on",
|
||||
"valid_from",
|
||||
"valid_until",
|
||||
"authority",
|
||||
"activities",
|
||||
"source_url",
|
||||
"fetched_at",
|
||||
"upstream"
|
||||
]
|
||||
},
|
||||
"CheckoLicenseDetailPayload": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CheckoLicenseListPayload"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user