# Document Summaries ## List all document summaries `client.documentSummaries.list(DocumentSummaryListParamsquery?, RequestOptionsoptions?): CursorPagination` **get** `/document-summaries` Retrieve a paginated list of document summaries using cursor-based pagination ### Parameters - `query: DocumentSummaryListParams` - `after?: string` Cursor for forward pagination. Returns items after this cursor. - `before?: string` Cursor for backward pagination. Returns items before this cursor. - `document_id?: string` Filter summaries by document ID - `household_id?: string` Filter summaries by household ID - `limit?: number` Maximum number of items to return ### Returns - `DocumentSummary` - `id: string` Unique identifier for the document summary - `created_at: string` Timestamp when the summary was created - `display_name: string` Display name for the summary - `document_id: string` ID of the document this summary belongs to - `household_id: string` ID of the household this summary belongs to - `summary: string` The summary text content - `updated_at: string` Timestamp when the summary was last updated - `entry_mode?: DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` - `summary_format?: DocumentSummaryFormat` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); // Automatically fetches more pages as needed. for await (const documentSummary of client.documentSummaries.list()) { console.log(documentSummary.id); } ``` #### Response ```json { "data": [ { "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2019-12-27T18:11:19.117Z", "display_name": "Default summary", "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "summary": "summary", "updated_at": "2019-12-27T18:11:19.117Z", "entry_mode": "AI_AUTO", "summary_format": "MARKDOWN" } ], "page_info": { "has_next_page": true, "has_previous_page": false, "end_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9", "start_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9" }, "total_count": 100 } ``` ## Get a document summary by ID `client.documentSummaries.retrieve(stringid, RequestOptionsoptions?): DocumentSummary` **get** `/document-summaries/{id}` Retrieve a specific document summary ### Parameters - `id: string` ### Returns - `DocumentSummary` - `id: string` Unique identifier for the document summary - `created_at: string` Timestamp when the summary was created - `display_name: string` Display name for the summary - `document_id: string` ID of the document this summary belongs to - `household_id: string` ID of the household this summary belongs to - `summary: string` The summary text content - `updated_at: string` Timestamp when the summary was last updated - `entry_mode?: DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` - `summary_format?: DocumentSummaryFormat` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); const documentSummary = await client.documentSummaries.retrieve('id'); console.log(documentSummary.id); ``` #### Response ```json { "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2019-12-27T18:11:19.117Z", "display_name": "Default summary", "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "summary": "summary", "updated_at": "2019-12-27T18:11:19.117Z", "entry_mode": "AI_AUTO", "summary_format": "MARKDOWN" } ``` ## Update a document summary `client.documentSummaries.update(stringid, DocumentSummaryUpdateParamsbody, RequestOptionsoptions?): DocumentSummary` **put** `/document-summaries/{id}` Update an existing document summary ### Parameters - `id: string` - `body: DocumentSummaryUpdateParams` - `display_name?: string` Display name for the summary - `entry_mode?: DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` - `summary?: string` The summary text content - `summary_format?: DocumentSummaryFormat` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Returns - `DocumentSummary` - `id: string` Unique identifier for the document summary - `created_at: string` Timestamp when the summary was created - `display_name: string` Display name for the summary - `document_id: string` ID of the document this summary belongs to - `household_id: string` ID of the household this summary belongs to - `summary: string` The summary text content - `updated_at: string` Timestamp when the summary was last updated - `entry_mode?: DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` - `summary_format?: DocumentSummaryFormat` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); const documentSummary = await client.documentSummaries.update('id'); console.log(documentSummary.id); ``` #### Response ```json { "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2019-12-27T18:11:19.117Z", "display_name": "Default summary", "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "summary": "summary", "updated_at": "2019-12-27T18:11:19.117Z", "entry_mode": "AI_AUTO", "summary_format": "MARKDOWN" } ``` ## Download document summary as PDF `client.documentSummaries.download(stringid, DocumentSummaryDownloadParamsquery?, RequestOptionsoptions?): Response` **get** `/document-summaries/{id}/download` Download the document summary content in the specified format ### Parameters - `id: string` - `query: DocumentSummaryDownloadParams` - `format?: "pdf"` Output format for the download - `"pdf"` ### Returns - `unnamed_schema_0 = Response` ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); const response = await client.documentSummaries.download('id'); console.log(response); const content = await response.blob(); console.log(content); ``` ## Domain Types ### Document Summary - `DocumentSummary` - `id: string` Unique identifier for the document summary - `created_at: string` Timestamp when the summary was created - `display_name: string` Display name for the summary - `document_id: string` ID of the document this summary belongs to - `household_id: string` ID of the household this summary belongs to - `summary: string` The summary text content - `updated_at: string` Timestamp when the summary was last updated - `entry_mode?: DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` - `summary_format?: DocumentSummaryFormat` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Document Summary Entry Mode - `DocumentSummaryEntryMode = "AI_AUTO" | "USER"` Indicates if the summary was AI-generated or user-entered - `"AI_AUTO"` - `"USER"` ### Document Summary Format - `DocumentSummaryFormat = "MARKDOWN" | "PLAIN_TEXT"` Format of the summary content - `"MARKDOWN"` - `"PLAIN_TEXT"` ### Page Info - `PageInfo` - `has_next_page: boolean` When paginating forwards, are there more items? - `has_previous_page: boolean` When paginating backwards, are there more items? - `end_cursor?: string | null` Cursor pointing to the last item in the current page - `start_cursor?: string | null` Cursor pointing to the first item in the current page