import Base, { MaybeRaw } from "../../../../Base"; import { DebugCommand } from "../../../../interfaces/high5"; import { High5ExecutionPackage, High5ExecutionPatch, High5ExecutionRequest, High5ExecutionResponse } from "../../../../interfaces/high5/space/execution"; import { High5SpaceExecutionLogs } from "./log/index"; import { High5SpaceExecutionStates } from "./status/index"; export declare class High5SpaceExecute extends Base { get high5ExecutionLogs(): High5SpaceExecutionLogs; private _high5ExecutionLogs?; get high5ExecutionStates(): High5SpaceExecutionStates; private _high5ExecutionStates?; /** * executeStream executes a single stream by its ID and an execution request * @param orgName the organizations's name * @param spaceName the spaces's name * @param streamId to identify the stream * @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout * @param design if true the stream will execute the current design rather than the published design build * @param debug if true the stream will execute in debug mode and consider breakpoints * @param overrideUserAgent if true the User-Agent header will be overwritten with "hcloud-stream" to identify this execution got triggered from within a stream with the TriggerStreamAction node * @returns the stream result */ executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean, debug?: boolean, overrideUserAgent?: boolean, raw?: { raw: R; }): Promise>; /** * Executes all streams within an event. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param eventName Name of the Event * @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run * @returns Array of stream results */ executeHigh5Event(orgName: string, spaceName: string, eventName: string, high5EventExecutionRequest: High5ExecutionRequest, raw?: { raw: R; }): Promise>; /** * Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param streamId ID of the Stream * @param secret Secret of the Stream execution object * @param hash (Optional) SHA-256 hash of the cached design to prevent redundant downloads * @returns StreamExecutionPackage */ getStreamExecutionPackage(orgName: string, spaceName: string, streamId: string, secret: string, hash?: string, raw?: { raw: R; }): Promise>; /** * Publishes the stream status and logs to high5 * @param orgName the organizations's name * @param spaceName the spaces's name * @param streamId the id of the stream * @param secret the secret of the stream execution object * @param streamResult the result of the stream * @returns StreamLog */ high5ExecutionStatusAndLogResponse(orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch, raw?: { raw: R; }): Promise>; /** * Issue debug command to a stopped execution running in debug mode. * If the agent that is handling this execution does not acknowledge * the debug command after a certain timeframe, a timeout error will * be thrown. * * Only the user that triggered the execution can send debug commands. * * @param orgName Name of the organization * @param spaceName Name of the space * @param executionId ID of the execution. Obtained from High5ExecutionResponse * @param command DebugCommand to send */ issueDebugCommand(orgName: string, spaceName: string, executionId: string, command: DebugCommand, raw?: { raw: R; }): Promise>; /** * Log an execution crash to High5 * * Useful when regular logging is not possible. * * @param orgName the organizations's name * @param spaceName the spaces's name * @param streamId the id of the stream * @param secret the secret of the stream execution object * @param message crash log */ logExecutionCrash(orgName: string, spaceName: string, secret: string, message?: string, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }