UNPKG

recallrai

Version:

Official Node.js SDK for RecallrAI - Revolutionary contextual memory system that enables AI assistants to form meaningful connections between conversations, just like human memory.

46 lines (45 loc) 1.39 kB
import { User } from './user'; import { UserList } from './models/user'; export interface RecallrAIOptions { apiKey: string; projectId: string; baseUrl?: string; timeout?: number; } export declare class RecallrAI { private http; private apiKey; private projectId; private baseUrl; /** * Initialize the RecallrAI client. * * @param options Configuration options for the client */ constructor(options: RecallrAIOptions); /** * Create a new user. * * @param userId Unique identifier for the user * @param metadata Optional metadata to associate with the user * @returns The created user object * @throws {UserAlreadyExistsError} If a user with the same ID already exists */ createUser(userId: string, metadata?: Record<string, any>): Promise<User>; /** * Get a user by ID. * * @param userId Unique identifier of the user * @returns A User object representing the user * @throws {UserNotFoundError} If the user is not found */ getUser(userId: string): Promise<User>; /** * List users with pagination. * * @param offset Number of records to skip * @param limit Maximum number of records to return * @returns List of users with pagination info */ listUsers(offset?: number, limit?: number): Promise<UserList>; }