/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { Response, Headers, BaseApiCore, ErrorStrategyOptionType, PlatformImplementation } from '@managed-api/commons-core'; import { CommonError, AdditionalErrorTypes, ErrorStrategyHandlers, ErrorStrategyOption } from './errorStrategy'; import { ErrorStrategyBuilder } from './builders/errorStrategy'; import { CreateSpreadsheetRequest, CreateSpreadsheetResponseOK, GetSpreadsheetRequest, GetSpreadsheetResponseOK } from './types/spreadsheet'; import { CopySheetRequest, CopySheetResponseOK } from './types/spreadsheet/sheet'; import { AppendValuesInRangeRequest, AppendValuesInRangeResponseOK, ClearValuesInRangeRequest, ClearValuesInRangeResponseOK, GetValuesInRangeRequest, GetValuesInRangeResponseOK, SetValuesInRangeRequest, SetValuesInRangeResponseOK } from './types/spreadsheet/value'; export interface GoogleSheetsApiCoreOptions extends ErrorStrategyOption { } declare type GetGlobalErrorStrategy = () => ErrorStrategyOptionType | undefined; export declare abstract class GoogleSheetsApiCore extends BaseApiCore { private options?; All: AllGroup; Spreadsheet: SpreadsheetGroup; constructor(options?: GoogleSheetsApiCoreOptions | undefined); setGlobalErrorStrategy(errorStrategy: ErrorStrategyOptionType): void; protected buildResponse(url: string, status: number, statusText: string, headers: Headers, body?: string | ArrayBuffer): Response; private getGlobalErrorStrategy; } declare class AllGroup { private Spreadsheet; constructor(Spreadsheet: SpreadsheetGroup); /** * Creates a spreadsheet, returning the newly created spreadsheet. * Alternative usage: Spreadsheet.createSpreadsheet * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create * @param options Request options. */ createSpreadsheet(options: CreateSpreadsheetRequest): Promise; /** * Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids will not be returned. You can include grid data one of two ways: ** Specify a field mask listing your desired fields using the fields URL parameter in HTTP ** Set the includeGridData URL parameter to true. If a field mask is set, the includeGridData parameter is ignored * * For large spreadsheets, it is recommended to retrieve only the specific fields of the spreadsheet that you want. * To retrieve only subsets of the spreadsheet, use the ranges URL parameter. Multiple ranges can be specified. Limiting the range will return only the portions of the spreadsheet that intersect the requested ranges. Ranges are specified using A1 notation. * Alternative usage: Spreadsheet.getSpreadsheet * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get * @param options Request options. */ getSpreadsheet(options: GetSpreadsheetRequest): Promise; /** * Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet. * Alternative usage: Spreadsheet.Sheet.copySheet * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo * @param options Request options. */ copySpreadsheetSheet(options: CopySheetRequest): Promise; /** * Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the guide and sample code for specific details of how tables are detected and data is appended. * The caller must specify the spreadsheet ID, range, and a valueInputOption. The valueInputOption only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to. * Alternative usage: Spreadsheet.Value.appendValuesInRange * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append * @param options Request options. */ appendSpreadsheetValuesInRange(options: AppendValuesInRangeRequest): Promise; /** * Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept. * Alternative usage: Spreadsheet.Value.clearValuesInRange * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear * @param options Request options. */ clearSpreadsheetValuesInRange(options: ClearValuesInRangeRequest): Promise; /** * Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. * Alternative usage: Spreadsheet.Value.getValuesInRange * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get * @param options Request options. */ getSpreadsheetValuesInRange(options: GetValuesInRangeRequest): Promise; /** * Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. * Alternative usage: Spreadsheet.Value.setValuesInRange * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update * @param options Request options. */ setSpreadsheetValuesInRange(options: SetValuesInRangeRequest): Promise; } declare class SpreadsheetGroup { private implementation; private getGlobalErrorStrategy; Sheet: SpreadsheetSheetGroup; Value: SpreadsheetValueGroup; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * Creates a spreadsheet, returning the newly created spreadsheet. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create * @param options Request options. */ createSpreadsheet(options: CreateSpreadsheetRequest): Promise; /** * Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids will not be returned. You can include grid data one of two ways: ** Specify a field mask listing your desired fields using the fields URL parameter in HTTP ** Set the includeGridData URL parameter to true. If a field mask is set, the includeGridData parameter is ignored * * For large spreadsheets, it is recommended to retrieve only the specific fields of the spreadsheet that you want. * To retrieve only subsets of the spreadsheet, use the ranges URL parameter. Multiple ranges can be specified. Limiting the range will return only the portions of the spreadsheet that intersect the requested ranges. Ranges are specified using A1 notation. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get * @param options Request options. */ getSpreadsheet(options: GetSpreadsheetRequest): Promise; } declare class SpreadsheetSheetGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo * @param options Request options. */ copySheet(options: CopySheetRequest): Promise; } declare class SpreadsheetValueGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the guide and sample code for specific details of how tables are detected and data is appended. * The caller must specify the spreadsheet ID, range, and a valueInputOption. The valueInputOption only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append * @param options Request options. */ appendValuesInRange(options: AppendValuesInRangeRequest): Promise; /** * Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear * @param options Request options. */ clearValuesInRange(options: ClearValuesInRangeRequest): Promise; /** * Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get * @param options Request options. */ getValuesInRange(options: GetValuesInRangeRequest): Promise; /** * Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. * Documentation: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update * @param options Request options. */ setValuesInRange(options: SetValuesInRangeRequest): Promise; } export {}; //# sourceMappingURL=index.d.ts.map