UNPKG

@googleapis/docs

Version:
1,216 lines (1,207 loc) 173 kB
// Copyright 2020 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. /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable no-irregular-whitespace */ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, createAPIRequest, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext, } from 'googleapis-common'; import {Readable} from 'stream'; export namespace docs_v1 { export interface Options extends GlobalOptions { version: 'v1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: | string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * 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 * ```js * const {google} = require('googleapis'); * const docs = google.docs('v1'); * ``` */ export class Docs { context: APIRequestContext; documents: Resource$Documents; constructor(options: GlobalOptions, google?: GoogleConfigurable) { this.context = { _options: options || {}, google, }; this.documents = new Resource$Documents(this.context); } } /** * A ParagraphElement representing a spot in the text that's dynamically replaced with content that can change over time, like a page number. */ export interface Schema$AutoText { /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * The suggested insertion IDs. An AutoText may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion. */ suggestedInsertionIds?: string[] | null; /** * The suggested text style changes to this AutoText, keyed by suggestion ID. */ suggestedTextStyleChanges?: { [key: string]: Schema$SuggestedTextStyle; } | null; /** * The text style of this AutoText. */ textStyle?: Schema$TextStyle; /** * The type of this auto text. */ type?: string | null; } /** * Represents the background of a document. */ export 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. */ export interface Schema$BackgroundSuggestionState { /** * Indicates whether the current background color has been modified in this suggestion. */ backgroundColorSuggested?: boolean | null; } /** * Request message for BatchUpdateDocument. */ export 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. */ export interface Schema$BatchUpdateDocumentResponse { /** * The ID of the document to which the updates were applied to. */ documentId?: string | null; /** * 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. */ export interface Schema$Body { /** * The contents of the body. The indexes for the body's content begin at zero. */ content?: Schema$StructuralElement[]; } /** * A reference to a bookmark in this document. */ export interface Schema$BookmarkLink { /** * The ID of a bookmark in this document. */ id?: string | null; /** * The ID of the tab containing this bookmark. */ tabId?: string | null; } /** * Describes the bullet of a paragraph. */ export interface Schema$Bullet { /** * The ID of the list this paragraph belongs to. */ listId?: string | null; /** * The nesting level of this paragraph in the list. */ nestingLevel?: number | null; /** * 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's a new suggested value. */ export interface Schema$BulletSuggestionState { /** * Indicates if there was a suggested change to the list_id. */ listIdSuggested?: boolean | null; /** * Indicates if there was a suggested change to the nesting_level. */ nestingLevelSuggested?: boolean | null; /** * A mask that indicates which of the fields in text style have been changed in this suggestion. */ textStyleSuggestionState?: Schema$TextStyleSuggestionState; } /** * A solid color. */ export 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. */ export interface Schema$ColumnBreak { /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * The suggested insertion IDs. A ColumnBreak may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion. */ suggestedInsertionIds?: string[] | null; /** * The suggested text style changes to this ColumnBreak, keyed by suggestion ID. */ suggestedTextStyleChanges?: { [key: string]: Schema$SuggestedTextStyle; } | null; /** * 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 next to it. */ textStyle?: Schema$TextStyle; } /** * Creates a Footer. The new footer is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a footer of the specified type already exists, a 400 bad request error is returned. */ export interface Schema$CreateFooterRequest { /** * The location of the SectionBreak immediately preceding the section whose SectionStyle this footer should belong to. If this is unset or refers to the first section break in the document, the footer applies to the document style. */ sectionBreakLocation?: Schema$Location; /** * The type of footer to create. */ type?: string | null; } /** * The result of creating a footer. */ export interface Schema$CreateFooterResponse { /** * The ID of the created footer. */ footerId?: string | null; } /** * Creates a Footnote segment and inserts a new FootnoteReference to it at the given location. The new Footnote segment will contain a space followed by a newline character. */ export interface Schema$CreateFootnoteRequest { /** * Inserts the footnote reference at the end of the document body. Footnote references cannot be inserted inside a header, footer or footnote. Since footnote references can only be inserted in the body, the segment ID field must be empty. */ endOfSegmentLocation?: Schema$EndOfSegmentLocation; /** * Inserts the footnote reference at a specific index in the document. The footnote reference 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). Footnote references cannot be inserted inside an equation, header, footer or footnote. Since footnote references can only be inserted in the body, the segment ID field must be empty. */ location?: Schema$Location; } /** * The result of creating a footnote. */ export interface Schema$CreateFootnoteResponse { /** * The ID of the created footnote. */ footnoteId?: string | null; } /** * Creates a Header. The new header is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a header of the specified type already exists, a 400 bad request error is returned. */ export interface Schema$CreateHeaderRequest { /** * The location of the SectionBreak which begins the section this header should belong to. If `section_break_location' is unset or if it refers to the first section break in the document body, the header applies to the DocumentStyle */ sectionBreakLocation?: Schema$Location; /** * The type of header to create. */ type?: string | null; } /** * The result of creating a header. */ export interface Schema$CreateHeaderResponse { /** * The ID of the created header. */ headerId?: string | null; } /** * Creates a NamedRange referencing the given range. */ export 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 | null; /** * The range to apply the name to. */ range?: Schema$Range; } /** * The result of creating a named range. */ export interface Schema$CreateNamedRangeResponse { /** * The ID of the created named range. */ namedRangeId?: string | null; } /** * 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. */ export interface Schema$CreateParagraphBulletsRequest { /** * The kinds of bullet glyphs to be used. */ bulletPreset?: string | null; /** * 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 4 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 angles are 0, the image is not cropped. */ export interface Schema$CropProperties { /** * The clockwise rotation angle of the crop rectangle around its center, in radians. Rotation is applied after the offsets. */ angle?: number | null; /** * 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 | null; /** * 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 | null; /** * 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 | null; /** * 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 | null; } /** * 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's a new suggested value. */ export interface Schema$CropPropertiesSuggestionState { /** * Indicates if there was a suggested change to angle. */ angleSuggested?: boolean | null; /** * Indicates if there was a suggested change to offset_bottom. */ offsetBottomSuggested?: boolean | null; /** * Indicates if there was a suggested change to offset_left. */ offsetLeftSuggested?: boolean | null; /** * Indicates if there was a suggested change to offset_right. */ offsetRightSuggested?: boolean | null; /** * Indicates if there was a suggested change to offset_top. */ offsetTopSuggested?: boolean | null; } /** * Deletes content from the document. */ export 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 Footer from the document. */ export interface Schema$DeleteFooterRequest { /** * The id of the footer to delete. If this footer is defined on DocumentStyle, the reference to this footer is removed, resulting in no footer of that type for the first section of the document. If this footer is defined on a SectionStyle, the reference to this footer is removed and the footer of that type is now continued from the previous section. */ footerId?: string | null; /** * The tab that contains the footer to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. */ tabId?: string | null; } /** * Deletes a Header from the document. */ export interface Schema$DeleteHeaderRequest { /** * The id of the header to delete. If this header is defined on DocumentStyle, the reference to this header is removed, resulting in no header of that type for the first section of the document. If this header is defined on a SectionStyle, the reference to this header is removed and the header of that type is now continued from the previous section. */ headerId?: string | null; /** * The tab containing the header to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. */ tabId?: string | null; } /** * Deletes a NamedRange. */ export interface Schema$DeleteNamedRangeRequest { /** * The name of the range(s) to delete. All named ranges with the given name will be deleted. */ name?: string | null; /** * The ID of the named range to delete. */ namedRangeId?: string | null; /** * Optional. The criteria used to specify which tab(s) the range deletion should occur in. When omitted, the range deletion is applied to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the range deletion applies to the singular tab. In a document containing multiple tabs: - If provided, the range deletion applies to the specified tabs. - If not provided, the range deletion applies to all tabs. */ tabsCriteria?: Schema$TabsCriteria; } /** * 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. */ export interface Schema$DeleteParagraphBulletsRequest { /** * The range to delete bullets from. */ range?: Schema$Range; } /** * Deletes a PositionedObject from the document. */ export interface Schema$DeletePositionedObjectRequest { /** * The ID of the positioned object to delete. */ objectId?: string | null; /** * The tab that the positioned object to delete is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. */ tabId?: string | null; } /** * Deletes a column from a table. */ export 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. */ export 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. */ export interface Schema$Dimension { /** * The magnitude. */ magnitude?: number | null; /** * The units for magnitude. */ unit?: string | null; } /** * A Google Docs document. */ export interface Schema$Document { /** * Output only. The main body of the document. Legacy field: Instead, use Document.tabs.documentTab.body, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ body?: Schema$Body; /** * Output only. The ID of the document. */ documentId?: string | null; /** * Output only. The style of the document. Legacy field: Instead, use Document.tabs.documentTab.documentStyle, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ documentStyle?: Schema$DocumentStyle; /** * Output only. The footers in the document, keyed by footer ID. Legacy field: Instead, use Document.tabs.documentTab.footers, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ footers?: {[key: string]: Schema$Footer} | null; /** * Output only. The footnotes in the document, keyed by footnote ID. Legacy field: Instead, use Document.tabs.documentTab.footnotes, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ footnotes?: {[key: string]: Schema$Footnote} | null; /** * Output only. The headers in the document, keyed by header ID. Legacy field: Instead, use Document.tabs.documentTab.headers, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ headers?: {[key: string]: Schema$Header} | null; /** * Output only. The inline objects in the document, keyed by object ID. Legacy field: Instead, use Document.tabs.documentTab.inlineObjects, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ inlineObjects?: {[key: string]: Schema$InlineObject} | null; /** * Output only. The lists in the document, keyed by list ID. Legacy field: Instead, use Document.tabs.documentTab.lists, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ lists?: {[key: string]: Schema$List} | null; /** * Output only. The named ranges in the document, keyed by name. Legacy field: Instead, use Document.tabs.documentTab.namedRanges, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ namedRanges?: {[key: string]: Schema$NamedRanges} | null; /** * Output only. The named styles of the document. Legacy field: Instead, use Document.tabs.documentTab.namedStyles, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ namedStyles?: Schema$NamedStyles; /** * Output only. The positioned objects in the document, keyed by object ID. Legacy field: Instead, use Document.tabs.documentTab.positionedObjects, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ positionedObjects?: {[key: string]: Schema$PositionedObject} | null; /** * 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 revision ID is not a sequential number but an opaque string. The format of the revision ID might change over time. 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 | null; /** * Output only. The suggested changes to the style of the document, keyed by suggestion ID. Legacy field: Instead, use Document.tabs.documentTab.suggestedDocumentStyleChanges, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ suggestedDocumentStyleChanges?: { [key: string]: Schema$SuggestedDocumentStyle; } | null; /** * Output only. The suggested changes to the named styles of the document, keyed by suggestion ID. Legacy field: Instead, use Document.tabs.documentTab.suggestedNamedStylesChanges, which exposes the actual document content from all tabs when the includeTabsContent parameter is set to `true`. If `false` or unset, this field contains information about the first tab in the document. */ suggestedNamedStylesChanges?: { [key: string]: Schema$SuggestedNamedStyles; } | null; /** * 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 | null; /** * Tabs that are part of a document. Tabs can contain child tabs, a tab nested within another tab. Child tabs are represented by the Tab.childTabs field. */ tabs?: Schema$Tab[]; /** * The title of the document. */ title?: string | null; } /** * The style of the document. */ export interface Schema$DocumentStyle { /** * The background of the document. Documents cannot have a transparent background color. */ background?: Schema$Background; /** * The ID of the default footer. If not set, there's no default footer. This property is read-only. */ defaultFooterId?: string | null; /** * The ID of the default header. If not set, there's no default header. This property is read-only. */ defaultHeaderId?: string | null; /** * 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's no even page footer. This property is read-only. */ evenPageFooterId?: string | null; /** * 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's no even page header. This property is read-only. */ evenPageHeaderId?: string | null; /** * 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's no first page footer. This property is read-only. */ firstPageFooterId?: string | null; /** * 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's no first page header. This property is read-only. */ firstPageHeaderId?: string | null; /** * Optional. Indicates whether to flip the dimensions of the page_size, which allows changing the page orientation between portrait and landscape. */ flipPageOrientation?: boolean | null; /** * The bottom page margin. Updating the bottom page margin on the document style clears the bottom page margin on all section styles. */ marginBottom?: Schema$Dimension; /** * The amount of space between the bottom of the page and the contents of the footer. */ marginFooter?: Schema$Dimension; /** * The amount of space between the top of the page and the contents of the header. */ marginHeader?: Schema$Dimension; /** * The left page margin. Updating the left page margin on the document style clears the left page margin on all section styles. It may also cause columns to resize in all sections. */ marginLeft?: Schema$Dimension; /** * The right page margin. Updating the right page margin on the document style clears the right page margin on all section styles. It may also cause columns to resize in all sections. */ marginRight?: Schema$Dimension; /** * The top page margin. Updating the top page margin on the document style clears the top page margin on all section styles. */ marginTop?: Schema$Dimension; /** * The page number from which to start counting the number of pages. */ pageNumberStart?: number | null; /** * The size of a page in the document. */ pageSize?: Schema$Size; /** * Indicates whether DocumentStyle margin_header, SectionStyle margin_header and DocumentStyle margin_footer, SectionStyle margin_footer are respected. When false, the default values in the Docs editor for header and footer margin is used. This property is read-only. */ useCustomHeaderFooterMargins?: boolean | null; /** * Indicates whether to use the even page header / footer IDs for the even pages. */ useEvenPageHeaderFooter?: boolean | null; /** * Indicates whether to use the first page header / footer IDs for the first page. */ useFirstPageHeaderFooter?: boolean | null; } /** * 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's a new suggested value. */ export 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 | null; /** * Indicates if there was a suggested change to default_header_id. */ defaultHeaderIdSuggested?: boolean | null; /** * Indicates if there was a suggested change to even_page_footer_id. */ evenPageFooterIdSuggested?: boolean | null; /** * Indicates if there was a suggested change to even_page_header_id. */ evenPageHeaderIdSuggested?: boolean | null; /** * Indicates if there was a suggested change to first_page_footer_id. */ firstPageFooterIdSuggested?: boolean | null; /** * Indicates if there was a suggested change to first_page_header_id. */ firstPageHeaderIdSuggested?: boolean | null; /** * Optional. Indicates if there was a suggested change to flip_page_orientation. */ flipPageOrientationSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_bottom. */ marginBottomSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_footer. */ marginFooterSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_header. */ marginHeaderSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_left. */ marginLeftSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_right. */ marginRightSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_top. */ marginTopSuggested?: boolean | null; /** * Indicates if there was a suggested change to page_number_start. */ pageNumberStartSuggested?: boolean | null; /** * 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_custom_header_footer_margins. */ useCustomHeaderFooterMarginsSuggested?: boolean | null; /** * Indicates if there was a suggested change to use_even_page_header_footer. */ useEvenPageHeaderFooterSuggested?: boolean | null; /** * Indicates if there was a suggested change to use_first_page_header_footer. */ useFirstPageHeaderFooterSuggested?: boolean | null; } /** * A tab with document contents. */ export interface Schema$DocumentTab { /** * The main body of the document tab. */ body?: Schema$Body; /** * The style of the document tab. */ documentStyle?: Schema$DocumentStyle; /** * The footers in the document tab, keyed by footer ID. */ footers?: {[key: string]: Schema$Footer} | null; /** * The footnotes in the document tab, keyed by footnote ID. */ footnotes?: {[key: string]: Schema$Footnote} | null; /** * The headers in the document tab, keyed by header ID. */ headers?: {[key: string]: Schema$Header} | null; /** * The inline objects in the document tab, keyed by object ID. */ inlineObjects?: {[key: string]: Schema$InlineObject} | null; /** * The lists in the document tab, keyed by list ID. */ lists?: {[key: string]: Schema$List} | null; /** * The named ranges in the document tab, keyed by name. */ namedRanges?: {[key: string]: Schema$NamedRanges} | null; /** * The named styles of the document tab. */ namedStyles?: Schema$NamedStyles; /** * The positioned objects in the document tab, keyed by object ID. */ positionedObjects?: {[key: string]: Schema$PositionedObject} | null; /** * The suggested changes to the style of the document tab, keyed by suggestion ID. */ suggestedDocumentStyleChanges?: { [key: string]: Schema$SuggestedDocumentStyle; } | null; /** * The suggested changes to the named styles of the document tab, keyed by suggestion ID. */ suggestedNamedStylesChanges?: { [key: string]: Schema$SuggestedNamedStyles; } | null; } /** * The properties of an embedded drawing and used to differentiate the object type. An embedded drawing is one that's created and edited within a document. Note that extensive details are not supported. */ export 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's a new suggested value. */ export interface Schema$EmbeddedDrawingPropertiesSuggestionState {} /** * An embedded object in the document. */ export interface Schema$EmbeddedObject { /** * The description of the embedded object. The `title` and `description` are both combined to display alt text. */ description?: string | null; /** * 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 Google 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 | null; } /** * A border around an EmbeddedObject. */ export interface Schema$EmbeddedObjectBorder { /** * The color of the border. */ color?: Schema$OptionalColor; /** * The dash style of the border. */ dashStyle?: string | null; /** * The property state of the border property. */ propertyState?: string | null; /** * 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's a new suggested value. */ export interface Schema$EmbeddedObjectBorderSuggestionState { /** * Indicates if there was a suggested change to color. */ colorSuggested?: boolean | null; /** * Indicates if there was a suggested change to dash_style. */ dashStyleSuggested?: boolean | null; /** * Indicates if there was a suggested change to property_state. */ propertyStateSuggested?: boolean | null; /** * Indicates if there was a suggested change to width. */ widthSuggested?: boolean | null; } /** * 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's a new suggested value. */ export interface Schema$EmbeddedObjectSuggestionState { /** * Indicates if there was a suggested change to description. */ descriptionSuggested?: boolean | null; /** * 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 | null; /** * Indicates if there was a suggested change to margin_left. */ marginLeftSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_right. */ marginRightSuggested?: boolean | null; /** * Indicates if there was a suggested change to margin_top. */ marginTopSuggested?: boolean | null; /** * 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 | null; } /** * Location at the end of a body, header, footer or footnote. The location is immediately before the last newline in the document segment. */ export 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 | null; /** * The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. */ tabId?: string | null; } /** * A ParagraphElement representing an equation. */ export interface Schema$Equation { /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * The suggested insertion IDs. An Equation may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion. */ suggestedInsertionIds?: string[] | null; } /** * A document footer. */ export 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 | null; } /** * A document footnote. */ export 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 | null; } /** * A ParagraphElement representing a footnote reference. A footnote reference is the inline content rendered with a number and is used to identify the footnote. */ export interface Schema$FootnoteReference { /** * The ID of the footnote that contains the content of this footnote reference. */ footnoteId?: string | null; /** * The rendered number of this footnote. */ footnoteNumber?: string | null; /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * The suggested insertion IDs. A FootnoteReference may have multiple insertion IDs if it's a nested suggested change. If empty, then this is not a suggested insertion. */ suggestedInsertionIds?: string[] | null; /** * The suggested text style changes to this FootnoteReference, keyed by suggestion ID. */ suggestedTextStyleChanges?: { [key: string]: Schema$SuggestedTextStyle; } | null; /** * The text style of this FootnoteReference. */ textStyle?: Schema$TextStyle; } /** * A document header. */ export 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 | null; } /** * A reference to a heading in this document. */ export interface Schema$HeadingLink { /** * The ID of a heading in this document. */ id?: string | null; /** * The ID of the tab containing this heading. */ tabId?: string | null; } /** * A ParagraphElement representing a horizontal line. */ export interface Schema$HorizontalRule { /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * 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[] | null; /** * The suggested text style changes to this HorizontalRule, keyed by suggestion ID. */ suggestedTextStyleChanges?: { [key: string]: Schema$SuggestedTextStyle; } | null; /** * 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 next to it. */ textStyle?: Schema$TextStyle; } /** * The properties of an image. */ export interface Schema$ImageProperties { /** * The clockwise rotation angle of the image, in radians. */ angle?: number | null; /** * The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. */ brightness?: number | null; /** * 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 | null; /** * The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. */ contrast?: number | null; /** * 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 | null; /** * 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 transparent. */ transparency?: number | null; } /** * 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's a new suggested value. */ export interface Schema$ImagePropertiesSuggestionState { /** * Indicates if there was a suggested change to angle. */ angleSuggested?: boolean | null; /** * Indicates if there was a suggested change to brightness. */ brightnessSuggested?: boolean | null; /** * Indicates if there was a suggested change to content_uri. */ contentUriSuggested?: boolean | null; /** * Indicates if there was a suggested change to contrast. */ contrastSuggested?: boolean | null; /** * 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 | null; /** * Indicates if there was a suggested change to transparency. */ transparencySuggested?: boolean | null; } /** * An object that appears inline with text. An InlineObject contains an EmbeddedObject such as an image. */ export interface Schema$InlineObject { /** * The properties of this inline object. */ inlineObjectProperties?: Schema$InlineObjectProperties; /** * The ID of this inline object. Can be used to update an object’s properties. */ objectId?: string | null; /** * The suggested deletion IDs. If empty, then there are no suggested deletions of this content. */ suggestedDeletionIds?: string[] | null; /** * The suggested changes to the inline object properties, keyed by suggestion ID. */ suggestedInlineObjectPropertiesChanges?: { [key: string]: Schema$SuggestedInlineObjectProperties; } | null; /** * The suggested insertion ID. If empty, then this is not a suggested insertion. */ suggestedInsertionId?: string | null; } /** * A ParagraphElement