UNPKG

googleapis

Version:
1,357 lines 439 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace drive_v2 { export interface Options extends GlobalOptions { version: 'v2'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * 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 * ```js * const {google} = require('googleapis'); * const drive = google.drive('v2'); * ``` */ export class Drive { context: APIRequestContext; about: Resource$About; apps: Resource$Apps; changes: Resource$Changes; channels: Resource$Channels; children: Resource$Children; comments: Resource$Comments; drives: Resource$Drives; files: Resource$Files; parents: Resource$Parents; permissions: Resource$Permissions; properties: Resource$Properties; replies: Resource$Replies; revisions: Resource$Revisions; teamdrives: Resource$Teamdrives; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * An item with user information and settings. */ export interface Schema$About { /** * Information about supported additional roles per file type. The most specific type takes precedence. */ additionalRoleInfo?: Array<{ roleSets?: Array<{ additionalRoles?: string[]; primaryRole?: string; }>; type?: string; }> | null; /** * Whether the user can create shared drives. */ canCreateDrives?: boolean | null; /** * Deprecated - use canCreateDrives instead. */ canCreateTeamDrives?: boolean | null; /** * The domain sharing policy for the current user. Possible values are: * - allowed * - allowedWithWarning * - incomingOnly * - disallowed */ domainSharingPolicy?: string | null; /** * A list of themes that are supported for shared drives. */ driveThemes?: Array<{ backgroundImageLink?: string; colorRgb?: string; id?: string; }> | null; /** * The ETag of the item. */ etag?: string | null; /** * The allowable export formats. */ exportFormats?: Array<{ source?: string; targets?: string[]; }> | null; /** * List of additional features enabled on this account. */ features?: Array<{ featureName?: string; featureRate?: number; }> | null; /** * The palette of allowable folder colors as RGB hex strings. */ folderColorPalette?: string[] | null; /** * The allowable import formats. */ importFormats?: Array<{ source?: string; targets?: string[]; }> | null; /** * A boolean indicating whether the authenticated app is installed by the authenticated user. */ isCurrentAppInstalled?: boolean | null; /** * This is always drive#about. */ kind?: string | null; /** * The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). */ languageCode?: string | null; /** * The largest change id. */ largestChangeId?: string | null; /** * List of max upload sizes for each file type. The most specific type takes precedence. */ maxUploadSizes?: Array<{ size?: string; type?: string; }> | null; /** * The name of the current user. */ name?: string | null; /** * The current user's ID as visible in the permissions collection. */ permissionId?: string | null; /** * The amount of storage quota used by different Google services. */ quotaBytesByService?: Array<{ bytesUsed?: string; serviceName?: string; }> | null; /** * The total number of quota bytes. This is only relevant when quotaType is LIMITED. */ quotaBytesTotal?: string | null; /** * The number of quota bytes used by Google Drive. */ quotaBytesUsed?: string | null; /** * The number of quota bytes used by all Google apps (Drive, Picasa, etc.). */ quotaBytesUsedAggregate?: string | null; /** * The number of quota bytes used by trashed items. */ quotaBytesUsedInTrash?: string | null; /** * The type of the user's storage quota. Possible values are: * - LIMITED * - UNLIMITED */ quotaType?: string | null; /** * The number of remaining change ids, limited to no more than 2500. */ remainingChangeIds?: string | null; /** * The id of the root folder. */ rootFolderId?: string | null; /** * A link back to this item. */ selfLink?: string | null; /** * Deprecated - use driveThemes instead. */ teamDriveThemes?: Array<{ backgroundImageLink?: string; colorRgb?: string; id?: string; }> | null; /** * The authenticated user. */ user?: Schema$User; } /** * The apps resource provides a list of the apps that a user has installed, with information about each app's supported MIME types, file extensions, and other details. */ export interface Schema$App { /** * Whether the app is authorized to access data on the user's Drive. */ authorized?: boolean | null; /** * The template url to create a new file with this app in a given folder. The template will contain {folderId\} to be replaced by the folder to create the new file in. */ createInFolderTemplate?: string | null; /** * The url to create a new file with this app. */ createUrl?: string | null; /** * Whether the app has drive-wide scope. An app with drive-wide scope can access all files in the user's drive. */ hasDriveWideScope?: boolean | null; /** * The various icons for the app. */ icons?: Array<{ category?: string; iconUrl?: string; size?: number; }> | null; /** * The ID of the app. */ id?: string | null; /** * Whether the app is installed. */ installed?: boolean | null; /** * This is always drive#app. */ kind?: string | null; /** * A long description of the app. */ longDescription?: string | null; /** * The name of the app. */ name?: string | null; /** * The type of object this app creates (e.g. Chart). If empty, the app name should be used instead. */ objectType?: string | null; /** * The template url for opening files with this app. The template will contain {ids\} and/or {exportIds\} to be replaced by the actual file ids. See Open Files for the full documentation. */ openUrlTemplate?: string | null; /** * The list of primary file extensions. */ primaryFileExtensions?: string[] | null; /** * The list of primary mime types. */ primaryMimeTypes?: string[] | null; /** * The ID of the product listing for this app. */ productId?: string | null; /** * A link to the product listing for this app. */ productUrl?: string | null; /** * The list of secondary file extensions. */ secondaryFileExtensions?: string[] | null; /** * The list of secondary mime types. */ secondaryMimeTypes?: string[] | null; /** * A short description of the app. */ shortDescription?: string | null; /** * Whether this app supports creating new objects. */ supportsCreate?: boolean | null; /** * Whether this app supports importing from Docs Editors. */ supportsImport?: boolean | null; /** * Whether this app supports opening more than one file. */ supportsMultiOpen?: boolean | null; /** * Whether this app supports creating new files when offline. */ supportsOfflineCreate?: boolean | null; /** * Whether the app is selected as the default handler for the types it supports. */ useByDefault?: boolean | null; } /** * A list of third-party applications which the user has installed or given access to Google Drive. */ export interface Schema$AppList { /** * List of app IDs that the user has specified to use by default. The list is in reverse-priority order (lowest to highest). */ defaultAppIds?: string[] | null; /** * The ETag of the list. */ etag?: string | null; /** * The list of apps. */ items?: Schema$App[]; /** * This is always drive#appList. */ kind?: string | null; /** * A link back to this list. */ selfLink?: string | null; } /** * Representation of a change to a file or shared drive. */ export interface Schema$Change { /** * The type of the change. Possible values are file and drive. */ changeType?: string | null; /** * Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. */ deleted?: boolean | null; /** * 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 | null; /** * 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 associated with this change. */ fileId?: string | null; /** * The ID of the change. */ id?: string | null; /** * This is always drive#change. */ kind?: string | null; /** * The time of this modification. */ modificationDate?: string | null; /** * A link back to this change. */ selfLink?: string | null; /** * Deprecated - use drive instead. */ teamDrive?: Schema$TeamDrive; /** * Deprecated - use driveId instead. */ teamDriveId?: string | null; /** * Deprecated - use changeType instead. */ type?: string | null; } /** * A list of changes for a user. */ export interface Schema$ChangeList { /** * The ETag of the list. */ etag?: string | null; /** * The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ items?: Schema$Change[]; /** * This is always drive#changeList. */ kind?: string | null; /** * The current largest change ID. */ largestChangeId?: string | null; /** * 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 | null; /** * A link to the next page of changes. */ nextLink?: string | null; /** * 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 | null; /** * A link back to this list. */ selfLink?: string | null; } /** * An notification channel used to watch for resource changes. */ export interface Schema$Channel { /** * The address where notifications are delivered for this channel. */ address?: string | null; /** * Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */ expiration?: string | null; /** * A UUID or similar unique string that identifies this channel. */ id?: string | null; /** * Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel". */ kind?: string | null; /** * Additional parameters controlling delivery channel behavior. Optional. */ params?: { [key: string]: string; } | null; /** * A Boolean value to indicate whether payload is wanted. Optional. */ payload?: boolean | null; /** * An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */ resourceId?: string | null; /** * A version-specific identifier for the watched resource. */ resourceUri?: string | null; /** * An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */ token?: string | null; /** * The type of delivery mechanism used for this channel. Valid values are "web_hook" (or "webhook"). Both values refer to a channel where Http requests are used to deliver messages. */ type?: string | null; } /** * A list of children of a file. */ export interface Schema$ChildList { /** * The ETag of the list. */ etag?: string | null; /** * The list of children. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ items?: Schema$ChildReference[]; /** * This is always drive#childList. */ kind?: string | null; /** * A link to the next page of children. */ nextLink?: string | null; /** * The page token for the next page of children. This will be absent if the end of the children 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 | null; /** * A link back to this list. */ selfLink?: string | null; } /** * A reference to a folder's child. */ export interface Schema$ChildReference { /** * A link to the child. */ childLink?: string | null; /** * The ID of the child. */ id?: string | null; /** * This is always drive#childReference. */ kind?: string | null; /** * A link back to this reference. */ selfLink?: string | null; } /** * A comment on a file in Google Drive. */ export 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 | null; /** * The author of the comment. The author's email address and permission ID will not be populated. */ author?: Schema$User; /** * The ID of the comment. */ commentId?: string | null; /** * The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. */ content?: string | null; /** * The context of the file which is being commented on. */ context?: { type?: string; value?: string; } | null; /** * The date when this comment was first created. */ createdDate?: string | null; /** * Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. */ deleted?: boolean | null; /** * The file which this comment is addressing. */ fileId?: string | null; /** * The title of the file which this comment is addressing. */ fileTitle?: string | null; /** * HTML formatted content for this comment. */ htmlContent?: string | null; /** * This is always drive#comment. */ kind?: string | null; /** * The date when this comment or any of its replies were last modified. */ modifiedDate?: string | null; /** * Replies to this post. */ replies?: Schema$CommentReply[]; /** * A link back to this comment. */ selfLink?: string | null; /** * The status of this comment. Status can be changed by posting a reply to a comment with the desired status. * - "open" - The comment is still open. * - "resolved" - The comment has been resolved by one of its replies. */ status?: string | null; } /** * A list of comments on a file in Google Drive. */ export 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. */ items?: Schema$Comment[]; /** * This is always drive#commentList. */ kind?: string | null; /** * A link to the next page of comments. */ nextLink?: string | null; /** * 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 | null; /** * A link back to this list. */ selfLink?: string | null; } /** * A comment on a file in Google Drive. */ export interface Schema$CommentReply { /** * The author of the reply. The author's email address and permission ID will not be populated. */ author?: Schema$User; /** * The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). */ content?: string | null; /** * The date when this reply was first created. */ createdDate?: string | null; /** * Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. */ deleted?: boolean | null; /** * HTML formatted content for this reply. */ htmlContent?: string | null; /** * This is always drive#commentReply. */ kind?: string | null; /** * The date when this reply was last modified. */ modifiedDate?: string | null; /** * The ID of the reply. */ replyId?: string | null; /** * The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: * - "resolve" - To resolve a comment. * - "reopen" - To reopen (un-resolve) a comment. */ verb?: string | null; } /** * A list of replies to a comment on a file in Google Drive. */ export interface Schema$CommentReplyList { /** * The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ items?: Schema$CommentReply[]; /** * This is always drive#commentReplyList. */ kind?: string | null; /** * A link to the next page of replies. */ nextLink?: string | null; /** * 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 | null; /** * A link back to this list. */ selfLink?: string | null; } /** * A restriction for accessing the content of the file. */ export interface Schema$ContentRestriction { /** * Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. */ readOnly?: boolean | null; /** * Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. */ reason?: string | null; /** * The user who set the content restriction. Only populated if readOnly is true. */ restrictingUser?: Schema$User; /** * The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. */ restrictionDate?: string | null; /** * The type of the content restriction. Currently the only possible value is globalContentRestriction. */ type?: string | null; } /** * Representation of a shared drive. */ export 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't set themeId. When specified, all fields of the backgroundImageFile must be set. */ backgroundImageFile?: { id?: string; width?: number; xCoordinate?: number; yCoordinate?: number; } | null; /** * A short-lived link to this shared drive's background image. */ backgroundImageLink?: string | null; /** * 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; } | null; /** * 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 | null; /** * The time at which the shared drive was created (RFC 3339 date-time). */ createdDate?: string | null; /** * Whether the shared drive is hidden from default view. */ hidden?: boolean | null; /** * The ID of this shared drive which is also the ID of the top level folder of this shared drive. */ id?: string | null; /** * This is always drive#drive */ kind?: string | null; /** * The name of this shared drive. */ name?: string | null; /** * 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; } | null; /** * 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.insert 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't set colorRgb or backgroundImageFile. */ themeId?: string | null; } /** * A list of shared drives. */ export 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. */ items?: Schema$Drive[]; /** * This is always drive#driveList */ kind?: string | null; /** * 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 | null; } /** * The metadata for a file. */ export interface Schema$File { /** * A link for opening the file in a relevant Google editor or viewer. */ alternateLink?: string | null; /** * Whether this file is in the Application Data folder. */ appDataContents?: boolean | null; /** * Deprecated: use capabilities/canComment. */ canComment?: boolean | null; /** * Deprecated: use capabilities/canReadRevisions. */ canReadRevisions?: boolean | null; /** * Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. */ capabilities?: { canAddChildren?: boolean; canAddFolderFromAnotherDrive?: boolean; canAddMyDriveParent?: boolean; canChangeCopyRequiresWriterPermission?: boolean; canChangeRestrictedDownload?: boolean; canComment?: boolean; canCopy?: boolean; canDelete?: boolean; canDeleteChildren?: boolean; canDownload?: boolean; canEdit?: boolean; canListChildren?: boolean; canModifyContent?: boolean; canModifyContentRestriction?: 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; canRemoveMyDriveParent?: boolean; canRename?: boolean; canShare?: boolean; canTrash?: boolean; canTrashChildren?: boolean; canUntrash?: boolean; } | null; /** * Restrictions for accessing the content of the file. Only populated if such a restriction exists. */ contentRestrictions?: Schema$ContentRestriction[]; /** * Deprecated: use capabilities/canCopy. */ copyable?: boolean | null; /** * Whether the options to copy, print, or download this file, should be disabled for readers and commenters. */ copyRequiresWriterPermission?: boolean | null; /** * Create time for this file (formatted RFC 3339 timestamp). */ createdDate?: string | null; /** * A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. */ defaultOpenWithLink?: string | null; /** * A short description of the file. */ description?: string | null; /** * Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files. */ downloadUrl?: string | null; /** * ID of the shared drive the file resides in. Only populated for items in shared drives. */ driveId?: string | null; /** * Deprecated: use capabilities/canEdit. */ editable?: boolean | null; /** * A link for embedding the file. */ embedLink?: string | null; /** * ETag of the file. */ etag?: string | null; /** * Whether this file has been explicitly trashed, as opposed to recursively trashed. */ explicitlyTrashed?: boolean | null; /** * Links for exporting Docs Editors files to specific formats. */ exportLinks?: { [key: string]: string; } | null; /** * The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files. */ fileExtension?: string | null; /** * The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files. */ fileSize?: string | null; /** * Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives. */ folderColorRgb?: string | null; /** * The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files. */ fullFileExtension?: string | null; /** * Whether there are permissions directly on this file. This field is only populated for items in shared drives. */ hasAugmentedPermissions?: boolean | null; /** * 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 | null; /** * The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files. */ headRevisionId?: string | null; /** * A link to the file's icon. */ iconLink?: string | null; /** * The ID of the file. */ id?: string | null; /** * Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content. */ imageMediaMetadata?: { aperture?: number; cameraMake?: string; cameraModel?: string; colorSpace?: string; date?: 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; whiteBalance?: string; width?: number; } | null; /** * Indexable text attributes for the file (can only be written) */ indexableText?: { text?: string; } | null; /** * Whether the file was created or opened by the requesting app. */ isAppAuthorized?: boolean | null; /** * The type of file. This is always drive#file. */ kind?: string | null; /** * A group of labels for the file. */ labels?: { hidden?: boolean; modified?: boolean; restricted?: boolean; starred?: boolean; trashed?: boolean; viewed?: boolean; } | null; /** * The last user to modify this file. */ lastModifyingUser?: Schema$User; /** * Name of the last user to modify this file. */ lastModifyingUserName?: string | null; /** * Last time this file was viewed by the user (formatted RFC 3339 timestamp). */ lastViewedByMeDate?: string | null; /** * Deprecated. */ markedViewedByMeDate?: string | null; /** * An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files. */ md5Checksum?: string | null; /** * The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type. */ mimeType?: string | null; /** * Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date. */ modifiedByMeDate?: string | null; /** * Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set. */ modifiedDate?: string | null; /** * A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. */ openWithLinks?: { [key: string]: string; } | null; /** * The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive. */ originalFilename?: string | null; /** * Whether the file is owned by the current user. Not populated for items in shared drives. */ ownedByMe?: boolean | null; /** * Name(s) of the owner(s) of this file. Not populated for items in shared drives. */ ownerNames?: string[] | null; /** * The owner(s) of this file. Not populated for items in shared drives. */ owners?: Schema$User[]; /** * Collection of parent folders which contain this file. * If not specified as part of an insert 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 discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list. */ parents?: Schema$ParentReference[]; /** * List of permission IDs for users with access to this file. */ permissionIds?: string[] | null; /** * The list of permissions for users with access to this file. Not populated for items in shared drives. */ permissions?: Schema$Permission[]; /** * The list of properties. */ properties?: Schema$Property[]; /** * The number of quota bytes used by this file. */ quotaBytesUsed?: string | null; /** * A link back to this file. */ selfLink?: string | null; /** * Deprecated: use capabilities/canShare. */ shareable?: boolean | null; /** * Whether the file has been shared. Not populated for items in shared drives. */ shared?: boolean | null; /** * Time at which this file was shared with the user (formatted RFC 3339 timestamp). */ sharedWithMeDate?: string | null; /** * User that shared the item with the current user, if available. */ sharingUser?: Schema$User; /** * Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. */ shortcutDetails?: { targetId?: string; targetMimeType?: string; } | null; /** * The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'. */ spaces?: string[] | null; /** * Deprecated - use driveId instead. */ teamDriveId?: string | null; /** * A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated. */ thumbnail?: { image?: string; mimeType?: string; } | null; /** * A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request. */ thumbnailLink?: string | null; /** * The thumbnail version for use in thumbnail cache invalidation. */ thumbnailVersion?: string | null; /** * The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant. */ title?: string | null; /** * The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives. */ trashedDate?: string | null; /** * If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives. */ trashingUser?: Schema$User; /** * The permissions for the authenticated user on this file. */ userPermission?: Schema$Permission; /** * 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 requesting user. */ version?: string | null; /** * Metadata about video media. This will only be present for video types. */ videoMediaMetadata?: { durationMillis?: string; height?: number; width?: number; } | null; /** * A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials. */ webContentLink?: string | null; /** * A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting. */ webViewLink?: string | null; /** * Whether writers can share the document with other users. Not populated for items in shared drives. */ writersCanShare?: boolean | null; } /** * A list of files. */ export interface Schema$FileList { /** * The ETag of the list. */ etag?: string | null; /** * 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 "allDrives" 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 "default" or "drive". */ incompleteSearch?: boolean | null; /** * The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ items?: Schema$File[]; /** * This is always drive#fileList. */ kind?: string | null; /** * A link to the next page of files. */ nextLink?: string | null; /** * 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 | null; /** * A link back to this list. */ selfLink?: string | null; } /** * A list of generated IDs which can be provided in insert requests */ export interface Schema$GeneratedIds { /** * The IDs generated for the requesting user in the specified space. */ ids?: string[] | null; /** * This is always drive#generatedIds */ kind?: string | null; /** * The type of file that can be created with these IDs. */ space?: string | null; } /** * A list of a file's parents. */ export interface Schema$ParentList { /** * The ETag of the list. */ etag?: string | null; /** * The list of parents. */ items?: Schema$ParentReference[]; /** * This is always drive#parentList. */ kind?: string | null; /** * A link back to this list. */ selfLink?: string | null; } /** * A reference to a file's parent. */ export interface Schema$ParentReference { /** * The ID of the parent. */ id?: string | null; /** * Whether or not the parent is the root folder. */ isRoot?: boolean | null; /** * This is always drive#parentReference. */ kind?: string | null; /** * A link to the parent. */ parentLink?: string | null; /** * A link back to this reference. */ selfLink?: string | null; } /** * A permission for a file. */ export interface Schema$Permission { /** * Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. */ additionalRoles?: string[] | null; /** * Deprecated. */ authKey?: string | null; /** * Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. */ deleted?: boolean | null; /** * The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. */ domain?: string | null; /** * The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. */ emailAddress?: string | null; /** * The ETag of the permission. */ etag?: string | null; /** * The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: * - They cannot be set on shared drive items * - They can only be set on user and group permissions * - The date must be in the future * - The date cannot be more than a year in the future * - The date can only be set on drive.permissions.update or drive.permissions.patch requests */ expirationDate?: string | null; /** * 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. */ id?: string | null; /** * This is always drive#permission. */ kind?: string | null; /** * The name for this permission. */ name?: string | null; /** * 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<{ additionalRoles?: string[]; inherited?: boolean; inheritedFrom?: string; permissionType?: string; role?: string; }> | null; /** * A link to the profile photo, if available. */ photoLink?: string | null; /** * The primary role for this user. While new values may be supported in the future, th