import { APIResource } from "../../../../resource.js"; import * as Core from "../../../../core.js"; import * as MessagesAPI from "./messages.js"; import { Message, MessageBatchParams, MessageBatchResponse, MessageCreateParams, MessageListParams, MessageUpdateParams, Messages, MessagesPage, PageMessage } from "./messages.js"; import { Page, type PageParams } from "../../../../pagination.js"; export declare class Sessions extends APIResource { messages: MessagesAPI.Messages; /** * Create a Session for a User */ create(appId: string, userId: string, body: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update the metadata of a Session */ update(appId: string, userId: string, sessionId: string, body: SessionUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get All Sessions for a User */ list(appId: string, userId: string, params?: SessionListParams, options?: Core.RequestOptions): Core.PagePromise; list(appId: string, userId: string, options?: Core.RequestOptions): Core.PagePromise; /** * Delete a session by marking it as inactive */ delete(appId: string, userId: string, sessionId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Chat with the Dialectic API */ chat(appId: string, userId: string, sessionId: string, body: SessionChatParams, options?: Core.RequestOptions): Core.APIPromise; /** * Clone a session, optionally up to a specific message */ clone(appId: string, userId: string, sessionId: string, query?: SessionCloneParams, options?: Core.RequestOptions): Core.APIPromise; clone(appId: string, userId: string, sessionId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Get a specific session for a user. * * If session_id is provided as a query parameter, it uses that (must match JWT * session_id). Otherwise, it uses the session_id from the JWT token. */ get(appId: string, userId: string, query?: SessionGetParams, options?: Core.RequestOptions): Core.APIPromise; get(appId: string, userId: string, options?: Core.RequestOptions): Core.APIPromise; } export declare class SessionsPage extends Page { } export interface DialecticResponse { content: string; } export interface PageSession { items: Array; page: number; size: number; total: number; pages?: number; } export interface Session { id: string; app_id: string; created_at: string; is_active: boolean; user_id: string; metadata?: Record; } export type SessionDeleteResponse = unknown; export interface SessionCreateParams { metadata?: Record; } export interface SessionUpdateParams { metadata: Record; } export interface SessionListParams extends PageParams { /** * Query param: Whether to reverse the order of results */ reverse?: boolean | null; /** * Body param: */ filter?: Record | null; /** * Body param: */ is_active?: boolean; } export interface SessionChatParams { queries: string | Array; stream?: boolean; } export interface SessionCloneParams { /** * Whether to deep copy metamessages */ deep_copy?: boolean; /** * Message ID to cut off the clone at */ message_id?: string | null; } export interface SessionGetParams { /** * Session ID to retrieve. If not provided, uses JWT token */ session_id?: string | null; } export declare namespace Sessions { export { type DialecticResponse as DialecticResponse, type PageSession as PageSession, type Session as Session, type SessionDeleteResponse as SessionDeleteResponse, SessionsPage as SessionsPage, type SessionCreateParams as SessionCreateParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, type SessionChatParams as SessionChatParams, type SessionCloneParams as SessionCloneParams, type SessionGetParams as SessionGetParams, }; export { Messages as Messages, type Message as Message, type PageMessage as PageMessage, type MessageBatchResponse as MessageBatchResponse, MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, type MessageBatchParams as MessageBatchParams, }; } //# sourceMappingURL=sessions.d.ts.map