import {
OAuth2Client,
JWT,
Compute,
UserRefreshClient,
BaseExternalAccountClient,
GaxiosPromise,
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?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| BaseExternalAccountClient
| GoogleAuth;
'$.xgafv'?: string;
access_token?: string;
alt?: string;
callback?: string;
fields?: string;
key?: string;
oauth_token?: string;
prettyPrint?: boolean;
quotaUser?: string;
uploadType?: string;
upload_protocol?: string;
}
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);
}
}
export interface Schema$AutoText {
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
type?: string | null;
}
export interface Schema$Background {
color?: Schema$OptionalColor;
}
export interface Schema$BackgroundSuggestionState {
backgroundColorSuggested?: boolean | null;
}
export interface Schema$BatchUpdateDocumentRequest {
requests?: Schema$Request[];
writeControl?: Schema$WriteControl;
}
export interface Schema$BatchUpdateDocumentResponse {
documentId?: string | null;
replies?: Schema$Response[];
writeControl?: Schema$WriteControl;
}
export interface Schema$Body {
content?: Schema$StructuralElement[];
}
export interface Schema$Bullet {
listId?: string | null;
nestingLevel?: number | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$BulletSuggestionState {
listIdSuggested?: boolean | null;
nestingLevelSuggested?: boolean | null;
textStyleSuggestionState?: Schema$TextStyleSuggestionState;
}
export interface Schema$Color {
rgbColor?: Schema$RgbColor;
}
export interface Schema$ColumnBreak {
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$CreateFooterRequest {
sectionBreakLocation?: Schema$Location;
type?: string | null;
}
export interface Schema$CreateFooterResponse {
footerId?: string | null;
}
export interface Schema$CreateFootnoteRequest {
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
}
export interface Schema$CreateFootnoteResponse {
footnoteId?: string | null;
}
export interface Schema$CreateHeaderRequest {
sectionBreakLocation?: Schema$Location;
type?: string | null;
}
export interface Schema$CreateHeaderResponse {
headerId?: string | null;
}
export interface Schema$CreateNamedRangeRequest {
name?: string | null;
range?: Schema$Range;
}
export interface Schema$CreateNamedRangeResponse {
namedRangeId?: string | null;
}
export interface Schema$CreateParagraphBulletsRequest {
bulletPreset?: string | null;
range?: Schema$Range;
}
export interface Schema$CropProperties {
angle?: number | null;
offsetBottom?: number | null;
offsetLeft?: number | null;
offsetRight?: number | null;
offsetTop?: number | null;
}
export interface Schema$CropPropertiesSuggestionState {
angleSuggested?: boolean | null;
offsetBottomSuggested?: boolean | null;
offsetLeftSuggested?: boolean | null;
offsetRightSuggested?: boolean | null;
offsetTopSuggested?: boolean | null;
}
export interface Schema$DeleteContentRangeRequest {
range?: Schema$Range;
}
export interface Schema$DeleteFooterRequest {
footerId?: string | null;
}
export interface Schema$DeleteHeaderRequest {
headerId?: string | null;
}
export interface Schema$DeleteNamedRangeRequest {
name?: string | null;
namedRangeId?: string | null;
}
export interface Schema$DeleteParagraphBulletsRequest {
range?: Schema$Range;
}
export interface Schema$DeletePositionedObjectRequest {
objectId?: string | null;
}
export interface Schema$DeleteTableColumnRequest {
tableCellLocation?: Schema$TableCellLocation;
}
export interface Schema$DeleteTableRowRequest {
tableCellLocation?: Schema$TableCellLocation;
}
export interface Schema$Dimension {
magnitude?: number | null;
unit?: string | null;
}
export interface Schema$Document {
body?: Schema$Body;
documentId?: string | null;
documentStyle?: Schema$DocumentStyle;
footers?: {[key: string]: Schema$Footer} | null;
footnotes?: {[key: string]: Schema$Footnote} | null;
headers?: {[key: string]: Schema$Header} | null;
inlineObjects?: {[key: string]: Schema$InlineObject} | null;
lists?: {[key: string]: Schema$List} | null;
namedRanges?: {[key: string]: Schema$NamedRanges} | null;
namedStyles?: Schema$NamedStyles;
positionedObjects?: {[key: string]: Schema$PositionedObject} | null;
revisionId?: string | null;
suggestedDocumentStyleChanges?: {
[key: string]: Schema$SuggestedDocumentStyle;
} | null;
suggestedNamedStylesChanges?: {
[key: string]: Schema$SuggestedNamedStyles;
} | null;
suggestionsViewMode?: string | null;
title?: string | null;
}
export interface Schema$DocumentStyle {
background?: Schema$Background;
defaultFooterId?: string | null;
defaultHeaderId?: string | null;
evenPageFooterId?: string | null;
evenPageHeaderId?: string | null;
firstPageFooterId?: string | null;
firstPageHeaderId?: string | null;
marginBottom?: Schema$Dimension;
marginFooter?: Schema$Dimension;
marginHeader?: Schema$Dimension;
marginLeft?: Schema$Dimension;
marginRight?: Schema$Dimension;
marginTop?: Schema$Dimension;
pageNumberStart?: number | null;
pageSize?: Schema$Size;
useCustomHeaderFooterMargins?: boolean | null;
useEvenPageHeaderFooter?: boolean | null;
useFirstPageHeaderFooter?: boolean | null;
}
export interface Schema$DocumentStyleSuggestionState {
backgroundSuggestionState?: Schema$BackgroundSuggestionState;
defaultFooterIdSuggested?: boolean | null;
defaultHeaderIdSuggested?: boolean | null;
evenPageFooterIdSuggested?: boolean | null;
evenPageHeaderIdSuggested?: boolean | null;
firstPageFooterIdSuggested?: boolean | null;
firstPageHeaderIdSuggested?: boolean | null;
marginBottomSuggested?: boolean | null;
marginFooterSuggested?: boolean | null;
marginHeaderSuggested?: boolean | null;
marginLeftSuggested?: boolean | null;
marginRightSuggested?: boolean | null;
marginTopSuggested?: boolean | null;
pageNumberStartSuggested?: boolean | null;
pageSizeSuggestionState?: Schema$SizeSuggestionState;
useCustomHeaderFooterMarginsSuggested?: boolean | null;
useEvenPageHeaderFooterSuggested?: boolean | null;
useFirstPageHeaderFooterSuggested?: boolean | null;
}
export interface Schema$EmbeddedDrawingProperties {}
export interface Schema$EmbeddedDrawingPropertiesSuggestionState {}
export interface Schema$EmbeddedObject {
description?: string | null;
embeddedDrawingProperties?: Schema$EmbeddedDrawingProperties;
embeddedObjectBorder?: Schema$EmbeddedObjectBorder;
imageProperties?: Schema$ImageProperties;
linkedContentReference?: Schema$LinkedContentReference;
marginBottom?: Schema$Dimension;
marginLeft?: Schema$Dimension;
marginRight?: Schema$Dimension;
marginTop?: Schema$Dimension;
size?: Schema$Size;
title?: string | null;
}
export interface Schema$EmbeddedObjectBorder {
color?: Schema$OptionalColor;
dashStyle?: string | null;
propertyState?: string | null;
width?: Schema$Dimension;
}
export interface Schema$EmbeddedObjectBorderSuggestionState {
colorSuggested?: boolean | null;
dashStyleSuggested?: boolean | null;
propertyStateSuggested?: boolean | null;
widthSuggested?: boolean | null;
}
export interface Schema$EmbeddedObjectSuggestionState {
descriptionSuggested?: boolean | null;
embeddedDrawingPropertiesSuggestionState?: Schema$EmbeddedDrawingPropertiesSuggestionState;
embeddedObjectBorderSuggestionState?: Schema$EmbeddedObjectBorderSuggestionState;
imagePropertiesSuggestionState?: Schema$ImagePropertiesSuggestionState;
linkedContentReferenceSuggestionState?: Schema$LinkedContentReferenceSuggestionState;
marginBottomSuggested?: boolean | null;
marginLeftSuggested?: boolean | null;
marginRightSuggested?: boolean | null;
marginTopSuggested?: boolean | null;
sizeSuggestionState?: Schema$SizeSuggestionState;
titleSuggested?: boolean | null;
}
export interface Schema$EndOfSegmentLocation {
segmentId?: string | null;
}
export interface Schema$Equation {
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
}
export interface Schema$Footer {
content?: Schema$StructuralElement[];
footerId?: string | null;
}
export interface Schema$Footnote {
content?: Schema$StructuralElement[];
footnoteId?: string | null;
}
export interface Schema$FootnoteReference {
footnoteId?: string | null;
footnoteNumber?: string | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$Header {
content?: Schema$StructuralElement[];
headerId?: string | null;
}
export interface Schema$HorizontalRule {
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$ImageProperties {
angle?: number | null;
brightness?: number | null;
contentUri?: string | null;
contrast?: number | null;
cropProperties?: Schema$CropProperties;
sourceUri?: string | null;
transparency?: number | null;
}
export interface Schema$ImagePropertiesSuggestionState {
angleSuggested?: boolean | null;
brightnessSuggested?: boolean | null;
contentUriSuggested?: boolean | null;
contrastSuggested?: boolean | null;
cropPropertiesSuggestionState?: Schema$CropPropertiesSuggestionState;
sourceUriSuggested?: boolean | null;
transparencySuggested?: boolean | null;
}
export interface Schema$InlineObject {
inlineObjectProperties?: Schema$InlineObjectProperties;
objectId?: string | null;
suggestedDeletionIds?: string[] | null;
suggestedInlineObjectPropertiesChanges?: {
[key: string]: Schema$SuggestedInlineObjectProperties;
} | null;
suggestedInsertionId?: string | null;
}
export interface Schema$InlineObjectElement {
inlineObjectId?: string | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$InlineObjectProperties {
embeddedObject?: Schema$EmbeddedObject;
}
export interface Schema$InlineObjectPropertiesSuggestionState {
embeddedObjectSuggestionState?: Schema$EmbeddedObjectSuggestionState;
}
export interface Schema$InsertInlineImageRequest {
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
objectSize?: Schema$Size;
uri?: string | null;
}
export interface Schema$InsertInlineImageResponse {
objectId?: string | null;
}
export interface Schema$InsertInlineSheetsChartResponse {
objectId?: string | null;
}
export interface Schema$InsertPageBreakRequest {
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
}
export interface Schema$InsertSectionBreakRequest {
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
sectionType?: string | null;
}
export interface Schema$InsertTableColumnRequest {
insertRight?: boolean | null;
tableCellLocation?: Schema$TableCellLocation;
}
export interface Schema$InsertTableRequest {
columns?: number | null;
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
rows?: number | null;
}
export interface Schema$InsertTableRowRequest {
insertBelow?: boolean | null;
tableCellLocation?: Schema$TableCellLocation;
}
export interface Schema$InsertTextRequest {
endOfSegmentLocation?: Schema$EndOfSegmentLocation;
location?: Schema$Location;
text?: string | null;
}
export interface Schema$Link {
bookmarkId?: string | null;
headingId?: string | null;
url?: string | null;
}
export interface Schema$LinkedContentReference {
sheetsChartReference?: Schema$SheetsChartReference;
}
export interface Schema$LinkedContentReferenceSuggestionState {
sheetsChartReferenceSuggestionState?: Schema$SheetsChartReferenceSuggestionState;
}
export interface Schema$List {
listProperties?: Schema$ListProperties;
suggestedDeletionIds?: string[] | null;
suggestedInsertionId?: string | null;
suggestedListPropertiesChanges?: {
[key: string]: Schema$SuggestedListProperties;
} | null;
}
export interface Schema$ListProperties {
nestingLevels?: Schema$NestingLevel[];
}
export interface Schema$ListPropertiesSuggestionState {
nestingLevelsSuggestionStates?: Schema$NestingLevelSuggestionState[];
}
export interface Schema$Location {
index?: number | null;
segmentId?: string | null;
}
export interface Schema$MergeTableCellsRequest {
tableRange?: Schema$TableRange;
}
export interface Schema$NamedRange {
name?: string | null;
namedRangeId?: string | null;
ranges?: Schema$Range[];
}
export interface Schema$NamedRanges {
name?: string | null;
namedRanges?: Schema$NamedRange[];
}
export interface Schema$NamedStyle {
namedStyleType?: string | null;
paragraphStyle?: Schema$ParagraphStyle;
textStyle?: Schema$TextStyle;
}
export interface Schema$NamedStyles {
styles?: Schema$NamedStyle[];
}
export interface Schema$NamedStylesSuggestionState {
stylesSuggestionStates?: Schema$NamedStyleSuggestionState[];
}
export interface Schema$NamedStyleSuggestionState {
namedStyleType?: string | null;
paragraphStyleSuggestionState?: Schema$ParagraphStyleSuggestionState;
textStyleSuggestionState?: Schema$TextStyleSuggestionState;
}
export interface Schema$NestingLevel {
bulletAlignment?: string | null;
glyphFormat?: string | null;
glyphSymbol?: string | null;
glyphType?: string | null;
indentFirstLine?: Schema$Dimension;
indentStart?: Schema$Dimension;
startNumber?: number | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$NestingLevelSuggestionState {
bulletAlignmentSuggested?: boolean | null;
glyphFormatSuggested?: boolean | null;
glyphSymbolSuggested?: boolean | null;
glyphTypeSuggested?: boolean | null;
indentFirstLineSuggested?: boolean | null;
indentStartSuggested?: boolean | null;
startNumberSuggested?: boolean | null;
textStyleSuggestionState?: Schema$TextStyleSuggestionState;
}
export interface Schema$ObjectReferences {
objectIds?: string[] | null;
}
export interface Schema$OptionalColor {
color?: Schema$Color;
}
export interface Schema$PageBreak {
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$Paragraph {
bullet?: Schema$Bullet;
elements?: Schema$ParagraphElement[];
paragraphStyle?: Schema$ParagraphStyle;
positionedObjectIds?: string[] | null;
suggestedBulletChanges?: {[key: string]: Schema$SuggestedBullet} | null;
suggestedParagraphStyleChanges?: {
[key: string]: Schema$SuggestedParagraphStyle;
} | null;
suggestedPositionedObjectIds?: {
[key: string]: Schema$ObjectReferences;
} | null;
}
export interface Schema$ParagraphBorder {
color?: Schema$OptionalColor;
dashStyle?: string | null;
padding?: Schema$Dimension;
width?: Schema$Dimension;
}
export interface Schema$ParagraphElement {
autoText?: Schema$AutoText;
columnBreak?: Schema$ColumnBreak;
endIndex?: number | null;
equation?: Schema$Equation;
footnoteReference?: Schema$FootnoteReference;
horizontalRule?: Schema$HorizontalRule;
inlineObjectElement?: Schema$InlineObjectElement;
pageBreak?: Schema$PageBreak;
person?: Schema$Person;
richLink?: Schema$RichLink;
startIndex?: number | null;
textRun?: Schema$TextRun;
}
export interface Schema$ParagraphStyle {
alignment?: string | null;
avoidWidowAndOrphan?: boolean | null;
borderBetween?: Schema$ParagraphBorder;
borderBottom?: Schema$ParagraphBorder;
borderLeft?: Schema$ParagraphBorder;
borderRight?: Schema$ParagraphBorder;
borderTop?: Schema$ParagraphBorder;
direction?: string | null;
headingId?: string | null;
indentEnd?: Schema$Dimension;
indentFirstLine?: Schema$Dimension;
indentStart?: Schema$Dimension;
keepLinesTogether?: boolean | null;
keepWithNext?: boolean | null;
lineSpacing?: number | null;
namedStyleType?: string | null;
shading?: Schema$Shading;
spaceAbove?: Schema$Dimension;
spaceBelow?: Schema$Dimension;
spacingMode?: string | null;
tabStops?: Schema$TabStop[];
}
export interface Schema$ParagraphStyleSuggestionState {
alignmentSuggested?: boolean | null;
avoidWidowAndOrphanSuggested?: boolean | null;
borderBetweenSuggested?: boolean | null;
borderBottomSuggested?: boolean | null;
borderLeftSuggested?: boolean | null;
borderRightSuggested?: boolean | null;
borderTopSuggested?: boolean | null;
directionSuggested?: boolean | null;
headingIdSuggested?: boolean | null;
indentEndSuggested?: boolean | null;
indentFirstLineSuggested?: boolean | null;
indentStartSuggested?: boolean | null;
keepLinesTogetherSuggested?: boolean | null;
keepWithNextSuggested?: boolean | null;
lineSpacingSuggested?: boolean | null;
namedStyleTypeSuggested?: boolean | null;
shadingSuggestionState?: Schema$ShadingSuggestionState;
spaceAboveSuggested?: boolean | null;
spaceBelowSuggested?: boolean | null;
spacingModeSuggested?: boolean | null;
}
export interface Schema$Person {
personId?: string | null;
personProperties?: Schema$PersonProperties;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$PersonProperties {
email?: string | null;
name?: string | null;
}
export interface Schema$PositionedObject {
objectId?: string | null;
positionedObjectProperties?: Schema$PositionedObjectProperties;
suggestedDeletionIds?: string[] | null;
suggestedInsertionId?: string | null;
suggestedPositionedObjectPropertiesChanges?: {
[key: string]: Schema$SuggestedPositionedObjectProperties;
} | null;
}
export interface Schema$PositionedObjectPositioning {
layout?: string | null;
leftOffset?: Schema$Dimension;
topOffset?: Schema$Dimension;
}
export interface Schema$PositionedObjectPositioningSuggestionState {
layoutSuggested?: boolean | null;
leftOffsetSuggested?: boolean | null;
topOffsetSuggested?: boolean | null;
}
export interface Schema$PositionedObjectProperties {
embeddedObject?: Schema$EmbeddedObject;
positioning?: Schema$PositionedObjectPositioning;
}
export interface Schema$PositionedObjectPropertiesSuggestionState {
embeddedObjectSuggestionState?: Schema$EmbeddedObjectSuggestionState;
positioningSuggestionState?: Schema$PositionedObjectPositioningSuggestionState;
}
export interface Schema$Range {
endIndex?: number | null;
segmentId?: string | null;
startIndex?: number | null;
}
export interface Schema$ReplaceAllTextRequest {
containsText?: Schema$SubstringMatchCriteria;
replaceText?: string | null;
}
export interface Schema$ReplaceAllTextResponse {
occurrencesChanged?: number | null;
}
export interface Schema$ReplaceImageRequest {
imageObjectId?: string | null;
imageReplaceMethod?: string | null;
uri?: string | null;
}
export interface Schema$ReplaceNamedRangeContentRequest {
namedRangeId?: string | null;
namedRangeName?: string | null;
text?: string | null;
}
export interface Schema$Request {
createFooter?: Schema$CreateFooterRequest;
createFootnote?: Schema$CreateFootnoteRequest;
createHeader?: Schema$CreateHeaderRequest;
createNamedRange?: Schema$CreateNamedRangeRequest;
createParagraphBullets?: Schema$CreateParagraphBulletsRequest;
deleteContentRange?: Schema$DeleteContentRangeRequest;
deleteFooter?: Schema$DeleteFooterRequest;
deleteHeader?: Schema$DeleteHeaderRequest;
deleteNamedRange?: Schema$DeleteNamedRangeRequest;
deleteParagraphBullets?: Schema$DeleteParagraphBulletsRequest;
deletePositionedObject?: Schema$DeletePositionedObjectRequest;
deleteTableColumn?: Schema$DeleteTableColumnRequest;
deleteTableRow?: Schema$DeleteTableRowRequest;
insertInlineImage?: Schema$InsertInlineImageRequest;
insertPageBreak?: Schema$InsertPageBreakRequest;
insertSectionBreak?: Schema$InsertSectionBreakRequest;
insertTable?: Schema$InsertTableRequest;
insertTableColumn?: Schema$InsertTableColumnRequest;
insertTableRow?: Schema$InsertTableRowRequest;
insertText?: Schema$InsertTextRequest;
mergeTableCells?: Schema$MergeTableCellsRequest;
replaceAllText?: Schema$ReplaceAllTextRequest;
replaceImage?: Schema$ReplaceImageRequest;
replaceNamedRangeContent?: Schema$ReplaceNamedRangeContentRequest;
unmergeTableCells?: Schema$UnmergeTableCellsRequest;
updateDocumentStyle?: Schema$UpdateDocumentStyleRequest;
updateParagraphStyle?: Schema$UpdateParagraphStyleRequest;
updateSectionStyle?: Schema$UpdateSectionStyleRequest;
updateTableCellStyle?: Schema$UpdateTableCellStyleRequest;
updateTableColumnProperties?: Schema$UpdateTableColumnPropertiesRequest;
updateTableRowStyle?: Schema$UpdateTableRowStyleRequest;
updateTextStyle?: Schema$UpdateTextStyleRequest;
}
export interface Schema$Response {
createFooter?: Schema$CreateFooterResponse;
createFootnote?: Schema$CreateFootnoteResponse;
createHeader?: Schema$CreateHeaderResponse;
createNamedRange?: Schema$CreateNamedRangeResponse;
insertInlineImage?: Schema$InsertInlineImageResponse;
insertInlineSheetsChart?: Schema$InsertInlineSheetsChartResponse;
replaceAllText?: Schema$ReplaceAllTextResponse;
}
export interface Schema$RgbColor {
blue?: number | null;
green?: number | null;
red?: number | null;
}
export interface Schema$RichLink {
richLinkId?: string | null;
richLinkProperties?: Schema$RichLinkProperties;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$RichLinkProperties {
mimeType?: string | null;
title?: string | null;
uri?: string | null;
}
export interface Schema$SectionBreak {
sectionStyle?: Schema$SectionStyle;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
}
export interface Schema$SectionColumnProperties {
paddingEnd?: Schema$Dimension;
width?: Schema$Dimension;
}
export interface Schema$SectionStyle {
columnProperties?: Schema$SectionColumnProperties[];
columnSeparatorStyle?: string | null;
contentDirection?: string | null;
defaultFooterId?: string | null;
defaultHeaderId?: string | null;
evenPageFooterId?: string | null;
evenPageHeaderId?: string | null;
firstPageFooterId?: string | null;
firstPageHeaderId?: string | null;
marginBottom?: Schema$Dimension;
marginFooter?: Schema$Dimension;
marginHeader?: Schema$Dimension;
marginLeft?: Schema$Dimension;
marginRight?: Schema$Dimension;
marginTop?: Schema$Dimension;
pageNumberStart?: number | null;
sectionType?: string | null;
useFirstPageHeaderFooter?: boolean | null;
}
export interface Schema$Shading {
backgroundColor?: Schema$OptionalColor;
}
export interface Schema$ShadingSuggestionState {
backgroundColorSuggested?: boolean | null;
}
export interface Schema$SheetsChartReference {
chartId?: number | null;
spreadsheetId?: string | null;
}
export interface Schema$SheetsChartReferenceSuggestionState {
chartIdSuggested?: boolean | null;
spreadsheetIdSuggested?: boolean | null;
}
export interface Schema$Size {
height?: Schema$Dimension;
width?: Schema$Dimension;
}
export interface Schema$SizeSuggestionState {
heightSuggested?: boolean | null;
widthSuggested?: boolean | null;
}
export interface Schema$StructuralElement {
endIndex?: number | null;
paragraph?: Schema$Paragraph;
sectionBreak?: Schema$SectionBreak;
startIndex?: number | null;
table?: Schema$Table;
tableOfContents?: Schema$TableOfContents;
}
export interface Schema$SubstringMatchCriteria {
matchCase?: boolean | null;
text?: string | null;
}
export interface Schema$SuggestedBullet {
bullet?: Schema$Bullet;
bulletSuggestionState?: Schema$BulletSuggestionState;
}
export interface Schema$SuggestedDocumentStyle {
documentStyle?: Schema$DocumentStyle;
documentStyleSuggestionState?: Schema$DocumentStyleSuggestionState;
}
export interface Schema$SuggestedInlineObjectProperties {
inlineObjectProperties?: Schema$InlineObjectProperties;
inlineObjectPropertiesSuggestionState?: Schema$InlineObjectPropertiesSuggestionState;
}
export interface Schema$SuggestedListProperties {
listProperties?: Schema$ListProperties;
listPropertiesSuggestionState?: Schema$ListPropertiesSuggestionState;
}
export interface Schema$SuggestedNamedStyles {
namedStyles?: Schema$NamedStyles;
namedStylesSuggestionState?: Schema$NamedStylesSuggestionState;
}
export interface Schema$SuggestedParagraphStyle {
paragraphStyle?: Schema$ParagraphStyle;
paragraphStyleSuggestionState?: Schema$ParagraphStyleSuggestionState;
}
export interface Schema$SuggestedPositionedObjectProperties {
positionedObjectProperties?: Schema$PositionedObjectProperties;
positionedObjectPropertiesSuggestionState?: Schema$PositionedObjectPropertiesSuggestionState;
}
export interface Schema$SuggestedTableCellStyle {
tableCellStyle?: Schema$TableCellStyle;
tableCellStyleSuggestionState?: Schema$TableCellStyleSuggestionState;
}
export interface Schema$SuggestedTableRowStyle {
tableRowStyle?: Schema$TableRowStyle;
tableRowStyleSuggestionState?: Schema$TableRowStyleSuggestionState;
}
export interface Schema$SuggestedTextStyle {
textStyle?: Schema$TextStyle;
textStyleSuggestionState?: Schema$TextStyleSuggestionState;
}
export interface Schema$Table {
columns?: number | null;
rows?: number | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
tableRows?: Schema$TableRow[];
tableStyle?: Schema$TableStyle;
}
export interface Schema$TableCell {
content?: Schema$StructuralElement[];
endIndex?: number | null;
startIndex?: number | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTableCellStyleChanges?: {
[key: string]: Schema$SuggestedTableCellStyle;
} | null;
tableCellStyle?: Schema$TableCellStyle;
}
export interface Schema$TableCellBorder {
color?: Schema$OptionalColor;
dashStyle?: string | null;
width?: Schema$Dimension;
}
export interface Schema$TableCellLocation {
columnIndex?: number | null;
rowIndex?: number | null;
tableStartLocation?: Schema$Location;
}
export interface Schema$TableCellStyle {
backgroundColor?: Schema$OptionalColor;
borderBottom?: Schema$TableCellBorder;
borderLeft?: Schema$TableCellBorder;
borderRight?: Schema$TableCellBorder;
borderTop?: Schema$TableCellBorder;
columnSpan?: number | null;
contentAlignment?: string | null;
paddingBottom?: Schema$Dimension;
paddingLeft?: Schema$Dimension;
paddingRight?: Schema$Dimension;
paddingTop?: Schema$Dimension;
rowSpan?: number | null;
}
export interface Schema$TableCellStyleSuggestionState {
backgroundColorSuggested?: boolean | null;
borderBottomSuggested?: boolean | null;
borderLeftSuggested?: boolean | null;
borderRightSuggested?: boolean | null;
borderTopSuggested?: boolean | null;
columnSpanSuggested?: boolean | null;
contentAlignmentSuggested?: boolean | null;
paddingBottomSuggested?: boolean | null;
paddingLeftSuggested?: boolean | null;
paddingRightSuggested?: boolean | null;
paddingTopSuggested?: boolean | null;
rowSpanSuggested?: boolean | null;
}
export interface Schema$TableColumnProperties {
width?: Schema$Dimension;
widthType?: string | null;
}
export interface Schema$TableOfContents {
content?: Schema$StructuralElement[];
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
}
export interface Schema$TableRange {
columnSpan?: number | null;
rowSpan?: number | null;
tableCellLocation?: Schema$TableCellLocation;
}
export interface Schema$TableRow {
endIndex?: number | null;
startIndex?: number | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTableRowStyleChanges?: {
[key: string]: Schema$SuggestedTableRowStyle;
} | null;
tableCells?: Schema$TableCell[];
tableRowStyle?: Schema$TableRowStyle;
}
export interface Schema$TableRowStyle {
minRowHeight?: Schema$Dimension;
}
export interface Schema$TableRowStyleSuggestionState {
minRowHeightSuggested?: boolean | null;
}
export interface Schema$TableStyle {
tableColumnProperties?: Schema$TableColumnProperties[];
}
export interface Schema$TabStop {
alignment?: string | null;
offset?: Schema$Dimension;
}
export interface Schema$TextRun {
content?: string | null;
suggestedDeletionIds?: string[] | null;
suggestedInsertionIds?: string[] | null;
suggestedTextStyleChanges?: {
[key: string]: Schema$SuggestedTextStyle;
} | null;
textStyle?: Schema$TextStyle;
}
export interface Schema$TextStyle {
backgroundColor?: Schema$OptionalColor;
baselineOffset?: string | null;
bold?: boolean | null;
fontSize?: Schema$Dimension;
foregroundColor?: Schema$OptionalColor;
italic?: boolean | null;
link?: Schema$Link;
smallCaps?: boolean | null;
strikethrough?: boolean | null;
underline?: boolean | null;
weightedFontFamily?: Schema$WeightedFontFamily;
}
export interface Schema$TextStyleSuggestionState {
backgroundColorSuggested?: boolean | null;
baselineOffsetSuggested?: boolean | null;
boldSuggested?: boolean | null;
fontSizeSuggested?: boolean | null;
foregroundColorSuggested?: boolean | null;
italicSuggested?: boolean | null;
linkSuggested?: boolean | null;
smallCapsSuggested?: boolean | null;
strikethroughSuggested?: boolean | null;
underlineSuggested?: boolean | null;
weightedFontFamilySuggested?: boolean | null;
}
export interface Schema$UnmergeTableCellsRequest {
tableRange?: Schema$TableRange;
}
export interface Schema$UpdateDocumentStyleRequest {
documentStyle?: Schema$DocumentStyle;
fields?: string | null;
}
export interface Schema$UpdateParagraphStyleRequest {
fields?: string | null;
paragraphStyle?: Schema$ParagraphStyle;
range?: Schema$Range;
}
export interface Schema$UpdateSectionStyleRequest {
fields?: string | null;
range?: Schema$Range;
sectionStyle?: Schema$SectionStyle;
}
export interface Schema$UpdateTableCellStyleRequest {
fields?: string | null;
tableCellStyle?: Schema$TableCellStyle;
tableRange?: Schema$TableRange;
tableStartLocation?: Schema$Location;
}
export interface Schema$UpdateTableColumnPropertiesRequest {
columnIndices?: number[] | null;
fields?: string | null;
tableColumnProperties?: Schema$TableColumnProperties;
tableStartLocation?: Schema$Location;
}
export interface Schema$UpdateTableRowStyleRequest {
fields?: string | null;
rowIndices?: number[] | null;
tableRowStyle?: Schema$TableRowStyle;
tableStartLocation?: Schema$Location;
}
export interface Schema$UpdateTextStyleRequest {
fields?: string | null;
range?: Schema$Range;
textStyle?: Schema$TextStyle;
}
export interface Schema$WeightedFontFamily {
fontFamily?: string | null;
weight?: number | null;
}
export interface Schema$WriteControl {
requiredRevisionId?: string | null;
targetRevisionId?: string | null;
}
export class Resource$Documents {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
batchUpdate(
params: Params$Resource$Documents$Batchupdate,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
batchUpdate(
params?: Params$Resource$Documents$Batchupdate,
options?: MethodOptions
): GaxiosPromise<Schema$BatchUpdateDocumentResponse>;
batchUpdate(
params: Params$Resource$Documents$Batchupdate,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
batchUpdate(
params: Params$Resource$Documents$Batchupdate,
options:
| MethodOptions
| BodyResponseCallback<Schema$BatchUpdateDocumentResponse>,
callback: BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
): void;
batchUpdate(
params: Params$Resource$Documents$Batchupdate,
callback: BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
): void;
batchUpdate(
callback: BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
): void;
batchUpdate(
paramsOrCallback?:
| Params$Resource$Documents$Batchupdate
| BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$BatchUpdateDocumentResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$BatchUpdateDocumentResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Documents$Batchupdate;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Documents$Batchupdate;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://docs.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/documents/{documentId}:batchUpdate').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['documentId'],
pathParams: ['documentId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$BatchUpdateDocumentResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$BatchUpdateDocumentResponse>(parameters);
}
}
create(
params: Params$Resource$Documents$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Documents$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Document>;
create(
params: Params$Resource$Documents$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Documents$Create,
options: MethodOptions | BodyResponseCallback<Schema$Document>,
callback: BodyResponseCallback<Schema$Document>
): void;
create(
params: Params$Resource$Documents$Create,
callback: BodyResponseCallback<Schema$Document>
): void;
create(callback: BodyResponseCallback<Schema$Document>): void;
create(
paramsOrCallback?:
| Params$Resource$Documents$Create
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Document> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Documents$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Documents$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://docs.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/documents').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Document>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Document>(parameters);
}
}
get(
params: Params$Resource$Documents$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Documents$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Document>;
get(
params: Params$Resource$Documents$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Documents$Get,
options: MethodOptions | BodyResponseCallback<Schema$Document>,
callback: BodyResponseCallback<Schema$Document>
): void;
get(
params: Params$Resource$Documents$Get,
callback: BodyResponseCallback<Schema$Document>
): void;
get(callback: BodyResponseCallback<Schema$Document>): void;
get(
paramsOrCallback?:
| Params$Resource$Documents$Get
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Document>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Document> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Documents$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Documents$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://docs.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/documents/{documentId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['documentId'],
pathParams: ['documentId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Document>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Document>(parameters);
}
}
}
export interface Params$Resource$Documents$Batchupdate
extends StandardParameters {
documentId?: string;
requestBody?: Schema$BatchUpdateDocumentRequest;
}
export interface Params$Resource$Documents$Create extends StandardParameters {
requestBody?: Schema$Document;
}
export interface Params$Resource$Documents$Get extends StandardParameters {
documentId?: string;
suggestionsViewMode?: string;
}
}