EventWatcherOptions
Import from: @xbbg/xnews
Defined in: src/types.ts (declaration: types.d.ts:425)
Extends
Properties
allowCrossOriginRedirects?
readonlyoptionalallowCrossOriginRedirects?:boolean
Defined in: src/types.ts (declaration: types.d.ts:105)
Allows a redirect to leave the requested origin even when a caller User-Agent, sensitive query parameter, request body, or extra header would otherwise refuse it. File downloads need this: catalogs mint a short-lived token on their own host and redirect to a CDN. A redirect into a private network address is still refused.
Inherited from
EventFetchOptions.allowCrossOriginRedirects
countryCodes?
readonlyoptionalcountryCodes?: readonlystring[]
Defined in: src/types.ts (declaration: types.d.ts:403)
Restrict to these ISO 3166-1 alpha-2 countries, where the publisher states one.
Inherited from
EventFetchOptions.countryCodes
fetch?
readonlyoptionalfetch?:SourceFetch
Defined in: src/types.ts (declaration: types.d.ts:88)
Inherited from
intervalMs?
readonlyoptionalintervalMs?:number
Defined in: src/types.ts (declaration: types.d.ts:427)
Poll interval in milliseconds; defaults to 5 minutes.
limit?
readonlyoptionallimit?:number
Defined in: src/types.ts (declaration: types.d.ts:115)
Inherited from
maxResponseBytes?
readonlyoptionalmaxResponseBytes?:number
Defined in: src/types.ts (declaration: types.d.ts:92)
Maximum response body size in bytes; defaults to 32 MiB.
Inherited from
EventFetchOptions.maxResponseBytes
maxSeenIds?
readonlyoptionalmaxSeenIds?:number
Defined in: src/types.ts (declaration: types.d.ts:434)
Cap on remembered ids, bounding memory on high-churn publishers. Defaults to 10000; oldest ids are evicted first.
minSeverity?
readonlyoptionalminSeverity?:EventSeverity
Defined in: src/types.ts (declaration: types.d.ts:401)
Drop events below this normalized urgency.
Inherited from
msrbAcceptTermsOfUse?
readonlyoptionalmsrbAcceptTermsOfUse?:boolean
Defined in: src/types.ts (declaration: types.d.ts:114)
MSRB EMMA gates data behind a Terms-of-Use acceptance cookie. Accepting those terms (https://emma.msrb.org) is the caller's act: without this flag, EMMA requests fail closed with a config error instead of the library accepting on the caller's behalf.
Inherited from
EventFetchOptions.msrbAcceptTermsOfUse
redirect?
readonlyoptionalredirect?:RequestRedirect
Defined in: src/types.ts (declaration: types.d.ts:97)
Redirect semantics enforced by xnews. "follow" (default) revalidates policy on at most ten hops; the injected fetch receives "manual".
Inherited from
secUserAgent?
readonlyoptionalsecUserAgent?:string
Defined in: src/types.ts (declaration: types.d.ts:107)
Inherited from
EventFetchOptions.secUserAgent
seenIds?
readonlyoptionalseenIds?:Iterable<string>
Defined in: src/types.ts (declaration: types.d.ts:429)
Event ids already consumed, so a restart does not replay them.
signal?
readonlyoptionalsignal?:AbortSignal
Defined in: src/types.ts (declaration: types.d.ts:89)
Inherited from
since?
readonlyoptionalsince?:string|Date
Defined in: src/types.ts (declaration: types.d.ts:116)
Inherited from
timeoutMs?
readonlyoptionaltimeoutMs?:number
Defined in: src/types.ts (declaration: types.d.ts:90)
Inherited from
until?
readonlyoptionaluntil?:string|Date
Defined in: src/types.ts (declaration: types.d.ts:117)
Inherited from
userAgent?
readonlyoptionaluserAgent?:string
Defined in: src/types.ts (declaration: types.d.ts:106)
