UNPKG

sheets-translate-to-json

Version:

A Node.js library that facilitates the retrieval and conversion of previously translated Google Sheets spreadsheets into structured JSON files, optimizing the management of localized resources.

25 lines (23 loc) 738 B
interface NestedObject { [key: string]: string | NestedObject | undefined; } interface SheetData { [key: string]: NestedObject; } declare class SheetManager { private doc; private jwt; constructor(privateKey: string, clientEmail: string, sheetId: string); init(userPath: string, sheetNames?: string[]): Promise<void>; read(sheetPosition?: number): Promise<SheetData>; readByName(sheetName: string): Promise<SheetData>; readAllSheets(): Promise<{ [sheetName: string]: SheetData; }>; private processSheet; private setNestedValue; private mergeNestedObjects; write(data: SheetData, directoryPath: string): void; listSheets(): Promise<string[]>; } export { SheetManager };