@@ -112,13 +112,17 @@ interface Delay {
112112/**
113113 * Represents the wait_for configuration.
114114 * @typedef {Object } WaitFor
115- * @property {IdleNetwork } [idle_network] - Configuration to wait for network to be idle.
115+ * @property {IdleNetwork } [idle_network] - Configuration to wait for network to be idle between period.
116+ * @property {IdleNetwork0 } [idle_network] - Configuration to wait for network to be idle with max timeout.
117+ * @property {AlmostIdleNetwork0 } [idle_network] - Configuration to wait for network to almost idle with max timeout.
116118 * @property {Selector } [selector] - Configuration to wait for a CSS selector.
117119 * @property {Delay } [delay] - Configuration to wait for a delay.
118120 * @property {boolean } [page_navigations] - Whether to wait for page navigations.
119121 */
120122export interface WaitForConfiguration {
121123 idle_network ?: IdleNetwork ;
124+ idle_network0 ?: IdleNetwork ;
125+ almost_idle_network0 ?: IdleNetwork ;
122126 selector ?: Selector ;
123127 dom ?: Selector ;
124128 delay ?: Delay ;
@@ -310,6 +314,32 @@ export type Proxy =
310314 | "mobile"
311315 | "isp" ;
312316
317+ export type LinkRewriteReplace = {
318+ type : "replace" ;
319+ /**
320+ * Only apply when the link's host matches this value.
321+ * Optional key; null means "no host filter".
322+ */
323+ host ?: string | null ;
324+ find : string ;
325+ replace_with : string ;
326+ } ;
327+
328+ // Link rewrite regex.
329+ export type LinkRewriteRegex = {
330+ type : "regex" ;
331+ /**
332+ * Only apply when the link's host matches this value.
333+ * Optional key; null means "no host filter".
334+ */
335+ host ?: string | null ;
336+ pattern : string ;
337+ replace_with : string ;
338+ } ;
339+
340+ // The link rewrite rule.
341+ export type LinkRewriteRule = LinkRewriteReplace | LinkRewriteRegex ;
342+
313343/**
314344 * Represents the options available for making a spider request.
315345 */
@@ -424,6 +454,8 @@ export interface SpiderParams {
424454 */
425455 webhooks ?: WebhookSettings ;
426456
457+ link_rewrite ?: LinkRewriteRule
458+
427459 /**
428460 * Specifies whether to use fingerprinting protection.
429461 */
0 commit comments