module import * as DynamoDB from 'aws-sdk/clients/dynamodb' ; import { createLogger , Logger } from '../../../logger/logger' ; import { createKeyAttributes } from '../../../mapper/mapper' ; import { ModelConstructor } from '../../../model/model-constructor' ; import { DynamoDbWrapper } from '../../dynamo-db-wrapper' ; import { WriteRequest } from '../write.request' ; /**
 * Request class for the DeleteItem operation.
 */ export class DeleteRequest < T , T2 = void > extends WriteRequest < T , T2 , DynamoDB . DeleteItemInput , DynamoDB . DeleteItemOutput , DeleteRequest < T , T2 > > { protected readonly logger : Logger ; constructor ( dynamoDBWrapper , modelClazz , partitionKey , sortKey ? ) { super ( dynamoDBWrapper , modelClazz ) ; this . logger = createLogger ( 'dynamo.request.DeleteRequest' , modelClazz ) ; this . params . Key = createKeyAttributes ( this . metadata , partitionKey , sortKey ) ; } returnValues ( returnValues ) ; returnValues ( returnValues ) ; returnValues ( returnValues ) { this . params . ReturnValues = returnValues ; return < any > this ; } protected doRequest ( params ) { return this . dynamoDBWrapper . deleteItem ( params ) ; } }