/** * Google Drive operation enum — single source of truth across the API, * Dashboard, and Message Broker. Used by: * - driveAction entity / DTO (api): operation field + validation * - dashboard DriveAction operation type * - broker hostwebhook types + tool schemas * - MCP toolkit specs (when aiEnabled: true) * * Same pattern as gmail-operations.ts and calendar-operations.ts. * * Op semantics (anti-n8n choices): * - delete = move to trash (recoverable for 30 days), NOT permanent erase * - upload / download stream via the api Files / R2 layer, never load * full file contents into memory (n8n breaks past ~70MB) * - download returns a `_file` ref so downstream FileTransform / AI / * HTTP nodes can chain on it directly (n8n returns raw binary, often * misformatted as HTML on errors) */ export declare const DRIVE_OPERATIONS: readonly ["upload", "download", "copy", "move", "delete", "share", "update", "list", "get", "createFolder", "export", "getPermissions"]; export type DriveOperation = (typeof DRIVE_OPERATIONS)[number]; /** Type guard — useful when validating untrusted input (DTOs, tool calls). */ export declare function isDriveOperation(value: unknown): value is DriveOperation; export type DriveParamType = /** Live file picker (needs a credential) + templated paste. */ 'driveFile' /** Text input with `{{payload.*}}` autocomplete. */ | 'template' /** Plain `` whose values are `''` / `'true'` / `'false'` but which is * stored as a BOOLEAN, or omitted entirely when `''`. * * This is the shape that keeps `starred` honest: the api applies it with * `typeof config.starred === 'boolean'`, so "— don't change —" has to mean * *no key at all*. A plain Switch cannot express that third state, and * storing `''` or `'false'` would silently stop the star from ever changing. */ | 'booleanSelect' /** * Full-width explainer card that toggles: icon, title, prose and bullets, * with the switch on the right. The card's rich body is JSX, so it lives in * the page keyed by param name — the schema only declares the field. */ | 'switchCard' /** Live multi-select of the starting folder's immediate children. */ | 'driveSubfolders'; export interface DriveParamSpec { /** The `operationConfig` key. This is what the api reads — not a UI name. */ name: string; label: string; type: DriveParamType; required?: boolean; /** * Help text under the field. Plain text on purpose: the package holds no * React, so the `` spans the page used to have are gone. Deliberate. */ description?: string; placeholder?: string; /** Prefilled when the saved config has no value for this key. */ default?: string | number; /** Required for `select` and `booleanSelect` — label and value differ. */ options?: ReadonlyArray<{ value: string; label: string; }>; min?: number; max?: number; /** * Renders in the "Advanced" tab instead of "Config". The page used to keep * a two-name `ADVANCED_FIELDS` array while the advanced *tab* actually held * four fields, so `recursive` and `subfolderIds` only showed up because * `list` happened to also carry one of the two named fields. Marking all * four here removes that coincidence. */ advanced?: boolean; /** * Only shown when a sibling field holds one of these values. No other node's * schema needed this yet; Drive has three cases (the two share targets and * the subfolder scope). */ showWhen?: { field: string; in: ReadonlyArray; }; } export interface DriveOperationSpec { /** UI label for the operation dropdown row. */ label: string; /** Sub-line under the label in the dropdown. */ description: string; /** Drive API method it maps to (developers.google.com/drive/api/reference). */ apiMethod: string; /** Parameter schema. Order matters: it is the on-screen order. */ params: DriveParamSpec[]; } export declare const DRIVE_OPERATION_SPECS: Record;