UNPKG

ravendb

Version:
46 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteCertificateOperation = void 0; const index_js_1 = require("../../../Exceptions/index.js"); const RavenCommand_js_1 = require("../../../Http/RavenCommand.js"); const RaftIdGenerator_js_1 = require("../../../Utility/RaftIdGenerator.js"); class DeleteCertificateOperation { _thumbprint; constructor(thumbprint) { if (!thumbprint) { (0, index_js_1.throwError)("InvalidArgumentException", "Thumbprint cannot be null."); } this._thumbprint = thumbprint; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new DeleteCertificateCommand(this._thumbprint); } } exports.DeleteCertificateOperation = DeleteCertificateOperation; class DeleteCertificateCommand extends RavenCommand_js_1.RavenCommand { _thumbprint; constructor(thumbprint) { super(); if (!thumbprint) { (0, index_js_1.throwError)("InvalidArgumentException", "Thumbprint cannot be null"); } this._thumbprint = thumbprint; } get isReadRequest() { return false; } createRequest(node) { const uri = node.url + "/admin/certificates?thumbprint=" + encodeURIComponent(this._thumbprint); return { uri, method: "DELETE" }; } getRaftUniqueRequestId() { return RaftIdGenerator_js_1.RaftIdGenerator.newId(); } } //# sourceMappingURL=DeleteCertificateOperation.js.map