|
|
@ -7,6 +7,10 @@ import {ResponseInterface} from "./responses/response"; |
|
|
|
import {CommandResponseInterface} from "./responses/comamnds"; |
|
|
|
import {CommandResponseInterface} from "./responses/comamnds"; |
|
|
|
import commandsSchema from "./schemas/commands"; |
|
|
|
import commandsSchema from "./schemas/commands"; |
|
|
|
import runCommandsSchema from "./schemas/run-commands"; |
|
|
|
import runCommandsSchema from "./schemas/run-commands"; |
|
|
|
|
|
|
|
import {RepeatProcessRequest} from "./requests/repeat-process"; |
|
|
|
|
|
|
|
import repeatProcessSchema from "./schemas/repeat-process"; |
|
|
|
|
|
|
|
import processOutputSchema from "./schemas/process-output"; |
|
|
|
|
|
|
|
import {ProcessOutputRequest} from "./requests/process-ouput"; |
|
|
|
|
|
|
|
|
|
|
|
export class SMClient { |
|
|
|
export class SMClient { |
|
|
|
schemaClient: SchemaClient |
|
|
|
schemaClient: SchemaClient |
|
|
@ -40,7 +44,23 @@ export class SMClient { |
|
|
|
headers: headers |
|
|
|
headers: headers |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async repeatProcess(data: RepeatProcessRequest): Promise<ResponseInterface> { |
|
|
|
|
|
|
|
let { responseData, headers } = await this.schemaClient.send(repeatProcessSchema, data) |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
data: responseData as ProcessesResponseInterface[], |
|
|
|
|
|
|
|
headers: headers |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async getProcessOutput(data: ProcessOutputRequest): Promise<ResponseInterface> { |
|
|
|
|
|
|
|
let { responseData, headers } = await this.schemaClient.send(processOutputSchema, data) |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
data: responseData, |
|
|
|
|
|
|
|
headers: headers |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export let smClient = new SMClient |
|
|
|
export let smClient = new SMClient |
|
|
|
export default smClient |
|
|
|
export default smClient |
|
|
|