import { Table } from './Table'; import { Index } from './TableIndex'; /** * Attribute names of the primary key for tables and indexes. */ export interface KeyName { /** * Partition key name. */ pk?: string; /** * Sort key name. */ sk?: string; } /** * Validate the key attributes for a {@link Table}. * @param ATTRIBUTES - The interface or type that has all required attributes, including table and index * primary key and all defined index projected attributes. * @param keyAttributes - Key attributes of the Table. * @param name - Name of Table. * @param onError - Method to call when there is a validation error. */ export declare function validateKeyAttributes(keyAttributes: Table.PrimaryKey.AttributeTypesMapT, name: string, onError: (msg: string) => void): void; /** * Validate the key schema for a {@link Table}. * @param KEY - The interface of the table's primary key * @param ATTRIBUTES - The interface or type that has all required attributes, including table and index * primary key and all defined index projected attributes. * @param keySchema - Key schema of the Table. * @param keyAttributes - Key attributes of the Table. * @param name - Name of the Table. * @param onError - Method to call when there is a validation error. */ export declare function validateKeySchema(keySchema: Table.PrimaryKey.KeyTypesMapT, keyAttributes: Table.PrimaryKey.AttributeTypesMapT, name: string, onError: (msg: string) => void): KeyName; /** * Validates an {@link Index} for a {@link Table}. * @param index - An index for a Table. * @param names - Name of the other indexes. * @public */ export declare function validateIndex(index: Index, names?: Set): void; /** * Validates an array of {@link Index} for a {@link Table}. * @param indexes - Indexes for a Table. * @public */ export declare function validateIndexes(indexes: Index[]): void; /** * Validates that a {@link Table} is configured correctly. The Table's onError methods is called for any * validation errors. This method should primarily be used in tests to validate the table. * @param KEY - The interface of the table's primary key. * @param ATTRIBUTES - The interface or type that has all required attributes, including table and index primary * key and all defined index projected attributes. * @param table - Table to be validated. * @public */ export declare function validateTable(table: Table.TableT): void;