import { APIResource } from "../../../../resource.js"; import * as Core from "../../../../core.js"; import * as DocumentsAPI from "./documents.js"; import { Document, DocumentCreateParams, DocumentDeleteResponse, DocumentListParams, DocumentQueryParams, DocumentQueryResponse, DocumentUpdateParams, Documents, DocumentsPage, PageDocument } from "./documents.js"; import { Page, type PageParams } from "../../../../pagination.js"; export declare class Collections extends APIResource { documents: DocumentsAPI.Documents; /** * Create a new Collection */ create(appId: string, userId: string, body: CollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update a Collection's name or metadata */ update(appId: string, userId: string, collectionId: string, body: CollectionUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get All Collections for a User */ list(appId: string, userId: string, params?: CollectionListParams, options?: Core.RequestOptions): Core.PagePromise; list(appId: string, userId: string, options?: Core.RequestOptions): Core.PagePromise; /** * Delete a Collection and its documents */ delete(appId: string, userId: string, collectionId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Get a specific collection for a user. * * If collection_id is provided as a query parameter, it uses that (must match JWT * collection_id). Otherwise, it uses the collection_id from the JWT token. */ get(appId: string, userId: string, query?: CollectionGetParams, options?: Core.RequestOptions): Core.APIPromise; get(appId: string, userId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Get a Collection by Name */ getByName(appId: string, userId: string, name: string, options?: Core.RequestOptions): Core.APIPromise; } export declare class CollectionsPage extends Page { } export interface Collection { id: string; app_id: string; created_at: string; name: string; user_id: string; metadata?: Record; } export interface PageCollection { items: Array; page: number; size: number; total: number; pages?: number; } export type CollectionDeleteResponse = unknown; export interface CollectionCreateParams { name: string; metadata?: Record; } export interface CollectionUpdateParams { metadata?: Record | null; name?: string | null; } export interface CollectionListParams extends PageParams { /** * Query param: Whether to reverse the order of results */ reverse?: boolean | null; /** * Body param: */ filter?: Record | null; } export interface CollectionGetParams { /** * Collection ID to retrieve. If not provided, uses JWT token */ collection_id?: string | null; } export declare namespace Collections { export { type Collection as Collection, type PageCollection as PageCollection, type CollectionDeleteResponse as CollectionDeleteResponse, CollectionsPage as CollectionsPage, type CollectionCreateParams as CollectionCreateParams, type CollectionUpdateParams as CollectionUpdateParams, type CollectionListParams as CollectionListParams, type CollectionGetParams as CollectionGetParams, }; export { Documents as Documents, type Document as Document, type PageDocument as PageDocument, type DocumentDeleteResponse as DocumentDeleteResponse, type DocumentQueryResponse as DocumentQueryResponse, DocumentsPage as DocumentsPage, type DocumentCreateParams as DocumentCreateParams, type DocumentUpdateParams as DocumentUpdateParams, type DocumentListParams as DocumentListParams, type DocumentQueryParams as DocumentQueryParams, }; } //# sourceMappingURL=collections.d.ts.map