@googleapis/docs 4.0.1 → 5.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/docs-v5.0.0...docs-v5.0.1) (2025-07-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **docs:** update the API ([b5198a1](https://github.com/googleapis/google-api-nodejs-client/commit/b5198a13e94322dd7f8c5285a5aede3d294ccb86))
9
+
10
+ ## [5.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/docs-v4.0.1...docs-v5.0.0) (2025-06-30)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * upgrade to node 18
16
+
17
+ ### Features
18
+
19
+ * **docs:** update the API ([249c295](https://github.com/googleapis/google-api-nodejs-client/commit/249c295485076999dbae18dbf311fd3558d4f234))
20
+ * upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
26
+ * **docs:** update the API ([d9d0f70](https://github.com/googleapis/google-api-nodejs-client/commit/d9d0f7059982883ffd9223411a52d199538591c6))
27
+
3
28
  ## [4.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/docs-v4.0.0...docs-v4.0.1) (2025-06-04)
4
29
 
5
30
 
package/build/v1.d.ts CHANGED
@@ -3479,6 +3479,67 @@ export declare namespace docs_v1 {
3479
3479
  constructor(context: APIRequestContext);
3480
3480
  /**
3481
3481
  * 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.
3482
+ * @example
3483
+ * ```js
3484
+ * // Before running the sample:
3485
+ * // - Enable the API at:
3486
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3487
+ * // - Login into gcloud by running:
3488
+ * // ```sh
3489
+ * // $ gcloud auth application-default login
3490
+ * // ```
3491
+ * // - Install the npm module by running:
3492
+ * // ```sh
3493
+ * // $ npm install googleapis
3494
+ * // ```
3495
+ *
3496
+ * const {google} = require('googleapis');
3497
+ * const docs = google.docs('v1');
3498
+ *
3499
+ * async function main() {
3500
+ * const auth = new google.auth.GoogleAuth({
3501
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3502
+ * scopes: [
3503
+ * 'https://www.googleapis.com/auth/documents',
3504
+ * 'https://www.googleapis.com/auth/drive',
3505
+ * 'https://www.googleapis.com/auth/drive.file',
3506
+ * ],
3507
+ * });
3508
+ *
3509
+ * // Acquire an auth client, and bind it to all future calls
3510
+ * const authClient = await auth.getClient();
3511
+ * google.options({auth: authClient});
3512
+ *
3513
+ * // Do the magic
3514
+ * const res = await docs.documents.batchUpdate({
3515
+ * // The ID of the document to update.
3516
+ * documentId: 'placeholder-value',
3517
+ *
3518
+ * // Request body metadata
3519
+ * requestBody: {
3520
+ * // request body parameters
3521
+ * // {
3522
+ * // "requests": [],
3523
+ * // "writeControl": {}
3524
+ * // }
3525
+ * },
3526
+ * });
3527
+ * console.log(res.data);
3528
+ *
3529
+ * // Example response
3530
+ * // {
3531
+ * // "documentId": "my_documentId",
3532
+ * // "replies": [],
3533
+ * // "writeControl": {}
3534
+ * // }
3535
+ * }
3536
+ *
3537
+ * main().catch(e => {
3538
+ * console.error(e);
3539
+ * throw e;
3540
+ * });
3541
+ *
3542
+ * ```
3482
3543
  *
3483
3544
  * @param params - Parameters for request
3484
3545
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3493,6 +3554,93 @@ export declare namespace docs_v1 {
3493
3554
  batchUpdate(callback: BodyResponseCallback<Schema$BatchUpdateDocumentResponse>): void;
3494
3555
  /**
3495
3556
  * 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.
3557
+ * @example
3558
+ * ```js
3559
+ * // Before running the sample:
3560
+ * // - Enable the API at:
3561
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3562
+ * // - Login into gcloud by running:
3563
+ * // ```sh
3564
+ * // $ gcloud auth application-default login
3565
+ * // ```
3566
+ * // - Install the npm module by running:
3567
+ * // ```sh
3568
+ * // $ npm install googleapis
3569
+ * // ```
3570
+ *
3571
+ * const {google} = require('googleapis');
3572
+ * const docs = google.docs('v1');
3573
+ *
3574
+ * async function main() {
3575
+ * const auth = new google.auth.GoogleAuth({
3576
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3577
+ * scopes: [
3578
+ * 'https://www.googleapis.com/auth/documents',
3579
+ * 'https://www.googleapis.com/auth/drive',
3580
+ * 'https://www.googleapis.com/auth/drive.file',
3581
+ * ],
3582
+ * });
3583
+ *
3584
+ * // Acquire an auth client, and bind it to all future calls
3585
+ * const authClient = await auth.getClient();
3586
+ * google.options({auth: authClient});
3587
+ *
3588
+ * // Do the magic
3589
+ * const res = await docs.documents.create({
3590
+ * // Request body metadata
3591
+ * requestBody: {
3592
+ * // request body parameters
3593
+ * // {
3594
+ * // "body": {},
3595
+ * // "documentId": "my_documentId",
3596
+ * // "documentStyle": {},
3597
+ * // "footers": {},
3598
+ * // "footnotes": {},
3599
+ * // "headers": {},
3600
+ * // "inlineObjects": {},
3601
+ * // "lists": {},
3602
+ * // "namedRanges": {},
3603
+ * // "namedStyles": {},
3604
+ * // "positionedObjects": {},
3605
+ * // "revisionId": "my_revisionId",
3606
+ * // "suggestedDocumentStyleChanges": {},
3607
+ * // "suggestedNamedStylesChanges": {},
3608
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3609
+ * // "tabs": [],
3610
+ * // "title": "my_title"
3611
+ * // }
3612
+ * },
3613
+ * });
3614
+ * console.log(res.data);
3615
+ *
3616
+ * // Example response
3617
+ * // {
3618
+ * // "body": {},
3619
+ * // "documentId": "my_documentId",
3620
+ * // "documentStyle": {},
3621
+ * // "footers": {},
3622
+ * // "footnotes": {},
3623
+ * // "headers": {},
3624
+ * // "inlineObjects": {},
3625
+ * // "lists": {},
3626
+ * // "namedRanges": {},
3627
+ * // "namedStyles": {},
3628
+ * // "positionedObjects": {},
3629
+ * // "revisionId": "my_revisionId",
3630
+ * // "suggestedDocumentStyleChanges": {},
3631
+ * // "suggestedNamedStylesChanges": {},
3632
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3633
+ * // "tabs": [],
3634
+ * // "title": "my_title"
3635
+ * // }
3636
+ * }
3637
+ *
3638
+ * main().catch(e => {
3639
+ * console.error(e);
3640
+ * throw e;
3641
+ * });
3642
+ *
3643
+ * ```
3496
3644
  *
3497
3645
  * @param params - Parameters for request
3498
3646
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3507,6 +3655,78 @@ export declare namespace docs_v1 {
3507
3655
  create(callback: BodyResponseCallback<Schema$Document>): void;
3508
3656
  /**
3509
3657
  * Gets the latest version of the specified document.
3658
+ * @example
3659
+ * ```js
3660
+ * // Before running the sample:
3661
+ * // - Enable the API at:
3662
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3663
+ * // - Login into gcloud by running:
3664
+ * // ```sh
3665
+ * // $ gcloud auth application-default login
3666
+ * // ```
3667
+ * // - Install the npm module by running:
3668
+ * // ```sh
3669
+ * // $ npm install googleapis
3670
+ * // ```
3671
+ *
3672
+ * const {google} = require('googleapis');
3673
+ * const docs = google.docs('v1');
3674
+ *
3675
+ * async function main() {
3676
+ * const auth = new google.auth.GoogleAuth({
3677
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3678
+ * scopes: [
3679
+ * 'https://www.googleapis.com/auth/documents',
3680
+ * 'https://www.googleapis.com/auth/documents.readonly',
3681
+ * 'https://www.googleapis.com/auth/drive',
3682
+ * 'https://www.googleapis.com/auth/drive.file',
3683
+ * 'https://www.googleapis.com/auth/drive.readonly',
3684
+ * ],
3685
+ * });
3686
+ *
3687
+ * // Acquire an auth client, and bind it to all future calls
3688
+ * const authClient = await auth.getClient();
3689
+ * google.options({auth: authClient});
3690
+ *
3691
+ * // Do the magic
3692
+ * const res = await docs.documents.get({
3693
+ * // The ID of the document to retrieve.
3694
+ * documentId: 'placeholder-value',
3695
+ * // Whether to populate the Document.tabs field instead of the text content fields like `body` and `documentStyle` on Document. - When `True`: Document content populates in the Document.tabs field instead of the text content fields in Document. - When `False`: The content of the document's first tab populates the content fields in Document excluding Document.tabs. If a document has only one tab, then that tab is used to populate the document content. Document.tabs will be empty.
3696
+ * includeTabsContent: 'placeholder-value',
3697
+ * // 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.
3698
+ * suggestionsViewMode: 'placeholder-value',
3699
+ * });
3700
+ * console.log(res.data);
3701
+ *
3702
+ * // Example response
3703
+ * // {
3704
+ * // "body": {},
3705
+ * // "documentId": "my_documentId",
3706
+ * // "documentStyle": {},
3707
+ * // "footers": {},
3708
+ * // "footnotes": {},
3709
+ * // "headers": {},
3710
+ * // "inlineObjects": {},
3711
+ * // "lists": {},
3712
+ * // "namedRanges": {},
3713
+ * // "namedStyles": {},
3714
+ * // "positionedObjects": {},
3715
+ * // "revisionId": "my_revisionId",
3716
+ * // "suggestedDocumentStyleChanges": {},
3717
+ * // "suggestedNamedStylesChanges": {},
3718
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3719
+ * // "tabs": [],
3720
+ * // "title": "my_title"
3721
+ * // }
3722
+ * }
3723
+ *
3724
+ * main().catch(e => {
3725
+ * console.error(e);
3726
+ * throw e;
3727
+ * });
3728
+ *
3729
+ * ```
3510
3730
  *
3511
3731
  * @param params - Parameters for request
3512
3732
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/build/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,OAAO,CA4rHvB;AA5rHD,WAAiB,OAAO;IAgEtB;;;;;;;;;;OAUG;IACH,MAAa,IAAI;QAIf,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,CAAC;KACF;IAZY,YAAI,OAYhB,CAAA;IA8yGD,MAAa,kBAAkB;QAE7B,YAAY,OAA0B;YACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAqCD,WAAW,CACT,gBAGkC,EAClC,iBAIkC,EAClC,QAEkC;YAKlC,IAAI,MAAM,GAAG,CAAC,gBAAgB;gBAC5B,EAAE,CAA0C,CAAC;YAC/C,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,G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C7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,8BAA8B,CAAC;YAClE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,4BAA4B,CAAC,CAAC,OAAO,CACnD,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,EAAE;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,YAAY,CAAC;gBAC9B,UAAU,EAAE,CAAC,YAAY,CAAC;gBAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAkB,UAAU,CAAC,CAAC;aACtD;QACH,CAAC;KACF;IAjfY,0BAAkB,qBAif9B,CAAA;AAkCH,CAAC,EAx5HgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAw5HvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/docs",
3
- "version": "4.0.1",
3
+ "version": "5.0.1",
4
4
  "description": "docs",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
package/v1.ts CHANGED
@@ -3504,6 +3504,67 @@ export namespace docs_v1 {
3504
3504
 
3505
3505
  /**
3506
3506
  * 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.
3507
+ * @example
3508
+ * ```js
3509
+ * // Before running the sample:
3510
+ * // - Enable the API at:
3511
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3512
+ * // - Login into gcloud by running:
3513
+ * // ```sh
3514
+ * // $ gcloud auth application-default login
3515
+ * // ```
3516
+ * // - Install the npm module by running:
3517
+ * // ```sh
3518
+ * // $ npm install googleapis
3519
+ * // ```
3520
+ *
3521
+ * const {google} = require('googleapis');
3522
+ * const docs = google.docs('v1');
3523
+ *
3524
+ * async function main() {
3525
+ * const auth = new google.auth.GoogleAuth({
3526
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3527
+ * scopes: [
3528
+ * 'https://www.googleapis.com/auth/documents',
3529
+ * 'https://www.googleapis.com/auth/drive',
3530
+ * 'https://www.googleapis.com/auth/drive.file',
3531
+ * ],
3532
+ * });
3533
+ *
3534
+ * // Acquire an auth client, and bind it to all future calls
3535
+ * const authClient = await auth.getClient();
3536
+ * google.options({auth: authClient});
3537
+ *
3538
+ * // Do the magic
3539
+ * const res = await docs.documents.batchUpdate({
3540
+ * // The ID of the document to update.
3541
+ * documentId: 'placeholder-value',
3542
+ *
3543
+ * // Request body metadata
3544
+ * requestBody: {
3545
+ * // request body parameters
3546
+ * // {
3547
+ * // "requests": [],
3548
+ * // "writeControl": {}
3549
+ * // }
3550
+ * },
3551
+ * });
3552
+ * console.log(res.data);
3553
+ *
3554
+ * // Example response
3555
+ * // {
3556
+ * // "documentId": "my_documentId",
3557
+ * // "replies": [],
3558
+ * // "writeControl": {}
3559
+ * // }
3560
+ * }
3561
+ *
3562
+ * main().catch(e => {
3563
+ * console.error(e);
3564
+ * throw e;
3565
+ * });
3566
+ *
3567
+ * ```
3507
3568
  *
3508
3569
  * @param params - Parameters for request
3509
3570
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3599,6 +3660,93 @@ export namespace docs_v1 {
3599
3660
 
3600
3661
  /**
3601
3662
  * 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.
3663
+ * @example
3664
+ * ```js
3665
+ * // Before running the sample:
3666
+ * // - Enable the API at:
3667
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3668
+ * // - Login into gcloud by running:
3669
+ * // ```sh
3670
+ * // $ gcloud auth application-default login
3671
+ * // ```
3672
+ * // - Install the npm module by running:
3673
+ * // ```sh
3674
+ * // $ npm install googleapis
3675
+ * // ```
3676
+ *
3677
+ * const {google} = require('googleapis');
3678
+ * const docs = google.docs('v1');
3679
+ *
3680
+ * async function main() {
3681
+ * const auth = new google.auth.GoogleAuth({
3682
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3683
+ * scopes: [
3684
+ * 'https://www.googleapis.com/auth/documents',
3685
+ * 'https://www.googleapis.com/auth/drive',
3686
+ * 'https://www.googleapis.com/auth/drive.file',
3687
+ * ],
3688
+ * });
3689
+ *
3690
+ * // Acquire an auth client, and bind it to all future calls
3691
+ * const authClient = await auth.getClient();
3692
+ * google.options({auth: authClient});
3693
+ *
3694
+ * // Do the magic
3695
+ * const res = await docs.documents.create({
3696
+ * // Request body metadata
3697
+ * requestBody: {
3698
+ * // request body parameters
3699
+ * // {
3700
+ * // "body": {},
3701
+ * // "documentId": "my_documentId",
3702
+ * // "documentStyle": {},
3703
+ * // "footers": {},
3704
+ * // "footnotes": {},
3705
+ * // "headers": {},
3706
+ * // "inlineObjects": {},
3707
+ * // "lists": {},
3708
+ * // "namedRanges": {},
3709
+ * // "namedStyles": {},
3710
+ * // "positionedObjects": {},
3711
+ * // "revisionId": "my_revisionId",
3712
+ * // "suggestedDocumentStyleChanges": {},
3713
+ * // "suggestedNamedStylesChanges": {},
3714
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3715
+ * // "tabs": [],
3716
+ * // "title": "my_title"
3717
+ * // }
3718
+ * },
3719
+ * });
3720
+ * console.log(res.data);
3721
+ *
3722
+ * // Example response
3723
+ * // {
3724
+ * // "body": {},
3725
+ * // "documentId": "my_documentId",
3726
+ * // "documentStyle": {},
3727
+ * // "footers": {},
3728
+ * // "footnotes": {},
3729
+ * // "headers": {},
3730
+ * // "inlineObjects": {},
3731
+ * // "lists": {},
3732
+ * // "namedRanges": {},
3733
+ * // "namedStyles": {},
3734
+ * // "positionedObjects": {},
3735
+ * // "revisionId": "my_revisionId",
3736
+ * // "suggestedDocumentStyleChanges": {},
3737
+ * // "suggestedNamedStylesChanges": {},
3738
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3739
+ * // "tabs": [],
3740
+ * // "title": "my_title"
3741
+ * // }
3742
+ * }
3743
+ *
3744
+ * main().catch(e => {
3745
+ * console.error(e);
3746
+ * throw e;
3747
+ * });
3748
+ *
3749
+ * ```
3602
3750
  *
3603
3751
  * @param params - Parameters for request
3604
3752
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3686,6 +3834,78 @@ export namespace docs_v1 {
3686
3834
 
3687
3835
  /**
3688
3836
  * Gets the latest version of the specified document.
3837
+ * @example
3838
+ * ```js
3839
+ * // Before running the sample:
3840
+ * // - Enable the API at:
3841
+ * // https://console.developers.google.com/apis/api/docs.googleapis.com
3842
+ * // - Login into gcloud by running:
3843
+ * // ```sh
3844
+ * // $ gcloud auth application-default login
3845
+ * // ```
3846
+ * // - Install the npm module by running:
3847
+ * // ```sh
3848
+ * // $ npm install googleapis
3849
+ * // ```
3850
+ *
3851
+ * const {google} = require('googleapis');
3852
+ * const docs = google.docs('v1');
3853
+ *
3854
+ * async function main() {
3855
+ * const auth = new google.auth.GoogleAuth({
3856
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3857
+ * scopes: [
3858
+ * 'https://www.googleapis.com/auth/documents',
3859
+ * 'https://www.googleapis.com/auth/documents.readonly',
3860
+ * 'https://www.googleapis.com/auth/drive',
3861
+ * 'https://www.googleapis.com/auth/drive.file',
3862
+ * 'https://www.googleapis.com/auth/drive.readonly',
3863
+ * ],
3864
+ * });
3865
+ *
3866
+ * // Acquire an auth client, and bind it to all future calls
3867
+ * const authClient = await auth.getClient();
3868
+ * google.options({auth: authClient});
3869
+ *
3870
+ * // Do the magic
3871
+ * const res = await docs.documents.get({
3872
+ * // The ID of the document to retrieve.
3873
+ * documentId: 'placeholder-value',
3874
+ * // Whether to populate the Document.tabs field instead of the text content fields like `body` and `documentStyle` on Document. - When `True`: Document content populates in the Document.tabs field instead of the text content fields in Document. - When `False`: The content of the document's first tab populates the content fields in Document excluding Document.tabs. If a document has only one tab, then that tab is used to populate the document content. Document.tabs will be empty.
3875
+ * includeTabsContent: 'placeholder-value',
3876
+ * // 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.
3877
+ * suggestionsViewMode: 'placeholder-value',
3878
+ * });
3879
+ * console.log(res.data);
3880
+ *
3881
+ * // Example response
3882
+ * // {
3883
+ * // "body": {},
3884
+ * // "documentId": "my_documentId",
3885
+ * // "documentStyle": {},
3886
+ * // "footers": {},
3887
+ * // "footnotes": {},
3888
+ * // "headers": {},
3889
+ * // "inlineObjects": {},
3890
+ * // "lists": {},
3891
+ * // "namedRanges": {},
3892
+ * // "namedStyles": {},
3893
+ * // "positionedObjects": {},
3894
+ * // "revisionId": "my_revisionId",
3895
+ * // "suggestedDocumentStyleChanges": {},
3896
+ * // "suggestedNamedStylesChanges": {},
3897
+ * // "suggestionsViewMode": "my_suggestionsViewMode",
3898
+ * // "tabs": [],
3899
+ * // "title": "my_title"
3900
+ * // }
3901
+ * }
3902
+ *
3903
+ * main().catch(e => {
3904
+ * console.error(e);
3905
+ * throw e;
3906
+ * });
3907
+ *
3908
+ * ```
3689
3909
  *
3690
3910
  * @param params - Parameters for request
3691
3911
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.