@maxim_mazurok/gapi.client.docs-v1 0.2.20260311 → 0.3.20260529

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +178 -46
  2. package/package.json +1 -1
  3. package/readme.md +12 -0
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://docs.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20260311
12
+ // Revision: 20260529
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -42,7 +42,7 @@ declare namespace gapi.client {
42
42
  /** The text style of this AutoText. */
43
43
  textStyle?: TextStyle;
44
44
  /** The type of this auto text. */
45
- type?: string;
45
+ type?: 'TYPE_UNSPECIFIED' | 'PAGE_NUMBER' | 'PAGE_COUNT';
46
46
  }
47
47
  interface Background {
48
48
  /** The background color. */
@@ -110,7 +110,7 @@ declare namespace gapi.client {
110
110
  /** 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. */
111
111
  sectionBreakLocation?: Location;
112
112
  /** The type of footer to create. */
113
- type?: string;
113
+ type?: 'HEADER_FOOTER_TYPE_UNSPECIFIED' | 'DEFAULT';
114
114
  }
115
115
  interface CreateFooterResponse {
116
116
  /** The ID of the created footer. */
@@ -130,7 +130,7 @@ declare namespace gapi.client {
130
130
  /** 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 */
131
131
  sectionBreakLocation?: Location;
132
132
  /** The type of header to create. */
133
- type?: string;
133
+ type?: 'HEADER_FOOTER_TYPE_UNSPECIFIED' | 'DEFAULT';
134
134
  }
135
135
  interface CreateHeaderResponse {
136
136
  /** The ID of the created header. */
@@ -148,7 +148,23 @@ declare namespace gapi.client {
148
148
  }
149
149
  interface CreateParagraphBulletsRequest {
150
150
  /** The kinds of bullet glyphs to be used. */
151
- bulletPreset?: string;
151
+ bulletPreset?:
152
+ | 'BULLET_GLYPH_PRESET_UNSPECIFIED'
153
+ | 'BULLET_DISC_CIRCLE_SQUARE'
154
+ | 'BULLET_DIAMONDX_ARROW3D_SQUARE'
155
+ | 'BULLET_CHECKBOX'
156
+ | 'BULLET_ARROW_DIAMOND_DISC'
157
+ | 'BULLET_STAR_CIRCLE_SQUARE'
158
+ | 'BULLET_ARROW3D_CIRCLE_SQUARE'
159
+ | 'BULLET_LEFTTRIANGLE_DIAMOND_DISC'
160
+ | 'BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE'
161
+ | 'BULLET_DIAMOND_CIRCLE_SQUARE'
162
+ | 'NUMBERED_DECIMAL_ALPHA_ROMAN'
163
+ | 'NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS'
164
+ | 'NUMBERED_DECIMAL_NESTED'
165
+ | 'NUMBERED_UPPERALPHA_ALPHA_ROMAN'
166
+ | 'NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL'
167
+ | 'NUMBERED_ZERODECIMAL_ALPHA_ROMAN';
152
168
  /** The range to apply the bullet preset to. */
153
169
  range?: Range;
154
170
  }
@@ -196,16 +212,26 @@ declare namespace gapi.client {
196
212
  }
197
213
  interface DateElementProperties {
198
214
  /** Determines how the date part of the DateElement will be displayed in the document. If unset, the default value is DATE_FORMAT_MONTH_DAY_YEAR_ABBREVIATED, indicating the DateElement will be formatted as `MMM d, y` in `en`, or locale specific equivalent. */
199
- dateFormat?: string;
215
+ dateFormat?:
216
+ | 'DATE_FORMAT_UNSPECIFIED'
217
+ | 'DATE_FORMAT_CUSTOM'
218
+ | 'DATE_FORMAT_MONTH_DAY_ABBREVIATED'
219
+ | 'DATE_FORMAT_MONTH_DAY_FULL'
220
+ | 'DATE_FORMAT_MONTH_DAY_YEAR_ABBREVIATED'
221
+ | 'DATE_FORMAT_ISO8601';
200
222
  /** Output only. Indicates how the DateElement is displayed in the document. */
201
223
  displayText?: string;
202
- /** The language code of the DateElement. For example, `en`. If unset, the default locale is `en`. Limited to the following locales: `af`, `am`, `ar`, `az`, `be`, `bg`, `bn`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-CA`, `en-GB`, `es`, `es-419`, `et`, `eu`, `fa`, `fi`, `fil`, `fr`, `fr-CA`, `gl`, `gu`, `hi`, `hr`, `hu`, `hy`, `id`, `is`, `it`, `iw`, `ja`, `ka`, `kk`, `km`, `kn`, `ko`, `lo`, `lt`, `lv`, `ml`, `mn`, `mr`, `ms`, `ne`, `nl`, `no`, `pa`, `pl`, `pt-BR`, `pt-PT`, `ro`, `ru`, `si`, `sk`, `sl`, `sr`, `sv`, `sw`, `ta`, `te`, `th`, `tr`, `uk`, `ur`, `vi`, `zh-CN`, `zh-HK`, `zh-TW`, `zu`, `cy`, `my`. */
224
+ /** The language code of the DateElement. For example, `en`. If unset, the default locale is `en`. Limited to the following locales: `af`, `am`, `ar`, `as`, `az`, `be`, `bg`, `bn`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-CA`, `en-GB`, `es`, `es-419`, `et`, `eu`, `fa`, `fi`, `fil`, `fr`, `fr-CA`, `gl`, `gu`, `hi`, `hr`, `hu`, `hy`, `id`, `is`, `it`, `iw`, `ja`, `ka`, `kk`, `km`, `kn`, `ko`, `lo`, `lt`, `lv`, `mk`, `ml`, `mn`, `mr`, `ms`, `ne`, `nl`, `no`, `or`, `pa`, `pl`, `pt-BR`, `pt-PT`, `ro`, `ru`, `si`, `sk`, `sl`, `sq`, `sr`, `sv`, `sw`, `ta`, `te`, `th`, `tr`, `uk`, `ur`, `uz`, `vi`, `zh-CN`, `zh-HK`, `zh-TW`, `zu`, `cy`, `my`. */
203
225
  locale?: string;
204
226
  /** Determines how the time part of the DateElement will be displayed in the document. If unset, the default value is TIME_FORMAT_DISABLED, indicating no time should be shown. */
205
- timeFormat?: string;
206
- /** The point in time to represent, in seconds and nanoseconds since Unix epoch: January 1, 1970 at midnight UTC. Timestamp is expected to be in UTC. If time_zone_id is set, the timestamp is adjusted according to the time zone. For example, a timestamp of `18000` with a date format of `DATE_FORMAT_ISO8601` and time format of `TIME_FORMAT_HOUR_MINUTE` would be displayed as `1970-01-01 5:00 AM`. A timestamp of `18000` with date format of `DATE_FORMAT_8SO8601`, time format of `TIME_FORMAT_HOUR_MINUTE`, and time zone set to `America/New_York` will instead be `1970-01-01 12:00 AM`. */
227
+ timeFormat?:
228
+ | 'TIME_FORMAT_UNSPECIFIED'
229
+ | 'TIME_FORMAT_DISABLED'
230
+ | 'TIME_FORMAT_HOUR_MINUTE'
231
+ | 'TIME_FORMAT_HOUR_MINUTE_TIMEZONE';
232
+ /** The point in time to represent, in seconds and nanoseconds since Unix epoch: January 1, 1970 at midnight UTC. Timestamp is expected to be in UTC. If time_zone_id is set, the timestamp is adjusted according to the time zone. For example, a timestamp of `18000` with a date format of `DATE_FORMAT_ISO8601` and time format of `TIME_FORMAT_HOUR_MINUTE` would be displayed as `1970-01-01 5:00 AM`. A timestamp of `18000` with date format of `DATE_FORMAT_ISO8601`, time format of `TIME_FORMAT_HOUR_MINUTE`, and time zone set to `America/New_York` will instead be `1970-01-01 12:00 AM`. */
207
233
  timestamp?: string;
208
- /** The time zone of the DateElement, as defined by the Unicode Common Locale Data Repository (CLDR) project. For example, `America/New York`. If unset, the default time zone is `etc/UTC`. */
234
+ /** The time zone of the DateElement, as defined by the Unicode Common Locale Data Repository (CLDR) project. For example, `America/New_York`. If unset, the default time zone is `etc/UTC`. */
209
235
  timeZoneId?: string;
210
236
  }
211
237
  interface DateElementPropertiesSuggestionState {
@@ -270,7 +296,7 @@ declare namespace gapi.client {
270
296
  /** The magnitude. */
271
297
  magnitude?: number;
272
298
  /** The units for magnitude. */
273
- unit?: string;
299
+ unit?: 'UNIT_UNSPECIFIED' | 'PT';
274
300
  }
275
301
  interface Document {
276
302
  /** 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. */
@@ -302,7 +328,11 @@ declare namespace gapi.client {
302
328
  /** 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. */
303
329
  suggestedNamedStylesChanges?: {[P in string]: SuggestedNamedStyles};
304
330
  /** 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. */
305
- suggestionsViewMode?: string;
331
+ suggestionsViewMode?:
332
+ | 'DEFAULT_FOR_CURRENT_ACCESS'
333
+ | 'SUGGESTIONS_INLINE'
334
+ | 'PREVIEW_SUGGESTIONS_ACCEPTED'
335
+ | 'PREVIEW_WITHOUT_SUGGESTIONS';
306
336
  /** 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. */
307
337
  tabs?: Tab[];
308
338
  /** The title of the document. */
@@ -310,7 +340,7 @@ declare namespace gapi.client {
310
340
  }
311
341
  interface DocumentFormat {
312
342
  /** Whether the document has pages or is pageless. */
313
- documentMode?: string;
343
+ documentMode?: 'DOCUMENT_MODE_UNSPECIFIED' | 'PAGES' | 'PAGELESS';
314
344
  }
315
345
  interface DocumentStyle {
316
346
  /** The background of the document. Documents cannot have a transparent background color. */
@@ -450,9 +480,9 @@ declare namespace gapi.client {
450
480
  /** The color of the border. */
451
481
  color?: OptionalColor;
452
482
  /** The dash style of the border. */
453
- dashStyle?: string;
483
+ dashStyle?: 'DASH_STYLE_UNSPECIFIED' | 'SOLID' | 'DOT' | 'DASH';
454
484
  /** The property state of the border property. */
455
- propertyState?: string;
485
+ propertyState?: 'RENDERED' | 'NOT_RENDERED';
456
486
  /** The width of the border. */
457
487
  width?: Dimension;
458
488
  }
@@ -656,13 +686,21 @@ declare namespace gapi.client {
656
686
  /** The properties of the person mention to insert. */
657
687
  personProperties?: PersonProperties;
658
688
  }
689
+ interface InsertRichLinkRequest {
690
+ /** Inserts the rich link at the end of a header, footer, footnote or the document body. */
691
+ endOfSegmentLocation?: EndOfSegmentLocation;
692
+ /** Inserts the rich link at a specific index in the document. The rich link 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). The rich link cannot be inserted inside an equation. */
693
+ location?: Location;
694
+ /** The properties of the rich link to insert. */
695
+ richLinkProperties?: RichLinkProperties;
696
+ }
659
697
  interface InsertSectionBreakRequest {
660
698
  /** Inserts a newline and a section break at the end of the document body. Section breaks cannot be inserted inside a footnote, header or footer. Because section breaks can only be inserted inside the body, the segment ID field must be empty. */
661
699
  endOfSegmentLocation?: EndOfSegmentLocation;
662
700
  /** Inserts a newline and a section break at a specific index in the document. The section 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). Section breaks cannot be inserted inside a table, equation, footnote, header, or footer. Since section breaks can only be inserted inside the body, the segment ID field must be empty. */
663
701
  location?: Location;
664
702
  /** The type of section to insert. */
665
- sectionType?: string;
703
+ sectionType?: 'SECTION_TYPE_UNSPECIFIED' | 'CONTINUOUS' | 'NEXT_PAGE';
666
704
  }
667
705
  interface InsertTableColumnRequest {
668
706
  /** Whether to insert new column to the right of the reference cell location. - `True`: insert to the right. - `False`: insert to the left. */
@@ -762,7 +800,17 @@ declare namespace gapi.client {
762
800
  }
763
801
  interface NamedStyle {
764
802
  /** The type of this named style. */
765
- namedStyleType?: string;
803
+ namedStyleType?:
804
+ | 'NAMED_STYLE_TYPE_UNSPECIFIED'
805
+ | 'NORMAL_TEXT'
806
+ | 'TITLE'
807
+ | 'SUBTITLE'
808
+ | 'HEADING_1'
809
+ | 'HEADING_2'
810
+ | 'HEADING_3'
811
+ | 'HEADING_4'
812
+ | 'HEADING_5'
813
+ | 'HEADING_6';
766
814
  /** The paragraph style of this named style. */
767
815
  paragraphStyle?: ParagraphStyle;
768
816
  /** The text style of this named style. */
@@ -778,7 +826,17 @@ declare namespace gapi.client {
778
826
  }
779
827
  interface NamedStyleSuggestionState {
780
828
  /** The named style type that this suggestion state corresponds to. This field is provided as a convenience for matching the NamedStyleSuggestionState with its corresponding NamedStyle. */
781
- namedStyleType?: string;
829
+ namedStyleType?:
830
+ | 'NAMED_STYLE_TYPE_UNSPECIFIED'
831
+ | 'NORMAL_TEXT'
832
+ | 'TITLE'
833
+ | 'SUBTITLE'
834
+ | 'HEADING_1'
835
+ | 'HEADING_2'
836
+ | 'HEADING_3'
837
+ | 'HEADING_4'
838
+ | 'HEADING_5'
839
+ | 'HEADING_6';
782
840
  /** A mask that indicates which of the fields in paragraph style have been changed in this suggestion. */
783
841
  paragraphStyleSuggestionState?: ParagraphStyleSuggestionState;
784
842
  /** A mask that indicates which of the fields in text style have been changed in this suggestion. */
@@ -786,13 +844,25 @@ declare namespace gapi.client {
786
844
  }
787
845
  interface NestingLevel {
788
846
  /** The alignment of the bullet within the space allotted for rendering the bullet. */
789
- bulletAlignment?: string;
847
+ bulletAlignment?:
848
+ | 'BULLET_ALIGNMENT_UNSPECIFIED'
849
+ | 'START'
850
+ | 'CENTER'
851
+ | 'END';
790
852
  /** The format string used by bullets at this level of nesting. The glyph format contains one or more placeholders, and these placeholders are replaced with the appropriate values depending on the glyph_type or glyph_symbol. The placeholders follow the pattern `%[nesting_level]`. Furthermore, placeholders can have prefixes and suffixes. Thus, the glyph format follows the pattern `%[nesting_level]`. Note that the prefix and suffix are optional and can be arbitrary strings. For example, the glyph format `%0.` indicates that the rendered glyph will replace the placeholder with the corresponding glyph for nesting level 0 followed by a period as the suffix. So a list with a glyph type of UPPER_ALPHA and glyph format `%0.` at nesting level 0 will result in a list with rendered glyphs `A.` `B.` `C.` The glyph format can contain placeholders for the current nesting level as well as placeholders for parent nesting levels. For example, a list can have a glyph format of `%0.` at nesting level 0 and a glyph format of `%0.%1.` at nesting level 1. Assuming both nesting levels have DECIMAL glyph types, this would result in a list with rendered glyphs `1.` `2.` ` 2.1.` ` 2.2.` `3.` For nesting levels that are ordered, the string that replaces a placeholder in the glyph format for a particular paragraph depends on the paragraph's order within the list. */
791
853
  glyphFormat?: string;
792
854
  /** A custom glyph symbol used by bullets when paragraphs at this level of nesting is unordered. The glyph symbol replaces placeholders within the glyph_format. For example, if the glyph_symbol is the solid circle corresponding to Unicode U+25cf code point and the glyph_format is `%0`, the rendered glyph would be the solid circle. */
793
855
  glyphSymbol?: string;
794
856
  /** The type of glyph used by bullets when paragraphs at this level of nesting is ordered. The glyph type determines the type of glyph used to replace placeholders within the glyph_format when paragraphs at this level of nesting are ordered. For example, if the nesting level is 0, the glyph_format is `%0.` and the glyph type is DECIMAL, then the rendered glyph would replace the placeholder `%0` in the glyph format with a number corresponding to the list item's order within the list. */
795
- glyphType?: string;
857
+ glyphType?:
858
+ | 'GLYPH_TYPE_UNSPECIFIED'
859
+ | 'NONE'
860
+ | 'DECIMAL'
861
+ | 'ZERO_DECIMAL'
862
+ | 'UPPER_ALPHA'
863
+ | 'ALPHA'
864
+ | 'UPPER_ROMAN'
865
+ | 'ROMAN';
796
866
  /** The amount of indentation for the first line of paragraphs at this level of nesting. */
797
867
  indentFirstLine?: Dimension;
798
868
  /** The amount of indentation for paragraphs at this level of nesting. Applied to the side that corresponds to the start of the text, based on the paragraph's content direction. */
@@ -858,7 +928,7 @@ declare namespace gapi.client {
858
928
  /** The color of the border. */
859
929
  color?: OptionalColor;
860
930
  /** The dash style of the border. */
861
- dashStyle?: string;
931
+ dashStyle?: 'DASH_STYLE_UNSPECIFIED' | 'SOLID' | 'DOT' | 'DASH';
862
932
  /** The padding of the border. */
863
933
  padding?: Dimension;
864
934
  /** The width of the border. */
@@ -894,7 +964,12 @@ declare namespace gapi.client {
894
964
  }
895
965
  interface ParagraphStyle {
896
966
  /** The text alignment for this paragraph. */
897
- alignment?: string;
967
+ alignment?:
968
+ | 'ALIGNMENT_UNSPECIFIED'
969
+ | 'START'
970
+ | 'CENTER'
971
+ | 'END'
972
+ | 'JUSTIFIED';
898
973
  /** Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent. */
899
974
  avoidWidowAndOrphan?: boolean;
900
975
  /** The border between this paragraph and the next and previous paragraphs. If unset, the value is inherited from the parent. The between border is rendered when the adjacent paragraph has the same border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety. */
@@ -908,7 +983,10 @@ declare namespace gapi.client {
908
983
  /** The border at the top of this paragraph. If unset, the value is inherited from the parent. The top border is rendered when the paragraph above has different border and indent properties. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety. */
909
984
  borderTop?: ParagraphBorder;
910
985
  /** The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since paragraph direction is not inherited. */
911
- direction?: string;
986
+ direction?:
987
+ | 'CONTENT_DIRECTION_UNSPECIFIED'
988
+ | 'LEFT_TO_RIGHT'
989
+ | 'RIGHT_TO_LEFT';
912
990
  /** The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only. */
913
991
  headingId?: string;
914
992
  /** The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction. If unset, the value is inherited from the parent. */
@@ -924,7 +1002,17 @@ declare namespace gapi.client {
924
1002
  /** The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent. */
925
1003
  lineSpacing?: number;
926
1004
  /** The named style type of the paragraph. Since updating the named style type affects other properties within ParagraphStyle, the named style type is applied before the other properties are updated. */
927
- namedStyleType?: string;
1005
+ namedStyleType?:
1006
+ | 'NAMED_STYLE_TYPE_UNSPECIFIED'
1007
+ | 'NORMAL_TEXT'
1008
+ | 'TITLE'
1009
+ | 'SUBTITLE'
1010
+ | 'HEADING_1'
1011
+ | 'HEADING_2'
1012
+ | 'HEADING_3'
1013
+ | 'HEADING_4'
1014
+ | 'HEADING_5'
1015
+ | 'HEADING_6';
928
1016
  /** Whether the current paragraph should always start at the beginning of a page. If unset, the value is inherited from the parent. Attempting to update page_break_before for paragraphs in unsupported regions, including Table, Header, Footer and Footnote, can result in an invalid document state that returns a 400 bad request error. */
929
1017
  pageBreakBefore?: boolean;
930
1018
  /** The shading of the paragraph. If unset, the value is inherited from the parent. */
@@ -934,7 +1022,10 @@ declare namespace gapi.client {
934
1022
  /** The amount of extra space below the paragraph. If unset, the value is inherited from the parent. */
935
1023
  spaceBelow?: Dimension;
936
1024
  /** The spacing mode for the paragraph. */
937
- spacingMode?: string;
1025
+ spacingMode?:
1026
+ | 'SPACING_MODE_UNSPECIFIED'
1027
+ | 'NEVER_COLLAPSE'
1028
+ | 'COLLAPSE_LISTS';
938
1029
  /** A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only. */
939
1030
  tabStops?: TabStop[];
940
1031
  }
@@ -1024,7 +1115,14 @@ declare namespace gapi.client {
1024
1115
  }
1025
1116
  interface PositionedObjectPositioning {
1026
1117
  /** The layout of this positioned object. */
1027
- layout?: string;
1118
+ layout?:
1119
+ | 'POSITIONED_OBJECT_LAYOUT_UNSPECIFIED'
1120
+ | 'WRAP_TEXT'
1121
+ | 'BREAK_LEFT'
1122
+ | 'BREAK_RIGHT'
1123
+ | 'BREAK_LEFT_RIGHT'
1124
+ | 'IN_FRONT_OF_TEXT'
1125
+ | 'BEHIND_TEXT';
1028
1126
  /** The offset of the left edge of the positioned object relative to the beginning of the Paragraph it's tethered to. The exact positioning of the object can depend on other content in the document and the document's styling. */
1029
1127
  leftOffset?: Dimension;
1030
1128
  /** The offset of the top edge of the positioned object relative to the beginning of the Paragraph it's tethered to. The exact positioning of the object can depend on other content in the document and the document's styling. */
@@ -1076,7 +1174,7 @@ declare namespace gapi.client {
1076
1174
  /** The ID of the existing image that will be replaced. The ID can be retrieved from the response of a get request. */
1077
1175
  imageObjectId?: string;
1078
1176
  /** The replacement method. */
1079
- imageReplaceMethod?: string;
1177
+ imageReplaceMethod?: 'IMAGE_REPLACE_METHOD_UNSPECIFIED' | 'CENTER_CROP';
1080
1178
  /** The tab that the image to be replaced 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. */
1081
1179
  tabId?: string;
1082
1180
  /** The URI of the new image. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URI can't surpass 2 KB in length. The URI is saved with the image, and exposed through the ImageProperties.source_uri field. */
@@ -1131,6 +1229,8 @@ declare namespace gapi.client {
1131
1229
  insertPageBreak?: InsertPageBreakRequest;
1132
1230
  /** Inserts a person mention. */
1133
1231
  insertPerson?: InsertPersonRequest;
1232
+ /** Insert a rich link. */
1233
+ insertRichLink?: InsertRichLinkRequest;
1134
1234
  /** Inserts a section break at the specified location. */
1135
1235
  insertSectionBreak?: InsertSectionBreakRequest;
1136
1236
  /** Inserts a table at the specified location. */
@@ -1157,6 +1257,8 @@ declare namespace gapi.client {
1157
1257
  updateDocumentStyle?: UpdateDocumentStyleRequest;
1158
1258
  /** Updates the properties of a document tab. */
1159
1259
  updateDocumentTabProperties?: UpdateDocumentTabPropertiesRequest;
1260
+ /** Updates a named style. */
1261
+ updateNamedStyle?: UpdateNamedStyleRequest;
1160
1262
  /** Updates the paragraph style at the specified range. */
1161
1263
  updateParagraphStyle?: UpdateParagraphStyleRequest;
1162
1264
  /** Updates the section style of the specified range. */
@@ -1236,9 +1338,15 @@ declare namespace gapi.client {
1236
1338
  /** The section's columns properties. If empty, the section contains one column with the default properties in the Docs editor. A section can be updated to have no more than 3 columns. When updating this property, setting a concrete value is required. Unsetting this property will result in a 400 bad request error. */
1237
1339
  columnProperties?: SectionColumnProperties[];
1238
1340
  /** The style of column separators. This style can be set even when there's one column in the section. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error. */
1239
- columnSeparatorStyle?: string;
1341
+ columnSeparatorStyle?:
1342
+ | 'COLUMN_SEPARATOR_STYLE_UNSPECIFIED'
1343
+ | 'NONE'
1344
+ | 'BETWEEN_EACH_COLUMN';
1240
1345
  /** The content direction of this section. If unset, the value defaults to LEFT_TO_RIGHT. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error. */
1241
- contentDirection?: string;
1346
+ contentDirection?:
1347
+ | 'CONTENT_DIRECTION_UNSPECIFIED'
1348
+ | 'LEFT_TO_RIGHT'
1349
+ | 'RIGHT_TO_LEFT';
1242
1350
  /** The ID of the default footer. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's default_footer_id. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. */
1243
1351
  defaultFooterId?: string;
1244
1352
  /** The ID of the default header. If unset, the value inherits from the previous SectionBreak's SectionStyle. If the value is unset in the first SectionBreak, it inherits from DocumentStyle's default_header_id. If DocumentMode is PAGELESS, this property will not be rendered. This property is read-only. */
@@ -1268,7 +1376,7 @@ declare namespace gapi.client {
1268
1376
  /** The page number from which to start counting the number of pages for this section. If unset, page numbering continues from the previous section. If the value is unset in the first SectionBreak, refer to DocumentStyle's page_number_start. If DocumentMode is PAGELESS, this property will not be rendered. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error. */
1269
1377
  pageNumberStart?: number;
1270
1378
  /** Output only. The type of section. */
1271
- sectionType?: string;
1379
+ sectionType?: 'SECTION_TYPE_UNSPECIFIED' | 'CONTINUOUS' | 'NEXT_PAGE';
1272
1380
  /** Indicates whether to use the first page header / footer IDs for the first page of the section. If unset, it inherits from DocumentStyle's use_first_page_header_footer for the first section. If the value is unset for subsequent sectors, it should be interpreted as false. If DocumentMode is PAGELESS, this property will not be rendered. When updating this property, setting a concrete value is required. Unsetting this property results in a 400 bad request error. */
1273
1381
  useFirstPageHeaderFooter?: boolean;
1274
1382
  }
@@ -1434,7 +1542,7 @@ declare namespace gapi.client {
1434
1542
  /** The color of the border. This color cannot be transparent. */
1435
1543
  color?: OptionalColor;
1436
1544
  /** The dash style of the border. */
1437
- dashStyle?: string;
1545
+ dashStyle?: 'DASH_STYLE_UNSPECIFIED' | 'SOLID' | 'DOT' | 'DASH';
1438
1546
  /** The width of the border. */
1439
1547
  width?: Dimension;
1440
1548
  }
@@ -1460,7 +1568,12 @@ declare namespace gapi.client {
1460
1568
  /** The column span of the cell. This property is read-only. */
1461
1569
  columnSpan?: number;
1462
1570
  /** The alignment of the content in the table cell. The default alignment matches the alignment for newly created table cells in the Docs editor. */
1463
- contentAlignment?: string;
1571
+ contentAlignment?:
1572
+ | 'CONTENT_ALIGNMENT_UNSPECIFIED'
1573
+ | 'CONTENT_ALIGNMENT_UNSUPPORTED'
1574
+ | 'TOP'
1575
+ | 'MIDDLE'
1576
+ | 'BOTTOM';
1464
1577
  /** The bottom padding of the cell. */
1465
1578
  paddingBottom?: Dimension;
1466
1579
  /** The left padding of the cell. */
@@ -1502,7 +1615,10 @@ declare namespace gapi.client {
1502
1615
  /** The width of the column. Set when the column's `width_type` is FIXED_WIDTH. */
1503
1616
  width?: Dimension;
1504
1617
  /** The width type of the column. */
1505
- widthType?: string;
1618
+ widthType?:
1619
+ | 'WIDTH_TYPE_UNSPECIFIED'
1620
+ | 'EVENLY_DISTRIBUTED'
1621
+ | 'FIXED_WIDTH';
1506
1622
  }
1507
1623
  interface TableOfContents {
1508
1624
  /** The content of the table of contents. */
@@ -1572,7 +1688,7 @@ declare namespace gapi.client {
1572
1688
  }
1573
1689
  interface TabStop {
1574
1690
  /** The alignment of this tab stop. If unset, the value defaults to START. */
1575
- alignment?: string;
1691
+ alignment?: 'TAB_STOP_ALIGNMENT_UNSPECIFIED' | 'START' | 'CENTER' | 'END';
1576
1692
  /** The offset between this tab stop and the start margin. */
1577
1693
  offset?: Dimension;
1578
1694
  }
@@ -1592,7 +1708,11 @@ declare namespace gapi.client {
1592
1708
  /** The background color of the text. If set, the color is either an RGB color or transparent, depending on the `color` field. */
1593
1709
  backgroundColor?: OptionalColor;
1594
1710
  /** The text's vertical offset from its normal position. Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically rendered in a smaller font size, computed based on the `font_size` field. Changes in this field don't affect the `font_size`. */
1595
- baselineOffset?: string;
1711
+ baselineOffset?:
1712
+ | 'BASELINE_OFFSET_UNSPECIFIED'
1713
+ | 'NONE'
1714
+ | 'SUPERSCRIPT'
1715
+ | 'SUBSCRIPT';
1596
1716
  /** Whether or not the text is rendered as bold. */
1597
1717
  bold?: boolean;
1598
1718
  /** The size of the text's font. */
@@ -1654,6 +1774,14 @@ declare namespace gapi.client {
1654
1774
  /** The tab properties to update. */
1655
1775
  tabProperties?: TabProperties;
1656
1776
  }
1777
+ interface UpdateNamedStyleRequest {
1778
+ /** The NamedStyle fields that should be updated. At least `named_style_type` must be specified. The root `named_style` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the text style to bold, set `fields` to include `"text_style"` and `"text_style.bold"`. To update the paragraph style's alignment property, set `fields` to include `"paragraph_style"` and `"paragraph_style.alignment"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. Specifying `"text_style"` or `"paragraph_style"` with an empty TextStyle or ParagraphStyle will reset all of its nested fields. */
1779
+ fields?: string;
1780
+ /** The document style to update. */
1781
+ namedStyle?: NamedStyle;
1782
+ /** The document tab to update. By default, the update is applied to the first tab. */
1783
+ tabId?: string;
1784
+ }
1657
1785
  interface UpdateParagraphStyleRequest {
1658
1786
  /** The fields that should be updated. At least one field must be specified. The root `paragraph_style` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the paragraph style's alignment property, set `fields` to `"alignment"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. */
1659
1787
  fields?: string;
@@ -1724,11 +1852,11 @@ declare namespace gapi.client {
1724
1852
  /** Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically. */
1725
1853
  batchUpdate(request: {
1726
1854
  /** V1 error format. */
1727
- '$.xgafv'?: string;
1855
+ '$.xgafv'?: '1' | '2';
1728
1856
  /** OAuth access token. */
1729
1857
  access_token?: string;
1730
1858
  /** Data format for response. */
1731
- alt?: string;
1859
+ alt?: 'json' | 'media' | 'proto';
1732
1860
  /** JSONP */
1733
1861
  callback?: string;
1734
1862
  /** The ID of the document to update. */
@@ -1753,11 +1881,11 @@ declare namespace gapi.client {
1753
1881
  batchUpdate(
1754
1882
  request: {
1755
1883
  /** V1 error format. */
1756
- '$.xgafv'?: string;
1884
+ '$.xgafv'?: '1' | '2';
1757
1885
  /** OAuth access token. */
1758
1886
  access_token?: string;
1759
1887
  /** Data format for response. */
1760
- alt?: string;
1888
+ alt?: 'json' | 'media' | 'proto';
1761
1889
  /** JSONP */
1762
1890
  callback?: string;
1763
1891
  /** The ID of the document to update. */
@@ -1782,11 +1910,11 @@ declare namespace gapi.client {
1782
1910
  /** Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. */
1783
1911
  create(request: {
1784
1912
  /** V1 error format. */
1785
- '$.xgafv'?: string;
1913
+ '$.xgafv'?: '1' | '2';
1786
1914
  /** OAuth access token. */
1787
1915
  access_token?: string;
1788
1916
  /** Data format for response. */
1789
- alt?: string;
1917
+ alt?: 'json' | 'media' | 'proto';
1790
1918
  /** JSONP */
1791
1919
  callback?: string;
1792
1920
  /** Selector specifying which fields to include in a partial response. */
@@ -1809,11 +1937,11 @@ declare namespace gapi.client {
1809
1937
  create(
1810
1938
  request: {
1811
1939
  /** V1 error format. */
1812
- '$.xgafv'?: string;
1940
+ '$.xgafv'?: '1' | '2';
1813
1941
  /** OAuth access token. */
1814
1942
  access_token?: string;
1815
1943
  /** Data format for response. */
1816
- alt?: string;
1944
+ alt?: 'json' | 'media' | 'proto';
1817
1945
  /** JSONP */
1818
1946
  callback?: string;
1819
1947
  /** Selector specifying which fields to include in a partial response. */
@@ -1836,11 +1964,11 @@ declare namespace gapi.client {
1836
1964
  /** Gets the latest version of the specified document. */
1837
1965
  get(request?: {
1838
1966
  /** V1 error format. */
1839
- '$.xgafv'?: string;
1967
+ '$.xgafv'?: '1' | '2';
1840
1968
  /** OAuth access token. */
1841
1969
  access_token?: string;
1842
1970
  /** Data format for response. */
1843
- alt?: string;
1971
+ alt?: 'json' | 'media' | 'proto';
1844
1972
  /** JSONP */
1845
1973
  callback?: string;
1846
1974
  /** The ID of the document to retrieve. */
@@ -1858,7 +1986,11 @@ declare namespace gapi.client {
1858
1986
  /** 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. */
1859
1987
  quotaUser?: string;
1860
1988
  /** The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used. */
1861
- suggestionsViewMode?: string;
1989
+ suggestionsViewMode?:
1990
+ | 'DEFAULT_FOR_CURRENT_ACCESS'
1991
+ | 'SUGGESTIONS_INLINE'
1992
+ | 'PREVIEW_SUGGESTIONS_ACCEPTED'
1993
+ | 'PREVIEW_WITHOUT_SUGGESTIONS';
1862
1994
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1863
1995
  upload_protocol?: string;
1864
1996
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.docs-v1",
3
- "version": "0.2.20260311",
3
+ "version": "0.3.20260529",
4
4
  "description": "TypeScript typings for Google Docs API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,18 @@ Install typings for Google Docs API:
11
11
  npm install @types/gapi.client.docs-v1 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.docs-v1"]
22
+ }
23
+ }
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  You need to initialize Google API client in your code: