/** * Mexico Document Models * * Type-specific document models with typed field accessors. * Provides helpers for accessing extracted document data. */ import { type ActaConstitutivaFields, type AddressProofFields, type CurpDocumentFields, type IneBackFields, type IneFrontFields, MexDocumentType, type PassportFields, type PoderNotarialFields, type RfcConstanciaFields } from "@artu-ai/shared"; import { Document } from "../Document"; /** * Union of all Mexico document field types */ export type MexDocumentFields = IneFrontFields | IneBackFields | PassportFields | CurpDocumentFields | RfcConstanciaFields | AddressProofFields | ActaConstitutivaFields | PoderNotarialFields; /** * Mexico document model - base class for all Mexico documents */ export declare class MexDocument extends Document { /** * Mexico document type */ get type(): MexDocumentType; /** * Document fields - typed as union of all Mexico document field types * * For specific field types, use type-specific document classes: * - MexIneFrontDocument.ineFields * - MexPassportDocument.passportFields * - etc. */ get fields(): Partial | undefined; /** * Check if this is an INE front document */ get isIneFront(): boolean; /** * Check if this is an INE back document */ get isIneBack(): boolean; /** * Check if this is a passport document */ get isPassport(): boolean; /** * Check if this is a CURP document */ get isCurp(): boolean; /** * Check if this is an RFC constancia document */ get isRfcConstancia(): boolean; /** * Check if this is an address proof document */ get isAddressProof(): boolean; /** * Check if this is an acta constitutiva document */ get isActaConstitutiva(): boolean; /** * Check if this is a poder notarial document */ get isPoderNotarial(): boolean; } /** * INE Front document model with typed field accessors * * @example * ```typescript * const doc = await sdk.mex.documents.retrieve(id) as MexIneFrontDocument; * * if (doc.isIneFront) { * console.log(doc.claveElector); // Typed accessor * console.log(doc.curp); * console.log(doc.fullName); * } * ``` */ export declare class MexIneFrontDocument extends MexDocument { /** * Typed INE front fields */ get ineFields(): Partial | undefined; /** Voter ID number (Clave de Elector) */ get claveElector(): string | undefined; /** CURP */ get curp(): string | undefined; /** Full name as shown on INE */ get fullName(): string | undefined; /** Paternal surname */ get paternalSurname(): string | undefined; /** Maternal surname */ get maternalSurname(): string | undefined; /** Given name(s) */ get givenNames(): string | undefined; /** Date of birth */ get dateOfBirth(): Date | undefined; /** Gender (H = Hombre, M = Mujer) */ get gender(): "H" | "M" | undefined; /** State of birth */ get birthState(): string | undefined; /** Electoral section */ get section(): string | undefined; /** Registration year */ get registrationYear(): number | undefined; /** Expiration year */ get expirationYear(): number | undefined; /** Full address from INE */ get address(): { street?: string; exteriorNumber?: string; interiorNumber?: string; neighborhood?: string; municipality?: string; state?: string; postalCode?: string; }; } /** * INE Back document model with typed field accessors */ export declare class MexIneBackDocument extends MexDocument { /** * Typed INE back fields */ get ineBackFields(): Partial | undefined; /** OCR number */ get ocrNumber(): string | undefined; /** CIC number */ get cicNumber(): string | undefined; /** Citizen ID (9 digits) */ get citizenId(): string | undefined; /** MRZ lines (Machine Readable Zone) */ get mrz(): { line1?: string; line2?: string; line3?: string; }; } /** * Passport document model with typed field accessors */ export declare class MexPassportDocument extends MexDocument { /** * Typed passport fields */ get passportFields(): Partial | undefined; /** Passport number */ get passportNumber(): string | undefined; /** Issuing country */ get issuingCountry(): string | undefined; /** Nationality */ get nationality(): string | undefined; /** Full name as shown on passport */ get fullName(): string | undefined; /** Given name(s) */ get givenNames(): string | undefined; /** Surname(s) */ get surnames(): string | undefined; /** Date of birth */ get dateOfBirth(): Date | undefined; /** Place of birth */ get placeOfBirth(): string | undefined; /** Gender */ get gender(): "M" | "F" | "X" | undefined; /** Issue date */ get issueDate(): Date | undefined; /** Expiration date */ get passportExpirationDate(): Date | undefined; /** MRZ lines */ get mrz(): { line1?: string; line2?: string; }; } /** * CURP document model with typed field accessors */ export declare class MexCurpDocument extends MexDocument { /** * Typed CURP fields */ get curpFields(): Partial | undefined; /** CURP (18 character ID) */ get curp(): string | undefined; /** Full name */ get fullName(): string | undefined; /** Paternal surname */ get paternalSurname(): string | undefined; /** Maternal surname */ get maternalSurname(): string | undefined; /** Given name(s) */ get givenNames(): string | undefined; /** Date of birth */ get dateOfBirth(): Date | undefined; /** Gender */ get gender(): "H" | "M" | undefined; /** State of birth */ get birthState(): string | undefined; /** Verification URL */ get verificationUrl(): string | undefined; } /** * RFC Constancia document model with typed field accessors */ export declare class MexRfcConstanciaDocument extends MexDocument { /** * Typed RFC fields */ get rfcFields(): Partial | undefined; /** RFC (tax ID) */ get rfc(): string | undefined; /** Full name or business name */ get fullName(): string | undefined; /** CURP (for individuals) */ get curp(): string | undefined; /** Tax regime(s) */ get taxRegimes(): string[] | undefined; /** Economic activities */ get economicActivities(): string[] | undefined; /** Tax obligations */ get taxObligations(): string[] | undefined; /** Registration date */ get registrationDate(): Date | undefined; /** Registered address */ get address(): { street?: string; exteriorNumber?: string; interiorNumber?: string; neighborhood?: string; municipality?: string; state?: string; postalCode?: string; }; } /** * Address proof document model with typed field accessors * (Comprobante de Domicilio, Recibo de Luz/Agua, Estado de Cuenta) */ export declare class MexAddressProofDocument extends MexDocument { /** * Typed address proof fields */ get addressProofFields(): Partial | undefined; /** Account holder name */ get accountHolderName(): string | undefined; /** Service type */ get serviceType(): string | undefined; /** Provider name */ get providerName(): string | undefined; /** Account/contract number */ get accountNumber(): string | undefined; /** Statement date */ get statementDate(): Date | undefined; /** Service address */ get serviceAddress(): { street?: string; exteriorNumber?: string; interiorNumber?: string; neighborhood?: string; municipality?: string; state?: string; postalCode?: string; }; } /** * Acta Constitutiva (Articles of Incorporation) document model * with typed field accessors */ export declare class MexActaConstitutivaDocument extends MexDocument { /** * Typed acta constitutiva fields */ get actaFields(): Partial | undefined; /** Company legal name (Denominación o Razón Social) */ get companyName(): string | undefined; /** Company RFC (tax ID) */ get companyRfc(): string | undefined; /** Type of legal entity */ get entityType(): string | undefined; /** Notary number (Número de Notaría) */ get notaryNumber(): number | undefined; /** Notary name */ get notaryName(): string | undefined; /** Notary state/city */ get notaryLocation(): string | undefined; /** Instrument number (Número de Escritura) */ get instrumentNumber(): string | undefined; /** Book number (Número de Libro) */ get bookNumber(): string | undefined; /** Volume number (Número de Volumen) */ get volumeNumber(): string | undefined; /** Date of incorporation */ get incorporationDate(): Date | undefined; /** Registration number at Public Registry of Commerce */ get publicRegistryNumber(): string | undefined; /** Public Registry of Commerce location */ get publicRegistryLocation(): string | undefined; /** Registration date at Public Registry */ get publicRegistryDate(): Date | undefined; /** Corporate purpose (Objeto Social) */ get corporatePurpose(): string | undefined; /** Duration of the company */ get duration(): string | undefined; /** Initial capital (Capital Social Inicial) */ get initialCapital(): number | undefined; /** Capital currency */ get capitalCurrency(): string | undefined; /** List of founding partners/shareholders */ get founders(): { name: string; rfc?: string; capitalContribution?: number; percentageOwnership?: number; }[] | undefined; /** Legal representatives mentioned */ get legalRepresentatives(): string[] | undefined; /** Registered address */ get registeredAddress(): { street?: string; exteriorNumber?: string; interiorNumber?: string; neighborhood?: string; municipality?: string; state?: string; postalCode?: string; }; } /** * Poder Notarial (Notarized Power of Attorney) document model * with typed field accessors */ export declare class MexPoderNotarialDocument extends MexDocument { /** * Typed poder notarial fields */ get poderFields(): Partial | undefined; /** Type of power granted */ get powerType(): string | undefined; /** Grantor name (Poderdante - individual/company giving power) */ get grantorName(): string | undefined; /** Grantor RFC */ get grantorRfc(): string | undefined; /** Grantor type */ get grantorType(): "individual" | "company" | undefined; /** Attorney-in-fact name (Apoderado - individual receiving power) */ get attorneyName(): string | undefined; /** Attorney RFC */ get attorneyRfc(): string | undefined; /** Attorney CURP */ get attorneyCurp(): string | undefined; /** Notary number */ get notaryNumber(): number | undefined; /** Notary name */ get notaryName(): string | undefined; /** Notary state/city */ get notaryLocation(): string | undefined; /** Instrument number (Número de Escritura) */ get instrumentNumber(): string | undefined; /** Book number */ get bookNumber(): string | undefined; /** Volume number */ get volumeNumber(): string | undefined; /** Date power was granted */ get grantDate(): Date | undefined; /** Expiration date (if applicable) */ get poderExpirationDate(): Date | undefined; /** Whether the power is revocable */ get isRevocable(): boolean | undefined; /** Scope/limitations of the power */ get powerScope(): string | undefined; /** Specific acts authorized (for special powers) */ get authorizedActs(): string[] | undefined; /** Registration number (if registered) */ get registrationNumber(): string | undefined; /** Whether this power has been revoked */ get isRevoked(): boolean | undefined; /** Revocation date */ get revocationDate(): Date | undefined; } /** * Check if document is a Mexico document */ export declare function isMexDocument(doc: Document): doc is MexDocument; /** * Check if document is INE front */ export declare function isMexIneFront(doc: Document): doc is MexIneFrontDocument; /** * Check if document is INE back */ export declare function isMexIneBack(doc: Document): doc is MexIneBackDocument; /** * Check if document is a passport */ export declare function isMexPassport(doc: Document): doc is MexPassportDocument; /** * Check if document is a CURP */ export declare function isMexCurp(doc: Document): doc is MexCurpDocument; /** * Check if document is an RFC constancia */ export declare function isMexRfcConstancia(doc: Document): doc is MexRfcConstanciaDocument; /** * Check if document is an address proof */ export declare function isMexAddressProof(doc: Document): doc is MexAddressProofDocument; /** * Check if document is an acta constitutiva */ export declare function isMexActaConstitutiva(doc: Document): doc is MexActaConstitutivaDocument; /** * Check if document is a poder notarial */ export declare function isMexPoderNotarial(doc: Document): doc is MexPoderNotarialDocument;