import type { WorkflowOptions, CronOptions } from '../types.js'; /** * @Workflow() class decorator — marks a class as a durable workflow. * * Usage: * ```typescript * @Workflow({ taskQueue: 'my-queue' }) * class MyWorkflow { * @Run() * async execute(input: MyInput): Promise { ... } * } * ``` */ export declare function Workflow(options: WorkflowOptions): any>(target: T, context?: ClassDecoratorContext) => T; /** * @Run() method decorator — marks the workflow entry point method. * * Each workflow class must have exactly one @Run() method. * This method receives the workflow input and returns the workflow output. */ export declare function Run(): (target: any, propertyKeyOrContext: string | ClassMethodDecoratorContext, descriptor?: PropertyDescriptor) => void; /** * @Signal(name) method decorator — registers a signal handler. * * Signal handlers are invoked when an external signal is sent to the workflow. */ export declare function Signal(signalName: string): (target: any, propertyKeyOrContext: string | ClassMethodDecoratorContext, descriptor?: PropertyDescriptor) => void; /** * @Query(name) method decorator — registers a query handler. * * Query handlers return read-only state without modifying the workflow. */ export declare function Query(queryName: string): (target: any, propertyKeyOrContext: string | ClassMethodDecoratorContext, descriptor?: PropertyDescriptor) => void; /** * @Cron(cronExpr, options?) class decorator (P6.4) — registers a workflow to * run on a cron schedule. The schedule itself is durable server-side state * (a `schedules` row); this decorator only attaches the metadata the SDK * needs to upsert it. Actual registration happens when a `Worker` for this * workflow's task queue starts (`Worker.run()` calls `registerSchedules()`), * or explicitly via `WorkflowClient.upsertSchedule()`. * * Usage: * ```typescript * @Workflow({ taskQueue: 'reports' }) * @Cron('0 0 * * *') // once a day at midnight (standard 5-field cron) * class DailyReportWorkflow { * @Run() * async execute(input: ReportInput): Promise { ... } * } * ``` */ export declare function Cron(cronExpr: string, options?: Omit): any>(target: T, context?: ClassDecoratorContext) => T;