import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb'; /** * Record type for DynamoDB attribute values */ type AttributeValues = Record; /** * Record type for DynamoDB attribute names */ type AttributeNames = Record; /** * Type representing DynamoDB attribute expression */ type DynamoAttributeExpression = { ExpressionAttributeValues?: AttributeValues | undefined; ExpressionAttributeNames?: AttributeNames | undefined; }; /** * Type representing a placeholder for an attribute expression value */ type AttributeValuePlaceholder = `:${string}`; /** * Type representing a placeholder for an attribute expression name */ type AttributeNamePlaceholder = `#${string}`; /** * Class to manage names and values for DynamoDB attribute expressions */ declare class AttributeExpressionMap { private attributeNames; private reverseLookupNames; private names; private attributeValues; private reverseLookupValues; private values; constructor(); /** * Adds an attribute name to the map and returns its placeholder * @param name - The attribute name to add * @returns The placeholder for the attribute name */ addName(name: string): AttributeNamePlaceholder; /** * Adds an attribute value to the map and returns its placeholder * @param value - The attribute value to add * @returns The placeholder for the attribute value */ addValue(value: NativeAttributeValue): AttributeValuePlaceholder; /** * Adds both an attribute name and value to the map and returns their placeholders * @param name - The attribute name to add * @param value - The attribute value to add * @returns A tuple containing the placeholders for the attribute name and value */ add(name: string, value: NativeAttributeValue): [AttributeNamePlaceholder, AttributeValuePlaceholder]; /** * Converts the attribute names to DynamoDB format */ toDynamoAttributeNames(): AttributeNames; /** * Converts the attribute values to DynamoDB format */ toDynamoAttributeValues(): AttributeValues; /** * Converts both attribute names and values to DynamoDB format */ toDynamoAttributeExpression(): DynamoAttributeExpression; /** * Checks if the map contains a specific attribute name */ hasName(name: string): boolean; /** * Checks if the map contains a specific attribute value */ hasValue(value: NativeAttributeValue): boolean; /** * Retrieves the placeholder for a given attribute name, or `undefined` if not found */ getPlaceholderFromName(name: string): AttributeNamePlaceholder | undefined; /** * Retrieves the placeholder for a given attribute value, or `undefined` if not found */ getPlaceholderFromValue(value: NativeAttributeValue): AttributeValuePlaceholder | undefined; /** * Retrieves the attribute name for a given placeholder, or `undefined` if not found */ getNameFromPlaceholder(placeholder: AttributeNamePlaceholder): string | undefined; /** * Retrieves the attribute value for a given placeholder, or `undefined` if not found */ getValueFromPlaceholder(placeholder: AttributeValuePlaceholder): NativeAttributeValue | undefined; /** * Gets the count of unique attribute names in the map */ getNameCount(): number; /** * Gets the count of unique attribute values in the map */ getValueCount(): number; } export { AttributeExpressionMap }; export type { AttributeNamePlaceholder, AttributeNames, AttributeValuePlaceholder, AttributeValues, DynamoAttributeExpression };