googleapis
Version:
Google APIs Client Library for Node.js
1,216 lines • 123 kB
TypeScript
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace docs_v1 {
interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Google Docs API
*
* Reads and writes Google Docs documents.
*
* @example
* const {google} = require('googleapis');
* const docs = google.docs('v1');
*
* @namespace docs
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Docs
*/
class Docs {
context: APIRequestContext;
documents: Resource$Documents;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* A ParagraphElement representing a spot in the text that is dynamically replaced with content that can change over time, like a page number.
*/
interface Schema$AutoText {
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. An AutoText may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
/**
* The suggested text style changes to this AutoText, keyed by suggestion ID.
*/
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
};
/**
* The text style of this AutoText.
*/
textStyle?: Schema$TextStyle;
/**
* The type of this auto text.
*/
type?: string;
}
/**
* Represents the background of a document.
*/
interface Schema$Background {
/**
* The background color.
*/
color?: Schema$OptionalColor;
}
/**
* A mask that indicates which of the fields on the base Background have been changed in this suggestion. For any field set to true, the Backgound has a new suggested value.
*/
interface Schema$BackgroundSuggestionState {
/**
* Indicates whether the current background color has been modified in this suggestion.
*/
backgroundColorSuggested?: boolean;
}
/**
* Request message for BatchUpdateDocument.
*/
interface Schema$BatchUpdateDocumentRequest {
/**
* A list of updates to apply to the document.
*/
requests?: Schema$Request[];
/**
* Provides control over how write requests are executed.
*/
writeControl?: Schema$WriteControl;
}
/**
* Response message from a BatchUpdateDocument request.
*/
interface Schema$BatchUpdateDocumentResponse {
/**
* The ID of the document to which the updates were applied to.
*/
documentId?: string;
/**
* The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.
*/
replies?: Schema$Response[];
/**
* The updated write control after applying the request.
*/
writeControl?: Schema$WriteControl;
}
/**
* The document body. The body typically contains the full document contents except for headers, footers and footnotes.
*/
interface Schema$Body {
/**
* The contents of the body. The indexes for the body's content begin at zero.
*/
content?: Schema$StructuralElement[];
}
/**
* Describes the bullet of a paragraph.
*/
interface Schema$Bullet {
/**
* The ID of the list this paragraph belongs to.
*/
listId?: string;
/**
* The nesting level of this paragraph in the list.
*/
nestingLevel?: number;
/**
* The paragraph specific text style applied to this bullet.
*/
textStyle?: Schema$TextStyle;
}
/**
* A mask that indicates which of the fields on the base Bullet have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$BulletSuggestionState {
/**
* Indicates if there was a suggested change to the list_id.
*/
listIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to the nesting_level.
*/
nestingLevelSuggested?: boolean;
/**
* A mask that indicates which of the fields in text style have been changed in this suggestion.
*/
textStyleSuggestionState?: Schema$TextStyleSuggestionState;
}
/**
* A solid color.
*/
interface Schema$Color {
/**
* The RGB color value.
*/
rgbColor?: Schema$RgbColor;
}
/**
* A ParagraphElement representing a column break. A column break makes the subsequent text start at the top of the next column.
*/
interface Schema$ColumnBreak {
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. A ColumnBreak may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
/**
* The suggested text style changes to this ColumnBreak, keyed by suggestion ID.
*/
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
};
/**
* The text style of this ColumnBreak. Similar to text content, like text runs and footnote references, the text style of a column break can affect content layout as well as the styling of text inserted adjacent to it.
*/
textStyle?: Schema$TextStyle;
}
/**
* Creates a NamedRange referencing the given range.
*/
interface Schema$CreateNamedRangeRequest {
/**
* The name of the NamedRange. Names do not need to be unique. Names must be at least 1 character and no more than 256 characters, measured in UTF-16 code units.
*/
name?: string;
/**
* The range to apply the name to.
*/
range?: Schema$Range;
}
/**
* The result of creating a named range.
*/
interface Schema$CreateNamedRangeResponse {
/**
* The ID of the created named range.
*/
namedRangeId?: string;
}
/**
* Creates bullets for all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text. If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list.
*/
interface Schema$CreateParagraphBulletsRequest {
/**
* The kinds of bullet glyphs to be used.
*/
bulletPreset?: string;
/**
* The range to apply the bullet preset to.
*/
range?: Schema$Range;
}
/**
* The crop properties of an image. The crop rectangle is represented using fractional offsets from the original content's four edges. - If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the image's original bounding rectangle. - If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the image's original bounding rectangle. - If all offsets and rotation angle are 0, the image is not cropped.
*/
interface Schema$CropProperties {
/**
* The clockwise rotation angle of the crop rectangle around its center, in radians. Rotation is applied after the offsets.
*/
angle?: number;
/**
* The offset specifies how far inwards the bottom edge of the crop rectangle is from the bottom edge of the original content as a fraction of the original content's height.
*/
offsetBottom?: number;
/**
* The offset specifies how far inwards the left edge of the crop rectangle is from the left edge of the original content as a fraction of the original content's width.
*/
offsetLeft?: number;
/**
* The offset specifies how far inwards the right edge of the crop rectangle is from the right edge of the original content as a fraction of the original content's width.
*/
offsetRight?: number;
/**
* The offset specifies how far inwards the top edge of the crop rectangle is from the top edge of the original content as a fraction of the original content's height.
*/
offsetTop?: number;
}
/**
* A mask that indicates which of the fields on the base CropProperties have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$CropPropertiesSuggestionState {
/**
* Indicates if there was a suggested change to angle.
*/
angleSuggested?: boolean;
/**
* Indicates if there was a suggested change to offset_bottom.
*/
offsetBottomSuggested?: boolean;
/**
* Indicates if there was a suggested change to offset_left.
*/
offsetLeftSuggested?: boolean;
/**
* Indicates if there was a suggested change to offset_right.
*/
offsetRightSuggested?: boolean;
/**
* Indicates if there was a suggested change to offset_top.
*/
offsetTopSuggested?: boolean;
}
/**
* Deletes content from the document.
*/
interface Schema$DeleteContentRangeRequest {
/**
* The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a 400 bad request error is returned. Some examples of invalid delete requests include: * Deleting one code unit of a surrogate pair. * Deleting the last newline character of a Body, Header, Footer, Footnote, TableCell or TableOfContents. * Deleting the start or end of a Table, TableOfContents or Equation without deleting the entire element. * Deleting the newline character before a Table, TableOfContents or SectionBreak without deleting the element. * Deleting individual rows or cells of a table. Deleting the content within a table cell is allowed.
*/
range?: Schema$Range;
}
/**
* Deletes a NamedRange.
*/
interface Schema$DeleteNamedRangeRequest {
/**
* The name of the range(s) to delete. All named ranges with the given name will be deleted.
*/
name?: string;
/**
* The ID of the named range to delete.
*/
namedRangeId?: string;
}
/**
* Deletes bullets from all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph.
*/
interface Schema$DeleteParagraphBulletsRequest {
/**
* The range to delete bullets from.
*/
range?: Schema$Range;
}
/**
* Deletes a PositionedObject from the document.
*/
interface Schema$DeletePositionedObjectRequest {
/**
* The ID of the positioned object to delete.
*/
objectId?: string;
}
/**
* Deletes a column from a table.
*/
interface Schema$DeleteTableColumnRequest {
/**
* The reference table cell location from which the column will be deleted. The column this cell spans will be deleted. If this is a merged cell that spans multiple columns, all columns that the cell spans will be deleted. If no columns remain in the table after this deletion, the whole table is deleted.
*/
tableCellLocation?: Schema$TableCellLocation;
}
/**
* Deletes a row from a table.
*/
interface Schema$DeleteTableRowRequest {
/**
* The reference table cell location from which the row will be deleted. The row this cell spans will be deleted. If this is a merged cell that spans multiple rows, all rows that the cell spans will be deleted. If no rows remain in the table after this deletion, the whole table is deleted.
*/
tableCellLocation?: Schema$TableCellLocation;
}
/**
* A magnitude in a single direction in the specified units.
*/
interface Schema$Dimension {
/**
* The magnitude.
*/
magnitude?: number;
/**
* The units for magnitude.
*/
unit?: string;
}
/**
* A Google Docs document.
*/
interface Schema$Document {
/**
* Output only. The main body of the document.
*/
body?: Schema$Body;
/**
* Output only. The ID of the document.
*/
documentId?: string;
/**
* Output only. The style of the document.
*/
documentStyle?: Schema$DocumentStyle;
/**
* Output only. The footers in the document, keyed by footer ID.
*/
footers?: {
[key: string]: Schema$Footer;
};
/**
* Output only. The footnotes in the document, keyed by footnote ID.
*/
footnotes?: {
[key: string]: Schema$Footnote;
};
/**
* Output only. The headers in the document, keyed by header ID.
*/
headers?: {
[key: string]: Schema$Header;
};
/**
* Output only. The inline objects in the document, keyed by object ID.
*/
inlineObjects?: {
[key: string]: Schema$InlineObject;
};
/**
* Output only. The lists in the document, keyed by list ID.
*/
lists?: {
[key: string]: Schema$List;
};
/**
* Output only. The named ranges in the document, keyed by name.
*/
namedRanges?: {
[key: string]: Schema$NamedRanges;
};
/**
* Output only. The named styles of the document.
*/
namedStyles?: Schema$NamedStyles;
/**
* Output only. The positioned objects in the document, keyed by object ID.
*/
positionedObjects?: {
[key: string]: Schema$PositionedObject;
};
/**
* Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated; however, a changed ID can also be due to internal factors such as ID format changes.
*/
revisionId?: string;
/**
* Output only. The suggested changes to the style of the document, keyed by suggestion ID.
*/
suggestedDocumentStyleChanges?: {
[key: string]: Schema$SuggestedDocumentStyle;
};
/**
* Output only. The suggested changes to the named styles of the document, keyed by suggestion ID.
*/
suggestedNamedStylesChanges?: {
[key: string]: Schema$SuggestedNamedStyles;
};
/**
* Output only. The suggestions view mode applied to the document. Note: When editing a document, changes must be based on a document with SUGGESTIONS_INLINE.
*/
suggestionsViewMode?: string;
/**
* The title of the document.
*/
title?: string;
}
/**
* The style of the document.
*/
interface Schema$DocumentStyle {
/**
* The background of the document.
*/
background?: Schema$Background;
/**
* The ID of the default footer. If not set, there is no default footer.
*/
defaultFooterId?: string;
/**
* The ID of the default header. If not set, there is no default header.
*/
defaultHeaderId?: string;
/**
* The ID of the footer used only for even pages. The value of use_even_page_header_footer determines whether to use the default_footer_id or this value for the footer on even pages. If not set, there is no even page footer.
*/
evenPageFooterId?: string;
/**
* The ID of the header used only for even pages. The value of use_even_page_header_footer determines whether to use the default_header_id or this value for the header on even pages. If not set, there is no even page header.
*/
evenPageHeaderId?: string;
/**
* The ID of the footer used only for the first page. If not set then a unique footer for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_footer_id or this value for the footer on the first page. If not set, there is no first page footer.
*/
firstPageFooterId?: string;
/**
* The ID of the header used only for the first page. If not set then a unique header for the first page does not exist. The value of use_first_page_header_footer determines whether to use the default_header_id or this value for the header on the first page. If not set, there is no first page header.
*/
firstPageHeaderId?: string;
/**
* The bottom page margin.
*/
marginBottom?: Schema$Dimension;
/**
* The left page margin.
*/
marginLeft?: Schema$Dimension;
/**
* The right page margin.
*/
marginRight?: Schema$Dimension;
/**
* The top page margin.
*/
marginTop?: Schema$Dimension;
/**
* The page number from which to start counting the number of pages.
*/
pageNumberStart?: number;
/**
* The size of a page in the document.
*/
pageSize?: Schema$Size;
/**
* Indicates whether to use the even page header / footer IDs for the even pages.
*/
useEvenPageHeaderFooter?: boolean;
/**
* Indicates whether to use the first page header / footer IDs for the first page.
*/
useFirstPageHeaderFooter?: boolean;
}
/**
* A mask that indicates which of the fields on the base DocumentStyle have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$DocumentStyleSuggestionState {
/**
* A mask that indicates which of the fields in background have been changed in this suggestion.
*/
backgroundSuggestionState?: Schema$BackgroundSuggestionState;
/**
* Indicates if there was a suggested change to default_footer_id.
*/
defaultFooterIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to default_header_id.
*/
defaultHeaderIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to even_page_footer_id.
*/
evenPageFooterIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to even_page_header_id.
*/
evenPageHeaderIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to first_page_footer_id.
*/
firstPageFooterIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to first_page_header_id.
*/
firstPageHeaderIdSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_bottom.
*/
marginBottomSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_left.
*/
marginLeftSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_right.
*/
marginRightSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_top.
*/
marginTopSuggested?: boolean;
/**
* Indicates if there was a suggested change to page_number_start.
*/
pageNumberStartSuggested?: boolean;
/**
* A mask that indicates which of the fields in size have been changed in this suggestion.
*/
pageSizeSuggestionState?: Schema$SizeSuggestionState;
/**
* Indicates if there was a suggested change to use_even_page_header_footer.
*/
useEvenPageHeaderFooterSuggested?: boolean;
/**
* Indicates if there was a suggested change to use_first_page_header_footer.
*/
useFirstPageHeaderFooterSuggested?: boolean;
}
/**
* The properties of an embedded drawing.
*/
interface Schema$EmbeddedDrawingProperties {
}
/**
* A mask that indicates which of the fields on the base EmbeddedDrawingProperties have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$EmbeddedDrawingPropertiesSuggestionState {
}
/**
* An embedded object in the document.
*/
interface Schema$EmbeddedObject {
/**
* The description of the embedded object. The `title` and `description` are both combined to display alt text.
*/
description?: string;
/**
* The properties of an embedded drawing.
*/
embeddedDrawingProperties?: Schema$EmbeddedDrawingProperties;
/**
* The border of the embedded object.
*/
embeddedObjectBorder?: Schema$EmbeddedObjectBorder;
/**
* The properties of an image.
*/
imageProperties?: Schema$ImageProperties;
/**
* A reference to the external linked source content. For example, it contains a reference to the source Sheets chart when the embedded object is a linked chart. If unset, then the embedded object is not linked.
*/
linkedContentReference?: Schema$LinkedContentReference;
/**
* The bottom margin of the embedded object.
*/
marginBottom?: Schema$Dimension;
/**
* The left margin of the embedded object.
*/
marginLeft?: Schema$Dimension;
/**
* The right margin of the embedded object.
*/
marginRight?: Schema$Dimension;
/**
* The top margin of the embedded object.
*/
marginTop?: Schema$Dimension;
/**
* The visible size of the image after cropping.
*/
size?: Schema$Size;
/**
* The title of the embedded object. The `title` and `description` are both combined to display alt text.
*/
title?: string;
}
/**
* A border around an EmbeddedObject.
*/
interface Schema$EmbeddedObjectBorder {
/**
* The color of the border.
*/
color?: Schema$OptionalColor;
/**
* The dash style of the border.
*/
dashStyle?: string;
/**
* The property state of the border property.
*/
propertyState?: string;
/**
* The width of the border.
*/
width?: Schema$Dimension;
}
/**
* A mask that indicates which of the fields on the base EmbeddedObjectBorder have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$EmbeddedObjectBorderSuggestionState {
/**
* Indicates if there was a suggested change to color.
*/
colorSuggested?: boolean;
/**
* Indicates if there was a suggested change to dash_style.
*/
dashStyleSuggested?: boolean;
/**
* Indicates if there was a suggested change to property_state.
*/
propertyStateSuggested?: boolean;
/**
* Indicates if there was a suggested change to width.
*/
widthSuggested?: boolean;
}
/**
* A mask that indicates which of the fields on the base EmbeddedObject have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$EmbeddedObjectSuggestionState {
/**
* Indicates if there was a suggested change to description.
*/
descriptionSuggested?: boolean;
/**
* A mask that indicates which of the fields in embedded_drawing_properties have been changed in this suggestion.
*/
embeddedDrawingPropertiesSuggestionState?: Schema$EmbeddedDrawingPropertiesSuggestionState;
/**
* A mask that indicates which of the fields in embedded_object_border have been changed in this suggestion.
*/
embeddedObjectBorderSuggestionState?: Schema$EmbeddedObjectBorderSuggestionState;
/**
* A mask that indicates which of the fields in image_properties have been changed in this suggestion.
*/
imagePropertiesSuggestionState?: Schema$ImagePropertiesSuggestionState;
/**
* A mask that indicates which of the fields in linked_content_reference have been changed in this suggestion.
*/
linkedContentReferenceSuggestionState?: Schema$LinkedContentReferenceSuggestionState;
/**
* Indicates if there was a suggested change to margin_bottom.
*/
marginBottomSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_left.
*/
marginLeftSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_right.
*/
marginRightSuggested?: boolean;
/**
* Indicates if there was a suggested change to margin_top.
*/
marginTopSuggested?: boolean;
/**
* A mask that indicates which of the fields in size have been changed in this suggestion.
*/
sizeSuggestionState?: Schema$SizeSuggestionState;
/**
* Indicates if there was a suggested change to title.
*/
titleSuggested?: boolean;
}
/**
* Location at the end of a body, header, footer or footnote. The location is immediately before the last newline in the document segment.
*/
interface Schema$EndOfSegmentLocation {
/**
* The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
*/
segmentId?: string;
}
/**
* A ParagraphElement representing an equation.
*/
interface Schema$Equation {
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. A Equation may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
}
/**
* A document footer.
*/
interface Schema$Footer {
/**
* The contents of the footer. The indexes for a footer's content begin at zero.
*/
content?: Schema$StructuralElement[];
/**
* The ID of the footer.
*/
footerId?: string;
}
/**
* A document footnote.
*/
interface Schema$Footnote {
/**
* The contents of the footnote. The indexes for a footnote's content begin at zero.
*/
content?: Schema$StructuralElement[];
/**
* The ID of the footnote.
*/
footnoteId?: string;
}
/**
* A ParagraphElement representing a footnote reference. A footnote reference is the inline content rendered with a number and is used to identify the footnote.
*/
interface Schema$FootnoteReference {
/**
* The ID of the footnote that contains the content of this footnote reference.
*/
footnoteId?: string;
/**
* The rendered number of this footnote.
*/
footnoteNumber?: string;
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. A FootnoteReference may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
/**
* The suggested text style changes to this FootnoteReference, keyed by suggestion ID.
*/
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
};
/**
* The text style of this FootnoteReference.
*/
textStyle?: Schema$TextStyle;
}
/**
* A document header.
*/
interface Schema$Header {
/**
* The contents of the header. The indexes for a header's content begin at zero.
*/
content?: Schema$StructuralElement[];
/**
* The ID of the header.
*/
headerId?: string;
}
/**
* A ParagraphElement representing a horizontal line.
*/
interface Schema$HorizontalRule {
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. A HorizontalRule may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
/**
* The suggested text style changes to this HorizontalRule, keyed by suggestion ID.
*/
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
};
/**
* The text style of this HorizontalRule. Similar to text content, like text runs and footnote references, the text style of a horizontal rule can affect content layout as well as the styling of text inserted adjacent to it.
*/
textStyle?: Schema$TextStyle;
}
/**
* The properties of an image.
*/
interface Schema$ImageProperties {
/**
* The clockwise rotation angle of the image, in radians.
*/
angle?: number;
/**
* The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect.
*/
brightness?: number;
/**
* A URI to the image with a default lifetime of 30 minutes. This URI is tagged with the account of the requester. Anyone with the URI effectively accesses the image as the original requester. Access to the image may be lost if the document's sharing settings change.
*/
contentUri?: string;
/**
* The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect.
*/
contrast?: number;
/**
* The crop properties of the image.
*/
cropProperties?: Schema$CropProperties;
/**
* The source URI is the URI used to insert the image. The source URI can be empty.
*/
sourceUri?: string;
/**
* The transparency effect of the image. The value should be in the interval [0.0, 1.0], where 0 means no effect and 1 means completely transparent.
*/
transparency?: number;
}
/**
* A mask that indicates which of the fields on the base ImageProperties have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$ImagePropertiesSuggestionState {
/**
* Indicates if there was a suggested change to angle.
*/
angleSuggested?: boolean;
/**
* Indicates if there was a suggested change to brightness.
*/
brightnessSuggested?: boolean;
/**
* Indicates if there was a suggested change to content_uri.
*/
contentUriSuggested?: boolean;
/**
* Indicates if there was a suggested change to contrast.
*/
contrastSuggested?: boolean;
/**
* A mask that indicates which of the fields in crop_properties have been changed in this suggestion.
*/
cropPropertiesSuggestionState?: Schema$CropPropertiesSuggestionState;
/**
* Indicates if there was a suggested change to source_uri.
*/
sourceUriSuggested?: boolean;
/**
* Indicates if there was a suggested change to transparency.
*/
transparencySuggested?: boolean;
}
/**
* An object that appears inline with text. An InlineObject contains an EmbeddedObject such as an image.
*/
interface Schema$InlineObject {
/**
* The properties of this inline object.
*/
inlineObjectProperties?: Schema$InlineObjectProperties;
/**
* The ID of this inline object.
*/
objectId?: string;
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested changes to the inline object properties, keyed by suggestion ID.
*/
suggestedInlineObjectPropertiesChanges?: {
[key: string]: Schema$SuggestedInlineObjectProperties;
};
/**
* The suggested insertion ID. If empty, then this is not a suggested insertion.
*/
suggestedInsertionId?: string;
}
/**
* A ParagraphElement that contains an InlineObject.
*/
interface Schema$InlineObjectElement {
/**
* The ID of the InlineObject this element contains.
*/
inlineObjectId?: string;
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this content.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion IDs. An InlineObjectElement may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion.
*/
suggestedInsertionIds?: string[];
/**
* The suggested text style changes to this InlineObject, keyed by suggestion ID.
*/
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
};
/**
* The text style of this InlineObjectElement. Similar to text content, like text runs and footnote references, the text style of an inline object element can affect content layout as well as the styling of text inserted adjacent to it.
*/
textStyle?: Schema$TextStyle;
}
/**
* Properties of an InlineObject.
*/
interface Schema$InlineObjectProperties {
/**
* The embedded object of this inline object.
*/
embeddedObject?: Schema$EmbeddedObject;
}
/**
* A mask that indicates which of the fields on the base InlineObjectProperties have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$InlineObjectPropertiesSuggestionState {
/**
* A mask that indicates which of the fields in embedded_object have been changed in this suggestion.
*/
embeddedObjectSuggestionState?: Schema$EmbeddedObjectSuggestionState;
}
/**
* Inserts an InlineObject containing an image at the given location.
*/
interface Schema$InsertInlineImageRequest {
/**
* Inserts the text at the end of a header, footer or the document body. Inline images cannot be inserted inside a footnote.
*/
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
/**
* Inserts the image at a specific index in the document. The image must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Inline images cannot be inserted inside a footnote or equation.
*/
location?: Schema$Location;
/**
* The size that the image should appear as in the document. This property is optional and the final size of the image in the document is determined by the following rules: * If neither width nor height is specified, then a default size of the image is calculated based on its resolution. * If one dimension is specified then the other dimension is calculated to preserve the aspect ratio of the image. * If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio.
*/
objectSize?: Schema$Size;
/**
* The image URI. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URI can be at most 2 kB in length. The URI itself is saved with the image, and exposed via the ImageProperties.content_uri field.
*/
uri?: string;
}
/**
* The result of inserting an inline image.
*/
interface Schema$InsertInlineImageResponse {
/**
* The ID of the created InlineObject.
*/
objectId?: string;
}
/**
* The result of inserting an embedded Google Sheets chart.
*/
interface Schema$InsertInlineSheetsChartResponse {
/**
* The object ID of the inserted chart.
*/
objectId?: string;
}
/**
* Inserts a page break followed by a newline at the specified location.
*/
interface Schema$InsertPageBreakRequest {
/**
* Inserts the page break at the end of the document body. Page breaks cannot be inserted inside a footnote, header or footer. Since page breaks can only be inserted inside the body, the segment ID field must be empty.
*/
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
/**
* Inserts the page break at a specific index in the document. The page break must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Page breaks cannot be inserted inside a table, equation, footnote, header or footer. Since page breaks can only be inserted inside the body, the segment ID field must be empty.
*/
location?: Schema$Location;
}
/**
* Inserts an empty column into a table.
*/
interface Schema$InsertTableColumnRequest {
/**
* Whether to insert new column to the right of the reference cell location. - `True`: insert to the right. - `False`: insert to the left.
*/
insertRight?: boolean;
/**
* The reference table cell location from which columns will be inserted. A new column will be inserted to the left (or right) of the column where the reference cell is. If the reference cell is a merged cell, a new column will be inserted to the left (or right) of the merged cell.
*/
tableCellLocation?: Schema$TableCellLocation;
}
/**
* Inserts a table at the specified location. A newline character will be inserted before the inserted table.
*/
interface Schema$InsertTableRequest {
/**
* The number of columns in the table.
*/
columns?: number;
/**
* Inserts the table at the end of the given header, footer or document body. A newline character will be inserted before the inserted table. Tables cannot be inserted inside a footnote.
*/
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
/**
* Inserts the table at a specific model index. A newline character will be inserted before the inserted table, therefore the table start index will be at the specified location index + 1. The table must be inserted inside the bounds of an existing Paragraph. For instance, it cannot be inserted at a table's start index (i.e. between an existing table and its preceding paragraph). Tables cannot be inserted inside a footnote or equation.
*/
location?: Schema$Location;
/**
* The number of rows in the table.
*/
rows?: number;
}
/**
* Inserts an empty row into a table.
*/
interface Schema$InsertTableRowRequest {
/**
* Whether to insert new row below the reference cell location. - `True`: insert below the cell. - `False`: insert above the cell.
*/
insertBelow?: boolean;
/**
* The reference table cell location from which rows will be inserted. A new row will be inserted above (or below) the row where the reference cell is. If the reference cell is a merged cell, a new row will be inserted above (or below) the merged cell.
*/
tableCellLocation?: Schema$TableCellLocation;
}
/**
* Inserts text at the specified location.
*/
interface Schema$InsertTextRequest {
/**
* Inserts the text at the end of a header, footer, footnote or the document body.
*/
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
/**
* Inserts the text at a specific index in the document. Text must be inserted inside the bounds of an existing Paragraph. For instance, text cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). The text must be inserted in the preceding paragraph.
*/
location?: Schema$Location;
/**
* The text to be inserted. Inserting a newline character will implicitly create a new Paragraph at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets. Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text style for the inserted text will match the text immediately before the insertion index. Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text.
*/
text?: string;
}
/**
* A reference to another portion of a document or an external URL resource.
*/
interface Schema$Link {
/**
* The ID of a bookmark in this document.
*/
bookmarkId?: string;
/**
* The ID of a heading in this document.
*/
headingId?: string;
/**
* An external URL.
*/
url?: string;
}
/**
* A reference to the external linked source content.
*/
interface Schema$LinkedContentReference {
/**
* A reference to the linked chart.
*/
sheetsChartReference?: Schema$SheetsChartReference;
}
/**
* A mask that indicates which of the fields on the base LinkedContentReference have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$LinkedContentReferenceSuggestionState {
/**
* A mask that indicates which of the fields in sheets_chart_reference have been changed in this suggestion.
*/
sheetsChartReferenceSuggestionState?: Schema$SheetsChartReferenceSuggestionState;
}
/**
* A List represents the list attributes for a group of paragraphs that all belong to the same list. A paragraph that is part of a list has a reference to the list's ID in its bullet.
*/
interface Schema$List {
/**
* The properties of the list.
*/
listProperties?: Schema$ListProperties;
/**
* The suggested deletion IDs. If empty, then there are no suggested deletions of this list.
*/
suggestedDeletionIds?: string[];
/**
* The suggested insertion ID. If empty, then this is not a suggested insertion.
*/
suggestedInsertionId?: string;
/**
* The suggested changes to the list properties, keyed by suggestion ID.
*/
suggestedListPropertiesChanges?: {
[key: string]: Schema$SuggestedListProperties;
};
}
/**
* The properties of a list which describe the look and feel of bullets belonging to paragraphs associated with a list.
*/
interface Schema$ListProperties {
/**
* Describes the properties of the bullets at the associated level. A list has at most nine levels of nesting with nesting level 0 corresponding to the top-most level and nesting level 8 corresponding to the most nested level. The nesting levels are returned in ascending order with the least nested returned first.
*/
nestingLevels?: Schema$NestingLevel[];
}
/**
* A mask that indicates which of the fields on the base ListProperties have been changed in this suggestion. For any field set to true, there is a new suggested value.
*/
interface Schema$ListPropertiesSuggestionState {
/**
* A mask that indicates which of the fields on the corresponding NestingLevel in nesting_levels have been changed in this suggestion. The nesting level suggestion states are returned in ascending order of the nesting level with the least nested returned first.
*/
nestingLevelsSuggestionStates?: Schema$NestingLevelSuggestionState[];
}
/**
* A particular location in the document.
*/
interface Schema$Location {
/**
* The zero-based index, in UTF-16 code units. The index is relative to the beginning of the segment specified by segment_id.
*/
index?: number;
/**
* The ID of the header, footer or footnote the location is in. An empty segment ID signifies the doc