import type { DocTextUpdate } from "../models/DocTextUpdate"; import type { PaginatedConciseDocList } from "../models/PaginatedConciseDocList"; import type { WrappedDoc } from "../models/WrappedDoc"; import type { WrappedDocCreate } from "../models/WrappedDocCreate"; import type { WrappedDocUpdate } from "../models/WrappedDocUpdate"; import type { CancelablePromise } from "../core/CancelablePromise"; export declare class DocService { /** * Create a new doc * Record a new doc that the user intends to write down. This will save the doc in Dart for later access, search, etc. By default the created doc will be in the Docs folder. More information can be included in the text. * @param requestBody * @returns WrappedDoc Success, including the created doc * @throws ApiError */ static createDoc(requestBody: WrappedDocCreate): CancelablePromise; /** * Retrieve an existing doc * Retrieve an existing doc. This will return the doc's information, including the title, folder, text and others. * @param id * @returns WrappedDoc Success, including the retrieved doc * @throws ApiError */ static getDoc(id: string): CancelablePromise; /** * Update an existing doc * Update certain properties of an existing doc. This will save the doc in Dart for later access, search, etc. Any properties that are not specified will not be changed. * @param id * @param requestBody * @returns WrappedDoc Success, including the updated doc * @throws ApiError */ static updateDoc(id: string, requestBody: WrappedDocUpdate): CancelablePromise; /** * Delete an existing doc * Move an existing doc to the trash, where it can be recovered if needed. Nothing else about the doc will be changed. * @param id * @returns WrappedDoc Success, including the deleted doc * @throws ApiError */ static deleteDoc(id: string): CancelablePromise; /** * Update a doc's text content with text updates * Apply targeted text updates to a doc's content; use instead of updateDoc when only the text body changes. Each update is one of: "replace" (swap oldText for newText), "insert_before" / "insert_after" (insert newText relative to anchorText), or "delete" (remove oldText), applied in order and atomically. When occurrence is omitted, the target text must be unique; otherwise specify occurrence (1-indexed). Preferred over a full update for long content: fewer tokens, and no risk of rewriting unrelated text. * @param id * @param requestBody * @returns WrappedDoc Success, including the updated doc * @throws ApiError */ static updateDocText(id: string, requestBody: DocTextUpdate): CancelablePromise; /** * List docs with filtering and search capabilities. Filter by folder, title, text content, or use full-text search. Sort by creation/update date or title. Supports pagination. * @returns PaginatedConciseDocList * @throws ApiError */ static listDocs({ editor, folder, folderId, ids, inTrash, limit, noDefaults, o, offset, s, text, title, }: { editor?: string; folder?: string; folderId?: string; /** * Filter by IDs */ ids?: string; inTrash?: boolean; /** * Number of results to return per page. */ limit?: number; /** * Whether default filters and sorting are applied when false (default) or no defaults are applied when true. Explicit filters or sorting always override defaults. */ noDefaults?: boolean; /** * Ordering * * * `folder__order` - Folder order * * `-folder__order` - Folder order (desc) * * `order` - Order * * `-order` - Order (desc) * * `created_at` - Created * * `-created_at` - Created (desc) * * `updated_at` - Updated * * `-updated_at` - Updated (desc) * * `title` - Title * * `-title` - Title (desc) */ o?: Array<"-created_at" | "-folder__order" | "-order" | "-title" | "-updated_at" | "created_at" | "folder__order" | "order" | "title" | "updated_at">; /** * The initial index from which to return the results. */ offset?: number; /** * Search by title, text, or folder title */ s?: string; text?: string; title?: string; }): CancelablePromise; }