/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; import type { ITabularMigrationApplier } from "../migrations"; import type { AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, ITabularStorage, Page, PageRequest, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularEventListener, TabularEventName, TabularEventParameters, TabularSubscribeOptions } from "./ITabularStorage"; /** * Telemetry wrapper for any ITabularStorage implementation. * Creates spans for all storage operations. */ export declare class TelemetryTabularStorage, Entity = FromSchema, PrimaryKey = SimplifyPrimaryKey, InsertType = InsertEntity>> implements ITabularStorage { protected readonly storageName: string; protected readonly inner: ITabularStorage; constructor(storageName: string, inner: ITabularStorage); put(value: InsertType): Promise; putBulk(values: InsertType[]): Promise; get(key: PrimaryKey): Promise; delete(key: PrimaryKey | Entity): Promise; getAll(options?: QueryOptions): Promise; deleteAll(): Promise; size(): Promise; count(criteria?: SearchCriteria): Promise; deleteSearch(criteria: DeleteSearchCriteria): Promise; getOffsetPage(offset: number, limit: number): Promise; getBulk(keys: readonly PrimaryKey[]): Promise; getPage(request?: PageRequest): Promise>; queryPage(criteria: SearchCriteria, request?: PageRequest): Promise>; query(criteria: SearchCriteria, options?: QueryOptions): Promise; queryIndex(criteria: SearchCriteria, options: CoveringIndexQueryOptions): Promise[]>; records(pageSize?: number): AsyncGenerator; pages(pageSize?: number): AsyncGenerator; subscribeToChanges(callback: (change: TabularChangePayload) => void, options?: TabularSubscribeOptions): () => void; withTransaction(fn: (tx: this) => Promise): Promise; setupDatabase(): Promise; /** * Forwards to the inner storage's applier so callers that wrap a * migration-aware storage in TelemetryTabularStorage still observe * declared migrations. */ getMigrationApplier(): ITabularMigrationApplier | null; destroy(): void; [Symbol.dispose](): void; [Symbol.asyncDispose](): Promise; on(name: Event, fn: TabularEventListener): void; off(name: Event, fn: TabularEventListener): void; emit(name: Event, ...args: TabularEventParameters): void; once(name: Event, fn: TabularEventListener): void; waitOn(name: Event): Promise>; } //# sourceMappingURL=TelemetryTabularStorage.d.ts.map