import { PartitionAndSortKey } from "../keys" import { TaggedModel } from "../types" import { BaseParams } from "./BaseParams" export interface DeleteItemParams extends BaseParams { key: PartitionAndSortKey } export async function deleteItem(params: DeleteItemParams): Promise { const { table, client, key } = params await client .delete({ TableName: table.tableName, Key: { [table.partitionKeyName]: key.partitionKey, [table.sortKeyName]: key.sortKey } }) .promise() }