import { ZosmfRestClient , nozOSMFVersion } from "@zowe/core-for-zowe-sdk" ; import { WorkflowValidator } from "./WorkflowValidator" ; import { AbstractSession , Headers } from "@zowe/imperative" ; import { WorkflowConstants } from "./WorkflowConstants" ; import { IArchivedWorkflows } from "./doc/IArchivedWorkflows" ; export class ListArchivedWorkflows { public static async listArchivedWorkflows ( session , zOSMFVersion = WorkflowConstants . ZOSMF_VERSION ) { WorkflowValidator . validateSession ( session ) ; WorkflowValidator . validateNotEmptyString ( zOSMFVersion , nozOSMFVersion . message ) ; const resourcesQuery = `${ WorkflowConstants . RESOURCE }/${ zOSMFVersion }/${ WorkflowConstants . ARCH_WORKFLOW_RESOURCE }` ; return ZosmfRestClient . getExpectJSON ( session , resourcesQuery , [ Headers . APPLICATION_JSON ] ) ; } }