/** * Add action payload definition. */ type Add = { /** * The action name. */ name?: string; /** * Optional action note. */ note?: string; /** * Base64-encoded attachment data. */ attachment?: string; /** * Attachment file name. Repeat values to match multiple attachments. */ attachmentName?: string | string[]; /** * Whether children mark the project complete. */ autocomplete?: boolean; /** * The completion date and time. */ completed?: string; /** * Tag/context name to assign, using the OmniFocus URL scheme parameter name. */ context?: string; /** * Defer date and time, such as "jun 25 8am". */ defer?: string; /** * Due date and time, such as "jun 25 8am". */ due?: string; /** * Time estimate, such as "30m". */ estimate?: string; /** * Whether the action should be flagged. */ flag?: boolean; /** * Whether the action should have parallel children. */ parallel?: boolean; /** * Project name to assign. */ project?: string; /** * Whether OmniFocus should reveal the new item. */ revealNewItem?: boolean; /** * Repeat method. */ repeatMethod?: 'fixed' | 'start-after-completion' | 'due-after-completion'; /** * Repeat rule string. */ repeatRule?: string; /** * Whether OmniFocus should save without additional confirmation in x-callback-url flows. */ autosave?: boolean; /** * x-callback-url success URL. */ xSuccess?: string; }; /** * Add a new action to OmniFocus. * * @param payload Add action payload. * @returns OmniFocus add URL. * @example * add({ name: 'Pick up milk', note: 'You gotta' }) * // => 'omnifocus:///add?name=Pick%20up%20milk¬e=You%20gotta' * @example * add({ name: 'Email team', project: 'Launch', context: 'Mac', flag: true }) * // => 'omnifocus:///add?name=Email%20team&context=Mac&flag=true&project=Launch' * @example * add({ name: 'My shiny new task', autosave: true, xSuccess: 'source-app:///' }) * // => 'omnifocus://x-callback-url/add?name=My%20shiny%20new%20task&autosave=true&x-success=source-app%3A%2F%2F%2F' * @link https://inside.omnifocus.com/url-schemes */ export declare function add(payload?: Add): string; export {};