| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- declare namespace API {
-
- type activeVersion =
- {
- /** Unique identifier for this workflow version */
- 'versionId'?: string;
- /** The workflow this version belongs to */
- 'workflowId'?: string;
- 'nodes'?: node[];
- 'connections'?: Record<string, any>;
- /** Comma-separated list of author IDs who contributed to this version */
- 'authors'?: string;
- 'createdAt'?: string;
- 'updatedAt'?: string;
- }
-
-
- type audit =
- {
- 'Credentials Risk Report'?: Record<string, any>;
- 'Database Risk Report'?: Record<string, any>;
- 'Filesystem Risk Report'?: Record<string, any>;
- 'Nodes Risk Report'?: Record<string, any>;
- 'Instance Risk Report'?: Record<string, any>;
- }
-
-
- type Audit = [object Object];
-
- type create =
- {
- 'id'?: string;
- 'key': string;
- 'value': string;
- 'type'?: string;
- 'projectId'?: string;
- }
-
-
- type createCredentialResponse =
- {
- 'id': string;
- 'name': string;
- 'type': string;
- 'createdAt': string;
- 'updatedAt': string;
- }
-
-
- type credential =
- {
- 'id'?: string;
- 'name': string;
- 'type': string;
- 'data': Record<string, any>;
- /** Whether this credential has resolvable fields */
- 'isResolvable'?: boolean;
- 'createdAt'?: string;
- 'updatedAt'?: string;
- }
-
-
- type Credential = [object Object];
-
- type credentialType =
- {
- 'displayName'?: string;
- 'name'?: string;
- 'type'?: string;
- 'default'?: string;
- }
-
-
- type CredentialType = [object Object];
-
- type deleteCredentialParams =
- {
- /** The credential ID that needs to be deleted */
- 'id': string;
- }
-
-
- type deleteExecutionsIdParams =
- {
- ''?: any;
- }
-
-
- type deleteProjectsProjectIdParams =
- {
- /** The ID of the project. */
- 'projectId': string;
- }
-
-
- type deleteProjectsProjectIdUsersUserIdParams =
- {
- /** The ID of the project. */
- 'projectId': string;
- /** The ID of the user. */
- 'userId': string;
- }
-
-
- type deleteTagsIdParams =
- {
- ''?: any;
- }
-
-
- type deleteUsersIdParams =
- {
- ''?: any;
- }
-
-
- type deleteVariablesIdParams =
- {
- ''?: any;
- }
-
-
- type deleteWorkflowsIdParams =
- {
- ''?: any;
- }
-
-
- type error =
- {
- 'code'?: string;
- 'message': string;
- 'description'?: string;
- }
-
-
- type Error = [object Object];
-
- type execution =
- {
- 'id'?: number;
- 'data'?: Record<string, any>;
- 'finished'?: boolean;
- 'mode'?: "cli" | "error" | "integrated" | "internal" | "manual" | "retry" | "trigger" | "webhook" | "evaluation" | "chat";
- 'retryOf'?: number;
- 'retrySuccessId'?: number;
- 'startedAt'?: string;
- /** The time at which the execution stopped. Will only be null for executions that still have the status 'running'. */
- 'stoppedAt'?: string;
- 'workflowId'?: number;
- 'waitTill'?: string;
- 'customData'?: Record<string, any>;
- 'status'?: "canceled" | "crashed" | "error" | "new" | "running" | "success" | "unknown" | "waiting";
- }
-
-
- type Execution = [object Object];
-
- type executionList =
- {
- 'data'?: execution[];
- /** Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type ExecutionList = [object Object];
-
- type getCredentialsSchemaCredentialTypeNameParams =
- {
- /** The credential type name that you want to get the schema for */
- 'credentialTypeName': string;
- }
-
-
- type getExecutionsIdParams =
- {
- ''?: any;
- ''?: any;
- }
-
-
- type getExecutionsParams =
- {
- ''?: any;
- /** Status to filter the executions by. */
- 'status'?: "canceled" | "error" | "running" | "success" | "waiting";
- /** Workflow to filter the executions by. */
- 'workflowId'?: string;
- 'projectId'?: string;
- ''?: any;
- ''?: any;
- }
-
-
- type getProjectsParams =
- {
- ''?: any;
- ''?: any;
- }
-
-
- type getTagsIdParams =
- {
- ''?: any;
- }
-
-
- type getTagsParams =
- {
- ''?: any;
- ''?: any;
- }
-
-
- type getUsersIdParams =
- {
- ''?: any;
- ''?: any;
- }
-
-
- type getUsersParams =
- {
- ''?: any;
- ''?: any;
- ''?: any;
- 'projectId'?: string;
- }
-
-
- type getVariablesParams =
- {
- ''?: any;
- ''?: any;
- 'projectId'?: string;
- 'state'?: "empty";
- }
-
-
- type getWorkflowsIdParams =
- {
- /** Set this to avoid retrieving pinned data */
- 'excludePinnedData'?: boolean;
- ''?: any;
- }
-
-
- type getWorkflowsIdTagsParams =
- {
- ''?: any;
- }
-
-
- type getWorkflowsIdVersionIdParams =
- {
- ''?: any;
- /** The version ID to retrieve */
- 'versionId': string;
- }
-
-
- type getWorkflowsParams =
- {
- 'active'?: boolean;
- 'tags'?: string;
- 'name'?: string;
- 'projectId'?: string;
- /** Set this to avoid retrieving pinned data */
- 'excludePinnedData'?: boolean;
- ''?: any;
- ''?: any;
- }
-
-
- type importResult =
- {
- 'variables'?: { 'added'?: string[]; 'changed'?: string[]; };
- 'credentials'?: { 'id'?: string; 'name'?: string; 'type'?: string; }[];
- 'workflows'?: { 'id'?: string; 'name'?: string; }[];
- 'tags'?: { 'tags'?: { 'id'?: string; 'name'?: string; }[]; 'mappings'?: { 'workflowId'?: string; 'tagId'?: string; }[]; };
- }
-
-
- type ImportResult = [object Object];
-
- type node =
- {
- 'id'?: string;
- 'name'?: string;
- 'webhookId'?: string;
- 'disabled'?: boolean;
- 'notesInFlow'?: boolean;
- 'notes'?: string;
- 'type'?: string;
- 'typeVersion'?: number;
- 'executeOnce'?: boolean;
- 'alwaysOutputData'?: boolean;
- 'retryOnFail'?: boolean;
- 'maxTries'?: number;
- 'waitBetweenTries'?: number;
- /** use onError instead */
- 'continueOnFail'?: boolean;
- 'onError'?: string;
- 'position'?: number[];
- 'parameters'?: Record<string, any>;
- 'credentials'?: Record<string, any>;
- 'createdAt'?: string;
- 'updatedAt'?: string;
- }
-
-
- type Node = [object Object];
-
- type patchProjectsProjectIdUsersUserIdParams =
- {
- /** The ID of the project. */
- 'projectId': string;
- /** The ID of the user. */
- 'userId': string;
- }
-
-
- type patchUsersIdRoleParams =
- {
- ''?: any;
- }
-
-
- type postExecutionsIdRetryParams =
- {
- ''?: any;
- }
-
-
- type postProjectsProjectIdUsersParams =
- {
- /** The ID of the project. */
- 'projectId': string;
- }
-
-
- type postWorkflowsIdActivateParams =
- {
- ''?: any;
- }
-
-
- type postWorkflowsIdDeactivateParams =
- {
- ''?: any;
- }
-
-
- type project =
- {
- 'id'?: string;
- 'name': string;
- 'type'?: string;
- }
-
-
- type projectList =
- {
- 'data'?: project[];
- /** Paginate through projects by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type pull =
- {
- 'force'?: boolean;
- 'variables'?: Record<string, any>;
- }
-
-
- type Pull = [object Object];
-
- type putCredentialsIdTransferParams =
- {
- ''?: any;
- }
-
-
- type putProjectsProjectIdParams =
- {
- /** The ID of the project. */
- 'projectId': string;
- }
-
-
- type putTagsIdParams =
- {
- ''?: any;
- }
-
-
- type putVariablesIdParams =
- {
- ''?: any;
- }
-
-
- type putWorkflowsIdParams =
- {
- ''?: any;
- }
-
-
- type putWorkflowsIdTagsParams =
- {
- ''?: any;
- }
-
-
- type putWorkflowsIdTransferParams =
- {
- ''?: any;
- }
-
-
- type role =
- {
- 'id'?: number;
- 'name'?: string;
- 'scope'?: string;
- /** Time the role was created. */
- 'createdAt'?: string;
- /** Last time the role was updated. */
- 'updatedAt'?: string;
- }
-
-
- type Role = [object Object];
-
- type sharedWorkflow =
- {
- 'role'?: string;
- 'workflowId'?: string;
- 'projectId'?: string;
- 'project'?: { 'id'?: string; 'name'?: string; 'type'?: string; };
- 'createdAt'?: string;
- 'updatedAt'?: string;
- }
-
-
- type tag =
- {
- 'id'?: string;
- 'name': string;
- 'createdAt'?: string;
- 'updatedAt'?: string;
- }
-
-
- type Tag = [object Object];
-
- type tagIds = Record<string, any>;
-
- type tagList =
- {
- 'data'?: tag[];
- /** Paginate through tags by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type updateCredentialParams =
- {
- /** The credential ID that needs to be updated */
- 'id': string;
- }
-
-
- type updateCredentialRequest =
- {
- /** The name of the credential */
- 'name'?: string;
- /** The credential type. If changing type, data must also be provided. */
- 'type'?: string;
- /** The credential data. Required when changing credential type. */
- 'data'?: Record<string, any>;
- /** Whether this credential is available globally */
- 'isGlobal'?: boolean;
- /** Whether this credential has resolvable fields */
- 'isResolvable'?: boolean;
- /** If true, unredacts and merges existing credential data with the provided data. If false, replaces the entire data object. */
- 'isPartialData'?: boolean;
- }
-
-
- type user =
- {
- 'id'?: string;
- 'email': string;
- /** User's first name */
- 'firstName'?: string;
- /** User's last name */
- 'lastName'?: string;
- /** Whether the user finished setting up their account in response to the invitation (true) or not (false). */
- 'isPending'?: boolean;
- /** Time the user was created. */
- 'createdAt'?: string;
- /** Last time the user was updated. */
- 'updatedAt'?: string;
- 'role'?: string;
- }
-
-
- type User = [object Object];
-
- type userList =
- {
- 'data'?: user[];
- /** Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type UserList = [object Object];
-
- type variable =
- {
- 'id'?: string;
- 'key': string;
- 'value': string;
- 'type'?: string;
- 'project'?: project;
- }
-
-
- type variableList =
- {
- 'data'?: variable[];
- /** Paginate through variables by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type workflow =
- {
- 'id'?: string;
- 'name': string;
- 'active'?: boolean;
- 'createdAt'?: string;
- 'updatedAt'?: string;
- 'nodes': node[];
- 'connections': Record<string, any>;
- 'settings': workflowSettings;
- 'staticData'?: string | Record<string, any>;
- 'tags'?: tag[];
- 'shared'?: sharedWorkflow[];
- 'activeVersion'?: activeVersion;
- }
-
-
- type Workflow = [object Object];
-
- type workflowList =
- {
- 'data'?: workflow[];
- /** Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection. */
- 'nextCursor'?: string;
- }
-
-
- type WorkflowList = [object Object];
-
- type workflowSettings =
- {
- 'saveExecutionProgress'?: boolean;
- 'saveManualExecutions'?: boolean;
- 'saveDataErrorExecution'?: "all" | "none";
- 'saveDataSuccessExecution'?: "all" | "none";
- 'executionTimeout'?: number;
- /** The ID of the workflow that contains the error trigger node. */
- 'errorWorkflow'?: string;
- 'timezone'?: string;
- 'executionOrder'?: string;
- /** Controls which workflows are allowed to call this workflow using the Execute Workflow node.
- Available options:
- - `any`: Any workflow can call this workflow (no restrictions)
- - `none`: No other workflows can call this workflow (completely blocked)
- - `workflowsFromSameOwner` (default): Only workflows owned by the same project can call this workflow
- * For personal projects: Only workflows created by the same user
- * For team projects: Only workflows within the same team project
- - `workflowsFromAList`: Only specific workflows listed in the `callerIds` field can call this workflow
- * Requires the `callerIds` field to specify which workflow IDs are allowed
- * See `callerIds` field documentation for usage
- */
- 'callerPolicy'?: "any" | "none" | "workflowsFromAList" | "workflowsFromSameOwner";
- /** Comma-separated list of workflow IDs allowed to call this workflow (only used with workflowsFromAList policy) */
- 'callerIds'?: string;
- /** Estimated time saved per execution in minutes */
- 'timeSavedPerExecution'?: number;
- /** Controls whether this workflow is accessible via the Model Context Protocol (MCP).
- When enabled, this workflow can be called by MCP clients (AI assistants and other tools
- that support MCP). This allows external AI tools to discover and execute this workflow
- as part of their capabilities.
- Requirements for enabling MCP access:
- - The workflow must be active (not deactivated)
- - The workflow must contain at least one active Webhook node
- - Only webhook-triggered workflows can be exposed via MCP
- Security note: When a workflow is available in MCP, it can be discovered and executed
- by any MCP client that has the appropriate API credentials for your n8n instance.
- */
- 'availableInMCP'?: boolean;
- }
-
-
- type WorkflowSettings = [object Object];
-
- type workflowTags = tag[];
-
- type workflowVersion =
- {
- /** The version ID of this workflow snapshot */
- 'versionId': string;
- /** The workflow ID this version belongs to */
- 'workflowId': string;
- /** Nodes as they were in this version */
- 'nodes': node[];
- /** Connections as they were in this version */
- 'connections': Record<string, any>;
- /** Authors who created this version */
- 'authors': string;
- /** Workflow name at this version */
- 'name'?: string;
- /** Workflow description at this version */
- 'description'?: string;
- /** When this version was created */
- 'createdAt'?: string;
- /** When this version was last updated */
- 'updatedAt'?: string;
- }
-
-
- }
|