import 'abort-controller/polyfill';
import { Context, Info } from '@temporalio/activity';
import { ActivityFunction, LoadedDataConverter } from '@temporalio/common';
import { coresdk } from '@temporalio/proto';
import { ActivityExecuteInput, ActivityInboundCallsInterceptor, ActivityInterceptorsFactory, ActivityOutboundCallsInterceptor } from './interceptors';
import { Logger } from './logger';
export type CancelReason = keyof typeof coresdk.activity_task.ActivityCancelReason | 'WORKER_SHUTDOWN' | 'HEARTBEAT_DETAILS_CONVERSION_FAILED';
export declare class Activity {
    readonly info: Info;
    readonly fn: ActivityFunction<any[], any> | undefined;
    readonly dataConverter: LoadedDataConverter;
    readonly heartbeatCallback: Context['heartbeat'];
    protected cancelReason?: CancelReason;
    readonly context: Context;
    cancel: (reason: CancelReason) => void;
    readonly abortController: AbortController;
    readonly interceptors: {
        inbound: ActivityInboundCallsInterceptor[];
        outbound: ActivityOutboundCallsInterceptor[];
    };
    /**
     * Logger bound to `sdkComponent: worker`, with metadata from this activity.
     * This is the logger to use for all log messages emitted by the activity
     * worker. Note this is not exactly the same thing as the activity context
     * logger, which is bound to `sdkComponent: activity`.
     */
    private readonly workerLogger;
    constructor(info: Info, fn: ActivityFunction<any[], any> | undefined, dataConverter: LoadedDataConverter, heartbeatCallback: Context['heartbeat'], workerLogger: Logger, interceptors: ActivityInterceptorsFactory[]);
    protected getLogAttributes(): Record<string, unknown>;
    /**
     * Actually executes the function.
     *
     * Any call up to this function and including this one will be trimmed out of stack traces.
     */
    protected execute(fn: ActivityFunction<any[], any>, input: ActivityExecuteInput): Promise<unknown>;
    run(input: ActivityExecuteInput): Promise<coresdk.activity_result.IActivityExecutionResult>;
    runNoEncoding(fn: ActivityFunction<any[], any>, input: ActivityExecuteInput): Promise<unknown>;
}
/**
 * Returns a map of attributes to be set on log messages for a given Activity
 */
export declare function activityLogAttributes(info: Info): Record<string, unknown>;
