File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed
Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,12 @@ export const PulseBlock: BlockConfig<PulseParserOutput> = {
130130}
131131
132132const pulseV2Inputs = PulseBlock . inputs
133- ? Object . fromEntries ( Object . entries ( PulseBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' ) )
133+ ? {
134+ ...Object . fromEntries (
135+ Object . entries ( PulseBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' )
136+ ) ,
137+ fileReference : { type : 'json' , description : 'File reference (advanced mode)' } ,
138+ }
134139 : { }
135140const pulseV2SubBlocks = ( PulseBlock . subBlocks || [ ] ) . flatMap ( ( subBlock ) => {
136141 if ( subBlock . id === 'filePath' ) {
@@ -178,7 +183,9 @@ export const PulseV2Block: BlockConfig<PulseParserOutput> = {
178183 apiKey : params . apiKey . trim ( ) ,
179184 }
180185
181- const normalizedFiles = normalizeFileInput ( params . fileUpload || params . document )
186+ const normalizedFiles = normalizeFileInput (
187+ params . fileUpload || params . fileReference || params . document
188+ )
182189 if ( ! normalizedFiles || normalizedFiles . length === 0 ) {
183190 throw new Error ( 'Document file is required' )
184191 }
Original file line number Diff line number Diff line change @@ -136,7 +136,12 @@ export const ReductoBlock: BlockConfig<ReductoParserOutput> = {
136136}
137137
138138const reductoV2Inputs = ReductoBlock . inputs
139- ? Object . fromEntries ( Object . entries ( ReductoBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' ) )
139+ ? {
140+ ...Object . fromEntries (
141+ Object . entries ( ReductoBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' )
142+ ) ,
143+ fileReference : { type : 'json' , description : 'File reference (advanced mode)' } ,
144+ }
140145 : { }
141146const reductoV2SubBlocks = ( ReductoBlock . subBlocks || [ ] ) . flatMap ( ( subBlock ) => {
142147 if ( subBlock . id === 'filePath' ) {
@@ -182,7 +187,9 @@ export const ReductoV2Block: BlockConfig<ReductoParserOutput> = {
182187 apiKey : params . apiKey . trim ( ) ,
183188 }
184189
185- const documentInput = normalizeFileInput ( params . fileUpload || params . document )
190+ const documentInput = normalizeFileInput (
191+ params . fileUpload || params . fileReference || params . document
192+ )
186193 if ( ! documentInput || documentInput . length === 0 ) {
187194 throw new Error ( 'PDF document file is required' )
188195 }
Original file line number Diff line number Diff line change @@ -193,7 +193,12 @@ export const TextractBlock: BlockConfig<TextractParserOutput> = {
193193}
194194
195195const textractV2Inputs = TextractBlock . inputs
196- ? Object . fromEntries ( Object . entries ( TextractBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' ) )
196+ ? {
197+ ...Object . fromEntries (
198+ Object . entries ( TextractBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' )
199+ ) ,
200+ fileReference : { type : 'json' , description : 'File reference (advanced mode)' } ,
201+ }
197202 : { }
198203const textractV2SubBlocks = ( TextractBlock . subBlocks || [ ] ) . flatMap ( ( subBlock ) => {
199204 if ( subBlock . id === 'filePath' ) {
@@ -260,7 +265,9 @@ export const TextractV2Block: BlockConfig<TextractParserOutput> = {
260265 }
261266 parameters . s3Uri = params . s3Uri . trim ( )
262267 } else {
263- const files = normalizeFileInput ( params . fileUpload || params . document )
268+ const files = normalizeFileInput (
269+ params . fileUpload || params . fileReference || params . document
270+ )
264271 if ( ! files || files . length === 0 ) {
265272 throw new Error ( 'Document file is required' )
266273 }
You can’t perform that action at this time.
0 commit comments