export interface S3Object {
    Bucket?: string;
    Name?: string;
    Version?: string;
}
export interface Document {
    Bytes?: Uint8Array;
    S3Object?: S3Object;
}
export interface BoundingBox {
    Width?: number;
    Height?: number;
    Left?: number;
    Top?: number;
}
export interface Point {
    X?: number;
    Y?: number;
}
export interface Geometry {
    BoundingBox?: BoundingBox;
    Polygon?: Point[];
}
export interface Relationship {
    Type?: 'VALUE' | 'CHILD' | 'COMPLEX_FEATURES' | 'MERGED_CELL' | 'TITLE' | 'ANSWER' | 'TABLE' | 'TABLE_TITLE' | 'TABLE_FOOTER';
    Ids?: string[];
}
export interface Block {
    BlockType?: 'KEY_VALUE_SET' | 'PAGE' | 'LINE' | 'WORD' | 'TABLE' | 'CELL' | 'SELECTION_ELEMENT' | 'MERGED_CELL' | 'TITLE' | 'QUERY' | 'QUERY_RESULT' | 'SIGNATURE' | 'TABLE_TITLE' | 'TABLE_FOOTER' | 'LAYOUT_TEXT' | 'LAYOUT_TITLE' | 'LAYOUT_HEADER' | 'LAYOUT_FOOTER' | 'LAYOUT_SECTION_HEADER' | 'LAYOUT_PAGE_NUMBER' | 'LAYOUT_LIST' | 'LAYOUT_FIGURE' | 'LAYOUT_TABLE' | 'LAYOUT_KEY_VALUE';
    Confidence?: number;
    Text?: string;
    TextType?: 'HANDWRITING' | 'PRINTED';
    RowIndex?: number;
    ColumnIndex?: number;
    RowSpan?: number;
    ColumnSpan?: number;
    Geometry?: Geometry;
    Id?: string;
    Relationships?: Relationship[];
    EntityTypes?: ('KEY' | 'VALUE' | 'COLUMN_HEADER' | 'TABLE_TITLE' | 'TABLE_FOOTER' | 'TABLE_SECTION_TITLE' | 'TABLE_SUMMARY' | 'STRUCTURED_TABLE' | 'SEMI_STRUCTURED_TABLE')[];
    SelectionStatus?: 'SELECTED' | 'NOT_SELECTED';
    Page?: number;
    Query?: {
        Text: string;
        Alias?: string;
        Pages?: string[];
    };
}
export interface DocumentMetadata {
    Pages?: number;
}
export interface Warning {
    ErrorCode?: string;
    Pages?: number[];
}
export interface DetectDocumentTextCommandInput {
    Document: Document;
}
export interface DetectDocumentTextCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    Blocks?: Block[];
    DetectDocumentTextModelVersion?: string;
}
export interface AnalyzeDocumentCommandInput {
    Document: Document;
    FeatureTypes: ('TABLES' | 'FORMS' | 'QUERIES' | 'SIGNATURES' | 'LAYOUT')[];
    HumanLoopConfig?: {
        HumanLoopName: string;
        FlowDefinitionArn: string;
        DataAttributes?: {
            ContentClassifiers?: ('FreeOfPersonallyIdentifiableInformation' | 'FreeOfAdultContent')[];
        };
    };
    QueriesConfig?: {
        Queries: Array<{
            Text: string;
            Alias?: string;
            Pages?: string[];
        }>;
    };
    AdaptersConfig?: {
        Adapters: Array<{
            AdapterId: string;
            Pages?: string[];
            Version: string;
        }>;
    };
}
export interface AnalyzeDocumentCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    Blocks?: Block[];
    HumanLoopActivationOutput?: {
        HumanLoopArn?: string;
        HumanLoopActivationReasons?: string[];
        HumanLoopActivationConditionsEvaluationResults?: string;
    };
    AnalyzeDocumentModelVersion?: string;
}
export interface AnalyzeExpenseCommandInput {
    Document: Document;
}
export interface ExpenseField {
    Type?: {
        Text?: string;
        Confidence?: number;
    };
    LabelDetection?: {
        Text?: string;
        Geometry?: Geometry;
        Confidence?: number;
    };
    ValueDetection?: {
        Text?: string;
        Geometry?: Geometry;
        Confidence?: number;
    };
    PageNumber?: number;
    Currency?: {
        Code?: string;
        Confidence?: number;
    };
    GroupProperties?: Array<{
        Types?: string[];
        Id?: string;
    }>;
}
export interface LineItemGroup {
    LineItemGroupIndex?: number;
    LineItems?: Array<{
        LineItemExpenseFields?: ExpenseField[];
    }>;
}
export interface ExpenseDocument {
    ExpenseIndex?: number;
    SummaryFields?: ExpenseField[];
    LineItemGroups?: LineItemGroup[];
    Blocks?: Block[];
}
export interface AnalyzeExpenseCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    ExpenseDocuments?: ExpenseDocument[];
}
export interface AnalyzeIDCommandInput {
    DocumentPages: Document[];
}
export interface IdentityDocument {
    DocumentIndex?: number;
    IdentityDocumentFields?: Array<{
        Type?: {
            Text?: string;
            Confidence?: number;
        };
        ValueDetection?: {
            Text?: string;
            NormalizedValue?: {
                Value?: string;
                ValueType?: 'DATE';
            };
            Confidence?: number;
        };
    }>;
    Blocks?: Block[];
}
export interface AnalyzeIDCommandOutput {
    IdentityDocuments?: IdentityDocument[];
    DocumentMetadata?: DocumentMetadata;
    AnalyzeIDModelVersion?: string;
}
export interface StartDocumentTextDetectionCommandInput {
    DocumentLocation: {
        S3Object?: S3Object;
    };
    ClientRequestToken?: string;
    JobTag?: string;
    NotificationChannel?: {
        SNSTopicArn: string;
        RoleArn: string;
    };
    OutputConfig?: {
        S3Bucket: string;
        S3Prefix?: string;
    };
    KMSKeyId?: string;
}
export interface StartDocumentTextDetectionCommandOutput {
    JobId?: string;
}
export interface GetDocumentTextDetectionCommandInput {
    JobId: string;
    MaxResults?: number;
    NextToken?: string;
}
export interface GetDocumentTextDetectionCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'PARTIAL_SUCCESS';
    NextToken?: string;
    Blocks?: Block[];
    Warnings?: Warning[];
    StatusMessage?: string;
    DetectDocumentTextModelVersion?: string;
}
export interface StartDocumentAnalysisCommandInput {
    DocumentLocation: {
        S3Object?: S3Object;
    };
    FeatureTypes: ('TABLES' | 'FORMS' | 'QUERIES' | 'SIGNATURES' | 'LAYOUT')[];
    ClientRequestToken?: string;
    JobTag?: string;
    NotificationChannel?: {
        SNSTopicArn: string;
        RoleArn: string;
    };
    OutputConfig?: {
        S3Bucket: string;
        S3Prefix?: string;
    };
    KMSKeyId?: string;
    QueriesConfig?: {
        Queries: Array<{
            Text: string;
            Alias?: string;
            Pages?: string[];
        }>;
    };
    AdaptersConfig?: {
        Adapters: Array<{
            AdapterId: string;
            Pages?: string[];
            Version: string;
        }>;
    };
}
export interface StartDocumentAnalysisCommandOutput {
    JobId?: string;
}
export interface GetDocumentAnalysisCommandInput {
    JobId: string;
    MaxResults?: number;
    NextToken?: string;
}
export interface GetDocumentAnalysisCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'PARTIAL_SUCCESS';
    NextToken?: string;
    Blocks?: Block[];
    Warnings?: Warning[];
    StatusMessage?: string;
    AnalyzeDocumentModelVersion?: string;
}
export interface StartExpenseAnalysisCommandInput {
    DocumentLocation: {
        S3Object?: S3Object;
    };
    ClientRequestToken?: string;
    JobTag?: string;
    NotificationChannel?: {
        SNSTopicArn: string;
        RoleArn: string;
    };
    OutputConfig?: {
        S3Bucket: string;
        S3Prefix?: string;
    };
    KMSKeyId?: string;
}
export interface StartExpenseAnalysisCommandOutput {
    JobId?: string;
}
export interface GetExpenseAnalysisCommandInput {
    JobId: string;
    MaxResults?: number;
    NextToken?: string;
}
export interface GetExpenseAnalysisCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'PARTIAL_SUCCESS';
    NextToken?: string;
    ExpenseDocuments?: ExpenseDocument[];
    Warnings?: Warning[];
    StatusMessage?: string;
    AnalyzeExpenseModelVersion?: string;
}
export interface StartLendingAnalysisCommandInput {
    DocumentLocation: {
        S3Object?: S3Object;
    };
    ClientRequestToken?: string;
    JobTag?: string;
    NotificationChannel?: {
        SNSTopicArn: string;
        RoleArn: string;
    };
    OutputConfig?: {
        S3Bucket: string;
        S3Prefix?: string;
    };
    KMSKeyId?: string;
}
export interface StartLendingAnalysisCommandOutput {
    JobId?: string;
}
export interface GetLendingAnalysisCommandInput {
    JobId: string;
    MaxResults?: number;
    NextToken?: string;
}
export interface LendingDocument {
    LendingFields?: Array<{
        Type?: string;
        KeyDetection?: {
            Text?: string;
            Geometry?: Geometry;
            Confidence?: number;
        };
        ValueDetections?: Array<{
            Text?: string;
            Geometry?: Geometry;
            Confidence?: number;
            SelectionStatus?: 'SELECTED' | 'NOT_SELECTED';
        }>;
    }>;
    SignatureDetections?: Array<{
        Confidence?: number;
        Geometry?: Geometry;
    }>;
}
export interface LendingResult {
    Page?: number;
    PageClassification?: {
        PageType?: Array<{
            Value?: string;
            Confidence?: number;
        }>;
        PageNumber?: Array<{
            Value?: string;
            Confidence?: number;
        }>;
    };
    Extractions?: Array<{
        LendingDocument?: LendingDocument;
        ExpenseDocument?: ExpenseDocument;
        IdentityDocument?: IdentityDocument;
    }>;
}
export interface GetLendingAnalysisCommandOutput {
    DocumentMetadata?: DocumentMetadata;
    JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'PARTIAL_SUCCESS';
    NextToken?: string;
    Results?: LendingResult[];
    Warnings?: Warning[];
    StatusMessage?: string;
    AnalyzeLendingModelVersion?: string;
}
export declare class TextractClient {
    private client;
    private region;
    constructor(region?: string);
    private request;
    /**
     * Detect text in a document (OCR)
     */
    detectDocumentText(params: DetectDocumentTextCommandInput): Promise<DetectDocumentTextCommandOutput>;
    /**
     * Analyze a document (forms, tables, queries)
     */
    analyzeDocument(params: AnalyzeDocumentCommandInput): Promise<AnalyzeDocumentCommandOutput>;
    /**
     * Analyze expense document (receipts, invoices)
     */
    analyzeExpense(params: AnalyzeExpenseCommandInput): Promise<AnalyzeExpenseCommandOutput>;
    /**
     * Analyze ID document (driver's license, passport)
     */
    analyzeID(params: AnalyzeIDCommandInput): Promise<AnalyzeIDCommandOutput>;
    /**
     * Start async text detection job
     */
    startDocumentTextDetection(params: StartDocumentTextDetectionCommandInput): Promise<StartDocumentTextDetectionCommandOutput>;
    /**
     * Get results of text detection job
     */
    getDocumentTextDetection(params: GetDocumentTextDetectionCommandInput): Promise<GetDocumentTextDetectionCommandOutput>;
    /**
     * Start async document analysis job
     */
    startDocumentAnalysis(params: StartDocumentAnalysisCommandInput): Promise<StartDocumentAnalysisCommandOutput>;
    /**
     * Get results of document analysis job
     */
    getDocumentAnalysis(params: GetDocumentAnalysisCommandInput): Promise<GetDocumentAnalysisCommandOutput>;
    /**
     * Start async expense analysis job
     */
    startExpenseAnalysis(params: StartExpenseAnalysisCommandInput): Promise<StartExpenseAnalysisCommandOutput>;
    /**
     * Get results of expense analysis job
     */
    getExpenseAnalysis(params: GetExpenseAnalysisCommandInput): Promise<GetExpenseAnalysisCommandOutput>;
    /**
     * Start async lending analysis job
     */
    startLendingAnalysis(params: StartLendingAnalysisCommandInput): Promise<StartLendingAnalysisCommandOutput>;
    /**
     * Get results of lending analysis job
     */
    getLendingAnalysis(params: GetLendingAnalysisCommandInput): Promise<GetLendingAnalysisCommandOutput>;
    /**
     * Extract all text from a document
     */
    extractText(document: Document): Promise<string[]>;
    /**
     * Extract text from S3 document
     */
    extractTextFromS3(bucket: string, key: string): Promise<string[]>;
    /**
     * Extract key-value pairs (forms) from a document
     */
    extractForms(document: Document): Promise<Array<{
        key: string;
        value: string;
        confidence: number;
    }>>;
    /**
     * Extract tables from a document
     */
    extractTables(document: Document): Promise<Array<{
        rows: string[][];
    }>>;
    /**
     * Extract expense summary from receipt/invoice
     */
    extractExpenseSummary(document: Document): Promise<{
        vendor?: string;
        total?: string;
        date?: string;
        items: Array<{
            description?: string;
            quantity?: string;
            price?: string;
        }>;
    }>;
    /**
     * Answer questions about a document
     */
    queryDocument(document: Document, questions: string[]): Promise<Array<{
        question: string;
        answer: string;
        confidence: number;
    }>>;
    /**
     * Wait for async job to complete
     */
    waitForJob(jobId: string, getJob: (jobId: string) => Promise<{
        JobStatus?: string;
    }>, options?: {
        maxWaitMs?: number;
        pollIntervalMs?: number;
    }): Promise<void>;
    private getBlockText;
}
/**
 * Quick text extraction from S3 document
 */
export declare function extractTextFromS3(bucket: string, key: string, region?: string): Promise<string>;
/**
 * Quick form extraction from S3 document
 */
export declare function extractFormsFromS3(bucket: string, key: string, region?: string): Promise<Record<string, string>>;
/**
 * Quick table extraction from S3 document
 */
export declare function extractTablesFromS3(bucket: string, key: string, region?: string): Promise<string[][][]>;
