For v3, you can use
Drive.Permissions.create( { 'role': 'writer', 'type': 'user', 'emailaddress': '[email protected]' }, fileāid, { 'supportsAllDrives': true, 'sendNotificationEmails': false });
Google documentation - https://developers.google.com/drive/api/guides/manage-sharing