Prometheus Entity Management API
    Preparing search index...

    Interface for task storage providers. Implementations SHOULD use context.tenant (when present) and the authenticated caller's identity to scope data access so that each authenticated client only sees its own tasks.

    The built-in InMemoryTaskStore uses an OwnerResolver (defaulting to resolveUserScope) to derive the owner from context.user.

    interface TaskStore {
        list(
            params: ListTasksRequest,
            context: ServerCallContext,
        ): Promise<ListTasksResponse>;
        load(taskId: string, context: ServerCallContext): Promise<Task | undefined>;
        save(task: Task, context: ServerCallContext): Promise<void>;
    }

    Implemented by

    Index
    • Lists tasks visible to the authenticated caller, with filtering and pagination.

      Parameters

      • params: ListTasksRequest

        Filtering and pagination parameters.

      • context: ServerCallContext

        The context of the current call. Use context.tenant for tenant-scoped listing and context.user for owner scoping.

      Returns Promise<ListTasksResponse>

    • Loads a task by ID, or undefined if not found / not accessible.

      Parameters

      • taskId: string

        The ID of the task to load.

      • context: ServerCallContext

        The context of the current call. Use context.tenant for tenant-scoped lookups and context.user for owner scoping.

      Returns Promise<Task | undefined>

    • Saves a task, overwriting any existing entry with the same ID.

      Parameters

      • task: Task

        The task to save.

      • context: ServerCallContext

        The context of the current call. Use context.tenant for tenant-scoped storage and context.user for owner scoping.

      Returns Promise<void>