@wirecat/drive-cli 0.15.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/api-contract.d.ts +1 -0
  2. package/dist/api-contract.d.ts.map +1 -1
  3. package/dist/api-contract.js +9 -1
  4. package/dist/api-contract.js.map +1 -1
  5. package/dist/commands/mcp.js +2 -2
  6. package/dist/commands/mcp.js.map +1 -1
  7. package/dist/commands/remote.d.ts +1 -1
  8. package/dist/commands/remote.d.ts.map +1 -1
  9. package/dist/commands/remote.js +7 -11
  10. package/dist/commands/remote.js.map +1 -1
  11. package/dist/commands/sheets-structure.d.ts +4 -0
  12. package/dist/commands/sheets-structure.d.ts.map +1 -0
  13. package/dist/commands/sheets-structure.js +112 -0
  14. package/dist/commands/sheets-structure.js.map +1 -0
  15. package/dist/commands/sheets.d.ts +4 -0
  16. package/dist/commands/sheets.d.ts.map +1 -0
  17. package/dist/commands/sheets.js +102 -0
  18. package/dist/commands/sheets.js.map +1 -0
  19. package/dist/errors.d.ts.map +1 -1
  20. package/dist/errors.js +13 -0
  21. package/dist/errors.js.map +1 -1
  22. package/dist/failure.d.ts.map +1 -1
  23. package/dist/failure.js +5 -0
  24. package/dist/failure.js.map +1 -1
  25. package/dist/generated/definitions.d.ts.map +1 -1
  26. package/dist/generated/definitions.js +7310 -0
  27. package/dist/generated/definitions.js.map +1 -1
  28. package/dist/generated/manifest.d.ts.map +1 -1
  29. package/dist/generated/manifest.js +1923 -0
  30. package/dist/generated/manifest.js.map +1 -1
  31. package/dist/generated/metadata.d.ts +17 -0
  32. package/dist/generated/metadata.d.ts.map +1 -1
  33. package/dist/generated/metadata.js +91 -0
  34. package/dist/generated/metadata.js.map +1 -1
  35. package/dist/generated/schemas.d.ts +546 -0
  36. package/dist/generated/schemas.d.ts.map +1 -1
  37. package/dist/generated/schemas.js +2117 -0
  38. package/dist/generated/schemas.js.map +1 -1
  39. package/dist/generated/types.d.ts +2814 -0
  40. package/dist/generated/types.d.ts.map +1 -1
  41. package/dist/google-api.d.ts.map +1 -1
  42. package/dist/google-api.js +16 -3
  43. package/dist/google-api.js.map +1 -1
  44. package/dist/knowledge.js +6 -6
  45. package/dist/knowledge.js.map +1 -1
  46. package/dist/mcp.d.ts.map +1 -1
  47. package/dist/mcp.js +2 -1
  48. package/dist/mcp.js.map +1 -1
  49. package/dist/policy.d.ts +1 -1
  50. package/dist/policy.d.ts.map +1 -1
  51. package/dist/policy.js +58 -8
  52. package/dist/policy.js.map +1 -1
  53. package/dist/program.d.ts.map +1 -1
  54. package/dist/program.js +7 -7
  55. package/dist/program.js.map +1 -1
  56. package/dist/sheets-input.d.ts +17 -0
  57. package/dist/sheets-input.d.ts.map +1 -0
  58. package/dist/sheets-input.js +32 -0
  59. package/dist/sheets-input.js.map +1 -0
  60. package/dist/store.js +1 -1
  61. package/dist/store.js.map +1 -1
  62. package/package.json +5 -4
@@ -3937,4 +3937,2818 @@ export type DriveactivityOwner = {
3937
3937
  /** The drive that owns the item. */
3938
3938
  drive?: DriveactivityDriveReference;
3939
3939
  };
3940
+ /** Represents a single post in a comment thread. */
3941
+ export type SheetsPost = {
3942
+ /** Optional. The email of the user who is being newly assigned to the thread as part of this post. Returns a 400 bad request error if: - The parent thread is a CommentThread whose headPost does not have an assignee. - commentAction is specified as `RESOLVE` or `REOPEN`. - `assignee_email` exceeds 2048 UTF-8 code units. */
3943
+ assigneeEmail?: string;
3944
+ /** Output only. The time the post was last updated. */
3945
+ updateTime?: string;
3946
+ /** Output only. Whether the post is deleted. If `true`, content and author fields will be empty. */
3947
+ deleted?: boolean;
3948
+ /** Output only. The unique ID of the post. */
3949
+ postId?: string;
3950
+ /** Action taken as part of creating the post. */
3951
+ commentAction?: "COMMENT_ACTION_TYPE_UNSPECIFIED" | "NO_COMMENT_ACTION_CHANGE" | "RESOLVE" | "REOPEN";
3952
+ /** Output only. The user who created the post. */
3953
+ author?: SheetsPostAuthor;
3954
+ /** Output only. Whether the post is from an imported spreadsheet. This field cannot be set directly by callers. */
3955
+ fromImportedSpreadsheet?: boolean;
3956
+ /** Output only. Whether the post is from a copied spreadsheet. This field cannot be set directly by callers. */
3957
+ fromCopiedSpreadsheet?: boolean;
3958
+ /** Output only. The content of the post as HTML. */
3959
+ contentHtml?: string;
3960
+ /** Output only. The time the post was created. */
3961
+ createTime?: string;
3962
+ /** The content of the post. Required to be non-empty if comment_action is not `RESOLVE` or `REOPEN`. This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. May not exceed 2048 UTF-8 code units. */
3963
+ content?: string;
3964
+ };
3965
+ /** Adds a new table to the spreadsheet. */
3966
+ export type SheetsAddTableRequest = {
3967
+ /** Required. The table to add. */
3968
+ table?: SheetsTable;
3969
+ };
3970
+ /** The result of adding a slicer to a spreadsheet. */
3971
+ export type SheetsAddSlicerResponse = {
3972
+ /** The newly added slicer. */
3973
+ slicer?: SheetsSlicer;
3974
+ };
3975
+ /** The result of removing duplicates in a range. */
3976
+ export type SheetsDeleteDuplicatesResponse = {
3977
+ /** The number of duplicate rows removed. */
3978
+ duplicatesRemovedCount?: number;
3979
+ };
3980
+ /** Trims the whitespace (such as spaces, tabs, or new lines) in every cell in the specified range. This request removes all whitespace from the start and end of each cell's text, and reduces any subsequence of remaining whitespace characters to a single space. If the resulting trimmed text starts with a '+' or '=' character, the text remains as a string value and isn't interpreted as a formula. */
3981
+ export type SheetsTrimWhitespaceRequest = {
3982
+ /** The range whose cells to trim. */
3983
+ range?: SheetsGridRange;
3984
+ };
3985
+ /** The domain of a chart. For example, if charting stock prices over time, this would be the date. */
3986
+ export type SheetsBasicChartDomain = {
3987
+ /** True to reverse the order of the domain values (horizontal axis). */
3988
+ reversed?: boolean;
3989
+ /** The data of the domain. For example, if charting stock prices over time, this is the data representing the dates. */
3990
+ domain?: SheetsChartData;
3991
+ };
3992
+ /** Position settings for text. */
3993
+ export type SheetsTextPosition = {
3994
+ /** Horizontal alignment setting for the piece of text. */
3995
+ horizontalAlignment?: "HORIZONTAL_ALIGN_UNSPECIFIED" | "LEFT" | "CENTER" | "RIGHT";
3996
+ };
3997
+ /** Appends rows or columns to the end of a sheet. */
3998
+ export type SheetsAppendDimensionRequest = {
3999
+ /** The sheet to append rows or columns to. */
4000
+ sheetId?: number;
4001
+ /** The number of rows or columns to append. */
4002
+ length?: number;
4003
+ /** Whether rows or columns should be appended. */
4004
+ dimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
4005
+ };
4006
+ /** The response when updating a range of values in a spreadsheet. */
4007
+ export type SheetsUpdateValuesResponse = {
4008
+ /** The number of columns where at least one cell in the column was updated. */
4009
+ updatedColumns?: number;
4010
+ /** The spreadsheet the updates were applied to. */
4011
+ spreadsheetId?: string;
4012
+ /** The number of cells updated. */
4013
+ updatedCells?: number;
4014
+ /** The range (in A1 notation) that updates were applied to. */
4015
+ updatedRange?: string;
4016
+ /** The number of rows where at least one cell in the row was updated. */
4017
+ updatedRows?: number;
4018
+ /** The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`. */
4019
+ updatedData?: SheetsValueRange;
4020
+ };
4021
+ /** Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values. */
4022
+ export type SheetsChartDateTimeRule = {
4023
+ /** The type of date-time grouping to apply. */
4024
+ type?: "CHART_DATE_TIME_RULE_TYPE_UNSPECIFIED" | "SECOND" | "MINUTE" | "HOUR" | "HOUR_MINUTE" | "HOUR_MINUTE_AMPM" | "DAY_OF_WEEK" | "DAY_OF_YEAR" | "DAY_OF_MONTH" | "DAY_MONTH" | "MONTH" | "QUARTER" | "YEAR" | "YEAR_MONTH" | "YEAR_QUARTER" | "YEAR_MONTH_DAY";
4025
+ };
4026
+ /** A rule that may or may not match, depending on the condition. */
4027
+ export type SheetsBooleanRule = {
4028
+ /** The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color and, background color. */
4029
+ format?: SheetsCellFormat;
4030
+ /** The condition of the rule. If the condition evaluates to true, the format is applied. */
4031
+ condition?: SheetsBooleanCondition;
4032
+ };
4033
+ /** Merges all cells in the range. */
4034
+ export type SheetsMergeCellsRequest = {
4035
+ /** The range of cells to merge. */
4036
+ range?: SheetsGridRange;
4037
+ /** How the cells should be merged. */
4038
+ mergeType?: "MERGE_ALL" | "MERGE_COLUMNS" | "MERGE_ROWS";
4039
+ };
4040
+ /** The result of adding a data source. */
4041
+ export type SheetsAddDataSourceResponse = {
4042
+ /** The data execution status. */
4043
+ dataExecutionStatus?: SheetsDataExecutionStatus;
4044
+ /** The data source that was created. */
4045
+ dataSource?: SheetsDataSource;
4046
+ };
4047
+ /** The format of a run of text in a cell. Absent values indicate that the field isn't specified. */
4048
+ export type SheetsTextFormat = {
4049
+ /** The link destination of the text, if any. Setting the link field in a TextFormatRun will clear the cell's existing links or a cell-level link set in the same request. When a link is set, the text foreground color will be set to the default link color and the text will be underlined. If these fields are modified in the same request, those values will be used instead of the link defaults. */
4050
+ link?: SheetsLink;
4051
+ /** The size of the font. */
4052
+ fontSize?: number;
4053
+ /** The foreground color of the text. Deprecated: Use foreground_color_style. */
4054
+ foregroundColor?: SheetsColor;
4055
+ /** True if the text is bold. */
4056
+ bold?: boolean;
4057
+ /** The font family. */
4058
+ fontFamily?: string;
4059
+ /** True if the text is italicized. */
4060
+ italic?: boolean;
4061
+ /** True if the text is underlined. */
4062
+ underline?: boolean;
4063
+ /** The foreground color of the text. If foreground_color is also set, this field takes precedence. */
4064
+ foregroundColorStyle?: SheetsColorStyle;
4065
+ /** True if the text has a strikethrough. */
4066
+ strikethrough?: boolean;
4067
+ };
4068
+ /** A waterfall chart. */
4069
+ export type SheetsWaterfallChartSpec = {
4070
+ /** True to hide connector lines between columns. */
4071
+ hideConnectorLines?: boolean;
4072
+ /** True to interpret the first value as a total. */
4073
+ firstValueIsTotal?: boolean;
4074
+ /** The domain data (horizontal axis) for the waterfall chart. */
4075
+ domain?: SheetsWaterfallChartDomain;
4076
+ /** The stacked type. */
4077
+ stackedType?: "WATERFALL_STACKED_TYPE_UNSPECIFIED" | "STACKED" | "SEQUENTIAL";
4078
+ /** The line style for the connector lines. */
4079
+ connectorLineStyle?: SheetsLineStyle;
4080
+ /** Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. stacked_type must be STACKED and neither CUSTOM nor placement can be set on the total_data_label. */
4081
+ totalDataLabel?: SheetsDataLabel;
4082
+ /** The data this waterfall chart is visualizing. */
4083
+ series?: Array<SheetsWaterfallChartSeries>;
4084
+ };
4085
+ /** Adds a new banded range to the spreadsheet. */
4086
+ export type SheetsAddBandingRequest = {
4087
+ /** 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.) */
4088
+ bandedRange?: SheetsBandedRange;
4089
+ };
4090
+ /** A border along a cell. */
4091
+ export type SheetsBorder = {
4092
+ /** The color of the border. If color is also set, this field takes precedence. */
4093
+ colorStyle?: SheetsColorStyle;
4094
+ /** The width of the border, in pixels. Deprecated; the width is determined by the "style" field. */
4095
+ width?: number;
4096
+ /** The style of the border. */
4097
+ style?: "STYLE_UNSPECIFIED" | "DOTTED" | "DASHED" | "SOLID" | "SOLID_MEDIUM" | "SOLID_THICK" | "NONE" | "DOUBLE";
4098
+ /** The color of the border. Deprecated: Use color_style. */
4099
+ color?: SheetsColor;
4100
+ };
4101
+ /** A location where metadata may be associated in a spreadsheet. */
4102
+ export type SheetsDeveloperMetadataLocation = {
4103
+ /** The type of location this object represents. This field is read-only. */
4104
+ locationType?: "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" | "ROW" | "COLUMN" | "SHEET" | "SPREADSHEET";
4105
+ /** The ID of the sheet when metadata is associated with an entire sheet. */
4106
+ sheetId?: number;
4107
+ /** Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column. It cannot be unbounded or span multiple rows or columns. */
4108
+ dimensionRange?: SheetsDimensionRange;
4109
+ /** True when metadata is associated with an entire spreadsheet. */
4110
+ spreadsheet?: boolean;
4111
+ };
4112
+ /** Updates a conditional format rule at the given index, or moves a conditional format rule to another index. */
4113
+ export type SheetsUpdateConditionalFormatRuleRequest = {
4114
+ /** The sheet of the rule to move. Required if new_index is set, unused otherwise. */
4115
+ sheetId?: number;
4116
+ /** The rule that should replace the rule at the given index. */
4117
+ rule?: SheetsConditionalFormatRule;
4118
+ /** The zero-based new index the rule should end up at. */
4119
+ newIndex?: number;
4120
+ /** The zero-based index of the rule that should be replaced or moved. */
4121
+ index?: number;
4122
+ };
4123
+ /** An org chart. Org charts require a unique set of labels in labels and may optionally include parent_labels and tooltips. parent_labels contain, for each node, the label identifying the parent node. tooltips contain, for each node, an optional tooltip. For example, to describe an OrgChart with Alice as the CEO, Bob as the President (reporting to Alice) and Cathy as VP of Sales (also reporting to Alice), have labels contain "Alice", "Bob", "Cathy", parent_labels contain "", "Alice", "Alice" and tooltips contain "CEO", "President", "VP Sales". */
4124
+ export type SheetsOrgChartSpec = {
4125
+ /** The data containing the tooltip for the corresponding node. A blank value results in no tooltip being displayed for the node. This field is optional. */
4126
+ tooltips?: SheetsChartData;
4127
+ /** The color of the org chart nodes. Deprecated: Use node_color_style. */
4128
+ nodeColor?: SheetsColor;
4129
+ /** The data containing the labels for all the nodes in the chart. Labels must be unique. */
4130
+ labels?: SheetsChartData;
4131
+ /** The size of the org chart nodes. */
4132
+ nodeSize?: "ORG_CHART_LABEL_SIZE_UNSPECIFIED" | "SMALL" | "MEDIUM" | "LARGE";
4133
+ /** The data containing the label of the parent for the corresponding node. A blank value indicates that the node has no parent and is a top-level node. This field is optional. */
4134
+ parentLabels?: SheetsChartData;
4135
+ /** The color of the selected org chart nodes. Deprecated: Use selected_node_color_style. */
4136
+ selectedNodeColor?: SheetsColor;
4137
+ /** The color of the org chart nodes. If node_color is also set, this field takes precedence. */
4138
+ nodeColorStyle?: SheetsColorStyle;
4139
+ /** The color of the selected org chart nodes. If selected_node_color is also set, this field takes precedence. */
4140
+ selectedNodeColorStyle?: SheetsColorStyle;
4141
+ };
4142
+ /** The request to copy a sheet across spreadsheets. */
4143
+ export type SheetsCopySheetToAnotherSpreadsheetRequest = {
4144
+ /** The ID of the spreadsheet to copy the sheet to. */
4145
+ destinationSpreadsheetId?: string;
4146
+ };
4147
+ /** Data within a range of the spreadsheet. */
4148
+ export type SheetsValueRange = {
4149
+ /** The data that was read or to be written. This is an array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell. For output, empty trailing rows and columns will not be included. For input, supported value types are: bool, string, and double. Null values will be skipped. To set a cell to an empty value, set the string value to an empty string. */
4150
+ values?: Array<Array<unknown>>;
4151
+ /** The range the values cover, in [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). For output, this range indicates the entire requested range, even though the values will exclude trailing rows and columns. When appending values, this field represents the range to search for a table, after which values will be appended. */
4152
+ range?: string;
4153
+ /** The major dimension of the values. For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it defaults to ROWS. */
4154
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
4155
+ };
4156
+ /** The Candlestick chart data, each containing the low, open, close, and high values for a series. */
4157
+ export type SheetsCandlestickData = {
4158
+ /** 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. */
4159
+ closeSeries?: SheetsCandlestickSeries;
4160
+ /** The range data (vertical axis) for the high/maximum value for each candle. This is the top of the candle's center line. */
4161
+ highSeries?: SheetsCandlestickSeries;
4162
+ /** The range data (vertical axis) for the low/minimum value for each candle. This is the bottom of the candle's center line. */
4163
+ lowSeries?: SheetsCandlestickSeries;
4164
+ /** 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. */
4165
+ openSeries?: SheetsCandlestickSeries;
4166
+ };
4167
+ /** Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that match the intersection of all the specified fields; any field or combination of fields may be specified. */
4168
+ export type SheetsDeveloperMetadataLookup = {
4169
+ /** Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value. */
4170
+ metadataValue?: string;
4171
+ /** Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key. */
4172
+ metadataKey?: string;
4173
+ /** Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location. Spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT. */
4174
+ locationType?: "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" | "ROW" | "COLUMN" | "SHEET" | "SPREADSHEET";
4175
+ /** Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visible to the requesting project is considered. */
4176
+ visibility?: "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" | "DOCUMENT" | "PROJECT";
4177
+ /** Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id. */
4178
+ metadataId?: number;
4179
+ /** Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy. */
4180
+ metadataLocation?: SheetsDeveloperMetadataLocation;
4181
+ /** Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified. */
4182
+ locationMatchingStrategy?: "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" | "EXACT_LOCATION" | "INTERSECTING_LOCATION";
4183
+ };
4184
+ /** The specification of a Looker data source. */
4185
+ export type SheetsLookerDataSourceSpec = {
4186
+ /** Name of a Looker model explore. */
4187
+ explore?: string;
4188
+ /** Name of a Looker model. */
4189
+ model?: string;
4190
+ /** A Looker instance URL. */
4191
+ instanceUri?: string;
4192
+ };
4193
+ /** Allows you to organize the numeric values in a source data column into buckets of a constant size. All values from HistogramRule.start to HistogramRule.end are placed into groups of size HistogramRule.interval. In addition, all values below HistogramRule.start are placed in one group, and all values above HistogramRule.end are placed in another. Only HistogramRule.interval is required, though if HistogramRule.start and HistogramRule.end are both provided, HistogramRule.start must be less than HistogramRule.end. For example, a pivot table showing average purchase amount by age that has 50+ rows: +-----+-------------------+ | Age | AVERAGE of Amount | +-----+-------------------+ | 16 | $27.13 | | 17 | $5.24 | | 18 | $20.15 | ... +-----+-------------------+ could be turned into a pivot table that looks like the one below by applying a histogram group rule with a HistogramRule.start of 25, an HistogramRule.interval of 20, and an HistogramRule.end of 65. +-------------+-------------------+ | Grouped Age | AVERAGE of Amount | +-------------+-------------------+ | < 25 | $19.34 | | 25-45 | $31.43 | | 45-65 | $35.87 | | > 65 | $27.55 | +-------------+-------------------+ | Grand Total | $29.12 | +-------------+-------------------+ */
4194
+ export type SheetsHistogramRule = {
4195
+ /** The minimum value at which items are placed into buckets of constant size. Values below start are lumped into a single bucket. This field is optional. */
4196
+ start?: number;
4197
+ /** The maximum value at which items are placed into buckets of constant size. Values above end are lumped into a single bucket. This field is optional. */
4198
+ end?: number;
4199
+ /** The size of the buckets that are created. Must be positive. */
4200
+ interval?: number;
4201
+ };
4202
+ /** Unmerges cells in the given range. */
4203
+ export type SheetsUnmergeCellsRequest = {
4204
+ /** The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge. */
4205
+ range?: SheetsGridRange;
4206
+ };
4207
+ /** The response when clearing a range of values in a spreadsheet. */
4208
+ export type SheetsBatchClearValuesResponse = {
4209
+ /** The ranges that were cleared, in A1 notation. If the requests are for an unbounded range or a range larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits. */
4210
+ clearedRanges?: Array<string>;
4211
+ /** The spreadsheet the updates were applied to. */
4212
+ spreadsheetId?: string;
4213
+ };
4214
+ /** The response from cancelling one or multiple data source object refreshes. */
4215
+ export type SheetsCancelDataSourceRefreshResponse = {
4216
+ /** The cancellation statuses of refreshes of all data source objects specified in the request. If is_all is specified, the field contains only those in failure status. Refreshing and canceling refresh the same data source object is also not allowed in the same `batchUpdate`. */
4217
+ statuses?: Array<SheetsCancelDataSourceRefreshStatus>;
4218
+ };
4219
+ /** Updates properties of the named range with the specified namedRangeId. */
4220
+ export type SheetsUpdateNamedRangeRequest = {
4221
+ /** The named range to update with the new properties. */
4222
+ namedRange?: SheetsNamedRange;
4223
+ /** The fields that should be updated. At least one field must be specified. The root `namedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
4224
+ fields?: string;
4225
+ };
4226
+ /** Updates an embedded object's border property. */
4227
+ export type SheetsUpdateEmbeddedObjectBorderRequest = {
4228
+ /** The border that applies to the embedded object. */
4229
+ border?: SheetsEmbeddedObjectBorder;
4230
+ /** The fields that should be updated. At least one field must be specified. The root `border` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
4231
+ fields?: string;
4232
+ /** The ID of the embedded object to update. */
4233
+ objectId?: number;
4234
+ };
4235
+ /** The response from updating data source. */
4236
+ export type SheetsUpdateDataSourceResponse = {
4237
+ /** The updated data source. */
4238
+ dataSource?: SheetsDataSource;
4239
+ /** The data execution status. */
4240
+ dataExecutionStatus?: SheetsDataExecutionStatus;
4241
+ };
4242
+ /** The default filter associated with a sheet. For more information, see [Manage data visibility with filters](https://developers.google.com/workspace/sheets/api/guides/filters). */
4243
+ export type SheetsBasicFilter = {
4244
+ /** The filter criteria per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence. */
4245
+ filterSpecs?: Array<SheetsFilterSpec>;
4246
+ /** 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. This field is deprecated in favor of filter_specs. */
4247
+ criteria?: Record<string, SheetsFilterCriteria>;
4248
+ /** The sort order per column. Later specifications are used when values are equal in the earlier specifications. */
4249
+ sortSpecs?: Array<SheetsSortSpec>;
4250
+ /** The table this filter is backed by, if any. When writing, only one of range or table_id may be set. */
4251
+ tableId?: string;
4252
+ /** The range the filter covers. */
4253
+ range?: SheetsGridRange;
4254
+ };
4255
+ /** The format of a cell. */
4256
+ export type SheetsCellFormat = {
4257
+ /** The vertical alignment of the value in the cell. */
4258
+ verticalAlignment?: "VERTICAL_ALIGN_UNSPECIFIED" | "TOP" | "MIDDLE" | "BOTTOM";
4259
+ /** The rotation applied to text in the cell. */
4260
+ textRotation?: SheetsTextRotation;
4261
+ /** If one exists, how a hyperlink should be displayed in the cell. */
4262
+ hyperlinkDisplayType?: "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" | "LINKED" | "PLAIN_TEXT";
4263
+ /** A format describing how number values should be represented to the user. */
4264
+ numberFormat?: SheetsNumberFormat;
4265
+ /** The format of the text in the cell (unless overridden by a format run). Setting a cell-level link here clears the cell's existing links. Setting the link field in a TextFormatRun takes precedence over the cell-level link. */
4266
+ textFormat?: SheetsTextFormat;
4267
+ /** The background color of the cell. Deprecated: Use background_color_style. */
4268
+ backgroundColor?: SheetsColor;
4269
+ /** The wrap strategy for the value in the cell. */
4270
+ wrapStrategy?: "WRAP_STRATEGY_UNSPECIFIED" | "OVERFLOW_CELL" | "LEGACY_WRAP" | "CLIP" | "WRAP";
4271
+ /** The direction of the text in the cell. */
4272
+ textDirection?: "TEXT_DIRECTION_UNSPECIFIED" | "LEFT_TO_RIGHT" | "RIGHT_TO_LEFT";
4273
+ /** The background color of the cell. If background_color is also set, this field takes precedence. */
4274
+ backgroundColorStyle?: SheetsColorStyle;
4275
+ /** The horizontal alignment of the value in the cell. */
4276
+ horizontalAlignment?: "HORIZONTAL_ALIGN_UNSPECIFIED" | "LEFT" | "CENTER" | "RIGHT";
4277
+ /** The padding of the cell. */
4278
+ padding?: SheetsPadding;
4279
+ /** The borders of the cell. */
4280
+ borders?: SheetsBorders;
4281
+ };
4282
+ /** A rule describing a conditional format. */
4283
+ export type SheetsConditionalFormatRule = {
4284
+ /** The formatting will vary based on the gradients in the rule. */
4285
+ gradientRule?: SheetsGradientRule;
4286
+ /** The ranges that are formatted if the condition is true. All the ranges must be on the same grid. */
4287
+ ranges?: Array<SheetsGridRange>;
4288
+ /** The formatting is either "on" or "off" according to the rule. */
4289
+ booleanRule?: SheetsBooleanRule;
4290
+ };
4291
+ /** Clears the basic filter, if any exists on the sheet. */
4292
+ export type SheetsClearBasicFilterRequest = {
4293
+ /** The sheet ID on which the basic filter should be cleared. */
4294
+ sheetId?: number;
4295
+ };
4296
+ /** The editors of a protected range. */
4297
+ export type SheetsEditors = {
4298
+ /** True if anyone in the document's domain has edit access to the protected range. Domain protection is only supported on documents within a domain. */
4299
+ domainUsersCanEdit?: boolean;
4300
+ /** The email addresses of groups with edit access to the protected range. */
4301
+ groups?: Array<string>;
4302
+ /** The email addresses of users with edit access to the protected range. */
4303
+ users?: Array<string>;
4304
+ };
4305
+ /** A monthly schedule for data to refresh on specific days in the month in a given time interval. */
4306
+ export type SheetsDataSourceRefreshMonthlySchedule = {
4307
+ /** The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor. */
4308
+ startTime?: SheetsTimeOfDay;
4309
+ /** Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At least one day must be specified. */
4310
+ daysOfMonth?: Array<number>;
4311
+ };
4312
+ /** Updates all cells in the range to the values in the given Cell object. Only the fields listed in the fields field are updated; others are unchanged. If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. For example, if writing a cell with formula `=A1` into range B2:C4, B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. To keep the formula's ranges static, use the `$` indicator. For example, use the formula `=$A$1` to prevent both the row and the column from incrementing. */
4313
+ export type SheetsRepeatCellRequest = {
4314
+ /** The range to repeat the cell in. */
4315
+ range?: SheetsGridRange;
4316
+ /** The fields that should be updated. At least one field must be specified. The root `cell` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
4317
+ fields?: string;
4318
+ /** The data to write. */
4319
+ cell?: SheetsCellData;
4320
+ };
4321
+ /** A custom subtotal column for a waterfall chart series. */
4322
+ export type SheetsWaterfallChartCustomSubtotal = {
4323
+ /** A label for the subtotal column. */
4324
+ label?: string;
4325
+ /** True if the data point at subtotal_index is the subtotal. If false, the subtotal will be computed and appear after the data point. */
4326
+ dataIsSubtotal?: boolean;
4327
+ /** The zero-based index of a data point within the series. If data_is_subtotal is true, the data point at this index is the subtotal. Otherwise, the subtotal appears after the data point with this index. A series can have multiple subtotals at arbitrary indices, but subtotals do not affect the indices of the data points. For example, if a series has three data points, their indices will always be 0, 1, and 2, regardless of how many subtotals exist on the series or what data points they are associated with. */
4328
+ subtotalIndex?: number;
4329
+ };
4330
+ /** A sort order associated with a specific column or row. */
4331
+ export type SheetsSortSpec = {
4332
+ /** The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color, and must be an RGB-type color. If foreground_color is also set, this field takes precedence. */
4333
+ foregroundColorStyle?: SheetsColorStyle;
4334
+ /** The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color, and must be an RGB-type color. If background_color is also set, this field takes precedence. */
4335
+ backgroundColorStyle?: SheetsColorStyle;
4336
+ /** The dimension the sort should be applied to. */
4337
+ dimensionIndex?: number;
4338
+ /** Reference to a data source column. */
4339
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
4340
+ /** The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color. Deprecated: Use foreground_color_style. */
4341
+ foregroundColor?: SheetsColor;
4342
+ /** The order data should be sorted. */
4343
+ sortOrder?: "SORT_ORDER_UNSPECIFIED" | "ASCENDING" | "DESCENDING";
4344
+ /** The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color. Deprecated: Use background_color_style. */
4345
+ backgroundColor?: SheetsColor;
4346
+ };
4347
+ /** Updates properties of the filter view. */
4348
+ export type SheetsUpdateFilterViewRequest = {
4349
+ /** The new properties of the filter view. */
4350
+ filter?: SheetsFilterView;
4351
+ /** The fields that should be updated. At least one field must be specified. The root `filter` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
4352
+ fields?: string;
4353
+ };
4354
+ /** Allows you to manually organize the values in a source data column into buckets with names of your choosing. For example, a pivot table that aggregates population by state: +-------+-------------------+ | State | SUM of Population | +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.9 | ... +-------+-------------------+ could be turned into a pivot table that aggregates population by time zone by providing a list of groups (for example, groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule. Note that a similar effect could be achieved by adding a time zone column to the source data and adjusting the pivot table. +-----------+-------------------+ | Time Zone | SUM of Population | +-----------+-------------------+ | Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ... +-----------+-------------------+ */
4355
+ export type SheetsManualRule = {
4356
+ /** The list of group names and the corresponding items from the source data that map to each group name. */
4357
+ groups?: Array<SheetsManualRuleGroup>;
4358
+ };
4359
+ /** The Smart Chip. */
4360
+ export type SheetsChip = {
4361
+ /** Properties of a linked person. */
4362
+ personProperties?: SheetsPersonProperties;
4363
+ /** Properties of a rich link. */
4364
+ richLinkProperties?: SheetsRichLinkProperties;
4365
+ };
4366
+ /** Deletes the dimensions from the sheet. */
4367
+ export type SheetsDeleteDimensionRequest = {
4368
+ /** The dimensions to delete from the sheet. */
4369
+ range?: SheetsDimensionRange;
4370
+ };
4371
+ /** Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This request also removes duplicate rows hidden from view (for example, due to a filter). When removing duplicates, the first instance of each duplicate row scanning from the top downwards is kept in the resulting range. Content outside of the specified range isn't removed, and rows considered duplicates do not have to be adjacent to each other in the range. */
4372
+ export type SheetsDeleteDuplicatesRequest = {
4373
+ /** The range to remove duplicates rows from. */
4374
+ range?: SheetsGridRange;
4375
+ /** The columns in the range to analyze for duplicate values. If no columns are selected then all columns are analyzed for duplicates. */
4376
+ comparisonColumns?: Array<SheetsDimensionRange>;
4377
+ };
4378
+ /** Properties of a grid. */
4379
+ export type SheetsGridProperties = {
4380
+ /** The number of rows that are frozen in the grid. */
4381
+ frozenRowCount?: number;
4382
+ /** True if the row grouping control toggle is shown after the group. */
4383
+ rowGroupControlAfter?: boolean;
4384
+ /** The number of columns that are frozen in the grid. */
4385
+ frozenColumnCount?: number;
4386
+ /** The number of rows in the grid. */
4387
+ rowCount?: number;
4388
+ /** The number of columns in the grid. */
4389
+ columnCount?: number;
4390
+ /** True if the grid isn't showing gridlines in the UI. */
4391
+ hideGridlines?: boolean;
4392
+ /** True if the column grouping control toggle is shown after the group. */
4393
+ columnGroupControlAfter?: boolean;
4394
+ };
4395
+ /** Data about each cell in a row. */
4396
+ export type SheetsRowData = {
4397
+ /** The values in the row, one per column. */
4398
+ values?: Array<SheetsCellData>;
4399
+ };
4400
+ /** Deletes a group over the specified range by decrementing the depth of the dimensions in the range. For example, assume the sheet has a depth-1 group over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the sheet with a depth-1 group over B:D and a depth-2 group over C:C. */
4401
+ export type SheetsDeleteDimensionGroupRequest = {
4402
+ /** The range of the group to be deleted. */
4403
+ range?: SheetsDimensionRange;
4404
+ };
4405
+ /** A group name and a list of items from the source data that should be placed in the group with this name. */
4406
+ export type SheetsManualRuleGroup = {
4407
+ /** The group name, which must be a string. Each group in a given ManualRule must have a unique group name. */
4408
+ groupName?: SheetsExtendedValue;
4409
+ /** The items in the source data that should be placed into this group. Each item may be a string, number, or boolean. Items may appear in at most one group within a given ManualRule. Items that do not appear in any group will appear on their own. */
4410
+ items?: Array<SheetsExtendedValue>;
4411
+ };
4412
+ /** An optional setting on a PivotGroup that defines buckets for the values in the source data column rather than breaking out each individual value. Only one PivotGroup with a group rule may be added for each column in the source data, though on any given column you may add both a PivotGroup that has a rule and a PivotGroup that does not. */
4413
+ export type SheetsPivotGroupRule = {
4414
+ /** A DateTimeRule. */
4415
+ dateTimeRule?: SheetsDateTimeRule;
4416
+ /** A HistogramRule. */
4417
+ histogramRule?: SheetsHistogramRule;
4418
+ /** A ManualRule. */
4419
+ manualRule?: SheetsManualRule;
4420
+ };
4421
+ /** Information about which values in a pivot group should be used for sorting. */
4422
+ export type SheetsPivotGroupSortValueBucket = {
4423
+ /** The offset in the PivotTable.values list which the values in this grouping should be sorted by. */
4424
+ valuesIndex?: number;
4425
+ /** Determines the bucket from which values are chosen to sort. For example, in a pivot table with one row group & two column groups, the row group can list up to two values. The first value corresponds to a value within the first column group, and the second value corresponds to a value in the second column group. If no values are listed, this would indicate that the row should be sorted according to the "Grand Total" over the column groups. If a single value is listed, this would correspond to using the "Total" of that bucket. */
4426
+ buckets?: Array<SheetsExtendedValue>;
4427
+ };
4428
+ /** A bubble chart. */
4429
+ export type SheetsBubbleChartSpec = {
4430
+ /** The bubble border color. Deprecated: Use bubble_border_color_style. */
4431
+ bubbleBorderColor?: SheetsColor;
4432
+ /** The data containing 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. */
4433
+ bubbleSizes?: SheetsChartData;
4434
+ /** The data containing the bubble y-values. These values locate the bubbles in the chart vertically. */
4435
+ series?: SheetsChartData;
4436
+ /** The bubble border color. If bubble_border_color is also set, this field takes precedence. */
4437
+ bubbleBorderColorStyle?: SheetsColorStyle;
4438
+ /** The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is fully opaque. */
4439
+ bubbleOpacity?: number;
4440
+ /** The max radius size of the bubbles, in pixels. If specified, the field must be a positive value. */
4441
+ bubbleMaxRadiusSize?: number;
4442
+ /** The data containing the bubble labels. These do not need to be unique. */
4443
+ bubbleLabels?: SheetsChartData;
4444
+ /** The data containing the bubble x-values. These values locate the bubbles in the chart horizontally. */
4445
+ domain?: SheetsChartData;
4446
+ /** Where the legend of the chart should be drawn. */
4447
+ legendPosition?: "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" | "BOTTOM_LEGEND" | "LEFT_LEGEND" | "RIGHT_LEGEND" | "TOP_LEGEND" | "NO_LEGEND" | "INSIDE_LEGEND";
4448
+ /** The data containing the bubble group IDs. All bubbles with the same group ID are 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. */
4449
+ groupIds?: SheetsChartData;
4450
+ /** The format of the text inside the bubbles. Strikethrough, underline, and link are not supported. */
4451
+ bubbleTextStyle?: SheetsTextFormat;
4452
+ /** The minimum radius size of the bubbles, in pixels. If specific, the field must be a positive value. */
4453
+ bubbleMinRadiusSize?: number;
4454
+ };
4455
+ /** Inserts data into the spreadsheet starting at the specified coordinate. */
4456
+ export type SheetsPasteDataRequest = {
4457
+ /** The coordinate at which the data should start being inserted. */
4458
+ coordinate?: SheetsGridCoordinate;
4459
+ /** True if the data is HTML. */
4460
+ html?: boolean;
4461
+ /** The delimiter in the data. */
4462
+ delimiter?: string;
4463
+ /** The data to insert. */
4464
+ data?: string;
4465
+ /** How the data should be pasted. */
4466
+ type?: "PASTE_NORMAL" | "PASTE_VALUES" | "PASTE_FORMAT" | "PASTE_NO_BORDERS" | "PASTE_FORMULA" | "PASTE_DATA_VALIDATION" | "PASTE_CONDITIONAL_FORMATTING";
4467
+ };
4468
+ /** The result of adding a group. */
4469
+ export type SheetsAddDimensionGroupResponse = {
4470
+ /** All groups of a dimension after adding a group to that dimension. */
4471
+ dimensionGroups?: Array<SheetsDimensionGroup>;
4472
+ };
4473
+ /** The domain of a CandlestickChart. */
4474
+ export type SheetsCandlestickDomain = {
4475
+ /** The data of the CandlestickDomain. */
4476
+ data?: SheetsChartData;
4477
+ /** True to reverse the order of the domain values (horizontal axis). */
4478
+ reversed?: boolean;
4479
+ };
4480
+ /** Data in the grid, as well as metadata about the dimensions. */
4481
+ export type SheetsGridData = {
4482
+ /** Metadata about the requested columns in the grid, starting with the column in start_column. */
4483
+ columnMetadata?: Array<SheetsDimensionProperties>;
4484
+ /** The data in the grid, one entry per row, starting with the row in startRow. The values in RowData will correspond to columns starting at start_column. */
4485
+ rowData?: Array<SheetsRowData>;
4486
+ /** Metadata about the requested rows in the grid, starting with the row in start_row. */
4487
+ rowMetadata?: Array<SheetsDimensionProperties>;
4488
+ /** The first row this GridData refers to, zero-based. */
4489
+ startRow?: number;
4490
+ /** The first column this GridData refers to, zero-based. */
4491
+ startColumn?: number;
4492
+ };
4493
+ /** Updates the borders of a range. If a field is not set in the request, that means the border remains as-is. For example, with two subsequent UpdateBordersRequest: 1. range: A1:A5 `{ top: RED, bottom: WHITE }` 2. range: A1:A5 `{ left: BLUE }` That would result in A1:A5 having a borders of `{ top: RED, bottom: WHITE, left: BLUE }`. If you want to clear a border, explicitly set the style to NONE. */
4494
+ export type SheetsUpdateBordersRequest = {
4495
+ /** The border to put at the bottom of the range. */
4496
+ bottom?: SheetsBorder;
4497
+ /** The border to put at the left of the range. */
4498
+ left?: SheetsBorder;
4499
+ /** The border to put at the top of the range. */
4500
+ top?: SheetsBorder;
4501
+ /** The vertical border to put within the range. */
4502
+ innerVertical?: SheetsBorder;
4503
+ /** The horizontal border to put within the range. */
4504
+ innerHorizontal?: SheetsBorder;
4505
+ /** The range whose borders should be updated. */
4506
+ range?: SheetsGridRange;
4507
+ /** The border to put at the right of the range. */
4508
+ right?: SheetsBorder;
4509
+ };
4510
+ /** A sheet in a spreadsheet. */
4511
+ export type SheetsSheet = {
4512
+ /** The properties of the sheet. */
4513
+ properties?: SheetsSheetProperties;
4514
+ /** The ranges that are merged together. */
4515
+ merges?: Array<SheetsGridRange>;
4516
+ /** Data in the grid, if this is a grid sheet. The number of GridData objects returned is dependent on the number of ranges requested on this sheet. For example, if this is representing `Sheet1`, and the spreadsheet was requested with ranges `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a startRow/startColumn of `0`, while the second one will have `startRow 14` (zero-based row 15), and `startColumn 3` (zero-based column D). For a DATA_SOURCE sheet, you can not request a specific range, the GridData contains all the values. */
4517
+ data?: Array<SheetsGridData>;
4518
+ /** The protected ranges in this sheet. */
4519
+ protectedRanges?: Array<SheetsProtectedRange>;
4520
+ /** The comment anchors on this sheet. */
4521
+ commentAnchors?: Array<SheetsCommentAnchor>;
4522
+ /** The specifications of every chart on this sheet. */
4523
+ charts?: Array<SheetsEmbeddedChart>;
4524
+ /** The banded (alternating colors) ranges on this sheet. */
4525
+ bandedRanges?: Array<SheetsBandedRange>;
4526
+ /** The tables on this sheet. */
4527
+ tables?: Array<SheetsTable>;
4528
+ /** The developer metadata associated with a sheet. */
4529
+ developerMetadata?: Array<SheetsDeveloperMetadata>;
4530
+ /** The filter on this sheet, if any. */
4531
+ basicFilter?: SheetsBasicFilter;
4532
+ /** The slicers on this sheet. */
4533
+ slicers?: Array<SheetsSlicer>;
4534
+ /** The conditional format rules in this sheet. */
4535
+ conditionalFormats?: Array<SheetsConditionalFormatRule>;
4536
+ /** All row groups on this sheet, ordered by increasing range start index, then by group depth. */
4537
+ rowGroups?: Array<SheetsDimensionGroup>;
4538
+ /** The filter views in this sheet. */
4539
+ filterViews?: Array<SheetsFilterView>;
4540
+ /** All column groups on this sheet, ordered by increasing range start index, then by group depth. */
4541
+ columnGroups?: Array<SheetsDimensionGroup>;
4542
+ };
4543
+ /** The response when retrieving more than one range of values in a spreadsheet. */
4544
+ export type SheetsBatchGetValuesResponse = {
4545
+ /** The ID of the spreadsheet the data was retrieved from. */
4546
+ spreadsheetId?: string;
4547
+ /** The requested values. The order of the ValueRanges is the same as the order of the requested ranges. */
4548
+ valueRanges?: Array<SheetsValueRange>;
4549
+ };
4550
+ /** The position of an embedded object such as a chart. */
4551
+ export type SheetsEmbeddedObjectPosition = {
4552
+ /** If true, the embedded object is put on a new sheet whose ID is chosen for you. Used only when writing. */
4553
+ newSheet?: boolean;
4554
+ /** The sheet this is on. Set only if the embedded object is on its own sheet. Must be non-negative. */
4555
+ sheetId?: number;
4556
+ /** The position at which the object is overlaid on top of a grid. */
4557
+ overlayPosition?: SheetsOverlayPosition;
4558
+ };
4559
+ /** Metadata about a value in a pivot grouping. */
4560
+ export type SheetsPivotGroupValueMetadata = {
4561
+ /** The calculated value the metadata corresponds to. (Note that formulaValue is not valid, because the values will be calculated.) */
4562
+ value?: SheetsExtendedValue;
4563
+ /** True if the data corresponding to the value is collapsed. */
4564
+ collapsed?: boolean;
4565
+ };
4566
+ /** Moves data from the source to the destination. */
4567
+ export type SheetsCutPasteRequest = {
4568
+ /** What kind of data to paste. All the source data will be cut, regardless of what is pasted. */
4569
+ pasteType?: "PASTE_NORMAL" | "PASTE_VALUES" | "PASTE_FORMAT" | "PASTE_NO_BORDERS" | "PASTE_FORMULA" | "PASTE_DATA_VALIDATION" | "PASTE_CONDITIONAL_FORMATTING";
4570
+ /** The top-left coordinate where the data should be pasted. */
4571
+ destination?: SheetsGridCoordinate;
4572
+ /** The source data to cut. */
4573
+ source?: SheetsGridRange;
4574
+ };
4575
+ /** The result of trimming whitespace in cells. */
4576
+ export type SheetsTrimWhitespaceResponse = {
4577
+ /** The number of cells that were trimmed of whitespace. */
4578
+ cellsChangedCount?: number;
4579
+ };
4580
+ /** The result of a filter view being duplicated. */
4581
+ export type SheetsDuplicateFilterViewResponse = {
4582
+ /** The newly created filter. */
4583
+ filter?: SheetsFilterView;
4584
+ };
4585
+ /** The status of a refresh cancellation. You can send a cancel request to explicitly cancel one or multiple data source object refreshes. */
4586
+ export type SheetsRefreshCancellationStatus = {
4587
+ /** The state of a call to cancel a refresh in Sheets. */
4588
+ state?: "REFRESH_CANCELLATION_STATE_UNSPECIFIED" | "CANCEL_SUCCEEDED" | "CANCEL_FAILED";
4589
+ /** The error code. */
4590
+ errorCode?: "REFRESH_CANCELLATION_ERROR_CODE_UNSPECIFIED" | "EXECUTION_NOT_FOUND" | "CANCEL_PERMISSION_DENIED" | "QUERY_EXECUTION_COMPLETED" | "CONCURRENT_CANCELLATION" | "CANCEL_OTHER_ERROR";
4591
+ };
4592
+ /** A condition that can evaluate to true or false. BooleanConditions are used by conditional formatting, data validation, and the criteria in filters. */
4593
+ export type SheetsBooleanCondition = {
4594
+ /** 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. */
4595
+ values?: Array<SheetsConditionValue>;
4596
+ /** The type of condition. */
4597
+ type?: "CONDITION_TYPE_UNSPECIFIED" | "NUMBER_GREATER" | "NUMBER_GREATER_THAN_EQ" | "NUMBER_LESS" | "NUMBER_LESS_THAN_EQ" | "NUMBER_EQ" | "NUMBER_NOT_EQ" | "NUMBER_BETWEEN" | "NUMBER_NOT_BETWEEN" | "TEXT_CONTAINS" | "TEXT_NOT_CONTAINS" | "TEXT_STARTS_WITH" | "TEXT_ENDS_WITH" | "TEXT_EQ" | "TEXT_IS_EMAIL" | "TEXT_IS_URL" | "DATE_EQ" | "DATE_BEFORE" | "DATE_AFTER" | "DATE_ON_OR_BEFORE" | "DATE_ON_OR_AFTER" | "DATE_BETWEEN" | "DATE_NOT_BETWEEN" | "DATE_IS_VALID" | "ONE_OF_RANGE" | "ONE_OF_LIST" | "BLANK" | "NOT_BLANK" | "CUSTOM_FORMULA" | "BOOLEAN" | "TEXT_NOT_EQ" | "DATE_NOT_EQ" | "FILTER_EXPRESSION";
4598
+ };
4599
+ /** The response when clearing a range of values selected with DataFilters in a spreadsheet. */
4600
+ export type SheetsBatchClearValuesByDataFilterResponse = {
4601
+ /** The spreadsheet the updates were applied to. */
4602
+ spreadsheetId?: string;
4603
+ /** The ranges that were cleared, in [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). If the requests are for an unbounded range or a range larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits. */
4604
+ clearedRanges?: Array<string>;
4605
+ };
4606
+ /** An unique identifier that references a data source column. */
4607
+ export type SheetsDataSourceColumnReference = {
4608
+ /** The display name of the column. It should be unique within a data source. */
4609
+ name?: string;
4610
+ };
4611
+ /** Data about a specific cell. */
4612
+ export type SheetsCellData = {
4613
+ /** A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the userEnteredValue.formulaValue field. A cell-level link can also be set from the userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the textFormatRun.format.link field that spans the entire cell. */
4614
+ hyperlink?: string;
4615
+ /** The formatted value of the cell. This is the value as it's shown to the user. This field is read-only. */
4616
+ formattedValue?: string;
4617
+ /** 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. */
4618
+ userEnteredValue?: SheetsExtendedValue;
4619
+ /** Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the text and continue until the next run. Runs will inherit 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 are erased. */
4620
+ textFormatRuns?: Array<SheetsTextFormatRun>;
4621
+ /** 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. */
4622
+ pivotTable?: SheetsPivotTable;
4623
+ /** The format the user entered for the cell. When writing, the new format will be merged with the existing format. */
4624
+ userEnteredFormat?: SheetsCellFormat;
4625
+ /** 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. */
4626
+ effectiveFormat?: SheetsCellFormat;
4627
+ /** Output only. Information about a data source formula on the cell. The field is set if user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g. `=SUM(DataSheet!Column)`. */
4628
+ dataSourceFormula?: SheetsDataSourceFormula;
4629
+ /** A data source table anchored at this cell. The size of data source table itself is computed dynamically based on its configuration. Only the first cell of the data source table contains the data source table definition. The other cells will contain the display values of the data source table result in their effective_value fields. */
4630
+ dataSourceTable?: SheetsDataSourceTable;
4631
+ /** The effective value of the cell. For cells with formulas, this is the calculated value. For cells with literals, this is the same as the user_entered_value. This field is read-only. */
4632
+ effectiveValue?: SheetsExtendedValue;
4633
+ /** A data validation rule on the cell, if any. When writing, the new data validation rule will overwrite any prior rule. */
4634
+ dataValidation?: SheetsDataValidationRule;
4635
+ /** Optional. Runs of chips applied to subsections of the cell. Properties of a run start at a specific index in the text and continue until the next run. When reading, all chipped and non-chipped runs are included. Non-chipped runs will have an empty Chip. When writing, only runs with chips are included. Runs containing chips are of length 1 and are represented in the user-entered text by an “@” placeholder symbol. New runs will overwrite any prior runs. Writing a new user_entered_value will erase previous runs. */
4636
+ chipRuns?: Array<SheetsChipRun>;
4637
+ /** Any note on the cell. */
4638
+ note?: string;
4639
+ };
4640
+ /** The number format of a cell. */
4641
+ export type SheetsNumberFormat = {
4642
+ /** The type of the number format. When writing, this field must be set. */
4643
+ type?: "NUMBER_FORMAT_TYPE_UNSPECIFIED" | "TEXT" | "NUMBER" | "PERCENT" | "CURRENCY" | "DATE" | "TIME" | "DATE_TIME" | "SCIENTIFIC";
4644
+ /** Pattern string used for formatting. If not set, a default pattern based on the spreadsheet's locale will be used if necessary for the given type. See the [Date and Number Formats guide](https://developers.google.com/workspace/sheets/api/guides/formats) for more information about the supported patterns. */
4645
+ pattern?: string;
4646
+ };
4647
+ /** Represents a user who authored a comment post. */
4648
+ export type SheetsPostAuthor = {
4649
+ /** The resource name of the post author user, which can also be used to identify the user in the [Google People API](https://developers.google.com/people/api/rest/v1/people). Format: `users/{user}`. Will not be populated if the anonymous field is `true` or if the post is from an imported spreadsheet. */
4650
+ user?: string;
4651
+ /** The display name of the user. May be absent if the author is anonymous. */
4652
+ displayName?: string;
4653
+ /** Whether the user is anonymous. */
4654
+ anonymous?: boolean;
4655
+ /** Whether the user is the authenticated user making the request. */
4656
+ me?: boolean;
4657
+ };
4658
+ /** Adds a data source. After the data source is added successfully, an associated DATA_SOURCE sheet is created and an execution is triggered to refresh the sheet to read data from the data source. The request requires an additional `bigquery.readonly` OAuth scope if you are adding a BigQuery data source. */
4659
+ export type SheetsAddDataSourceRequest = {
4660
+ /** The data source to add. */
4661
+ dataSource?: SheetsDataSource;
4662
+ };
4663
+ /** Deletes a CommentThread. Returns a 400 bad request error if the requesting user is not the author of the headPost. */
4664
+ export type SheetsDeleteCommentRequest = {
4665
+ /** The ID of the CommentThread that is being deleted. */
4666
+ commentId?: string;
4667
+ };
4668
+ /** A color value. */
4669
+ export type SheetsColorStyle = {
4670
+ /** RGB color. The [`alpha`](https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#Color.FIELDS.alpha) value in the [`Color`](https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/other#color) object isn't generally supported. */
4671
+ rgbColor?: SheetsColor;
4672
+ /** Theme color. */
4673
+ themeColor?: "THEME_COLOR_TYPE_UNSPECIFIED" | "TEXT" | "BACKGROUND" | "ACCENT1" | "ACCENT2" | "ACCENT3" | "ACCENT4" | "ACCENT5" | "ACCENT6" | "LINK";
4674
+ };
4675
+ /** A weekly schedule for data to refresh on specific days in a given time interval. */
4676
+ export type SheetsDataSourceRefreshWeeklySchedule = {
4677
+ /** Days of the week to refresh. At least one day must be specified. */
4678
+ daysOfWeek?: Array<"DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY">;
4679
+ /** The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor. */
4680
+ startTime?: SheetsTimeOfDay;
4681
+ };
4682
+ /** The filter criteria associated with a specific column. */
4683
+ export type SheetsFilterSpec = {
4684
+ /** The zero-based column index. */
4685
+ columnIndex?: number;
4686
+ /** The criteria for the column. */
4687
+ filterCriteria?: SheetsFilterCriteria;
4688
+ /** Reference to a data source column. */
4689
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
4690
+ };
4691
+ /** Updates a slicer's specifications. (This does not move or resize a slicer. To move or resize a slicer use UpdateEmbeddedObjectPositionRequest. */
4692
+ export type SheetsUpdateSlicerSpecRequest = {
4693
+ /** The id of the slicer to update. */
4694
+ slicerId?: number;
4695
+ /** The specification to apply to the slicer. */
4696
+ spec?: SheetsSlicerSpec;
4697
+ /** The fields that should be updated. At least one field must be specified. The root `SlicerSpec` is implied and should not be specified. A single "*"` can be used as short-hand for listing every field. */
4698
+ fields?: string;
4699
+ };
4700
+ /** A border along an embedded object. */
4701
+ export type SheetsEmbeddedObjectBorder = {
4702
+ /** The color of the border. Deprecated: Use color_style. */
4703
+ color?: SheetsColor;
4704
+ /** The color of the border. If color is also set, this field takes precedence. */
4705
+ colorStyle?: SheetsColorStyle;
4706
+ };
4707
+ /** The amount of padding around the cell, in pixels. When updating padding, every field must be specified. */
4708
+ export type SheetsPadding = {
4709
+ /** The bottom padding of the cell. */
4710
+ bottom?: number;
4711
+ /** The top padding of the cell. */
4712
+ top?: number;
4713
+ /** The left padding of the cell. */
4714
+ left?: number;
4715
+ /** The right padding of the cell. */
4716
+ right?: number;
4717
+ };
4718
+ /** The request for retrieving a Spreadsheet. */
4719
+ export type SheetsGetSpreadsheetByDataFilterRequest = {
4720
+ /** The DataFilters used to select which ranges to retrieve from the spreadsheet. */
4721
+ dataFilters?: Array<SheetsDataFilter>;
4722
+ /** True if tables should be excluded in the banded ranges. False if not set. */
4723
+ excludeTablesInBandedRanges?: boolean;
4724
+ /** The comments view mode to apply to the spreadsheet. This allows viewing the spreadsheet with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE_OMITTED is used. */
4725
+ commentsViewMode?: "COMMENTS_VIEW_MODE_UNSPECIFIED" | "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS" | "COMMENTS_VIEW_MODE_OMITTED" | "COMMENTS_VIEW_MODE_INCLUDED";
4726
+ /** True if grid data should be returned. This parameter is ignored if a field mask was set in the request. */
4727
+ includeGridData?: boolean;
4728
+ };
4729
+ /** The result of deleting a group. */
4730
+ export type SheetsDeleteDimensionGroupResponse = {
4731
+ /** All groups of a dimension after deleting a group from that dimension. */
4732
+ dimensionGroups?: Array<SheetsDimensionGroup>;
4733
+ };
4734
+ /** The rotation applied to text in a cell. */
4735
+ export type SheetsTextRotation = {
4736
+ /** The angle between the standard orientation and the desired orientation. Measured in degrees. Valid values are between -90 and 90. Positive angles are angled upwards, negative are angled downwards. Note: For LTR text direction positive angles are in the counterclockwise direction, whereas for RTL they are in the clockwise direction */
4737
+ angle?: number;
4738
+ /** If true, text reads top to bottom, but the orientation of individual characters is unchanged. For example: | V | | e | | r | | t | | i | | c | | a | | l | */
4739
+ vertical?: boolean;
4740
+ };
4741
+ /** Deletes the requested sheet. */
4742
+ export type SheetsDeleteSheetRequest = {
4743
+ /** The ID of the sheet to delete. If the sheet is of DATA_SOURCE type, the associated DataSource is also deleted. */
4744
+ sheetId?: number;
4745
+ };
4746
+ /** The domain of a waterfall chart. */
4747
+ export type SheetsWaterfallChartDomain = {
4748
+ /** The data of the WaterfallChartDomain. */
4749
+ data?: SheetsChartData;
4750
+ /** True to reverse the order of the domain values (horizontal axis). */
4751
+ reversed?: boolean;
4752
+ };
4753
+ /** A developer metadata entry and the data filters specified in the original request that matched it. */
4754
+ export type SheetsMatchedDeveloperMetadata = {
4755
+ /** The developer metadata matching the specified filters. */
4756
+ developerMetadata?: SheetsDeveloperMetadata;
4757
+ /** All filters matching the returned developer metadata. */
4758
+ dataFilters?: Array<SheetsDataFilter>;
4759
+ };
4760
+ /** The specification of a BigQuery data source that's connected to a sheet. */
4761
+ export type SheetsBigQueryDataSourceSpec = {
4762
+ /** A BigQueryQuerySpec. */
4763
+ querySpec?: SheetsBigQueryQuerySpec;
4764
+ /** The ID of a BigQuery enabled Google Cloud project with a billing account attached. For any queries executed against the data source, the project is charged. */
4765
+ projectId?: string;
4766
+ /** A BigQueryTableSpec. */
4767
+ tableSpec?: SheetsBigQueryTableSpec;
4768
+ };
4769
+ /** The data execution status. A data execution is created to sync a data source object with the latest data from a DataSource. It is usually scheduled to run at background, you can check its state to tell if an execution completes There are several scenarios where a data execution is triggered to run: * Adding a data source creates an associated data source sheet as well as a data execution to sync the data from the data source to the sheet. * Updating a data source creates a data execution to refresh the associated data source sheet similarly. * You can send refresh request to explicitly refresh one or multiple data source objects. */
4770
+ export type SheetsDataExecutionStatus = {
4771
+ /** The error code. */
4772
+ errorCode?: "DATA_EXECUTION_ERROR_CODE_UNSPECIFIED" | "TIMED_OUT" | "TOO_MANY_ROWS" | "TOO_MANY_COLUMNS" | "TOO_MANY_CELLS" | "ENGINE" | "PARAMETER_INVALID" | "UNSUPPORTED_DATA_TYPE" | "DUPLICATE_COLUMN_NAMES" | "INTERRUPTED" | "CONCURRENT_QUERY" | "OTHER" | "TOO_MANY_CHARS_PER_CELL" | "DATA_NOT_FOUND" | "PERMISSION_DENIED" | "MISSING_COLUMN_ALIAS" | "OBJECT_NOT_FOUND" | "OBJECT_IN_ERROR_STATE" | "OBJECT_SPEC_INVALID" | "DATA_EXECUTION_CANCELLED";
4773
+ /** Gets the time the data last successfully refreshed. */
4774
+ lastRefreshTime?: string;
4775
+ /** The state of the data execution. */
4776
+ state?: "DATA_EXECUTION_STATE_UNSPECIFIED" | "NOT_STARTED" | "RUNNING" | "CANCELLING" | "SUCCEEDED" | "FAILED";
4777
+ /** The error message, which may be empty. */
4778
+ errorMessage?: string;
4779
+ };
4780
+ /** The result of adding a named range. */
4781
+ export type SheetsAddNamedRangeResponse = {
4782
+ /** The named range to add. */
4783
+ namedRange?: SheetsNamedRange;
4784
+ };
4785
+ /** The result of updating an embedded object's position. */
4786
+ export type SheetsUpdateEmbeddedObjectPositionResponse = {
4787
+ /** The new position of the embedded object. */
4788
+ position?: SheetsEmbeddedObjectPosition;
4789
+ };
4790
+ /** A rule that applies a gradient color scale format, based on the interpolation points listed. The format of a cell will vary based on its contents as compared to the values of the interpolation points. */
4791
+ export type SheetsGradientRule = {
4792
+ /** An optional midway interpolation point. */
4793
+ midpoint?: SheetsInterpolationPoint;
4794
+ /** The starting interpolation point. */
4795
+ minpoint?: SheetsInterpolationPoint;
4796
+ /** The final interpolation point. */
4797
+ maxpoint?: SheetsInterpolationPoint;
4798
+ };
4799
+ /** Deletes the protected range with the given ID. */
4800
+ export type SheetsDeleteProtectedRangeRequest = {
4801
+ /** The ID of the protected range to delete. */
4802
+ protectedRangeId?: number;
4803
+ };
4804
+ /** The table row properties. */
4805
+ export type SheetsTableRowsProperties = {
4806
+ /** The color of the header row. If this field is set, the header row is filled with the specified color. Otherwise, the header row is filled with a default color. */
4807
+ headerColorStyle?: SheetsColorStyle;
4808
+ /** The color of the last row. If this field is not set a footer is not added, the last row is filled with either first_band_color_style or second_band_color_style, depending on the color of the previous row. If updating an existing table without a footer to have a footer, the range will be expanded by 1 row. If updating an existing table with a footer and removing a footer, the range will be shrunk by 1 row. */
4809
+ footerColorStyle?: SheetsColorStyle;
4810
+ /** The second color that is alternating. If this field is set, the second banded row is filled with the specified color. Otherwise, the second banded row is filled with a default color. */
4811
+ secondBandColorStyle?: SheetsColorStyle;
4812
+ /** The first color that is alternating. If this field is set, the first banded row is filled with the specified color. Otherwise, the first banded row is filled with a default color. */
4813
+ firstBandColorStyle?: SheetsColorStyle;
4814
+ };
4815
+ /** The response when updating a range of values in a spreadsheet. */
4816
+ export type SheetsBatchUpdateValuesByDataFilterResponse = {
4817
+ /** The spreadsheet the updates were applied to. */
4818
+ spreadsheetId?: string;
4819
+ /** The total number of cells updated. */
4820
+ totalUpdatedCells?: number;
4821
+ /** The response for each range updated. */
4822
+ responses?: Array<SheetsUpdateValuesByDataFilterResponse>;
4823
+ /** The total number of sheets where at least one cell in the sheet was updated. */
4824
+ totalUpdatedSheets?: number;
4825
+ /** The total number of rows where at least one cell in the row was updated. */
4826
+ totalUpdatedRows?: number;
4827
+ /** The total number of columns where at least one cell in the column was updated. */
4828
+ totalUpdatedColumns?: number;
4829
+ };
4830
+ /** A single series of data for a waterfall chart. */
4831
+ export type SheetsWaterfallChartSeries = {
4832
+ /** Styles for all columns in this series with positive values. */
4833
+ positiveColumnsStyle?: SheetsWaterfallChartColumnStyle;
4834
+ /** Styles for all columns in this series with negative values. */
4835
+ negativeColumnsStyle?: SheetsWaterfallChartColumnStyle;
4836
+ /** Information about the data labels for this series. */
4837
+ dataLabel?: SheetsDataLabel;
4838
+ /** Custom subtotal columns appearing in this series. The order in which subtotals are defined is not significant. Only one subtotal may be defined for each data point. */
4839
+ customSubtotals?: Array<SheetsWaterfallChartCustomSubtotal>;
4840
+ /** The data being visualized in this series. */
4841
+ data?: SheetsChartData;
4842
+ /** True to hide the subtotal column from the end of the series. By default, a subtotal column will appear at the end of each series. Setting this field to true will hide that subtotal column for this series. */
4843
+ hideTrailingSubtotal?: boolean;
4844
+ /** Styles for all subtotal columns in this series. */
4845
+ subtotalColumnsStyle?: SheetsWaterfallChartColumnStyle;
4846
+ };
4847
+ /** The request for clearing more than one range of values in a spreadsheet. */
4848
+ export type SheetsBatchClearValuesRequest = {
4849
+ /** The ranges to clear, in [A1 notation or R1C1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). */
4850
+ ranges?: Array<string>;
4851
+ };
4852
+ /** A list of references to data source objects. */
4853
+ export type SheetsDataSourceObjectReferences = {
4854
+ /** The references. */
4855
+ references?: Array<SheetsDataSourceObjectReference>;
4856
+ };
4857
+ /** Properties of a link to a Google resource (such as a file in Drive, a YouTube video, a Maps address, or a Calendar event). Only Drive files can be written as chips. All other rich link types are read only. URIs cannot exceed 2000 bytes when writing. NOTE: Writing Drive file chips requires at least one of the `drive.file`, `drive.readonly`, or `drive` OAuth scopes. */
4858
+ export type SheetsRichLinkProperties = {
4859
+ /** Required. The URI to the link. This is always present. */
4860
+ uri?: string;
4861
+ /** Output only. The [MIME type](https://developers.google.com/drive/api/v3/mime-types) of the link, if there's one (for example, when it's a file in Drive). */
4862
+ mimeType?: string;
4863
+ };
4864
+ /** Represents a single comment thread inside a spreadsheet. */
4865
+ export type SheetsCommentThread = {
4866
+ /** Replies to the head post. */
4867
+ replies?: Array<SheetsPost>;
4868
+ /** The ID of the CommentAnchor in the sheet that this thread is tied to. */
4869
+ anchorId?: string;
4870
+ /** Whether the thread is open or resolved. */
4871
+ status?: "STATUS_UNSPECIFIED" | "OPEN" | "RESOLVED";
4872
+ /** The unique ID of the comment thread. */
4873
+ commentId?: string;
4874
+ /** The first post in the thread. */
4875
+ headPost?: SheetsPost;
4876
+ /** The quoted text from the spreadsheet when the comment was created, formatted as plain-text. */
4877
+ plainTextQuote?: string;
4878
+ };
4879
+ /** An optional setting on the ChartData of the domain of a data source chart that defines buckets for the values in the domain rather than breaking out each individual value. For example, when plotting a data source chart, you can specify a histogram rule on the domain (it should only contain numeric values), grouping its values into buckets. Any values of a chart series that fall into the same bucket are aggregated based on the aggregate_type. */
4880
+ export type SheetsChartGroupRule = {
4881
+ /** A ChartDateTimeRule. */
4882
+ dateTimeRule?: SheetsChartDateTimeRule;
4883
+ /** A ChartHistogramRule */
4884
+ histogramRule?: SheetsChartHistogramRule;
4885
+ };
4886
+ /** Settings to control how circular dependencies are resolved with iterative calculation. */
4887
+ export type SheetsIterativeCalculationSettings = {
4888
+ /** When iterative calculation is enabled, the maximum number of calculation rounds to perform. */
4889
+ maxIterations?: number;
4890
+ /** When iterative calculation is enabled and successive results differ by less than this threshold value, the calculation rounds stop. */
4891
+ convergenceThreshold?: number;
4892
+ };
4893
+ /** Inserts cells into a range, shifting the existing cells over or down. */
4894
+ export type SheetsInsertRangeRequest = {
4895
+ /** The dimension which will be shifted when inserting cells. If ROWS, existing cells will be shifted down. If COLUMNS, existing cells will be shifted right. */
4896
+ shiftDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
4897
+ /** The range to insert new cells into. The range is constrained to the current sheet boundaries. */
4898
+ range?: SheetsGridRange;
4899
+ };
4900
+ /** Deletes a reply Post from a CommentThread. Returns a 400 bad request error if: - The requesting user is not the author of the post. - The reply post contains a comment action. - The reply post contains an assignee. */
4901
+ export type SheetsDeleteCommentReplyRequest = {
4902
+ /** The ID of the CommentThread which the post belongs to. */
4903
+ commentId?: string;
4904
+ /** The ID of the reply Post being deleted. */
4905
+ postId?: string;
4906
+ };
4907
+ /** The response when updating a range of values in a spreadsheet. */
4908
+ export type SheetsBatchUpdateValuesResponse = {
4909
+ /** The total number of columns where at least one cell in the column was updated. */
4910
+ totalUpdatedColumns?: number;
4911
+ /** The total number of cells updated. */
4912
+ totalUpdatedCells?: number;
4913
+ /** The spreadsheet the updates were applied to. */
4914
+ spreadsheetId?: string;
4915
+ /** The total number of sheets where at least one cell in the sheet was updated. */
4916
+ totalUpdatedSheets?: number;
4917
+ /** One UpdateValuesResponse per requested range, in the same order as the requests appeared. */
4918
+ responses?: Array<SheetsUpdateValuesResponse>;
4919
+ /** The total number of rows where at least one cell in the row was updated. */
4920
+ totalUpdatedRows?: number;
4921
+ };
4922
+ /** A column in a data source. */
4923
+ export type SheetsDataSourceColumn = {
4924
+ /** The column reference. */
4925
+ reference?: SheetsDataSourceColumnReference;
4926
+ /** The formula of the calculated column. */
4927
+ formula?: string;
4928
+ };
4929
+ /** The reply for batch updating a spreadsheet. */
4930
+ export type SheetsBatchUpdateSpreadsheetResponse = {
4931
+ /** The spreadsheet the updates were applied to. */
4932
+ spreadsheetId?: string;
4933
+ /** The spreadsheet after updates were applied. This is only set if BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response is `true`. */
4934
+ updatedSpreadsheet?: SheetsSpreadsheet;
4935
+ /** The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty. */
4936
+ replies?: Array<SheetsResponse>;
4937
+ /** Whether comment updates were applied in the batch request. */
4938
+ commentUpdateState?: "COMMENT_UPDATE_STATE_UNSPECIFIED" | "NO_UPDATES_REQUESTED" | "ALL_SAVED" | "ALL_FAILED_UNKNOWN_REASON";
4939
+ };
4940
+ /** The pivot table filter criteria associated with a specific source column offset. */
4941
+ export type SheetsPivotFilterSpec = {
4942
+ /** The criteria for the column. */
4943
+ filterCriteria?: SheetsPivotFilterCriteria;
4944
+ /** The reference to the data source column. */
4945
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
4946
+ /** The zero-based column offset of the source range. */
4947
+ columnOffsetIndex?: number;
4948
+ };
4949
+ /** Adds a chart to a sheet in the spreadsheet. */
4950
+ export type SheetsAddChartRequest = {
4951
+ /** 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 an embedded object that already exists.) */
4952
+ chart?: SheetsEmbeddedChart;
4953
+ };
4954
+ /** A filter view. For more information, see [Manage data visibility with filters](https://developers.google.com/workspace/sheets/api/guides/filters). */
4955
+ export type SheetsFilterView = {
4956
+ /** 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. This field is deprecated in favor of filter_specs. */
4957
+ criteria?: Record<string, SheetsFilterCriteria>;
4958
+ /** The sort order per column. Later specifications are used when values are equal in the earlier specifications. */
4959
+ sortSpecs?: Array<SheetsSortSpec>;
4960
+ /** The filter criteria for showing or hiding values per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence. */
4961
+ filterSpecs?: Array<SheetsFilterSpec>;
4962
+ /** The range this filter view covers. When writing, only one of range, named_range_id, or table_id may be set. */
4963
+ range?: SheetsGridRange;
4964
+ /** The ID of the filter view. */
4965
+ filterViewId?: number;
4966
+ /** The table this filter view is backed by, if any. When writing, only one of range, named_range_id, or table_id may be set. */
4967
+ tableId?: string;
4968
+ /** The name of the filter view. */
4969
+ title?: string;
4970
+ /** The named range this filter view is backed by, if any. When writing, only one of range, named_range_id, or table_id may be set. */
4971
+ namedRangeId?: string;
4972
+ };
4973
+ /** A range of values whose location is specified by a DataFilter. */
4974
+ export type SheetsDataFilterValueRange = {
4975
+ /** The major dimension of the values. */
4976
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
4977
+ /** The data filter describing the location of the values in the spreadsheet. */
4978
+ dataFilter?: SheetsDataFilter;
4979
+ /** The data to be written. If the provided values exceed any of the ranges matched by the data filter then the request fails. If the provided values are less than the matched ranges only the specified values are written, existing values in the matched ranges remain unaffected. */
4980
+ values?: Array<Array<unknown>>;
4981
+ };
4982
+ /** A single response from an update. */
4983
+ export type SheetsResponse = {
4984
+ /** A reply from removing rows containing duplicate values. */
4985
+ deleteDuplicates?: SheetsDeleteDuplicatesResponse;
4986
+ /** A reply from updating a data source. */
4987
+ updateDataSource?: SheetsUpdateDataSourceResponse;
4988
+ /** A reply from adding a named range. */
4989
+ addNamedRange?: SheetsAddNamedRangeResponse;
4990
+ /** A reply from cancelling data source object refreshes. */
4991
+ cancelDataSourceRefresh?: SheetsCancelDataSourceRefreshResponse;
4992
+ /** A reply from trimming whitespace. */
4993
+ trimWhitespace?: SheetsTrimWhitespaceResponse;
4994
+ /** A reply from updating a developer metadata entry. */
4995
+ updateDeveloperMetadata?: SheetsUpdateDeveloperMetadataResponse;
4996
+ /** The result of creating a reply. */
4997
+ addCommentReply?: SheetsAddCommentReplyResponse;
4998
+ /** A reply from adding a filter view. */
4999
+ addFilterView?: SheetsAddFilterViewResponse;
5000
+ /** A reply from duplicating a sheet. */
5001
+ duplicateSheet?: SheetsDuplicateSheetResponse;
5002
+ /** A reply from creating a developer metadata entry. */
5003
+ createDeveloperMetadata?: SheetsCreateDeveloperMetadataResponse;
5004
+ /** The result of creating a comment. */
5005
+ insertComment?: SheetsInsertCommentResponse;
5006
+ /** A reply from deleting a developer metadata entry. */
5007
+ deleteDeveloperMetadata?: SheetsDeleteDeveloperMetadataResponse;
5008
+ /** A reply from doing a find/replace. */
5009
+ findReplace?: SheetsFindReplaceResponse;
5010
+ /** A reply from adding a dimension group. */
5011
+ addDimensionGroup?: SheetsAddDimensionGroupResponse;
5012
+ /** A reply from refreshing data source objects. */
5013
+ refreshDataSource?: SheetsRefreshDataSourceResponse;
5014
+ /** A reply from deleting a dimension group. */
5015
+ deleteDimensionGroup?: SheetsDeleteDimensionGroupResponse;
5016
+ /** A reply from updating a conditional format rule. */
5017
+ updateConditionalFormatRule?: SheetsUpdateConditionalFormatRuleResponse;
5018
+ /** A reply from adding a chart. */
5019
+ addChart?: SheetsAddChartResponse;
5020
+ /** A reply from updating an embedded object's position. */
5021
+ updateEmbeddedObjectPosition?: SheetsUpdateEmbeddedObjectPositionResponse;
5022
+ /** A reply from deleting a conditional format rule. */
5023
+ deleteConditionalFormatRule?: SheetsDeleteConditionalFormatRuleResponse;
5024
+ /** A reply from adding a data source. */
5025
+ addDataSource?: SheetsAddDataSourceResponse;
5026
+ /** A reply from adding a table. */
5027
+ addTable?: SheetsAddTableResponse;
5028
+ /** A reply from adding a slicer. */
5029
+ addSlicer?: SheetsAddSlicerResponse;
5030
+ /** A reply from adding a protected range. */
5031
+ addProtectedRange?: SheetsAddProtectedRangeResponse;
5032
+ /** A reply from adding a banded range. */
5033
+ addBanding?: SheetsAddBandingResponse;
5034
+ /** A reply from duplicating a filter view. */
5035
+ duplicateFilterView?: SheetsDuplicateFilterViewResponse;
5036
+ /** A reply from adding a sheet. */
5037
+ addSheet?: SheetsAddSheetResponse;
5038
+ };
5039
+ /** The result of adding a chart to a spreadsheet. */
5040
+ export type SheetsAddChartResponse = {
5041
+ /** The newly added chart. */
5042
+ chart?: SheetsEmbeddedChart;
5043
+ };
5044
+ /** Duplicates a particular filter view. */
5045
+ export type SheetsDuplicateFilterViewRequest = {
5046
+ /** The ID of the filter being duplicated. */
5047
+ filterId?: number;
5048
+ };
5049
+ /** Formatting options for key value. */
5050
+ export type SheetsKeyValueFormat = {
5051
+ /** Specifies the horizontal text positioning of key value. This field is optional. If not specified, default positioning is used. */
5052
+ position?: SheetsTextPosition;
5053
+ /** Text formatting options for key value. The link field is not supported. */
5054
+ textFormat?: SheetsTextFormat;
5055
+ };
5056
+ /** Properties specific to a linked person. */
5057
+ export type SheetsPersonProperties = {
5058
+ /** Required. The email address linked to this person. This field is always present. */
5059
+ email?: string;
5060
+ /** Optional. The display format of the person chip. If not set, the default display format is used. */
5061
+ displayFormat?: "DISPLAY_FORMAT_UNSPECIFIED" | "DEFAULT" | "LAST_NAME_COMMA_FIRST_NAME" | "EMAIL";
5062
+ };
5063
+ /** A request to update properties of developer metadata. Updates the properties of the developer metadata selected by the filters to the values provided in the DeveloperMetadata resource. Callers must specify the properties they wish to update in the fields parameter, as well as specify at least one DataFilter matching the metadata they wish to update. */
5064
+ export type SheetsUpdateDeveloperMetadataRequest = {
5065
+ /** The filters matching the developer metadata entries to update. */
5066
+ dataFilters?: Array<SheetsDataFilter>;
5067
+ /** The value that all metadata matched by the data filters will be updated to. */
5068
+ developerMetadata?: SheetsDeveloperMetadata;
5069
+ /** The fields that should be updated. At least one field must be specified. The root `developerMetadata` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
5070
+ fields?: string;
5071
+ };
5072
+ /** The response from refreshing one or multiple data source objects. */
5073
+ export type SheetsRefreshDataSourceResponse = {
5074
+ /** All the refresh status for the data source object references specified in the request. If is_all is specified, the field contains only those in failure status. */
5075
+ statuses?: Array<SheetsRefreshDataSourceObjectExecutionStatus>;
5076
+ };
5077
+ /** Inserts a CommentThread into the spreadsheet. */
5078
+ export type SheetsInsertCommentRequest = {
5079
+ /** Optional. The email address of the assignee of the comment. Leave empty for a non-assigned comment. May not exceed 2048 UTF-8 code units. */
5080
+ assigneeEmailAddress?: string;
5081
+ /** The GridCoordinate in the sheet that is tied to this comment. */
5082
+ coordinate?: SheetsGridCoordinate;
5083
+ /** The text of the comment, as plain text. This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. */
5084
+ content?: string;
5085
+ };
5086
+ /** The result of duplicating a sheet. */
5087
+ export type SheetsDuplicateSheetResponse = {
5088
+ /** The properties of the duplicate sheet. */
5089
+ properties?: SheetsSheetProperties;
5090
+ };
5091
+ /** A scorecard chart. Scorecard charts are used to highlight key performance indicators, known as KPIs, on the spreadsheet. A scorecard chart can represent things like total sales, average cost, or a top selling item. You can specify a single data value, or aggregate over a range of data. Percentage or absolute difference from a baseline value can be highlighted, like changes over time. */
5092
+ export type SheetsScorecardChartSpec = {
5093
+ /** The number format source used in the scorecard chart. This field is optional. */
5094
+ numberFormatSource?: "CHART_NUMBER_FORMAT_SOURCE_UNDEFINED" | "FROM_DATA" | "CUSTOM";
5095
+ /** Formatting options for baseline value. This field is needed only if baseline_value_data is specified. */
5096
+ baselineValueFormat?: SheetsBaselineValueFormat;
5097
+ /** Custom formatting options for numeric key/baseline values in scorecard chart. This field is used only when number_format_source is set to CUSTOM. This field is optional. */
5098
+ customFormatOptions?: SheetsChartCustomNumberFormatOptions;
5099
+ /** The aggregation type for key and baseline chart data in scorecard chart. This field is not supported for data source charts. Use the ChartData.aggregateType field of the key_value_data or baseline_value_data instead for data source charts. This field is optional. */
5100
+ aggregateType?: "CHART_AGGREGATE_TYPE_UNSPECIFIED" | "AVERAGE" | "COUNT" | "MAX" | "MEDIAN" | "MIN" | "SUM";
5101
+ /** The data for scorecard key value. */
5102
+ keyValueData?: SheetsChartData;
5103
+ /** Formatting options for key value. */
5104
+ keyValueFormat?: SheetsKeyValueFormat;
5105
+ /** Value to scale scorecard key and baseline value. For example, a factor of 10 can be used to divide all values in the chart by 10. This field is optional. */
5106
+ scaleFactor?: number;
5107
+ /** The data for scorecard baseline value. This field is optional. */
5108
+ baselineValueData?: SheetsChartData;
5109
+ };
5110
+ /** Deletes a data source. The request also deletes the associated data source sheet, and unlinks all associated data source objects. */
5111
+ export type SheetsDeleteDataSourceRequest = {
5112
+ /** The ID of the data source to delete. */
5113
+ dataSourceId?: string;
5114
+ };
5115
+ /** A single interpolation point on a gradient conditional format. These pin the gradient color scale according to the color, type and value chosen. */
5116
+ export type SheetsInterpolationPoint = {
5117
+ /** How the value should be interpreted. */
5118
+ type?: "INTERPOLATION_POINT_TYPE_UNSPECIFIED" | "MIN" | "MAX" | "NUMBER" | "PERCENT" | "PERCENTILE";
5119
+ /** The color this interpolation point should use. If color is also set, this field takes precedence. */
5120
+ colorStyle?: SheetsColorStyle;
5121
+ /** The color this interpolation point should use. Deprecated: Use color_style. */
5122
+ color?: SheetsColor;
5123
+ /** The value this interpolation point uses. May be a formula. Unused if type is MIN or MAX. */
5124
+ value?: string;
5125
+ };
5126
+ /** Developer metadata associated with a location or object in a spreadsheet. For more information, see [Read, write, and search metadata](https://developers.google.com/workspace/sheets/api/guides/metadata). Developer metadata may be used to associate arbitrary data with various parts of a spreadsheet and it will remain associated at those locations as they move around and the spreadsheet is edited. For example, if developer metadata is associated with row 5 and another row is then subsequently inserted above row 5, that original metadata is still associated with the row it was first associated with (what is now row 6). If the associated object is deleted then its metadata is deleted too. */
5127
+ export type SheetsDeveloperMetadata = {
5128
+ /** The metadata key. There may be multiple metadata in a spreadsheet with the same key. Developer metadata must always have a key specified. */
5129
+ metadataKey?: string;
5130
+ /** The spreadsheet-scoped unique ID that identifies the metadata. IDs may be specified when metadata is created, otherwise one will be randomly generated and assigned. Must be positive. */
5131
+ metadataId?: number;
5132
+ /** The metadata visibility. Developer metadata must always have visibility specified. */
5133
+ visibility?: "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" | "DOCUMENT" | "PROJECT";
5134
+ /** Data associated with the metadata's key. */
5135
+ metadataValue?: string;
5136
+ /** The location where the metadata is associated. */
5137
+ location?: SheetsDeveloperMetadataLocation;
5138
+ };
5139
+ /** Adds a slicer to a sheet in the spreadsheet. */
5140
+ export type SheetsAddSlicerRequest = {
5141
+ /** The slicer that should be added to the spreadsheet, including the position where it should be placed. The slicerId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a slicer that already exists.) */
5142
+ slicer?: SheetsSlicer;
5143
+ };
5144
+ /** The result of adding a banded range. */
5145
+ export type SheetsAddBandingResponse = {
5146
+ /** The banded range that was added. */
5147
+ bandedRange?: SheetsBandedRange;
5148
+ };
5149
+ /** The table column. */
5150
+ export type SheetsTableColumnProperties = {
5151
+ /** The column name. */
5152
+ columnName?: string;
5153
+ /** The 0-based column index. This index is relative to its position in the table and is not necessarily the same as the column index in the sheet. */
5154
+ columnIndex?: number;
5155
+ /** The column data validation rule. Only set for dropdown column type. */
5156
+ dataValidationRule?: SheetsTableColumnDataValidationRule;
5157
+ /** The column type. */
5158
+ columnType?: "COLUMN_TYPE_UNSPECIFIED" | "DOUBLE" | "CURRENCY" | "PERCENT" | "DATE" | "TIME" | "DATE_TIME" | "TEXT" | "BOOLEAN" | "DROPDOWN" | "FILES_CHIP" | "PEOPLE_CHIP" | "FINANCE_CHIP" | "PLACE_CHIP" | "RATINGS_CHIP";
5159
+ };
5160
+ /** The specifications of a chart. */
5161
+ export type SheetsChartSpec = {
5162
+ /** If present, the field contains data source chart specific properties. */
5163
+ dataSourceChartProperties?: SheetsDataSourceChartProperties;
5164
+ /** A candlestick chart specification. */
5165
+ candlestickChart?: SheetsCandlestickChartSpec;
5166
+ /** A histogram chart specification. */
5167
+ histogramChart?: SheetsHistogramChartSpec;
5168
+ /** The order to sort the chart data by. Only a single sort spec is supported. Only supported for data source charts. */
5169
+ sortSpecs?: Array<SheetsSortSpec>;
5170
+ /** A bubble chart specification. */
5171
+ bubbleChart?: SheetsBubbleChartSpec;
5172
+ /** The title text position. This field is optional. */
5173
+ titleTextPosition?: SheetsTextPosition;
5174
+ /** An org chart specification. */
5175
+ orgChart?: SheetsOrgChartSpec;
5176
+ /** A basic chart specification, can be one of many kinds of charts. See BasicChartType for the list of all charts this supports. */
5177
+ basicChart?: SheetsBasicChartSpec;
5178
+ /** The subtitle of the chart. */
5179
+ subtitle?: string;
5180
+ /** 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.) */
5181
+ maximized?: boolean;
5182
+ /** A pie chart specification. */
5183
+ pieChart?: SheetsPieChartSpec;
5184
+ /** A waterfall chart specification. */
5185
+ waterfallChart?: SheetsWaterfallChartSpec;
5186
+ /** The title text format. Strikethrough, underline, and link are not supported. */
5187
+ titleTextFormat?: SheetsTextFormat;
5188
+ /** The subtitle text position. This field is optional. */
5189
+ subtitleTextPosition?: SheetsTextPosition;
5190
+ /** The title of the chart. */
5191
+ title?: string;
5192
+ /** A scorecard chart specification. */
5193
+ scorecardChart?: SheetsScorecardChartSpec;
5194
+ /** The background color of the entire chart. Not applicable to Org charts. Deprecated: Use background_color_style. */
5195
+ backgroundColor?: SheetsColor;
5196
+ /** The filters applied to the source data of the chart. Only supported for data source charts. */
5197
+ filterSpecs?: Array<SheetsFilterSpec>;
5198
+ /** Determines how the charts will use hidden rows or columns. */
5199
+ hiddenDimensionStrategy?: "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" | "SKIP_HIDDEN_ROWS_AND_COLUMNS" | "SKIP_HIDDEN_ROWS" | "SKIP_HIDDEN_COLUMNS" | "SHOW_ALL";
5200
+ /** The alternative text that describes the chart. This is often used for accessibility. */
5201
+ altText?: string;
5202
+ /** 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. */
5203
+ fontName?: string;
5204
+ /** The background color of the entire chart. Not applicable to Org charts. If background_color is also set, this field takes precedence. */
5205
+ backgroundColorStyle?: SheetsColorStyle;
5206
+ /** The subtitle text format. Strikethrough, underline, and link are not supported. */
5207
+ subtitleTextFormat?: SheetsTextFormat;
5208
+ /** A treemap chart specification. */
5209
+ treemapChart?: SheetsTreemapChartSpec;
5210
+ };
5211
+ /** Splits a column of text into multiple columns, based on a delimiter in each cell. */
5212
+ export type SheetsTextToColumnsRequest = {
5213
+ /** The delimiter type to use. */
5214
+ delimiterType?: "DELIMITER_TYPE_UNSPECIFIED" | "COMMA" | "SEMICOLON" | "PERIOD" | "SPACE" | "CUSTOM" | "AUTODETECT";
5215
+ /** The source data range. This must span exactly one column. */
5216
+ source?: SheetsGridRange;
5217
+ /** The delimiter to use. Used only if delimiterType is CUSTOM. */
5218
+ delimiter?: string;
5219
+ };
5220
+ /** A data source formula. */
5221
+ export type SheetsDataSourceFormula = {
5222
+ /** Output only. The data execution status. */
5223
+ dataExecutionStatus?: SheetsDataExecutionStatus;
5224
+ /** The ID of the data source the formula is associated with. */
5225
+ dataSourceId?: string;
5226
+ };
5227
+ /** A run of a text format. The format of this run continues until the start index of the next run. When updating, all fields must be set. */
5228
+ export type SheetsTextFormatRun = {
5229
+ /** The format of this run. Absent values inherit the cell's format. */
5230
+ format?: SheetsTextFormat;
5231
+ /** The zero-based character index where this run starts, in UTF-16 code units. */
5232
+ startIndex?: number;
5233
+ };
5234
+ /** 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". */
5235
+ export type SheetsBasicChartSeries = {
5236
+ /** 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. */
5237
+ targetAxis?: "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" | "BOTTOM_AXIS" | "LEFT_AXIS" | "RIGHT_AXIS";
5238
+ /** The data being visualized in this chart series. */
5239
+ series?: SheetsChartData;
5240
+ /** 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. */
5241
+ lineStyle?: SheetsLineStyle;
5242
+ /** The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. If color is also set, this field takes precedence. */
5243
+ colorStyle?: SheetsColorStyle;
5244
+ /** Style override settings for series data points. */
5245
+ styleOverrides?: Array<SheetsBasicSeriesDataPointStyleOverride>;
5246
+ /** The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. Deprecated: Use color_style. */
5247
+ color?: SheetsColor;
5248
+ /** Information about the data labels for this series. */
5249
+ dataLabel?: SheetsDataLabel;
5250
+ /** The style for points associated with this series. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, a default point style is used. */
5251
+ pointStyle?: SheetsPointStyle;
5252
+ /** 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. */
5253
+ type?: "BASIC_CHART_TYPE_UNSPECIFIED" | "BAR" | "LINE" | "AREA" | "COLUMN" | "SCATTER" | "COMBO" | "STEPPED_AREA";
5254
+ };
5255
+ /** Sorts data in rows based on a sort order per column. */
5256
+ export type SheetsSortRangeRequest = {
5257
+ /** The range to sort. */
5258
+ range?: SheetsGridRange;
5259
+ /** The sort order per column. Later specifications are used when values are equal in the earlier specifications. */
5260
+ sortSpecs?: Array<SheetsSortSpec>;
5261
+ };
5262
+ /** A pivot table. */
5263
+ export type SheetsPivotTable = {
5264
+ /** An optional mapping of filters per source column offset. The filters are applied before aggregating data into the pivot table. The map's key is the column offset of the source range that you want to filter, and the value is the criteria for that column. For example, if the source was `C10:E15`, a key of `0` will have the filter for column `C`, whereas the key `1` is for column `D`. This field is deprecated in favor of filter_specs. */
5265
+ criteria?: Record<string, SheetsPivotFilterCriteria>;
5266
+ /** Output only. The data execution status for data source pivot tables. */
5267
+ dataExecutionStatus?: SheetsDataExecutionStatus;
5268
+ /** The range the pivot table is reading data from. */
5269
+ source?: SheetsGridRange;
5270
+ /** A list of values to include in the pivot table. */
5271
+ values?: Array<SheetsPivotValue>;
5272
+ /** The ID of the data source the pivot table is reading data from. */
5273
+ dataSourceId?: string;
5274
+ /** Each row grouping in the pivot table. */
5275
+ rows?: Array<SheetsPivotGroup>;
5276
+ /** The filters applied to the source columns before aggregating data for the pivot table. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence. */
5277
+ filterSpecs?: Array<SheetsPivotFilterSpec>;
5278
+ /** Whether values should be listed horizontally (as columns) or vertically (as rows). */
5279
+ valueLayout?: "HORIZONTAL" | "VERTICAL";
5280
+ /** Each column grouping in the pivot table. */
5281
+ columns?: Array<SheetsPivotGroup>;
5282
+ };
5283
+ /** Updates all cells in a range with new data. */
5284
+ export type SheetsUpdateCellsRequest = {
5285
+ /** The coordinate to start writing data at. Any number of rows and columns (including a different number of columns per row) may be written. */
5286
+ start?: SheetsGridCoordinate;
5287
+ /** 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. */
5288
+ fields?: string;
5289
+ /** The data to write. */
5290
+ rows?: Array<SheetsRowData>;
5291
+ /** The range to write data to. If the data in rows does not cover the entire requested range, the fields matching those set in fields will be cleared. */
5292
+ range?: SheetsGridRange;
5293
+ };
5294
+ /** The execution status of refreshing one data source object. */
5295
+ export type SheetsRefreshDataSourceObjectExecutionStatus = {
5296
+ /** The data execution status. */
5297
+ dataExecutionStatus?: SheetsDataExecutionStatus;
5298
+ /** Reference to a data source object being refreshed. */
5299
+ reference?: SheetsDataSourceObjectReference;
5300
+ };
5301
+ /** Sets the basic filter associated with a sheet. */
5302
+ export type SheetsSetBasicFilterRequest = {
5303
+ /** The filter to set. */
5304
+ filter?: SheetsBasicFilter;
5305
+ };
5306
+ /** Specifies a custom BigQuery query. */
5307
+ export type SheetsBigQueryQuerySpec = {
5308
+ /** The raw query string. */
5309
+ rawQuery?: string;
5310
+ };
5311
+ /** Schedule for refreshing the data source. Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8 AM , the refresh will take place between 8 AM and 12 PM every day. */
5312
+ export type SheetsDataSourceRefreshSchedule = {
5313
+ /** Daily refresh schedule. */
5314
+ dailySchedule?: SheetsDataSourceRefreshDailySchedule;
5315
+ /** Weekly refresh schedule. */
5316
+ weeklySchedule?: SheetsDataSourceRefreshWeeklySchedule;
5317
+ /** Output only. The time interval of the next run. */
5318
+ nextRun?: SheetsInterval;
5319
+ /** True if the refresh schedule is enabled, or false otherwise. */
5320
+ enabled?: boolean;
5321
+ /** The scope of the refresh. Must be ALL_DATA_SOURCES. */
5322
+ refreshScope?: "DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED" | "ALL_DATA_SOURCES";
5323
+ /** Monthly refresh schedule. */
5324
+ monthlySchedule?: SheetsDataSourceRefreshMonthlySchedule;
5325
+ };
5326
+ /** Properties that describe the style of a line. */
5327
+ export type SheetsLineStyle = {
5328
+ /** The thickness of the line, in px. */
5329
+ width?: number;
5330
+ /** The dash type of the line. */
5331
+ type?: "LINE_DASH_TYPE_UNSPECIFIED" | "INVISIBLE" | "CUSTOM" | "SOLID" | "DOTTED" | "MEDIUM_DASHED" | "MEDIUM_DASHED_DOTTED" | "LONG_DASHED" | "LONG_DASHED_DOTTED";
5332
+ };
5333
+ /** The specifications of a slicer. */
5334
+ export type SheetsSlicerSpec = {
5335
+ /** The filtering criteria of the slicer. */
5336
+ filterCriteria?: SheetsFilterCriteria;
5337
+ /** The title of the slicer. */
5338
+ title?: string;
5339
+ /** The background color of the slicer. Deprecated: Use background_color_style. */
5340
+ backgroundColor?: SheetsColor;
5341
+ /** True if the filter should apply to pivot tables. If not set, default to `True`. */
5342
+ applyToPivotTables?: boolean;
5343
+ /** The zero-based column index in the data table on which the filter is applied to. */
5344
+ columnIndex?: number;
5345
+ /** The text format of title in the slicer. The link field is not supported. */
5346
+ textFormat?: SheetsTextFormat;
5347
+ /** The data range of the slicer. */
5348
+ dataRange?: SheetsGridRange;
5349
+ /** The background color of the slicer. If background_color is also set, this field takes precedence. */
5350
+ backgroundColorStyle?: SheetsColorStyle;
5351
+ /** The horizontal alignment of title in the slicer. If unspecified, defaults to `LEFT` */
5352
+ horizontalAlignment?: "HORIZONTAL_ALIGN_UNSPECIFIED" | "LEFT" | "CENTER" | "RIGHT";
5353
+ };
5354
+ /** The result of adding a filter view. */
5355
+ export type SheetsAddFilterViewResponse = {
5356
+ /** The newly added filter view. */
5357
+ filter?: SheetsFilterView;
5358
+ };
5359
+ /** A single kind of update to apply to a spreadsheet. */
5360
+ export type SheetsRequest = {
5361
+ /** Duplicates a filter view. */
5362
+ duplicateFilterView?: SheetsDuplicateFilterViewRequest;
5363
+ /** Inserts new rows or columns in a sheet. */
5364
+ insertDimension?: SheetsInsertDimensionRequest;
5365
+ /** Updates dimensions' properties. */
5366
+ updateDimensionProperties?: SheetsUpdateDimensionPropertiesRequest;
5367
+ /** Appends cells after the last row with data in a sheet. */
5368
+ appendCells?: SheetsAppendCellsRequest;
5369
+ /** Cancels refreshes of one or multiple data sources and associated dbobjects. */
5370
+ cancelDataSourceRefresh?: SheetsCancelDataSourceRefreshRequest;
5371
+ /** Updates an existing developer metadata entry */
5372
+ updateDeveloperMetadata?: SheetsUpdateDeveloperMetadataRequest;
5373
+ /** Updates the properties of a filter view. */
5374
+ updateFilterView?: SheetsUpdateFilterViewRequest;
5375
+ /** Deletes a group over the specified range. */
5376
+ deleteDimensionGroup?: SheetsDeleteDimensionGroupRequest;
5377
+ /** Updates an embedded object's (e.g. chart, image) position. */
5378
+ updateEmbeddedObjectPosition?: SheetsUpdateEmbeddedObjectPositionRequest;
5379
+ /** Automatically fills in more data based on existing data. */
5380
+ autoFill?: SheetsAutoFillRequest;
5381
+ /** Automatically resizes one or more dimensions based on the contents of the cells in that dimension. */
5382
+ autoResizeDimensions?: SheetsAutoResizeDimensionsRequest;
5383
+ /** Adds a reply to a CommentThread. */
5384
+ addCommentReply?: SheetsAddCommentReplyRequest;
5385
+ /** Deletes a data source. */
5386
+ deleteDataSource?: SheetsDeleteDataSourceRequest;
5387
+ /** Removes a banded range */
5388
+ deleteBanding?: SheetsDeleteBandingRequest;
5389
+ /** Updates an existing post (head post or reply) of a CommentThread. */
5390
+ updateCommentPost?: SheetsUpdateCommentPostRequest;
5391
+ /** Adds a new banded range */
5392
+ addBanding?: SheetsAddBandingRequest;
5393
+ /** Randomizes the order of the rows in a range. */
5394
+ randomizeRange?: SheetsRandomizeRangeRequest;
5395
+ /** Creates a group over the specified range. */
5396
+ addDimensionGroup?: SheetsAddDimensionGroupRequest;
5397
+ /** Pastes data (HTML or delimited) into a sheet. */
5398
+ pasteData?: SheetsPasteDataRequest;
5399
+ /** Creates new developer metadata */
5400
+ createDeveloperMetadata?: SheetsCreateDeveloperMetadataRequest;
5401
+ /** Updates a table. */
5402
+ updateTable?: SheetsUpdateTableRequest;
5403
+ /** Sets data validation for one or more cells. */
5404
+ setDataValidation?: SheetsSetDataValidationRequest;
5405
+ /** Updates the state of the specified group. */
5406
+ updateDimensionGroup?: SheetsUpdateDimensionGroupRequest;
5407
+ /** Repeats a single cell across a range. */
5408
+ repeatCell?: SheetsRepeatCellRequest;
5409
+ /** Deletes a protected range. */
5410
+ deleteProtectedRange?: SheetsDeleteProtectedRangeRequest;
5411
+ /** Updates an embedded object's border. */
5412
+ updateEmbeddedObjectBorder?: SheetsUpdateEmbeddedObjectBorderRequest;
5413
+ /** Updates the spreadsheet's properties. */
5414
+ updateSpreadsheetProperties?: SheetsUpdateSpreadsheetPropertiesRequest;
5415
+ /** Deletes a named range. */
5416
+ deleteNamedRange?: SheetsDeleteNamedRangeRequest;
5417
+ /** Inserts a CommentThread into the spreadsheet. */
5418
+ insertComment?: SheetsInsertCommentRequest;
5419
+ /** Adds a filter view. */
5420
+ addFilterView?: SheetsAddFilterViewRequest;
5421
+ /** Duplicates a sheet. */
5422
+ duplicateSheet?: SheetsDuplicateSheetRequest;
5423
+ /** Adds a sheet. */
5424
+ addSheet?: SheetsAddSheetRequest;
5425
+ /** Trims cells of whitespace (such as spaces, tabs, or new lines). */
5426
+ trimWhitespace?: SheetsTrimWhitespaceRequest;
5427
+ /** Copies data from one area and pastes it to another. */
5428
+ copyPaste?: SheetsCopyPasteRequest;
5429
+ /** Adds a protected range. */
5430
+ addProtectedRange?: SheetsAddProtectedRangeRequest;
5431
+ /** Clears the basic filter on a sheet. */
5432
+ clearBasicFilter?: SheetsClearBasicFilterRequest;
5433
+ /** Deletes rows or columns in a sheet. */
5434
+ deleteDimension?: SheetsDeleteDimensionRequest;
5435
+ /** Updates a banded range */
5436
+ updateBanding?: SheetsUpdateBandingRequest;
5437
+ /** Updates an existing conditional format rule. */
5438
+ updateConditionalFormatRule?: SheetsUpdateConditionalFormatRuleRequest;
5439
+ /** Updates a data source. */
5440
+ updateDataSource?: SheetsUpdateDataSourceRequest;
5441
+ /** Adds a named range. */
5442
+ addNamedRange?: SheetsAddNamedRangeRequest;
5443
+ /** Sets the basic filter on a sheet. */
5444
+ setBasicFilter?: SheetsSetBasicFilterRequest;
5445
+ /** Adds a chart. */
5446
+ addChart?: SheetsAddChartRequest;
5447
+ /** Deletes a sheet. */
5448
+ deleteSheet?: SheetsDeleteSheetRequest;
5449
+ /** Adds a new conditional format rule. */
5450
+ addConditionalFormatRule?: SheetsAddConditionalFormatRuleRequest;
5451
+ /** Sorts data in a range. */
5452
+ sortRange?: SheetsSortRangeRequest;
5453
+ /** Updates a chart's specifications. */
5454
+ updateChartSpec?: SheetsUpdateChartSpecRequest;
5455
+ /** Updates many cells at once. */
5456
+ updateCells?: SheetsUpdateCellsRequest;
5457
+ /** Adds a data source. */
5458
+ addDataSource?: SheetsAddDataSourceRequest;
5459
+ /** Updates a slicer's specifications. */
5460
+ updateSlicerSpec?: SheetsUpdateSlicerSpecRequest;
5461
+ /** Updates the borders in a range of cells. */
5462
+ updateBorders?: SheetsUpdateBordersRequest;
5463
+ /** Refreshes one or multiple data sources and associated dbobjects. */
5464
+ refreshDataSource?: SheetsRefreshDataSourceRequest;
5465
+ /** Unmerges merged cells. */
5466
+ unmergeCells?: SheetsUnmergeCellsRequest;
5467
+ /** Deletes developer metadata */
5468
+ deleteDeveloperMetadata?: SheetsDeleteDeveloperMetadataRequest;
5469
+ /** Moves rows or columns to another location in a sheet. */
5470
+ moveDimension?: SheetsMoveDimensionRequest;
5471
+ /** Appends dimensions to the end of a sheet. */
5472
+ appendDimension?: SheetsAppendDimensionRequest;
5473
+ /** Inserts new cells in a sheet, shifting the existing cells. */
5474
+ insertRange?: SheetsInsertRangeRequest;
5475
+ /** Adds a table. */
5476
+ addTable?: SheetsAddTableRequest;
5477
+ /** Updates a sheet's properties. */
5478
+ updateSheetProperties?: SheetsUpdateSheetPropertiesRequest;
5479
+ /** Finds and replaces occurrences of some text with other text. */
5480
+ findReplace?: SheetsFindReplaceRequest;
5481
+ /** Converts a column of text into many columns of text. */
5482
+ textToColumns?: SheetsTextToColumnsRequest;
5483
+ /** Updates a named range. */
5484
+ updateNamedRange?: SheetsUpdateNamedRangeRequest;
5485
+ /** Deletes a range of cells from a sheet, shifting the remaining cells. */
5486
+ deleteRange?: SheetsDeleteRangeRequest;
5487
+ /** Deletes a CommentThread. */
5488
+ deleteComment?: SheetsDeleteCommentRequest;
5489
+ /** Merges cells together. */
5490
+ mergeCells?: SheetsMergeCellsRequest;
5491
+ /** Deletes a filter view from a sheet. */
5492
+ deleteFilterView?: SheetsDeleteFilterViewRequest;
5493
+ /** Deletes an existing conditional format rule. */
5494
+ deleteConditionalFormatRule?: SheetsDeleteConditionalFormatRuleRequest;
5495
+ /** Deletes a reply Post from a CommentThread */
5496
+ deleteCommentReply?: SheetsDeleteCommentReplyRequest;
5497
+ /** Updates a protected range. */
5498
+ updateProtectedRange?: SheetsUpdateProtectedRangeRequest;
5499
+ /** Removes rows containing duplicate values in specified columns of a cell range. */
5500
+ deleteDuplicates?: SheetsDeleteDuplicatesRequest;
5501
+ /** Deletes an embedded object (e.g, chart, image) in a sheet. */
5502
+ deleteEmbeddedObject?: SheetsDeleteEmbeddedObjectRequest;
5503
+ /** A request for deleting a table. */
5504
+ deleteTable?: SheetsDeleteTableRequest;
5505
+ /** Cuts data from one area and pastes it to another. */
5506
+ cutPaste?: SheetsCutPasteRequest;
5507
+ /** Adds a slicer. */
5508
+ addSlicer?: SheetsAddSlicerRequest;
5509
+ };
5510
+ /** A combination of a source range and how to extend that source. */
5511
+ export type SheetsSourceAndDestination = {
5512
+ /** The number of rows or columns that data should be filled into. Positive numbers expand beyond the last row or last column of the source. Negative numbers expand before the first row or first column of the source. */
5513
+ fillLength?: number;
5514
+ /** The location of the data to use as the source of the autofill. */
5515
+ source?: SheetsGridRange;
5516
+ /** The dimension that data should be filled into. */
5517
+ dimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
5518
+ };
5519
+ /** A coordinate in a sheet. All indexes are zero-based. */
5520
+ export type SheetsGridCoordinate = {
5521
+ /** The column index of the coordinate. */
5522
+ columnIndex?: number;
5523
+ /** The sheet this coordinate is on. */
5524
+ sheetId?: number;
5525
+ /** The row index of the coordinate. */
5526
+ rowIndex?: number;
5527
+ };
5528
+ /** Adds a named range to the spreadsheet. */
5529
+ export type SheetsAddNamedRangeRequest = {
5530
+ /** 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.) */
5531
+ namedRange?: SheetsNamedRange;
5532
+ };
5533
+ /** Properties of a data source chart. */
5534
+ export type SheetsDataSourceChartProperties = {
5535
+ /** Output only. The data execution status. */
5536
+ dataExecutionStatus?: SheetsDataExecutionStatus;
5537
+ /** ID of the data source that the chart is associated with. */
5538
+ dataSourceId?: string;
5539
+ };
5540
+ /** Specifies a BigQuery table definition. Only [native tables](https://cloud.google.com/bigquery/docs/tables-intro) are allowed. */
5541
+ export type SheetsBigQueryTableSpec = {
5542
+ /** The BigQuery dataset id. */
5543
+ datasetId?: string;
5544
+ /** The ID of a BigQuery project the table belongs to. If not specified, the project_id is assumed. */
5545
+ tableProjectId?: string;
5546
+ /** The BigQuery table id. */
5547
+ tableId?: string;
5548
+ };
5549
+ /** Updates a chart's specifications. (This does not move or resize a chart. To move or resize a chart, use UpdateEmbeddedObjectPositionRequest.) */
5550
+ export type SheetsUpdateChartSpecRequest = {
5551
+ /** The specification to apply to the chart. */
5552
+ spec?: SheetsChartSpec;
5553
+ /** The ID of the chart to update. */
5554
+ chartId?: number;
5555
+ };
5556
+ /** 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. */
5557
+ export type SheetsAddSheetRequest = {
5558
+ /** 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.) */
5559
+ properties?: SheetsSheetProperties;
5560
+ };
5561
+ /** Properties about a dimension. */
5562
+ export type SheetsDimensionProperties = {
5563
+ /** The developer metadata associated with a single row or column. */
5564
+ developerMetadata?: Array<SheetsDeveloperMetadata>;
5565
+ /** True if this dimension is explicitly hidden. */
5566
+ hiddenByUser?: boolean;
5567
+ /** The height (if a row) or width (if a column) of the dimension in pixels. */
5568
+ pixelSize?: number;
5569
+ /** Output only. If set, this is a column in a data source sheet. */
5570
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
5571
+ /** True if this dimension is being filtered. This field is read-only. */
5572
+ hiddenByFilter?: boolean;
5573
+ };
5574
+ /** The specification for a basic chart. See BasicChartType for the list of charts this supports. */
5575
+ export type SheetsBasicChartSpec = {
5576
+ /** The domain of data this is charting. Only a single domain is supported. */
5577
+ domains?: Array<SheetsBasicChartDomain>;
5578
+ /** The behavior of tooltips and data highlighting when hovering on data and chart area. */
5579
+ compareMode?: "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" | "DATUM" | "CATEGORY";
5580
+ /** Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. These data labels can only be set when chart_type is one of AREA, BAR, COLUMN, COMBO or STEPPED_AREA and stacked_type is either STACKED or PERCENT_STACKED. In addition, for COMBO, this will only be supported if there is only one type of stackable series type or one type has more series than the others and each of the other types have no more than one series. For example, if a chart has two stacked bar series and one area series, the total data labels will be supported. If it has three bar series and two area series, total data labels are not allowed. Neither CUSTOM nor placement can be set on the total_data_label. */
5581
+ totalDataLabel?: SheetsDataLabel;
5582
+ /** The axis on the chart. */
5583
+ axis?: Array<SheetsBasicChartAxis>;
5584
+ /** The type of the chart. */
5585
+ chartType?: "BASIC_CHART_TYPE_UNSPECIFIED" | "BAR" | "LINE" | "AREA" | "COLUMN" | "SCATTER" | "COMBO" | "STEPPED_AREA";
5586
+ /** 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.) */
5587
+ headerCount?: number;
5588
+ /** The position of the chart legend. */
5589
+ legendPosition?: "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" | "BOTTOM_LEGEND" | "LEFT_LEGEND" | "RIGHT_LEGEND" | "TOP_LEGEND" | "NO_LEGEND";
5590
+ /** True to make the chart 3D. Applies to Bar and Column charts. */
5591
+ threeDimensional?: boolean;
5592
+ /** The stacked type for charts that support vertical stacking. Applies to Area, Bar, Column, Combo, and Stepped Area charts. */
5593
+ stackedType?: "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" | "NOT_STACKED" | "STACKED" | "PERCENT_STACKED";
5594
+ /** 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. */
5595
+ interpolateNulls?: boolean;
5596
+ /** Gets whether all lines should be rendered smooth or straight by default. Applies to Line charts. */
5597
+ lineSmoothing?: boolean;
5598
+ /** The data this chart is visualizing. */
5599
+ series?: Array<SheetsBasicChartSeries>;
5600
+ };
5601
+ /** Refreshes one or multiple data source objects in the spreadsheet by the specified references. The request requires an additional `bigquery.readonly` OAuth scope if you are refreshing a BigQuery data source. If there are multiple refresh requests referencing the same data source objects in one batch, only the last refresh request is processed, and all those requests will have the same response accordingly. */
5602
+ export type SheetsRefreshDataSourceRequest = {
5603
+ /** Reference to a DataSource. If specified, refreshes all associated data source objects for the data source. */
5604
+ dataSourceId?: string;
5605
+ /** References to data source objects to refresh. */
5606
+ references?: SheetsDataSourceObjectReferences;
5607
+ /** Refreshes all existing data source objects in the spreadsheet. */
5608
+ isAll?: boolean;
5609
+ /** Refreshes the data source objects regardless of the current state. If not set and a referenced data source object was in error state, the refresh will fail immediately. */
5610
+ force?: boolean;
5611
+ };
5612
+ /** Allows you to organize numeric values in a source data column into buckets of constant size. */
5613
+ export type SheetsChartHistogramRule = {
5614
+ /** The minimum value at which items are placed into buckets. Values that are less than the minimum are grouped into a single bucket. If omitted, it is determined by the minimum item value. */
5615
+ minValue?: number;
5616
+ /** The maximum value at which items are placed into buckets. Values greater than the maximum are grouped into a single bucket. If omitted, it is determined by the maximum item value. */
5617
+ maxValue?: number;
5618
+ /** The size of the buckets that are created. Must be positive. */
5619
+ intervalSize?: number;
5620
+ };
5621
+ /** Updates an existing protected range with the specified protectedRangeId. */
5622
+ export type SheetsUpdateProtectedRangeRequest = {
5623
+ /** The protected range to update with the new properties. */
5624
+ protectedRange?: SheetsProtectedRange;
5625
+ /** The fields that should be updated. At least one field must be specified. The root `protectedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
5626
+ fields?: string;
5627
+ };
5628
+ /** An error in a cell. */
5629
+ export type SheetsErrorValue = {
5630
+ /** A message with more information about the error (in the spreadsheet's locale). */
5631
+ message?: string;
5632
+ /** The type of error. */
5633
+ type?: "ERROR_TYPE_UNSPECIFIED" | "ERROR" | "NULL_VALUE" | "DIVIDE_BY_ZERO" | "VALUE" | "REF" | "NAME" | "NUM" | "N_A" | "LOADING";
5634
+ };
5635
+ /** Inserts a reply Post into a CommentThread. */
5636
+ export type SheetsAddCommentReplyRequest = {
5637
+ /** The ID of the CommentThread to add the reply to. */
5638
+ commentId?: string;
5639
+ /** The Post representing the reply. */
5640
+ post?: SheetsPost;
5641
+ };
5642
+ /** A slicer in a sheet. */
5643
+ export type SheetsSlicer = {
5644
+ /** The specification of the slicer. */
5645
+ spec?: SheetsSlicerSpec;
5646
+ /** The ID of the slicer. */
5647
+ slicerId?: number;
5648
+ /** The position of the slicer. Note that slicer can be positioned only on existing sheet. Also, width and height of slicer can be automatically adjusted to keep it within permitted limits. */
5649
+ position?: SheetsEmbeddedObjectPosition;
5650
+ };
5651
+ /** The location an object is overlaid on top of a grid. */
5652
+ export type SheetsOverlayPosition = {
5653
+ /** The height of the object, in pixels. Defaults to 371. */
5654
+ heightPixels?: number;
5655
+ /** The cell the object is anchored to. */
5656
+ anchorCell?: SheetsGridCoordinate;
5657
+ /** The vertical offset, in pixels, that the object is offset from the anchor cell. */
5658
+ offsetYPixels?: number;
5659
+ /** The width of the object, in pixels. Defaults to 600. */
5660
+ widthPixels?: number;
5661
+ /** The horizontal offset, in pixels, that the object is offset from the anchor cell. */
5662
+ offsetXPixels?: number;
5663
+ };
5664
+ /** A reply to a developer metadata search request. */
5665
+ export type SheetsSearchDeveloperMetadataResponse = {
5666
+ /** The metadata matching the criteria of the search request. */
5667
+ matchedDeveloperMetadata?: Array<SheetsMatchedDeveloperMetadata>;
5668
+ };
5669
+ /** A request to delete developer metadata. */
5670
+ export type SheetsDeleteDeveloperMetadataRequest = {
5671
+ /** The data filter describing the criteria used to select which developer metadata entry to delete. */
5672
+ dataFilter?: SheetsDataFilter;
5673
+ };
5674
+ /** The data included in a domain or series. */
5675
+ export type SheetsChartData = {
5676
+ /** The source ranges of the data. */
5677
+ sourceRange?: SheetsChartSourceRange;
5678
+ /** The rule to group the data by if the ChartData backs the domain of a data source chart. Only supported for data source charts. */
5679
+ groupRule?: SheetsChartGroupRule;
5680
+ /** The aggregation type for the series of a data source chart. Only supported for data source charts. */
5681
+ aggregateType?: "CHART_AGGREGATE_TYPE_UNSPECIFIED" | "AVERAGE" | "COUNT" | "MAX" | "MEDIAN" | "MIN" | "SUM";
5682
+ /** The reference to the data source column that the data reads from. */
5683
+ columnReference?: SheetsDataSourceColumnReference;
5684
+ };
5685
+ /** The request for updating more than one range of values in a spreadsheet. */
5686
+ export type SheetsBatchUpdateValuesRequest = {
5687
+ /** 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 SERIAL_NUMBER. */
5688
+ responseDateTimeRenderOption?: "SERIAL_NUMBER" | "FORMATTED_STRING";
5689
+ /** How the input data should be interpreted. */
5690
+ valueInputOption?: "INPUT_VALUE_OPTION_UNSPECIFIED" | "RAW" | "USER_ENTERED";
5691
+ /** The new values to apply to the spreadsheet. */
5692
+ data?: Array<SheetsValueRange>;
5693
+ /** Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. */
5694
+ responseValueRenderOption?: "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA";
5695
+ /** 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 contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns). */
5696
+ includeValuesInResponse?: boolean;
5697
+ };
5698
+ /** Copies data from the source to the destination. */
5699
+ export type SheetsCopyPasteRequest = {
5700
+ /** 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). */
5701
+ destination?: SheetsGridRange;
5702
+ /** What kind of data to paste. */
5703
+ pasteType?: "PASTE_NORMAL" | "PASTE_VALUES" | "PASTE_FORMAT" | "PASTE_NO_BORDERS" | "PASTE_FORMULA" | "PASTE_DATA_VALIDATION" | "PASTE_CONDITIONAL_FORMATTING";
5704
+ /** How that data should be oriented when pasting. */
5705
+ pasteOrientation?: "NORMAL" | "TRANSPOSE";
5706
+ /** The source range to copy. */
5707
+ source?: SheetsGridRange;
5708
+ };
5709
+ /** A protected range. */
5710
+ export type SheetsProtectedRange = {
5711
+ /** The description of this protected range. */
5712
+ description?: string;
5713
+ /** The named range this protected range is backed by, if any. When writing, only one of range or named_range_id or table_id may be set. */
5714
+ namedRangeId?: string;
5715
+ /** The list of unprotected ranges within a protected sheet. Unprotected ranges are only supported on protected sheets. */
5716
+ unprotectedRanges?: Array<SheetsGridRange>;
5717
+ /** The users and groups with edit access to the protected range. This field is only visible to users with edit access to the protected range and the document. Editors are not supported with warning_only protection. */
5718
+ editors?: SheetsEditors;
5719
+ /** The range that is being protected. The range may be fully unbounded, in which case this is considered a protected sheet. When writing, only one of range or named_range_id or table_id may be set. */
5720
+ range?: SheetsGridRange;
5721
+ /** True if this protected range will show a warning when editing. Warning-based protection means that every user can edit data in the protected range, except editing will prompt a warning asking the user to confirm the edit. When writing: if this field is true, then editors are ignored. Additionally, if this field is changed from true to false and the `editors` field is not set (nor included in the field mask), then the editors will be set to all the editors in the document. */
5722
+ warningOnly?: boolean;
5723
+ /** The table this protected range is backed by, if any. When writing, only one of range or named_range_id or table_id may be set. */
5724
+ tableId?: string;
5725
+ /** True if the user who requested this protected range can edit the protected area. This field is read-only. */
5726
+ requestingUserCanEdit?: boolean;
5727
+ /** The ID of the protected range. This field is read-only. */
5728
+ protectedRangeId?: number;
5729
+ };
5730
+ /** A histogram series containing the series color and data. */
5731
+ export type SheetsHistogramSeries = {
5732
+ /** The color of the column representing this series in each bucket. This field is optional. If bar_color is also set, this field takes precedence. */
5733
+ barColorStyle?: SheetsColorStyle;
5734
+ /** The data for this histogram series. */
5735
+ data?: SheetsChartData;
5736
+ /** The color of the column representing this series in each bucket. This field is optional. Deprecated: Use bar_color_style. */
5737
+ barColor?: SheetsColor;
5738
+ };
5739
+ /** Updates a table in the spreadsheet. */
5740
+ export type SheetsUpdateTableRequest = {
5741
+ /** Required. The table to update. */
5742
+ table?: SheetsTable;
5743
+ /** Required. The fields that should be updated. At least one field must be specified. The root `table` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
5744
+ fields?: string;
5745
+ };
5746
+ /** A pie chart. */
5747
+ export type SheetsPieChartSpec = {
5748
+ /** Where the legend of the pie chart should be drawn. */
5749
+ legendPosition?: "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" | "BOTTOM_LEGEND" | "LEFT_LEGEND" | "RIGHT_LEGEND" | "TOP_LEGEND" | "NO_LEGEND" | "LABELED_LEGEND";
5750
+ /** True if the pie is three dimensional. */
5751
+ threeDimensional?: boolean;
5752
+ /** The data that covers the one and only series of the pie chart. */
5753
+ series?: SheetsChartData;
5754
+ /** The size of the hole in the pie chart. */
5755
+ pieHole?: number;
5756
+ /** The data that covers the domain of the pie chart. */
5757
+ domain?: SheetsChartData;
5758
+ };
5759
+ /** The response from creating developer metadata. */
5760
+ export type SheetsCreateDeveloperMetadataResponse = {
5761
+ /** The developer metadata that was created. */
5762
+ developerMetadata?: SheetsDeveloperMetadata;
5763
+ };
5764
+ /** Represents spreadsheet theme */
5765
+ export type SheetsSpreadsheetTheme = {
5766
+ /** Name of the primary font family. */
5767
+ primaryFontFamily?: string;
5768
+ /** The spreadsheet theme color pairs. To update you must provide all theme color pairs. */
5769
+ themeColors?: Array<SheetsThemeColorPair>;
5770
+ };
5771
+ /** The result of adding a table. */
5772
+ export type SheetsAddTableResponse = {
5773
+ /** Output only. The table that was added. */
5774
+ table?: SheetsTable;
5775
+ };
5776
+ /** Information about an external data source in the spreadsheet. */
5777
+ export type SheetsDataSource = {
5778
+ /** The spreadsheet-scoped unique ID that identifies the data source. Example: 1080547365. */
5779
+ dataSourceId?: string;
5780
+ /** The DataSourceSpec for the data source connected with this spreadsheet. */
5781
+ spec?: SheetsDataSourceSpec;
5782
+ /** All calculated columns in the data source. */
5783
+ calculatedColumns?: Array<SheetsDataSourceColumn>;
5784
+ /** The ID of the Sheet connected with the data source. The field cannot be changed once set. When creating a data source, an associated DATA_SOURCE sheet is also created, if the field is not specified, the ID of the created sheet will be randomly generated. */
5785
+ sheetId?: number;
5786
+ };
5787
+ /** A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side. */
5788
+ export type SheetsDimensionRange = {
5789
+ /** The dimension of the span. */
5790
+ dimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
5791
+ /** The sheet this span is on. */
5792
+ sheetId?: number;
5793
+ /** The end (exclusive) of the span, or not set if unbounded. */
5794
+ endIndex?: number;
5795
+ /** The start (inclusive) of the span, or not set if unbounded. */
5796
+ startIndex?: number;
5797
+ };
5798
+ /** A pair mapping a spreadsheet theme color type to the concrete color it represents. */
5799
+ export type SheetsThemeColorPair = {
5800
+ /** The type of the spreadsheet theme color. */
5801
+ colorType?: "THEME_COLOR_TYPE_UNSPECIFIED" | "TEXT" | "BACKGROUND" | "ACCENT1" | "ACCENT2" | "ACCENT3" | "ACCENT4" | "ACCENT5" | "ACCENT6" | "LINK";
5802
+ /** The concrete color corresponding to the theme color type. */
5803
+ color?: SheetsColorStyle;
5804
+ };
5805
+ /** Settings for one set of data labels. Data labels are annotations that appear next to a set of data, such as the points on a line chart, and provide additional information about what the data represents, such as a text representation of the value behind that point on the graph. */
5806
+ export type SheetsDataLabel = {
5807
+ /** The type of the data label. */
5808
+ type?: "DATA_LABEL_TYPE_UNSPECIFIED" | "NONE" | "DATA" | "CUSTOM";
5809
+ /** Data to use for custom labels. Only used if type is set to CUSTOM. This data must be the same length as the series or other element this data label is applied to. In addition, if the series is split into multiple source ranges, this source data must come from the next column in the source data. For example, if the series is B2:B4,E6:E8 then this data must come from C2:C4,F6:F8. */
5810
+ customLabelData?: SheetsChartData;
5811
+ /** The placement of the data label relative to the labeled data. */
5812
+ placement?: "DATA_LABEL_PLACEMENT_UNSPECIFIED" | "CENTER" | "LEFT" | "RIGHT" | "ABOVE" | "BELOW" | "INSIDE_END" | "INSIDE_BASE" | "OUTSIDE_END";
5813
+ /** The text format used for the data label. The link field is not supported. */
5814
+ textFormat?: SheetsTextFormat;
5815
+ };
5816
+ /** Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. */
5817
+ export type SheetsTimeOfDay = {
5818
+ /** Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. */
5819
+ seconds?: number;
5820
+ /** Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. */
5821
+ nanos?: number;
5822
+ /** Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. */
5823
+ hours?: number;
5824
+ /** Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. */
5825
+ minutes?: number;
5826
+ };
5827
+ /** The options that define a "view window" for a chart (such as the visible values in an axis). */
5828
+ export type SheetsChartAxisViewWindowOptions = {
5829
+ /** The maximum numeric value to be shown in this view window. If unset, will automatically determine a maximum value that looks good for the data. */
5830
+ viewWindowMax?: number;
5831
+ /** The view window's mode. */
5832
+ viewWindowMode?: "DEFAULT_VIEW_WINDOW_MODE" | "VIEW_WINDOW_MODE_UNSUPPORTED" | "EXPLICIT" | "PRETTY";
5833
+ /** The minimum numeric value to be shown in this view window. If unset, will automatically determine a minimum value that looks good for the data. */
5834
+ viewWindowMin?: number;
5835
+ };
5836
+ /** Inserts rows or columns in a sheet at a particular index. */
5837
+ export type SheetsInsertDimensionRequest = {
5838
+ /** The dimensions to insert. Both the start and end indexes must be bounded. */
5839
+ range?: SheetsDimensionRange;
5840
+ /** Whether dimension properties should be extended from the dimensions before or after the newly inserted dimensions. True to inherit from the dimensions before (in which case the start index must be greater than 0), and false to inherit from the dimensions after. For example, if row index 0 has red background and row index 1 has a green background, then inserting 2 rows at index 1 can inherit either the green or red background. If `inheritFromBefore` is true, the two new rows will be red (because the row before the insertion point was red), whereas if `inheritFromBefore` is false, the two new rows will be green (because the row after the insertion point was green). */
5841
+ inheritFromBefore?: boolean;
5842
+ };
5843
+ /** Resource that represents a spreadsheet. */
5844
+ export type SheetsSpreadsheet = {
5845
+ /** Overall properties of a spreadsheet. */
5846
+ properties?: SheetsSpreadsheetProperties;
5847
+ /** The comment threads associated with the spreadsheet. */
5848
+ comments?: Array<SheetsCommentThread>;
5849
+ /** The named ranges defined in a spreadsheet. */
5850
+ namedRanges?: Array<SheetsNamedRange>;
5851
+ /** The developer metadata associated with a spreadsheet. */
5852
+ developerMetadata?: Array<SheetsDeveloperMetadata>;
5853
+ /** A list of external data sources connected with the spreadsheet. */
5854
+ dataSources?: Array<SheetsDataSource>;
5855
+ /** The sheets that are part of a spreadsheet. */
5856
+ sheets?: Array<SheetsSheet>;
5857
+ /** The url of the spreadsheet. This field is read-only. */
5858
+ spreadsheetUrl?: string;
5859
+ /** Output only. A list of data source refresh schedules. */
5860
+ dataSourceSchedules?: Array<SheetsDataSourceRefreshSchedule>;
5861
+ /** The ID of the spreadsheet. This field is read-only. */
5862
+ spreadsheetId?: string;
5863
+ /** Output only. The comments view mode applied to the spreadsheet. */
5864
+ commentsViewMode?: "COMMENTS_VIEW_MODE_UNSPECIFIED" | "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS" | "COMMENTS_VIEW_MODE_OMITTED" | "COMMENTS_VIEW_MODE_INCLUDED";
5865
+ };
5866
+ /** A color scale for a treemap chart. */
5867
+ export type SheetsTreemapChartColorScale = {
5868
+ /** The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. If no_data_color is also set, this field takes precedence. */
5869
+ noDataColorStyle?: SheetsColorStyle;
5870
+ /** The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. If max_value_color is also set, this field takes precedence. */
5871
+ maxValueColorStyle?: SheetsColorStyle;
5872
+ /** The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. Deprecated: Use mid_value_color_style. */
5873
+ midValueColor?: SheetsColor;
5874
+ /** The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. Deprecated: Use no_data_color_style. */
5875
+ noDataColor?: SheetsColor;
5876
+ /** The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. If min_value_color is also set, this field takes precedence. */
5877
+ minValueColorStyle?: SheetsColorStyle;
5878
+ /** The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. Deprecated: Use min_value_color_style. */
5879
+ minValueColor?: SheetsColor;
5880
+ /** The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. If mid_value_color is also set, this field takes precedence. */
5881
+ midValueColorStyle?: SheetsColorStyle;
5882
+ /** The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. Deprecated: Use max_value_color_style. */
5883
+ maxValueColor?: SheetsColor;
5884
+ };
5885
+ /** Source ranges for a chart. */
5886
+ export type SheetsChartSourceRange = {
5887
+ /** 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 */
5888
+ sources?: Array<SheetsGridRange>;
5889
+ };
5890
+ /** The series of a CandlestickData. */
5891
+ export type SheetsCandlestickSeries = {
5892
+ /** The data of the CandlestickSeries. */
5893
+ data?: SheetsChartData;
5894
+ };
5895
+ /** A data validation rule. */
5896
+ export type SheetsDataValidationRule = {
5897
+ /** The condition that data in the cell must match. */
5898
+ condition?: SheetsBooleanCondition;
5899
+ /** A message to show the user when adding data to the cell. */
5900
+ inputMessage?: string;
5901
+ /** True if the UI should be customized based on the kind of condition. If true, "List" conditions will show a dropdown. */
5902
+ showCustomUi?: boolean;
5903
+ /** True if invalid data should be rejected. */
5904
+ strict?: boolean;
5905
+ };
5906
+ /** Updates properties of a spreadsheet. */
5907
+ export type SheetsUpdateSpreadsheetPropertiesRequest = {
5908
+ /** The properties to update. */
5909
+ properties?: SheetsSpreadsheetProperties;
5910
+ /** The fields that should be updated. At least one field must be specified. The root 'properties' is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
5911
+ fields?: string;
5912
+ };
5913
+ /** A candlestick chart. */
5914
+ export type SheetsCandlestickChartSpec = {
5915
+ /** The Candlestick chart data. Only one CandlestickData is supported. */
5916
+ data?: Array<SheetsCandlestickData>;
5917
+ /** 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. */
5918
+ domain?: SheetsCandlestickDomain;
5919
+ };
5920
+ /** The request for updating any aspect of a spreadsheet. */
5921
+ export type SheetsBatchUpdateSpreadsheetRequest = {
5922
+ /** 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. */
5923
+ requests?: Array<SheetsRequest>;
5924
+ /** Determines if the update response should include the spreadsheet resource. */
5925
+ includeSpreadsheetInResponse?: boolean;
5926
+ /** True if grid data should be returned. Meaningful only if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request. */
5927
+ responseIncludeGridData?: boolean;
5928
+ /** Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_in_response is 'true'. */
5929
+ responseRanges?: Array<string>;
5930
+ /** The comments view mode to apply to the spreadsheet. This allows viewing the spreadsheet with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE_OMITTED is used. Meaningful only if include_spreadsheet_in_response is 'true'. */
5931
+ commentsViewMode?: "COMMENTS_VIEW_MODE_UNSPECIFIED" | "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS" | "COMMENTS_VIEW_MODE_OMITTED" | "COMMENTS_VIEW_MODE_INCLUDED";
5932
+ };
5933
+ /** The response when updating a range of values in a spreadsheet. */
5934
+ export type SheetsAppendValuesResponse = {
5935
+ /** Information about the updates that were applied. */
5936
+ updates?: SheetsUpdateValuesResponse;
5937
+ /** 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. */
5938
+ tableRange?: string;
5939
+ /** The spreadsheet the updates were applied to. */
5940
+ spreadsheetId?: string;
5941
+ };
5942
+ /** Properties of a spreadsheet. */
5943
+ export type SheetsSpreadsheetProperties = {
5944
+ /** The locale of the spreadsheet in one of the following formats: * an ISO 639-1 language code such as `en` * an ISO 639-2 language code such as `fil`, if no 639-1 code exists * a combination of the ISO language code and country code, such as `en_US` Note: when updating this field, not all locales/languages are supported. */
5945
+ locale?: string;
5946
+ /** The time zone of the spreadsheet, in CLDR format such as `America/New_York`. If the time zone isn't recognized, this may be a custom time zone such as `GMT-07:00`. */
5947
+ timeZone?: string;
5948
+ /** The title of the spreadsheet. */
5949
+ title?: string;
5950
+ /** The default format of all cells in the spreadsheet. CellData.effectiveFormat will not be set if the cell's format is equal to this default format. This field is read-only. */
5951
+ defaultFormat?: SheetsCellFormat;
5952
+ /** The amount of time to wait before volatile functions are recalculated. */
5953
+ autoRecalc?: "RECALCULATION_INTERVAL_UNSPECIFIED" | "ON_CHANGE" | "MINUTE" | "HOUR";
5954
+ /** Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true. This value will be bypassed and always return true if the admin has enabled the [allowlisting feature](https://support.google.com/a?p=url_allowlist). */
5955
+ importFunctionsExternalUrlAccessAllowed?: boolean;
5956
+ /** Determines whether and how circular references are resolved with iterative calculation. Absence of this field means that circular references result in calculation errors. */
5957
+ iterativeCalculationSettings?: SheetsIterativeCalculationSettings;
5958
+ /** Theme applied to the spreadsheet. */
5959
+ spreadsheetTheme?: SheetsSpreadsheetTheme;
5960
+ };
5961
+ /** A data source table, which allows the user to import a static table of data from the DataSource into Sheets. This is also known as "Extract" in the Sheets editor. */
5962
+ export type SheetsDataSourceTable = {
5963
+ /** Output only. The data execution status. */
5964
+ dataExecutionStatus?: SheetsDataExecutionStatus;
5965
+ /** The type to select columns for the data source table. Defaults to SELECTED. */
5966
+ columnSelectionType?: "DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED" | "SELECTED" | "SYNC_ALL";
5967
+ /** Columns selected for the data source table. The column_selection_type must be SELECTED. */
5968
+ columns?: Array<SheetsDataSourceColumnReference>;
5969
+ /** Filter specifications in the data source table. */
5970
+ filterSpecs?: Array<SheetsFilterSpec>;
5971
+ /** The ID of the data source the data source table is associated with. */
5972
+ dataSourceId?: string;
5973
+ /** Sort specifications in the data source table. The result of the data source table is sorted based on the sort specifications in order. */
5974
+ sortSpecs?: Array<SheetsSortSpec>;
5975
+ /** The limit of rows to return. If not set, a default limit is applied. Please refer to the Sheets editor for the default and max limit. */
5976
+ rowLimit?: number;
5977
+ };
5978
+ /** Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values. For example, consider a pivot table showing sales transactions by date: +----------+--------------+ | Date | SUM of Sales | +----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 | ... +----------+--------------+ Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH results in the following pivot table. +--------------+--------------+ | Grouped Date | SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... +--------------+--------------+ */
5979
+ export type SheetsDateTimeRule = {
5980
+ /** The type of date-time grouping to apply. */
5981
+ type?: "DATE_TIME_RULE_TYPE_UNSPECIFIED" | "SECOND" | "MINUTE" | "HOUR" | "HOUR_MINUTE" | "HOUR_MINUTE_AMPM" | "DAY_OF_WEEK" | "DAY_OF_YEAR" | "DAY_OF_MONTH" | "DAY_MONTH" | "MONTH" | "QUARTER" | "YEAR" | "YEAR_MONTH" | "YEAR_QUARTER" | "YEAR_MONTH_DAY";
5982
+ };
5983
+ /** A range along a single dimension on a DATA_SOURCE sheet. */
5984
+ export type SheetsDataSourceSheetDimensionRange = {
5985
+ /** The ID of the data source sheet the range is on. */
5986
+ sheetId?: number;
5987
+ /** The columns on the data source sheet. */
5988
+ columnReferences?: Array<SheetsDataSourceColumnReference>;
5989
+ };
5990
+ /** The request for updating more than one range of values in a spreadsheet. */
5991
+ export type SheetsBatchUpdateValuesByDataFilterRequest = {
5992
+ /** 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 SERIAL_NUMBER. */
5993
+ responseDateTimeRenderOption?: "SERIAL_NUMBER" | "FORMATTED_STRING";
5994
+ /** How the input data should be interpreted. */
5995
+ valueInputOption?: "INPUT_VALUE_OPTION_UNSPECIFIED" | "RAW" | "USER_ENTERED";
5996
+ /** The new values to apply to the spreadsheet. If more than one range is matched by the specified DataFilter the specified values are applied to all of those ranges. */
5997
+ data?: Array<SheetsDataFilterValueRange>;
5998
+ /** 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 contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns). */
5999
+ includeValuesInResponse?: boolean;
6000
+ /** Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. */
6001
+ responseValueRenderOption?: "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA";
6002
+ };
6003
+ /** Moves one or more rows or columns. */
6004
+ export type SheetsMoveDimensionRequest = {
6005
+ /** The zero-based start index of where to move the source data to, based on the coordinates *before* the source data is removed from the grid. Existing data will be shifted down or right (depending on the dimension) to make room for the moved dimensions. The source dimensions are removed from the grid, so the the data may end up in a different index than specified. For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move `"1"` and `"2"` to between `"3"` and `"4"`, the source would be `ROWS [1..3)`,and the destination index would be `"4"` (the zero-based index of row 5). The end result would be `A1..A5` of `0, 3, 1, 2, 4`. */
6006
+ destinationIndex?: number;
6007
+ /** The source dimensions to move. */
6008
+ source?: SheetsDimensionRange;
6009
+ };
6010
+ /** Duplicates the contents of a sheet. */
6011
+ export type SheetsDuplicateSheetRequest = {
6012
+ /** The name of the new sheet. If empty, a new name is chosen for you. */
6013
+ newSheetName?: string;
6014
+ /** The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented. */
6015
+ insertSheetIndex?: number;
6016
+ /** The sheet to duplicate. If the source sheet is of DATA_SOURCE type, its backing DataSource is also duplicated and associated with the new copy of the sheet. No data execution is triggered, the grid data of this sheet is also copied over but only available after the batch request completes. */
6017
+ sourceSheetId?: number;
6018
+ /** If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative. */
6019
+ newSheetId?: number;
6020
+ };
6021
+ /** A table. */
6022
+ export type SheetsTable = {
6023
+ /** The table column properties. */
6024
+ columnProperties?: Array<SheetsTableColumnProperties>;
6025
+ /** The id of the table. */
6026
+ tableId?: string;
6027
+ /** The table rows properties. */
6028
+ rowsProperties?: SheetsTableRowsProperties;
6029
+ /** The table range. */
6030
+ range?: SheetsGridRange;
6031
+ /** The table name. This is unique to all tables in the same spreadsheet. */
6032
+ name?: string;
6033
+ };
6034
+ /** The count limit on rows or columns in the pivot group. */
6035
+ export type SheetsPivotGroupLimit = {
6036
+ /** The count limit. */
6037
+ countLimit?: number;
6038
+ /** The order in which the group limit is applied to the pivot table. Pivot group limits are applied from lower to higher order number. Order numbers are normalized to consecutive integers from 0. For write request, to fully customize the applying orders, all pivot group limits should have this field set with an unique number. Otherwise, the order is determined by the index in the PivotTable.rows list and then the PivotTable.columns list. */
6039
+ applyOrder?: number;
6040
+ };
6041
+ /** Updates the state of the specified group. */
6042
+ export type SheetsUpdateDimensionGroupRequest = {
6043
+ /** The fields that should be updated. At least one field must be specified. The root `dimensionGroup` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6044
+ fields?: string;
6045
+ /** The group whose state should be updated. The range and depth of the group should specify a valid group on the sheet, and all other fields updated. */
6046
+ dimensionGroup?: SheetsDimensionGroup;
6047
+ };
6048
+ /** An external or local reference. */
6049
+ export type SheetsLink = {
6050
+ /** The link identifier. */
6051
+ uri?: string;
6052
+ };
6053
+ /** Adds a new protected range. */
6054
+ export type SheetsAddProtectedRangeRequest = {
6055
+ /** 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.) */
6056
+ protectedRange?: SheetsProtectedRange;
6057
+ };
6058
+ /** Updates a Post in a CommentThread. Returns a 400 bad request error if: - The requesting user is not the author of the post. */
6059
+ export type SheetsUpdateCommentPostRequest = {
6060
+ /** The new text of the comment, as plain text. This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. */
6061
+ content?: string;
6062
+ /** The ID of the CommentThread which the post belongs to. */
6063
+ commentId?: string;
6064
+ /** The ID of the post being updated. */
6065
+ postId?: string;
6066
+ };
6067
+ /** The result of creating a reply. */
6068
+ export type SheetsAddCommentReplyResponse = {
6069
+ /** The newly-inserted reply Post. */
6070
+ post?: SheetsPost;
6071
+ };
6072
+ /** Deletes a range of cells, shifting other cells into the deleted area. */
6073
+ export type SheetsDeleteRangeRequest = {
6074
+ /** The range of cells to delete. */
6075
+ range?: SheetsGridRange;
6076
+ /** The dimension from which deleted cells will be replaced with. If ROWS, existing cells will be shifted upward to replace the deleted cells. If COLUMNS, existing cells will be shifted left to replace the deleted cells. */
6077
+ shiftDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
6078
+ };
6079
+ /** Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented. */
6080
+ export type SheetsAddConditionalFormatRuleRequest = {
6081
+ /** The zero-based index where the rule should be inserted. */
6082
+ index?: number;
6083
+ /** The rule to add. */
6084
+ rule?: SheetsConditionalFormatRule;
6085
+ };
6086
+ /** The response when updating a range of values by a data filter in a spreadsheet. */
6087
+ export type SheetsUpdateValuesByDataFilterResponse = {
6088
+ /** The data filter that selected the range that was updated. */
6089
+ dataFilter?: SheetsDataFilter;
6090
+ /** The number of columns where at least one cell in the column was updated. */
6091
+ updatedColumns?: number;
6092
+ /** The range (in [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell)) that updates were applied to. */
6093
+ updatedRange?: string;
6094
+ /** The number of rows where at least one cell in the row was updated. */
6095
+ updatedRows?: number;
6096
+ /** The values of the cells in the range matched by the dataFilter after all updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`. */
6097
+ updatedData?: SheetsValueRange;
6098
+ /** The number of cells updated. */
6099
+ updatedCells?: number;
6100
+ };
6101
+ /** Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented. */
6102
+ export type SheetsDeleteConditionalFormatRuleRequest = {
6103
+ /** The zero-based index of the rule to be deleted. */
6104
+ index?: number;
6105
+ /** The sheet the rule is being deleted from. */
6106
+ sheetId?: number;
6107
+ };
6108
+ /** The run of a chip. The chip continues until the start index of the next run. */
6109
+ export type SheetsChipRun = {
6110
+ /** Optional. The chip of this run. */
6111
+ chip?: SheetsChip;
6112
+ /** Required. The zero-based character index where this run starts, in UTF-16 code units. */
6113
+ startIndex?: number;
6114
+ };
6115
+ /** The value of the condition. */
6116
+ export type SheetsConditionValue = {
6117
+ /** A value the condition is based on. The value is parsed as if the user typed into a cell. Formulas are supported (and must begin with an `=` or a '+'). */
6118
+ userEnteredValue?: string;
6119
+ /** 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. */
6120
+ relativeDate?: "RELATIVE_DATE_UNSPECIFIED" | "PAST_YEAR" | "PAST_MONTH" | "PAST_WEEK" | "YESTERDAY" | "TODAY" | "TOMORROW";
6121
+ };
6122
+ /** The response when retrieving more than one range of values in a spreadsheet selected by DataFilters. */
6123
+ export type SheetsBatchGetValuesByDataFilterResponse = {
6124
+ /** The ID of the spreadsheet the data was retrieved from. */
6125
+ spreadsheetId?: string;
6126
+ /** The requested values with the list of data filters that matched them. */
6127
+ valueRanges?: Array<SheetsMatchedValueRange>;
6128
+ };
6129
+ /** Criteria for showing/hiding rows in a pivot table. */
6130
+ export type SheetsPivotFilterCriteria = {
6131
+ /** Values that should be included. Values not listed here are excluded. */
6132
+ visibleValues?: Array<string>;
6133
+ /** A condition that must be true for values to be shown. (`visibleValues` does not override this -- even if a value is listed there, it is still hidden if it does not meet the condition.) Condition values that refer to ranges in A1-notation are evaluated relative to the pivot table sheet. References are treated absolutely, so are not filled down the pivot table. For example, a condition value of `=A1` on "Pivot Table 1" is treated as `'Pivot Table 1'!$A$1`. The source data of the pivot table can be referenced by column header name. For example, if the source data has columns named "Revenue" and "Cost" and a condition is applied to the "Revenue" column with type `NUMBER_GREATER` and value `=Cost`, then only columns where "Revenue" > "Cost" are included. */
6134
+ condition?: SheetsBooleanCondition;
6135
+ /** Whether values are visible by default. If true, the visible_values are ignored, all values that meet condition (if specified) are shown. If false, values that are both in visible_values and meet condition are shown. */
6136
+ visibleByDefault?: boolean;
6137
+ };
6138
+ /** A parameter in a data source's query. The parameter allows the user to pass in values from the spreadsheet into a query. */
6139
+ export type SheetsDataSourceParameter = {
6140
+ /** ID of a NamedRange. Its size must be 1x1. */
6141
+ namedRangeId?: string;
6142
+ /** A range that contains the value of the parameter. Its size must be 1x1. */
6143
+ range?: SheetsGridRange;
6144
+ /** Named parameter. Must be a legitimate identifier for the DataSource that supports it. For example, [BigQuery identifier](https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers). */
6145
+ name?: string;
6146
+ };
6147
+ /** The request for clearing a range of values in a spreadsheet. */
6148
+ export type SheetsClearValuesRequest = Record<string, unknown>;
6149
+ /** A Treemap chart. */
6150
+ export type SheetsTreemapChartSpec = {
6151
+ /** True to hide tooltips. */
6152
+ hideTooltips?: boolean;
6153
+ /** The text format for all labels on the chart. The link field is not supported. */
6154
+ textFormat?: SheetsTextFormat;
6155
+ /** The color scale for data cells in the treemap chart. Data cells are assigned colors based on their color values. These color values come from color_data, or from size_data if color_data is not specified. Cells with color values less than or equal to min_value will have minValueColor as their background color. Cells with color values greater than or equal to max_value will have maxValueColor as their background color. Cells with color values between min_value and max_value will have background colors on a gradient between minValueColor and maxValueColor, the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color values will have noDataColor as their background color. */
6156
+ colorScale?: SheetsTreemapChartColorScale;
6157
+ /** The background color for header cells. If header_color is also set, this field takes precedence. */
6158
+ headerColorStyle?: SheetsColorStyle;
6159
+ /** The number of data levels to show on the treemap chart. These levels are interactive and are shown with their labels. Defaults to 2 if not specified. */
6160
+ levels?: number;
6161
+ /** The data the contains the treemap cells' parent labels. */
6162
+ parentLabels?: SheetsChartData;
6163
+ /** The data that contains the treemap cell labels. */
6164
+ labels?: SheetsChartData;
6165
+ /** The minimum possible data value. Cells with values less than this will have the same color as cells with this value. If not specified, defaults to the actual minimum value from color_data, or the minimum value from size_data if color_data is not specified. */
6166
+ minValue?: number;
6167
+ /** The number of additional data levels beyond the labeled levels to be shown on the treemap chart. These levels are not interactive and are shown without their labels. Defaults to 0 if not specified. */
6168
+ hintedLevels?: number;
6169
+ /** The data that determines the size of each treemap data cell. This data is expected to be numeric. The cells corresponding to non-numeric or missing data will not be rendered. If color_data is not specified, this data is used to determine data cell background colors as well. */
6170
+ sizeData?: SheetsChartData;
6171
+ /** The data that determines the background color of each treemap data cell. This field is optional. If not specified, size_data is used to determine background colors. If specified, the data is expected to be numeric. color_scale will determine how the values in this data map to data cell background colors. */
6172
+ colorData?: SheetsChartData;
6173
+ /** The maximum possible data value. Cells with values greater than this will have the same color as cells with this value. If not specified, defaults to the actual maximum value from color_data, or the maximum value from size_data if color_data is not specified. */
6174
+ maxValue?: number;
6175
+ /** The background color for header cells. Deprecated: Use header_color_style. */
6176
+ headerColor?: SheetsColor;
6177
+ };
6178
+ /** Criteria for showing or hiding rows in a filter or filter view. */
6179
+ export type SheetsFilterCriteria = {
6180
+ /** The foreground color to filter by; only cells with this foreground color are shown. Mutually exclusive with visible_background_color. Deprecated: Use visible_foreground_color_style. */
6181
+ visibleForegroundColor?: SheetsColor;
6182
+ /** The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with visible_foreground_color. Deprecated: Use visible_background_color_style. */
6183
+ visibleBackgroundColor?: SheetsColor;
6184
+ /** The background fill color to filter by; only cells with this fill color are shown. This field is mutually exclusive with visible_foreground_color, and must be set to an RGB-type color. If visible_background_color is also set, this field takes precedence. */
6185
+ visibleBackgroundColorStyle?: SheetsColorStyle;
6186
+ /** Values that should be hidden. */
6187
+ hiddenValues?: Array<string>;
6188
+ /** The foreground color to filter by; only cells with this foreground color are shown. This field is mutually exclusive with visible_background_color, and must be set to an RGB-type color. If visible_foreground_color is also set, this field takes precedence. */
6189
+ visibleForegroundColorStyle?: SheetsColorStyle;
6190
+ /** A condition that must be `true` for values to be shown. (This does not override hidden_values -- if a value is listed there, it will still be hidden.) */
6191
+ condition?: SheetsBooleanCondition;
6192
+ };
6193
+ /** A chart embedded in a sheet. */
6194
+ export type SheetsEmbeddedChart = {
6195
+ /** The ID of the chart. */
6196
+ chartId?: number;
6197
+ /** The specification of the chart. */
6198
+ spec?: SheetsChartSpec;
6199
+ /** The border of the chart. */
6200
+ border?: SheetsEmbeddedObjectBorder;
6201
+ /** The position of the chart. */
6202
+ position?: SheetsEmbeddedObjectPosition;
6203
+ };
6204
+ /** Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and 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. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. 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(''); }; // ... */
6205
+ export type SheetsColor = {
6206
+ /** The amount of green in the color as a value in the interval [0, 1]. */
6207
+ green?: number;
6208
+ /** The amount of blue in the color as a value in the interval [0, 1]. */
6209
+ blue?: number;
6210
+ /** 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 rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */
6211
+ alpha?: number;
6212
+ /** The amount of red in the color as a value in the interval [0, 1]. */
6213
+ red?: number;
6214
+ };
6215
+ /** Cancels one or multiple refreshes of data source objects in the spreadsheet by the specified references. The request requires an additional `bigquery.readonly` OAuth scope if you are cancelling a refresh on a BigQuery data source. */
6216
+ export type SheetsCancelDataSourceRefreshRequest = {
6217
+ /** References to data source objects whose refreshes are to be cancelled. */
6218
+ references?: SheetsDataSourceObjectReferences;
6219
+ /** Reference to a DataSource. If specified, cancels all associated data source object refreshes for this data source. */
6220
+ dataSourceId?: string;
6221
+ /** Cancels all existing data source object refreshes for all data sources in the spreadsheet. */
6222
+ isAll?: boolean;
6223
+ };
6224
+ /** Deletes a particular filter view. */
6225
+ export type SheetsDeleteFilterViewRequest = {
6226
+ /** The ID of the filter to delete. */
6227
+ filterId?: number;
6228
+ };
6229
+ /** Additional properties of a DATA_SOURCE sheet. */
6230
+ export type SheetsDataSourceSheetProperties = {
6231
+ /** The columns displayed on the sheet, corresponding to the values in RowData. */
6232
+ columns?: Array<SheetsDataSourceColumn>;
6233
+ /** ID of the DataSource the sheet is connected to. */
6234
+ dataSourceId?: string;
6235
+ /** The data execution status. */
6236
+ dataExecutionStatus?: SheetsDataExecutionStatus;
6237
+ };
6238
+ /** The result of adding a new protected range. */
6239
+ export type SheetsAddProtectedRangeResponse = {
6240
+ /** The newly added protected range. */
6241
+ protectedRange?: SheetsProtectedRange;
6242
+ };
6243
+ /** The request for clearing more than one range selected by a DataFilter in a spreadsheet. */
6244
+ export type SheetsBatchClearValuesByDataFilterRequest = {
6245
+ /** The DataFilters used to determine which ranges to clear. */
6246
+ dataFilters?: Array<SheetsDataFilter>;
6247
+ };
6248
+ /** The borders of the cell. */
6249
+ export type SheetsBorders = {
6250
+ /** The left border of the cell. */
6251
+ left?: SheetsBorder;
6252
+ /** The right border of the cell. */
6253
+ right?: SheetsBorder;
6254
+ /** The top border of the cell. */
6255
+ top?: SheetsBorder;
6256
+ /** The bottom border of the cell. */
6257
+ bottom?: SheetsBorder;
6258
+ };
6259
+ /** A request to retrieve all developer metadata matching the set of specified criteria. */
6260
+ export type SheetsSearchDeveloperMetadataRequest = {
6261
+ /** The data filters describing the criteria used to determine which DeveloperMetadata entries to return. DeveloperMetadata matching any of the specified filters are included in the response. */
6262
+ dataFilters?: Array<SheetsDataFilter>;
6263
+ };
6264
+ /** The response when clearing a range of values in a spreadsheet. */
6265
+ export type SheetsClearValuesResponse = {
6266
+ /** The range (in A1 notation) that was cleared. (If the request was for an unbounded range or a range larger than the bounds of the sheet, this will be the actual range that was cleared, bounded to the sheet's limits.) */
6267
+ clearedRange?: string;
6268
+ /** The spreadsheet the updates were applied to. */
6269
+ spreadsheetId?: string;
6270
+ };
6271
+ /** A single grouping (either row or column) in a pivot table. */
6272
+ export type SheetsPivotGroup = {
6273
+ /** True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repetition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+ */
6274
+ repeatHeadings?: boolean;
6275
+ /** The group rule to apply to this row/column group. */
6276
+ groupRule?: SheetsPivotGroupRule;
6277
+ /** The reference to the data source column this grouping is based on. */
6278
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
6279
+ /** True if the pivot table should include the totals for this grouping. */
6280
+ showTotals?: boolean;
6281
+ /** The column offset of the source range that this grouping is based on. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`, whereas the offset `1` would refer to column `D`. */
6282
+ sourceColumnOffset?: number;
6283
+ /** The count limit on rows or columns to apply to this pivot group. */
6284
+ groupLimit?: SheetsPivotGroupLimit;
6285
+ /** The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by this group's values. */
6286
+ valueBucket?: SheetsPivotGroupSortValueBucket;
6287
+ /** The labels to use for the row/column groups which can be customized. For example, in the following pivot table, the row label is `Region` (which could be renamed to `State`) and the column label is `Product` (which could be renamed `Item`). Pivot tables created before December 2017 do not have header labels. If you'd like to add header labels to an existing pivot table, please delete the existing pivot table and then create a new pivot table with same parameters. +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper | +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee | 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 | +--------------+---------+-------+ */
6288
+ label?: string;
6289
+ /** The order the values in this group should be sorted. */
6290
+ sortOrder?: "SORT_ORDER_UNSPECIFIED" | "ASCENDING" | "DESCENDING";
6291
+ /** Metadata about values in the grouping. */
6292
+ valueMetadata?: Array<SheetsPivotGroupValueMetadata>;
6293
+ };
6294
+ /** A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `"Sheet1"` is sheet ID 123456, then: `Sheet1!A1:A1 == sheet_id: 123456, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 123456, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 123456, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 123456, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id: 123456` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`. */
6295
+ export type SheetsGridRange = {
6296
+ /** The sheet this range is on. */
6297
+ sheetId?: number;
6298
+ /** The end column (exclusive) of the range, or not set if unbounded. */
6299
+ endColumnIndex?: number;
6300
+ /** The end row (exclusive) of the range, or not set if unbounded. */
6301
+ endRowIndex?: number;
6302
+ /** The start row (inclusive) of the range, or not set if unbounded. */
6303
+ startRowIndex?: number;
6304
+ /** The start column (inclusive) of the range, or not set if unbounded. */
6305
+ startColumnIndex?: number;
6306
+ };
6307
+ /** Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. */
6308
+ export type SheetsInterval = {
6309
+ /** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
6310
+ endTime?: string;
6311
+ /** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
6312
+ startTime?: string;
6313
+ };
6314
+ /** Automatically resizes one or more dimensions based on the contents of the cells in that dimension. */
6315
+ export type SheetsAutoResizeDimensionsRequest = {
6316
+ /** The dimensions to automatically resize. */
6317
+ dimensions?: SheetsDimensionRange;
6318
+ /** The dimensions on a data source sheet to automatically resize. */
6319
+ dataSourceSheetDimensions?: SheetsDataSourceSheetDimensionRange;
6320
+ };
6321
+ /** Reference to a data source object. */
6322
+ export type SheetsDataSourceObjectReference = {
6323
+ /** References to a DataSourceTable anchored at the cell. */
6324
+ dataSourceTableAnchorCell?: SheetsGridCoordinate;
6325
+ /** References to a data source chart. */
6326
+ chartId?: number;
6327
+ /** References to a DATA_SOURCE sheet. */
6328
+ sheetId?: string;
6329
+ /** References to a data source PivotTable anchored at the cell. */
6330
+ dataSourcePivotTableAnchorCell?: SheetsGridCoordinate;
6331
+ /** References to a cell containing DataSourceFormula. */
6332
+ dataSourceFormulaCell?: SheetsGridCoordinate;
6333
+ };
6334
+ /** The result of adding a sheet. */
6335
+ export type SheetsAddSheetResponse = {
6336
+ /** The properties of the newly added sheet. */
6337
+ properties?: SheetsSheetProperties;
6338
+ };
6339
+ /** Updates properties of dimensions within the specified range. */
6340
+ export type SheetsUpdateDimensionPropertiesRequest = {
6341
+ /** Properties to update. */
6342
+ properties?: SheetsDimensionProperties;
6343
+ /** The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6344
+ fields?: string;
6345
+ /** The rows or columns to update. */
6346
+ range?: SheetsDimensionRange;
6347
+ /** The columns on a data source sheet to update. */
6348
+ dataSourceSheetRange?: SheetsDataSourceSheetDimensionRange;
6349
+ };
6350
+ /** Custom number formatting options for chart attributes. */
6351
+ export type SheetsChartCustomNumberFormatOptions = {
6352
+ /** Custom prefix to be prepended to the chart attribute. This field is optional. */
6353
+ prefix?: string;
6354
+ /** Custom suffix to be appended to the chart attribute. This field is optional. */
6355
+ suffix?: string;
6356
+ };
6357
+ /** The response from updating developer metadata. */
6358
+ export type SheetsUpdateDeveloperMetadataResponse = {
6359
+ /** The updated developer metadata. */
6360
+ developerMetadata?: Array<SheetsDeveloperMetadata>;
6361
+ };
6362
+ /** The result of deleting a conditional format rule. */
6363
+ export type SheetsDeleteConditionalFormatRuleResponse = {
6364
+ /** The rule that was deleted. */
6365
+ rule?: SheetsConditionalFormatRule;
6366
+ };
6367
+ /** The result of updating a conditional format rule. */
6368
+ export type SheetsUpdateConditionalFormatRuleResponse = {
6369
+ /** The old index of the rule. Not set if a rule was replaced (because it is the same as new_index). */
6370
+ oldIndex?: number;
6371
+ /** The index of the new rule. */
6372
+ newIndex?: number;
6373
+ /** The old (deleted) rule. Not set if a rule was moved (because it is the same as new_rule). */
6374
+ oldRule?: SheetsConditionalFormatRule;
6375
+ /** The new rule that replaced the old rule (if replacing), or the rule that was moved (if moved) */
6376
+ newRule?: SheetsConditionalFormatRule;
6377
+ };
6378
+ /** A histogram chart. A histogram chart groups data items into bins, displaying each bin as a column of stacked items. Histograms are used to display the distribution of a dataset. Each column of items represents a range into which those items fall. The number of bins can be chosen automatically or specified explicitly. */
6379
+ export type SheetsHistogramChartSpec = {
6380
+ /** The outlier percentile is used to ensure that outliers do not adversely affect the calculation of bucket sizes. For example, setting an outlier percentile of 0.05 indicates that the top and bottom 5% of values when calculating buckets. The values are still included in the chart, they will be added to the first or last buckets instead of their own buckets. Must be between 0.0 and 0.5. */
6381
+ outlierPercentile?: number;
6382
+ /** The series for a histogram may be either a single series of values to be bucketed or multiple series, each of the same length, containing the name of the series followed by the values to be bucketed for that series. */
6383
+ series?: Array<SheetsHistogramSeries>;
6384
+ /** Whether horizontal divider lines should be displayed between items in each column. */
6385
+ showItemDividers?: boolean;
6386
+ /** By default the bucket size (the range of values stacked in a single column) is chosen automatically, but it may be overridden here. E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc. Cannot be negative. This field is optional. */
6387
+ bucketSize?: number;
6388
+ /** The position of the chart legend. */
6389
+ legendPosition?: "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" | "BOTTOM_LEGEND" | "LEFT_LEGEND" | "RIGHT_LEGEND" | "TOP_LEGEND" | "NO_LEGEND" | "INSIDE_LEGEND";
6390
+ };
6391
+ /** Deletes the embedded object with the given ID. */
6392
+ export type SheetsDeleteEmbeddedObjectRequest = {
6393
+ /** The ID of the embedded object to delete. */
6394
+ objectId?: number;
6395
+ };
6396
+ /** A group over an interval of rows or columns on a sheet, which can contain or be contained within other groups. A group can be collapsed or expanded as a unit on the sheet. */
6397
+ export type SheetsDimensionGroup = {
6398
+ /** This field is true if this group is collapsed. A collapsed group remains collapsed if an overlapping group at a shallower depth is expanded. A true value does not imply that all dimensions within the group are hidden, since a dimension's visibility can change independently from this group property. However, when this property is updated, all dimensions within it are set to hidden if this field is true, or set to visible if this field is false. */
6399
+ collapsed?: boolean;
6400
+ /** The range over which this group exists. */
6401
+ range?: SheetsDimensionRange;
6402
+ /** The depth of the group, representing how many groups have a range that wholly contains the range of this group. */
6403
+ depth?: number;
6404
+ };
6405
+ /** The result of the find/replace. */
6406
+ export type SheetsFindReplaceResponse = {
6407
+ /** The number of rows changed. */
6408
+ rowsChanged?: number;
6409
+ /** The number of sheets changed. */
6410
+ sheetsChanged?: number;
6411
+ /** The number of formula cells changed. */
6412
+ formulasChanged?: number;
6413
+ /** The number of occurrences (possibly multiple within a cell) changed. For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. */
6414
+ occurrencesChanged?: number;
6415
+ /** The number of non-formula cells changed. */
6416
+ valuesChanged?: number;
6417
+ };
6418
+ /** Styles for a waterfall chart column. */
6419
+ export type SheetsWaterfallChartColumnStyle = {
6420
+ /** The label of the column's legend. */
6421
+ label?: string;
6422
+ /** The color of the column. Deprecated: Use color_style. */
6423
+ color?: SheetsColor;
6424
+ /** The color of the column. If color is also set, this field takes precedence. */
6425
+ colorStyle?: SheetsColorStyle;
6426
+ };
6427
+ /** Creates a group over the specified range. If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and [C:D, depth 2]. */
6428
+ export type SheetsAddDimensionGroupRequest = {
6429
+ /** The range over which to create a group. */
6430
+ range?: SheetsDimensionRange;
6431
+ };
6432
+ /** Updates properties of the supplied banded range. */
6433
+ export type SheetsUpdateBandingRequest = {
6434
+ /** The fields that should be updated. At least one field must be specified. The root `bandedRange` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6435
+ fields?: string;
6436
+ /** The banded range to update with the new properties. */
6437
+ bandedRange?: SheetsBandedRange;
6438
+ };
6439
+ /** A schedule for data to refresh every day in a given time interval. */
6440
+ export type SheetsDataSourceRefreshDailySchedule = {
6441
+ /** The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor. */
6442
+ startTime?: SheetsTimeOfDay;
6443
+ };
6444
+ /** The style of a point on the chart. */
6445
+ export type SheetsPointStyle = {
6446
+ /** The point size. If empty, a default size is used. */
6447
+ size?: number;
6448
+ /** The point shape. If empty or unspecified, a default shape is used. */
6449
+ shape?: "POINT_SHAPE_UNSPECIFIED" | "CIRCLE" | "DIAMOND" | "HEXAGON" | "PENTAGON" | "SQUARE" | "STAR" | "TRIANGLE" | "X_MARK";
6450
+ };
6451
+ /** Removes the table with the given ID from the spreadsheet. */
6452
+ export type SheetsDeleteTableRequest = {
6453
+ /** The ID of the table to delete. */
6454
+ tableId?: string;
6455
+ };
6456
+ /** The response from deleting developer metadata. */
6457
+ export type SheetsDeleteDeveloperMetadataResponse = {
6458
+ /** The metadata that was deleted. */
6459
+ deletedDeveloperMetadata?: Array<SheetsDeveloperMetadata>;
6460
+ };
6461
+ /** Removes the named range with the given ID from the spreadsheet. */
6462
+ export type SheetsDeleteNamedRangeRequest = {
6463
+ /** The ID of the named range to delete. */
6464
+ namedRangeId?: string;
6465
+ };
6466
+ /** Formatting options for baseline value. */
6467
+ export type SheetsBaselineValueFormat = {
6468
+ /** The comparison type of key value with baseline value. */
6469
+ comparisonType?: "COMPARISON_TYPE_UNDEFINED" | "ABSOLUTE_DIFFERENCE" | "PERCENTAGE_DIFFERENCE";
6470
+ /** Color to be used, in case baseline value represents a negative change for key value. This field is optional. Deprecated: Use negative_color_style. */
6471
+ negativeColor?: SheetsColor;
6472
+ /** Description which is appended after the baseline value. This field is optional. */
6473
+ description?: string;
6474
+ /** Specifies the horizontal text positioning of baseline value. This field is optional. If not specified, default positioning is used. */
6475
+ position?: SheetsTextPosition;
6476
+ /** Text formatting options for baseline value. The link field is not supported. */
6477
+ textFormat?: SheetsTextFormat;
6478
+ /** Color to be used, in case baseline value represents a positive change for key value. This field is optional. If positive_color is also set, this field takes precedence. */
6479
+ positiveColorStyle?: SheetsColorStyle;
6480
+ /** Color to be used, in case baseline value represents a negative change for key value. This field is optional. If negative_color is also set, this field takes precedence. */
6481
+ negativeColorStyle?: SheetsColorStyle;
6482
+ /** Color to be used, in case baseline value represents a positive change for key value. This field is optional. Deprecated: Use positive_color_style. */
6483
+ positiveColor?: SheetsColor;
6484
+ };
6485
+ /** Fills in more data based on existing data. */
6486
+ export type SheetsAutoFillRequest = {
6487
+ /** The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data. */
6488
+ sourceAndDestination?: SheetsSourceAndDestination;
6489
+ /** True if we should generate data with the "alternate" series. This differs based on the type and amount of source data. */
6490
+ useAlternateSeries?: boolean;
6491
+ /** 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. */
6492
+ range?: SheetsGridRange;
6493
+ };
6494
+ /** Properties of a sheet. */
6495
+ export type SheetsSheetProperties = {
6496
+ /** The name of the sheet. */
6497
+ title?: string;
6498
+ /** True if the sheet is an RTL sheet instead of an LTR sheet. */
6499
+ rightToLeft?: boolean;
6500
+ /** True if the sheet is hidden in the UI, false if it's visible. */
6501
+ hidden?: boolean;
6502
+ /** The ID of the sheet. Must be non-negative. This field cannot be changed once set. */
6503
+ sheetId?: number;
6504
+ /** Additional properties of the sheet if this sheet is a grid. (If the sheet is an object sheet, containing a chart or image, then this field will be absent.) When writing it is an error to set any grid properties on non-grid sheets. If this sheet is a DATA_SOURCE sheet, this field is output only but contains the properties that reflect how a data source sheet is rendered in the UI, e.g. row_count. */
6505
+ gridProperties?: SheetsGridProperties;
6506
+ /** Output only. If present, the field contains DATA_SOURCE sheet specific properties. */
6507
+ dataSourceSheetProperties?: SheetsDataSourceSheetProperties;
6508
+ /** The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet is added or moved to the end of the sheet list. When updating sheet indices or inserting sheets, movement is considered in "before the move" indexes. For example, if there were three sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would have to be set to 2. A sheet index update request is ignored if the requested index is identical to the sheets current index or if the requested new index is equal to the current sheet index + 1. */
6509
+ index?: number;
6510
+ /** The color of the tab in the UI. If tab_color is also set, this field takes precedence. */
6511
+ tabColorStyle?: SheetsColorStyle;
6512
+ /** The color of the tab in the UI. Deprecated: Use tab_color_style. */
6513
+ tabColor?: SheetsColor;
6514
+ /** The type of sheet. Defaults to GRID. This field cannot be changed once set. */
6515
+ sheetType?: "SHEET_TYPE_UNSPECIFIED" | "GRID" | "OBJECT" | "DATA_SOURCE";
6516
+ };
6517
+ /** A banded (alternating colors) range in a sheet. */
6518
+ export type SheetsBandedRange = {
6519
+ /** Output only. The reference of the banded range, used to identify the ID that is not supported by the banded_range_id. */
6520
+ bandedRangeReference?: string;
6521
+ /** Properties for column bands. These properties are 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. */
6522
+ columnProperties?: SheetsBandingProperties;
6523
+ /** Properties for row bands. These properties are 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. */
6524
+ rowProperties?: SheetsBandingProperties;
6525
+ /** The range over which these properties are applied. */
6526
+ range?: SheetsGridRange;
6527
+ /** The ID of the banded range. If unset, refer to banded_range_reference. */
6528
+ bandedRangeId?: number;
6529
+ };
6530
+ /** A named range. */
6531
+ export type SheetsNamedRange = {
6532
+ /** The range this represents. */
6533
+ range?: SheetsGridRange;
6534
+ /** The name of the named range. */
6535
+ name?: string;
6536
+ /** The ID of the named range. */
6537
+ namedRangeId?: string;
6538
+ };
6539
+ /** Style override settings for a single series data point. */
6540
+ export type SheetsBasicSeriesDataPointStyleOverride = {
6541
+ /** The zero-based index of the series data point. */
6542
+ index?: number;
6543
+ /** Point style of the series data point. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, the series default is used. */
6544
+ pointStyle?: SheetsPointStyle;
6545
+ /** Color of the series data point. If empty, the series default is used. If color is also set, this field takes precedence. */
6546
+ colorStyle?: SheetsColorStyle;
6547
+ /** Color of the series data point. If empty, the series default is used. Deprecated: Use color_style. */
6548
+ color?: SheetsColor;
6549
+ };
6550
+ /** Randomizes the order of the rows in a range. */
6551
+ export type SheetsRandomizeRangeRequest = {
6552
+ /** The range to randomize. */
6553
+ range?: SheetsGridRange;
6554
+ };
6555
+ /** Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary. */
6556
+ export type SheetsAppendCellsRequest = {
6557
+ /** The sheet ID to append the data to. */
6558
+ sheetId?: number;
6559
+ /** The ID of the table to append data to. The data will be only appended to the table body. This field also takes precedence over the `sheet_id` field. */
6560
+ tableId?: string;
6561
+ /** The data to append. */
6562
+ rows?: Array<SheetsRowData>;
6563
+ /** 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. */
6564
+ fields?: string;
6565
+ };
6566
+ /** 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. */
6567
+ export type SheetsBandingProperties = {
6568
+ /** The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. Deprecated: Use footer_color_style. */
6569
+ footerColor?: SheetsColor;
6570
+ /** The first color that is alternating. (Required) Deprecated: Use first_band_color_style. */
6571
+ firstBandColor?: SheetsColor;
6572
+ /** The first color that is alternating. (Required) If first_band_color is also set, this field takes precedence. */
6573
+ firstBandColorStyle?: SheetsColorStyle;
6574
+ /** The second color that is alternating. (Required) Deprecated: Use second_band_color_style. */
6575
+ secondBandColor?: SheetsColor;
6576
+ /** The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. If header_color is also set, this field takes precedence. */
6577
+ headerColorStyle?: SheetsColorStyle;
6578
+ /** The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. If footer_color is also set, this field takes precedence. */
6579
+ footerColorStyle?: SheetsColorStyle;
6580
+ /** The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. Deprecated: Use header_color_style. */
6581
+ headerColor?: SheetsColor;
6582
+ /** The second color that is alternating. (Required) If second_band_color is also set, this field takes precedence. */
6583
+ secondBandColorStyle?: SheetsColorStyle;
6584
+ };
6585
+ /** Removes the banded range with the given ID from the spreadsheet. */
6586
+ export type SheetsDeleteBandingRequest = {
6587
+ /** The ID of the banded range to delete. */
6588
+ bandedRangeId?: number;
6589
+ };
6590
+ /** The definition of how a value in a pivot table should be calculated. */
6591
+ export type SheetsPivotValue = {
6592
+ /** A custom formula to calculate the value. The formula must start with an `=` character. */
6593
+ formula?: string;
6594
+ /** If specified, indicates that pivot values should be displayed as the result of a calculation with another pivot value. For example, if calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all the pivot values are displayed as the percentage of the grand total. In the Sheets editor, this is referred to as "Show As" in the value section of a pivot table. */
6595
+ calculatedDisplayType?: "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" | "PERCENT_OF_ROW_TOTAL" | "PERCENT_OF_COLUMN_TOTAL" | "PERCENT_OF_GRAND_TOTAL";
6596
+ /** The reference to the data source column that this value reads from. */
6597
+ dataSourceColumnReference?: SheetsDataSourceColumnReference;
6598
+ /** A function to summarize the value. If formula is set, the only supported values are SUM and CUSTOM. If sourceColumnOffset is set, then `CUSTOM` is not supported. */
6599
+ summarizeFunction?: "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" | "SUM" | "COUNTA" | "COUNT" | "COUNTUNIQUE" | "AVERAGE" | "MAX" | "MIN" | "MEDIAN" | "PRODUCT" | "STDEV" | "STDEVP" | "VAR" | "VARP" | "CUSTOM" | "NONE";
6600
+ /** The column offset of the source range that this value reads from. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this value refers to column `C`, whereas the offset `1` would refer to column `D`. */
6601
+ sourceColumnOffset?: number;
6602
+ /** A name to use for the value. */
6603
+ name?: string;
6604
+ };
6605
+ /** A data validation rule for a column in a table. */
6606
+ export type SheetsTableColumnDataValidationRule = {
6607
+ /** The condition that data in the cell must match. Valid only if the [BooleanCondition.type] is ONE_OF_LIST. */
6608
+ condition?: SheetsBooleanCondition;
6609
+ };
6610
+ /** The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters. */
6611
+ export type SheetsBatchGetValuesByDataFilterRequest = {
6612
+ /** How values should be represented in the output. The default render option is FORMATTED_VALUE. */
6613
+ valueRenderOption?: "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA";
6614
+ /** The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response. */
6615
+ dataFilters?: Array<SheetsDataFilter>;
6616
+ /** 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` returns `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`. */
6617
+ majorDimension?: "DIMENSION_UNSPECIFIED" | "ROWS" | "COLUMNS";
6618
+ /** 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 SERIAL_NUMBER. */
6619
+ dateTimeRenderOption?: "SERIAL_NUMBER" | "FORMATTED_STRING";
6620
+ };
6621
+ /** The kinds of value that a cell in a spreadsheet can have. */
6622
+ export type SheetsExtendedValue = {
6623
+ /** Represents an error. This field is read-only. */
6624
+ errorValue?: SheetsErrorValue;
6625
+ /** Represents a boolean value. */
6626
+ boolValue?: boolean;
6627
+ /** Represents a string value. Leading single quotes are not included. For example, if the user typed `'123` into the UI, this would be represented as a `stringValue` of `"123"`. */
6628
+ stringValue?: string;
6629
+ /** Represents a formula. */
6630
+ formulaValue?: string;
6631
+ /** Represents a double value. Note: Dates, Times and DateTimes are represented as doubles in SERIAL_NUMBER format. */
6632
+ numberValue?: number;
6633
+ };
6634
+ /** Updates properties of the sheet with the specified sheetId. */
6635
+ export type SheetsUpdateSheetPropertiesRequest = {
6636
+ /** The properties to update. */
6637
+ properties?: SheetsSheetProperties;
6638
+ /** The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6639
+ fields?: string;
6640
+ };
6641
+ /** Update an embedded object's position (such as a moving or resizing a chart or image). */
6642
+ export type SheetsUpdateEmbeddedObjectPositionRequest = {
6643
+ /** The ID of the object to moved. */
6644
+ objectId?: number;
6645
+ /** An explicit position to move the embedded object to. If newPosition.sheetId is set, a new sheet with that ID will be created. If newPosition.newSheet is set to true, a new sheet will be created with an ID that will be chosen for you. */
6646
+ newPosition?: SheetsEmbeddedObjectPosition;
6647
+ /** The fields of OverlayPosition that should be updated when setting a new position. Used only if newPosition.overlayPosition is set, in which case at least one field must be specified. The root `newPosition.overlayPosition` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6648
+ fields?: string;
6649
+ };
6650
+ /** Updates a data source. After the data source is updated successfully, an execution is triggered to refresh the associated DATA_SOURCE sheet to read data from the updated data source. The request requires an additional `bigquery.readonly` OAuth scope if you are updating a BigQuery data source. */
6651
+ export type SheetsUpdateDataSourceRequest = {
6652
+ /** The fields that should be updated. At least one field must be specified. The root `dataSource` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. */
6653
+ fields?: string;
6654
+ /** The data source to update. */
6655
+ dataSource?: SheetsDataSource;
6656
+ };
6657
+ /** Finds and replaces data in cells over a range, sheet, or all sheets. */
6658
+ export type SheetsFindReplaceRequest = {
6659
+ /** The range to find/replace over. */
6660
+ range?: SheetsGridRange;
6661
+ /** True if the search is case sensitive. */
6662
+ matchCase?: boolean;
6663
+ /** The value to search. */
6664
+ find?: string;
6665
+ /** True to find/replace over all sheets. */
6666
+ allSheets?: boolean;
6667
+ /** True if the search should include cells with formulas. False to skip cells with formulas. */
6668
+ includeFormulas?: boolean;
6669
+ /** The value to use as the replacement. */
6670
+ replacement?: string;
6671
+ /** True if the find value is a regex. The regular expression and replacement should follow Java regex rules at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. The replacement string is allowed to refer to capturing groups. For example, if one cell has the contents `"Google Sheets"` and another has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of `"$1 Rocks"` would change the contents of the cells to `"GSheets Rocks"` and `"GDocs Rocks"` respectively. */
6672
+ searchByRegex?: boolean;
6673
+ /** The sheet to find/replace over. */
6674
+ sheetId?: number;
6675
+ /** True if the find value should match the entire cell. */
6676
+ matchEntireCell?: boolean;
6677
+ };
6678
+ /** Filter that describes what data should be selected or returned from a request. For more information, see [Read, write, and search metadata](https://developers.google.com/workspace/sheets/api/guides/metadata). */
6679
+ export type SheetsDataFilter = {
6680
+ /** Selects data that matches the specified A1 range. */
6681
+ a1Range?: string;
6682
+ /** Selects data that matches the range described by the GridRange. */
6683
+ gridRange?: SheetsGridRange;
6684
+ /** Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup. */
6685
+ developerMetadataLookup?: SheetsDeveloperMetadataLookup;
6686
+ };
6687
+ /** Sets a data validation rule to every cell in the range. To clear validation in a range, call this with no rule specified. */
6688
+ export type SheetsSetDataValidationRequest = {
6689
+ /** The range the data validation rule should apply to. */
6690
+ range?: SheetsGridRange;
6691
+ /** The data validation rule to set on each cell in the range, or empty to clear the data validation in the range. */
6692
+ rule?: SheetsDataValidationRule;
6693
+ /** Optional. If true, the data validation rule will be applied to the filtered rows as well. */
6694
+ filteredRowsIncluded?: boolean;
6695
+ };
6696
+ /** A location in the spreadsheet that is tied to a CommentThread with the same anchorId. Note: Multiple anchors may refer to the same location. */
6697
+ export type SheetsCommentAnchor = {
6698
+ /** The unique ID of the comment anchor. Output only. */
6699
+ anchorId?: string;
6700
+ /** The coordinate range inside the sheet where this comment is anchored. */
6701
+ range?: SheetsGridRange;
6702
+ };
6703
+ /** An axis of the chart. A chart may not have more than one axis per axis position. */
6704
+ export type SheetsBasicChartAxis = {
6705
+ /** The view window options for this axis. */
6706
+ viewWindowOptions?: SheetsChartAxisViewWindowOptions;
6707
+ /** The title of this axis. If set, this overrides any title inferred from headers of the data. */
6708
+ title?: string;
6709
+ /** The axis title text position. */
6710
+ titleTextPosition?: SheetsTextPosition;
6711
+ /** The format of the title. Only valid if the axis is not associated with the domain. The link field is not supported. */
6712
+ format?: SheetsTextFormat;
6713
+ /** The position of this axis. */
6714
+ position?: "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" | "BOTTOM_AXIS" | "LEFT_AXIS" | "RIGHT_AXIS";
6715
+ };
6716
+ /** A request to create developer metadata. */
6717
+ export type SheetsCreateDeveloperMetadataRequest = {
6718
+ /** The developer metadata to create. */
6719
+ developerMetadata?: SheetsDeveloperMetadata;
6720
+ };
6721
+ /** The result of creating a comment. */
6722
+ export type SheetsInsertCommentResponse = {
6723
+ /** The newly-inserted comment thread. */
6724
+ commentThread?: SheetsCommentThread;
6725
+ };
6726
+ /** This specifies the details of the data source. For example, for BigQuery, this specifies information about the BigQuery source. */
6727
+ export type SheetsDataSourceSpec = {
6728
+ /** The parameters of the data source, used when querying the data source. */
6729
+ parameters?: Array<SheetsDataSourceParameter>;
6730
+ /** A BigQueryDataSourceSpec. */
6731
+ bigQuery?: SheetsBigQueryDataSourceSpec;
6732
+ /** A LookerDatasourceSpec. */
6733
+ looker?: SheetsLookerDataSourceSpec;
6734
+ };
6735
+ /** The status of cancelling a single data source object refresh. */
6736
+ export type SheetsCancelDataSourceRefreshStatus = {
6737
+ /** The cancellation status. */
6738
+ refreshCancellationStatus?: SheetsRefreshCancellationStatus;
6739
+ /** Reference to the data source object whose refresh is being cancelled. */
6740
+ reference?: SheetsDataSourceObjectReference;
6741
+ };
6742
+ /** A value range that was matched by one or more data filers. */
6743
+ export type SheetsMatchedValueRange = {
6744
+ /** The values matched by the DataFilter. */
6745
+ valueRange?: SheetsValueRange;
6746
+ /** The DataFilters from the request that matched the range of values. */
6747
+ dataFilters?: Array<SheetsDataFilter>;
6748
+ };
6749
+ /** Adds a filter view. */
6750
+ export type SheetsAddFilterViewRequest = {
6751
+ /** 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.) */
6752
+ filter?: SheetsFilterView;
6753
+ };
3940
6754
  //# sourceMappingURL=types.d.ts.map