UNPKG

googleapis

Version:
1,198 lines 156 kB
/** * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library'; import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { GaxiosPromise } from 'gaxios'; export declare namespace drive_v3 { interface Options extends GlobalOptions { version: 'v3'; } interface StandardParameters { /** * Data format for the response. */ alt?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * 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. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; /** * Deprecated. Please use quotaUser instead. */ userIp?: string; } /** * Drive API * * Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions. * * @example * const {google} = require('googleapis'); * const drive = google.drive('v3'); * * @namespace drive * @type {Function} * @version v3 * @variation v3 * @param {object=} options Options for Drive */ class Drive { context: APIRequestContext; about: Resource$About; changes: Resource$Changes; channels: Resource$Channels; comments: Resource$Comments; drives: Resource$Drives; files: Resource$Files; permissions: Resource$Permissions; replies: Resource$Replies; revisions: Resource$Revisions; teamdrives: Resource$Teamdrives; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Information about the user, the user&#39;s Drive, and system capabilities. */ interface Schema$About { /** * Whether the user has installed the requesting app. */ appInstalled?: boolean; /** * Whether the user can create shared drives. */ canCreateDrives?: boolean; /** * Deprecated - use canCreateDrives instead. */ canCreateTeamDrives?: boolean; /** * A list of themes that are supported for shared drives. */ driveThemes?: Array<{ backgroundImageLink?: string; colorRgb?: string; id?: string; }>; /** * A map of source MIME type to possible targets for all supported exports. */ exportFormats?: { [key: string]: string[]; }; /** * The currently supported folder colors as RGB hex strings. */ folderColorPalette?: string[]; /** * A map of source MIME type to possible targets for all supported imports. */ importFormats?: { [key: string]: string[]; }; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#about&quot;. */ kind?: string; /** * A map of maximum import sizes by MIME type, in bytes. */ maxImportSizes?: { [key: string]: string; }; /** * The maximum upload size in bytes. */ maxUploadSize?: string; /** * The user&#39;s storage quota limits and usage. All fields are measured in bytes. */ storageQuota?: { limit?: string; usage?: string; usageInDrive?: string; usageInDriveTrash?: string; }; /** * Deprecated - use driveThemes instead. */ teamDriveThemes?: Array<{ backgroundImageLink?: string; colorRgb?: string; id?: string; }>; /** * The authenticated user. */ user?: Schema$User; } /** * A change to a file or shared drive. */ interface Schema$Change { /** * The type of the change. Possible values are file and drive. */ changeType?: string; /** * The updated state of the shared drive. Present if the changeType is drive, the user is still a member of the shared drive, and the shared drive has not been deleted. */ drive?: Schema$Drive; /** * The ID of the shared drive associated with this change. */ driveId?: string; /** * The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. */ file?: Schema$File; /** * The ID of the file which has changed. */ fileId?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#change&quot;. */ kind?: string; /** * Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. */ removed?: boolean; /** * Deprecated - use drive instead. */ teamDrive?: Schema$TeamDrive; /** * Deprecated - use driveId instead. */ teamDriveId?: string; /** * The time of this change (RFC 3339 date-time). */ time?: string; /** * Deprecated - use changeType instead. */ type?: string; } /** * A list of changes for a user. */ interface Schema$ChangeList { /** * The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ changes?: Schema$Change[]; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#changeList&quot;. */ kind?: string; /** * The starting page token for future changes. This will be present only if the end of the current changes list has been reached. */ newStartPageToken?: string; /** * The page token for the next page of changes. This will be absent if the end of the changes 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. */ nextPageToken?: string; } /** * An notification channel used to watch for resource changes. */ interface Schema$Channel { /** * The address where notifications are delivered for this channel. */ address?: string; /** * Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */ expiration?: string; /** * A UUID or similar unique string that identifies this channel. */ id?: string; /** * Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;. */ kind?: string; /** * Additional parameters controlling delivery channel behavior. Optional. */ params?: { [key: string]: string; }; /** * A Boolean value to indicate whether payload is wanted. Optional. */ payload?: boolean; /** * An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */ resourceId?: string; /** * A version-specific identifier for the watched resource. */ resourceUri?: string; /** * An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */ token?: string; /** * The type of delivery mechanism used for this channel. */ type?: string; } /** * A comment on a file. */ interface Schema$Comment { /** * A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. */ anchor?: string; /** * The user who created the comment. */ author?: Schema$User; /** * The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed. */ content?: string; /** * The time at which the comment was created (RFC 3339 date-time). */ createdTime?: string; /** * Whether the comment has been deleted. A deleted comment has no content. */ deleted?: boolean; /** * The content of the comment with HTML formatting. */ htmlContent?: string; /** * The ID of the comment. */ id?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#comment&quot;. */ kind?: string; /** * The last time the comment or any of its replies was modified (RFC 3339 date-time). */ modifiedTime?: string; /** * The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment. */ quotedFileContent?: { mimeType?: string; value?: string; }; /** * The full list of replies to the comment in chronological order. */ replies?: Schema$Reply[]; /** * Whether the comment has been resolved by one of its replies. */ resolved?: boolean; } /** * A list of comments on a file. */ interface Schema$CommentList { /** * The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ comments?: Schema$Comment[]; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#commentList&quot;. */ kind?: string; /** * The page token for the next page of comments. This will be absent if the end of the comments 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. */ nextPageToken?: string; } /** * Representation of a shared drive. */ interface Schema$Drive { /** * An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don&#39;t set themeId. When specified, all fields of the backgroundImageFile must be set. */ backgroundImageFile?: { id?: string; width?: number; xCoordinate?: number; yCoordinate?: number; }; /** * A short-lived link to this shared drive&#39;s background image. */ backgroundImageLink?: string; /** * Capabilities the current user has on this shared drive. */ capabilities?: { canAddChildren?: boolean; canChangeCopyRequiresWriterPermissionRestriction?: boolean; canChangeDomainUsersOnlyRestriction?: boolean; canChangeDriveBackground?: boolean; canChangeDriveMembersOnlyRestriction?: boolean; canComment?: boolean; canCopy?: boolean; canDeleteChildren?: boolean; canDeleteDrive?: boolean; canDownload?: boolean; canEdit?: boolean; canListChildren?: boolean; canManageMembers?: boolean; canReadRevisions?: boolean; canRename?: boolean; canRenameDrive?: boolean; canShare?: boolean; canTrashChildren?: boolean; }; /** * The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId. */ colorRgb?: string; /** * The time at which the shared drive was created (RFC 3339 date-time). */ createdTime?: string; /** * Whether the shared drive is hidden from default view. */ hidden?: boolean; /** * The ID of this shared drive which is also the ID of the top level folder of this shared drive. */ id?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#drive&quot;. */ kind?: string; /** * The name of this shared drive. */ name?: string; /** * A set of restrictions that apply to this shared drive or items inside this shared drive. */ restrictions?: { adminManagedRestrictions?: boolean; copyRequiresWriterPermission?: boolean; domainUsersOnly?: boolean; driveMembersOnly?: boolean; }; /** * The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don&#39;t set colorRgb or backgroundImageFile. */ themeId?: string; } /** * A list of shared drives. */ interface Schema$DriveList { /** * The list of shared drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ drives?: Schema$Drive[]; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#driveList&quot;. */ kind?: string; /** * The page token for the next page of shared drives. This will be absent if the end of the 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. */ nextPageToken?: string; } /** * The metadata for a file. */ interface Schema$File { /** * A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. */ appProperties?: { [key: string]: string; }; /** * Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. */ capabilities?: { canAddChildren?: boolean; canChangeCopyRequiresWriterPermission?: boolean; canChangeViewersCanCopyContent?: boolean; canComment?: boolean; canCopy?: boolean; canDelete?: boolean; canDeleteChildren?: boolean; canDownload?: boolean; canEdit?: boolean; canListChildren?: boolean; canMoveChildrenOutOfDrive?: boolean; canMoveChildrenOutOfTeamDrive?: boolean; canMoveChildrenWithinDrive?: boolean; canMoveChildrenWithinTeamDrive?: boolean; canMoveItemIntoTeamDrive?: boolean; canMoveItemOutOfDrive?: boolean; canMoveItemOutOfTeamDrive?: boolean; canMoveItemWithinDrive?: boolean; canMoveItemWithinTeamDrive?: boolean; canMoveTeamDriveItem?: boolean; canReadDrive?: boolean; canReadRevisions?: boolean; canReadTeamDrive?: boolean; canRemoveChildren?: boolean; canRename?: boolean; canShare?: boolean; canTrash?: boolean; canTrashChildren?: boolean; canUntrash?: boolean; }; /** * Additional information about the content of the file. These fields are never populated in responses. */ contentHints?: { indexableText?: string; thumbnail?: { image?: string; mimeType?: string; }; }; /** * Whether the options to copy, print, or download this file, should be disabled for readers and commenters. */ copyRequiresWriterPermission?: boolean; /** * The time at which the file was created (RFC 3339 date-time). */ createdTime?: string; /** * A short description of the file. */ description?: string; /** * ID of the shared drive the file resides in. Only populated for items in shared drives. */ driveId?: string; /** * Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. */ explicitlyTrashed?: boolean; /** * Links for exporting Google Docs to specific formats. */ exportLinks?: { [key: string]: string; }; /** * The final component of fullFileExtension. This is only available for files with binary content in Google Drive. */ fileExtension?: string; /** * The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead. */ folderColorRgb?: string; /** * The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. */ fullFileExtension?: string; /** * Whether any users are granted file access directly on this file. This field is only populated for shared drive files. */ hasAugmentedPermissions?: boolean; /** * 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. */ hasThumbnail?: boolean; /** * The ID of the file&#39;s head revision. This is currently only available for files with binary content in Google Drive. */ headRevisionId?: string; /** * A static, unauthenticated link to the file&#39;s icon. */ iconLink?: string; /** * The ID of the file. */ id?: string; /** * Additional metadata about image media, if available. */ imageMediaMetadata?: { aperture?: number; cameraMake?: string; cameraModel?: string; colorSpace?: string; exposureBias?: number; exposureMode?: string; exposureTime?: number; flashUsed?: boolean; focalLength?: number; height?: number; isoSpeed?: number; lens?: string; location?: { altitude?: number; latitude?: number; longitude?: number; }; maxApertureValue?: number; meteringMode?: string; rotation?: number; sensor?: string; subjectDistance?: number; time?: string; whiteBalance?: string; width?: number; }; /** * Whether the file was created or opened by the requesting app. */ isAppAuthorized?: boolean; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;. */ kind?: string; /** * The last user to modify the file. */ lastModifyingUser?: Schema$User; /** * The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. */ md5Checksum?: string; /** * The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. 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. */ mimeType?: string; /** * Whether the file has been modified by this user. */ modifiedByMe?: boolean; /** * The last time the file was modified by the user (RFC 3339 date-time). */ modifiedByMeTime?: string; /** * The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user. */ modifiedTime?: string; /** * The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. */ name?: string; /** * The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. */ originalFilename?: string; /** * Whether the user owns the file. Not populated for items in shared drives. */ ownedByMe?: boolean; /** * The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. */ owners?: Schema$User[]; /** * The IDs of the parent folders which contain the file. If not specified as part of a create request, the file will be placed directly in the user&#39;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list. */ parents?: string[]; /** * List of permission IDs for users with access to this file. */ permissionIds?: string[]; /** * 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. */ permissions?: Schema$Permission[]; /** * A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests. */ properties?: { [key: string]: string; }; /** * The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. */ quotaBytesUsed?: string; /** * Whether the file has been shared. Not populated for items in shared drives. */ shared?: boolean; /** * The time at which the file was shared with the user, if applicable (RFC 3339 date-time). */ sharedWithMeTime?: string; /** * The user who shared the file with the requesting user, if applicable. */ sharingUser?: Schema$User; /** * The size of the file&#39;s content in bytes. This is only applicable to files with binary content in Google Drive. */ size?: string; /** * The list of spaces which contain the file. The currently supported values are &#39;drive&#39;, &#39;appDataFolder&#39; and &#39;photos&#39;. */ spaces?: string[]; /** * Whether the user has starred the file. */ starred?: boolean; /** * Deprecated - use driveId instead. */ teamDriveId?: string; /** * A short-lived link to the file&#39;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#39;s content. */ thumbnailLink?: string; /** * The thumbnail version for use in thumbnail cache invalidation. */ thumbnailVersion?: string; /** * Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner&#39;s trash. */ trashed?: boolean; /** * The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. */ trashedTime?: string; /** * If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives. */ trashingUser?: Schema$User; /** * 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. */ version?: string; /** * Additional metadata about video media. This may not be available immediately upon upload. */ videoMediaMetadata?: { durationMillis?: string; height?: number; width?: number; }; /** * Whether the file has been viewed by this user. */ viewedByMe?: boolean; /** * The last time the file was viewed by the user (RFC 3339 date-time). */ viewedByMeTime?: string; /** * Deprecated - use copyRequiresWriterPermission instead. */ viewersCanCopyContent?: boolean; /** * A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive. */ webContentLink?: string; /** * A link for opening the file in a relevant Google editor or viewer in a browser. */ webViewLink?: string; /** * Whether users with only writer permission can modify the file&#39;s permissions. Not populated for items in shared drives. */ writersCanShare?: boolean; } /** * A list of files. */ interface Schema$FileList { /** * The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ files?: Schema$File[]; /** * Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the &quot;allDrives&quot; corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as &quot;user&quot; or &quot;drive&quot;. */ incompleteSearch?: boolean; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;. */ kind?: string; /** * 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. */ nextPageToken?: string; } /** * A list of generated file IDs which can be provided in create requests. */ interface Schema$GeneratedIds { /** * The IDs generated for the requesting user in the specified space. */ ids?: string[]; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;. */ kind?: string; /** * The type of file that can be created with these IDs. */ space?: string; } /** * A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. */ interface Schema$Permission { /** * Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. */ allowFileDiscovery?: boolean; /** * Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. */ deleted?: boolean; /** * A displayable name for users, groups or domains. */ displayName?: string; /** * The domain to which this permission refers. */ domain?: string; /** * The email address of the user or group to which this permission refers. */ emailAddress?: string; /** * 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 */ expirationTime?: string; /** * The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. */ id?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;. */ kind?: string; /** * 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. */ permissionDetails?: Array<{ inherited?: boolean; inheritedFrom?: string; permissionType?: string; role?: string; }>; /** * A link to the user&#39;s profile photo, if available. */ photoLink?: string; /** * The role granted by this permission. While new values may be supported in the future, the following are currently allowed: - owner - organizer - fileOrganizer - writer - commenter - reader */ role?: string; /** * Deprecated - use permissionDetails instead. */ teamDrivePermissionDetails?: Array<{ inherited?: boolean; inheritedFrom?: string; role?: string; teamDrivePermissionType?: string; }>; /** * The type of the grantee. Valid values are: - user - group - domain - anyone */ type?: string; } /** * A list of permissions for a file. */ interface Schema$PermissionList { /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#permissionList&quot;. */ kind?: string; /** * The page token for the next page of permissions. This field will be absent if the end of the permissions 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. */ nextPageToken?: string; /** * The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ permissions?: Schema$Permission[]; } /** * A reply to a comment on a file. */ interface Schema$Reply { /** * The action the reply performed to the parent comment. Valid values are: - resolve - reopen */ action?: string; /** * The user who created the reply. */ author?: Schema$User; /** * The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified. */ content?: string; /** * The time at which the reply was created (RFC 3339 date-time). */ createdTime?: string; /** * Whether the reply has been deleted. A deleted reply has no content. */ deleted?: boolean; /** * The content of the reply with HTML formatting. */ htmlContent?: string; /** * The ID of the reply. */ id?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#reply&quot;. */ kind?: string; /** * The last time the reply was modified (RFC 3339 date-time). */ modifiedTime?: string; } /** * A list of replies to a comment on a file. */ interface Schema$ReplyList { /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#replyList&quot;. */ kind?: string; /** * The page token for the next page of replies. This will be absent if the end of the replies 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. */ nextPageToken?: string; /** * The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ replies?: Schema$Reply[]; } /** * The metadata for a revision to a file. */ interface Schema$Revision { /** * Links for exporting Google Docs to specific formats. */ exportLinks?: { [key: string]: string; }; /** * The ID of the revision. */ id?: string; /** * Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive. */ keepForever?: boolean; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#revision&quot;. */ kind?: string; /** * The last user to modify this revision. */ lastModifyingUser?: Schema$User; /** * The MD5 checksum of the revision&#39;s content. This is only applicable to files with binary content in Drive. */ md5Checksum?: string; /** * The MIME type of the revision. */ mimeType?: string; /** * The last time the revision was modified (RFC 3339 date-time). */ modifiedTime?: string; /** * The original filename used to create this revision. This is only applicable to files with binary content in Drive. */ originalFilename?: string; /** * Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs. */ publishAuto?: boolean; /** * Whether this revision is published. This is only applicable to Google Docs. */ published?: boolean; /** * Whether this revision is published outside the domain. This is only applicable to Google Docs. */ publishedOutsideDomain?: boolean; /** * The size of the revision&#39;s content in bytes. This is only applicable to files with binary content in Drive. */ size?: string; } /** * A list of revisions of a file. */ interface Schema$RevisionList { /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#revisionList&quot;. */ kind?: string; /** * The page token for the next page of revisions. This will be absent if the end of the revisions 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. */ nextPageToken?: string; /** * The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ revisions?: Schema$Revision[]; } interface Schema$StartPageToken { /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#startPageToken&quot;. */ kind?: string; /** * The starting page token for listing changes. */ startPageToken?: string; } /** * Deprecated: use the drive collection instead. */ interface Schema$TeamDrive { /** * An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don&#39;t set themeId. When specified, all fields of the backgroundImageFile must be set. */ backgroundImageFile?: { id?: string; width?: number; xCoordinate?: number; yCoordinate?: number; }; /** * A short-lived link to this Team Drive&#39;s background image. */ backgroundImageLink?: string; /** * Capabilities the current user has on this Team Drive. */ capabilities?: { canAddChildren?: boolean; canChangeCopyRequiresWriterPermissionRestriction?: boolean; canChangeDomainUsersOnlyRestriction?: boolean; canChangeTeamDriveBackground?: boolean; canChangeTeamMembersOnlyRestriction?: boolean; canComment?: boolean; canCopy?: boolean; canDeleteChildren?: boolean; canDeleteTeamDrive?: boolean; canDownload?: boolean; canEdit?: boolean; canListChildren?: boolean; canManageMembers?: boolean; canReadRevisions?: boolean; canRemoveChildren?: boolean; canRename?: boolean; canRenameTeamDrive?: boolean; canShare?: boolean; canTrashChildren?: boolean; }; /** * The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. */ colorRgb?: string; /** * The time at which the Team Drive was created (RFC 3339 date-time). */ createdTime?: string; /** * The ID of this Team Drive which is also the ID of the top level folder of this Team Drive. */ id?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#teamDrive&quot;. */ kind?: string; /** * The name of this Team Drive. */ name?: string; /** * A set of restrictions that apply to this Team Drive or items inside this Team Drive. */ restrictions?: { adminManagedRestrictions?: boolean; copyRequiresWriterPermission?: boolean; domainUsersOnly?: boolean; teamMembersOnly?: boolean; }; /** * The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don&#39;t set colorRgb or backgroundImageFile. */ themeId?: string; } /** * A list of Team Drives. */ interface Schema$TeamDriveList { /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#teamDriveList&quot;. */ kind?: string; /** * The page token for the next page of Team Drives. This will be absent if the end of the Team Drives 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. */ nextPageToken?: string; /** * The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ teamDrives?: Schema$TeamDrive[]; } /** * Information about a Drive user. */ interface Schema$User { /** * A plain text displayable name for this user. */ displayName?: string; /** * The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. */ emailAddress?: string; /** * Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;. */ kind?: string; /** * Whether this user is the requesting user. */ me?: boolean; /** * The user&#39;s ID as visible in Permission resources. */ permissionId?: string; /** * A link to the user&#39;s profile photo, if available. */ photoLink?: string; } class Resource$About { context: APIRequestContext; constructor(context: APIRequestContext); /** * drive.about.get * @desc Gets information about the user, the user's Drive, and system capabilities. * @alias drive.about.get * @memberOf! () * * @param {object=} params Parameters for request * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ get(params?: Params$Resource$About$Get, options?: MethodOptions): GaxiosPromise<Schema$About>; get(params: Params$Resource$About$Get, options: MethodOptions | BodyResponseCallback<Schema$About>, callback: BodyResponseCallback<Schema$About>): void; get(params: Params$Resource$About$Get, callback: BodyResponseCallback<Schema$About>): void; get(callback: BodyResponseCallback<Schema$About>): void; } interface Params$Resource$About$Get extends StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; } class Resource$Changes { context: APIRequestContext; constructor(context: APIRequestContext); /** * drive.changes.getStartPageToken * @desc Gets the starting pageToken for listing future changes. * @alias drive.changes.getStartPageToken * @memberOf! () * * @param {object=} params Parameters for request * @param {string=} params.driveId The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. * @param {string=} params.teamDriveId Deprecated use driveId instead. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ getStartPageToken(params?: Params$Resource$Changes$Getstartpagetoken, options?: MethodOptions): GaxiosPromise<Schema$StartPageToken>; getStartPageToken(params: Params$Resource$Changes$Getstartpagetoken, options: MethodOptions | BodyResponseCallback<Schema$StartPageToken>, callback: BodyResponseCallback<Schema$StartPageToken>): void; getStartPageToken(params: Params$Resource$Changes$Getstartpagetoken, callback: BodyResponseCallback<Schema$StartPageToken>): void; getStartPageToken(callback: BodyResponseCallback<Schema$StartPageToken>): void; /** * drive.changes.list * @desc Lists the changes for a user or shared drive. * @alias drive.changes.list * @memberOf! () * * @param {object} params Parameters for request * @param {string=} params.driveId The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier. * @param {boolean=} params.includeCorpusRemovals Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. * @param {boolean=} params.includeItemsFromAllDrives Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results. * @param {boolean=} params.includeRemoved Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. * @param {boolean=} params.includeTeamDriveItems Deprecated use includeItemsFromAllDrives instead. * @param {integer=} params.pageSize The maximum number of changes to return per page. * @param {string} params.pageToken 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 or to the response from the getStartPageToken method. * @param {boolean=} params.restrictToMyDrive Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. * @param {string=} params.spaces A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. * @param {string=} params.teamDriveId Deprecated use driveId instead. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ list(params?: Params$Resource$Changes$List, options?: MethodOptions): GaxiosPromise<Schema$ChangeList>; list(params: Params$Resource$Changes$List, options: MethodOptions | BodyResponseCallback<Schema$ChangeList>, callback: BodyResponseCallba