import type { ObjectId } from '@dxos/echo-schema'; import type { EdgeHttpClient } from '@dxos/edge-client'; import type { SpaceId } from '@dxos/keys'; import type { QueryResult, QueueQuery } from '@dxos/protocols'; /** * Service for managing queues. */ export interface QueueService { queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise; insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise; deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise; } /** * Backed by Edge. */ export declare class QueueServiceImpl implements QueueService { private readonly _client; constructor(_client: EdgeHttpClient); queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise; insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise; deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise; } /** * Stub implementation for when Edge is not available. */ export declare class QueueServiceStub implements QueueService { queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise; insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise; deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise; } /** * Mock implementation for testing. */ export declare class MockQueueService implements QueueService { private _queues; queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise; insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise; deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise; } //# sourceMappingURL=queue-service.d.ts.map