export interface MomentoClientOptions { apiKey: string; cacheName: string; defaultTtlSeconds?: number; throwOnError?: boolean; } export interface GetOptions { format?: 'string' | 'json'; valueEncoding?: 'base64' | 'none'; raw?: boolean; } export interface SetOptions { ttlSeconds?: number; valueEncode?: 'base64' | 'none'; contentType?: string; } export interface MomentoError { status: number; title: string; detail: string; } export interface TopicMessage { topic_sequence_number: number; value: { text: string; }; } export interface TopicDiscontinuity { last_topic_sequence: number; new_topic_sequence: number; new_sequence_page: number; } export interface TopicSubscriptionResponse { items: Array<{ item: TopicMessage; } | { discontinuity: TopicDiscontinuity; }>; } export type MomentoResult = { success: true; data: T; } | { success: false; error: MomentoError; }; export declare class MomentoClient { private readonly apiKey; private readonly cacheName; private readonly defaultTtlSeconds; private readonly baseUrl; private readonly throwOnError; constructor(options: MomentoClientOptions); isValidConnection(): Promise; /** * Get a value from the cache */ get(key: string, options?: GetOptions): Promise; get(key: string, options: GetOptions & { format: 'json'; }): Promise; /** * Set a value in the cache */ set(key: string, value: string | any, options?: SetOptions): Promise; /** * Delete a value from the cache */ delete(key: string): Promise; /** * Publish a message to a topic */ topicPublish(topicName: string, message: string): Promise; /** * Subscribe to a topic via long polling */ topicSubscribe(topicName: string, sequenceNumber?: number, sequencePage?: number): Promise; /** * Batch operations helper */ multiSet(entries: Array<{ key: string; value: string | any; options?: SetOptions; }>): Promise; /** * Batch get operations helper */ multiGet(keys: string[], options?: GetOptions): Promise>; /** * Get result wrapped in a success/error object (alternative to throwOnError) */ getSafe(key: string, options?: GetOptions): Promise>; /** * Set result wrapped in a success/error object (alternative to throwOnError) */ setSafe(key: string, value: string | any, options?: SetOptions): Promise>; private makeRequest; private handleErrorResponse; private retry; } //# sourceMappingURL=client.d.ts.map