import { BaseConfig, BaseResult, BaseCommand } from './index.js'; import { DynamoEntity } from '../core/entity.js'; import { ObjectLikeZodType, EntitySchema } from '../core/index.js'; import { Projection } from '../projections/index.js'; /** * Configuration for the BatchProjectedGet command. * * @template Schema - The Zod schema defining the structure of the entity. * @template ProjectionSchema - The Zod schema defining the structure of the projected attributes. */ type BatchProjectedGetConfig = BaseConfig & { keys: Array>>; consistent?: boolean; projection: Projection; projectionSchema: ProjectionSchema; }; /** * Result of the BatchProjectedGet command. * * @template ProjectionSchema - The Zod schema defining the structure of the projected attributes. */ type BatchProjectedGetResult = BaseResult & { items: Array>; unprocessedKeys?: Array>>; }; /** * Command to retrieve specific attributes of multiple items by primary keys in a single operation. * * @template Schema - The Zod schema defining the structure of the entity. * @template ProjectionSchema - The Zod schema defining the structure of the projected attributes. * * @example * ```typescript * import { DynamoTable, DynamoEntity, key, BatchProjectedGet } from 'dynamo-document-builder'; * * const table = new DynamoTable({ * tableName: 'ExampleTable', * documentClient, * }); * * const userEntity = new DynamoEntity({ * table, * schema: z.object({ * userId: z.string(), * name: z.string(), * email: z.string(), * age: z.number(), * }), * partitionKey: user => key('USER', user.userId), * sortKey: () => 'METADATA', * }); * * const batchProjectedGetCommand = new BatchProjectedGet({ * keys: [ * { userId: 'user1' }, * { userId: 'user2' }, * ], * projection: ['name', 'email'], * projectionSchema: z.object({ * name: z.string(), * email: z.string(), * }), * }); * * const { items } = await userEntity.send(batchProjectedGetCommand); * ``` */ declare class BatchProjectedGet implements BaseCommand, Schema> { #private; constructor(config: BatchProjectedGetConfig); execute(entity: DynamoEntity): Promise>; } export { BatchProjectedGet }; export type { BatchProjectedGetConfig, BatchProjectedGetResult };