@maxim_mazurok/gapi.client.drive-v3 0.0.20230326 → 0.0.20230413
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 +45 -43
- package/package.json +1 -1
- package/readme.md +1 -1
- package/tests.ts +3 -2
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: 20230413
|
13
13
|
|
14
14
|
/// <reference types="gapi.client" />
|
15
15
|
|
@@ -311,19 +311,19 @@ declare namespace gapi.client {
|
|
311
311
|
}
|
312
312
|
interface File {
|
313
313
|
/**
|
314
|
-
* A collection of arbitrary key-value pairs
|
314
|
+
* A collection of arbitrary key-value pairs that are private to the requesting app.
|
315
315
|
* Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access
|
316
|
-
* token obtained with
|
316
|
+
* token obtained with an OAuth 2 client ID. You cannot use an API key to retrieve private properties.
|
317
317
|
*/
|
318
318
|
appProperties?: { [P in string]: string };
|
319
|
-
/** Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user
|
319
|
+
/** Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user can take. */
|
320
320
|
capabilities?: {
|
321
321
|
/** Whether the current user is the pending owner of the file. Not populated for shared drive files. */
|
322
322
|
canAcceptOwnership?: boolean;
|
323
|
-
/** Whether the current user can add children to this folder. This is always false when the item
|
323
|
+
/** Whether the current user can add children to this folder. This is always false when the item isn't a folder. */
|
324
324
|
canAddChildren?: boolean;
|
325
325
|
/**
|
326
|
-
* Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item
|
326
|
+
* Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item isn't a folder. Only populated for
|
327
327
|
* items in shared drives.
|
328
328
|
*/
|
329
329
|
canAddFolderFromAnotherDrive?: boolean;
|
@@ -338,22 +338,22 @@ declare namespace gapi.client {
|
|
338
338
|
/** Whether the current user can comment on this file. */
|
339
339
|
canComment?: boolean;
|
340
340
|
/**
|
341
|
-
* Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it
|
341
|
+
* Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it's
|
342
342
|
* not a folder.
|
343
343
|
*/
|
344
344
|
canCopy?: boolean;
|
345
345
|
/** Whether the current user can delete this file. */
|
346
346
|
canDelete?: boolean;
|
347
|
-
/** Whether the current user can delete children of this folder. This is false when the item
|
347
|
+
/** Whether the current user can delete children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives. */
|
348
348
|
canDeleteChildren?: boolean;
|
349
349
|
/** Whether the current user can download this file. */
|
350
350
|
canDownload?: boolean;
|
351
351
|
/**
|
352
|
-
* Whether the current user can edit this file. Other factors
|
352
|
+
* Whether the current user can edit this file. Other factors might limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or
|
353
353
|
* canModifyContent.
|
354
354
|
*/
|
355
355
|
canEdit?: boolean;
|
356
|
-
/** Whether the current user can list the children of this folder. This is always false when the item
|
356
|
+
/** Whether the current user can list the children of this folder. This is always false when the item isn't a folder. */
|
357
357
|
canListChildren?: boolean;
|
358
358
|
/** Whether the current user can modify the content of this file. */
|
359
359
|
canModifyContent?: boolean;
|
@@ -361,13 +361,13 @@ declare namespace gapi.client {
|
|
361
361
|
canModifyContentRestriction?: boolean;
|
362
362
|
/** Whether the current user can modify the labels on this file. */
|
363
363
|
canModifyLabels?: boolean;
|
364
|
-
/** Whether the current user can move children of this folder outside of the shared drive. This is false when the item
|
364
|
+
/** Whether the current user can move children of this folder outside of the shared drive. This is false when the item isn't a folder. Only populated for items in shared drives. */
|
365
365
|
canMoveChildrenOutOfDrive?: boolean;
|
366
366
|
/** Deprecated - use canMoveChildrenOutOfDrive instead. */
|
367
367
|
canMoveChildrenOutOfTeamDrive?: boolean;
|
368
368
|
/**
|
369
|
-
* Whether the current user can move children of this folder within this drive. This is false when the item
|
370
|
-
* depending on the current user's access to the child and to the destination folder.
|
369
|
+
* Whether the current user can move children of this folder within this shared drive or My Drive. This is false when the item isn't a folder. Note that a request to move the child
|
370
|
+
* might still fail depending on the current user's access to the child and to the destination folder.
|
371
371
|
*/
|
372
372
|
canMoveChildrenWithinDrive?: boolean;
|
373
373
|
/** Deprecated - use canMoveChildrenWithinDrive instead. */
|
@@ -375,15 +375,15 @@ declare namespace gapi.client {
|
|
375
375
|
/** Deprecated - use canMoveItemOutOfDrive instead. */
|
376
376
|
canMoveItemIntoTeamDrive?: boolean;
|
377
377
|
/**
|
378
|
-
* Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item
|
379
|
-
* new parent that
|
378
|
+
* Whether the current user can move this item outside of this shared drive or My Drive by changing its parent. Note that a request to change the parent of the item might still
|
379
|
+
* fail depending on the new parent that's being added.
|
380
380
|
*/
|
381
381
|
canMoveItemOutOfDrive?: boolean;
|
382
382
|
/** Deprecated - use canMoveItemOutOfDrive instead. */
|
383
383
|
canMoveItemOutOfTeamDrive?: boolean;
|
384
384
|
/**
|
385
|
-
* Whether the current user can move this item within this drive. Note that a request to change the parent of the item
|
386
|
-
* added and the parent that
|
385
|
+
* Whether the current user can move this item within this shared drive or My Drive. Note that a request to change the parent of the item might still fail depending on the new
|
386
|
+
* parent that's being added and the parent that's being removed.
|
387
387
|
*/
|
388
388
|
canMoveItemWithinDrive?: boolean;
|
389
389
|
/** Deprecated - use canMoveItemWithinDrive instead. */
|
@@ -396,13 +396,13 @@ declare namespace gapi.client {
|
|
396
396
|
canReadLabels?: boolean;
|
397
397
|
/**
|
398
398
|
* Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if
|
399
|
-
* it
|
399
|
+
* it's not a folder, can be read.
|
400
400
|
*/
|
401
401
|
canReadRevisions?: boolean;
|
402
402
|
/** Deprecated - use canReadDrive instead. */
|
403
403
|
canReadTeamDrive?: boolean;
|
404
404
|
/**
|
405
|
-
* Whether the current user can remove children from this folder. This is always false when the item
|
405
|
+
* Whether the current user can remove children from this folder. This is always false when the item isn't a folder. For a folder in a shared drive, use canDeleteChildren or
|
406
406
|
* canTrashChildren instead.
|
407
407
|
*/
|
408
408
|
canRemoveChildren?: boolean;
|
@@ -414,14 +414,14 @@ declare namespace gapi.client {
|
|
414
414
|
canShare?: boolean;
|
415
415
|
/** Whether the current user can move this file to trash. */
|
416
416
|
canTrash?: boolean;
|
417
|
-
/** Whether the current user can trash children of this folder. This is false when the item
|
417
|
+
/** 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. */
|
418
418
|
canTrashChildren?: boolean;
|
419
419
|
/** Whether the current user can restore this file from trash. */
|
420
420
|
canUntrash?: boolean;
|
421
421
|
};
|
422
422
|
/** Additional information about the content of the file. These fields are never populated in responses. */
|
423
423
|
contentHints?: {
|
424
|
-
/** Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and
|
424
|
+
/** Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and might contain HTML elements. For more information, see Manage file metadata. */
|
425
425
|
indexableText?: string;
|
426
426
|
/** A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. */
|
427
427
|
thumbnail?: {
|
@@ -453,16 +453,16 @@ declare namespace gapi.client {
|
|
453
453
|
*/
|
454
454
|
folderColorRgb?: string;
|
455
455
|
/**
|
456
|
-
* The full file extension extracted from the name field.
|
456
|
+
* The full file extension extracted from the name field. Can contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google
|
457
457
|
* Drive.
|
458
|
-
* This is automatically updated when the name field changes, however it
|
458
|
+
* This is automatically updated when the name field changes, however it's not cleared if the new name does not contain a valid extension.
|
459
459
|
*/
|
460
460
|
fullFileExtension?: string;
|
461
461
|
/** Whether there are permissions directly on this file. This field is only populated for items in shared drives. */
|
462
462
|
hasAugmentedPermissions?: boolean;
|
463
463
|
/** Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field. */
|
464
464
|
hasThumbnail?: boolean;
|
465
|
-
/** The ID of the file's head revision. This is
|
465
|
+
/** The ID of the file's head revision. This is only available for files with binary content in Google Drive. */
|
466
466
|
headRevisionId?: string;
|
467
467
|
/** A static, unauthenticated link to the file's icon. */
|
468
468
|
iconLink?: string;
|
@@ -507,7 +507,7 @@ declare namespace gapi.client {
|
|
507
507
|
maxApertureValue?: number;
|
508
508
|
/** The metering mode used to create the photo. */
|
509
509
|
meteringMode?: string;
|
510
|
-
/** The number of clockwise 90
|
510
|
+
/** The number of clockwise 90-degree rotations applied from the image's original orientation. */
|
511
511
|
rotation?: number;
|
512
512
|
/** The type of sensor used to create the photo. */
|
513
513
|
sensor?: string;
|
@@ -520,7 +520,7 @@ declare namespace gapi.client {
|
|
520
520
|
/** The width of the image in pixels. */
|
521
521
|
width?: number;
|
522
522
|
};
|
523
|
-
/** Whether the
|
523
|
+
/** Whether the requesting app created or opened the file. */
|
524
524
|
isAppAuthorized?: boolean;
|
525
525
|
/** Identifies what kind of resource this is. Value: the fixed string "drive#file". */
|
526
526
|
kind?: string;
|
@@ -546,17 +546,17 @@ declare namespace gapi.client {
|
|
546
546
|
* If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
|
547
547
|
*/
|
548
548
|
mimeType?: string;
|
549
|
-
/** Whether
|
549
|
+
/** Whether this user has modified the file. */
|
550
550
|
modifiedByMe?: boolean;
|
551
|
-
/** The last time the
|
551
|
+
/** The last time the user modified the file (RFC 3339 date-time). */
|
552
552
|
modifiedByMeTime?: string;
|
553
553
|
/**
|
554
|
-
* The last time
|
554
|
+
* The last time anyone modified the file (RFC 3339 date-time).
|
555
555
|
* Note that setting modifiedTime will also update modifiedByMeTime for the user.
|
556
556
|
*/
|
557
557
|
modifiedTime?: string;
|
558
558
|
/**
|
559
|
-
* The name of the file. This
|
559
|
+
* The name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, My Drive root folder, and
|
560
560
|
* Application Data folder the name is constant.
|
561
561
|
*/
|
562
562
|
name?: string;
|
@@ -564,10 +564,10 @@ declare namespace gapi.client {
|
|
564
564
|
originalFilename?: string;
|
565
565
|
/** Whether the user owns the file. Not populated for items in shared drives. */
|
566
566
|
ownedByMe?: boolean;
|
567
|
-
/** The owner of this file. Only certain legacy files
|
567
|
+
/** The owner of this file. Only certain legacy files might have more than one owner. This field isn't populated for items in shared drives. */
|
568
568
|
owners?: User[];
|
569
569
|
/**
|
570
|
-
* The IDs of the parent folders
|
570
|
+
* The IDs of the parent folders that contain the file.
|
571
571
|
* If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any
|
572
572
|
* discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
|
573
573
|
*/
|
@@ -577,7 +577,7 @@ declare namespace gapi.client {
|
|
577
577
|
/** The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. */
|
578
578
|
permissions?: Permission[];
|
579
579
|
/**
|
580
|
-
* A collection of arbitrary key-value pairs
|
580
|
+
* A collection of arbitrary key-value pairs that are visible to all apps.
|
581
581
|
* Entries with null values are cleared in update and copy requests.
|
582
582
|
*/
|
583
583
|
properties?: { [P in string]: string };
|
@@ -586,12 +586,12 @@ declare namespace gapi.client {
|
|
586
586
|
/** A key needed to access the item via a shared link. */
|
587
587
|
resourceKey?: string;
|
588
588
|
/**
|
589
|
-
* The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it
|
589
|
+
* The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or
|
590
590
|
* shortcut files.
|
591
591
|
*/
|
592
592
|
sha1Checksum?: string;
|
593
593
|
/**
|
594
|
-
* The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it
|
594
|
+
* The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or
|
595
595
|
* shortcut files.
|
596
596
|
*/
|
597
597
|
sha256Checksum?: string;
|
@@ -611,11 +611,11 @@ declare namespace gapi.client {
|
|
611
611
|
targetResourceKey?: string;
|
612
612
|
};
|
613
613
|
/**
|
614
|
-
* The size of the file's content in bytes. This field is populated for files with binary content stored in Google Drive and for Docs Editors files; it
|
615
|
-
*
|
614
|
+
* The size of the file's content in bytes. This field is populated for files with binary content stored in Google Drive and for Docs Editors files; it's not populated for shortcuts or
|
615
|
+
* folders.
|
616
616
|
*/
|
617
617
|
size?: string;
|
618
|
-
/** The list of spaces
|
618
|
+
/** The list of spaces that contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. */
|
619
619
|
spaces?: string[];
|
620
620
|
/** Whether the user has starred the file. */
|
621
621
|
starred?: boolean;
|
@@ -629,7 +629,7 @@ declare namespace gapi.client {
|
|
629
629
|
/** The thumbnail version for use in thumbnail cache invalidation. */
|
630
630
|
thumbnailVersion?: string;
|
631
631
|
/**
|
632
|
-
* Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner
|
632
|
+
* Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner can trash a file. The trashed item is excluded from all files.list responses
|
633
633
|
* returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy,
|
634
634
|
* download, export, and share the file.
|
635
635
|
*/
|
@@ -640,7 +640,7 @@ declare namespace gapi.client {
|
|
640
640
|
trashingUser?: User;
|
641
641
|
/** A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user. */
|
642
642
|
version?: string;
|
643
|
-
/** Additional metadata about video media. This
|
643
|
+
/** Additional metadata about video media. This might not be available immediately upon upload. */
|
644
644
|
videoMediaMetadata?: {
|
645
645
|
/** The duration of the video in milliseconds. */
|
646
646
|
durationMillis?: string;
|
@@ -649,9 +649,9 @@ declare namespace gapi.client {
|
|
649
649
|
/** The width of the video in pixels. */
|
650
650
|
width?: number;
|
651
651
|
};
|
652
|
-
/** Whether
|
652
|
+
/** Whether this user has viewed the file. */
|
653
653
|
viewedByMe?: boolean;
|
654
|
-
/** The last time the
|
654
|
+
/** The last time the user viewed the file (RFC 3339 date-time). */
|
655
655
|
viewedByMeTime?: string;
|
656
656
|
/** Deprecated - use copyRequiresWriterPermission instead. */
|
657
657
|
viewersCanCopyContent?: boolean;
|
@@ -1907,6 +1907,8 @@ declare namespace gapi.client {
|
|
1907
1907
|
emptyTrash(request?: {
|
1908
1908
|
/** Data format for the response. */
|
1909
1909
|
alt?: string;
|
1910
|
+
/** If set, empties the trash of the provided shared drive. */
|
1911
|
+
driveId?: string;
|
1910
1912
|
/** Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root. */
|
1911
1913
|
enforceSingleParent?: boolean;
|
1912
1914
|
/** Selector specifying which fields to include in a partial response. */
|
@@ -2203,7 +2205,7 @@ declare namespace gapi.client {
|
|
2203
2205
|
userIp?: string;
|
2204
2206
|
},
|
2205
2207
|
body: File): Request<File>;
|
2206
|
-
/** Subscribes to changes to a file.
|
2208
|
+
/** Subscribes to changes to a file. */
|
2207
2209
|
watch(request: {
|
2208
2210
|
/** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. */
|
2209
2211
|
acknowledgeAbuse?: boolean;
|
package/package.json
CHANGED
package/readme.md
CHANGED
@@ -228,7 +228,7 @@ Updates a file's metadata and/or content. When calling this method, only populat
|
|
228
228
|
await gapi.client.drive.files.update({ fileId: "fileId", });
|
229
229
|
|
230
230
|
/*
|
231
|
-
Subscribes to changes to a file.
|
231
|
+
Subscribes to changes to a file.
|
232
232
|
*/
|
233
233
|
await gapi.client.drive.files.watch({ fileId: "fileId", });
|
234
234
|
|
package/tests.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
5
5
|
|
6
|
-
// Revision:
|
6
|
+
// Revision: 20230413
|
7
7
|
|
8
8
|
gapi.load('client', async () => {
|
9
9
|
/** now we can use gapi.client */
|
@@ -929,6 +929,7 @@ gapi.load('client', async () => {
|
|
929
929
|
});
|
930
930
|
/** Permanently deletes all of the user's trashed files. */
|
931
931
|
await gapi.client.drive.files.emptyTrash({
|
932
|
+
driveId: "Test string",
|
932
933
|
enforceSingleParent: true,
|
933
934
|
});
|
934
935
|
/** Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB. */
|
@@ -1298,7 +1299,7 @@ gapi.load('client', async () => {
|
|
1298
1299
|
webViewLink: "Test string",
|
1299
1300
|
writersCanShare: true,
|
1300
1301
|
});
|
1301
|
-
/** Subscribes to changes to a file.
|
1302
|
+
/** Subscribes to changes to a file. */
|
1302
1303
|
await gapi.client.drive.files.watch({
|
1303
1304
|
acknowledgeAbuse: true,
|
1304
1305
|
fileId: "Test string",
|