import * as pb from "../proto/orchestrator_service_pb"; import { Registry } from "./registry"; import { VersioningOptions } from "./versioning-options"; /** * Filter for orchestration work items. */ export interface OrchestrationWorkItemFilter { /** The name of the orchestration to filter for. */ name: string; /** The versions of the orchestration to filter for. Empty array matches all versions. */ versions?: string[]; } /** * Filter for activity work items. */ export interface ActivityWorkItemFilter { /** The name of the activity to filter for. */ name: string; /** The versions of the activity to filter for. Empty array matches all versions. */ versions?: string[]; } /** * Filter for entity work items. */ export interface EntityWorkItemFilter { /** The name of the entity to filter for. */ name: string; } /** * Work item filters that control which work items a worker receives from the sidecar. * When provided, the sidecar will only send work items matching these filters. * By default, filters are auto-generated from the registered orchestrations, activities, * and entities in the worker's registry. */ export interface WorkItemFilters { /** Orchestration filters. Only orchestrations matching these filters will be dispatched to this worker. */ orchestrations?: OrchestrationWorkItemFilter[]; /** Activity filters. Only activities matching these filters will be dispatched to this worker. */ activities?: ActivityWorkItemFilter[]; /** Entity filters. Only entities matching these filters will be dispatched to this worker. */ entities?: EntityWorkItemFilter[]; } /** * Generates work item filters from the worker's registry and versioning options. * This mirrors the .NET SDK's `FromDurableTaskRegistry` method. * * @param registry - The registry containing registered orchestrations, activities, and entities. * @param versioning - Optional versioning options for the worker. * @returns Work item filters generated from the registry. */ export declare function generateWorkItemFiltersFromRegistry(registry: Registry, versioning?: VersioningOptions): WorkItemFilters; /** * Converts SDK work item filters to the protobuf WorkItemFilters message. * * @param filters - The SDK work item filters to convert. * @returns The protobuf WorkItemFilters message. */ export declare function toGrpcWorkItemFilters(filters: WorkItemFilters): pb.WorkItemFilters;