import { ZosmfRestClient , nozOSMFVersion } from "@zowe/core-for-zowe-sdk" ; import { AbstractSession } from "@zowe/imperative" ; import { ProvisioningValidator } from "./ProvisioningValidator" ; import { ProvisioningConstants } from "./ProvisioningConstants" ; import { IPublishedTemplates } from "./doc/zosmf/IPublishedTemplates" ; export class export class ListCatalogTemplates { param { AbstractSession } session param { string } zOSMFVersion returns { Promise < IPublishedTemplates > } see { IPublishedTemplates } memberof public static async listCatalogCommon ( session , zOSMFVersion ) { ProvisioningValidator . validateSession ( session ) ; ProvisioningValidator . validateNotEmptyString ( zOSMFVersion , nozOSMFVersion . message ) ; let listTemplatesResources = `${ ProvisioningConstants . RESOURCE }/${ zOSMFVersion }` ; listTemplatesResources += `/${ ProvisioningConstants . TEMPLATES_RESOURCES }/` ; return ZosmfRestClient . getExpectJSON < IPublishedTemplates > ( session , listTemplatesResources ) ; } }