@@ -62,21 +62,15 @@ export async function executeActor(
62
62
build = await getDefaultBuild . call ( this , actorId ) ;
63
63
}
64
64
65
- // 3. Get default input for this build
66
- const defaultInput = getDefaultInputsFromBuild ( build ) ;
67
-
68
- // 4. Merge default input and user's input (user's input overrides)
69
- const mergedInput = { ...defaultInput , ...userInput } ;
70
-
71
- // 5. Prepare query string
65
+ // 3. Prepare query string
72
66
const qs : Record < string , any > = { } ;
73
67
if ( timeout != null ) qs . timeout = timeout ;
74
68
if ( memory != null ) qs . memory = memory ;
75
69
if ( build ?. buildNumber ) qs . build = build . buildNumber ;
76
70
qs . waitForFinish = 0 ; // set initial run actor to not wait for finish
77
71
78
- // 6 . Run the actor
79
- const run = await runActorApi . call ( this , actorId , mergedInput , qs ) ;
72
+ // 4 . Run the actor
73
+ const run = await runActorApi . call ( this , actorId , userInput , qs ) ;
80
74
if ( ! run ?. data ?. id ) {
81
75
throw new NodeApiError ( this . getNode ( ) , {
82
76
message : `Run ID not found after running the actor` ,
@@ -86,7 +80,7 @@ export async function executeActor(
86
80
const runId = run . data . id ;
87
81
let lastRunData = run . data ;
88
82
89
- // 7 . If waitForFinish is true, poll for run status until it reaches a terminal state
83
+ // 5 . If waitForFinish is true, poll for run status until it reaches a terminal state
90
84
if ( waitForFinish ) {
91
85
lastRunData = await pollRunStatus . call ( this , runId ) ;
92
86
}
@@ -134,25 +128,6 @@ export async function getDefaultBuild(this: IExecuteFunctions, actorId: string)
134
128
return defaultBuildResp . data ;
135
129
}
136
130
137
- export function getDefaultInputsFromBuild ( build : any ) {
138
- const buildInputProperties = build ?. actorDefinition ?. input ?. properties ;
139
- const defaultInput : Record < string , any > = { } ;
140
- if ( buildInputProperties && typeof buildInputProperties === 'object' ) {
141
- for ( const [ key , property ] of Object . entries ( buildInputProperties ) ) {
142
- if (
143
- property &&
144
- typeof property === 'object' &&
145
- 'prefill' in property &&
146
- ( property as any ) . prefill !== undefined &&
147
- ( property as any ) . prefill !== null
148
- ) {
149
- defaultInput [ key ] = ( property as any ) . prefill ;
150
- }
151
- }
152
- }
153
- return defaultInput ;
154
- }
155
-
156
131
export async function runActorApi (
157
132
this : IExecuteFunctions ,
158
133
actorId : string ,
0 commit comments