nationid - v2.2.1
    Preparing search index...

    Function listDocuments

    • List every registered document type for country with locale-aware names.

      Drives the "select your document" dropdown in onboarding UIs. Returns an empty array for an unknown country. Specs that lack a catalog entry are silently skipped — the coverage test guarantees they exist.

      Parameters

      • country: CountryCode

        ISO 3166-1 alpha-2 country code (uppercase).

      • locale: Locale = DEFAULT_LOCALE

        Display locale (default "en").

      Returns readonly DocumentInfo[]

      Read-only array of DocumentInfo, one per registered spec.

      import { listDocuments } from "nationid/catalog";

      const options = listDocuments("MX", "es");
      // [{ code: "MX_CURP", displayName: "CURP", longName: "Clave Única…", … }, …]