/**
 * Local File Trigger Node - Version 1
 * Triggers a workflow on file system changes
 */


export interface LocalFileTriggerV1Params {
  triggerOn?: 'file' | 'folder' | Expression<string>;
/**
 * File to Watch
 * @displayOptions.show { triggerOn: ["file"] }
 */
    path?: string | Expression<string> | PlaceholderValue;
/**
 * The events to listen to
 * @displayOptions.show { triggerOn: ["folder"] }
 * @default []
 */
    events?: Array<'add' | 'change' | 'unlink' | 'addDir' | 'unlinkDir'>;
  options?: {
    /** Whether to wait until files finished writing to avoid partially read
     * @default false
     */
    awaitWriteFinish?: boolean | Expression<boolean>;
    /** Whether linked files/folders will also be watched (this includes symlinks, aliases on MacOS and shortcuts on Windows). Otherwise only the links themselves will be monitored).
     * @default true
     */
    followSymlinks?: boolean | Expression<boolean>;
    /** Files or paths to ignore. The whole path is tested, not just the filename. Supports &lt;a href="https://github.com/micromatch/anymatch"&gt;Anymatch&lt;/a&gt;- syntax. Regex patterns may not work on macOS. To ignore files based on substring matching, use the 'Ignore Mode' option with 'Contain'.
     */
    ignored?: string | Expression<string> | PlaceholderValue;
    /** Whether to ignore existing files/folders to not trigger an event
     * @default true
     */
    ignoreInitial?: boolean | Expression<boolean>;
    /** How deep into the folder structure to watch for changes
     * @default -1
     */
    depth?: 1 | 2 | 3 | 4 | 5 | 0 | -1 | Expression<number>;
    /** Whether to use polling for watching. Typically necessary to successfully watch files over a network.
     * @default false
     */
    usePolling?: boolean | Expression<boolean>;
    /** Whether to ignore files using regex matching (Anymatch patterns) or by checking if the path contains a specified value
     * @default match
     */
    ignoreMode?: 'match' | 'contain' | Expression<string>;
  };
}

interface LocalFileTriggerV1NodeBase {
  type: 'n8n-nodes-base.localFileTrigger';
  version: 1;
  isTrigger: true;
}

export type LocalFileTriggerV1ParamsNode = LocalFileTriggerV1NodeBase & {
  config: NodeConfig<LocalFileTriggerV1Params>;
};

export type LocalFileTriggerV1Node = LocalFileTriggerV1ParamsNode;