import type { TABLE_NAMES } from '@mastra/core/storage'; import { Redis } from '@upstash/redis'; /** * Configuration for standalone domain usage. * Accepts either: * 1. An existing Redis client * 2. Config to create a new client internally */ export type UpstashDomainConfig = UpstashDomainClientConfig | UpstashDomainRestConfig; /** * Pass an existing Redis client */ export interface UpstashDomainClientConfig { client: Redis; } /** * Pass config to create a new Redis client internally */ export interface UpstashDomainRestConfig { url: string; token: string; } /** * Resolves UpstashDomainConfig to a Redis client. * Handles creating a new Redis client if url/token are provided. */ export declare function resolveUpstashConfig(config: UpstashDomainConfig): Redis; export declare class UpstashDB { private client; constructor({ client }: { client: Redis; }); insert({ tableName, record }: { tableName: TABLE_NAMES; record: Record; }): Promise; get({ tableName, keys }: { tableName: TABLE_NAMES; keys: Record; }): Promise; scanAndDelete(pattern: string, batchSize?: number): Promise; scanKeys(pattern: string, batchSize?: number): Promise; deleteData({ tableName }: { tableName: TABLE_NAMES; }): Promise; } //# sourceMappingURL=index.d.ts.map