UNPKG

ravendb

Version:
32 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteAttachmentCommandData = void 0; const StringUtil_js_1 = require("../../../Utility/StringUtil.js"); const index_js_1 = require("../../../Exceptions/index.js"); class DeleteAttachmentCommandData { id; name; changeVector; type = "AttachmentDELETE"; constructor(documentId, name, changeVector) { if (StringUtil_js_1.StringUtil.isNullOrWhitespace(documentId)) { (0, index_js_1.throwError)("InvalidArgumentException", "DocumentId cannot be null"); } if (StringUtil_js_1.StringUtil.isNullOrWhitespace(name)) { (0, index_js_1.throwError)("InvalidArgumentException", "Name cannot be null"); } this.id = documentId; this.name = name; this.changeVector = changeVector; } serialize(conventions) { return { Id: this.id, Name: this.name, ChangeVector: this.changeVector, Type: "AttachmentDELETE" }; } } exports.DeleteAttachmentCommandData = DeleteAttachmentCommandData; //# sourceMappingURL=DeleteAttachmentCommandData.js.map