@maxim_mazurok/gapi.client.drive-v2 0.2.20260311 → 0.2.20260607

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 +96 -31
  2. package/package.json +1 -1
  3. package/readme.md +22 -5
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://www.googleapis.com/discovery/v1/apis/drive/v2/rest
12
- // Revision: 20260311
12
+ // Revision: 20260607
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -26,57 +26,57 @@ declare namespace gapi.client {
26
26
  namespace drive {
27
27
  interface About {
28
28
  /** Information about supported additional roles per file type. The most specific type takes precedence. */
29
- additionalRoleInfo?: Array<{
29
+ additionalRoleInfo?: {
30
30
  /** The supported additional roles per primary role. */
31
- roleSets?: Array<{
31
+ roleSets?: {
32
32
  /** The supported additional roles with the primary role. */
33
33
  additionalRoles?: string[];
34
34
  /** A primary permission role. */
35
35
  primaryRole?: string;
36
- }>;
36
+ }[];
37
37
  /** The content type that this additional role info applies to. */
38
38
  type?: string;
39
- }>;
39
+ }[];
40
40
  /** Whether the user can create shared drives. */
41
41
  canCreateDrives?: boolean;
42
42
  /** Deprecated: Use `canCreateDrives` instead. */
43
43
  canCreateTeamDrives?: boolean;
44
- /** The domain sharing policy for the current user. Possible values are: * `allowed` * `allowedWithWarning` * `incomingOnly` * `disallowed` */
44
+ /** Deprecated: Does not granularly represent allowlisted domains or Trust Rules. The domain sharing policy for the current user. Possible values are: * `allowed` * `allowedWithWarning` * `incomingOnly` * `disallowed` Note that if the user is enrolled in Trust Rules, `disallowed` will always be returned. If sharing is restricted to allowlisted domains, either `incomingOnly` or `allowedWithWarning` will be returned, depending on whether receiving files from outside the allowlisted domains is permitted. */
45
45
  domainSharingPolicy?: string;
46
46
  /** A list of themes that are supported for shared drives. */
47
- driveThemes?: Array<{
47
+ driveThemes?: {
48
48
  /** A link to this theme's background image. */
49
49
  backgroundImageLink?: string;
50
50
  /** The color of this theme as an RGB hex string. */
51
51
  colorRgb?: string;
52
52
  /** The ID of the theme. */
53
53
  id?: string;
54
- }>;
54
+ }[];
55
55
  /** The ETag of the item. */
56
56
  etag?: string;
57
57
  /** The allowable export formats. */
58
- exportFormats?: Array<{
58
+ exportFormats?: {
59
59
  /** The content type to convert from. */
60
60
  source?: string;
61
61
  /** The possible content types to convert to. */
62
62
  targets?: string[];
63
- }>;
63
+ }[];
64
64
  /** List of additional features enabled on this account. */
65
- features?: Array<{
65
+ features?: {
66
66
  /** The name of the feature. */
67
67
  featureName?: string;
68
68
  /** The request limit rate for this feature, in queries per second. */
69
69
  featureRate?: number;
70
- }>;
70
+ }[];
71
71
  /** The palette of allowable folder colors as RGB hex strings. */
72
72
  folderColorPalette?: string[];
73
73
  /** The allowable import formats. */
74
- importFormats?: Array<{
74
+ importFormats?: {
75
75
  /** The imported file's content type to convert from. */
76
76
  source?: string;
77
77
  /** The possible content types to convert to. */
78
78
  targets?: string[];
79
- }>;
79
+ }[];
80
80
  /** A boolean indicating whether the authenticated app is installed by the authenticated user. */
81
81
  isCurrentAppInstalled?: boolean;
82
82
  /** This is always `drive#about`. */
@@ -86,23 +86,23 @@ declare namespace gapi.client {
86
86
  /** The largest change id. */
87
87
  largestChangeId?: string;
88
88
  /** List of max upload sizes for each file type. The most specific type takes precedence. */
89
- maxUploadSizes?: Array<{
89
+ maxUploadSizes?: {
90
90
  /** The max upload size for this type. */
91
91
  size?: string;
92
92
  /** The file type. */
93
93
  type?: string;
94
- }>;
94
+ }[];
95
95
  /** The name of the current user. */
96
96
  name?: string;
97
97
  /** The current user's ID as visible in the permissions collection. */
98
98
  permissionId?: string;
99
99
  /** The amount of storage quota used by different Google services. */
100
- quotaBytesByService?: Array<{
100
+ quotaBytesByService?: {
101
101
  /** The storage quota bytes used by the service. */
102
102
  bytesUsed?: string;
103
103
  /** The service's name, e.g. DRIVE, GMAIL, or PHOTOS. */
104
104
  serviceName?: string;
105
- }>;
105
+ }[];
106
106
  /** The total number of quota bytes. This is only relevant when quotaType is LIMITED. */
107
107
  quotaBytesTotal?: string;
108
108
  /** The number of quota bytes used by Google Drive. */
@@ -120,14 +120,14 @@ declare namespace gapi.client {
120
120
  /** A link back to this item. */
121
121
  selfLink?: string;
122
122
  /** Deprecated: Use `driveThemes` instead. */
123
- teamDriveThemes?: Array<{
123
+ teamDriveThemes?: {
124
124
  /** Deprecated: Use `driveThemes/backgroundImageLink` instead. */
125
125
  backgroundImageLink?: string;
126
126
  /** Deprecated: Use `driveThemes/colorRgb` instead. */
127
127
  colorRgb?: string;
128
128
  /** Deprecated: Use `driveThemes/id` instead. */
129
129
  id?: string;
130
- }>;
130
+ }[];
131
131
  /** The authenticated user. */
132
132
  user?: User;
133
133
  }
@@ -141,14 +141,14 @@ declare namespace gapi.client {
141
141
  /** Whether the app has drive-wide scope. An app with drive-wide scope can access all files in the user's drive. */
142
142
  hasDriveWideScope?: boolean;
143
143
  /** The various icons for the app. */
144
- icons?: Array<{
144
+ icons?: {
145
145
  /** Category of the icon. Allowed values are: * `application` - icon for the application * `document` - icon for a file associated with the app * `documentShared` - icon for a shared file associated with the app */
146
146
  category?: string;
147
147
  /** URL for the icon. */
148
148
  iconUrl?: string;
149
149
  /** Size of the icon. Represented as the maximum of the width and height. */
150
150
  size?: number;
151
- }>;
151
+ }[];
152
152
  /** The ID of the app. */
153
153
  id?: string;
154
154
  /** Whether the app is installed. */
@@ -292,6 +292,12 @@ declare namespace gapi.client {
292
292
  /** Output only. A link back to this reference. */
293
293
  selfLink?: string;
294
294
  }
295
+ interface ClientEncryptionDetails {
296
+ /** The metadata used for client-side operations. */
297
+ decryptionMetadata?: DecryptionMetadata;
298
+ /** The encryption state of the file. The values expected here are: - encrypted - unencrypted */
299
+ encryptionState?: string;
300
+ }
295
301
  interface Comment {
296
302
  /** A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/workspace/drive/api/v3/manage-comments). */
297
303
  anchor?: string;
@@ -389,6 +395,22 @@ declare namespace gapi.client {
389
395
  /** Output only. The type of the content restriction. Currently the only possible value is `globalContentRestriction`. */
390
396
  type?: string;
391
397
  }
398
+ interface DecryptionMetadata {
399
+ /** Chunk size used if content was encrypted with the AES 256 GCM Cipher. Possible values are: - default - small */
400
+ aes256GcmChunkSize?: string;
401
+ /** The URL-safe Base64 encoded HMAC-SHA256 digest of the resource metadata with its DEK (Data Encryption Key); see https://developers.google.com/workspace/cse/reference */
402
+ encryptionResourceKeyHash?: string;
403
+ /** The signed JSON Web Token (JWT) which can be used to authorize the requesting user with the Key ACL Service (KACLS). The JWT asserts that the requesting user has at least read permissions on the file. */
404
+ jwt?: string;
405
+ /** The ID of the KACLS (Key ACL Service) used to encrypt the file. */
406
+ kaclsId?: string;
407
+ /** The name of the KACLS (Key ACL Service) used to encrypt the file. */
408
+ kaclsName?: string;
409
+ /** Key format for the unwrapped key. Must be `tinkAesGcmKey`. */
410
+ keyFormat?: string;
411
+ /** The URL-safe Base64 encoded wrapped key used to encrypt the contents of the file. */
412
+ wrappedKey?: string;
413
+ }
392
414
  interface Drive {
393
415
  /** An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on `drive.drives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set. */
394
416
  backgroundImageFile?: {
@@ -582,6 +604,8 @@ declare namespace gapi.client {
582
604
  /** Output only. Whether the current user can restore this file from trash. */
583
605
  canUntrash?: boolean;
584
606
  };
607
+ /** Client Side Encryption related details. Contains details about the encryption state of the file and details regarding the encryption mechanism that clients need to use when decrypting the contents of this item. This will only be present on files and not on folders or shortcuts. */
608
+ clientEncryptionDetails?: ClientEncryptionDetails;
585
609
  /** Restrictions for accessing the content of the file. Only populated if such a restriction exists. */
586
610
  contentRestrictions?: ContentRestriction[];
587
611
  /** Output only. Deprecated: Use `capabilities/canCopy` instead. */
@@ -834,6 +858,18 @@ declare namespace gapi.client {
834
858
  /** A link back to this list. */
835
859
  selfLink?: string;
836
860
  }
861
+ interface GenerateCseTokenResponse {
862
+ /** The current Key ACL Service (KACLS) ID associated with the JWT. */
863
+ currentKaclsId?: string;
864
+ /** Name of the KACLs that the returned KACLs ID points to. */
865
+ currentKaclsName?: string;
866
+ /** The fileId for which the JWT was generated. */
867
+ fileId?: string;
868
+ /** The signed JSON Web Token (JWT) for the file. */
869
+ jwt?: string;
870
+ /** Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#generateCseTokenResponse"`. */
871
+ kind?: string;
872
+ }
837
873
  interface GeneratedIds {
838
874
  /** The IDs generated for the requesting user in the specified space. */
839
875
  ids?: string[];
@@ -966,7 +1002,7 @@ declare namespace gapi.client {
966
1002
  /** Whether the account associated with this permission is a pending owner. Only populated for `user` type permissions for files that are not in a shared drive. */
967
1003
  pendingOwner?: boolean;
968
1004
  /** Output only. Details of whether the permissions on this item are inherited or directly on this item. */
969
- permissionDetails?: Array<{
1005
+ permissionDetails?: {
970
1006
  /** Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future. */
971
1007
  additionalRoles?: string[];
972
1008
  /** Output only. Whether this permission is inherited. This field is always populated. */
@@ -977,7 +1013,7 @@ declare namespace gapi.client {
977
1013
  permissionType?: string;
978
1014
  /** Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader` */
979
1015
  role?: string;
980
- }>;
1016
+ }[];
981
1017
  /** Output only. A link to the profile photo, if available. */
982
1018
  photoLink?: string;
983
1019
  /** The primary role for this user. While new values may be supported in the future, the following are currently allowed: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader` */
@@ -985,7 +1021,7 @@ declare namespace gapi.client {
985
1021
  /** Output only. A link back to this permission. */
986
1022
  selfLink?: string;
987
1023
  /** Output only. Deprecated: Use `permissionDetails` instead. */
988
- teamDrivePermissionDetails?: Array<{
1024
+ teamDrivePermissionDetails?: {
989
1025
  /** Output only. Deprecated: Use `permissionDetails/additionalRoles` instead. */
990
1026
  additionalRoles?: string[];
991
1027
  /** Output only. Deprecated: Use `permissionDetails/inherited` instead. */
@@ -996,7 +1032,7 @@ declare namespace gapi.client {
996
1032
  role?: string;
997
1033
  /** Output only. Deprecated: Use `permissionDetails/permissionType` instead. */
998
1034
  teamDrivePermissionType?: string;
999
- }>;
1035
+ }[];
1000
1036
  /** The account type. Allowed values are: * `user` * `group` * `domain` * `anyone` */
1001
1037
  type?: string;
1002
1038
  /** The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a `drive.permissions.insert` request, exactly one of the `id` or `value` fields must be specified unless the permission type is `anyone`, in which case both `id` and `value` are ignored. */
@@ -2196,7 +2232,7 @@ declare namespace gapi.client {
2196
2232
  },
2197
2233
  body: Drive,
2198
2234
  ): Request<Drive>;
2199
- /** Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/workspace/drive/api/guides/search-shareddrives) guide. */
2235
+ /** Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](https://developers.google.com/workspace/drive/api/guides/search-shareddrives) guide. */
2200
2236
  list(request?: {
2201
2237
  /** V1 error format. */
2202
2238
  '$.xgafv'?: '1' | '2';
@@ -2517,6 +2553,35 @@ declare namespace gapi.client {
2517
2553
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2518
2554
  uploadType?: string;
2519
2555
  }): Request<void>;
2556
+ /** Generates a CSE token which can be used to create or update CSE files. */
2557
+ generateCseToken(request?: {
2558
+ /** V1 error format. */
2559
+ '$.xgafv'?: '1' | '2';
2560
+ /** OAuth access token. */
2561
+ access_token?: string;
2562
+ /** Data format for response. */
2563
+ alt?: 'json' | 'media' | 'proto';
2564
+ /** JSONP */
2565
+ callback?: string;
2566
+ /** Selector specifying which fields to include in a partial response. */
2567
+ fields?: string;
2568
+ /** The ID of the file for which the JWT should be generated. If not provided, an id will be generated. */
2569
+ fileId?: string;
2570
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2571
+ key?: string;
2572
+ /** OAuth 2.0 token for the current user. */
2573
+ oauth_token?: string;
2574
+ /** The ID of the expected parent of the file. Used when generating a JWT for a new CSE file. If specified, the parent will be fetched, and if the parent is a shared drive item, the shared drive's policy will be used to determine the KACLS that should be used. It is invalid to specify both file_id and parent in a single request. */
2575
+ parent?: string;
2576
+ /** Returns response with indentations and line breaks. */
2577
+ prettyPrint?: boolean;
2578
+ /** 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. */
2579
+ quotaUser?: string;
2580
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2581
+ upload_protocol?: string;
2582
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2583
+ uploadType?: string;
2584
+ }): Request<GenerateCseTokenResponse>;
2520
2585
  /** Generates a set of file IDs which can be provided in insert or copy requests. */
2521
2586
  generateIds(request?: {
2522
2587
  /** V1 error format. */
@@ -2548,7 +2613,7 @@ declare namespace gapi.client {
2548
2613
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2549
2614
  uploadType?: string;
2550
2615
  }): Request<GeneratedIds>;
2551
- /** Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](/workspace/drive/api/reference/rest/v2/files/export) instead. For more information, see [Download & export files](/workspace/drive/api/guides/manage-downloads). */
2616
+ /** Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](https://developers.google.com/workspace/drive/api/reference/rest/v2/files/export) instead. For more information, see [Download & export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads). */
2552
2617
  get(request?: {
2553
2618
  /** V1 error format. */
2554
2619
  '$.xgafv'?: '1' | '2';
@@ -2591,7 +2656,7 @@ declare namespace gapi.client {
2591
2656
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2592
2657
  uploadType?: string;
2593
2658
  }): Request<File>;
2594
- /** Inserts a new file. This method supports an *‍/upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*‍/*` Note: Specify a valid MIME type, rather than the literal `*‍/*` value. The literal `*‍/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](/workspace/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `title` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type. */
2659
+ /** Inserts a new file. This method supports an *‍/upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*‍/*` Note: Specify a valid MIME type, rather than the literal `*‍/*` value. The literal `*‍/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](https://developers.google.com/workspace/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `title` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type. */
2595
2660
  insert(request: {
2596
2661
  /** V1 error format. */
2597
2662
  '$.xgafv'?: '1' | '2';
@@ -2697,7 +2762,7 @@ declare namespace gapi.client {
2697
2762
  },
2698
2763
  body: File,
2699
2764
  ): Request<File>;
2700
- /** Lists the user's files. For more information, see [Search for files and folders](/workspace/drive/api/guides/search-files). This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results. */
2765
+ /** Lists the user's files. For more information, see [Search for files and folders](https://developers.google.com/workspace/drive/api/guides/search-files). This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results. */
2701
2766
  list(request?: {
2702
2767
  /** V1 error format. */
2703
2768
  '$.xgafv'?: '1' | '2';
@@ -3090,7 +3155,7 @@ declare namespace gapi.client {
3090
3155
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3091
3156
  uploadType?: string;
3092
3157
  }): Request<File>;
3093
- /** Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an *‍/upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `*‍/*` (Specify a valid MIME type, rather than the literal `*‍/*` value. The literal `*‍/*` is only used to indicate that any valid MIME type can be uploaded. For more information, see [Google Workspace and Google Drive supported MIME types](/workspace/drive/api/guides/mime-types).) For more information on uploading files, see [Upload file data](/workspace/drive/api/guides/manage-uploads). */
3158
+ /** Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an *‍/upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `*‍/*` (Specify a valid MIME type, rather than the literal `*‍/*` value. The literal `*‍/*` is only used to indicate that any valid MIME type can be uploaded. For more information, see [Google Workspace and Google Drive supported MIME types](https://developers.google.com/workspace/drive/api/guides/mime-types).) For more information on uploading files, see [Upload file data](https://developers.google.com/workspace/drive/api/guides/manage-uploads). */
3094
3159
  update(request: {
3095
3160
  /** V1 error format. */
3096
3161
  '$.xgafv'?: '1' | '2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.drive-v2",
3
- "version": "0.2.20260311",
3
+ "version": "0.2.20260607",
4
4
  "description": "TypeScript typings for Google Drive API v2",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,18 @@ Install typings for Google Drive API:
11
11
  npm install @types/gapi.client.drive-v2 --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.drive-v2"]
22
+ }
23
+ }
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  You need to initialize Google API client in your code:
@@ -208,7 +220,7 @@ Creates a new shared drive.
208
220
  await gapi.client.drive.drives.insert({ requestId: "requestId", });
209
221
 
210
222
  /*
211
- Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/workspace/drive/api/guides/search-shareddrives) guide.
223
+ Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](https://developers.google.com/workspace/drive/api/guides/search-shareddrives) guide.
212
224
  */
213
225
  await gapi.client.drive.drives.list({ });
214
226
 
@@ -242,23 +254,28 @@ Exports a Google Workspace document to the requested MIME type and returns expor
242
254
  */
243
255
  await gapi.client.drive.files.export({ fileId: "fileId", mimeType: "mimeType", });
244
256
 
257
+ /*
258
+ Generates a CSE token which can be used to create or update CSE files.
259
+ */
260
+ await gapi.client.drive.files.generateCseToken({ });
261
+
245
262
  /*
246
263
  Generates a set of file IDs which can be provided in insert or copy requests.
247
264
  */
248
265
  await gapi.client.drive.files.generateIds({ });
249
266
 
250
267
  /*
251
- Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](/workspace/drive/api/reference/rest/v2/files/export) instead. For more information, see [Download & export files](/workspace/drive/api/guides/manage-downloads).
268
+ Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](https://developers.google.com/workspace/drive/api/reference/rest/v2/files/export) instead. For more information, see [Download & export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads).
252
269
  */
253
270
  await gapi.client.drive.files.get({ fileId: "fileId", });
254
271
 
255
272
  /*
256
- Inserts a new file. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](/workspace/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `title` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
273
+ Inserts a new file. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](https://developers.google.com/workspace/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `title` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
257
274
  */
258
275
  await gapi.client.drive.files.insert({ });
259
276
 
260
277
  /*
261
- Lists the user's files. For more information, see [Search for files and folders](/workspace/drive/api/guides/search-files). This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results.
278
+ Lists the user's files. For more information, see [Search for files and folders](https://developers.google.com/workspace/drive/api/guides/search-files). This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results.
262
279
  */
263
280
  await gapi.client.drive.files.list({ });
264
281
 
@@ -293,7 +310,7 @@ Restores a file from the trash. The currently authenticated user must own the fi
293
310
  await gapi.client.drive.files.untrash({ fileId: "fileId", });
294
311
 
295
312
  /*
296
- Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `*/*` (Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information, see [Google Workspace and Google Drive supported MIME types](/workspace/drive/api/guides/mime-types).) For more information on uploading files, see [Upload file data](/workspace/drive/api/guides/manage-uploads).
313
+ Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `*/*` (Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information, see [Google Workspace and Google Drive supported MIME types](https://developers.google.com/workspace/drive/api/guides/mime-types).) For more information on uploading files, see [Upload file data](https://developers.google.com/workspace/drive/api/guides/manage-uploads).
297
314
  */
298
315
  await gapi.client.drive.files.update({ fileId: "fileId", });
299
316