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 = Key extends PARTITION_KEY ? Record : {}, 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; sortKey?: NarrowObject; indexes?: Narrow; entityAttributeSavedAs?: ENTITY_ATTRIBUTE_SAVED_AS; meta?: TableMetadata; }); getName(): string; getDocumentClient: () => DynamoDBDocumentClient; build = TableAction>(Action: new (table: this, entities?: this[$entities]) => ACTION): ACTION; } export declare class TableAction { readonly table: TABLE; static actionName: string; [$entities]: ENTITIES; constructor(table: TABLE, entities?: ENTITIES); } export interface TableSendableAction
extends TableAction
{ [$sentArgs](): any[]; send(documentClientOptions?: DocumentClientOptions): Promise; }