import { APIResource } from "../core/resource.js"; import * as SessionsAPI from "./sessions.js"; import * as AgentsAPI from "./agents.js"; import * as UsersAPI from "./users/users.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Sessions extends APIResource { /** * Create session */ create(body: SessionCreateParams, options?: RequestOptions): APIPromise; /** * Get session by ID */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Update session (partial) */ update(id: string, body: SessionUpdateParams, options?: RequestOptions): APIPromise; /** * List sessions */ list(query?: SessionListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete session */ delete(id: string, options?: RequestOptions): APIPromise; /** * Batch update sessions */ batchUpdate(params: SessionBatchUpdateParams, options?: RequestOptions): APIPromise; /** * List sessions grouped by agent */ listGroupedByAgent(query: SessionListGroupedByAgentParams, options?: RequestOptions): APIPromise; } export interface APIResponseSession extends UsersAPI.APIResponseBase { data?: Session; } export interface APIResponseSessionList extends UsersAPI.APIResponseBase { data?: APIResponseSessionList.Data; } export declare namespace APIResponseSessionList { interface Data { sessions: Array; total: number; } } export interface Session { id?: string; agentId?: string | null; avatar?: string | null; backgroundColor?: string | null; createdAt?: string | null; description?: string | null; groupId?: string | null; pinned?: boolean | null; title?: string | null; updatedAt?: string | null; } export interface UpdateSessionRequest { agentId?: string | null; avatar?: string | null; backgroundColor?: string | null; description?: string | null; groupId?: string | null; pinned?: boolean | null; title?: string | null; userId?: string | null; } export interface SessionListGroupedByAgentResponse extends UsersAPI.APIResponseBase { data?: Array; } export declare namespace SessionListGroupedByAgentResponse { interface Data { sessions: Array; total: number; agent?: AgentsAPI.Agent; } } export interface SessionCreateParams { agentId?: string | null; avatar?: string | null; backgroundColor?: string | null; config?: { [key: string]: unknown; } | null; description?: string | null; groupId?: string | null; meta?: { [key: string]: unknown; } | null; pinned?: boolean | null; title?: string | null; type?: 'agent' | 'group' | null; } export interface SessionUpdateParams { agentId?: string | null; avatar?: string | null; backgroundColor?: string | null; description?: string | null; groupId?: string | null; pinned?: boolean | null; title?: string | null; userId?: string | null; } export interface SessionListParams { agentId?: string; /** * Comma-separated session IDs */ ids?: string; keyword?: string; page?: number; pageSize?: number; userId?: string; } export interface SessionBatchUpdateParams { body: Array; } export declare namespace SessionBatchUpdateParams { interface Body { id: string; data: SessionsAPI.UpdateSessionRequest; } } export interface SessionListGroupedByAgentParams { groupBy: 'agent'; } export declare namespace Sessions { export { type APIResponseSession as APIResponseSession, type APIResponseSessionList as APIResponseSessionList, type Session as Session, type UpdateSessionRequest as UpdateSessionRequest, type SessionListGroupedByAgentResponse as SessionListGroupedByAgentResponse, type SessionCreateParams as SessionCreateParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, type SessionBatchUpdateParams as SessionBatchUpdateParams, type SessionListGroupedByAgentParams as SessionListGroupedByAgentParams, }; } //# sourceMappingURL=sessions.d.ts.map