googleapis
Version:
Google APIs Client Library for Node.js
1,521 lines • 197 kB
TypeScript
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { GoogleApis } from '../..';
import { BodyResponseCallback, GlobalOptions, MethodOptions } from '../../lib/api';
/**
* Google Sheets API
*
* Reads and writes Google Sheets.
*
* @example
* const google = require('googleapis');
* const sheets = google.sheets('v4');
*
* @namespace sheets
* @type {Function}
* @version v4
* @variation v4
* @param {object=} options Options for Sheets
*/
export declare class Sheets {
_options: GlobalOptions;
google: GoogleApis;
root: this;
spreadsheets: Resource$Spreadsheets;
constructor(options: GlobalOptions, google: GoogleApis);
getRoot(): this;
}
/**
* Adds a new banded range to the spreadsheet.
*/
export interface Schema$AddBandingRequest {
/**
* The banded range to add. The bandedRangeId field is optional; if one is not
* set, an id will be randomly generated. (It is an error to specify the ID of
* a range that already exists.)
*/
bandedRange: Schema$BandedRange;
}
/**
* The result of adding a banded range.
*/
export interface Schema$AddBandingResponse {
/**
* The banded range that was added.
*/
bandedRange: Schema$BandedRange;
}
/**
* Adds a chart to a sheet in the spreadsheet.
*/
export interface Schema$AddChartRequest {
/**
* The chart that should be added to the spreadsheet, including the position
* where it should be placed. The chartId field is optional; if one is not
* set, an id will be randomly generated. (It is an error to specify the ID of
* a chart that already exists.)
*/
chart: Schema$EmbeddedChart;
}
/**
* The result of adding a chart to a spreadsheet.
*/
export interface Schema$AddChartResponse {
/**
* The newly added chart.
*/
chart: Schema$EmbeddedChart;
}
/**
* Adds a new conditional format rule at the given index. All subsequent
* rules' indexes are incremented.
*/
export interface Schema$AddConditionalFormatRuleRequest {
/**
* The zero-based index where the rule should be inserted.
*/
index: number;
/**
* The rule to add.
*/
rule: Schema$ConditionalFormatRule;
}
/**
* Adds a filter view.
*/
export interface Schema$AddFilterViewRequest {
/**
* The filter to add. The filterViewId field is optional; if one is not set,
* an id will be randomly generated. (It is an error to specify the ID of a
* filter that already exists.)
*/
filter: Schema$FilterView;
}
/**
* The result of adding a filter view.
*/
export interface Schema$AddFilterViewResponse {
/**
* The newly added filter view.
*/
filter: Schema$FilterView;
}
/**
* Adds a named range to the spreadsheet.
*/
export interface Schema$AddNamedRangeRequest {
/**
* The named range to add. The namedRangeId field is optional; if one is not
* set, an id will be randomly generated. (It is an error to specify the ID of
* a range that already exists.)
*/
namedRange: Schema$NamedRange;
}
/**
* The result of adding a named range.
*/
export interface Schema$AddNamedRangeResponse {
/**
* The named range to add.
*/
namedRange: Schema$NamedRange;
}
/**
* Adds a new protected range.
*/
export interface Schema$AddProtectedRangeRequest {
/**
* The protected range to be added. The protectedRangeId field is optional; if
* one is not set, an id will be randomly generated. (It is an error to
* specify the ID of a range that already exists.)
*/
protectedRange: Schema$ProtectedRange;
}
/**
* The result of adding a new protected range.
*/
export interface Schema$AddProtectedRangeResponse {
/**
* The newly added protected range.
*/
protectedRange: Schema$ProtectedRange;
}
/**
* Adds a new sheet. When a sheet is added at a given index, all subsequent
* sheets' indexes are incremented. To add an object sheet, use
* AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or
* EmbeddedObjectPosition.newSheet.
*/
export interface Schema$AddSheetRequest {
/**
* The properties the new sheet should have. All properties are optional. The
* sheetId field is optional; if one is not set, an id will be randomly
* generated. (It is an error to specify the ID of a sheet that already
* exists.)
*/
properties: Schema$SheetProperties;
}
/**
* The result of adding a sheet.
*/
export interface Schema$AddSheetResponse {
/**
* The properties of the newly added sheet.
*/
properties: Schema$SheetProperties;
}
/**
* Adds new cells after the last row with data in a sheet, inserting new rows
* into the sheet if necessary.
*/
export interface Schema$AppendCellsRequest {
/**
* The fields of CellData that should be updated. At least one field must be
* specified. The root is the CellData; 'row.values.' should not be
* specified. A single `"*"` can be used as short-hand for listing
* every field.
*/
fields: string;
/**
* The data to append.
*/
rows: Schema$RowData[];
/**
* The sheet ID to append the data to.
*/
sheetId: number;
}
/**
* Appends rows or columns to the end of a sheet.
*/
export interface Schema$AppendDimensionRequest {
/**
* Whether rows or columns should be appended.
*/
dimension: string;
/**
* The number of rows or columns to append.
*/
length: number;
/**
* The sheet to append rows or columns to.
*/
sheetId: number;
}
/**
* The response when updating a range of values in a spreadsheet.
*/
export interface Schema$AppendValuesResponse {
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
/**
* The range (in A1 notation) of the table that values are being appended to
* (before the values were appended). Empty if no table was found.
*/
tableRange: string;
/**
* Information about the updates that were applied.
*/
updates: Schema$UpdateValuesResponse;
}
/**
* Fills in more data based on existing data.
*/
export interface Schema$AutoFillRequest {
/**
* The range to autofill. This will examine the range and detect the location
* that has data and automatically fill that data in to the rest of the range.
*/
range: Schema$GridRange;
/**
* The source and destination areas to autofill. This explicitly lists the
* source of the autofill and where to extend that data.
*/
sourceAndDestination: Schema$SourceAndDestination;
/**
* True if we should generate data with the "alternate" series. This
* differs based on the type and amount of source data.
*/
useAlternateSeries: boolean;
}
/**
* Automatically resizes one or more dimensions based on the contents of the
* cells in that dimension.
*/
export interface Schema$AutoResizeDimensionsRequest {
/**
* The dimensions to automatically resize.
*/
dimensions: Schema$DimensionRange;
}
/**
* A banded (alternating colors) range in a sheet.
*/
export interface Schema$BandedRange {
/**
* The id of the banded range.
*/
bandedRangeId: number;
/**
* Properties for column bands. These properties will be applied on a column-
* by-column basis throughout all the columns in the range. At least one of
* row_properties or column_properties must be specified.
*/
columnProperties: Schema$BandingProperties;
/**
* The range over which these properties are applied.
*/
range: Schema$GridRange;
/**
* Properties for row bands. These properties will be applied on a row-by-row
* basis throughout all the rows in the range. At least one of row_properties
* or column_properties must be specified.
*/
rowProperties: Schema$BandingProperties;
}
/**
* Properties referring a single dimension (either row or column). If both
* BandedRange.row_properties and BandedRange.column_properties are set, the
* fill colors are applied to cells according to the following rules: *
* header_color and footer_color take priority over band colors. *
* first_band_color takes priority over second_band_color. * row_properties
* takes priority over column_properties. For example, the first row color
* takes priority over the first column color, but the first column color takes
* priority over the second row color. Similarly, the row header takes priority
* over the column header in the top left cell, but the column header takes
* priority over the first row color if the row header is not set.
*/
export interface Schema$BandingProperties {
/**
* The first color that is alternating. (Required)
*/
firstBandColor: Schema$Color;
/**
* The color of the last row or column. If this field is not set, the last row
* or column will be filled with either first_band_color or second_band_color,
* depending on the color of the previous row or column.
*/
footerColor: Schema$Color;
/**
* The color of the first row or column. If this field is set, the first row
* or column will be filled with this color and the colors will alternate
* between first_band_color and second_band_color starting from the second row
* or column. Otherwise, the first row or column will be filled with
* first_band_color and the colors will proceed to alternate as they normally
* would.
*/
headerColor: Schema$Color;
/**
* The second color that is alternating. (Required)
*/
secondBandColor: Schema$Color;
}
/**
* An axis of the chart. A chart may not have more than one axis per axis
* position.
*/
export interface Schema$BasicChartAxis {
/**
* The format of the title. Only valid if the axis is not associated with the
* domain.
*/
format: Schema$TextFormat;
/**
* The position of this axis.
*/
position: string;
/**
* The title of this axis. If set, this overrides any title inferred from
* headers of the data.
*/
title: string;
/**
* The axis title text position.
*/
titleTextPosition: Schema$TextPosition;
}
/**
* The domain of a chart. For example, if charting stock prices over time, this
* would be the date.
*/
export interface Schema$BasicChartDomain {
/**
* The data of the domain. For example, if charting stock prices over time,
* this is the data representing the dates.
*/
domain: Schema$ChartData;
/**
* True to reverse the order of the domain values (horizontal axis).
*/
reversed: boolean;
}
/**
* A single series of data in a chart. For example, if charting stock prices
* over time, multiple series may exist, one for the "Open Price",
* "High Price", "Low Price" and "Close Price".
*/
export interface Schema$BasicChartSeries {
/**
* The line style of this series. Valid only if the chartType is AREA, LINE,
* or SCATTER. COMBO charts are also supported if the series chart type is
* AREA or LINE.
*/
lineStyle: Schema$LineStyle;
/**
* The data being visualized in this chart series.
*/
series: Schema$ChartData;
/**
* The minor axis that will specify the range of values for this series. For
* example, if charting stocks over time, the "Volume" series may
* want to be pinned to the right with the prices pinned to the left, because
* the scale of trading volume is different than the scale of prices. It is an
* error to specify an axis that isn't a valid minor axis for the
* chart's type.
*/
targetAxis: string;
/**
* The type of this series. Valid only if the chartType is COMBO. Different
* types will change the way the series is visualized. Only LINE, AREA, and
* COLUMN are supported.
*/
type: string;
}
/**
* The specification for a basic chart. See BasicChartType for the list of
* charts this supports.
*/
export interface Schema$BasicChartSpec {
/**
* The axis on the chart.
*/
axis: Schema$BasicChartAxis[];
/**
* The type of the chart.
*/
chartType: string;
/**
* The behavior of tooltips and data highlighting when hovering on data and
* chart area.
*/
compareMode: string;
/**
* The domain of data this is charting. Only a single domain is supported.
*/
domains: Schema$BasicChartDomain[];
/**
* The number of rows or columns in the data that are "headers". If
* not set, Google Sheets will guess how many rows are headers based on the
* data. (Note that BasicChartAxis.title may override the axis title inferred
* from the header values.)
*/
headerCount: number;
/**
* If some values in a series are missing, gaps may appear in the chart (e.g,
* segments of lines in a line chart will be missing). To eliminate these
* gaps set this to true. Applies to Line, Area, and Combo charts.
*/
interpolateNulls: boolean;
/**
* The position of the chart legend.
*/
legendPosition: string;
/**
* Gets whether all lines should be rendered smooth or straight by default.
* Applies to Line charts.
*/
lineSmoothing: boolean;
/**
* The data this chart is visualizing.
*/
series: Schema$BasicChartSeries[];
/**
* The stacked type for charts that support vertical stacking. Applies to
* Area, Bar, Column, Combo, and Stepped Area charts.
*/
stackedType: string;
/**
* True to make the chart 3D. Applies to Bar and Column charts.
*/
threeDimensional: boolean;
}
/**
* The default filter associated with a sheet.
*/
export interface Schema$BasicFilter {
/**
* The criteria for showing/hiding values per column. The map's key is the
* column index, and the value is the criteria for that column.
*/
criteria: any;
/**
* The range the filter covers.
*/
range: Schema$GridRange;
/**
* The sort order per column. Later specifications are used when values are
* equal in the earlier specifications.
*/
sortSpecs: Schema$SortSpec[];
}
/**
* The request for clearing more than one range selected by a DataFilter in a
* spreadsheet.
*/
export interface Schema$BatchClearValuesByDataFilterRequest {
/**
* The DataFilters used to determine which ranges to clear.
*/
dataFilters: Schema$DataFilter[];
}
/**
* The response when clearing a range of values selected with DataFilters in a
* spreadsheet.
*/
export interface Schema$BatchClearValuesByDataFilterResponse {
/**
* The ranges that were cleared, in A1 notation. (If the requests were for an
* unbounded range or a ranger larger than the bounds of the sheet, this will
* be the actual ranges that were cleared, bounded to the sheet's
* limits.)
*/
clearedRanges: string[];
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
}
/**
* The request for clearing more than one range of values in a spreadsheet.
*/
export interface Schema$BatchClearValuesRequest {
/**
* The ranges to clear, in A1 notation.
*/
ranges: string[];
}
/**
* The response when clearing a range of values in a spreadsheet.
*/
export interface Schema$BatchClearValuesResponse {
/**
* The ranges that were cleared, in A1 notation. (If the requests were for an
* unbounded range or a ranger larger than the bounds of the sheet, this will
* be the actual ranges that were cleared, bounded to the sheet's
* limits.)
*/
clearedRanges: string[];
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
}
/**
* The request for retrieving a range of values in a spreadsheet selected by a
* set of DataFilters.
*/
export interface Schema$BatchGetValuesByDataFilterRequest {
/**
* The data filters used to match the ranges of values to retrieve. Ranges
* that match any of the specified data filters will be included in the
* response.
*/
dataFilters: Schema$DataFilter[];
/**
* How dates, times, and durations should be represented in the output. This
* is ignored if value_render_option is FORMATTED_VALUE. The default dateTime
* render option is [DateTimeRenderOption.SERIAL_NUMBER].
*/
dateTimeRenderOption: string;
/**
* The major dimension that results should use. For example, if the
* spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects
* that range and sets `majorDimension=ROWS` will return `[[1,2],[3,4]]`,
* whereas a request that sets `majorDimension=COLUMNS` will return
* `[[1,3],[2,4]]`.
*/
majorDimension: string;
/**
* How values should be represented in the output. The default render option
* is ValueRenderOption.FORMATTED_VALUE.
*/
valueRenderOption: string;
}
/**
* The response when retrieving more than one range of values in a spreadsheet
* selected by DataFilters.
*/
export interface Schema$BatchGetValuesByDataFilterResponse {
/**
* The ID of the spreadsheet the data was retrieved from.
*/
spreadsheetId: string;
/**
* The requested values with the list of data filters that matched them.
*/
valueRanges: Schema$MatchedValueRange[];
}
/**
* The response when retrieving more than one range of values in a spreadsheet.
*/
export interface Schema$BatchGetValuesResponse {
/**
* The ID of the spreadsheet the data was retrieved from.
*/
spreadsheetId: string;
/**
* The requested values. The order of the ValueRanges is the same as the order
* of the requested ranges.
*/
valueRanges: Schema$ValueRange[];
}
/**
* The request for updating any aspect of a spreadsheet.
*/
export interface Schema$BatchUpdateSpreadsheetRequest {
/**
* Determines if the update response should include the spreadsheet resource.
*/
includeSpreadsheetInResponse: boolean;
/**
* A list of updates to apply to the spreadsheet. Requests will be applied in
* the order they are specified. If any request is not valid, no requests will
* be applied.
*/
requests: Schema$Request[];
/**
* True if grid data should be returned. Meaningful only if if
* include_spreadsheet_in_response is 'true'. This parameter is
* ignored if a field mask was set in the request.
*/
responseIncludeGridData: boolean;
/**
* Limits the ranges included in the response spreadsheet. Meaningful only if
* include_spreadsheet_response is 'true'.
*/
responseRanges: string[];
}
/**
* The reply for batch updating a spreadsheet.
*/
export interface Schema$BatchUpdateSpreadsheetResponse {
/**
* The reply of the updates. This maps 1:1 with the updates, although replies
* to some requests may be empty.
*/
replies: Schema$Response[];
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
/**
* The spreadsheet after updates were applied. This is only set if
* [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`.
*/
updatedSpreadsheet: Schema$Spreadsheet;
}
/**
* The request for updating more than one range of values in a spreadsheet.
*/
export interface Schema$BatchUpdateValuesByDataFilterRequest {
/**
* The new values to apply to the spreadsheet. If more than one range is
* matched by the specified DataFilter the specified values will be applied to
* all of those ranges.
*/
data: Schema$DataFilterValueRange[];
/**
* Determines if the update response should include the values of the cells
* that were updated. By default, responses do not include the updated values.
* The `updatedData` field within each of the
* BatchUpdateValuesResponse.responses will contain the updated values. If the
* range to write was larger than than the range actually written, the
* response will include all values in the requested range (excluding trailing
* empty rows and columns).
*/
includeValuesInResponse: boolean;
/**
* Determines how dates, times, and durations in the response should be
* rendered. This is ignored if response_value_render_option is
* FORMATTED_VALUE. The default dateTime render option is
* DateTimeRenderOption.SERIAL_NUMBER.
*/
responseDateTimeRenderOption: string;
/**
* Determines how values in the response should be rendered. The default
* render option is ValueRenderOption.FORMATTED_VALUE.
*/
responseValueRenderOption: string;
/**
* How the input data should be interpreted.
*/
valueInputOption: string;
}
/**
* The response when updating a range of values in a spreadsheet.
*/
export interface Schema$BatchUpdateValuesByDataFilterResponse {
/**
* The response for each range updated.
*/
responses: Schema$UpdateValuesByDataFilterResponse[];
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
/**
* The total number of cells updated.
*/
totalUpdatedCells: number;
/**
* The total number of columns where at least one cell in the column was
* updated.
*/
totalUpdatedColumns: number;
/**
* The total number of rows where at least one cell in the row was updated.
*/
totalUpdatedRows: number;
/**
* The total number of sheets where at least one cell in the sheet was
* updated.
*/
totalUpdatedSheets: number;
}
/**
* The request for updating more than one range of values in a spreadsheet.
*/
export interface Schema$BatchUpdateValuesRequest {
/**
* The new values to apply to the spreadsheet.
*/
data: Schema$ValueRange[];
/**
* Determines if the update response should include the values of the cells
* that were updated. By default, responses do not include the updated values.
* The `updatedData` field within each of the
* BatchUpdateValuesResponse.responses will contain the updated values. If the
* range to write was larger than than the range actually written, the
* response will include all values in the requested range (excluding trailing
* empty rows and columns).
*/
includeValuesInResponse: boolean;
/**
* Determines how dates, times, and durations in the response should be
* rendered. This is ignored if response_value_render_option is
* FORMATTED_VALUE. The default dateTime render option is
* DateTimeRenderOption.SERIAL_NUMBER.
*/
responseDateTimeRenderOption: string;
/**
* Determines how values in the response should be rendered. The default
* render option is ValueRenderOption.FORMATTED_VALUE.
*/
responseValueRenderOption: string;
/**
* How the input data should be interpreted.
*/
valueInputOption: string;
}
/**
* The response when updating a range of values in a spreadsheet.
*/
export interface Schema$BatchUpdateValuesResponse {
/**
* One UpdateValuesResponse per requested range, in the same order as the
* requests appeared.
*/
responses: Schema$UpdateValuesResponse[];
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
/**
* The total number of cells updated.
*/
totalUpdatedCells: number;
/**
* The total number of columns where at least one cell in the column was
* updated.
*/
totalUpdatedColumns: number;
/**
* The total number of rows where at least one cell in the row was updated.
*/
totalUpdatedRows: number;
/**
* The total number of sheets where at least one cell in the sheet was
* updated.
*/
totalUpdatedSheets: number;
}
/**
* A condition that can evaluate to true or false. BooleanConditions are used by
* conditional formatting, data validation, and the criteria in filters.
*/
export interface Schema$BooleanCondition {
/**
* The type of condition.
*/
type: string;
/**
* The values of the condition. The number of supported values depends on the
* condition type. Some support zero values, others one or two values, and
* ConditionType.ONE_OF_LIST supports an arbitrary number of values.
*/
values: Schema$ConditionValue[];
}
/**
* A rule that may or may not match, depending on the condition.
*/
export interface Schema$BooleanRule {
/**
* The condition of the rule. If the condition evaluates to true, the format
* will be applied.
*/
condition: Schema$BooleanCondition;
/**
* The format to apply. Conditional formatting can only apply a subset of
* formatting: bold, italic, strikethrough, foreground color & background
* color.
*/
format: Schema$CellFormat;
}
/**
* A border along a cell.
*/
export interface Schema$Border {
/**
* The color of the border.
*/
color: Schema$Color;
/**
* The style of the border.
*/
style: string;
/**
* The width of the border, in pixels. Deprecated; the width is determined by
* the "style" field.
*/
width: number;
}
/**
* The borders of the cell.
*/
export interface Schema$Borders {
/**
* The bottom border of the cell.
*/
bottom: Schema$Border;
/**
* The left border of the cell.
*/
left: Schema$Border;
/**
* The right border of the cell.
*/
right: Schema$Border;
/**
* The top border of the cell.
*/
top: Schema$Border;
}
/**
* A <a
* href="/chart/interactive/docs/gallery/bubblechart">bubble
* chart</a>.
*/
export interface Schema$BubbleChartSpec {
/**
* The bubble border color.
*/
bubbleBorderColor: Schema$Color;
/**
* The data containing the bubble labels. These do not need to be unique.
*/
bubbleLabels: Schema$ChartData;
/**
* The max radius size of the bubbles, in pixels. If specified, the field must
* be a positive value.
*/
bubbleMaxRadiusSize: number;
/**
* The minimum radius size of the bubbles, in pixels. If specific, the field
* must be a positive value.
*/
bubbleMinRadiusSize: number;
/**
* The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1
* is fully opaque.
*/
bubbleOpacity: number;
/**
* The data contianing the bubble sizes. Bubble sizes are used to draw the
* bubbles at different sizes relative to each other. If specified, group_ids
* must also be specified. This field is optional.
*/
bubbleSizes: Schema$ChartData;
/**
* The format of the text inside the bubbles. Underline and Strikethrough are
* not supported.
*/
bubbleTextStyle: Schema$TextFormat;
/**
* The data containing the bubble x-values. These values locate the bubbles
* in the chart horizontally.
*/
domain: Schema$ChartData;
/**
* The data containing the bubble group IDs. All bubbles with the same group
* ID will be drawn in the same color. If bubble_sizes is specified then this
* field must also be specified but may contain blank values. This field is
* optional.
*/
groupIds: Schema$ChartData;
/**
* Where the legend of the chart should be drawn.
*/
legendPosition: string;
/**
* The data contianing the bubble y-values. These values locate the bubbles
* in the chart vertically.
*/
series: Schema$ChartData;
}
/**
* A <a
* href="/chart/interactive/docs/gallery/candlestickchart">candlestick
* chart</a>.
*/
export interface Schema$CandlestickChartSpec {
/**
* The Candlestick chart data. Only one CandlestickData is supported.
*/
data: Schema$CandlestickData[];
/**
* The domain data (horizontal axis) for the candlestick chart. String data
* will be treated as discrete labels, other data will be treated as
* continuous values.
*/
domain: Schema$CandlestickDomain;
}
/**
* The Candlestick chart data, each containing the low, open, close, and high
* values for a series.
*/
export interface Schema$CandlestickData {
/**
* The range data (vertical axis) for the close/final value for each candle.
* This is the top of the candle body. If greater than the open value the
* candle will be filled. Otherwise the candle will be hollow.
*/
closeSeries: Schema$CandlestickSeries;
/**
* The range data (vertical axis) for the high/maximum value for each candle.
* This is the top of the candle's center line.
*/
highSeries: Schema$CandlestickSeries;
/**
* The range data (vertical axis) for the low/minimum value for each candle.
* This is the bottom of the candle's center line.
*/
lowSeries: Schema$CandlestickSeries;
/**
* The range data (vertical axis) for the open/initial value for each candle.
* This is the bottom of the candle body. If less than the close value the
* candle will be filled. Otherwise the candle will be hollow.
*/
openSeries: Schema$CandlestickSeries;
}
/**
* The domain of a CandlestickChart.
*/
export interface Schema$CandlestickDomain {
/**
* The data of the CandlestickDomain.
*/
data: Schema$ChartData;
/**
* True to reverse the order of the domain values (horizontal axis).
*/
reversed: boolean;
}
/**
* The series of a CandlestickData.
*/
export interface Schema$CandlestickSeries {
/**
* The data of the CandlestickSeries.
*/
data: Schema$ChartData;
}
/**
* Data about a specific cell.
*/
export interface Schema$CellData {
/**
* A data validation rule on the cell, if any. When writing, the new data
* validation rule will overwrite any prior rule.
*/
dataValidation: Schema$DataValidationRule;
/**
* The effective format being used by the cell. This includes the results of
* applying any conditional formatting and, if the cell contains a formula,
* the computed number format. If the effective format is the default format,
* effective format will not be written. This field is read-only.
*/
effectiveFormat: Schema$CellFormat;
/**
* The effective value of the cell. For cells with formulas, this will be the
* calculated value. For cells with literals, this will be the same as the
* user_entered_value. This field is read-only.
*/
effectiveValue: Schema$ExtendedValue;
/**
* The formatted value of the cell. This is the value as it's shown to the
* user. This field is read-only.
*/
formattedValue: string;
/**
* A hyperlink this cell points to, if any. This field is read-only. (To set
* it, use a `=HYPERLINK` formula in the userEnteredValue.formulaValue field.)
*/
hyperlink: string;
/**
* Any note on the cell.
*/
note: string;
/**
* A pivot table anchored at this cell. The size of pivot table itself is
* computed dynamically based on its data, grouping, filters, values, etc.
* Only the top-left cell of the pivot table contains the pivot table
* definition. The other cells will contain the calculated values of the
* results of the pivot in their effective_value fields.
*/
pivotTable: Schema$PivotTable;
/**
* Runs of rich text applied to subsections of the cell. Runs are only valid
* on user entered strings, not formulas, bools, or numbers. Runs start at
* specific indexes in the text and continue until the next run. Properties of
* a run will continue unless explicitly changed in a subsequent run (and
* properties of the first run will continue the properties of the cell unless
* explicitly changed). When writing, the new runs will overwrite any prior
* runs. When writing a new user_entered_value, previous runs will be erased.
*/
textFormatRuns: Schema$TextFormatRun[];
/**
* The format the user entered for the cell. When writing, the new format
* will be merged with the existing format.
*/
userEnteredFormat: Schema$CellFormat;
/**
* The value the user entered in the cell. e.g, `1234`, `'Hello'`, or
* `=NOW()` Note: Dates, Times and DateTimes are represented as doubles in
* serial number format.
*/
userEnteredValue: Schema$ExtendedValue;
}
/**
* The format of a cell.
*/
export interface Schema$CellFormat {
/**
* The background color of the cell.
*/
backgroundColor: Schema$Color;
/**
* The borders of the cell.
*/
borders: Schema$Borders;
/**
* The horizontal alignment of the value in the cell.
*/
horizontalAlignment: string;
/**
* How a hyperlink, if it exists, should be displayed in the cell.
*/
hyperlinkDisplayType: string;
/**
* A format describing how number values should be represented to the user.
*/
numberFormat: Schema$NumberFormat;
/**
* The padding of the cell.
*/
padding: Schema$Padding;
/**
* The direction of the text in the cell.
*/
textDirection: string;
/**
* The format of the text in the cell (unless overridden by a format run).
*/
textFormat: Schema$TextFormat;
/**
* The rotation applied to text in a cell
*/
textRotation: Schema$TextRotation;
/**
* The vertical alignment of the value in the cell.
*/
verticalAlignment: string;
/**
* The wrap strategy for the value in the cell.
*/
wrapStrategy: string;
}
/**
* The data included in a domain or series.
*/
export interface Schema$ChartData {
/**
* The source ranges of the data.
*/
sourceRange: Schema$ChartSourceRange;
}
/**
* Source ranges for a chart.
*/
export interface Schema$ChartSourceRange {
/**
* The ranges of data for a series or domain. Exactly one dimension must have
* a length of 1, and all sources in the list must have the same dimension
* with length 1. The domain (if it exists) & all series must have the
* same number of source ranges. If using more than one source range, then the
* source range at a given offset must be in order and contiguous across the
* domain and series. For example, these are valid configurations: domain
* sources: A1:A5 series1 sources: B1:B5 series2 sources: D6:D10
* domain sources: A1:A5, C10:C12 series1 sources: B1:B5, D10:D12 series2
* sources: C1:C5, E10:E12
*/
sources: Schema$GridRange[];
}
/**
* The specifications of a chart.
*/
export interface Schema$ChartSpec {
/**
* The alternative text that describes the chart. This is often used for
* accessibility.
*/
altText: string;
/**
* The background color of the entire chart. Not applicable to Org charts.
*/
backgroundColor: Schema$Color;
/**
* A basic chart specification, can be one of many kinds of charts. See
* BasicChartType for the list of all charts this supports.
*/
basicChart: Schema$BasicChartSpec;
/**
* A bubble chart specification.
*/
bubbleChart: Schema$BubbleChartSpec;
/**
* A candlestick chart specification.
*/
candlestickChart: Schema$CandlestickChartSpec;
/**
* The name of the font to use by default for all chart text (e.g. title, axis
* labels, legend). If a font is specified for a specific part of the chart
* it will override this font name.
*/
fontName: string;
/**
* Determines how the charts will use hidden rows or columns.
*/
hiddenDimensionStrategy: string;
/**
* A histogram chart specification.
*/
histogramChart: Schema$HistogramChartSpec;
/**
* True to make a chart fill the entire space in which it's rendered with
* minimum padding. False to use the default padding. (Not applicable to Geo
* and Org charts.)
*/
maximized: boolean;
/**
* An org chart specification.
*/
orgChart: Schema$OrgChartSpec;
/**
* A pie chart specification.
*/
pieChart: Schema$PieChartSpec;
/**
* The subtitle of the chart.
*/
subtitle: string;
/**
* The subtitle text format. Strikethrough and underline are not supported.
*/
subtitleTextFormat: Schema$TextFormat;
/**
* The subtitle text position. This field is optional.
*/
subtitleTextPosition: Schema$TextPosition;
/**
* The title of the chart.
*/
title: string;
/**
* The title text format. Strikethrough and underline are not supported.
*/
titleTextFormat: Schema$TextFormat;
/**
* The title text position. This field is optional.
*/
titleTextPosition: Schema$TextPosition;
/**
* A treemap chart specification.
*/
treemapChart: Schema$TreemapChartSpec;
/**
* A waterfall chart specification.
*/
waterfallChart: Schema$WaterfallChartSpec;
}
/**
* Clears the basic filter, if any exists on the sheet.
*/
export interface Schema$ClearBasicFilterRequest {
/**
* The sheet ID on which the basic filter should be cleared.
*/
sheetId: number;
}
/**
* The request for clearing a range of values in a spreadsheet.
*/
export interface Schema$ClearValuesRequest {
}
/**
* The response when clearing a range of values in a spreadsheet.
*/
export interface Schema$ClearValuesResponse {
/**
* The range (in A1 notation) that was cleared. (If the request was for an
* unbounded range or a ranger larger than the bounds of the sheet, this will
* be the actual range that was cleared, bounded to the sheet's limits.)
*/
clearedRange: string;
/**
* The spreadsheet the updates were applied to.
*/
spreadsheetId: string;
}
/**
* Represents a color in the RGBA color space. This representation is designed
* for simplicity of conversion to/from color representations in various
* languages over compactness; for example, the fields of this representation
* can be trivially provided to the constructor of "java.awt.Color" in
* Java; it can also be trivially provided to UIColor's
* "+colorWithRed:green:blue:alpha" method in iOS; and, with just a
* little work, it can be easily formatted into a CSS "rgba()" string
* in JavaScript, as well. Here are some examples: Example (Java): import
* com.google.type.Color; // ... public static java.awt.Color
* fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ?
* protocolor.getAlpha().getValue() : 1.0; return new
* java.awt.Color( protocolor.getRed(), protocolor.getGreen(),
* protocolor.getBlue(), alpha); } public static Color
* toProto(java.awt.Color color) { float red = (float) color.getRed();
* float green = (float) color.getGreen(); float blue = (float)
* color.getBlue(); float denominator = 255.0; Color.Builder
* resultBuilder = Color .newBuilder() .setRed(red /
* denominator) .setGreen(green / denominator) .setBlue(blue /
* denominator); int alpha = color.getAlpha(); if (alpha != 255) {
* result.setAlpha( FloatValue .newBuilder()
* .setValue(((float) alpha) / denominator) .build()); }
* return resultBuilder.build(); } // ... Example (iOS / Obj-C): //
* ... static UIColor* fromProto(Color* protocolor) { float red =
* [protocolor red]; float green = [protocolor green]; float
* blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor
* alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha
* = [alpha_wrapper value]; } return [UIColor colorWithRed:red
* green:green blue:blue alpha:alpha]; } static Color*
* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if
* (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
* return nil; } Color* result = [Color alloc] init]; [result
* setRed:red]; [result setGreen:green]; [result
* setBlue:blue]; if (alpha <= 0.9999) { [result
* setAlpha:floatWrapperWithValue(alpha)]; } [result
* autorelease]; return result; } // ... Example
* (JavaScript): // ... var protoToCssColor = function(rgb_color) {
* var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green ||
* 0.0; var blueFrac = rgb_color.blue || 0.0; var red =
* Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
* var blue = Math.floor(blueFrac * 255); if (!('alpha' in
* rgb_color)) { return rgbToCssColor_(red, green, blue); } var
* alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green,
* blue].join(','); return ['rgba(', rgbParams,
* ',', alphaFrac, ')'].join(''); }; var
* rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new
* Number((red << 16) | (green << 8) | blue); var hexString =
* rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
* resultBuilder = ['#']; for (var i = 0; i < missingZeros;
* i++) { resultBuilder.push('0'); }
* resultBuilder.push(hexString); return resultBuilder.join('');
* }; // ...
*/
export interface Schema$Color {
/**
* The fraction of this color that should be applied to the pixel. That is,
* the final pixel color is defined by the equation: pixel color = alpha *
* (this color) + (1.0 - alpha) * (background color) This means that a value
* of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to
* a completely transparent color. This uses a wrapper message rather than a
* simple float scalar so that it is possible to distinguish between a default
* value and the value being unset. If omitted, this color object is to be
* rendered as a solid color (as if the alpha value had been explicitly given
* with a value of 1.0).
*/
alpha: number;
/**
* The amount of blue in the color as a value in the interval [0, 1].
*/
blue: number;
/**
* The amount of green in the color as a value in the interval [0, 1].
*/
green: number;
/**
* The amount of red in the color as a value in the interval [0, 1].
*/
red: number;
}
/**
* A rule describing a conditional format.
*/
export interface Schema$ConditionalFormatRule {
/**
* The formatting is either "on" or "off" according to the
* rule.
*/
booleanRule: Schema$BooleanRule;
/**
* The formatting will vary based on the gradients in the rule.
*/
gradientRule: Schema$GradientRule;
/**
* The ranges that will be formatted if the condition is true. All the ranges
* must be on the same grid.
*/
ranges: Schema$GridRange[];
}
/**
* The value of the condition.
*/
export interface Schema$ConditionValue {
/**
* A relative date (based on the current date). Valid only if the type is
* DATE_BEFORE, DATE_AFTER, DATE_ON_OR_BEFORE or DATE_ON_OR_AFTER. Relative
* dates are not supported in data validation. They are supported only in
* conditional formatting and conditional filters.
*/
relativeDate: string;
/**
* A value the condition is based on. The value will be parsed as if the user
* typed into a cell. Formulas are supported (and must begin with an `=` or a
* '+').
*/
userEnteredValue: string;
}
/**
* Copies data from the source to the destination.
*/
export interface Schema$CopyPasteRequest {
/**
* The location to paste to. If the range covers a span that's a multiple
* of the source's height or width, then the data will be repeated to fill
* in the destination range. If the range is smaller than the source range,
* the entire source data will still be copied (beyond the end of the
* destination range).
*/
destination: Schema$GridRange;
/**
* How that data should be oriented when pasting.
*/
pasteOrientation: string;
/**
* What kind of data to paste.
*/
pasteType: string;
/**
* The source range to copy.
*/
source: Schema$GridRange;
}
/**
* The request to copy a sheet across spreadsheets.
*/
export interface Schema$CopySheetToAnotherSpreadsheetRequest {
/**
* The ID of the spreadsheet to copy the sheet to.
*/
destinationSpreadsheetId: string;
}
/**
* A request to create developer metadata.
*/
export interface Schema$CreateDeveloperMetadataRequest {
/**
* The developer metadata to create.
*/
developerMetadata: Schema$DeveloperMetadata;
}
/**
* The response from creating developer metadata.
*/
export interface Schema$CreateDeveloperMetadataResponse {
/**
* The developer metadata that was created.
*/
developerMetadata: Schema$DeveloperMetadata;
}
/**
* Moves data from the source to the destination.
*/
export interface Schema$CutPasteRequest {
/**
* The top-left coordinate where the data should be pasted.
*/
destination: Schema$GridCoordinate;
/**
* What kind of data to paste. All the source data will be cut, regardless of
* what is pasted.
*/
pasteType: string;
/**
* The source data to cut.
*/
source: Schema$GridRange;
}
/**
* Filter that describes what data should be selected or returned from a
* request.
*/
export interface Schema$DataFilter {
/**
* Selects data that matches the specified A1 range.
*/
a1Range: string;
/**
* Selects data associated with the developer metadata matching the criteria
* described by this DeveloperMetadataLookup.
*/
developerMetadataLookup: Schema$DeveloperMetadataLookup;
/**
* Selects data that matches the range described by the GridRange.
*/
gridRange: Schema$GridRange;
}
/**
* A range of values whose location is specified by a DataFilter.
*/
export interface Schema$DataFilterValueRange {
/**
* The data filter describing the location of the values in the spreadsheet.
*/
dataFilter: Schema$DataFilter;
/**
* The major dimension of the values.
*/
majorDimension: string;
/**
* The data to be written. If the provided values exceed any of the ranges
* matched by the data filter then the request will fail. If the provided
* values are less than the matched ranges only the specified values will be
* written, existing values in the matched ranges will remain unaffected.
*/
values: any[][];
}
/**
* A data validation rule.
*/
export interface Schema$DataValidationRule {
/**
* The condition that data in the cell must match.
*/
condition: Schema$BooleanCondition;
/**
* A message to show the user when adding data to the cell.
*/
inputMessage: string;
/**
* True if the UI should be customized based on the kind of condition. If
* true, "List" conditions will show a dropdown.
*/
showCustomUi: boolean;
/**
* True if invalid data should be rejected.
*/
strict: boolean;
}
/**
* Removes the banded range with the given ID from the spreadsheet.
*/
export interface Schema$DeleteBandingRequest {
/**
* The ID of the banded range to delete.
*/
bandedRangeId: number;
}
/**
* Deletes a conditional format rule at the given index. All subsequent
* rules' indexes are decremented.
*/
export interface Schema$DeleteConditionalFormatRuleRequest {
/**
* The zero-based index of the rule to be deleted.
*/
index: number;
/**
* The sheet the rule is being deleted from.
*/
sheetId: number;
}
/**
* The result of deleting a conditional format rule.
*/
export interface Schema$DeleteConditionalFormatRuleResponse {
/**
* The rule that was deleted.
*/
rule: Schema$ConditionalFormatRule;
}
/**
* A request to delete developer metadata.
*/
export interface Schema$DeleteDeveloperMetadataRequest {
/**
* The data filter describing the criteria used to select which developer
* metadata entry to delete.
*/
dataFilter: Schema$DataFilter;
}
/**
* The response from deleting developer metadata.
*/
export interface Schema$DeleteDeveloperMetadataResponse {
/**
* The metadata that was deleted.
*/
deletedDeveloperMe