/** * Generated by orval 🍺 * Do not edit manually. * TouchDesigner API * OpenAPI schema for generating TouchDesigner API client code * OpenAPI spec version: 1.6.0 */ 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'; }; /** * Severity reported by TouchDesigner. Many common failures (missing files, dangling operator references, shader compile failures) are surfaced as warnings rather than errors. Which collection an entry arrives in is the authority; this repeats it for clients that flatten the two. Stated in prose rather than as a schema default, because a default would tell a generator to read an absent level as "error", which is the opposite of what it means inside warnings. */ export type TdNodeErrorLevel = typeof TdNodeErrorLevel[keyof typeof TdNodeErrorLevel]; export declare const TdNodeErrorLevel: { readonly error: 'error'; readonly warning: 'warning'; }; /** * 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; /** Severity reported by TouchDesigner. Many common failures (missing files, dangling operator references, shader compile failures) are surfaced as warnings rather than errors. Which collection an entry arrives in is the authority; this repeats it for clients that flatten the two. Stated in prose rather than as a schema default, because a default would tell a generator to read an absent level as "error", which is the opposite of what it means inside warnings. */ level?: TdNodeErrorLevel; /** Message reported by TouchDesigner. May span multiple lines when the failure carries a Python traceback. */ message: string; } /** * Which stream was skipped */ export type TdNodeErrorReportSkippedStreamsItemStream = typeof TdNodeErrorReportSkippedStreamsItemStream[keyof typeof TdNodeErrorReportSkippedStreamsItemStream]; export declare const TdNodeErrorReportSkippedStreamsItemStream: { readonly errors: 'errors'; readonly warnings: 'warnings'; }; export type TdNodeErrorReportSkippedStreamsItem = { /** Which stream was skipped */ stream: TdNodeErrorReportSkippedStreamsItemStream; /** Why it could not be read */ reason: string; }; /** * Which stream it appeared on */ export type TdNodeErrorReportUnresolvedAnchorsItemStream = typeof TdNodeErrorReportUnresolvedAnchorsItemStream[keyof typeof TdNodeErrorReportUnresolvedAnchorsItemStream]; export declare const TdNodeErrorReportUnresolvedAnchorsItemStream: { readonly errors: 'errors'; readonly warnings: 'warnings'; }; export type TdNodeErrorReportUnresolvedAnchorsItem = { /** The path that looked like the start of a message */ path: string; /** Which stream it appeared on */ stream: TdNodeErrorReportUnresolvedAnchorsItemStream; }; /** * Which stream it appeared on */ export type TdNodeErrorReportFallbackAttributionsItemStream = typeof TdNodeErrorReportFallbackAttributionsItemStream[keyof typeof TdNodeErrorReportFallbackAttributionsItemStream]; export declare const TdNodeErrorReportFallbackAttributionsItemStream: { readonly errors: 'errors'; readonly warnings: 'warnings'; }; export type TdNodeErrorReportFallbackAttributionsItem = { /** The owner path that could not be resolved */ path: string; /** Which stream it appeared on */ stream: TdNodeErrorReportFallbackAttributionsItemStream; }; /** * Which stream it appeared on */ export type TdNodeErrorReportLookupFailuresItemStream = typeof TdNodeErrorReportLookupFailuresItemStream[keyof typeof TdNodeErrorReportLookupFailuresItemStream]; export declare const TdNodeErrorReportLookupFailuresItemStream: { readonly errors: 'errors'; readonly warnings: 'warnings'; }; export type TdNodeErrorReportLookupFailuresItem = { /** The path whose lookup failed */ path: string; /** Which stream it appeared on */ stream: TdNodeErrorReportLookupFailuresItemStream; }; /** * 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 entries with level "error" */ errorCount: number; /** Number of entries with level "warning". Absent from a TouchDesigner component older than this field; treat absence as unknown rather than zero where the distinction matters. */ warningCount?: number; /** Convenience flag indicating if any errors were found */ hasErrors: boolean; /** Convenience flag indicating if any warnings were found. Absent from an older component, so do not read its absence as "no warnings". */ hasWarnings?: boolean; /** True when a message stream could not be read, so the counts have no ceiling and hasErrors false does not mean clean. Declined anchors are reported in unresolvedAnchors instead: that content is present, so it is an attribution caveat rather than a completeness one. */ incomplete?: boolean; /** Streams that could not be read, with the reason for each */ skippedStreams?: TdNodeErrorReportSkippedStreamsItem[]; /** Paths that began a message but could not be resolved to an operator. Their lines were kept with the preceding entry, so a failure they describe may be folded into another operator's message rather than counted on its own. Paths repeat across messages and are listed once, so this is a lower bound on folded failures, not a ceiling. Only paths spelled like an operator reach this list: TouchDesigner refuses a name containing a dot, hyphen, space or other punctuation, so a path carrying one is ruled out without ever being called ambiguous. What remains is most likely an operator deleted after its message was recorded. */ unresolvedAnchors?: TdNodeErrorReportUnresolvedAnchorsItem[]; /** Owners named at the end of an entry's message that could not be resolved, so that entry's nodePath fell back to the node being queried. Nothing was folded and nothing is missing from the counts - the entry stands on its own - but its owner is a guess, and the path named here is still present in the message text. */ fallbackAttributions?: TdNodeErrorReportFallbackAttributionsItem[]; /** Paths whose operator could not be looked up, because the lookup itself failed rather than answering that nothing is there. Their entries are still counted - a failed lookup is no evidence against the path - but opType could not be determined, so an empty opType on those entries means "not determined" rather than "none". */ lookupFailures?: TdNodeErrorReportLookupFailuresItem[]; /** Entries with level "error". Kept error-only: a client written before warnings were collected renders every element of this array under an "N error(s) found" heading, so mixing them would have it present warnings as errors. */ errors: TdNodeError[]; /** Entries with level "warning". Absent from a TouchDesigner component older than this field, which is not the same as a node having none - see hasWarnings. */ warnings?: 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; /** Captured standard output (e.g. print statements) emitted while the script ran */ stdout?: string; /** Captured standard error output emitted while the script ran */ stderr?: string; } | 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 {};