UNPKG

@zowe/cics-for-zowe-sdk

Version:
30 lines 1.31 kB
"use strict"; /** * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getCache = void 0; const imperative_1 = require("@zowe/imperative"); const rest_1 = require("../../rest"); const utils_1 = require("../../utils"); async function getCache(session, parms, requestOptions, headers = []) { imperative_1.ImperativeExpect.toBeDefinedAndNonBlank(parms.cacheToken, "CICS Result Cache Token", "CICS Result Cache Token is required"); imperative_1.Logger.getAppLogger().debug("Attempting to get cache with the following parameters:\n%s", JSON.stringify(parms)); const options = { count: parms.count, startIndex: parms.startIndex, summonly: parms.summonly, nodiscard: parms.nodiscard, }; const cmciResource = utils_1.Utils.getCacheUri(parms.cacheToken, options); return rest_1.CicsCmciRestClient.getExpectParsedXml(session, cmciResource, headers, requestOptions); } exports.getCache = getCache; //# sourceMappingURL=Cache.js.map