You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/sdk/README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,16 +98,20 @@ Type parameter `T` defines the shape of your configs (a mapping of config names
98
98
99
99
#### Options
100
100
101
-
-`baseUrl` (string) – Replane origin (no trailing slash needed).
101
+
-`baseUrl` (string) – Replane origin (no trailing slash needed). Required.
102
102
-`sdkKey` (string) – SDK key for authorization. Required. **Note:** Each SDK key is tied to a specific project and can only access configs from that project. To access configs from multiple projects, create multiple SDK keys and initialize separate client instances.
103
103
-`required` (object or array) – mark specific configs as required. If any required config is missing, the client will throw an error during initialization. Can be an object with boolean values or an array of config names. Optional.
104
-
-`fallbacks` (object) – fallback values to use if the initial request to fetch configs fails. Allows the client to start even when the API is unavailable. Optional.
104
+
-`defaults` (object) – default values to use if the initial request to fetch configs fails or times out. These values are used immediately while waiting for server connection. Allows the client to start even when the API is unavailable. Optional.
105
105
-`context` (object) – default context for all config evaluations. Can be overridden per-request in `get()`. Optional.
106
106
-`fetchFn` (function) – custom fetch (e.g. `undici.fetch` or mocked fetch in tests). Optional.
107
-
-`timeoutMs` (number) – abort the request after N ms. Default: 2000.
108
-
-`retries` (number) – number of retry attempts on failures (5xx or network errors). Default: 2.
109
-
-`retryDelayMs` (number) – base delay between retries in ms (a small jitter is applied). Default: 200.
107
+
-`requestTimeoutMs` (number) – timeout for SSE requests in ms. Default: 2000.
108
+
-`initializationTimeoutMs` (number) – timeout for SDK initialization in ms. Default: 5000.
109
+
-`retryDelayMs` (number) – base delay between retries in ms. Default: 200.
110
+
-`inactivityTimeoutMs` (number) – timeout for SSE inactivity before reconnecting in ms. Default: 30000.
0 commit comments