import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter. * * Stamped into every row it emits, so a corpus record can be traced back to the dataset it came from. */ export declare const IT_ANAC_ADAPTER_ID = "it-anac"; /** * The one jurisdiction this adapter emits. * * ANAC's release covers Italian public contracting, so the set has one member. */ export declare const IT_ANAC_COUNTRIES: readonly string[]; /** * The license the address-source register elected for this publication. * * The OCP Data Registry's publication page for id 117 states Creative Commons Attribution * 4.0 International, and the register records it under `spdx` as `CC-BY-4.0`. */ export declare const IT_ANAC_LICENSE = "CC-BY-4.0"; /** * The credit CC BY 4.0 obliges. * * The model card records it beside the license and a statement that the data was changed. */ export declare const IT_ANAC_ATTRIBUTION = "Autorit\u00E0 Nazionale Anticorruzione (ANAC), via the OCP Data Registry"; /** * The two party roles the adapter reads. * * The register's `addressRoles` records exactly these two fields. * The `supplier` role is the one role whose parties are contracting counterparties * rather than public bodies. * That role publishes no `address` object. */ export declare const IT_ANAC_PARTY_ROLES: readonly string[]; /** * Why a party's address didn't become a row. * * The reading returns one of these rather than an empty result, so a caller counting * refusals knows which condition each party met. * `tools/dev-tools` and the adapter's test both count them. */ export declare const ANACRefusal: { /** * The party holds a role other than `buyer` or `payer`, so its address is * out of scope even where one appears. */ readonly RoleNotAdmitted: "role-not-admitted"; /** * The party has no `address` object, or every field in it is empty or a placeholder. */ readonly AddressAbsent: "address-absent"; /** * The address states no locality, so no component places it. */ readonly LocalityAbsent: "locality-absent"; /** * The street line holds a digit that the split couldn't read as a house number. */ readonly StreetNumberUnplaced: "street-number-unplaced"; /** * The postcode is neither absent nor a five-digit Italian CAP. */ readonly PostcodeNotCAP: "postcode-not-cap"; /** * `countryName` names a country other than Italy. */ readonly CountryNotItaly: "country-not-italy"; /** * The party name takes the `Surname, Firstname` form a natural person's name takes. */ readonly NamePersonalForm: "name-personal-form"; /** * The components the party yielded do not render as an Italian address line. */ readonly Unrenderable: "unrenderable"; /** * The rendered line holds one component, so it is a place name rather than an address. * * A party leaves only the locality when its name holds no letter, its postcode is * the publisher's placeholder and its street line is absent. */ readonly ComponentsTooFew: "components-too-few"; }; /** * One of the {@link ANACRefusal} reasons. */ export type ANACRefusal = (typeof ANACRefusal)[keyof typeof ANACRefusal]; /** * What one party yielded: a row, or the reason it yielded none. */ export type ANACPartyReading = { readonly admitted: CanonicalRow; } | { readonly refused: ANACRefusal; }; /** * The OCDS address object, carrying the four fields this release populates. */ export interface ANACAddress { locality?: string | null; postalCode?: string | null; countryName?: string | null; streetAddress?: string | null; } /** * One `parties` member of a release. */ export interface ANACParty { name?: string | null; roles?: readonly string[] | null; address?: ANACAddress | null; } /** * One line of the input: an OCDS release. * * The adapter reads only `parties`. * A release also has `tender`, `awards` and `contracts`, and no address sits * on any of them in this publication. */ export interface ANACRelease { ocid?: string; parties?: readonly ANACParty[] | null; } /** * Whether a published value is the publisher's placeholder for an absent one, * or holds no letter and no digit at all. * * A placeholder read at face value would reach a corpus as a postcode spelled `N.A.`. */ export declare function isPlaceholderValue(value: string): boolean; /** * The street line with the three Italian conventions normalized away: a trailing copy * of the locality, a civic marker before the number, and a `senza numero` tail. * * `locality` is the publisher's own value for this party. * That value authorizes removing the trailing copy. * An empty string leaves the line as it is. */ export declare function normalizeANACStreetLine(line: string, locality: string): string; /** * Read one party's address into a row, or report why it yielded none. * * Exported because the refusal reasons are the measurement this adapter is checked by: a caller reading * a whole edition counts them per reason rather than observing a row count it cannot account for. */ export declare function readANACParty(party: ANACParty): ANACPartyReading; export declare function createITANACAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const itANACAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map