The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
The ID of the file or shared drive.
The ID of the permission.
async
(params, auths) => {
}
//See the API docs here: https://developers.google.com/drive/api/v3/reference/permissions/update?authuser=2
const data = {
allowFileDiscovery: params.allowFileDiscovery,
deleted: params.deleted,
displayName: params.displayName,
domain: params.domain,
emailAddress: params.emailAddress,
expirationTime: params.expirationTime,
permissionDetails: typeof params.permissionDetails == 'undefined' ? params.permissionDetails : JSON.parse(params.permissionDetails),
photoLink: params.photoLink,
role: params.role,
teamDrivePermissionDetails: typeof params.teamDrivePermissionDetails == 'undefined' ? params.teamDrivePermissionDetails : JSON.parse(params.teamDrivePermissionDetails),
type: params.type,
}
const config = {
method: "patch",
url: `https://www.googleapis.com/drive/v3/files/${params.fileId}/permissions/${params.permissionId}`,
params: {
removeExpiration: params.removeExpiration,
supportsAllDrives: params.supportsAllDrives,
supportsTeamDrives: params.supportsTeamDrives,
transferOwnership: params.transferOwnership,
useDomainAdminAccess: params.useDomainAdminAccess,
alt: params.alt,
fields: params.fields || "*", //For improved performance, select actual fields from the related entity required for your use case. "*" selects all fields.
key: params.key,
oauth_token: params.oauth_token,
prettyPrint: params.prettyPrint,
quotaUser: params.quotaUser,
userIp: params.userIp,
},
headers: {
Authorization: `Bearer ${auths.google_drive.oauth_access_token}`,
},
data,
}
return await require("@pipedreamhq/platform").axios(this, config)