@@ -157,6 +157,7 @@ def stream(
157157 id_or_name : str ,
158158 * ,
159159 replay : str | Omit = omit ,
160+ type : SequenceNotStr [str ] | Omit = omit ,
160161 last_event_id : str | Omit = omit ,
161162 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
162163 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -171,7 +172,10 @@ def stream(
171172 stream closes when the browser session terminates. Each event frame includes an
172173 id: field containing a monotonically increasing sequence number; pass it as
173174 Last-Event-ID on reconnect to resume without gaps. The event: field is never
174- set; all frames carry JSON in the data: field. A keepalive comment frame is sent
175+ set; event frames carry JSON in the data: field. A frame with an id: field and
176+ no data: field moves Last-Event-ID past events that were not delivered, because
177+ a type filter excluded them or they could not be decoded or exceeded the size
178+ limit; SSE clients dispatch no event for it. A keepalive comment frame is sent
175179 every 15 seconds when no events arrive. Returns 404 if the browser session does
176180 not exist. If telemetry was not enabled on the session, the stream opens but no
177181 events are delivered. Fresh connections only see new events; pass replay=all to
@@ -182,6 +186,14 @@ def stream(
182186 any other value is treated as from-now. The buffer is bounded, so the first
183187 event id may be greater than 1 if older events were evicted.
184188
189+ type: Deliver only these event types, such as captcha_solve_started or
190+ captcha_challenge_result. Repeat the parameter or pass comma-separated values
191+ for multiple types. Keepalive frames are always delivered. Filtered-out events
192+ are not sent. An id-only frame carrying the latest skipped id is sent about
193+ every 15 seconds while skipped events keep arriving, and otherwise with the next
194+ keepalive or when the stream ends, so the connection stays active and
195+ Last-Event-ID moves past them; a reconnect resumes after the skipped events.
196+
185197 extra_headers: Send extra headers
186198
187199 extra_query: Add additional query parameters to the request
@@ -201,7 +213,13 @@ def stream(
201213 extra_query = extra_query ,
202214 extra_body = extra_body ,
203215 timeout = timeout ,
204- query = maybe_transform ({"replay" : replay }, telemetry_stream_params .TelemetryStreamParams ),
216+ query = maybe_transform (
217+ {
218+ "replay" : replay ,
219+ "type" : type ,
220+ },
221+ telemetry_stream_params .TelemetryStreamParams ,
222+ ),
205223 ),
206224 cast_to = TelemetryStreamResponse ,
207225 stream = True ,
@@ -339,6 +357,7 @@ async def stream(
339357 id_or_name : str ,
340358 * ,
341359 replay : str | Omit = omit ,
360+ type : SequenceNotStr [str ] | Omit = omit ,
342361 last_event_id : str | Omit = omit ,
343362 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
344363 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -353,7 +372,10 @@ async def stream(
353372 stream closes when the browser session terminates. Each event frame includes an
354373 id: field containing a monotonically increasing sequence number; pass it as
355374 Last-Event-ID on reconnect to resume without gaps. The event: field is never
356- set; all frames carry JSON in the data: field. A keepalive comment frame is sent
375+ set; event frames carry JSON in the data: field. A frame with an id: field and
376+ no data: field moves Last-Event-ID past events that were not delivered, because
377+ a type filter excluded them or they could not be decoded or exceeded the size
378+ limit; SSE clients dispatch no event for it. A keepalive comment frame is sent
357379 every 15 seconds when no events arrive. Returns 404 if the browser session does
358380 not exist. If telemetry was not enabled on the session, the stream opens but no
359381 events are delivered. Fresh connections only see new events; pass replay=all to
@@ -364,6 +386,14 @@ async def stream(
364386 any other value is treated as from-now. The buffer is bounded, so the first
365387 event id may be greater than 1 if older events were evicted.
366388
389+ type: Deliver only these event types, such as captcha_solve_started or
390+ captcha_challenge_result. Repeat the parameter or pass comma-separated values
391+ for multiple types. Keepalive frames are always delivered. Filtered-out events
392+ are not sent. An id-only frame carrying the latest skipped id is sent about
393+ every 15 seconds while skipped events keep arriving, and otherwise with the next
394+ keepalive or when the stream ends, so the connection stays active and
395+ Last-Event-ID moves past them; a reconnect resumes after the skipped events.
396+
367397 extra_headers: Send extra headers
368398
369399 extra_query: Add additional query parameters to the request
@@ -383,7 +413,13 @@ async def stream(
383413 extra_query = extra_query ,
384414 extra_body = extra_body ,
385415 timeout = timeout ,
386- query = await async_maybe_transform ({"replay" : replay }, telemetry_stream_params .TelemetryStreamParams ),
416+ query = await async_maybe_transform (
417+ {
418+ "replay" : replay ,
419+ "type" : type ,
420+ },
421+ telemetry_stream_params .TelemetryStreamParams ,
422+ ),
387423 ),
388424 cast_to = TelemetryStreamResponse ,
389425 stream = True ,
0 commit comments