import { OrchestrationContext } from "../task/context/orchestration-context"; import * as pb from "../proto/orchestrator_service_pb"; import { CompletableTask } from "../task/completable-task"; import { TActivity } from "../types/activity.type"; import { TOrchestrator } from "../types/orchestrator.type"; import { Task } from "../task/task"; export declare class RuntimeOrchestrationContext extends OrchestrationContext { _generator?: Generator, any, any>; _previousTask?: Task; _isReplaying: boolean; _isComplete: boolean; _result: any; _pendingActions: Record; _pendingTasks: Record>; _sequenceNumber: any; _currentUtcDatetime: any; _instanceId: string; _completionStatus?: pb.OrchestrationStatus; _receivedEvents: Record; _pendingEvents: Record[]>; _newInput?: any; _saveEvents: any; _customStatus: string; constructor(instanceId: string); get instanceId(): string; get currentUtcDateTime(): Date; get isReplaying(): boolean; /** * This is the main entry point for the orchestrator. It will run the generator * and return the first task to be executed. It is typically executed from the * orchestrator executor. * * @param generator */ run(generator: Generator, any, any>): Promise; resume(): Promise; setComplete(result: any, status: pb.OrchestrationStatus, isResultEncoded?: boolean): void; setFailed(e: Error): void; setContinuedAsNew(newInput: any, saveEvents: boolean): void; getActions(): pb.OrchestratorAction[]; nextSequenceNumber(): number; /** * Create a timer * * @param fireAt number Amount of seconds between now and when the timer should fire * @param fireAt Date The date when the timer should fire * @returns */ createTimer(fireAt: number | Date): Task; callActivity(activity: TActivity | string, input?: TInput | undefined): Task; callSubOrchestrator(orchestrator: TOrchestrator | string, input?: TInput | undefined, instanceId?: string | undefined): Task; waitForExternalEvent(name: string): Task; /** * Orchestrations can be continued as new. This API allows an orchestration to restart itself from scratch, optionally with a new input. */ continueAsNew(newInput: any, saveEvents?: boolean): void; setCustomStatus(status: string): void; }