import type { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
import type { Entity } from '../entity/index.js';
import type { DocumentClientOptions } from '../types/documentClientOptions.js';
import type { Narrow, NarrowObject } from '../types/narrow.js';
import { $entities, $interceptor, $sentArgs } from './constants.js';
import type { Index, Key, TableMetadata } from './types/index.js';
export declare class Table<PARTITION_KEY extends Key = Key, SORT_KEY extends Key = Key extends PARTITION_KEY ? Key : never, INDEXES extends Record<string, Index> = Key extends PARTITION_KEY ? Record<string, Index> : {}, ENTITY_ATTRIBUTE_SAVED_AS extends string = Key extends PARTITION_KEY ? string : '_et'> {
    documentClient?: DynamoDBDocumentClient;
    tableName?: string | (() => string);
    readonly partitionKey: PARTITION_KEY;
    readonly sortKey?: SORT_KEY;
    readonly indexes: INDEXES;
    readonly entityAttributeSavedAs: ENTITY_ATTRIBUTE_SAVED_AS;
    [$interceptor]?: (action: TableSendableAction) => any;
    [$entities]: Entity[];
    meta: TableMetadata;
    constructor({ documentClient, 
    /**
     * @debt v3 "To rename tableName"
     */
    name, partitionKey, sortKey, indexes, entityAttributeSavedAs, meta }: {
        documentClient?: DynamoDBDocumentClient;
        name?: string | (() => string);
        partitionKey: NarrowObject<PARTITION_KEY>;
        sortKey?: NarrowObject<SORT_KEY>;
        indexes?: Narrow<INDEXES>;
        entityAttributeSavedAs?: ENTITY_ATTRIBUTE_SAVED_AS;
        meta?: TableMetadata;
    });
    getName(): string;
    getDocumentClient: () => DynamoDBDocumentClient;
    build<ACTION extends TableAction<this, this[$entities]> = TableAction<this, this[$entities]>>(Action: new (table: this, entities?: this[$entities]) => ACTION): ACTION;
}
export declare class TableAction<TABLE extends Table = Table, ENTITIES extends Entity[] = Entity[]> {
    readonly table: TABLE;
    static actionName: string;
    [$entities]: ENTITIES;
    constructor(table: TABLE, entities?: ENTITIES);
}
export interface TableSendableAction<TABLE extends Table = Table> extends TableAction<TABLE> {
    [$sentArgs](): any[];
    send(documentClientOptions?: DocumentClientOptions): Promise<any>;
}
