UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

34 lines (33 loc) 2.53 kB
import type { BatchWriteCommandOutput, QueryCommandInput, QueryCommandOutput } from '@aws-sdk/lib-dynamodb'; import type { NativeAttributeValue } from '@aws-sdk/util-dynamodb'; import type { Entity } from '../../../entity/index.js'; import { QueryCommand } from '../../../table/actions/query/index.js'; import type { Query } from '../../../table/actions/query/index.js'; import { $sentArgs } from '../../../table/constants.js'; import { TableAction } from '../../../table/index.js'; import type { Table, TableSendableAction } from '../../../table/table.js'; import type { DocumentClientOptions } from '../../../types/documentClientOptions.js'; import type { Merge } from '../../../types/merge.js'; import { $options, $query } from './constants.js'; import type { DeletePartitionOptions } from './options.js'; export type DeletePartitionResponse = Merge<Omit<QueryCommandOutput, 'Items' | '$metadata' | 'ConsumedCapacity'>, { QueryConsumedCapacity?: QueryCommandOutput['ConsumedCapacity']; BatchWriteConsumedCapacity?: BatchWriteCommandOutput['ConsumedCapacity']; }>; export declare class DeletePartitionCommand<TABLE extends Table = Table, ENTITIES extends Entity[] = Entity[], QUERY extends Query<TABLE> = Query<TABLE>> extends TableAction<TABLE, ENTITIES> implements TableSendableAction<TABLE> { static actionName: "deletePartition"; [$query]?: QUERY; [$options]: DeletePartitionOptions<TABLE, ENTITIES, QUERY>; constructor(table: TABLE, entities?: ENTITIES, query?: QUERY, options?: DeletePartitionOptions<TABLE, ENTITIES, QUERY>); entities<NEXT_ENTITIES extends Entity[]>(...nextEntities: NEXT_ENTITIES): DeletePartitionCommand<TABLE, NEXT_ENTITIES, QUERY>; query<NEXT_QUERY extends Query<TABLE>>(nextQuery: NEXT_QUERY): DeletePartitionCommand<TABLE, ENTITIES, NEXT_QUERY>; options(nextOptions: DeletePartitionOptions<TABLE, ENTITIES, QUERY> | ((prevOptions: DeletePartitionOptions<TABLE, ENTITIES, QUERY>) => DeletePartitionOptions<TABLE, ENTITIES, QUERY>)): DeletePartitionCommand<TABLE, ENTITIES, QUERY>; [$sentArgs](): [Entity[], Query<TABLE>, DeletePartitionOptions<TABLE, Entity[], Query<TABLE>>]; queryCommand({ exclusiveStartKey }?: { exclusiveStartKey?: Record<string, NativeAttributeValue> | undefined; }): QueryCommand<TABLE, ENTITIES, QUERY, DeletePartitionOptions<TABLE, ENTITIES, QUERY> & { attributes: undefined; }>; params(): QueryCommandInput; send(documentClientOptions?: DocumentClientOptions): Promise<DeletePartitionResponse>; }