"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const operators_1 = require("rxjs/operators");
const logger_1 = require("../../../logger/logger");
const mapper_1 = require("../../../mapper");
const write_request_1 = require("../write.request");
class DeleteRequest extends write_request_1.WriteRequest {
    constructor(dynamoRx, modelClazz, partitionKey, sortKey) {
        super(dynamoRx, modelClazz);
        this.logger = logger_1.createLogger('dynamo.request.DeleteRequest', modelClazz);
        this.params.Key = mapper_1.createKeyAttributes(this.metadata, partitionKey, sortKey);
    }
    execFullResponse() {
        this.logger.debug('request', this.params);
        return this.dynamoRx.deleteItem(this.params).pipe(operators_1.tap(response => this.logger.debug('response', response)));
    }
}
exports.DeleteRequest = DeleteRequest;
//# sourceMappingURL=delete.request.js.map