@hipnation-truth/sdk 0.26.1 → 0.26.3

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.
package/dist/react.d.ts CHANGED
@@ -2680,12 +2680,21 @@ declare class TruthClient {
2680
2680
  readonly userSettings: UserSettingsResource;
2681
2681
  private readonly convex;
2682
2682
  private readonly tracker;
2683
+ private readonly _getAuthToken?;
2683
2684
  private _vapidPublicKey;
2684
2685
  private _webPushReady;
2685
2686
  private readonly _serviceWorkerPath;
2686
2687
  constructor(config: TruthClientConfig);
2687
2688
  get vapidPublicKey(): string | null;
2688
2689
  get webPushReady(): Promise<void> | null;
2690
+ /**
2691
+ * When a Clerk token fetcher is configured (publishable-key clients),
2692
+ * the VAPID endpoint is auth-gated — calling it before the session has
2693
+ * hydrated 401s and strands web-push in the "no key" path. Wait
2694
+ * (briefly, bounded) for a token to become available first. No fetcher
2695
+ * → resolve immediately (secret-key path is unaffected).
2696
+ */
2697
+ private waitForAuthToken;
2689
2698
  private initWebPush;
2690
2699
  /**
2691
2700
  * The resolved Truth API base URL for this environment.
@@ -2766,6 +2775,15 @@ interface TruthSdkContextValue {
2766
2775
  offlineStore: OfflineStore;
2767
2776
  /** Whether the offline-reads layer is active for this provider. */
2768
2777
  offlineEnabled: boolean;
2778
+ /**
2779
+ * True when a Clerk token fetcher (`getAuthToken`) is wired. In that
2780
+ * mode Convex rejects unauthenticated reads, so reactive query hooks
2781
+ * must hold (pass "skip") until the user is authenticated — otherwise a
2782
+ * signed-out render throws UNAUTHENTICATED and blanks the app. When no
2783
+ * fetcher is configured this stays false and queries run unconditionally
2784
+ * (legacy behavior).
2785
+ */
2786
+ authGated: boolean;
2769
2787
  }
2770
2788
  /**
2771
2789
  * Read the Truth REST API base URL + API key + shared client from