n8n-nodes-base
Version:
Base nodes of n8n
92 lines (87 loc) • 3.36 kB
text/typescript
/**
* Google Drive Node - Version 3
* Discriminator: resource=folder, operation=share
*/
interface Credentials {
googleApi: CredentialReference;
googleDriveOAuth2Api: CredentialReference;
}
/** Add sharing permissions to a file */
export type GoogleDriveV3FolderShareParams = {
resource: 'folder';
operation: 'share';
authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
* The folder to share
* @default {"mode":"list","value":""}
*/
folderNoRootId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
* Permissions
* @default {}
*/
permissionsUi?: {
/** Permission
*/
permissionsValues?: {
/** Defines what users can do with the file or folder
*/
role?: 'commenter' | 'fileOrganizer' | 'organizer' | 'owner' | 'reader' | 'writer' | Expression<string>;
/** The scope of the permission. A permission with type=user applies to a specific user whereas a permission with type=domain applies to everyone in a specific domain.
*/
type?: 'user' | 'group' | 'domain' | 'anyone' | Expression<string>;
/** The email address of the user or group to which this permission refers
* @displayOptions.show { type: ["user", "group"] }
*/
emailAddress?: string | Expression<string> | PlaceholderValue;
/** The domain to which this permission refers
* @displayOptions.show { type: ["domain"] }
*/
domain?: string | Expression<string> | PlaceholderValue;
/** Whether to allow the file to be discovered through search
* @displayOptions.show { type: ["domain", "anyone"] }
* @default false
*/
allowFileDiscovery?: boolean | Expression<boolean>;
};
};
/**
* Options
* @default {}
*/
options?: {
/** A plain text custom message to include in the notification email
*/
emailMessage?: string | Expression<string> | PlaceholderValue;
/** <p>This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item.</p><p>When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed.</p>
* @default false
*/
moveToNewOwnersRoot?: boolean | Expression<boolean>;
/** Whether to send a notification email when sharing to users or groups
* @default false
*/
sendNotificationEmail?: boolean | Expression<boolean>;
/** Whether to transfer ownership to the specified user and downgrade the current owner to a writer
* @default false
*/
transferOwnership?: boolean | Expression<boolean>;
/** Whether to perform the operation as domain administrator, i.e. if you are an administrator of the domain to which the shared drive belongs, you will be granted access automatically.
* @default false
*/
useDomainAdminAccess?: boolean | Expression<boolean>;
};
};
export type GoogleDriveV3FolderShareOutput = {
allowFileDiscovery?: boolean;
id?: string;
kind?: string;
role?: string;
type?: string;
};
export type GoogleDriveV3FolderShareNode = {
type: 'n8n-nodes-base.googleDrive';
version: 3;
credentials?: Credentials;
config: NodeConfig<GoogleDriveV3FolderShareParams>;
output?: Items<GoogleDriveV3FolderShareOutput>;
};