import { AbstractSession , ImperativeExpect } from "@zowe/imperative" ; import { posix } from "path" ; import { ZosmfConstants } from "./constants/Zosmf.constants" ; import { ZosmfMessages } from "./constants/Zosmf.messages" ; import { ZosmfRestClient } from "@zowe/core-for-zowe-sdk" ; import { IZosmfListDefinedSystemsResponse } from "./doc/IZosmfListDefinedSystemsResponse" ; /**
 * This class is used to list the systems defined to z/OSMF throgh the
 * z/OSMF APIs.
 */ export class ListDefinedSystems { param { AbstractSession } session returns { promise < IZosmfListDefinedSystemsResponse > } throws public static async listDefinedSystems ( session ) { const endpoint = posix . join ( ZosmfConstants . RESOURCE , ZosmfConstants . TOPOLOGY , ZosmfConstants . SYSTEMS ) ; ImperativeExpect . toNotBeNullOrUndefined ( session , ZosmfMessages . missingSession . message ) ; return ZosmfRestClient . getExpectJSON < IZosmfListDefinedSystemsResponse > ( session , endpoint ) ; } }