@rebasepro/types 0.12.0 → 0.12.1-canary.g35be8cb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,6 +83,20 @@ export interface AuthClient {
83
83
  * Manually refresh the session token
84
84
  */
85
85
  refreshSession(): Promise<RebaseSession>;
86
+ /**
87
+ * Whether a session could exist that this client has not loaded yet.
88
+ *
89
+ * `false` means the only way this client can hold a session is an explicit
90
+ * sign-in during this page's lifetime: it neither persists sessions nor
91
+ * carries an httpOnly auth cookie, so there is nothing on disk or in the
92
+ * browser to restore from. A caller that would otherwise probe the server
93
+ * — `getUser()` on mount, say — can skip it, because the answer is already
94
+ * known and the request can only ever fail.
95
+ *
96
+ * Optional so that alternative {@link AuthClient} implementations need not
97
+ * supply it; treat a missing implementation as "unknown, go ahead and ask".
98
+ */
99
+ canRestoreSession?: () => boolean;
86
100
  }
87
101
  /**
88
102
  * User record as returned by the Admin API (`GET /admin/users`, etc.).
@@ -337,6 +351,16 @@ export interface RebaseClient<DB = unknown> {
337
351
  apiKeys?: ApiKeysAPI;
338
352
  /** Base HTTP URL of the backend server */
339
353
  baseUrl?: string;
354
+ /**
355
+ * The path every API route is mounted under, appended to {@link baseUrl}.
356
+ *
357
+ * `"/api"` unless the backend was configured with a different `basePath`
358
+ * and the client told to match. Exposed because code that builds a URL by
359
+ * hand — rather than going through the client's own methods — otherwise has
360
+ * to guess, and guessing `/api` is wrong for exactly the projects that set
361
+ * the option.
362
+ */
363
+ apiPath?: string;
340
364
  /** WebSocket client for realtime subscriptions */
341
365
  ws?: RebaseWebSocket;
342
366
  /** Set the auth token for subsequent requests */
@@ -435,6 +459,16 @@ export interface RebaseBrowserClient<DB = unknown> {
435
459
  apiKeys?: ApiKeysAPI;
436
460
  /** Base HTTP URL of the backend server */
437
461
  baseUrl?: string;
462
+ /**
463
+ * The path every API route is mounted under, appended to {@link baseUrl}.
464
+ *
465
+ * `"/api"` unless the backend was configured with a different `basePath`
466
+ * and the client told to match. Exposed because code that builds a URL by
467
+ * hand — rather than going through the client's own methods — otherwise has
468
+ * to guess, and guessing `/api` is wrong for exactly the projects that set
469
+ * the option.
470
+ */
471
+ apiPath?: string;
438
472
  /** WebSocket client for realtime subscriptions */
439
473
  ws?: RebaseWebSocket;
440
474
  /** Set the auth token for subsequent requests */
package/dist/index.es.js CHANGED
@@ -222,7 +222,7 @@ var REST_TO_CANONICAL = {
222
222
  * Operators that test for null/not-null and therefore ignore their value.
223
223
  * Codecs normalize the value of these conditions to `null`.
224
224
  */
225
- var NULL_OPS = new Set(["is-null", "is-not-null"]);
225
+ var NULL_OPS = /* @__PURE__ */ new Set(["is-null", "is-not-null"]);
226
226
  /**
227
227
  * Every canonical operator, in a stable order. Useful for engine capability
228
228
  * declarations ({@link DataSourceCapabilities.filterOperators}) and for