@@ -66,6 +66,7 @@ import {
6666 SSEStreamSubscriptionFactory ,
6767 TaskRunShape ,
6868 runShapeStream ,
69+ RealtimeRunSkipColumns ,
6970} from "./runStream.js" ;
7071import {
7172 CreateEnvironmentVariableParams ,
@@ -88,6 +89,7 @@ export type {
8889 ImportEnvironmentVariablesParams ,
8990 SubscribeToRunsQueryParams ,
9091 UpdateEnvironmentVariableParams ,
92+ RealtimeRunSkipColumns ,
9193} ;
9294
9395export type ClientTriggerOptions = {
@@ -890,26 +892,37 @@ export class ApiClient {
890892 signal ?: AbortSignal ;
891893 closeOnComplete ?: boolean ;
892894 onFetchError ?: ( error : Error ) => void ;
895+ skipColumns ?: string [ ] ;
893896 }
894897 ) {
895- return runShapeStream < TRunTypes > ( `${ this . baseUrl } /realtime/v1/runs/${ runId } ` , {
896- closeOnComplete :
897- typeof options ?. closeOnComplete === "boolean" ? options . closeOnComplete : true ,
898- headers : this . #getRealtimeHeaders( ) ,
899- client : this ,
900- signal : options ?. signal ,
901- onFetchError : options ?. onFetchError ,
902- } ) ;
898+ const queryParams = new URLSearchParams ( ) ;
899+
900+ if ( options ?. skipColumns ) {
901+ queryParams . append ( "skipColumns" , options . skipColumns . join ( "," ) ) ;
902+ }
903+
904+ return runShapeStream < TRunTypes > (
905+ `${ this . baseUrl } /realtime/v1/runs/${ runId } ${ queryParams ? `?${ queryParams } ` : "" } ` ,
906+ {
907+ closeOnComplete :
908+ typeof options ?. closeOnComplete === "boolean" ? options . closeOnComplete : true ,
909+ headers : this . #getRealtimeHeaders( ) ,
910+ client : this ,
911+ signal : options ?. signal ,
912+ onFetchError : options ?. onFetchError ,
913+ }
914+ ) ;
903915 }
904916
905917 subscribeToRunsWithTag < TRunTypes extends AnyRunTypes > (
906918 tag : string | string [ ] ,
907- filters ?: { createdAt ?: string } ,
919+ filters ?: { createdAt ?: string ; skipColumns ?: string [ ] } ,
908920 options ?: { signal ?: AbortSignal ; onFetchError ?: ( error : Error ) => void }
909921 ) {
910922 const searchParams = createSearchQueryForSubscribeToRuns ( {
911923 tags : tag ,
912924 ...( filters ? { createdAt : filters . createdAt } : { } ) ,
925+ ...( filters ?. skipColumns ? { skipColumns : filters . skipColumns } : { } ) ,
913926 } ) ;
914927
915928 return runShapeStream < TRunTypes > (
@@ -926,15 +939,28 @@ export class ApiClient {
926939
927940 subscribeToBatch < TRunTypes extends AnyRunTypes > (
928941 batchId : string ,
929- options ?: { signal ?: AbortSignal ; onFetchError ?: ( error : Error ) => void }
942+ options ?: {
943+ signal ?: AbortSignal ;
944+ onFetchError ?: ( error : Error ) => void ;
945+ skipColumns ?: string [ ] ;
946+ }
930947 ) {
931- return runShapeStream < TRunTypes > ( `${ this . baseUrl } /realtime/v1/batches/${ batchId } ` , {
932- closeOnComplete : false ,
933- headers : this . #getRealtimeHeaders( ) ,
934- client : this ,
935- signal : options ?. signal ,
936- onFetchError : options ?. onFetchError ,
937- } ) ;
948+ const queryParams = new URLSearchParams ( ) ;
949+
950+ if ( options ?. skipColumns ) {
951+ queryParams . append ( "skipColumns" , options . skipColumns . join ( "," ) ) ;
952+ }
953+
954+ return runShapeStream < TRunTypes > (
955+ `${ this . baseUrl } /realtime/v1/batches/${ batchId } ${ queryParams ? `?${ queryParams } ` : "" } ` ,
956+ {
957+ closeOnComplete : false ,
958+ headers : this . #getRealtimeHeaders( ) ,
959+ client : this ,
960+ signal : options ?. signal ,
961+ onFetchError : options ?. onFetchError ,
962+ }
963+ ) ;
938964 }
939965
940966 async fetchStream < T > (
@@ -1049,6 +1075,10 @@ function createSearchQueryForSubscribeToRuns(query?: SubscribeToRunsQueryParams)
10491075 if ( query . createdAt ) {
10501076 searchParams . append ( "createdAt" , query . createdAt ) ;
10511077 }
1078+
1079+ if ( query . skipColumns ) {
1080+ searchParams . append ( "skipColumns" , query . skipColumns . join ( "," ) ) ;
1081+ }
10521082 }
10531083
10541084 return searchParams ;
0 commit comments