@@ -118,6 +118,7 @@ const itemResultFactory = Factory.define<ItemResultReadResponse>(() => ({
118118 terminated_at : faker . date . recent ( ) . toISOString ( ) ,
119119 output_artifacts : outputArtifactFactory . buildList ( faker . number . int ( { min : 0 , max : 3 } ) ) ,
120120 error_code : null ,
121+ input_artifacts : [ ] ,
121122} ) ) ;
122123
123124const runFactory = Factory . define < RunReadResponse > ( ( ) => ( {
@@ -246,6 +247,12 @@ export const handlers = {
246247 http . get ( '*/v1/runs/:runId/items' , ( ) => {
247248 return HttpResponse . json ( mockResponses . runResultsSuccess , { status : 200 } ) ;
248249 } ) ,
250+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
251+ return HttpResponse . json (
252+ { url : 'https://storage.example.com/presigned-url' } ,
253+ { status : 200 }
254+ ) ;
255+ } ) ,
249256 ] ,
250257
251258 // Empty responses
@@ -265,6 +272,12 @@ export const handlers = {
265272 http . get ( '*/v1/runs/:runId/items' , ( ) => {
266273 return HttpResponse . json ( [ ] , { status : 200 } ) ;
267274 } ) ,
275+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
276+ return HttpResponse . json (
277+ { url : 'https://storage.example.com/presigned-url' } ,
278+ { status : 200 }
279+ ) ;
280+ } ) ,
268281 ] ,
269282
270283 // Not found responses
@@ -293,6 +306,9 @@ export const handlers = {
293306 http . get ( '*/v1/runs/:runId/items' , ( ) => {
294307 return HttpResponse . json ( mockResponses . error , { status : 404 } ) ;
295308 } ) ,
309+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
310+ return HttpResponse . json ( mockResponses . error , { status : 404 } ) ;
311+ } ) ,
296312 ] ,
297313
298314 validationError : [
@@ -320,6 +336,9 @@ export const handlers = {
320336 http . get ( '*/v1/runs/:runId/items' , ( ) => {
321337 return HttpResponse . json ( mockResponses . validationError , { status : 422 } ) ;
322338 } ) ,
339+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
340+ return HttpResponse . json ( mockResponses . validationError , { status : 422 } ) ;
341+ } ) ,
323342 ] ,
324343
325344 internalServerError : [
@@ -347,6 +366,9 @@ export const handlers = {
347366 http . get ( '*/v1/runs/:runId/items' , ( ) => {
348367 return HttpResponse . json ( mockResponses . error , { status : 500 } ) ;
349368 } ) ,
369+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
370+ return HttpResponse . json ( mockResponses . error , { status : 500 } ) ;
371+ } ) ,
350372 ] ,
351373
352374 // Network error (connection failure)
@@ -375,6 +397,9 @@ export const handlers = {
375397 http . get ( '*/v1/runs/:runId/items' , ( ) => {
376398 return HttpResponse . error ( ) ;
377399 } ) ,
400+ http . get ( '*/v1/runs/:runId/artifacts/:artifactId/file' , ( ) => {
401+ return HttpResponse . error ( ) ;
402+ } ) ,
378403 ] ,
379404} ;
380405
0 commit comments