import type { BatchGetCommandInput, BatchGetCommandOutput, DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'; import type { FormattedItem } from '../../../entity/index.js'; import type { CapacityOption } from '../../../options/capacity.js'; import type { Paths } from '../../../schema/index.js'; import type { DocumentClientOptions } from '../../../types/documentClientOptions.js'; import { BatchGetCommand } from './batchGetCommand.js'; import type { BatchGetCommandOptions, IBatchGetRequest } from './batchGetCommand.js'; import { $options, $requests } from './constants.js'; export interface ExecuteBatchGetOptions extends DocumentClientOptions { capacity?: CapacityOption; documentClient?: DynamoDBDocumentClient; maxAttempts?: number; } export type ExecuteBatchGetInput = BatchGetCommand[] | [ExecuteBatchGetOptions, ...BatchGetCommand[]]; type ExecuteBatchGet = (..._commands: COMMANDS) => Promise>; export type ExecuteBatchGetResponses = COMMANDS extends BatchGetCommand[] ? ExecuteBatchGetResponse : COMMANDS extends [ExecuteBatchGetOptions, ...infer REQUESTS_TAIL] ? REQUESTS_TAIL extends BatchGetCommand[] ? ExecuteBatchGetResponse : never : never; type ExecuteBatchGetResponse = Omit & { Responses: BatchGetResponses; }; type BatchGetResponses = COMMANDS extends [infer COMMANDS_HEAD, ...infer COMMANDS_TAILS] ? COMMANDS_HEAD extends BatchGetCommand ? COMMANDS_TAILS extends BatchGetCommand[] ? BatchGetResponses, COMMANDS_HEAD[$options]> ]> : never : never : number extends COMMANDS['length'] ? [ ...RESPONSES, ...(COMMANDS[number] extends infer TABLE_COMMAND ? TABLE_COMMAND extends BatchGetCommand ? BatchGetRequestResponses, TABLE_COMMAND[$options]> : never : never)[] ] : RESPONSES; type BatchGetRequestResponses = REQUESTS extends [infer REQUESTS_HEAD, ...infer REQUESTS_TAIL] ? REQUESTS_HEAD extends IBatchGetRequest ? REQUESTS_TAIL extends IBatchGetRequest[] ? BatchGetRequestResponses> : undefined; }> | undefined) ]> : never : never : number extends REQUESTS['length'] ? [ ...ITEMS, ...((REQUESTS[number] extends infer ENTITY_REQUEST ? ENTITY_REQUEST extends IBatchGetRequest ? FormattedItem[]; } ? OPTIONS['attributes'][number] : undefined; }> : never : never) | undefined)[] ] : ITEMS; export declare const execute: ExecuteBatchGet; export declare const getCommandInput: (commands: BatchGetCommand[], options?: ExecuteBatchGetOptions) => BatchGetCommandInput; export {};