UNPKG

@mos-connection/helper

Version:

Helper functions for the MOS-connection library

23 lines 983 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MosItemReplace = void 0; const MosMessage_1 = require("../MosMessage"); const XMLBuilder = require("xmlbuilder"); const xmlConversion_1 = require("../profile2/xmlConversion"); const Utils_1 = require("../../utils/Utils"); class MosItemReplace extends MosMessage_1.MosMessage { constructor(options, strict) { super('upper', strict); this.options = options; } get messageXMLBlocks() { const item = this.options.item; const root = XMLBuilder.create('mosItemReplace'); (0, Utils_1.addTextElementInternal)(root, 'roID', this.options.roID, undefined, this.strict); (0, Utils_1.addTextElementInternal)(root, 'storyID', this.options.storyID, undefined, this.strict); xmlConversion_1.XMLMosItem.toXML(root, item, this.strict); return root; } } exports.MosItemReplace = MosItemReplace; //# sourceMappingURL=mosItemReplace.js.map