import type { DynamoDBDocumentClient, TransactGetCommandInput, TransactGetCommandOutput } from '@aws-sdk/lib-dynamodb'; import type { EntityPaths } from '../../../entity/actions/parsePaths/index.js'; import type { FormattedItem } from '../../../entity/index.js'; import type { CapacityOption } from '../../../options/capacity.js'; import type { DocumentClientOptions } from '../../../types/documentClientOptions.js'; import { $options } from './getTransaction/constants.js'; import { GetTransaction } from './getTransaction/getTransaction.js'; type GetTransactionProps = Pick; export interface ExecuteTransactGetOptions extends DocumentClientOptions { documentClient?: DynamoDBDocumentClient; capacity?: CapacityOption; } export type ExecuteTransactGetInput = GetTransactionProps[] | [ExecuteTransactGetOptions, ...GetTransactionProps[]]; type ExecuteTransactGet = (..._transactions: TRANSACTIONS) => Promise>; export type ExecuteTransactGetResponses = TRANSACTIONS extends GetTransactionProps[] ? ExecuteTransactGetResponse : TRANSACTIONS extends [ExecuteTransactGetOptions, ...infer TRANSACTIONS_TAIL] ? TRANSACTIONS_TAIL extends GetTransactionProps[] ? ExecuteTransactGetResponse : never : never; type ExecuteTransactGetResponse = Omit & { Responses?: TransactGetResponses; }; type TransactGetResponses = TRANSACTIONS extends [infer TRANSACTIONS_HEAD, ...infer TRANSACTIONS_TAIL] ? TRANSACTIONS_HEAD extends GetTransactionProps ? TRANSACTIONS_TAIL extends GetTransactionProps[] ? TransactGetResponses ]> : never : never : number extends TRANSACTIONS['length'] ? [ ...RESPONSES, ...(TRANSACTIONS[number] extends infer TRANSACTION ? TRANSACTION extends GetTransactionProps ? TransactGetResponse : never : never)[] ] : RESPONSES extends [] ? (FormattedItem | undefined)[] : RESPONSES; type TransactGetResponse = { Item?: TRANSACTION[$options]['attributes'] extends EntityPaths[] ? FormattedItem : FormattedItem; }; type TransactGetResponseFormatter = (responses: NonNullable, ...transactions: TRANSACTIONS) => TransactGetResponses | undefined; export declare const formatResponses: TransactGetResponseFormatter; export declare const execute: ExecuteTransactGet; export declare const getCommandInput: (transactions: GetTransactionProps[], options?: ExecuteTransactGetOptions) => TransactGetCommandInput; export {};