@@ -418,7 +418,7 @@ export class CliApiClient {
418
418
heartbeatRun : this . devHeartbeatRun . bind ( this ) ,
419
419
startRunAttempt : this . devStartRunAttempt . bind ( this ) ,
420
420
completeRunAttempt : this . devCompleteRunAttempt . bind ( this ) ,
421
- } ;
421
+ } as const ;
422
422
}
423
423
424
424
get workers ( ) {
@@ -481,7 +481,7 @@ export class CliApiClient {
481
481
} ) ;
482
482
}
483
483
484
- private async devConfig ( ) {
484
+ private async devConfig ( ) : Promise < ApiResult < DevConfigResponseBody > > {
485
485
if ( ! this . accessToken ) {
486
486
throw new Error ( "devConfig: No access token" ) ;
487
487
}
@@ -532,7 +532,9 @@ export class CliApiClient {
532
532
} ) ;
533
533
}
534
534
535
- private async devDequeue ( body : DevDequeueRequestBody ) {
535
+ private async devDequeue (
536
+ body : DevDequeueRequestBody
537
+ ) : Promise < ApiResult < DevDequeueResponseBody > > {
536
538
if ( ! this . accessToken ) {
537
539
throw new Error ( "devConfig: No access token" ) ;
538
540
}
@@ -547,7 +549,10 @@ export class CliApiClient {
547
549
} ) ;
548
550
}
549
551
550
- private async devSendDebugLog ( runId : string , body : WorkloadDebugLogRequestBody ) {
552
+ private async devSendDebugLog (
553
+ runId : string ,
554
+ body : WorkloadDebugLogRequestBody
555
+ ) : Promise < ApiResult < unknown > > {
551
556
if ( ! this . accessToken ) {
552
557
throw new Error ( "devConfig: No access token" ) ;
553
558
}
@@ -563,7 +568,9 @@ export class CliApiClient {
563
568
} ) ;
564
569
}
565
570
566
- private async devGetRunExecutionData ( runId : string ) {
571
+ private async devGetRunExecutionData (
572
+ runId : string
573
+ ) : Promise < ApiResult < WorkloadRunLatestSnapshotResponseBody > > {
567
574
return wrapZodFetch (
568
575
WorkloadRunLatestSnapshotResponseBody ,
569
576
`${ this . apiURL } /engine/v1/dev/runs/${ runId } /snapshots/latest` ,
@@ -581,7 +588,7 @@ export class CliApiClient {
581
588
runId : string ,
582
589
snapshotId : string ,
583
590
body : WorkloadHeartbeatRequestBody
584
- ) {
591
+ ) : Promise < ApiResult < WorkloadHeartbeatResponseBody > > {
585
592
return wrapZodFetch (
586
593
WorkloadHeartbeatResponseBody ,
587
594
`${ this . apiURL } /engine/v1/dev/runs/${ runId } /snapshots/${ snapshotId } /heartbeat` ,
@@ -597,7 +604,10 @@ export class CliApiClient {
597
604
) ;
598
605
}
599
606
600
- private async devStartRunAttempt ( runId : string , snapshotId : string ) {
607
+ private async devStartRunAttempt (
608
+ runId : string ,
609
+ snapshotId : string
610
+ ) : Promise < ApiResult < WorkloadRunAttemptStartResponseBody > > {
601
611
return wrapZodFetch (
602
612
WorkloadRunAttemptStartResponseBody ,
603
613
`${ this . apiURL } /engine/v1/dev/runs/${ runId } /snapshots/${ snapshotId } /attempts/start` ,
@@ -617,7 +627,7 @@ export class CliApiClient {
617
627
runId : string ,
618
628
snapshotId : string ,
619
629
body : WorkloadRunAttemptCompleteRequestBody
620
- ) {
630
+ ) : Promise < ApiResult < WorkloadRunAttemptCompleteResponseBody > > {
621
631
return wrapZodFetch (
622
632
WorkloadRunAttemptCompleteResponseBody ,
623
633
`${ this . apiURL } /engine/v1/dev/runs/${ runId } /snapshots/${ snapshotId } /attempts/complete` ,
0 commit comments