import { aws_dynamodb } from "aws-cdk-lib"; import { FormatObject, JsonFormat } from "typesafe-dynamodb/lib/json-format"; import { TableKey } from "typesafe-dynamodb/lib/key"; import { Narrow } from "typesafe-dynamodb/lib/narrow"; import { ITable } from "./table"; import { AttributeKeyToObject } from "./util"; /** * */ export interface BatchGetItemInput, Format extends JsonFormat = JsonFormat.Document> { Keys: Keys[]; } export interface BatchGetItemOutput, Format extends JsonFormat> extends Omit { Items?: FormatObject, Format>[]; } /** * The signature of the {@link BatchGetItem} API. * * @param request the input {@link BatchGetItemInput} request payload * @returns a {@link BatchGetItemOutput} response Promise * @tparam {@link Item} - the type of data in the DynamoDB Table * @tparam {@link PartitionKey} - the name of the Partition Key field * @tparam {@link RangeKey} - the name of the Range Key field if specified, otherwise undefined * @tparam {@link Format} - the data format of the values ({@link JsonFormat.AttributeValue} or {@link JsonFormat.Document}) */ export declare type BatchGetItem = >(request: BatchGetItemInput) => Promise>; /** * Creates an Integration for the BatchGetItem DynamoDB API. * * @param table DynamoDB Table the integration will interact with * @param format the data format of the values ({@link JsonFormat.AttributeValue} or {@link JsonFormat.Document}) * @tparam {@link Item} - the type of data in the DynamoDB Table * @tparam {@link PartitionKey} - the name of the Partition Key field * @tparam {@link RangeKey} - the name of the Range Key field if specified, otherwise undefined * @tparam {@link Format} - the data format of the values ({@link JsonFormat.AttributeValue} or {@link JsonFormat.Document}) */ export declare function createBatchGetItemIntegration(table: aws_dynamodb.ITable, format: Format): BatchGetItem; /** * @see https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html#aws-appsync-resolver-mapping-template-reference-dynamodb-getitem * * @tparam {@link Item} - the type of data in the DynamoDB Table * @tparam {@link PartitionKey} - the name of the Partition Key field * @tparam {@link RangeKey} - the name of the Range Key field if specified, otherwise undefined * @tparam {@link Format} - the data format of the values ({@link JsonFormat.AttributeValue} or {@link JsonFormat.Document}) */ export declare type BatchGetItemAppsync = >(input: { keys: Key[]; consistentRead?: boolean; }) => Promise<{ items: Narrow, JsonFormat.Document>[]; unprocessedKeys: Key[]; }>; /** * Creates an Integration for the BatchGetItem DynamoDB API within an AWS Appsync Resolver. * * @param table DynamoDB Table the integration will interact with. * @tparam {@link Item} - the type of data in the DynamoDB Table * @tparam {@link PartitionKey} - the name of the Partition Key field * @tparam {@link RangeKey} - the name of the Range Key field if specified, otherwise undefined */ export declare function createBatchGetItemAppsyncIntegration(table: ITable): BatchGetItemAppsync; //# sourceMappingURL=batch-get-item.d.ts.map