import ALS from 'alscontext'; type Context = { /** * Flags that the application has requested that the current message be * returned to the queue for retry. */ messageReturnedToQueue: boolean; }; /** * An internal context that tracks calls within handlers to .returnMessage() */ declare class MessageLifecycleContext extends ALS { /** * Fetch the message context for the current async stack */ get(): Context; /** * Set the message context for the current async stack */ set(message: Context): any; /** * Start and run a new async context */ run(context: Context, fn: () => T | Promise, isInHandlerContext?: boolean): T | Promise; /** * Check if the call stack is within a handler or workflow handler context */ get isInHandlerContext(): boolean; } export declare const messageLifecycleContext: MessageLifecycleContext; export {};