/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * TouchDesigner API * OpenAPI schema for generating TouchDesigner API client code * OpenAPI spec version: 1.4.3 */ import { customInstance } from '../../api/customInstance.js'; import type { BodyType } from '../../api/customInstance.js'; export type TdNodeProperties = { [key: string]: unknown; }; /** * Information about a TouchDesigner node */ export interface TdNode { id: number; opType: string; name: string; path: string; properties: TdNodeProperties; } export type TdNodeFamilyType = typeof TdNodeFamilyType[keyof typeof TdNodeFamilyType]; export declare const TdNodeFamilyType: { readonly COMP: "COMP"; readonly CHOP: "CHOP"; readonly TOP: "TOP"; readonly SOP: "SOP"; readonly DAT: "DAT"; readonly MAT: "MAT"; readonly CUSTOM: "CUSTOM"; }; /** * Single node error entry */ export interface TdNodeError { /** Absolute operator path that reported the error */ nodePath: string; /** Name of the operator */ nodeName: string; /** TouchDesigner operator type */ opType: string; /** Error message reported by TouchDesigner */ message: string; } /** * Aggregated node error report */ export interface TdNodeErrorReport { /** Path that was inspected for errors */ nodePath: string; /** Name of the inspected node */ nodeName: string; /** Operator type of the inspected node */ opType: string; /** Number of errors that were discovered */ errorCount: number; /** Convenience flag indicating if any errors were found */ hasErrors: boolean; /** Collection of raw node errors */ errors: TdNodeError[]; } /** * Type of the Python entity */ export type TdPythonClassDetailsType = typeof TdPythonClassDetailsType[keyof typeof TdPythonClassDetailsType]; export declare const TdPythonClassDetailsType: { readonly class: "class"; readonly module: "module"; readonly function: "function"; readonly object: "object"; }; /** * Information about a Python method */ export interface TdPythonMethodInfo { /** Method name */ name: string; /** Method signature including parameters */ signature?: string; /** Description of the method */ description?: string; } /** * Current value of the property (if serializable) * @nullable */ export type TdPythonPropertyInfoValue = { [key: string]: unknown; } | null; /** * Information about a Python property */ export interface TdPythonPropertyInfo { /** Property name */ name: string; /** Type of the property */ type: string; /** * Current value of the property (if serializable) * @nullable */ value?: TdPythonPropertyInfoValue; } /** * Detailed information about a Python class or module */ export interface TdPythonClassDetails { /** Name of the class or module */ name: string; /** Type of the Python entity */ type: TdPythonClassDetailsType; /** Description of the class or module */ description?: string; /** List of methods available in the class or module */ methods: TdPythonMethodInfo[]; /** List of properties available in the class or module */ properties: TdPythonPropertyInfo[]; } /** * Type of the Python entity */ export type TdPythonClassInfoType = typeof TdPythonClassInfoType[keyof typeof TdPythonClassInfoType]; export declare const TdPythonClassInfoType: { readonly class: "class"; readonly module: "module"; readonly function: "function"; readonly object: "object"; }; /** * Information about a Python class or module available in TouchDesigner */ export interface TdPythonClassInfo { /** Name of the class or module */ name: string; /** Type of the Python entity */ type: TdPythonClassInfoType; /** Description of the class or module */ description?: string; } /** * Raw Python help() output for a TouchDesigner module or class */ export interface ModuleHelp { /** Normalized module/class name the help text was generated for */ moduleName: string; /** Captured output from Python's help() function */ helpText: string; } export type GetNodesParams = { /** * e.g., "/project1" */ parentPath: string; /** * e.g., "null*" */ pattern?: string; /** * Include node properties in response */ includeProperties?: boolean; }; /** * @nullable */ export type GetNodes200Data = { /** Result of the execution */ nodes?: TdNode[]; } | null; export type GetNodes200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: GetNodes200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type CreateNodeBody = { /** Path to the parent node (e.g., /project1) */ parentPath: string; /** Type of the node to create (e.g., textTop) */ nodeType: string; /** Name of the new node (optional) */ nodeName?: string; }; /** * @nullable */ export type CreateNode200Data = { /** Result of the execution */ result?: TdNode; } | null; export type CreateNode200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: CreateNode200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type DeleteNodeParams = { /** * e.g., "/project1/geo1" */ nodePath: string; }; /** * @nullable */ export type DeleteNode200Data = { /** Whether the node was successfully deleted */ deleted?: boolean; /** Information about the deleted node */ node?: TdNode; } | null; export type DeleteNode200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: DeleteNode200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type GetNodeDetailParams = { /** * e.g., "/project1/textTOP" */ nodePath: string; }; export type GetNodeDetail200 = { /** Whether the operation was successful */ success: boolean; data: TdNode | null; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type UpdateNodeBodyProperties = { [key: string]: unknown; }; export type UpdateNodeBody = { /** Path to the node (e.g., /project1/null1) */ nodePath: string; properties: UpdateNodeBodyProperties; }; export type UpdateNode200DataFailedItem = { /** Name of the property that failed to update */ name?: string; /** Reason for the failure */ reason?: string; }; /** * @nullable */ export type UpdateNode200Data = { /** Path of the node that was updated */ path?: string; /** List of property names that were successfully updated */ updated?: string[]; /** List of properties that failed to update */ failed?: UpdateNode200DataFailedItem[]; /** Summary message about the update operation */ message?: string; } | null; export type UpdateNode200 = { /** Whether the update operation was successful */ success: boolean; /** @nullable */ data: UpdateNode200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type GetNodeErrorsParams = { /** * Absolute path to the node to inspect. e.g., "/project1/text1" */ nodePath: string; }; export type GetNodeErrors200 = { /** Whether the operation was successful */ success: boolean; data: TdNodeErrorReport; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; /** * @nullable */ export type GetTdPythonClasses200Data = { classes?: TdPythonClassInfo[]; } | null; export type GetTdPythonClasses200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: GetTdPythonClasses200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type GetTdPythonClassDetails200 = { /** Whether the operation was successful */ success: boolean; data: TdPythonClassDetails | null; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type GetModuleHelpParams = { /** * Module or class name (e.g., "noiseCHOP", "td.noiseCHOP", "tdu"). */ moduleName: string; }; export type GetModuleHelp200 = { /** Whether the operation was successful */ success: boolean; data: ModuleHelp | null; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; /** * Keyword arguments for the method call */ export type ExecNodeMethodBodyKwargs = { [key: string]: unknown; }; export type ExecNodeMethodBody = { /** Path to the node (e.g., /project1/null1) */ nodePath: string; /** Name of the method to call */ method: string; /** List of arguments for the method call */ args?: (string | number | boolean)[]; /** Keyword arguments for the method call */ kwargs?: ExecNodeMethodBodyKwargs; }; /** * @nullable */ export type ExecNodeMethod200Data = { /** Result of the method call. Can be any type (equivalent to unknown in TypeScript). */ result: unknown; } | null; export type ExecNodeMethod200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: ExecNodeMethod200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; export type ExecPythonScriptBody = { /** e.g., "op('/project1/text_over_image').outputConnectors[0].connect(op('/project1/out1'))" */ script: string; }; /** * Result of the executed script */ export type ExecPythonScript200DataResult = { /** Return value of the executed script, can be any serializable value */ value?: unknown; }; /** * @nullable */ export type ExecPythonScript200Data = { /** Result of the executed script */ result: ExecPythonScript200DataResult; } | null; export type ExecPythonScript200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: ExecPythonScript200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; /** * @nullable */ export type GetTdInfo200Data = { /** Version of the TouchDesigner MCP API server */ mcpApiVersion: string; /** Operating system name */ osName: string; /** Operating system version */ osVersion: string; /** Server name (typically "TouchDesigner") */ server: string; /** TouchDesigner version number */ version: string; } | null; export type GetTdInfo200 = { /** Whether the operation was successful */ success: boolean; /** @nullable */ data: GetTdInfo200Data; /** * Error message if the operation was not successful * @nullable */ error: string | null; }; type SecondParameter unknown> = Parameters[1]; /** * @summary Get nodes in the path */ export declare const getNodes: (params: GetNodesParams, options?: SecondParameter>) => Promise; /** * @summary Create a new node */ export declare const createNode: (createNodeBody: BodyType, options?: SecondParameter>) => Promise; /** * @summary Delete an existing node */ export declare const deleteNode: (params: DeleteNodeParams, options?: SecondParameter>) => Promise; /** * Retrieves detailed information about a specific node including its properties, parameters and connections * @summary Get node detail */ export declare const getNodeDetail: (params: GetNodeDetailParams, options?: SecondParameter>) => Promise; /** * @summary Update node properties */ export declare const updateNode: (updateNodeBody?: BodyType, options?: SecondParameter>) => Promise; /** * Collects TouchDesigner error messages for a node and its children * @summary Get node errors */ export declare const getNodeErrors: (params: GetNodeErrorsParams, options?: SecondParameter>) => Promise; /** * Returns a list of Python classes, modules, and functions available in TouchDesigner * @summary Get a list of Python classes and modules */ export declare const getTdPythonClasses: (options?: SecondParameter>) => Promise; /** * Returns detailed information about a specific Python class, module, or function including methods, properties, and documentation * @summary Get details of a specific Python class or module */ export declare const getTdPythonClassDetails: (className: string, options?: SecondParameter>) => Promise; /** * Retrieve Python help() documentation for TouchDesigner modules, classes, or utilities like tdu. * @summary Get module/class Python help documentation */ export declare const getModuleHelp: (params: GetModuleHelpParams, options?: SecondParameter>) => Promise; /** * Call a method on the node at the specified path (e.g., /project1). * This allows operations equivalent to TouchDesigner's Python API such as * `parent_comp = op('/project1')` and `parent_comp.create('textTOP', 'myText')`. * @summary Call a method of the specified node */ export declare const execNodeMethod: (execNodeMethodBody: BodyType, options?: SecondParameter>) => Promise; /** * Execute a Python script directly in TouchDesigner. * Multiline scripts and scripts containing comments are supported. * The script can optionally set a `result` variable to explicitly return a value. * This endpoint allows you to interact with TouchDesigner nodes programmatically. * @summary Execute python code on the server */ export declare const execPythonScript: (execPythonScriptBody: BodyType, options?: SecondParameter>) => Promise; /** * Returns information about the TouchDesigner * @summary Get TouchDesigner information */ export declare const getTdInfo: (options?: SecondParameter>) => Promise; export type GetNodesResult = NonNullable>>; export type CreateNodeResult = NonNullable>>; export type DeleteNodeResult = NonNullable>>; export type GetNodeDetailResult = NonNullable>>; export type UpdateNodeResult = NonNullable>>; export type GetNodeErrorsResult = NonNullable>>; export type GetTdPythonClassesResult = NonNullable>>; export type GetTdPythonClassDetailsResult = NonNullable>>; export type GetModuleHelpResult = NonNullable>>; export type ExecNodeMethodResult = NonNullable>>; export type ExecPythonScriptResult = NonNullable>>; export type GetTdInfoResult = NonNullable>>; export {};