import { type docs_v1 } from 'googleapis'; import { type TextStyleArgs, type ParagraphStyleArgs, type DocsClient } from './types.js'; /** * Execute batch updates, automatically splitting large request arrays into multiple batches. * Returns the combined response from all batches. */ export declare function executeBatchUpdate(docs: DocsClient, documentId: string, requests: docs_v1.Schema$Request[]): Promise; export declare function findTextRange(docs: DocsClient, documentId: string, textToFind: string, instance?: number): Promise<{ startIndex: number; endIndex: number; } | null>; export declare function getParagraphRange(docs: DocsClient, documentId: string, indexWithin: number): Promise<{ startIndex: number; endIndex: number; } | null>; export declare function buildUpdateTextStyleRequest(startIndex: number, endIndex: number, style: TextStyleArgs): { request: docs_v1.Schema$Request; fields: string[]; } | null; export declare function buildUpdateParagraphStyleRequest(startIndex: number, endIndex: number, style: ParagraphStyleArgs): { request: docs_v1.Schema$Request; fields: string[]; } | null; export declare function createTable(docs: DocsClient, documentId: string, rows: number, columns: number, index: number): Promise; /** * Find a table cell's content range by navigating the document structure * @param docs - Google Docs API client * @param documentId - The document ID * @param tableStartIndex - The start index of the table element * @param rowIndex - 0-based row index * @param columnIndex - 0-based column index * @returns Object with startIndex and endIndex of the cell's content, or null if not found */ export declare function findTableCellRange(docs: DocsClient, documentId: string, tableStartIndex: number, rowIndex: number, columnIndex: number): Promise<{ startIndex: number; endIndex: number; } | null>; /** * Edit the content of a specific table cell * @param docs - Google Docs API client * @param documentId - The document ID * @param tableStartIndex - The start index of the table element * @param rowIndex - 0-based row index * @param columnIndex - 0-based column index * @param newContent - New text content for the cell (replaces existing content) * @returns Batch update response */ export declare function editTableCellContent(docs: DocsClient, documentId: string, tableStartIndex: number, rowIndex: number, columnIndex: number, newContent: string): Promise; /** * Find all tables in a document and return their locations and dimensions * @param docs - Google Docs API client * @param documentId - The document ID * @returns Array of table info objects */ export declare function findDocumentTables(docs: DocsClient, documentId: string): Promise>; export declare function insertText(docs: DocsClient, documentId: string, text: string, index: number): Promise; /** Style criteria for finding paragraphs */ export interface StyleCriteria { fontFamily?: string; bold?: boolean; italic?: boolean; fontSize?: number; } export declare function findParagraphsMatchingStyle(docs: DocsClient, documentId: string, styleCriteria: StyleCriteria): Promise<{ startIndex: number; endIndex: number; }[]>; export declare function detectAndFormatLists(docs: DocsClient, documentId: string, startIndex?: number, endIndex?: number): Promise; /** * Inserts an inline image into a document from a publicly accessible URL * @param docs - Google Docs API client * @param documentId - The document ID * @param imageUrl - Publicly accessible URL to the image * @param index - Position in the document where image should be inserted (1-based) * @param width - Optional width in points * @param height - Optional height in points * @returns Promise with batch update response */ export declare function insertInlineImage(docs: DocsClient, documentId: string, imageUrl: string, index: number, width?: number, height?: number): Promise; /** * Uploads a local image file to Google Drive and returns its public URL * @param drive - Google Drive API client * @param localFilePath - Path to the local image file * @param parentFolderId - Optional parent folder ID (defaults to root) * @returns Promise with the public webContentLink URL */ export declare function uploadImageToDrive(drive: import('googleapis').drive_v3.Drive, localFilePath: string, parentFolderId?: string): Promise; /** * Interface for a tab with hierarchy level information */ export interface TabWithLevel extends docs_v1.Schema$Tab { level: number; } /** * Recursively collect all tabs from a document in a flat list with hierarchy info * @param doc - The Google Doc document object * @returns Array of tabs with nesting level information */ export declare function getAllTabs(doc: docs_v1.Schema$Document): TabWithLevel[]; /** * Get the text length from a DocumentTab * @param documentTab - The DocumentTab object * @returns Total character count */ export declare function getTabTextLength(documentTab: docs_v1.Schema$DocumentTab | undefined): number; /** * Find a specific tab by ID in a document (searches recursively through child tabs) * @param doc - The Google Doc document object * @param tabId - The tab ID to search for * @returns The tab object if found, null otherwise */ export declare function findTabById(doc: docs_v1.Schema$Document, tabId: string): docs_v1.Schema$Tab | null; //# sourceMappingURL=googleDocsApiHelpers.d.ts.map