/** * Customer-tunable budgets of the webview load engine. Platform extensions * expose this group to integrators (e.g. `ReactNativeExtension({ webviewLoad })`) * and forward it verbatim to `createWebViewLoadController`. */ export type WebViewLoadOptions = { /** * Total load attempts per load cycle: the initial attempt plus the * automatic retries (each transient failure waits out a short backoff * before the next attempt). `1` disables automatic retries entirely — * the first failure is terminal and the app owns recovery via * `client.sdk.retry()`, which starts a fresh full cycle. Values are * clamped into [1, 10] with a console warning. Defaults to 3. */ maxAttempts?: number; /** * Max time (ms) each load attempt may spend loading the page. It bounds * both the wait for the server's response (navigation start → response * committed) and the page finishing to load (response committed → page * finished). Attempt 1's wait-for-response window is additionally capped * by `firstAttemptPageLoadTimeoutMs` so a dead first load fails fast * into a retry; retries always get this full budget. Defaults to 20s. * Only tune this for pathological networks. */ pageLoadTimeoutMs?: number; /** * Fail-fast cap (ms) on attempt 1's wait-for-response window ONLY: a * first load with no response after this long is almost always wedged * (hung TLS handshake, dead CDN edge), and retrying beats waiting out * the full `pageLoadTimeoutMs`. It is a cap, never an extension — the * effective attempt-1 window is * `min(firstAttemptPageLoadTimeoutMs, pageLoadTimeoutMs)`, so setting it * at or above `pageLoadTimeoutMs` deliberately disables fail-fast. * Values below 1s are clamped to 1s with a console warning. Defaults * to 10s. */ firstAttemptPageLoadTimeoutMs?: number; /** * Max time (ms) between the page finishing its load and the Dynamic SDK * inside the webview signalling it is ready. If it elapses, the attempt * fails into the retry engine. The window is extendable once per attempt * by the manifest signal on slow-but-alive links. Defaults to 20s. */ sdkReadyTimeoutMs?: number; };