Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3b427c6

Browse files
committedFeb 25, 2025
feat(drive): update the api
#### drive:v2 The following keys were added: - resources.permissions.methods.delete.parameters.enforceExpansiveAccess (Total Keys: 3) - resources.permissions.methods.patch.parameters.enforceExpansiveAccess (Total Keys: 3) - resources.permissions.methods.update.parameters.enforceExpansiveAccess (Total Keys: 3) - schemas.File.properties.capabilities.properties.canDisableInheritedPermissions (Total Keys: 2) - schemas.File.properties.capabilities.properties.canEnableInheritedPermissions (Total Keys: 2) - schemas.File.properties.inheritedPermissionsDisabled.type (Total Keys: 1) - schemas.Permission.properties.inheritedPermissionsDisabled.type (Total Keys: 1) #### drive:v3 The following keys were added: - resources.permissions.methods.delete.parameters.enforceExpansiveAccess (Total Keys: 3) - resources.permissions.methods.update.parameters.enforceExpansiveAccess (Total Keys: 3) - schemas.File.properties.capabilities.properties.canDisableInheritedPermissions.type (Total Keys: 1) - schemas.File.properties.capabilities.properties.canEnableInheritedPermissions.type (Total Keys: 1) - schemas.File.properties.inheritedPermissionsDisabled.type (Total Keys: 1) - schemas.Permission.properties.inheritedPermissionsDisabled.type (Total Keys: 1)
1 parent a6c51e7 commit 3b427c6

8 files changed

+410
-216
lines changed
 

‎docs/dyn/drive_v2.changes.html

+26-16
Large diffs are not rendered by default.

‎docs/dyn/drive_v2.files.html

+169-104
Large diffs are not rendered by default.

‎docs/dyn/drive_v2.permissions.html

+49-38
Large diffs are not rendered by default.

‎docs/dyn/drive_v3.changes.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,10 @@ <h3>Method Details</h3>
213213
&quot;canCopy&quot;: True or False, # Output only. 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 is not a folder.
214214
&quot;canDelete&quot;: True or False, # Output only. Whether the current user can delete this file.
215215
&quot;canDeleteChildren&quot;: True or False, # Output only. Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
216+
&quot;canDisableInheritedPermissions&quot;: True or False, # Whether a user can disable inherited permissions.
216217
&quot;canDownload&quot;: True or False, # Output only. Whether the current user can download this file.
217218
&quot;canEdit&quot;: True or False, # Output only. Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.
219+
&quot;canEnableInheritedPermissions&quot;: True or False, # Whether a user can re-enable inherited permissions.
218220
&quot;canListChildren&quot;: True or False, # Output only. Whether the current user can list the children of this folder. This is always false when the item is not a folder.
219221
&quot;canModifyContent&quot;: True or False, # Output only. Whether the current user can modify the content of this file.
220222
&quot;canModifyContentRestriction&quot;: True or False, # Deprecated: Output only. Use one of `canModifyEditorContentRestriction`, `canModifyOwnerContentRestriction` or `canRemoveContentRestriction`.
@@ -312,6 +314,7 @@ <h3>Method Details</h3>
312314
&quot;whiteBalance&quot;: &quot;A String&quot;, # Output only. The white balance mode used to create the photo.
313315
&quot;width&quot;: 42, # Output only. The width of the image in pixels.
314316
},
317+
&quot;inheritedPermissionsDisabled&quot;: True or False, # Whether this file has inherited permissions disabled. Inherited permissions are enabled by default.
315318
&quot;isAppAuthorized&quot;: True or False, # Output only. Whether the file was created or opened by the requesting app.
316319
&quot;kind&quot;: &quot;drive#file&quot;, # Output only. Identifies what kind of resource this is. Value: the fixed string `&quot;drive#file&quot;`.
317320
&quot;labelInfo&quot;: { # Output only. An overview of the labels on the file.
@@ -397,12 +400,13 @@ <h3>Method Details</h3>
397400
&quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
398401
&quot;expirationTime&quot;: &quot;A String&quot;, # 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
399402
&quot;id&quot;: &quot;A String&quot;, # Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as `permissionId`. IDs should be treated as opaque values.
403+
&quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
400404
&quot;kind&quot;: &quot;drive#permission&quot;, # Output only. Identifies what kind of resource this is. Value: the fixed string `&quot;drive#permission&quot;`.
401405
&quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for `user` type permissions for files that are not in a shared drive.
402-
&quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
406+
&quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
403407
{
404408
&quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated. This is an output-only field.
405-
&quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is an output-only field.
409+
&quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
406410
&quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
407411
&quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader`
408412
},
@@ -418,7 +422,7 @@ <h3>Method Details</h3>
418422
},
419423
],
420424
&quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. When `type` is `domain`, you must provide a `domain`. There isn&#x27;t extra information required for an `anyone` type.
421-
&quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. &#x27;published&#x27; is the only supported value.
425+
&quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - 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. Note: The metadata view is currently only supported on folders.
422426
},
423427
],
424428
&quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.

‎docs/dyn/drive_v3.files.html

+56-24
Large diffs are not rendered by default.

‎docs/dyn/drive_v3.permissions.html

+30-22
Large diffs are not rendered by default.

‎googleapiclient/discovery_cache/documents/drive.v2.json

+41-5
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,12 @@
26322632
"permissionId"
26332633
],
26342634
"parameters": {
2635+
"enforceExpansiveAccess": {
2636+
"default": "false",
2637+
"description": "Whether the request should enforce expansive access rules.",
2638+
"location": "query",
2639+
"type": "boolean"
2640+
},
26352641
"fileId": {
26362642
"description": "The ID for the file or shared drive.",
26372643
"location": "path",
@@ -2905,6 +2911,12 @@
29052911
"permissionId"
29062912
],
29072913
"parameters": {
2914+
"enforceExpansiveAccess": {
2915+
"default": "false",
2916+
"description": "Whether the request should enforce expansive access rules.",
2917+
"location": "query",
2918+
"type": "boolean"
2919+
},
29082920
"fileId": {
29092921
"description": "The ID for the file or shared drive.",
29102922
"location": "path",
@@ -2971,6 +2983,12 @@
29712983
"permissionId"
29722984
],
29732985
"parameters": {
2986+
"enforceExpansiveAccess": {
2987+
"default": "false",
2988+
"description": "Whether the request should enforce expansive access rules.",
2989+
"location": "query",
2990+
"type": "boolean"
2991+
},
29742992
"fileId": {
29752993
"description": "The ID for the file or shared drive.",
29762994
"location": "path",
@@ -3869,7 +3887,7 @@
38693887
}
38703888
}
38713889
},
3872-
"revision": "20250122",
3890+
"revision": "20250216",
38733891
"rootUrl": "https://www.googleapis.com/",
38743892
"schemas": {
38753893
"About": {
@@ -5056,6 +5074,11 @@
50565074
"description": "Output only. Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.",
50575075
"type": "boolean"
50585076
},
5077+
"canDisableInheritedPermissions": {
5078+
"description": "Output only. Whether a user can disable inherited permissions.",
5079+
"readOnly": true,
5080+
"type": "boolean"
5081+
},
50595082
"canDownload": {
50605083
"description": "Output only. Whether the current user can download this file.",
50615084
"type": "boolean"
@@ -5064,6 +5087,11 @@
50645087
"description": "Output only. Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.",
50655088
"type": "boolean"
50665089
},
5090+
"canEnableInheritedPermissions": {
5091+
"description": "Output only. Whether a user can re-enable inherited permissions.",
5092+
"readOnly": true,
5093+
"type": "boolean"
5094+
},
50675095
"canListChildren": {
50685096
"description": "Output only. Whether the current user can list the children of this folder. This is always false when the item is not a folder.",
50695097
"type": "boolean"
@@ -5413,6 +5441,10 @@
54135441
},
54145442
"type": "object"
54155443
},
5444+
"inheritedPermissionsDisabled": {
5445+
"description": "Whether this file has inherited permissions disabled. Inherited permissions are enabled by default.",
5446+
"type": "boolean"
5447+
},
54165448
"isAppAuthorized": {
54175449
"description": "Output only. Whether the file was created or opened by the requesting app.",
54185450
"type": "boolean"
@@ -6122,6 +6154,10 @@
61226154
"description": "The ID of the user this permission refers to, and identical to the `permissionId` in the About and Files resources. When making a `drive.permissions.insert` request, exactly one of the `id` or `value` fields must be specified unless the permission type is `anyone`, in which case both `id` and `value` are ignored.",
61236155
"type": "string"
61246156
},
6157+
"inheritedPermissionsDisabled": {
6158+
"description": "When true, only organizers, owners, and users with permissions added directly on the item can access it.",
6159+
"type": "boolean"
6160+
},
61256161
"kind": {
61266162
"default": "drive#permission",
61276163
"description": "Output only. This is always `drive#permission`.",
@@ -6136,7 +6172,7 @@
61366172
"type": "boolean"
61376173
},
61386174
"permissionDetails": {
6139-
"description": "Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.",
6175+
"description": "Output only. Details of whether the permissions on this item are inherited or directly on this item.",
61406176
"items": {
61416177
"properties": {
61426178
"additionalRoles": {
@@ -6147,11 +6183,11 @@
61476183
"type": "array"
61486184
},
61496185
"inherited": {
6150-
"description": "Output only. Whether this permission is inherited. This field is always populated. This is an output-only field.",
6186+
"description": "Output only. Whether this permission is inherited. This field is always populated.",
61516187
"type": "boolean"
61526188
},
61536189
"inheritedFrom": {
6154-
"description": "Output only. The ID of the item from which this permission is inherited. This is an output-only field.",
6190+
"description": "Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.",
61556191
"type": "string"
61566192
},
61576193
"permissionType": {
@@ -6238,7 +6274,7 @@
62386274
"type": "string"
62396275
},
62406276
"view": {
6241-
"description": "Indicates the view for this permission. Only populated for permissions that belong to a view. `published` is the only supported value.",
6277+
"description": "Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission's role is published_reader. - 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. Note: The metadata view is currently only supported on folders. ",
62426278
"type": "string"
62436279
},
62446280
"withLink": {

‎googleapiclient/discovery_cache/documents/drive.v3.json

+32-4
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,12 @@
20212021
"permissionId"
20222022
],
20232023
"parameters": {
2024+
"enforceExpansiveAccess": {
2025+
"default": "false",
2026+
"description": "Whether the request should enforce expansive access rules.",
2027+
"location": "query",
2028+
"type": "boolean"
2029+
},
20242030
"fileId": {
20252031
"description": "The ID of the file or shared drive.",
20262032
"location": "path",
@@ -2192,6 +2198,12 @@
21922198
"permissionId"
21932199
],
21942200
"parameters": {
2201+
"enforceExpansiveAccess": {
2202+
"default": "false",
2203+
"description": "Whether the request should enforce expansive access rules.",
2204+
"location": "query",
2205+
"type": "boolean"
2206+
},
21952207
"fileId": {
21962208
"description": "The ID of the file or shared drive.",
21972209
"location": "path",
@@ -2788,7 +2800,7 @@
27882800
}
27892801
}
27902802
},
2791-
"revision": "20250210",
2803+
"revision": "20250216",
27922804
"rootUrl": "https://www.googleapis.com/",
27932805
"schemas": {
27942806
"About": {
@@ -3689,6 +3701,10 @@
36893701
"description": "Output only. Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.",
36903702
"type": "boolean"
36913703
},
3704+
"canDisableInheritedPermissions": {
3705+
"description": "Whether a user can disable inherited permissions.",
3706+
"type": "boolean"
3707+
},
36923708
"canDownload": {
36933709
"description": "Output only. Whether the current user can download this file.",
36943710
"type": "boolean"
@@ -3697,6 +3713,10 @@
36973713
"description": "Output only. Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.",
36983714
"type": "boolean"
36993715
},
3716+
"canEnableInheritedPermissions": {
3717+
"description": "Whether a user can re-enable inherited permissions.",
3718+
"type": "boolean"
3719+
},
37003720
"canListChildren": {
37013721
"description": "Output only. Whether the current user can list the children of this folder. This is always false when the item is not a folder.",
37023722
"type": "boolean"
@@ -4030,6 +4050,10 @@
40304050
},
40314051
"type": "object"
40324052
},
4053+
"inheritedPermissionsDisabled": {
4054+
"description": "Whether this file has inherited permissions disabled. Inherited permissions are enabled by default.",
4055+
"type": "boolean"
4056+
},
40334057
"isAppAuthorized": {
40344058
"description": "Output only. Whether the file was created or opened by the requesting app.",
40354059
"type": "boolean"
@@ -4666,6 +4690,10 @@
46664690
"description": "Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as `permissionId`. IDs should be treated as opaque values.",
46674691
"type": "string"
46684692
},
4693+
"inheritedPermissionsDisabled": {
4694+
"description": "When true, only organizers, owners, and users with permissions added directly on the item can access it.",
4695+
"type": "boolean"
4696+
},
46694697
"kind": {
46704698
"default": "drive#permission",
46714699
"description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#permission\"`.",
@@ -4676,15 +4704,15 @@
46764704
"type": "boolean"
46774705
},
46784706
"permissionDetails": {
4679-
"description": "Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.",
4707+
"description": "Output only. Details of whether the permissions on this item are inherited or directly on this item.",
46804708
"items": {
46814709
"properties": {
46824710
"inherited": {
46834711
"description": "Output only. Whether this permission is inherited. This field is always populated. This is an output-only field.",
46844712
"type": "boolean"
46854713
},
46864714
"inheritedFrom": {
4687-
"description": "Output only. The ID of the item from which this permission is inherited. This is an output-only field.",
4715+
"description": "Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.",
46884716
"type": "string"
46894717
},
46904718
"permissionType": {
@@ -4755,7 +4783,7 @@
47554783
"type": "string"
47564784
},
47574785
"view": {
4758-
"description": "Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value.",
4786+
"description": "Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission's role is published_reader. - 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. Note: The metadata view is currently only supported on folders. ",
47594787
"type": "string"
47604788
}
47614789
},

0 commit comments

Comments
 (0)
Please sign in to comment.