"""Closed wire-shape vocabulary for modelo registry export layouts.Every :class:`~domain.calculations.registry.schema_exports.ExportLayoutDefinition` declares theWIRE SHAPE its records take. :class:`ExportLayoutFormat` closes that value set soloader hydration rejects an unknown token at registry-load time rather than at adownstream branch on the string, and so the roughly twenty sites that switch onthe shape compare enum members instead of each re-spelling the same two tokens.The value set lived as a bare ``Literal`` on the layout model, which is why everyconsumer re-spelt it. Two of those consumers computed the SAME per-modelocapability booleans from it, in two packages, and the pair diverged before eitherwas noticed; retiring the duplicate left the literal-level fork standing, andthis enum is what closes it. A closed value set belongs in ``core`` for exactlythat reason: a ``Literal`` has no home a consumer can import, so it grows a copyat every call site.Not to be confused with two same-shaped vocabularies that name different things:- ``DeclaracionExportFormat`` in the filing surface is the OPERATOR-facing catalogue of export products (``fichero-boe``, ``xml-dictionary``). It names what a person asked the application to produce; this enum names how the registry declares the bytes are laid out. The two are one-to-one today and are still different subjects, so a rename of either must not be assumed to bind the other.- :class:`~core.output_rendering.OutputFormat` is the CLI's own text-versus-JSON rendering switch and has nothing to do with AEAT filing artefacts.Hydration happens at the registry boundary:``domain.calculations.registry.load_registry_tree`` hands the TOML token tostrict schema validation, which resolves it to a member here."""from__future__importannotationsfromenumimportStrEnum
[docs]classExportLayoutFormat(StrEnum):"""Wire shapes a modelo registry export layout may declare. Members carry the exact tokens the registry TOML stores, so hydration is a behaviour-preserving lift rather than a re-spelling: a member compares, hashes, and JSON-serialises identically to the string it replaces. """FIXED_WIDTH="fixed_width""""Fixed-width fichero-BOE payload, laid out by the AEAT diseño de registros. Every casilla the layout covers occupies a declared byte range, so an absent value is a blank slot rather than an absent field — which is why the completeness gate binds this shape and not the other. """XML_DICTIONARY="xml_dictionary""""XML payload driven by an AEAT-published dictionary and its XSD. Elements are optional by construction, so an absent casilla is a legitimately-absent element and carries no blank-slot hazard. """