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 GetItemInput<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined, Key extends TableKey<Item, PartitionKey, RangeKey, Format>, Format extends JsonFormat = JsonFormat.Document> extends Omit<AWS.DynamoDB.GetItemInput, "Key" | "TableName"> {
    Key: Key;
}
export interface GetItemOutput<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined, Key extends TableKey<Item, PartitionKey, RangeKey, Format>, Format extends JsonFormat = JsonFormat.Document> extends Omit<AWS.DynamoDB.DocumentClient.GetItemOutput, "Item"> {
    Item?: FormatObject<Narrow<Item, Key, Format>, Format>;
}
export declare type GetItem<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined, Format extends JsonFormat> = <Key extends TableKey<Item, PartitionKey, RangeKey, Format>>(input: GetItemInput<Item, PartitionKey, RangeKey, Key, Format>) => Promise<GetItemOutput<Item, PartitionKey, RangeKey, Key, Format>>;
export declare function createGetItemIntegration<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined, Format extends JsonFormat>(table: aws_dynamodb.ITable, format: Format): GetItem<Item, PartitionKey, RangeKey, Format>;
/**
 * @see https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html#aws-appsync-resolver-mapping-template-reference-dynamodb-getitem
 */
export declare type GetItemAppsync<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined> = <Key extends TableKey<Item, PartitionKey, RangeKey, JsonFormat.AttributeValue>>(input: {
    key: Key;
    consistentRead?: boolean;
}) => Promise<Narrow<Item, AttributeKeyToObject<Key>, JsonFormat.Document>>;
export declare function createGetItemAppsyncIntegration<Item extends object, PartitionKey extends keyof Item, RangeKey extends keyof Item | undefined>(table: ITable<Item, PartitionKey, RangeKey>): GetItemAppsync<Item, PartitionKey, RangeKey>;
//# sourceMappingURL=get-item.d.ts.map