@maxim_mazurok/gapi.client.drive-v3 0.2.20260311 → 0.2.20260602
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/index.d.ts +518 -39
- package/package.json +1 -1
- package/readme.md +54 -7
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/v3/rest
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260602
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -32,14 +32,14 @@ declare namespace gapi.client {
|
|
|
32
32
|
/** Deprecated: Use `canCreateDrives` instead. */
|
|
33
33
|
canCreateTeamDrives?: boolean;
|
|
34
34
|
/** A list of themes that are supported for shared drives. */
|
|
35
|
-
driveThemes?:
|
|
35
|
+
driveThemes?: {
|
|
36
36
|
/** A link to this theme's background image. */
|
|
37
37
|
backgroundImageLink?: string;
|
|
38
38
|
/** The color of this theme as an RGB hex string. */
|
|
39
39
|
colorRgb?: string;
|
|
40
40
|
/** The ID of the theme. */
|
|
41
41
|
id?: string;
|
|
42
|
-
}
|
|
42
|
+
}[];
|
|
43
43
|
/** A map of source MIME type to possible targets for all supported exports. */
|
|
44
44
|
exportFormats?: {[P in string]: string[]};
|
|
45
45
|
/** The currently supported folder colors as RGB hex strings. */
|
|
@@ -64,14 +64,14 @@ declare namespace gapi.client {
|
|
|
64
64
|
usageInDriveTrash?: string;
|
|
65
65
|
};
|
|
66
66
|
/** Deprecated: Use `driveThemes` instead. */
|
|
67
|
-
teamDriveThemes?:
|
|
67
|
+
teamDriveThemes?: {
|
|
68
68
|
/** Deprecated: Use `driveThemes/backgroundImageLink` instead. */
|
|
69
69
|
backgroundImageLink?: string;
|
|
70
70
|
/** Deprecated: Use `driveThemes/colorRgb` instead. */
|
|
71
71
|
colorRgb?: string;
|
|
72
72
|
/** Deprecated: Use `driveThemes/id` instead. */
|
|
73
73
|
id?: string;
|
|
74
|
-
}
|
|
74
|
+
}[];
|
|
75
75
|
/** The authenticated user. */
|
|
76
76
|
user?: User;
|
|
77
77
|
}
|
|
@@ -97,6 +97,10 @@ declare namespace gapi.client {
|
|
|
97
97
|
/** Indicates the view for this access proposal. Only populated for proposals that belong to a view. Only `published` is supported. */
|
|
98
98
|
view?: string;
|
|
99
99
|
}
|
|
100
|
+
interface AddReviewer {
|
|
101
|
+
/** Required. The email of the reviewer to add. */
|
|
102
|
+
addedReviewerEmail?: string;
|
|
103
|
+
}
|
|
100
104
|
interface App {
|
|
101
105
|
/** Whether the app is authorized to access data on the user's Drive. */
|
|
102
106
|
authorized?: boolean;
|
|
@@ -166,7 +170,7 @@ declare namespace gapi.client {
|
|
|
166
170
|
selfLink?: string;
|
|
167
171
|
}
|
|
168
172
|
interface Approval {
|
|
169
|
-
/** The
|
|
173
|
+
/** The approval ID. */
|
|
170
174
|
approvalId?: string;
|
|
171
175
|
/** Output only. The time the approval was completed. */
|
|
172
176
|
completeTime?: string;
|
|
@@ -174,13 +178,13 @@ declare namespace gapi.client {
|
|
|
174
178
|
createTime?: string;
|
|
175
179
|
/** The time that the approval is due. */
|
|
176
180
|
dueTime?: string;
|
|
177
|
-
/** The user that requested the
|
|
181
|
+
/** The user that requested the approval. */
|
|
178
182
|
initiator?: User;
|
|
179
183
|
/** This is always drive#approval. */
|
|
180
184
|
kind?: string;
|
|
181
185
|
/** Output only. The most recent time the approval was modified. */
|
|
182
186
|
modifyTime?: string;
|
|
183
|
-
/** The responses made on the
|
|
187
|
+
/** The responses made on the approval by reviewers. */
|
|
184
188
|
reviewerResponses?: ReviewerResponse[];
|
|
185
189
|
/** Output only. The status of the approval at the time this resource was requested. */
|
|
186
190
|
status?:
|
|
@@ -193,13 +197,21 @@ declare namespace gapi.client {
|
|
|
193
197
|
targetFileId?: string;
|
|
194
198
|
}
|
|
195
199
|
interface ApprovalList {
|
|
196
|
-
/** The list of
|
|
200
|
+
/** The list of approvals. If `nextPageToken` is populated, then this list may be incomplete and an additional page of results should be fetched. */
|
|
197
201
|
items?: Approval[];
|
|
198
202
|
/** This is always drive#approvalList */
|
|
199
203
|
kind?: string;
|
|
200
|
-
/** The page token for the next page of
|
|
204
|
+
/** The page token for the next page of approvals. This is absent if the end of the approvals list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. */
|
|
201
205
|
nextPageToken?: string;
|
|
202
206
|
}
|
|
207
|
+
interface ApproveApprovalRequest {
|
|
208
|
+
/** Optional. A message to accompany the reviewer response on the approval. This message is included in notifications for the action and in the approval activity log. */
|
|
209
|
+
message?: string;
|
|
210
|
+
}
|
|
211
|
+
interface CancelApprovalRequest {
|
|
212
|
+
/** Optional. A message to accompany the cancellation of the approval. This message is included in notifications for the action and in the approval activity log. */
|
|
213
|
+
message?: string;
|
|
214
|
+
}
|
|
203
215
|
interface Change {
|
|
204
216
|
/** The type of the change. Possible values are `file` and `drive`. */
|
|
205
217
|
changeType?: string;
|
|
@@ -256,6 +268,12 @@ declare namespace gapi.client {
|
|
|
256
268
|
/** The type of delivery mechanism used for this channel. Valid values are "web_hook" or "webhook". */
|
|
257
269
|
type?: string;
|
|
258
270
|
}
|
|
271
|
+
interface ClientEncryptionDetails {
|
|
272
|
+
/** The metadata used for client-side operations. */
|
|
273
|
+
decryptionMetadata?: DecryptionMetadata;
|
|
274
|
+
/** The encryption state of the file. The values expected here are: - encrypted - unencrypted */
|
|
275
|
+
encryptionState?: string;
|
|
276
|
+
}
|
|
259
277
|
interface Comment {
|
|
260
278
|
/** 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). */
|
|
261
279
|
anchor?: string;
|
|
@@ -291,6 +309,10 @@ declare namespace gapi.client {
|
|
|
291
309
|
/** Output only. Whether the comment has been resolved by one of its replies. */
|
|
292
310
|
resolved?: boolean;
|
|
293
311
|
}
|
|
312
|
+
interface CommentApprovalRequest {
|
|
313
|
+
/** Required. A message to comment on the approval. This message is included in notifications for the action and in the approval activity log. */
|
|
314
|
+
message?: string;
|
|
315
|
+
}
|
|
294
316
|
interface CommentList {
|
|
295
317
|
/** The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */
|
|
296
318
|
comments?: Comment[];
|
|
@@ -315,10 +337,30 @@ declare namespace gapi.client {
|
|
|
315
337
|
/** Output only. The type of the content restriction. Currently the only possible value is `globalContentRestriction`. */
|
|
316
338
|
type?: string;
|
|
317
339
|
}
|
|
340
|
+
interface DeclineApprovalRequest {
|
|
341
|
+
/** Optional. A message to accompany the reviewer response on the approval. This message is included in notifications for the action and in the approval activity log. */
|
|
342
|
+
message?: string;
|
|
343
|
+
}
|
|
344
|
+
interface DecryptionMetadata {
|
|
345
|
+
/** Chunk size used if content was encrypted with the AES 256 GCM Cipher. Possible values are: - default - small */
|
|
346
|
+
aes256GcmChunkSize?: string;
|
|
347
|
+
/** 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 */
|
|
348
|
+
encryptionResourceKeyHash?: string;
|
|
349
|
+
/** 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. */
|
|
350
|
+
jwt?: string;
|
|
351
|
+
/** The ID of the KACLS (Key ACL Service) used to encrypt the file. */
|
|
352
|
+
kaclsId?: string;
|
|
353
|
+
/** The name of the KACLS (Key ACL Service) used to encrypt the file. */
|
|
354
|
+
kaclsName?: string;
|
|
355
|
+
/** Key format for the unwrapped key. Must be `tinkAesGcmKey`. */
|
|
356
|
+
keyFormat?: string;
|
|
357
|
+
/** The URL-safe Base64 encoded wrapped key used to encrypt the contents of the file. */
|
|
358
|
+
wrappedKey?: string;
|
|
359
|
+
}
|
|
318
360
|
interface DownloadRestriction {
|
|
319
361
|
/** Whether download and copy is restricted for readers. */
|
|
320
362
|
restrictedForReaders?: boolean;
|
|
321
|
-
/** Whether download and copy is restricted for writers. If
|
|
363
|
+
/** Whether download and copy is restricted for writers. If true, download is also restricted for readers. */
|
|
322
364
|
restrictedForWriters?: boolean;
|
|
323
365
|
}
|
|
324
366
|
interface DownloadRestrictionsMetadata {
|
|
@@ -516,6 +558,8 @@ declare namespace gapi.client {
|
|
|
516
558
|
canRename?: boolean;
|
|
517
559
|
/** Output only. Whether the current user can modify the sharing settings for this file. */
|
|
518
560
|
canShare?: boolean;
|
|
561
|
+
/** Whether the current user can start an approval on the file. */
|
|
562
|
+
canStartApproval?: boolean;
|
|
519
563
|
/** Output only. Whether the current user can move this file to trash. */
|
|
520
564
|
canTrash?: boolean;
|
|
521
565
|
/** Output only. Whether the current user can trash children of this folder. This is `false` when the item isn't a folder. Only populated for items in shared drives. */
|
|
@@ -523,6 +567,8 @@ declare namespace gapi.client {
|
|
|
523
567
|
/** Output only. Whether the current user can restore this file from trash. */
|
|
524
568
|
canUntrash?: boolean;
|
|
525
569
|
};
|
|
570
|
+
/** 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. */
|
|
571
|
+
clientEncryptionDetails?: ClientEncryptionDetails;
|
|
526
572
|
/** Additional information about the content of the file. These fields are never populated in responses. */
|
|
527
573
|
contentHints?: {
|
|
528
574
|
/** Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and may contain HTML elements. */
|
|
@@ -625,7 +671,7 @@ declare namespace gapi.client {
|
|
|
625
671
|
isAppAuthorized?: boolean;
|
|
626
672
|
/** Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#file"`. */
|
|
627
673
|
kind?: string;
|
|
628
|
-
/**
|
|
674
|
+
/** Label information on the file. */
|
|
629
675
|
labelInfo?: {
|
|
630
676
|
/** Output only. The set of labels on the file as requested by the label IDs in the `includeLabels` parameter. By default, no labels are returned. */
|
|
631
677
|
labels?: Label[];
|
|
@@ -682,7 +728,7 @@ declare namespace gapi.client {
|
|
|
682
728
|
sharedWithMeTime?: string;
|
|
683
729
|
/** Output only. The user who shared the file with the requesting user, if applicable. */
|
|
684
730
|
sharingUser?: User;
|
|
685
|
-
/**
|
|
731
|
+
/** Information about a shortcut file. */
|
|
686
732
|
shortcutDetails?: {
|
|
687
733
|
/** The ID of the file that this shortcut points to. Can only be set on `files.create` requests. */
|
|
688
734
|
targetId?: string;
|
|
@@ -703,7 +749,7 @@ declare namespace gapi.client {
|
|
|
703
749
|
thumbnailLink?: string;
|
|
704
750
|
/** Output only. The thumbnail version for use in thumbnail cache invalidation. */
|
|
705
751
|
thumbnailVersion?: string;
|
|
706
|
-
/** Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file,
|
|
752
|
+
/** Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, but other users can still access the file in the owner's trash until it's permanently deleted. */
|
|
707
753
|
trashed?: boolean;
|
|
708
754
|
/** The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. */
|
|
709
755
|
trashedTime?: string;
|
|
@@ -743,6 +789,18 @@ declare namespace gapi.client {
|
|
|
743
789
|
/** The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ. */
|
|
744
790
|
nextPageToken?: string;
|
|
745
791
|
}
|
|
792
|
+
interface GenerateCseTokenResponse {
|
|
793
|
+
/** The current Key ACL Service (KACLS) ID associated with the JWT. */
|
|
794
|
+
currentKaclsId?: string;
|
|
795
|
+
/** Name of the KACLs that the returned KACLs ID points to. */
|
|
796
|
+
currentKaclsName?: string;
|
|
797
|
+
/** The fileId for which the JWT was generated. */
|
|
798
|
+
fileId?: string;
|
|
799
|
+
/** The signed JSON Web Token (JWT) for the file. */
|
|
800
|
+
jwt?: string;
|
|
801
|
+
/** Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#generateCseTokenResponse"`. */
|
|
802
|
+
kind?: string;
|
|
803
|
+
}
|
|
746
804
|
interface GeneratedIds {
|
|
747
805
|
/** The IDs generated for the requesting user in the specified space. */
|
|
748
806
|
ids?: string[];
|
|
@@ -852,9 +910,9 @@ declare namespace gapi.client {
|
|
|
852
910
|
deleted?: boolean;
|
|
853
911
|
/** Output only. The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: * `user` - User's full name, as defined for their Google Account, such as "Dana A." * `group` - Name of the Google Group, such as "The Company Administrators." * `domain` - String domain name, such as "cymbalgroup.com." * `anyone` - No `displayName` is present. */
|
|
854
912
|
displayName?: string;
|
|
855
|
-
/** The domain to which this permission refers. */
|
|
913
|
+
/** Output only. The domain to which this permission refers. */
|
|
856
914
|
domain?: string;
|
|
857
|
-
/** The email address of the user or group to which this permission refers. */
|
|
915
|
+
/** Output only. The email address of the user or group to which this permission refers. */
|
|
858
916
|
emailAddress?: string;
|
|
859
917
|
/** The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They can only be set on user and group permissions - The time must be in the future - The time cannot be more than a year in the future */
|
|
860
918
|
expirationTime?: string;
|
|
@@ -867,7 +925,7 @@ declare namespace gapi.client {
|
|
|
867
925
|
/** Whether the account associated with this permission is a pending owner. Only populated for permissions of type `user` for files that aren't in a shared drive. */
|
|
868
926
|
pendingOwner?: boolean;
|
|
869
927
|
/** Output only. Details of whether the permissions on this item are inherited or are directly on this item. */
|
|
870
|
-
permissionDetails?:
|
|
928
|
+
permissionDetails?: {
|
|
871
929
|
/** Output only. Whether this permission is inherited. This field is always populated. This is an output-only field. */
|
|
872
930
|
inherited?: boolean;
|
|
873
931
|
/** Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives. */
|
|
@@ -876,13 +934,13 @@ declare namespace gapi.client {
|
|
|
876
934
|
permissionType?: string;
|
|
877
935
|
/** Output only. The primary role for this user. Supported values include: * `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader` For more information, see [Roles and permissions](https://developers.google.com/workspace/drive/api/guides/ref-roles). */
|
|
878
936
|
role?: string;
|
|
879
|
-
}
|
|
937
|
+
}[];
|
|
880
938
|
/** Output only. A link to the user's profile photo, if available. */
|
|
881
939
|
photoLink?: string;
|
|
882
940
|
/** The role granted by this permission. Supported values include: * `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader` For more information, see [Roles and permissions](https://developers.google.com/workspace/drive/api/guides/ref-roles). */
|
|
883
941
|
role?: string;
|
|
884
942
|
/** Output only. Deprecated: Output only. Use `permissionDetails` instead. */
|
|
885
|
-
teamDrivePermissionDetails?:
|
|
943
|
+
teamDrivePermissionDetails?: {
|
|
886
944
|
/** Deprecated: Output only. Use `permissionDetails/inherited` instead. */
|
|
887
945
|
inherited?: boolean;
|
|
888
946
|
/** Deprecated: Output only. Use `permissionDetails/inheritedFrom` instead. */
|
|
@@ -891,7 +949,7 @@ declare namespace gapi.client {
|
|
|
891
949
|
role?: string;
|
|
892
950
|
/** Deprecated: Output only. Use `permissionDetails/permissionType` instead. */
|
|
893
951
|
teamDrivePermissionType?: string;
|
|
894
|
-
}
|
|
952
|
+
}[];
|
|
895
953
|
/** The type of the grantee. Supported values include: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. If `type` is `domain`, you must provide a `domain`. If `type` is `anyone`, no extra information is required. */
|
|
896
954
|
type?: string;
|
|
897
955
|
/** Indicates the view for this permission. Only populated for permissions that belong to a view. The only supported values are `published` and `metadata`: * `published`: The permission's role is `publishedReader`. * `metadata`: The item is only visible to the `metadata` view because the item has limited access and the scope has at least read access to the parent. The `metadata` view is only supported on folders. For more information, see [Views](https://developers.google.com/workspace/drive/api/guides/ref-roles#views). */
|
|
@@ -905,6 +963,20 @@ declare namespace gapi.client {
|
|
|
905
963
|
/** The list of permissions. If `nextPageToken` is populated, then this list may be incomplete and an additional page of results should be fetched. */
|
|
906
964
|
permissions?: Permission[];
|
|
907
965
|
}
|
|
966
|
+
interface ReassignApprovalRequest {
|
|
967
|
+
/** Optional. The list of reviewers to add. */
|
|
968
|
+
addReviewers?: AddReviewer[];
|
|
969
|
+
/** Optional. A message to send to the new reviewers. This message is included in notifications for the action and in the approval activity log. */
|
|
970
|
+
message?: string;
|
|
971
|
+
/** Optional. The list of reviewer replacements. */
|
|
972
|
+
replaceReviewers?: ReplaceReviewer[];
|
|
973
|
+
}
|
|
974
|
+
interface ReplaceReviewer {
|
|
975
|
+
/** Required. The email of the reviewer to add. */
|
|
976
|
+
addedReviewerEmail?: string;
|
|
977
|
+
/** Required. The email of the reviewer to remove. */
|
|
978
|
+
removedReviewerEmail?: string;
|
|
979
|
+
}
|
|
908
980
|
interface Reply {
|
|
909
981
|
/** The action the reply performed to the parent comment. The supported values are: * `resolve` * `reopen` */
|
|
910
982
|
action?: string;
|
|
@@ -950,13 +1022,13 @@ declare namespace gapi.client {
|
|
|
950
1022
|
interface ReviewerResponse {
|
|
951
1023
|
/** This is always drive#reviewerResponse. */
|
|
952
1024
|
kind?: string;
|
|
953
|
-
/** A
|
|
1025
|
+
/** A reviewer’s response for the approval. */
|
|
954
1026
|
response?:
|
|
955
1027
|
| 'RESPONSE_UNSPECIFIED'
|
|
956
1028
|
| 'NO_RESPONSE'
|
|
957
1029
|
| 'APPROVED'
|
|
958
1030
|
| 'DECLINED';
|
|
959
|
-
/** The user that
|
|
1031
|
+
/** The user that's responsible for this response. */
|
|
960
1032
|
reviewer?: User;
|
|
961
1033
|
}
|
|
962
1034
|
interface Revision {
|
|
@@ -997,6 +1069,16 @@ declare namespace gapi.client {
|
|
|
997
1069
|
/** The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */
|
|
998
1070
|
revisions?: Revision[];
|
|
999
1071
|
}
|
|
1072
|
+
interface StartApprovalRequest {
|
|
1073
|
+
/** Optional. The time that the approval is due. */
|
|
1074
|
+
dueTime?: string;
|
|
1075
|
+
/** Optional. Whether to lock the file when starting the approval. */
|
|
1076
|
+
lockFile?: boolean;
|
|
1077
|
+
/** Optional. A message to send to reviewers when notifying them of the approval request. */
|
|
1078
|
+
message?: string;
|
|
1079
|
+
/** Required. The emails of the users who are set to review the approval. */
|
|
1080
|
+
reviewerEmails?: string[];
|
|
1081
|
+
}
|
|
1000
1082
|
interface StartPageToken {
|
|
1001
1083
|
/** Identifies what kind of resource this is. Value: the fixed string `"drive#startPageToken"`. */
|
|
1002
1084
|
kind?: string;
|
|
@@ -1007,12 +1089,12 @@ declare namespace gapi.client {
|
|
|
1007
1089
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
1008
1090
|
code?: number;
|
|
1009
1091
|
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
1010
|
-
details?:
|
|
1092
|
+
details?: {[P in string]: any}[];
|
|
1011
1093
|
/** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
|
|
1012
1094
|
message?: string;
|
|
1013
1095
|
}
|
|
1014
1096
|
interface TeamDrive {
|
|
1015
|
-
/**
|
|
1097
|
+
/** The background image file for a Team Drive. */
|
|
1016
1098
|
backgroundImageFile?: {
|
|
1017
1099
|
/** The ID of an image file in Drive to use for the background image. */
|
|
1018
1100
|
id?: string;
|
|
@@ -1033,7 +1115,7 @@ declare namespace gapi.client {
|
|
|
1033
1115
|
canChangeCopyRequiresWriterPermissionRestriction?: boolean;
|
|
1034
1116
|
/** Whether the current user can change the `domainUsersOnly` restriction of this Team Drive. */
|
|
1035
1117
|
canChangeDomainUsersOnlyRestriction?: boolean;
|
|
1036
|
-
/** Whether the current user can change organizer-applied download restrictions of this shared drive. */
|
|
1118
|
+
/** Output only. Whether the current user can change organizer-applied download restrictions of this shared drive. */
|
|
1037
1119
|
canChangeDownloadRestriction?: boolean;
|
|
1038
1120
|
/** Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive. */
|
|
1039
1121
|
canChangeSharingFoldersRequiresOrganizerPermissionRestriction?: boolean;
|
|
@@ -1276,7 +1358,255 @@ declare namespace gapi.client {
|
|
|
1276
1358
|
): Request<void>;
|
|
1277
1359
|
}
|
|
1278
1360
|
interface ApprovalsResource {
|
|
1279
|
-
/**
|
|
1361
|
+
/** Approves an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update the ReviewerResponse of the requesting user with a Response of `APPROVED`. If this is the last required reviewer response, this also completes the approval and sets the approval Status to `APPROVED`. */
|
|
1362
|
+
approve(request: {
|
|
1363
|
+
/** V1 error format. */
|
|
1364
|
+
'$.xgafv'?: '1' | '2';
|
|
1365
|
+
/** OAuth access token. */
|
|
1366
|
+
access_token?: string;
|
|
1367
|
+
/** Data format for response. */
|
|
1368
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1369
|
+
/** Required. The ID of the approval to approve. */
|
|
1370
|
+
approvalId: string;
|
|
1371
|
+
/** JSONP */
|
|
1372
|
+
callback?: string;
|
|
1373
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1374
|
+
fields?: string;
|
|
1375
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1376
|
+
fileId: string;
|
|
1377
|
+
/** 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. */
|
|
1378
|
+
key?: string;
|
|
1379
|
+
/** OAuth 2.0 token for the current user. */
|
|
1380
|
+
oauth_token?: string;
|
|
1381
|
+
/** Returns response with indentations and line breaks. */
|
|
1382
|
+
prettyPrint?: boolean;
|
|
1383
|
+
/** 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. */
|
|
1384
|
+
quotaUser?: string;
|
|
1385
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1386
|
+
upload_protocol?: string;
|
|
1387
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1388
|
+
uploadType?: string;
|
|
1389
|
+
/** Request body */
|
|
1390
|
+
resource: ApproveApprovalRequest;
|
|
1391
|
+
}): Request<Approval>;
|
|
1392
|
+
approve(
|
|
1393
|
+
request: {
|
|
1394
|
+
/** V1 error format. */
|
|
1395
|
+
'$.xgafv'?: '1' | '2';
|
|
1396
|
+
/** OAuth access token. */
|
|
1397
|
+
access_token?: string;
|
|
1398
|
+
/** Data format for response. */
|
|
1399
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1400
|
+
/** Required. The ID of the approval to approve. */
|
|
1401
|
+
approvalId: string;
|
|
1402
|
+
/** JSONP */
|
|
1403
|
+
callback?: string;
|
|
1404
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1405
|
+
fields?: string;
|
|
1406
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1407
|
+
fileId: string;
|
|
1408
|
+
/** 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. */
|
|
1409
|
+
key?: string;
|
|
1410
|
+
/** OAuth 2.0 token for the current user. */
|
|
1411
|
+
oauth_token?: string;
|
|
1412
|
+
/** Returns response with indentations and line breaks. */
|
|
1413
|
+
prettyPrint?: boolean;
|
|
1414
|
+
/** 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. */
|
|
1415
|
+
quotaUser?: string;
|
|
1416
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1417
|
+
upload_protocol?: string;
|
|
1418
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1419
|
+
uploadType?: string;
|
|
1420
|
+
},
|
|
1421
|
+
body: ApproveApprovalRequest,
|
|
1422
|
+
): Request<Approval>;
|
|
1423
|
+
/** Cancels an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Updates the approval Status to `CANCELLED`. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS`. */
|
|
1424
|
+
cancel(request: {
|
|
1425
|
+
/** V1 error format. */
|
|
1426
|
+
'$.xgafv'?: '1' | '2';
|
|
1427
|
+
/** OAuth access token. */
|
|
1428
|
+
access_token?: string;
|
|
1429
|
+
/** Data format for response. */
|
|
1430
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1431
|
+
/** Required. The ID of the approval to cancel. */
|
|
1432
|
+
approvalId: string;
|
|
1433
|
+
/** JSONP */
|
|
1434
|
+
callback?: string;
|
|
1435
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1436
|
+
fields?: string;
|
|
1437
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1438
|
+
fileId: string;
|
|
1439
|
+
/** 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. */
|
|
1440
|
+
key?: string;
|
|
1441
|
+
/** OAuth 2.0 token for the current user. */
|
|
1442
|
+
oauth_token?: string;
|
|
1443
|
+
/** Returns response with indentations and line breaks. */
|
|
1444
|
+
prettyPrint?: boolean;
|
|
1445
|
+
/** 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. */
|
|
1446
|
+
quotaUser?: string;
|
|
1447
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1448
|
+
upload_protocol?: string;
|
|
1449
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1450
|
+
uploadType?: string;
|
|
1451
|
+
/** Request body */
|
|
1452
|
+
resource: CancelApprovalRequest;
|
|
1453
|
+
}): Request<Approval>;
|
|
1454
|
+
cancel(
|
|
1455
|
+
request: {
|
|
1456
|
+
/** V1 error format. */
|
|
1457
|
+
'$.xgafv'?: '1' | '2';
|
|
1458
|
+
/** OAuth access token. */
|
|
1459
|
+
access_token?: string;
|
|
1460
|
+
/** Data format for response. */
|
|
1461
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1462
|
+
/** Required. The ID of the approval to cancel. */
|
|
1463
|
+
approvalId: string;
|
|
1464
|
+
/** JSONP */
|
|
1465
|
+
callback?: string;
|
|
1466
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1467
|
+
fields?: string;
|
|
1468
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1469
|
+
fileId: string;
|
|
1470
|
+
/** 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. */
|
|
1471
|
+
key?: string;
|
|
1472
|
+
/** OAuth 2.0 token for the current user. */
|
|
1473
|
+
oauth_token?: string;
|
|
1474
|
+
/** Returns response with indentations and line breaks. */
|
|
1475
|
+
prettyPrint?: boolean;
|
|
1476
|
+
/** 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. */
|
|
1477
|
+
quotaUser?: string;
|
|
1478
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1479
|
+
upload_protocol?: string;
|
|
1480
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1481
|
+
uploadType?: string;
|
|
1482
|
+
},
|
|
1483
|
+
body: CancelApprovalRequest,
|
|
1484
|
+
): Request<Approval>;
|
|
1485
|
+
/** Comments on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This sends a notification to both the initiator and the reviewers. Additionally, a message is also added to the approval activity log. */
|
|
1486
|
+
comment(request: {
|
|
1487
|
+
/** V1 error format. */
|
|
1488
|
+
'$.xgafv'?: '1' | '2';
|
|
1489
|
+
/** OAuth access token. */
|
|
1490
|
+
access_token?: string;
|
|
1491
|
+
/** Data format for response. */
|
|
1492
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1493
|
+
/** Required. The ID of the approval to comment on. */
|
|
1494
|
+
approvalId: string;
|
|
1495
|
+
/** JSONP */
|
|
1496
|
+
callback?: string;
|
|
1497
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1498
|
+
fields?: string;
|
|
1499
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1500
|
+
fileId: string;
|
|
1501
|
+
/** 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. */
|
|
1502
|
+
key?: string;
|
|
1503
|
+
/** OAuth 2.0 token for the current user. */
|
|
1504
|
+
oauth_token?: string;
|
|
1505
|
+
/** Returns response with indentations and line breaks. */
|
|
1506
|
+
prettyPrint?: boolean;
|
|
1507
|
+
/** 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. */
|
|
1508
|
+
quotaUser?: string;
|
|
1509
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1510
|
+
upload_protocol?: string;
|
|
1511
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1512
|
+
uploadType?: string;
|
|
1513
|
+
/** Request body */
|
|
1514
|
+
resource: CommentApprovalRequest;
|
|
1515
|
+
}): Request<Approval>;
|
|
1516
|
+
comment(
|
|
1517
|
+
request: {
|
|
1518
|
+
/** V1 error format. */
|
|
1519
|
+
'$.xgafv'?: '1' | '2';
|
|
1520
|
+
/** OAuth access token. */
|
|
1521
|
+
access_token?: string;
|
|
1522
|
+
/** Data format for response. */
|
|
1523
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1524
|
+
/** Required. The ID of the approval to comment on. */
|
|
1525
|
+
approvalId: string;
|
|
1526
|
+
/** JSONP */
|
|
1527
|
+
callback?: string;
|
|
1528
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1529
|
+
fields?: string;
|
|
1530
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1531
|
+
fileId: string;
|
|
1532
|
+
/** 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. */
|
|
1533
|
+
key?: string;
|
|
1534
|
+
/** OAuth 2.0 token for the current user. */
|
|
1535
|
+
oauth_token?: string;
|
|
1536
|
+
/** Returns response with indentations and line breaks. */
|
|
1537
|
+
prettyPrint?: boolean;
|
|
1538
|
+
/** 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. */
|
|
1539
|
+
quotaUser?: string;
|
|
1540
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1541
|
+
upload_protocol?: string;
|
|
1542
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1543
|
+
uploadType?: string;
|
|
1544
|
+
},
|
|
1545
|
+
body: CommentApprovalRequest,
|
|
1546
|
+
): Request<Approval>;
|
|
1547
|
+
/** Declines an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update the ReviewerResponse of the requesting user with a Response of `DECLINED`. This also completes the approval and sets the approval Status to `DECLINED`. */
|
|
1548
|
+
decline(request: {
|
|
1549
|
+
/** V1 error format. */
|
|
1550
|
+
'$.xgafv'?: '1' | '2';
|
|
1551
|
+
/** OAuth access token. */
|
|
1552
|
+
access_token?: string;
|
|
1553
|
+
/** Data format for response. */
|
|
1554
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1555
|
+
/** Required. The ID of the approval to decline. */
|
|
1556
|
+
approvalId: string;
|
|
1557
|
+
/** JSONP */
|
|
1558
|
+
callback?: string;
|
|
1559
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1560
|
+
fields?: string;
|
|
1561
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1562
|
+
fileId: string;
|
|
1563
|
+
/** 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. */
|
|
1564
|
+
key?: string;
|
|
1565
|
+
/** OAuth 2.0 token for the current user. */
|
|
1566
|
+
oauth_token?: string;
|
|
1567
|
+
/** Returns response with indentations and line breaks. */
|
|
1568
|
+
prettyPrint?: boolean;
|
|
1569
|
+
/** 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. */
|
|
1570
|
+
quotaUser?: string;
|
|
1571
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1572
|
+
upload_protocol?: string;
|
|
1573
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1574
|
+
uploadType?: string;
|
|
1575
|
+
/** Request body */
|
|
1576
|
+
resource: DeclineApprovalRequest;
|
|
1577
|
+
}): Request<Approval>;
|
|
1578
|
+
decline(
|
|
1579
|
+
request: {
|
|
1580
|
+
/** V1 error format. */
|
|
1581
|
+
'$.xgafv'?: '1' | '2';
|
|
1582
|
+
/** OAuth access token. */
|
|
1583
|
+
access_token?: string;
|
|
1584
|
+
/** Data format for response. */
|
|
1585
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1586
|
+
/** Required. The ID of the approval to decline. */
|
|
1587
|
+
approvalId: string;
|
|
1588
|
+
/** JSONP */
|
|
1589
|
+
callback?: string;
|
|
1590
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1591
|
+
fields?: string;
|
|
1592
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1593
|
+
fileId: string;
|
|
1594
|
+
/** 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. */
|
|
1595
|
+
key?: string;
|
|
1596
|
+
/** OAuth 2.0 token for the current user. */
|
|
1597
|
+
oauth_token?: string;
|
|
1598
|
+
/** Returns response with indentations and line breaks. */
|
|
1599
|
+
prettyPrint?: boolean;
|
|
1600
|
+
/** 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. */
|
|
1601
|
+
quotaUser?: string;
|
|
1602
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1603
|
+
upload_protocol?: string;
|
|
1604
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1605
|
+
uploadType?: string;
|
|
1606
|
+
},
|
|
1607
|
+
body: DeclineApprovalRequest,
|
|
1608
|
+
): Request<Approval>;
|
|
1609
|
+
/** Gets an approval by ID. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). */
|
|
1280
1610
|
get(request?: {
|
|
1281
1611
|
/** V1 error format. */
|
|
1282
1612
|
'$.xgafv'?: '1' | '2';
|
|
@@ -1284,13 +1614,13 @@ declare namespace gapi.client {
|
|
|
1284
1614
|
access_token?: string;
|
|
1285
1615
|
/** Data format for response. */
|
|
1286
1616
|
alt?: 'json' | 'media' | 'proto';
|
|
1287
|
-
/** Required. The ID of the
|
|
1617
|
+
/** Required. The ID of the approval. */
|
|
1288
1618
|
approvalId: string;
|
|
1289
1619
|
/** JSONP */
|
|
1290
1620
|
callback?: string;
|
|
1291
1621
|
/** Selector specifying which fields to include in a partial response. */
|
|
1292
1622
|
fields?: string;
|
|
1293
|
-
/** Required. The ID of the file the
|
|
1623
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1294
1624
|
fileId: string;
|
|
1295
1625
|
/** 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. */
|
|
1296
1626
|
key?: string;
|
|
@@ -1305,7 +1635,7 @@ declare namespace gapi.client {
|
|
|
1305
1635
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1306
1636
|
uploadType?: string;
|
|
1307
1637
|
}): Request<Approval>;
|
|
1308
|
-
/** Lists the
|
|
1638
|
+
/** Lists the approvals on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). */
|
|
1309
1639
|
list(request?: {
|
|
1310
1640
|
/** V1 error format. */
|
|
1311
1641
|
'$.xgafv'?: '1' | '2';
|
|
@@ -1317,15 +1647,15 @@ declare namespace gapi.client {
|
|
|
1317
1647
|
callback?: string;
|
|
1318
1648
|
/** Selector specifying which fields to include in a partial response. */
|
|
1319
1649
|
fields?: string;
|
|
1320
|
-
/** Required. The ID of the file the
|
|
1650
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1321
1651
|
fileId: string;
|
|
1322
1652
|
/** 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. */
|
|
1323
1653
|
key?: string;
|
|
1324
1654
|
/** OAuth 2.0 token for the current user. */
|
|
1325
1655
|
oauth_token?: string;
|
|
1326
|
-
/** The maximum number of
|
|
1656
|
+
/** The maximum number of approvals to return. When not set, at most 100 approvals are returned. */
|
|
1327
1657
|
pageSize?: number;
|
|
1328
|
-
/** The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from a previous response. */
|
|
1658
|
+
/** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. */
|
|
1329
1659
|
pageToken?: string;
|
|
1330
1660
|
/** Returns response with indentations and line breaks. */
|
|
1331
1661
|
prettyPrint?: boolean;
|
|
@@ -1336,6 +1666,126 @@ declare namespace gapi.client {
|
|
|
1336
1666
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1337
1667
|
uploadType?: string;
|
|
1338
1668
|
}): Request<ApprovalList>;
|
|
1669
|
+
/** Reassigns the reviewers on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Adds or replaces reviewers in the ReviewerResponse of the approval. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS` and the Response for the reviewer being reassigned is `NO_RESPONSE`. A user with the `reader` permission can only reassign an approval that's assigned to themselves. Removing a reviewer isn't allowed. */
|
|
1670
|
+
reassign(request: {
|
|
1671
|
+
/** V1 error format. */
|
|
1672
|
+
'$.xgafv'?: '1' | '2';
|
|
1673
|
+
/** OAuth access token. */
|
|
1674
|
+
access_token?: string;
|
|
1675
|
+
/** Data format for response. */
|
|
1676
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1677
|
+
/** Required. The ID of the approval to reassign. */
|
|
1678
|
+
approvalId: string;
|
|
1679
|
+
/** JSONP */
|
|
1680
|
+
callback?: string;
|
|
1681
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1682
|
+
fields?: string;
|
|
1683
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1684
|
+
fileId: string;
|
|
1685
|
+
/** 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. */
|
|
1686
|
+
key?: string;
|
|
1687
|
+
/** OAuth 2.0 token for the current user. */
|
|
1688
|
+
oauth_token?: string;
|
|
1689
|
+
/** Returns response with indentations and line breaks. */
|
|
1690
|
+
prettyPrint?: boolean;
|
|
1691
|
+
/** 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. */
|
|
1692
|
+
quotaUser?: string;
|
|
1693
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1694
|
+
upload_protocol?: string;
|
|
1695
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1696
|
+
uploadType?: string;
|
|
1697
|
+
/** Request body */
|
|
1698
|
+
resource: ReassignApprovalRequest;
|
|
1699
|
+
}): Request<Approval>;
|
|
1700
|
+
reassign(
|
|
1701
|
+
request: {
|
|
1702
|
+
/** V1 error format. */
|
|
1703
|
+
'$.xgafv'?: '1' | '2';
|
|
1704
|
+
/** OAuth access token. */
|
|
1705
|
+
access_token?: string;
|
|
1706
|
+
/** Data format for response. */
|
|
1707
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1708
|
+
/** Required. The ID of the approval to reassign. */
|
|
1709
|
+
approvalId: string;
|
|
1710
|
+
/** JSONP */
|
|
1711
|
+
callback?: string;
|
|
1712
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1713
|
+
fields?: string;
|
|
1714
|
+
/** Required. The ID of the file that the approval is on. */
|
|
1715
|
+
fileId: string;
|
|
1716
|
+
/** 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. */
|
|
1717
|
+
key?: string;
|
|
1718
|
+
/** OAuth 2.0 token for the current user. */
|
|
1719
|
+
oauth_token?: string;
|
|
1720
|
+
/** Returns response with indentations and line breaks. */
|
|
1721
|
+
prettyPrint?: boolean;
|
|
1722
|
+
/** 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. */
|
|
1723
|
+
quotaUser?: string;
|
|
1724
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1725
|
+
upload_protocol?: string;
|
|
1726
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1727
|
+
uploadType?: string;
|
|
1728
|
+
},
|
|
1729
|
+
body: ReassignApprovalRequest,
|
|
1730
|
+
): Request<Approval>;
|
|
1731
|
+
/** Starts an approval on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). */
|
|
1732
|
+
start(request: {
|
|
1733
|
+
/** V1 error format. */
|
|
1734
|
+
'$.xgafv'?: '1' | '2';
|
|
1735
|
+
/** OAuth access token. */
|
|
1736
|
+
access_token?: string;
|
|
1737
|
+
/** Data format for response. */
|
|
1738
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1739
|
+
/** JSONP */
|
|
1740
|
+
callback?: string;
|
|
1741
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1742
|
+
fields?: string;
|
|
1743
|
+
/** Required. The ID of the file that the approval is created on. */
|
|
1744
|
+
fileId: string;
|
|
1745
|
+
/** 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. */
|
|
1746
|
+
key?: string;
|
|
1747
|
+
/** OAuth 2.0 token for the current user. */
|
|
1748
|
+
oauth_token?: string;
|
|
1749
|
+
/** Returns response with indentations and line breaks. */
|
|
1750
|
+
prettyPrint?: boolean;
|
|
1751
|
+
/** 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. */
|
|
1752
|
+
quotaUser?: string;
|
|
1753
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1754
|
+
upload_protocol?: string;
|
|
1755
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1756
|
+
uploadType?: string;
|
|
1757
|
+
/** Request body */
|
|
1758
|
+
resource: StartApprovalRequest;
|
|
1759
|
+
}): Request<Approval>;
|
|
1760
|
+
start(
|
|
1761
|
+
request: {
|
|
1762
|
+
/** V1 error format. */
|
|
1763
|
+
'$.xgafv'?: '1' | '2';
|
|
1764
|
+
/** OAuth access token. */
|
|
1765
|
+
access_token?: string;
|
|
1766
|
+
/** Data format for response. */
|
|
1767
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1768
|
+
/** JSONP */
|
|
1769
|
+
callback?: string;
|
|
1770
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1771
|
+
fields?: string;
|
|
1772
|
+
/** Required. The ID of the file that the approval is created on. */
|
|
1773
|
+
fileId: string;
|
|
1774
|
+
/** 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. */
|
|
1775
|
+
key?: string;
|
|
1776
|
+
/** OAuth 2.0 token for the current user. */
|
|
1777
|
+
oauth_token?: string;
|
|
1778
|
+
/** Returns response with indentations and line breaks. */
|
|
1779
|
+
prettyPrint?: boolean;
|
|
1780
|
+
/** 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. */
|
|
1781
|
+
quotaUser?: string;
|
|
1782
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1783
|
+
upload_protocol?: string;
|
|
1784
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1785
|
+
uploadType?: string;
|
|
1786
|
+
},
|
|
1787
|
+
body: StartApprovalRequest,
|
|
1788
|
+
): Request<Approval>;
|
|
1339
1789
|
}
|
|
1340
1790
|
interface AppsResource {
|
|
1341
1791
|
/** Gets a specific app. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). */
|
|
@@ -2014,7 +2464,7 @@ declare namespace gapi.client {
|
|
|
2014
2464
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2015
2465
|
uploadType?: string;
|
|
2016
2466
|
}): Request<Drive>;
|
|
2017
|
-
/** 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. */
|
|
2467
|
+
/** 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. */
|
|
2018
2468
|
list(request?: {
|
|
2019
2469
|
/** V1 error format. */
|
|
2020
2470
|
'$.xgafv'?: '1' | '2';
|
|
@@ -2228,7 +2678,7 @@ declare namespace gapi.client {
|
|
|
2228
2678
|
},
|
|
2229
2679
|
body: File,
|
|
2230
2680
|
): Request<File>;
|
|
2231
|
-
/** Creates a file. For more information, see [Create and manage files](/workspace/drive/api/guides/create-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:* `*/*` (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). Apps creating shortcuts with the `create` method must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `name` 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 name. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type. */
|
|
2681
|
+
/** Creates a file. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-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:* `*/*` (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). Apps creating shortcuts with the `create` method must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `name` 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 name. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type. */
|
|
2232
2682
|
create(request: {
|
|
2233
2683
|
/** V1 error format. */
|
|
2234
2684
|
'$.xgafv'?: '1' | '2';
|
|
@@ -2440,6 +2890,35 @@ declare namespace gapi.client {
|
|
|
2440
2890
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2441
2891
|
uploadType?: string;
|
|
2442
2892
|
}): Request<void>;
|
|
2893
|
+
/** Generates a CSE token which can be used to create or update CSE files. */
|
|
2894
|
+
generateCseToken(request?: {
|
|
2895
|
+
/** V1 error format. */
|
|
2896
|
+
'$.xgafv'?: '1' | '2';
|
|
2897
|
+
/** OAuth access token. */
|
|
2898
|
+
access_token?: string;
|
|
2899
|
+
/** Data format for response. */
|
|
2900
|
+
alt?: 'json' | 'media' | 'proto';
|
|
2901
|
+
/** JSONP */
|
|
2902
|
+
callback?: string;
|
|
2903
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2904
|
+
fields?: string;
|
|
2905
|
+
/** The ID of the file for which the JWT should be generated. If not provided, an id will be generated. */
|
|
2906
|
+
fileId?: string;
|
|
2907
|
+
/** 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. */
|
|
2908
|
+
key?: string;
|
|
2909
|
+
/** OAuth 2.0 token for the current user. */
|
|
2910
|
+
oauth_token?: string;
|
|
2911
|
+
/** 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. */
|
|
2912
|
+
parent?: string;
|
|
2913
|
+
/** Returns response with indentations and line breaks. */
|
|
2914
|
+
prettyPrint?: boolean;
|
|
2915
|
+
/** 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. */
|
|
2916
|
+
quotaUser?: string;
|
|
2917
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2918
|
+
upload_protocol?: string;
|
|
2919
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2920
|
+
uploadType?: string;
|
|
2921
|
+
}): Request<GenerateCseTokenResponse>;
|
|
2443
2922
|
/** Generates a set of file IDs which can be provided in create or copy requests. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-file). */
|
|
2444
2923
|
generateIds(request?: {
|
|
2445
2924
|
/** V1 error format. */
|
|
@@ -2471,7 +2950,7 @@ declare namespace gapi.client {
|
|
|
2471
2950
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2472
2951
|
uploadType?: string;
|
|
2473
2952
|
}): Request<GeneratedIds>;
|
|
2474
|
-
/** Gets a file's metadata or content by ID. For more information, see [Search for files and folders](/workspace/drive/api/guides/search-files). 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/v3/files/export) instead. For more information, see [Download and export files](/workspace/drive/api/guides/manage-downloads). */
|
|
2953
|
+
/** Gets a file's metadata or content by ID. For more information, see [Search for files and folders](https://developers.google.com/workspace/drive/api/guides/search-files). 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/v3/files/export) instead. For more information, see [Download and export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads). */
|
|
2475
2954
|
get(request?: {
|
|
2476
2955
|
/** V1 error format. */
|
|
2477
2956
|
'$.xgafv'?: '1' | '2';
|
|
@@ -2508,7 +2987,7 @@ declare namespace gapi.client {
|
|
|
2508
2987
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2509
2988
|
uploadType?: string;
|
|
2510
2989
|
}): Request<File>;
|
|
2511
|
-
/** 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. */
|
|
2990
|
+
/** 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. */
|
|
2512
2991
|
list(request?: {
|
|
2513
2992
|
/** V1 error format. */
|
|
2514
2993
|
'$.xgafv'?: '1' | '2';
|
|
@@ -2538,9 +3017,9 @@ declare namespace gapi.client {
|
|
|
2538
3017
|
key?: string;
|
|
2539
3018
|
/** OAuth 2.0 token for the current user. */
|
|
2540
3019
|
oauth_token?: string;
|
|
2541
|
-
/** A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the file was created. Avoid using this key for queries on large item collections as it might result in timeouts or other issues. For time-related sorting on large item collections, use `modifiedTime` instead. * `folder`: The folder ID. This field is sorted using alphabetical ordering. * `modifiedByMeTime`: The last time the file was modified by the user. * `modifiedTime`: The last time the file was modified by anyone. * `name`: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. * `name_natural`: The name of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22. * `quotaBytesUsed`: The number of storage quota bytes used by the file. * `recency`: The most recent timestamp from the file's date-time fields. * `sharedWithMeTime`: When the file was shared with the user, if applicable. * `starred`: Whether the user has starred the file. * `viewedByMeTime`: The last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with the `desc` modifier. Example usage: `?orderBy=folder,modifiedTime desc,name`. */
|
|
3020
|
+
/** A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the file was created. Avoid using this key for queries on large item collections as it might result in timeouts or other issues. For time-related sorting on large item collections, use `modifiedTime desc` instead. * `folder`: The folder ID. This field is sorted using alphabetical ordering. * `modifiedByMeTime`: The last time the file was modified by the user. * `modifiedTime`: The last time the file was modified by anyone. * `name`: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. * `name_natural`: The name of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22. * `quotaBytesUsed`: The number of storage quota bytes used by the file. * `recency`: The most recent timestamp from the file's date-time fields. * `sharedWithMeTime`: When the file was shared with the user, if applicable. * `starred`: Whether the user has starred the file. * `viewedByMeTime`: The last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with the `desc` modifier. Example usage: `?orderBy=folder,modifiedTime desc,name`. */
|
|
2542
3021
|
orderBy?: string;
|
|
2543
|
-
/** The maximum number of files to return per page.
|
|
3022
|
+
/** The maximum number of files to return per page. Pages may be partial or empty even before reaching the end of the file list. If unspecified, at most 100 files are returned for shared drives, and the entire list of files for non-shared drives. The maximum value is 100; values above 100 are changed to 100. */
|
|
2544
3023
|
pageSize?: number;
|
|
2545
3024
|
/** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response. */
|
|
2546
3025
|
pageToken?: string;
|
|
@@ -2652,7 +3131,7 @@ declare namespace gapi.client {
|
|
|
2652
3131
|
},
|
|
2653
3132
|
body: ModifyLabelsRequest,
|
|
2654
3133
|
): Request<ModifyLabelsResponse>;
|
|
2655
|
-
/** 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). */
|
|
3134
|
+
/** 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). */
|
|
2656
3135
|
update(request: {
|
|
2657
3136
|
/** V1 error format. */
|
|
2658
3137
|
'$.xgafv'?: '1' | '2';
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -11,6 +11,18 @@ Install typings for Google Drive API:
|
|
|
11
11
|
npm install @types/gapi.client.drive-v3 --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-v3"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
14
26
|
## Usage
|
|
15
27
|
|
|
16
28
|
You need to initialize Google API client in your code:
|
|
@@ -118,15 +130,45 @@ Approves or denies an access proposal. For more information, see [Manage pending
|
|
|
118
130
|
await gapi.client.drive.accessproposals.resolve({ fileId: "fileId", proposalId: "proposalId", });
|
|
119
131
|
|
|
120
132
|
/*
|
|
121
|
-
|
|
133
|
+
Approves an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update the ReviewerResponse of the requesting user with a Response of `APPROVED`. If this is the last required reviewer response, this also completes the approval and sets the approval Status to `APPROVED`.
|
|
134
|
+
*/
|
|
135
|
+
await gapi.client.drive.approvals.approve({ approvalId: "approvalId", fileId: "fileId", });
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
Cancels an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Updates the approval Status to `CANCELLED`. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS`.
|
|
139
|
+
*/
|
|
140
|
+
await gapi.client.drive.approvals.cancel({ approvalId: "approvalId", fileId: "fileId", });
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
Comments on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This sends a notification to both the initiator and the reviewers. Additionally, a message is also added to the approval activity log.
|
|
144
|
+
*/
|
|
145
|
+
await gapi.client.drive.approvals.comment({ approvalId: "approvalId", fileId: "fileId", });
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
Declines an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update the ReviewerResponse of the requesting user with a Response of `DECLINED`. This also completes the approval and sets the approval Status to `DECLINED`.
|
|
149
|
+
*/
|
|
150
|
+
await gapi.client.drive.approvals.decline({ approvalId: "approvalId", fileId: "fileId", });
|
|
151
|
+
|
|
152
|
+
/*
|
|
153
|
+
Gets an approval by ID. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).
|
|
122
154
|
*/
|
|
123
155
|
await gapi.client.drive.approvals.get({ approvalId: "approvalId", fileId: "fileId", });
|
|
124
156
|
|
|
125
157
|
/*
|
|
126
|
-
Lists the
|
|
158
|
+
Lists the approvals on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).
|
|
127
159
|
*/
|
|
128
160
|
await gapi.client.drive.approvals.list({ fileId: "fileId", });
|
|
129
161
|
|
|
162
|
+
/*
|
|
163
|
+
Reassigns the reviewers on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Adds or replaces reviewers in the ReviewerResponse of the approval. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS` and the Response for the reviewer being reassigned is `NO_RESPONSE`. A user with the `reader` permission can only reassign an approval that's assigned to themselves. Removing a reviewer isn't allowed.
|
|
164
|
+
*/
|
|
165
|
+
await gapi.client.drive.approvals.reassign({ approvalId: "approvalId", fileId: "fileId", });
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
Starts an approval on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).
|
|
169
|
+
*/
|
|
170
|
+
await gapi.client.drive.approvals.start({ fileId: "fileId", });
|
|
171
|
+
|
|
130
172
|
/*
|
|
131
173
|
Gets a specific app. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info).
|
|
132
174
|
*/
|
|
@@ -203,7 +245,7 @@ Hides a shared drive from the default view. For more information, see [Manage sh
|
|
|
203
245
|
await gapi.client.drive.drives.hide({ driveId: "driveId", });
|
|
204
246
|
|
|
205
247
|
/*
|
|
206
|
-
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.
|
|
248
|
+
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.
|
|
207
249
|
*/
|
|
208
250
|
await gapi.client.drive.drives.list({ });
|
|
209
251
|
|
|
@@ -223,7 +265,7 @@ Creates a copy of a file and applies any requested updates with patch semantics.
|
|
|
223
265
|
await gapi.client.drive.files.copy({ fileId: "fileId", });
|
|
224
266
|
|
|
225
267
|
/*
|
|
226
|
-
Creates a file. For more information, see [Create and manage files](/workspace/drive/api/guides/create-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:* `*/*` (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). Apps creating shortcuts with the `create` method must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `name` 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 name. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
|
|
268
|
+
Creates a file. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-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:* `*/*` (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). Apps creating shortcuts with the `create` method must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `name` 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 name. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
|
|
227
269
|
*/
|
|
228
270
|
await gapi.client.drive.files.create({ });
|
|
229
271
|
|
|
@@ -247,18 +289,23 @@ Exports a Google Workspace document to the requested MIME type and returns expor
|
|
|
247
289
|
*/
|
|
248
290
|
await gapi.client.drive.files.export({ fileId: "fileId", mimeType: "mimeType", });
|
|
249
291
|
|
|
292
|
+
/*
|
|
293
|
+
Generates a CSE token which can be used to create or update CSE files.
|
|
294
|
+
*/
|
|
295
|
+
await gapi.client.drive.files.generateCseToken({ });
|
|
296
|
+
|
|
250
297
|
/*
|
|
251
298
|
Generates a set of file IDs which can be provided in create or copy requests. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-file).
|
|
252
299
|
*/
|
|
253
300
|
await gapi.client.drive.files.generateIds({ });
|
|
254
301
|
|
|
255
302
|
/*
|
|
256
|
-
Gets a file's metadata or content by ID. For more information, see [Search for files and folders](/workspace/drive/api/guides/search-files). 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/v3/files/export) instead. For more information, see [Download and export files](/workspace/drive/api/guides/manage-downloads).
|
|
303
|
+
Gets a file's metadata or content by ID. For more information, see [Search for files and folders](https://developers.google.com/workspace/drive/api/guides/search-files). 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/v3/files/export) instead. For more information, see [Download and export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads).
|
|
257
304
|
*/
|
|
258
305
|
await gapi.client.drive.files.get({ fileId: "fileId", });
|
|
259
306
|
|
|
260
307
|
/*
|
|
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.
|
|
308
|
+
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
309
|
*/
|
|
263
310
|
await gapi.client.drive.files.list({ });
|
|
264
311
|
|
|
@@ -273,7 +320,7 @@ Modifies the set of labels applied to a file. For more information, see [Set a l
|
|
|
273
320
|
await gapi.client.drive.files.modifyLabels({ fileId: "fileId", });
|
|
274
321
|
|
|
275
322
|
/*
|
|
276
|
-
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).
|
|
323
|
+
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).
|
|
277
324
|
*/
|
|
278
325
|
await gapi.client.drive.files.update({ fileId: "fileId", });
|
|
279
326
|
|