@sparkvault/sdk-js 8.13.1 → 8.15.0

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/README.md CHANGED
@@ -240,6 +240,8 @@ await fetch('/api/auth/login', {
240
240
  | `email` | `string` | Pre-fill email address (mutually exclusive with phone) |
241
241
  | `phone` | `string` | Pre-fill phone in E.164 format, e.g. `"+14155551234"` |
242
242
  | `backdropBlur` | `boolean` | Override backdrop blur setting from app config |
243
+ | `flow` | `"auto" \| "popup" \| "redirect"` | `"auto"` (default) and `"popup"` open the popup; `"redirect"` navigates the tab to the sign-in page instead (its return leg is `handleRedirectResult()`) |
244
+ | `prompt` | `"select_account"` | Always show the sign-in page's account chooser instead of silently continuing as the current account — the affordance for a "switch account" button. Any other value is ignored. |
243
245
  | `onCancel` | `function` | Callback when the person closes the popup without signing in |
244
246
  | `onSuccess` | `function` | Callback on success (before promise resolves) |
245
247
  | `onError` | `function` | Callback on error (before promise rejects) |
package/dist/errors.d.ts CHANGED
@@ -39,6 +39,15 @@ export declare class QuotaExceededError extends SparkVaultError {
39
39
  readonly resource?: QuotaResource;
40
40
  constructor(message: string, details?: Record<string, unknown>);
41
41
  }
42
+ /**
43
+ * Notify subscription gate (403 NOTIFY_SUBSCRIPTION_REQUIRED) — the account has
44
+ * no active Notify subscription and attempted a send. Distinct from a generic
45
+ * authorization failure: the credential is fine and re-authenticating changes
46
+ * nothing, so surface a subscribe CTA rather than a sign-in prompt.
47
+ */
48
+ export declare class NotifySubscriptionRequiredError extends SparkVaultError {
49
+ constructor(message: string, details?: Record<string, unknown>);
50
+ }
42
51
  export declare class NetworkError extends SparkVaultError {
43
52
  constructor(message: string, details?: Record<string, unknown>);
44
53
  }