@sylphx/sdk 0.26.0 → 0.28.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.
@@ -1,5 +1,5 @@
1
- import { SdkBillingPlan, SdkBillingSubscription, SdkConsentType, UserConsent as UserConsent$1, ConsentHistoryResponse, GetStatsResponse, ReferralRewardDefaults as ReferralRewardDefaults$1, RedeemResponse, RuntimeWebhookDelivery, OrgSdkRole, OrgInvitation, OrgMember, CreateOrgInput as CreateOrgInput$1, Organization, File as File$1, FileId } from '@sylphx/contract';
2
- export { Organization, File as StorageFile, FileId as StorageFileId } from '@sylphx/contract';
1
+ import { SdkBillingPlan, SdkBillingSubscription, SdkConsentType, UserConsent as UserConsent$1, ConsentHistoryResponse, GetStatsResponse, ReferralRewardDefaults as ReferralRewardDefaults$1, RedeemResponse, RuntimeWebhookDelivery, OrgSdkRole, OrgInvitation, OrgMember, CreateOrgInput as CreateOrgInput$1, Organization } from '@sylphx/contract';
2
+ export { Organization } from '@sylphx/contract';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import react__default, { CSSProperties, ReactNode, SVGProps, Context, ErrorInfo, Component } from 'react';
@@ -238,528 +238,6 @@ declare function isSylphxError(error: unknown): error is SylphxError;
238
238
  */
239
239
  declare function toSylphxError(error: unknown): SylphxError;
240
240
 
241
- /**
242
- * Tasks Types
243
- *
244
- * Type definitions for background job scheduling and workflows.
245
- * Supports durable execution, retries, and workflow composition.
246
- */
247
- /** Task status */
248
- type TaskStatus$1 = 'pending' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled' | 'retrying' | 'dead';
249
- /** Job priority */
250
- type TaskPriority = 'low' | 'normal' | 'high' | 'critical';
251
- /** Job payload - must be JSON serializable */
252
- type TaskPayload = Record<string, unknown>;
253
- /** Job result */
254
- type TaskResult = unknown;
255
- /** Job definition */
256
- interface TaskDefinition<TPayload extends TaskPayload = TaskPayload, TResult = TaskResult> {
257
- /** Unique job type identifier */
258
- type: string;
259
- /** Human-readable name */
260
- name?: string;
261
- /** Description */
262
- description?: string;
263
- /** Job handler (server-side) */
264
- handler?: (payload: TPayload, context: TaskContext) => Promise<TResult>;
265
- /** Default options */
266
- defaults?: TaskOptions;
267
- /** Validation schema */
268
- validate?: (payload: TPayload) => boolean | string;
269
- }
270
- /** Job options */
271
- interface TaskOptions {
272
- /** Priority */
273
- priority?: TaskPriority;
274
- /** Max retry attempts */
275
- maxRetries?: number;
276
- /** Retry delay strategy */
277
- retryDelay?: RetryDelayStrategy;
278
- /** Timeout in ms */
279
- timeout?: number;
280
- /** Delay execution */
281
- delay?: number | Date;
282
- /** Cron schedule */
283
- cron?: string;
284
- /** Unique job ID (for deduplication) */
285
- uniqueId?: string;
286
- /** Unique key TTL in ms (how long to prevent duplicates) */
287
- uniqueTtl?: number;
288
- /** Dead letter queue options */
289
- dlq?: DLQOptions;
290
- /** Tags for filtering */
291
- tags?: string[];
292
- /** Custom metadata */
293
- metadata?: Record<string, unknown>;
294
- }
295
- /** Retry delay strategy */
296
- type RetryDelayStrategy = {
297
- type: 'fixed';
298
- delay: number;
299
- } | {
300
- type: 'exponential';
301
- base: number;
302
- maxDelay?: number;
303
- } | {
304
- type: 'linear';
305
- initial: number;
306
- increment: number;
307
- maxDelay?: number;
308
- } | {
309
- type: 'custom';
310
- delays: number[];
311
- };
312
- /** DLQ options */
313
- interface DLQOptions {
314
- /** Enable DLQ */
315
- enabled?: boolean;
316
- /** Max age before auto-discard (ms) */
317
- maxAge?: number;
318
- /** Auto-retry from DLQ */
319
- autoRetry?: boolean;
320
- /** Auto-retry interval (ms) */
321
- autoRetryInterval?: number;
322
- /** Max auto-retry attempts from DLQ */
323
- maxAutoRetries?: number;
324
- }
325
- /** Job instance */
326
- interface TaskInstance<TPayload extends TaskPayload = TaskPayload, TResult = TaskResult> {
327
- /** Unique job ID */
328
- id: string;
329
- /** Job type */
330
- type: string;
331
- /** Job payload */
332
- payload: TPayload;
333
- /** Current status */
334
- status: TaskStatus$1;
335
- /** Priority */
336
- priority: TaskPriority;
337
- /** Created timestamp */
338
- createdAt: number;
339
- /** Scheduled execution time */
340
- scheduledAt?: number;
341
- /** Started timestamp */
342
- startedAt?: number;
343
- /** Completed timestamp */
344
- completedAt?: number;
345
- /** Current attempt number */
346
- attempt: number;
347
- /** Max retry attempts */
348
- maxRetries: number;
349
- /** Job result (if completed) */
350
- result?: TResult;
351
- /** Error message (if failed) */
352
- error?: string;
353
- /** Error stack trace */
354
- errorStack?: string;
355
- /** Progress (0-100) */
356
- progress?: number;
357
- /** Progress message */
358
- progressMessage?: string;
359
- /** Tags */
360
- tags?: string[];
361
- /** Custom metadata */
362
- metadata?: Record<string, unknown>;
363
- /** Parent job ID (for workflows) */
364
- parentId?: string;
365
- /** Workflow step name (for workflows) */
366
- stepName?: string;
367
- }
368
- /** Job context passed to handlers */
369
- interface TaskContext {
370
- /** Job ID */
371
- jobId: string;
372
- /** Current attempt number */
373
- attempt: number;
374
- /** Signal for cancellation */
375
- signal?: AbortSignal;
376
- /** Update progress */
377
- setProgress: (progress: number, message?: string) => void;
378
- /** Log message */
379
- log: (message: string, level?: 'info' | 'warn' | 'error') => void;
380
- /** Check if should continue (for long-running jobs) */
381
- shouldContinue: () => boolean;
382
- /** Schedule a child job */
383
- scheduleChild: <T extends TaskPayload>(type: string, payload: T, options?: TaskOptions) => Promise<string>;
384
- /** Sleep (durable) */
385
- sleep: (ms: number) => Promise<void>;
386
- }
387
- /** Workflow definition */
388
- interface WorkflowDefinition<__TInput extends TaskPayload = TaskPayload, TOutput = TaskResult> {
389
- /** Unique workflow type */
390
- type: string;
391
- /** Human-readable name */
392
- name?: string;
393
- /** Description */
394
- description?: string;
395
- /** Workflow steps */
396
- steps: WorkflowStep[];
397
- /** Default options */
398
- defaults?: WorkflowOptions;
399
- /** On complete callback */
400
- onComplete?: (result: TOutput) => void;
401
- /** On error callback */
402
- onError?: (error: Error, step: string) => void;
403
- }
404
- /** Workflow options */
405
- interface WorkflowOptions extends TaskOptions {
406
- /** Continue on step failure */
407
- continueOnFailure?: boolean;
408
- /** Max concurrent steps (for parallel) */
409
- maxConcurrency?: number;
410
- }
411
- /** Workflow step */
412
- type WorkflowStep = TaskStep | ConditionalStep | ParallelStep | LoopStep | WaitStep | SubworkflowStep;
413
- /** Job step */
414
- interface TaskStep {
415
- type: 'job';
416
- name: string;
417
- /** Job type to execute */
418
- jobType: string;
419
- /** Payload transform (receives workflow input + previous results) */
420
- payload?: (context: StepContext) => TaskPayload;
421
- /** Step options */
422
- options?: TaskOptions;
423
- /** Condition to run this step */
424
- if?: (context: StepContext) => boolean;
425
- /** On complete transform */
426
- onComplete?: (result: TaskResult, context: StepContext) => unknown;
427
- }
428
- /** Conditional step */
429
- interface ConditionalStep {
430
- type: 'conditional';
431
- name: string;
432
- /** Condition function */
433
- condition: (context: StepContext) => boolean;
434
- /** Steps if condition is true */
435
- then: WorkflowStep[];
436
- /** Steps if condition is false */
437
- else?: WorkflowStep[];
438
- }
439
- /** Parallel step */
440
- interface ParallelStep {
441
- type: 'parallel';
442
- name: string;
443
- /** Steps to run in parallel */
444
- steps: WorkflowStep[];
445
- /** Wait for all or any */
446
- waitFor?: 'all' | 'any';
447
- /** Max concurrent */
448
- maxConcurrency?: number;
449
- }
450
- /** Loop step */
451
- interface LoopStep {
452
- type: 'loop';
453
- name: string;
454
- /** Array to iterate over, or function to get items */
455
- items: unknown[] | ((context: StepContext) => unknown[]);
456
- /** Step to execute for each item */
457
- step: WorkflowStep;
458
- /** Max concurrent iterations */
459
- maxConcurrency?: number;
460
- /** Break condition */
461
- breakIf?: (item: unknown, index: number, context: StepContext) => boolean;
462
- }
463
- /** Wait step */
464
- interface WaitStep {
465
- type: 'wait';
466
- name: string;
467
- /** Duration in ms, Date, or function */
468
- until: number | Date | ((context: StepContext) => number | Date);
469
- }
470
- /** Sub-workflow step */
471
- interface SubworkflowStep {
472
- type: 'subworkflow';
473
- name: string;
474
- /** Workflow type to execute */
475
- workflowType: string;
476
- /** Payload transform */
477
- payload?: (context: StepContext) => TaskPayload;
478
- /** Options */
479
- options?: WorkflowOptions;
480
- }
481
- /** Step context */
482
- interface StepContext {
483
- /** Workflow input */
484
- input: TaskPayload;
485
- /** Results from previous steps */
486
- results: Record<string, TaskResult>;
487
- /** Current step name */
488
- currentStep: string;
489
- /** Workflow metadata */
490
- metadata: Record<string, unknown>;
491
- }
492
- /** Workflow instance */
493
- interface Workflow<_TInput extends TaskPayload = TaskPayload, TOutput = TaskResult> {
494
- /** Unique workflow ID */
495
- id: string;
496
- /** Workflow type */
497
- type: string;
498
- /** Input payload */
499
- input: _TInput;
500
- /** Current status */
501
- status: TaskStatus$1;
502
- /** Created timestamp */
503
- createdAt: number;
504
- /** Started timestamp */
505
- startedAt?: number;
506
- /** Completed timestamp */
507
- completedAt?: number;
508
- /** Current step name */
509
- currentStep?: string;
510
- /** Step results */
511
- stepResults: Record<string, TaskResult>;
512
- /** Step statuses */
513
- stepStatuses: Record<string, TaskStatus$1>;
514
- /** Final output */
515
- output?: TOutput;
516
- /** Error */
517
- error?: string;
518
- /** Metadata */
519
- metadata?: Record<string, unknown>;
520
- }
521
- /** Cron schedule */
522
- interface CronSchedule {
523
- /** Cron expression */
524
- expression: string;
525
- /** Timezone */
526
- timezone?: string;
527
- /** Start date */
528
- startAt?: Date;
529
- /** End date */
530
- endAt?: Date;
531
- /** Max runs */
532
- maxRuns?: number;
533
- }
534
- /** Scheduled job */
535
- interface ScheduledTask {
536
- /** Schedule ID */
537
- id: string;
538
- /** Job type */
539
- type: string;
540
- /** Job payload */
541
- payload: TaskPayload;
542
- /** Cron schedule */
543
- cron: CronSchedule;
544
- /** Current status */
545
- status: 'active' | 'paused' | 'completed';
546
- /** Run count */
547
- runCount: number;
548
- /** Next run timestamp */
549
- nextRunAt?: number;
550
- /** Last run timestamp */
551
- lastRunAt?: number;
552
- /** Created timestamp */
553
- createdAt: number;
554
- }
555
- /** Job event */
556
- type TaskEvent = {
557
- type: 'job:created';
558
- job: Job$1;
559
- } | {
560
- type: 'job:started';
561
- job: Job$1;
562
- } | {
563
- type: 'job:progress';
564
- job: Job$1;
565
- progress: number;
566
- message?: string;
567
- } | {
568
- type: 'job:completed';
569
- job: Job$1;
570
- result: TaskResult;
571
- } | {
572
- type: 'job:failed';
573
- job: Job$1;
574
- error: string;
575
- } | {
576
- type: 'job:retrying';
577
- job: Job$1;
578
- attempt: number;
579
- } | {
580
- type: 'job:dead';
581
- job: Job$1;
582
- } | {
583
- type: 'job:cancelled';
584
- job: Job$1;
585
- };
586
- /** Workflow event */
587
- type WorkflowEvent = {
588
- type: 'workflow:started';
589
- workflow: Workflow;
590
- } | {
591
- type: 'workflow:step:started';
592
- workflow: Workflow;
593
- step: string;
594
- } | {
595
- type: 'workflow:step:completed';
596
- workflow: Workflow;
597
- step: string;
598
- result: TaskResult;
599
- } | {
600
- type: 'workflow:step:failed';
601
- workflow: Workflow;
602
- step: string;
603
- error: string;
604
- } | {
605
- type: 'workflow:completed';
606
- workflow: Workflow;
607
- output: TaskResult;
608
- } | {
609
- type: 'workflow:failed';
610
- workflow: Workflow;
611
- error: string;
612
- };
613
- /** Jobs client configuration */
614
- interface TasksConfig {
615
- /** API endpoint */
616
- apiEndpoint?: string;
617
- /** API key */
618
- apiKey?: string;
619
- /** Default job options */
620
- defaultOptions?: TaskOptions;
621
- /** Enable debug logging */
622
- debug?: boolean;
623
- /** Event callbacks */
624
- onTaskEvent?: (event: TaskEvent) => void;
625
- onWorkflowEvent?: (event: WorkflowEvent) => void;
626
- }
627
- /** Default configuration */
628
- declare const DEFAULT_JOBS_CONFIG: Required<Pick<TasksConfig, 'defaultOptions' | 'debug'>>;
629
- /** Default retry delays (ms) */
630
- declare const DEFAULT_RETRY_DELAYS: readonly [1000, 5000, 15000, 30000, 60000];
631
- type Job$1<TPayload extends TaskPayload = TaskPayload, TResult = TaskResult> = TaskInstance<TPayload, TResult>;
632
- type JobContext = TaskContext;
633
- type JobDefinition<TPayload extends TaskPayload = TaskPayload, TResult = TaskResult> = TaskDefinition<TPayload, TResult>;
634
- type JobEvent = TaskEvent;
635
- type JobOptions = TaskOptions;
636
- type JobPayload = TaskPayload;
637
- type JobPriority = TaskPriority;
638
- type JobResult = TaskResult;
639
- /** @deprecated use TaskStatus */
640
- type JobStatus$1 = TaskStatus$1;
641
- type JobStep = TaskStep;
642
- type ScheduledJob = ScheduledTask;
643
- /**
644
- * Step execution context injected into every task handler.
645
- * Methods implement the stateless-replay model:
646
- * - Completed steps return from cache immediately.
647
- * - Uncached steps execute and signal the platform.
648
- */
649
- type NativeStepContext = {
650
- /**
651
- * Execute a named step with automatic checkpointing.
652
- *
653
- * On first run: executes fn and signals the platform to save the result.
654
- * On replay: returns the cached result without re-running fn.
655
- */
656
- run<T>(name: string, fn: () => T | Promise<T>): Promise<T>;
657
- /**
658
- * Execute an external side effect with a durable idempotency key.
659
- *
660
- * First encounter: signals Platform to persist a side-effect receipt before
661
- * the external call. Replay then invokes fn with that persisted key. If the
662
- * handler crashes after the external call but before completion settles, the
663
- * next replay reuses the same key so the downstream service suppresses duplicates.
664
- */
665
- sideEffect<T>(stepName: string, effectKey: string, externalService: string, fn: (idempotencyKey: string) => NativeSideEffectOutcome<T> | Promise<NativeSideEffectOutcome<T>>): Promise<T>;
666
- /**
667
- * Pause execution for the given duration.
668
- *
669
- * On first encounter: signals the platform to wait; stops execution.
670
- * After the wait resolves: returns immediately (no-op on replay).
671
- *
672
- * @param name Step identifier (must be unique within the handler).
673
- * @param duration Human-readable duration: '5s', '30m', '2h', '1d'.
674
- */
675
- sleep(name: string, duration: string): Promise<void>;
676
- /**
677
- * Pause execution until a named event is published via TriggersClient.publishEvent().
678
- *
679
- * On first encounter: signals the platform to wait for the event; stops execution.
680
- * After the event arrives: returns the event payload.
681
- * If timeout expires before event arrives: returns null.
682
- *
683
- * @param name Step identifier (must be unique within the handler).
684
- * @param eventName The event name to listen for (e.g. 'user.approved').
685
- * @param options Optional timeout ('24h', '7d') and payload filter.
686
- *
687
- * @example Human-in-the-loop approval
688
- * ```typescript
689
- * const approval = await step.waitForEvent<{ approvedBy: string }>(
690
- * 'wait-approval',
691
- * 'order.approved',
692
- * { timeout: '48h', filter: { orderId: payload.orderId } },
693
- * )
694
- * if (!approval) throw new Error('Approval timed out')
695
- * await notifyCustomer(approval.approvedBy)
696
- * ```
697
- */
698
- waitForEvent<T = unknown>(name: string, eventName: string, options?: {
699
- timeout?: string;
700
- filter?: Record<string, unknown>;
701
- }): Promise<T | null>;
702
- };
703
- interface NativeSideEffectOutcome<T = unknown> {
704
- readonly handle?: string;
705
- readonly result: T;
706
- }
707
- /**
708
- * A named task definition registered with sylphx.tasks.define().
709
- */
710
- interface NativeTaskDefinition<TPayload = unknown, TResult = unknown> {
711
- /** Unique task identifier — must match the taskName used in .trigger() */
712
- name: string;
713
- /** The task handler function. Runs with stateless-replay semantics. */
714
- handler: (payload: TPayload, ctx: {
715
- step: NativeStepContext;
716
- }) => Promise<TResult>;
717
- /** Optional task-level configuration */
718
- options?: {
719
- /** Cron expression for scheduled tasks, e.g. '0 9 * * 1-5' */
720
- cron?: string;
721
- /** Maximum execution attempts (default: 3) */
722
- maxAttempts?: number;
723
- /** Execution timeout, e.g. '5m', '1h' */
724
- timeout?: string;
725
- };
726
- }
727
- /**
728
- * The shape returned by GET/POST /tasks/:runId in the platform API.
729
- */
730
- type TaskRunDispatchLeaseState = 'active' | 'expired' | 'legacy';
731
- interface TaskRunDispatchLease {
732
- /**
733
- * Customer-safe dispatch claim state. Raw claim tokens and controller
734
- * identities are intentionally not exposed through the public SDK.
735
- */
736
- state: TaskRunDispatchLeaseState;
737
- claimedAt: string | null;
738
- expiresAt: string | null;
739
- }
740
- interface TaskRunStatus {
741
- id: string;
742
- taskName: string;
743
- status: 'pending' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled';
744
- payload?: unknown;
745
- result?: unknown;
746
- error?: string;
747
- attempt: number;
748
- maxAttempts: number;
749
- scheduledFor?: string;
750
- startedAt?: string;
751
- completedAt?: string;
752
- dispatchLease?: TaskRunDispatchLease | null;
753
- definition?: {
754
- id: string;
755
- version: number | null;
756
- hash: string | null;
757
- source: string | null;
758
- } | null;
759
- createdAt: string;
760
- updatedAt: string;
761
- }
762
-
763
241
  /**
764
242
  * Feature Flags Types
765
243
  *
@@ -1746,7 +1224,7 @@ interface SendEmailResult {
1746
1224
  /**
1747
1225
  * AI Hooks
1748
1226
  *
1749
- * React hooks for the Sylphx AI Gateway.
1227
+ * React hooks for the Sylphx AI.
1750
1228
  * Provides chat, completion, embedding, and vision capabilities.
1751
1229
  *
1752
1230
  * Uses proper React Context pattern (no module singletons).
@@ -1967,7 +1445,7 @@ interface UseAIReturn {
1967
1445
  error: Error | null;
1968
1446
  }
1969
1447
  /**
1970
- * Low-level hook for AI Gateway access
1448
+ * Low-level hook for Sylphx AI access
1971
1449
  *
1972
1450
  * @example
1973
1451
  * ```tsx
@@ -3876,7 +3354,7 @@ declare function useProtect(): {
3876
3354
  /** Job status - includes all possible states */
3877
3355
  type JobStatus = 'pending' | 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'scheduled' | 'paused' | 'deleted';
3878
3356
  /** Task status filter for listing tasks */
3879
- type TaskStatusFilter$1 = JobStatus;
3357
+ type TaskStatusFilter = JobStatus;
3880
3358
  interface EmailOptions {
3881
3359
  to: string;
3882
3360
  subject: string;
@@ -3981,8 +3459,6 @@ interface Job {
3981
3459
  interface TasksStatusResult {
3982
3460
  available: boolean;
3983
3461
  }
3984
- /** @deprecated Use TaskStatusFilter */
3985
- type JobStatusFilter = TaskStatusFilter$1;
3986
3462
  /** Tasks List Result */
3987
3463
  interface TasksListResult {
3988
3464
  tasks: Job[];
@@ -4000,7 +3476,7 @@ interface TasksContextValue {
4000
3476
  deleteCron: (scheduleId: string) => Promise<boolean>;
4001
3477
  getJob: (jobId: string) => Promise<Job>;
4002
3478
  listTasks: (options?: {
4003
- status?: TaskStatusFilter$1;
3479
+ status?: TaskStatusFilter;
4004
3480
  type?: 'one-time' | 'cron';
4005
3481
  limit?: number;
4006
3482
  offset?: number;
@@ -5964,65 +5440,6 @@ interface UseResetPasswordFormReturn {
5964
5440
  }
5965
5441
  declare function useResetPasswordForm(options: UseResetPasswordFormOptions): UseResetPasswordFormReturn;
5966
5442
 
5967
- /**
5968
- * useTaskRun — Poll a background task run until it reaches a terminal state.
5969
- *
5970
- * Polls `GET /api/v1/tasks/:runId` on a configurable interval while the run
5971
- * is active (`pending` | `running` | `waiting`), then stops automatically
5972
- * when the run completes, fails, or is cancelled.
5973
- *
5974
- * @example
5975
- * ```tsx
5976
- * function OrderStatus({ runId }: { runId: string }) {
5977
- * const { run, isRunning, isComplete, isFailed, error } = useTaskRun(runId)
5978
- *
5979
- * if (isRunning) return <Spinner />
5980
- * if (isFailed) return <Error message={error?.message} />
5981
- * if (isComplete) return <Success result={run?.result} />
5982
- * return null
5983
- * }
5984
- * ```
5985
- */
5986
-
5987
- interface UseTaskRunOptions {
5988
- /**
5989
- * Polling interval in ms while the run is active.
5990
- * Default: 2 000 (2 s).
5991
- * Set to 0 to disable automatic polling (use `refetch` manually).
5992
- */
5993
- pollInterval?: number;
5994
- /** Callback fired once when the run reaches `completed` */
5995
- onComplete?: (run: TaskRunStatus) => void;
5996
- /** Callback fired once when the run reaches `failed` or `cancelled` */
5997
- onFailed?: (run: TaskRunStatus, errorMessage: string | undefined) => void;
5998
- /** Override the platform URL (uses provider config by default) */
5999
- platformUrl?: string;
6000
- }
6001
- interface UseTaskRunResult {
6002
- /** The latest task run snapshot, or `null` before the first fetch */
6003
- run: TaskRunStatus | null;
6004
- /** True while waiting for the first response */
6005
- loading: boolean;
6006
- /** Non-null when the API call fails */
6007
- error: SylphxError | null;
6008
- /** True when status is `completed` */
6009
- isComplete: boolean;
6010
- /** True when status is `failed` or `cancelled` */
6011
- isFailed: boolean;
6012
- /** True when status is `pending`, `running`, or `waiting` */
6013
- isRunning: boolean;
6014
- /** Manually trigger a single fetch (idempotent) */
6015
- refetch: () => Promise<void>;
6016
- }
6017
- /**
6018
- * Poll a background task run until it reaches a terminal state.
6019
- *
6020
- * @param runId - Task run ID returned by the platform when a task is triggered.
6021
- * Pass `null` to suspend the hook without error.
6022
- * @param options - Polling and callback options
6023
- */
6024
- declare function useTaskRun(runId: string | null, options?: UseTaskRunOptions): UseTaskRunResult;
6025
-
6026
5443
  /**
6027
5444
  * Monitoring Hooks
6028
5445
  *
@@ -7801,76 +7218,50 @@ interface UseHasPermissionReturn {
7801
7218
  declare function useHasPermission(permissions: string[], required: string | string[]): UseHasPermissionReturn;
7802
7219
 
7803
7220
  /**
7804
- * Storage SDK — pure functional, namespaced. Per ADR-100.
7221
+ * Objects SDK — sole BaaS object-storage client.
7805
7222
  *
7806
- * Wire is the contract in `@sylphx/contract` (`schemas/storage.ts` +
7807
- * `endpoints/storage.ts`). This module is the only public surface for
7808
- * uploads / files; consumers import the `storage` namespace.
7809
- *
7810
- * Features (built-in defaults, ADR-100 §2.8):
7811
- * - Idempotency-Key auto-generated (UUIDv7) on every POST
7812
- * - Single-part PUT or multipart, picked server-side from `size`
7813
- * - Streaming SHA-256 via the Web Crypto API
7814
- * - Resumable: persists `(uploadId, completedParts[])` to localStorage when available
7815
- * - AbortSignal cancellation; auto-DELETE upload session on abort
7816
- * - Exponential backoff with full jitter (5 retries, 1s base, 30s cap)
7817
- * - Progress: byte-accurate via XHR (browser) or stream sampling (node)
7818
- *
7819
- * No vendor SDKs. Pure `fetch` + `XMLHttpRequest`.
7223
+ * Wire is `/objects`, `/objects/buckets`, `/objects/{key}` only.
7224
+ * Leftover `/storage/uploads` and `/storage/files*` roots are retired.
7820
7225
  */
7821
7226
 
7822
- interface UploadProgressEvent {
7823
- loaded: number;
7824
- total: number;
7825
- partsCompleted: number;
7826
- partsTotal: number;
7227
+ interface ObjectListOptions {
7228
+ bucket?: string;
7229
+ prefix?: string;
7230
+ limit?: number;
7827
7231
  }
7828
- interface UploadCreateOptions {
7829
- /** Logical name; preserved as metadata. Defaults to `blob.name` if `File`. */
7830
- filename?: string;
7831
- /** MIME type override; defaults to `blob.type` or `application/octet-stream`. */
7232
+ interface ObjectWriteOptions {
7233
+ bucket?: string;
7832
7234
  contentType?: string;
7833
- /** Logical folder path within the project namespace. */
7834
- folder?: string;
7835
- /** Defaults to `'private'`. */
7836
- visibility?: 'public' | 'private';
7837
- /** Arbitrary user-attached metadata. */
7838
- metadata?: Record<string, unknown>;
7839
- /** Pre-computed SHA-256 (hex). If absent, the SDK computes it. */
7840
- checksumSha256?: string;
7841
- /** Fail when a file already exists at `(folder, filename)`. */
7842
- ifNoneMatch?: '*';
7843
- /** Cancellation. Aborts in-flight PUTs and triggers `DELETE /uploads/{id}`. */
7844
7235
  signal?: AbortSignal;
7845
- /** Override the auto-generated UUIDv7 idempotency key. */
7846
- idempotencyKey?: string;
7847
- /** Progress callback. */
7848
- onProgress?: (event: UploadProgressEvent) => void;
7849
- }
7850
- interface ListFilesOptions {
7851
- folder?: string;
7852
- cursor?: string;
7853
- limit?: number;
7854
- includeDeleted?: boolean;
7855
7236
  }
7856
7237
 
7857
7238
  /**
7858
- * Storage hooks — ADR-100.
7859
- *
7860
- * Surface (3 hooks, no legacy):
7239
+ * Objects hooks.
7861
7240
  *
7241
+ * Surface:
7862
7242
  * - `useStorage()` — `{ upload, files, isUploading, isLoadingFiles, error, refetch }`
7863
- * - `useFile(fileId)` — `{ file, isLoading, error }`
7243
+ * - `useFile(key)` — `{ file, isLoading, error }`
7864
7244
  * - `useFileList(options?)` — `{ files, nextCursor, isLoading, loadMore }`
7865
7245
  *
7866
- * Built on TanStack Query (peer dep). The pure functional surface comes
7867
- * from `@sylphx/sdk` → `storage.uploads.*` / `storage.files.*`.
7246
+ * Wired to `/objects` and `/objects/{key}` only.
7868
7247
  */
7869
7248
 
7249
+ interface StorageFile {
7250
+ key: string;
7251
+ size?: number;
7252
+ url?: string | null;
7253
+ }
7254
+ type FileId = string;
7255
+ type ListFilesOptions = ObjectListOptions;
7256
+ type UploadCreateOptions = ObjectWriteOptions & {
7257
+ filename?: string;
7258
+ folder?: string;
7259
+ };
7260
+
7870
7261
  interface UseStorageReturn {
7871
- upload(file: Blob | File, options?: UploadCreateOptions): Promise<File$1>;
7872
- uploadAvatar(file: Blob | File, options?: UploadCreateOptions): Promise<File$1>;
7873
- files: File$1[] | undefined;
7262
+ upload(file: Blob | File, options?: UploadCreateOptions): Promise<StorageFile>;
7263
+ uploadAvatar(file: Blob | File, options?: UploadCreateOptions): Promise<StorageFile>;
7264
+ files: StorageFile[] | undefined;
7874
7265
  isUploading: boolean;
7875
7266
  isLoadingFiles: boolean;
7876
7267
  progress: number;
@@ -7878,125 +7269,21 @@ interface UseStorageReturn {
7878
7269
  uploadError: Error | null;
7879
7270
  refetch(): Promise<void>;
7880
7271
  }
7881
- /**
7882
- * Composite storage hook — exposes a one-shot `upload` mutation plus a
7883
- * cached file list. For finer-grained control reach for `useFileList`
7884
- * (paginated) or `useFile` (single resource).
7885
- *
7886
- * @example
7887
- * ```tsx
7888
- * const { upload, files, isUploading } = useStorage()
7889
- * await upload(blob, { folder: 'docs' })
7890
- * ```
7891
- */
7892
7272
  declare function useStorage(): UseStorageReturn;
7893
7273
  interface UseFileReturn {
7894
- file: File$1 | undefined;
7274
+ file: StorageFile | undefined;
7895
7275
  isLoading: boolean;
7896
7276
  error: Error | null;
7897
7277
  }
7898
- /**
7899
- * Fetch a single file by id (cached).
7900
- */
7901
7278
  declare function useFile(fileId: FileId | string): UseFileReturn;
7902
7279
  interface UseFileListReturn {
7903
- files: File$1[];
7280
+ files: StorageFile[];
7904
7281
  nextCursor: string | null;
7905
7282
  isLoading: boolean;
7906
7283
  loadMore(): Promise<void>;
7907
7284
  }
7908
- /**
7909
- * Paginated, cursor-based file listing. Call `loadMore()` to append the
7910
- * next page; `nextCursor` is `null` when exhausted.
7911
- */
7912
7285
  declare function useFileList(options?: ListFilesOptions): UseFileListReturn;
7913
7286
 
7914
- /**
7915
- * Background Task Hooks
7916
- *
7917
- * React hooks for Sylphx Platform background tasks.
7918
- * Schedule one-time or cron jobs via the platform.
7919
- *
7920
- * Uses proper React Context pattern (no module singletons).
7921
- */
7922
-
7923
- type Task = Job;
7924
- type TaskStatus = JobStatus;
7925
- type TaskStatusFilter = JobStatusFilter;
7926
-
7927
- interface UseTasksReturn {
7928
- /** Check if background tasks are available */
7929
- isAvailable: () => Promise<boolean>;
7930
- /** Schedule a one-time job */
7931
- schedule: (options: ScheduleJobInput) => Promise<ScheduleJobResult>;
7932
- /** Create a recurring cron job */
7933
- createCron: (options: CreateCronInput) => Promise<CreateCronResult>;
7934
- /** Pause a cron job */
7935
- pauseCron: (scheduleId: string) => Promise<boolean>;
7936
- /** Resume a paused cron job */
7937
- resumeCron: (scheduleId: string) => Promise<boolean>;
7938
- /** Delete a cron job */
7939
- deleteCron: (scheduleId: string) => Promise<boolean>;
7940
- /** Get job status */
7941
- getJob: (jobId: string) => Promise<Job>;
7942
- /** List jobs */
7943
- listJobs: (options?: {
7944
- status?: JobStatusFilter;
7945
- type?: 'one-time' | 'cron';
7946
- limit?: number;
7947
- offset?: number;
7948
- }) => Promise<Job[]>;
7949
- /** Cancel a pending, running, waiting, or failed task run */
7950
- cancelJob: (jobId: string) => Promise<boolean>;
7951
- /** Whether a job operation is in progress */
7952
- isLoading: boolean;
7953
- /** Last error */
7954
- error: Error | null;
7955
- }
7956
- /**
7957
- * Hook for background job management
7958
- *
7959
- * @example
7960
- * ```tsx
7961
- * function JobScheduler() {
7962
- * const { schedule, createCron, isLoading } = useTasks()
7963
- *
7964
- * const handleSchedule = async () => {
7965
- * // Schedule a job to run in 1 hour
7966
- * const result = await schedule({
7967
- * callbackUrl: 'https://myapp.com/api/process',
7968
- * payload: { orderId: '123' },
7969
- * delay: 3600, // 1 hour
7970
- * name: 'process-order',
7971
- * })
7972
- * console.log('Scheduled job:', result.jobId)
7973
- * }
7974
- *
7975
- * const handleCron = async () => {
7976
- * // Create a job that runs every day at 9am
7977
- * const result = await createCron({
7978
- * callbackUrl: 'https://myapp.com/api/daily-report',
7979
- * cron: '0 9 * * *',
7980
- * name: 'daily-report',
7981
- * })
7982
- * console.log('Created cron:', result.scheduleId)
7983
- * }
7984
- *
7985
- * return (
7986
- * <div>
7987
- * <button onClick={handleSchedule} disabled={isLoading}>
7988
- * Schedule Job
7989
- * </button>
7990
- * <button onClick={handleCron} disabled={isLoading}>
7991
- * Create Cron
7992
- * </button>
7993
- * </div>
7994
- * )
7995
- * }
7996
- * ```
7997
- */
7998
- declare function useTasks(): UseTasksReturn;
7999
-
8000
7287
  /**
8001
7288
  * Webhooks Hooks
8002
7289
  *
@@ -13174,395 +12461,6 @@ declare function DestinationRouterProvider({ children, ...options }: Destination
13174
12461
  */
13175
12462
  declare function useRouterContext(): DestinationRouter | null;
13176
12463
 
13177
- /**
13178
- * Tasks Handler
13179
- *
13180
- * Server-side endpoint factory for user task definitions.
13181
- * Implements the Sylphx stateless-replay model:
13182
- *
13183
- * 1. Platform dispatches POST to the app's /api/tasks endpoint.
13184
- * 2. The handler replays from the beginning.
13185
- * 3. Completed steps hit a cache and return immediately.
13186
- * 4. The first uncached step executes, then throws StepCompleteSignal.
13187
- * 5. The platform saves the result and re-dispatches.
13188
- * 6. After all steps complete the handler returns normally.
13189
- *
13190
- * @example
13191
- * ```typescript
13192
- * // app/api/tasks/route.ts
13193
- * import { sylphx } from '@/lib/sylphx'
13194
- *
13195
- * const sendEmail = sylphx.tasks.define('send-email', async (payload, { step }) => {
13196
- * const validated = await step.run('validate', () => validateEmail(payload.to))
13197
- * await step.sleep('cool-down', '5 minutes')
13198
- * return step.run('send', () => sendEmail(validated))
13199
- * })
13200
- *
13201
- * export const { GET, POST } = sylphx.tasks.handler([sendEmail])
13202
- * ```
13203
- */
13204
-
13205
- interface TasksHandlerOptions {
13206
- /** Platform signing secret. If not set, signature verification is skipped. */
13207
- signingSecret?: string;
13208
- }
13209
- interface TasksHandlerResult {
13210
- GET: (req: Request) => Promise<Response>;
13211
- POST: (req: Request) => Promise<Response>;
13212
- }
13213
-
13214
- /**
13215
- * Tasks Legacy Client
13216
- *
13217
- * @deprecated Use task() / taskStub() / serve() from the tasks module instead.
13218
- *
13219
- * This file preserves backward compatibility for consumers of the old TasksClient API.
13220
- * The TasksClient class is unchanged — it is imported by ./index.ts under the 'legacy' export group.
13221
- */
13222
-
13223
- /**
13224
- * Jobs Client
13225
- *
13226
- * Client for scheduling jobs and workflows via the Sylph API.
13227
- */
13228
- declare class TasksClient {
13229
- private config;
13230
- private eventHandlers;
13231
- constructor(config: TasksConfig);
13232
- /**
13233
- * Schedule a job for execution
13234
- */
13235
- schedule<TPayload extends JobPayload = JobPayload>(type: string, payload: TPayload, options?: JobOptions): Promise<Job$1<TPayload>>;
13236
- /**
13237
- * Schedule a job with delay
13238
- */
13239
- scheduleDelayed<TPayload extends JobPayload = JobPayload>(type: string, payload: TPayload, delay: number | Date, options?: JobOptions): Promise<Job$1<TPayload>>;
13240
- /**
13241
- * Schedule a recurring job (cron)
13242
- */
13243
- scheduleCron<TPayload extends JobPayload = JobPayload>(type: string, payload: TPayload, cron: string | CronSchedule, options?: JobOptions): Promise<ScheduledJob>;
13244
- /**
13245
- * Get a job by ID
13246
- */
13247
- getJob<TPayload extends JobPayload = JobPayload, TResult = JobResult>(jobId: string): Promise<Job$1<TPayload, TResult> | null>;
13248
- /**
13249
- * Cancel a job
13250
- */
13251
- cancelJob(jobId: string): Promise<boolean>;
13252
- /**
13253
- * Retry a failed job
13254
- */
13255
- retryJob(jobId: string): Promise<Job$1>;
13256
- /**
13257
- * List jobs with filters
13258
- */
13259
- listJobs(options?: {
13260
- type?: string;
13261
- status?: string;
13262
- limit?: number;
13263
- offset?: number;
13264
- }): Promise<{
13265
- jobs: Job$1[];
13266
- total: number;
13267
- }>;
13268
- /**
13269
- * List DLQ entries
13270
- */
13271
- listDLQ(options?: {
13272
- limit?: number;
13273
- offset?: number;
13274
- }): Promise<{
13275
- entries: Job$1[];
13276
- total: number;
13277
- }>;
13278
- /**
13279
- * Retry a DLQ entry
13280
- */
13281
- retryDLQEntry(entryId: string): Promise<Job$1>;
13282
- /**
13283
- * Discard a DLQ entry
13284
- */
13285
- discardDLQEntry(entryId: string): Promise<boolean>;
13286
- /**
13287
- * Start a workflow
13288
- */
13289
- startWorkflow<TInput extends JobPayload = JobPayload, TOutput = JobResult>(workflow: WorkflowDefinition<TInput, TOutput>, input: TInput, options?: JobOptions): Promise<Workflow<TInput, TOutput>>;
13290
- /**
13291
- * Get a workflow by ID
13292
- */
13293
- getWorkflow<TInput extends JobPayload = JobPayload, TOutput = JobResult>(workflowId: string): Promise<Workflow<TInput, TOutput> | null>;
13294
- /**
13295
- * Cancel a workflow
13296
- */
13297
- cancelWorkflow(workflowId: string): Promise<boolean>;
13298
- /**
13299
- * List workflows
13300
- */
13301
- listWorkflows(options?: {
13302
- type?: string;
13303
- status?: string;
13304
- limit?: number;
13305
- offset?: number;
13306
- }): Promise<{
13307
- workflows: Workflow[];
13308
- total: number;
13309
- }>;
13310
- /**
13311
- * List scheduled jobs
13312
- */
13313
- listScheduledJobs(options?: {
13314
- status?: 'active' | 'paused' | 'completed';
13315
- limit?: number;
13316
- offset?: number;
13317
- }): Promise<{
13318
- scheduled: ScheduledJob[];
13319
- total: number;
13320
- }>;
13321
- /**
13322
- * Pause a scheduled job
13323
- */
13324
- pauseScheduledJob(scheduleId: string): Promise<ScheduledJob>;
13325
- /**
13326
- * Resume a scheduled job
13327
- */
13328
- resumeScheduledJob(scheduleId: string): Promise<ScheduledJob>;
13329
- /**
13330
- * Delete a scheduled job
13331
- */
13332
- deleteScheduledJob(scheduleId: string): Promise<boolean>;
13333
- /**
13334
- * Subscribe to job events
13335
- */
13336
- onJobEvent(handler: (event: JobEvent) => void): () => void;
13337
- /**
13338
- * Subscribe to workflow events
13339
- */
13340
- onWorkflowEvent(handler: (event: WorkflowEvent) => void): () => void;
13341
- private fetch;
13342
- /**
13343
- * Define a named task handler.
13344
- *
13345
- * Returns a TaskDefinition that can be passed to tasks.handler([...]).
13346
- * The handler runs with stateless-replay semantics — each dispatch
13347
- * replays from the beginning with completed steps injected from cache.
13348
- *
13349
- * @example
13350
- * ```typescript
13351
- * const sendEmail = sylphx.tasks.define('send-email', async (payload, { step }) => {
13352
- * const validated = await step.run('validate', () => validate(payload.to))
13353
- * await step.sleep('cool-down', '5 minutes')
13354
- * return step.run('send', () => send(validated))
13355
- * })
13356
- * ```
13357
- */
13358
- define<TPayload = unknown, TResult = unknown>(name: string, fn: (payload: TPayload, ctx: {
13359
- step: NativeStepContext;
13360
- }) => Promise<TResult>, options?: NativeTaskDefinition<TPayload, TResult>['options']): NativeTaskDefinition<TPayload, TResult>;
13361
- /**
13362
- * Create a Next.js / Web-API-compatible route handler for a set of task definitions.
13363
- *
13364
- * @example
13365
- * ```typescript
13366
- * // app/api/tasks/route.ts
13367
- * export const { GET, POST } = sylphx.tasks.handler([sendEmail, processOrder])
13368
- * ```
13369
- */
13370
- handler(tasks: NativeTaskDefinition[], handlerOptions?: TasksHandlerOptions): TasksHandlerResult;
13371
- /**
13372
- * Trigger a task run on the Sylphx platform.
13373
- *
13374
- * The platform will dispatch the task to the app's handler endpoint.
13375
- * Returns the taskRunId which can be used to poll status.
13376
- */
13377
- trigger<TPayload = unknown>(taskName: string, payload?: TPayload, options?: {
13378
- delay?: string;
13379
- scheduledFor?: Date;
13380
- idempotencyKey?: string;
13381
- maxAttempts?: number;
13382
- }): Promise<{
13383
- taskRunId: string;
13384
- status: string;
13385
- createdAt: string;
13386
- }>;
13387
- /**
13388
- * Fetch the current status of a task run.
13389
- */
13390
- getTaskRun(taskRunId: string): Promise<TaskRunStatus>;
13391
- /**
13392
- * Cancel a pending, running, waiting, or failed task run.
13393
- */
13394
- cancelTaskRun(taskRunId: string): Promise<boolean>;
13395
- /**
13396
- * List task runs for the current project/environment.
13397
- */
13398
- listTaskRuns(options?: {
13399
- taskName?: string;
13400
- status?: TaskRunStatus['status'];
13401
- limit?: number;
13402
- offset?: number;
13403
- }): Promise<{
13404
- runs: TaskRunStatus[];
13405
- total: number;
13406
- }>;
13407
- }
13408
- /**
13409
- * Create a Jobs client instance
13410
- */
13411
- declare function createTasksClient(config: TasksConfig): TasksClient;
13412
- /** @deprecated Use TasksClient */
13413
- declare class JobsClient extends TasksClient {
13414
- }
13415
- /** @deprecated Use createTasksClient */
13416
- declare const createJobsClient: typeof createTasksClient;
13417
-
13418
- /**
13419
- * Workflow Builder DSL
13420
- *
13421
- * Fluent API for defining workflows with type safety.
13422
- *
13423
- * @example
13424
- * ```typescript
13425
- * const workflow = createWorkflow('onboarding')
13426
- * .name('User Onboarding')
13427
- * .step('create-account', task('create-user'))
13428
- * .step('send-welcome', task('send-email', (ctx) => ({
13429
- * to: ctx.results['create-account'].email,
13430
- * template: 'welcome',
13431
- * })))
13432
- * .step('wait-verification', wait(24 * 60 * 60 * 1000))
13433
- * .step('check-verified', conditional(
13434
- * (ctx) => ctx.results['create-account'].verified,
13435
- * [task('activate-account')],
13436
- * [task('send-reminder')]
13437
- * ))
13438
- * .build()
13439
- * ```
13440
- */
13441
-
13442
- /**
13443
- * Create a new workflow builder
13444
- */
13445
- declare function createWorkflow<TInput extends TaskPayload = TaskPayload, TOutput = TaskResult>(type: string): WorkflowBuilder<TInput, TOutput>;
13446
- /**
13447
- * Workflow Builder
13448
- *
13449
- * Fluent API for building workflow definitions.
13450
- */
13451
- declare class WorkflowBuilder<TInput extends TaskPayload = TaskPayload, TOutput = TaskResult> {
13452
- private definition;
13453
- private _steps;
13454
- constructor(type: string);
13455
- /**
13456
- * Set workflow name
13457
- */
13458
- name(name: string): this;
13459
- /**
13460
- * Set workflow description
13461
- */
13462
- description(description: string): this;
13463
- /**
13464
- * Set default options
13465
- */
13466
- defaults(options: WorkflowOptions): this;
13467
- /**
13468
- * Add a step to the workflow
13469
- */
13470
- step(name: string, step: WorkflowStep): this;
13471
- /**
13472
- * Add multiple steps
13473
- */
13474
- steps(...steps: Array<[string, WorkflowStep]>): this;
13475
- /**
13476
- * Add on complete callback
13477
- */
13478
- onComplete(callback: (result: TOutput) => void): this;
13479
- /**
13480
- * Add on error callback
13481
- */
13482
- onError(callback: (error: Error, step: string) => void): this;
13483
- /**
13484
- * Build the workflow definition
13485
- */
13486
- build(): WorkflowDefinition<TInput, TOutput>;
13487
- }
13488
- /**
13489
- * Create a job step
13490
- */
13491
- declare function task(taskType: string, payload?: TaskPayload | ((context: StepContext) => TaskPayload), options?: TaskOptions): TaskStep;
13492
- /**
13493
- * Create a conditional step
13494
- */
13495
- declare function conditional(condition: (context: StepContext) => boolean, thenSteps: WorkflowStep[], elseSteps?: WorkflowStep[]): ConditionalStep;
13496
- /**
13497
- * Create a parallel step
13498
- */
13499
- declare function parallel(steps: WorkflowStep[], options?: {
13500
- waitFor?: 'all' | 'any';
13501
- maxConcurrency?: number;
13502
- }): ParallelStep;
13503
- /**
13504
- * Create a loop step
13505
- */
13506
- declare function loop(items: unknown[] | ((context: StepContext) => unknown[]), step: WorkflowStep, options?: {
13507
- maxConcurrency?: number;
13508
- breakIf?: (item: unknown, index: number, context: StepContext) => boolean;
13509
- }): LoopStep;
13510
- /**
13511
- * Create a wait step
13512
- */
13513
- declare function wait(until: number | Date | ((context: StepContext) => number | Date)): WaitStep;
13514
- /**
13515
- * Create a sub-workflow step
13516
- */
13517
- declare function subworkflow(workflowType: string, payload?: TaskPayload | ((context: StepContext) => TaskPayload), options?: WorkflowOptions): SubworkflowStep;
13518
- /**
13519
- * Create a job step with conditional execution
13520
- */
13521
- declare function jobIf(condition: (context: StepContext) => boolean, taskType: string, payload?: TaskPayload | ((context: StepContext) => TaskPayload), options?: TaskOptions): TaskStep;
13522
- /**
13523
- * Create a delay step (alias for wait)
13524
- */
13525
- declare function delay(ms: number): WaitStep;
13526
- /**
13527
- * Create a step that sleeps until a specific time
13528
- */
13529
- declare function sleepUntil(date: Date | ((context: StepContext) => Date)): WaitStep;
13530
- /**
13531
- * Create a retry wrapper for a step
13532
- */
13533
- declare function withRetry(step: TaskStep, options: {
13534
- maxRetries: number;
13535
- retryDelay?: number;
13536
- }): TaskStep;
13537
- /**
13538
- * Create a timeout wrapper for a step
13539
- */
13540
- declare function withTimeout(step: TaskStep, timeoutMs: number): TaskStep;
13541
- /**
13542
- * Compose multiple workflows sequentially
13543
- */
13544
- declare function sequence(...workflows: WorkflowDefinition[]): WorkflowStep[];
13545
- /**
13546
- * Fan-out pattern: Execute same job for multiple items
13547
- */
13548
- declare function fanOut(items: unknown[] | ((context: StepContext) => unknown[]), taskType: string, payloadMapper: (item: unknown, index: number) => TaskPayload, options?: {
13549
- maxConcurrency?: number;
13550
- }): LoopStep;
13551
- /**
13552
- * Saga pattern: Define compensating actions for each step
13553
- */
13554
- interface SagaStep {
13555
- forward: TaskStep;
13556
- compensate: TaskStep;
13557
- }
13558
- declare function saga(steps: SagaStep[]): WorkflowStep[];
13559
- /**
13560
- * Validate a workflow definition
13561
- */
13562
- declare function validateWorkflow(workflow: WorkflowDefinition): string[];
13563
- /** @deprecated Use task() instead */
13564
- declare const job: typeof task;
13565
-
13566
12464
  /**
13567
12465
  * Shared Realtime Types
13568
12466
  *
@@ -13815,7 +12713,7 @@ interface UseKvReturn {
13815
12713
  /** Increment a numeric value atomically */
13816
12714
  incr(key: string, by?: number): Promise<number>;
13817
12715
  /** Set key expiration */
13818
- expire(key: string, seconds: number): Promise<boolean>;
12716
+ expire(key: string, ex: number): Promise<boolean>;
13819
12717
  /** Check rate limit using sliding window algorithm */
13820
12718
  ratelimit(key: string, options: {
13821
12719
  limit: number;
@@ -14165,4 +13063,4 @@ interface VitalReportPayload {
14165
13063
  */
14166
13064
  declare function SpeedInsights({ appKey, endpoint, samplingRate, debug, reportAllChanges, }: SpeedInsightsProps): null;
14167
13065
 
14168
- export { AIContext, type AIContextValue, type APIKey, APIKeyManager, type APIKeyManagerProps, AccountSection, type AccountSectionProps, type AdditionalField, AdminOnly, type AmplitudeDestinationConfig, type AnalyticsConfig, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDataPoint, type DeviceContext as AnalyticsDeviceContext, type AnalyticsEvent$1 as AnalyticsEvent, type EventProperties as AnalyticsEventProperties, type PageContext as AnalyticsPageContext, AnalyticsProvider, type AnalyticsProviderProps, type AnalyticsQuery, type AnalyticsQueryResult, type AnalyticsStat, AnalyticsTracker, type UserProperties as AnalyticsUserProperties, type AppConfig, type AppMetadata, type AsyncState, type AttributionData, AuthContext, type AuthContextValue, AuthLoading, type AuthLoginResult, type AuthRegisterResult, type AuthSession, type AuthState, type AuthUser, AuthorizationError, Autocapture, type AutocaptureConfig, AvatarUpload, type AvatarUploadProps, type BaseDestinationConfig, BillingCard, type BillingCardProps, BillingSection, type BillingSectionProps, type Breadcrumb$1 as Breadcrumb, type BreadcrumbType, type CaptureExceptionOptions$1 as CaptureExceptionOptions, type CaptureMessageOptions$1 as CaptureMessageOptions, type CaptureResult, ChatBubble, type ChatBubbleProps, ChatInput, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, CheckoutButton, type CheckoutButtonProps, type ClickIds, type ConditionalStep, ConfigContext, type ConnectedAccount, type ConsentCategory$1 as ConsentCategory, ConsentContext, type ConsentContextValue, ConsentGuard, type ConsentGuardProps, ConsentPreferences, type ConsentPreferencesProps, ConsentScript, type ConsentScriptProps, type ConsentType, type ConsoleLog, type ConversionData, CookieBanner, type CookieBannerProps, type CoreWebVitalName, type CreateCronInput, type CreateCronResult, CreateOrganization, type CreateOrganizationProps, type CreatePermissionInput, type CreateRoleInput, CronBuilder, type CronBuilderProps, type CronSchedule, type CustomDestinationConfig, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTOCAPTURE_CONFIG, DEFAULT_ERROR_CONFIG, DEFAULT_FLAGS_CONFIG, DEFAULT_JOBS_CONFIG, DEFAULT_RETRY_DELAYS, DEFAULT_WEB_VITALS_CONFIG, type DLQOptions, type DataState, DatabaseContext, type DatabaseContextValue, type DeadClick, DeadClickDetector, type DestinationConfig, type ConsentCategory as DestinationConsentCategory, type DestinationPlatform, type DestinationRouter, type DestinationRouterConfig, DestinationRouterProvider, type DestinationRouterProviderProps, type DestinationType, type DeviceSession, type ElementData, EmailContext, type EmailContextValue, type EmailOptions, type EnabledProvider, type EnvironmentType, ErrorBoundary, type ErrorBoundaryFallbackProps, type ErrorBoundaryProps, type Breadcrumb as ErrorBreadcrumb, type ErrorCallback, type CaptureExceptionOptions as ErrorCaptureExceptionOptions, type CaptureMessageOptions as ErrorCaptureMessageOptions, type ErrorCode, type ErrorEvent, ErrorTracker, type ErrorTrackingConfig, type EvaluationContext, type EvaluationReason, type EvaluationResult, type EventCallback, EventViewer, type EventViewerProps, type ExceptionValue, type Experiment, type ExperimentExposure, ExperimentManager, FacebookPixel, type FacebookPixelProps, type FeatureFlag, type FeatureFlagContextValue, type FeatureFlagDefinition, FeatureFlagProvider, type FeatureFlagProviderProps, type FeatureFlagsConfig, FeatureFlagsProvider, type FeatureFlagsProviderProps, FeatureGate, type FeatureGateProps, FeatureValue, type FeatureValueProps, FeatureVariant, type FeatureVariantProps, FeedbackWidget, type FeedbackWidgetProps, FileUpload, type FileUploadProps, type FlagClientEvent, type FlagDefinition, FlagDevTools, type FlagDevToolsProps, type FlagOverrides, FlagStream, type FlagValue, type FlagVariant, type FlagValue$1 as FlagsValue, ForgotPassword, type ForgotPasswordFormState, type ForgotPasswordProps, type GA4DestinationConfig, type GTMDestinationConfig, GoogleAnalytics, type GoogleAnalyticsProps, GoogleConsentMode, type GoogleConsentModeConfig, type GoogleConsentModeProps, type GoogleConsentState, type GoogleConsentType, GoogleTagManager, type GoogleTagManagerProps, Hotjar, type HotjarProps, ImageUploader, type ImageUploaderProps, type InAppMessage, type InAppMessagePriority, type InAppMessageType, type InAppMessageWithReadStatus, type InboxPreferences, Intercom, type IntercomProps, type InviteInfo, InviteMember, type InviteMemberProps, type Invoice, InvoiceHistory, type InvoiceHistoryProps, type JobContext, type JobDefinition, type JobEvent, type Job$1 as JobInstance, JobList, type JobListProps, type JobOptions, type JobPayload, type JobPriority, type JobResult, JobScheduler, type JobSchedulerProps, type JobStep, JobsClient, type TasksConfig as JobsConfig, JobsContext, type JobsContextValue, type JobStatus$1 as JobsStatus, type KeyType, type KeyValidationResult, type KvRateLimitResult, type KvSetOptions, type KvZMember, type ListFilesOptions, LocalEvaluator, type LoginHistoryEntry, type LoopStep, type MarkerType, type MemberPermissionsResult, MembersList, type MembersListProps, type MetricRating, type MixpanelDestinationConfig, type MobileDevice, Modal, type ModalProps, ModelCard, type ModelCardProps, ModelGrid, type ModelGridProps, ModelSelector, type ModelSelectorProps, MonitoringContext, type MonitoringContextValue, type MonitoringLevel, NavigationTracker, NetworkError, type NetworkRequest, type NewAPIKey, NewsletterContext, type NewsletterContextValue, NewsletterForm, type NewsletterFormProps, NotFoundError, type Notification, NotificationBell, type NotificationBellProps, NotificationList, type NotificationListProps, NotificationSettings, type NotificationSettingsProps, OAUTH_PROVIDER_META, OAuthButton, type OAuthButtonProps, OAuthButtons, type OAuthButtonsProps, OAuthIcons, type OAuthProvider, type OAuthProviderInfo, type OAuthProviderWithIcon, OrDivider, type OrgRole, type OrganizationInvitation, OrganizationList, type OrganizationListProps, type OrganizationMember, OrganizationProfile, type OrganizationProfileProps, OrganizationSwitcher, type OrganizationSwitcherProps, type ParallelStep, type PasskeyInfo, type PaymentMethod, PaymentMethodManager, type PaymentMethodManagerProps, type Permission, type Plan, type ClickIds as PlatformClickIds, PlatformContext, type PlatformContextValue, type PostHogDestinationConfig, type PreSubmitResult, type PreferenceOption, PremiumOnly, PricingTable, type PricingTableProps, type PrivacyMode, type ProfileSection, Protect, type ProtectProps, ProtectedRoute, type PushPreferences, PushPrompt, type PushPromptProps, type QueryResult, type RageClick, RageClickDetector, RateLimitError, type RealtimeStatus, type RecorderState, type RecorderStatus, ReferralCard, type ReferralCardProps, type ReferralStats, type ReferrerData, ResetPassword, type ResetPasswordFormState, type ResetPasswordProps, type RetryDelayStrategy, type Role, DEFAULT_CONFIG as SESSION_REPLAY_DEFAULT_CONFIG, type SagaStep, type SamplingStrategy, type ScheduleJobInput as ScheduleTaskInput, type ScheduleJobResult as ScheduleTaskResult, type ScheduledJob, type ScriptManagerContextValue, ScriptManagerProvider, type ScriptQueueItem, type ScriptStrategy, ScrollThrashingDetector, SdkAuthContext, type SdkAuthContextValue, type SdkConnectedAccount, type SdkLoginHistoryEntry, type SdkPasskeyInfo, type SdkPasswordStatus, type SdkSecurityAlert, type SdkSecurityAlertsResult, type SdkTwoFactorStatus, type SdkUserProfile, SecurityContext, type SecurityContextValue, type SecurityFactor, type SecurityGrade, type SecurityPriority, type SecurityRecommendation, type SecurityScoreResult, SecuritySettings, type SecuritySettingsProps, type SegmentDestinationConfig, type SessionData, type SessionMarker, type SessionMetadata, SessionRecorder, type SessionReplayConfig, type SessionSummary, SignIn, SignInForm, type SignInFormProps, type SignInFormState, type SignInMethod, type SignInOptions, type SignInProps, type SignInStep, type SignInWithOAuthOptions, SignUp, SignUpForm, type SignUpFormProps, type SignUpFormState, type SignUpProps, type SignUpStep, type SignUpSubmitResult, SignedIn, SignedOut, SimpleChart, type SimpleChartProps, type AnalyticsEvent as SmartAnalyticsEvent, SpeedInsights, type SpeedInsightsProps, type StackFrame, type StandardRole, StatsCard, type StatsCardProps, StatsGrid, type StatsGridProps, type StepContext, type StreamMessage, type Subscriber, SubscriberPreferences, type SubscriberPreferencesProps, type SubscriberStatus, type Subscription, type SubworkflowStep, type SylphxClientConfig, type SylphxDestinationConfig, SylphxError, SylphxErrorBoundary, type SylphxErrorBoundaryProps, type SylphxErrorCode, SylphxProvider, type SylphxProviderProps, type TargetingCondition, type TargetingOperator, type TargetingRule, type Task, type TaskRunStatus, TaskScheduler, type TaskSchedulerProps, type TaskStatus, type TaskStatusFilter, type ThemeVariables, type TimeSeriesData, type TrackOptions, type TwoFactorSetupResult, type TwoFactorStatus, UnsubscribeConfirm, type UnsubscribeConfirmProps, type UpdateRoleInput, type UploadCallback, type UploadCreateOptions, type UsageItem, UsageOverview, type UsageOverviewProps, type UseAIReturn, type UseAchievementsReturn, type UseAnalyticsQueryOptions, type UseAnalyticsQueryReturn, type UseAnalyticsReturn$1 as UseAnalyticsReturn, type UseAuthReturn, type UseBillingReturn, type UseChatOptions, type UseChatReturn, type UseCombinedMonitoringOptions, type UseCompletionOptions, type UseCompletionReturn, type UseConsentCheckOptions, type UseConsentCheckReturn, type UseConsentGateOptions, type UseConsentGateReturn, type UseConsentReturn, type UseConversionTrackingReturn, type UseDestinationRouterOptions, type UseDestinationRouterReturn, type UseEmailReturn, type UseEmbeddingOptions, type UseEmbeddingReturn, type UseEnhancedErrorTrackingOptions, type UseEnhancedErrorTrackingReturn, type UseErrorBoundaryOptions, type UseErrorTrackingReturn, type UseFeatureFlagOptions, type UseFeatureFlagReturn, type UseFileListReturn, type UseFileReturn, type UseFlagStatusOptions, type UseFlagStatusResult, type UseFeatureFlagsReturn as UseFlagsReturn, type UseForgotPasswordFormOptions, type UseForgotPasswordFormReturn, type UseGlobalErrorHandlerOptions, type UseHasPermissionReturn, type UseInboxReturn, type UseKvOptions, type UseKvReturn, type UseLeaderboardReturn, type UseMemberPermissionsReturn, type UseMobilePushReturn, type UseModelsOptions, type UseModelsReturn, type UseNewsletterReturn, type UseNotificationsReturn, type UseOAuthProvidersReturn, type UseOrganizationReturn, type UsePermissionsReturn, type UseRealtimeChannelsOptions, type UseRealtimeOptions, type UseRealtimeReturn, type UseReferralReturn, type UseResetPasswordFormOptions, type UseResetPasswordFormReturn, type UseRolesReturn, type UseSafeAchievementsReturn, type UseSafeAnalyticsReturn, type UseSafeAuthReturn, type UseSafeBillingReturn, type UseSafeConsentReturn, type UseSafeLeaderboardReturn, type UseSafeStreakReturn, type UseSafeUserReturn, type UseSearchOptions, type UseSearchReturn, type UseSessionReplayOptions, type UseSessionReplayReturn, type UseSessionReturn, type UseSignInFormOptions, type UseSignInFormReturn, type UseSignUpFormOptions, type UseSignUpFormReturn, type UseAnalyticsReturn as UseSmartAnalyticsReturn, type UseStorageReturn, type UseStreakReturn, type UseSubscriberFormOptions, type UseSubscriberFormReturn, type UseSylphxReturn, type UseTaskRunOptions, type UseTaskRunResult, type UseTasksReturn, type UseUserReturn, type UseWebAnalyticsReturn, type UseWebVitalOptions, type UseWebVitalReturn, type UseWebVitalsAnalyticsOptions, type UseWebVitalsOptions, type UseWebVitalsReturn, type UseWebhookDeliveriesOptions, type UseWebhookDeliveriesReturn, type UseWebhookStatsReturn, type UseWebhooksReturn, UserButton, type UserButtonProps, type UserConsent, UserContext, type UserContextValue, UserProfile, type UserProfileProps, type UtmParams, ValidationError, VerifyEmail, type VerifyEmailProps, type VitalReportPayload, WEB_VITALS_THRESHOLDS, type WaitStep, WebAnalytics, type WebAnalyticsProps, type WebVitalAttribution, type WebVitalMetric, type WebVitalName, type WebVitalsConfig, type WebVitalsReport, type Webhook, type WebhookDelivery, WebhookDeliveryLog, type WebhookDeliveryLogProps, WebhookManager, type WebhookManagerProps, WebhooksContext, type WebhooksContextValue, type WithSessionReplayProps, type Workflow, WorkflowBuilder, type WorkflowDefinition, type WorkflowEvent, type WorkflowOptions, type WorkflowStep, addBreadcrumb as addErrorBreadcrumb, analyzeReferrer, baseStyles, buildElementData, calculateExperimentDuration, calculateSampleSize, checkCoreWebVitals, clearBreadcrumbs as clearErrorBreadcrumbs, conditional, conditionalStyle, createDestinationRouter, createExperiment, createFlagStream, createJobsClient, createStyles, createWorkflow, darkTheme, defaultTheme, delay, detectEnvironment, detectKeyType, detectSensitiveFields, enableAutoCapture, fanOut, fetchFlags, generateElementName, generateEventName, generatePrivacyReport, getAnalyticsTracker, getBucket, getCookieNamespace, getBreadcrumbs as getErrorBreadcrumbs, getEvaluator, getExperimentManager, getMetric, getPrivacyOptions, getRecorder, getTracker, getUserBucket, getWebVitalsReport, initAnalytics, initAutocapture, initErrorTracking, initFeatureFlags, initNavigationTracker, initWebVitals, injectGlobalStyles, isAppId, isDevelopmentKey, isDevelopmentRuntime, isProductionKey, isSecretKey, isSylphxError, isValidRedirectUrl, isWebVitalsInitialized, job, jobIf, loop, mergeStyles, murmurHash3, oauthProviderIcon, parallel, pollFlags, providerBrandColor, providerDisplayName, resetAnalyticsTracker, resetEvaluator, resetRecorder, resetTracker, resetWebVitals, resolveOAuthProviderIcon, resolveOAuthProviderMeta, safeRedirect, saga, sanitizeForLogging, sanitizeUrl as sanitizeReplayUrl, sanitizeUrl$1 as sanitizeUrl, selectVariant, sequence, sleepUntil, subworkflow, toSylphxError, useAI, useAIContext, useAchievements, useAnalytics, useAnalyticsQuery, useAppMetadata, useAuth, useBilling, useChat, useCombinedMonitoring, useCompletion, useComponentTracking, useConfig, useOAuthProviders as useConfigOAuthProviders, useConsent, useConsentCheck, useConsentContext, useConsentGate, useConsentTypes, useConversionTracking, useDatabaseContext, useDestinationRouter, useEmail, useEmailContext, useEmbedding, useEnhancedErrorTracking, useErrorBoundary, useErrorTracking, useExperiment, useFeatureFlag, useFeatureFlagDefinitions, useFeatureFlags$1 as useFeatureFlags, useFeatureTracking, useFile, useFileList, useFlag, useFlagEvaluation, useFlagJSON, useFlagNumber, useFlagOverrides, useFlagStatus, useFlagString, useFlagStatus as useFlagWithStatus, useFeatureFlags as useFlags, useFlagsReady, useForgotPasswordForm, useFormTracking, useGlobalErrorHandler, useGoogleConsentMode, useHasPermission, useInbox, useIsInTreatment, useIsInVariant, useKv, useLeaderboard, useMemberPermissions, useMobilePush, useModal, useModels, useMonitoringContext, useNewsletter, useNewsletterContext, useNotifications, useOAuthProviders$1 as useOAuthProviders, useOrganization, usePageView, usePermissions, usePlans, useProtect, useRealtime, useRealtimeChannels, useReferral, useResetPasswordForm, useRoles, useRouterContext, useSafeAchievements, useSafeAnalytics, useSafeAuth, useSafeBilling, useSafeConsent, useSafeLeaderboard, useSafeStreak, useSafeUser, useScriptManager, useSdkAuthContext, useSearch, useSecurityContext, useSession, useSessionReplay, useSessionReplayErrorMarker, useSignInForm, useSignUpForm, useAnalyticsHook as useSmartAnalytics, useStorage, useStreak, useSubscriberForm, useSylphx, useTaskRun, useTasks, useTasksContext, useTimeTracking, useUser, useUserContext, useWebAnalytics, useWebVital, useWebVitals, useWebVitalsAnalytics, useWebhookDeliveries, useWebhookStats, useWebhooks, useWebhooksContext, validateAndSanitizeAppId, validateAndSanitizeKey, validateAndSanitizeSecretKey, validateAppId, validateKey, validateSecretKey, validateWorkflow, wait, withRetry, withSessionReplay, withTimeout };
13066
+ export { AIContext, type AIContextValue, type APIKey, APIKeyManager, type APIKeyManagerProps, AccountSection, type AccountSectionProps, type AdditionalField, AdminOnly, type AmplitudeDestinationConfig, type AnalyticsConfig, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDataPoint, type DeviceContext as AnalyticsDeviceContext, type AnalyticsEvent$1 as AnalyticsEvent, type EventProperties as AnalyticsEventProperties, type PageContext as AnalyticsPageContext, AnalyticsProvider, type AnalyticsProviderProps, type AnalyticsQuery, type AnalyticsQueryResult, type AnalyticsStat, AnalyticsTracker, type UserProperties as AnalyticsUserProperties, type AppConfig, type AppMetadata, type AsyncState, type AttributionData, AuthContext, type AuthContextValue, AuthLoading, type AuthLoginResult, type AuthRegisterResult, type AuthSession, type AuthState, type AuthUser, AuthorizationError, Autocapture, type AutocaptureConfig, AvatarUpload, type AvatarUploadProps, type BaseDestinationConfig, BillingCard, type BillingCardProps, BillingSection, type BillingSectionProps, type Breadcrumb$1 as Breadcrumb, type BreadcrumbType, type CaptureExceptionOptions$1 as CaptureExceptionOptions, type CaptureMessageOptions$1 as CaptureMessageOptions, type CaptureResult, ChatBubble, type ChatBubbleProps, ChatInput, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, CheckoutButton, type CheckoutButtonProps, type ClickIds, ConfigContext, type ConnectedAccount, type ConsentCategory$1 as ConsentCategory, ConsentContext, type ConsentContextValue, ConsentGuard, type ConsentGuardProps, ConsentPreferences, type ConsentPreferencesProps, ConsentScript, type ConsentScriptProps, type ConsentType, type ConsoleLog, type ConversionData, CookieBanner, type CookieBannerProps, type CoreWebVitalName, CreateOrganization, type CreateOrganizationProps, type CreatePermissionInput, type CreateRoleInput, CronBuilder, type CronBuilderProps, type CustomDestinationConfig, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTOCAPTURE_CONFIG, DEFAULT_ERROR_CONFIG, DEFAULT_FLAGS_CONFIG, DEFAULT_WEB_VITALS_CONFIG, type DataState, DatabaseContext, type DatabaseContextValue, type DeadClick, DeadClickDetector, type DestinationConfig, type ConsentCategory as DestinationConsentCategory, type DestinationPlatform, type DestinationRouter, type DestinationRouterConfig, DestinationRouterProvider, type DestinationRouterProviderProps, type DestinationType, type DeviceSession, type ElementData, EmailContext, type EmailContextValue, type EmailOptions, type EnabledProvider, type EnvironmentType, ErrorBoundary, type ErrorBoundaryFallbackProps, type ErrorBoundaryProps, type Breadcrumb as ErrorBreadcrumb, type ErrorCallback, type CaptureExceptionOptions as ErrorCaptureExceptionOptions, type CaptureMessageOptions as ErrorCaptureMessageOptions, type ErrorCode, type ErrorEvent, ErrorTracker, type ErrorTrackingConfig, type EvaluationContext, type EvaluationReason, type EvaluationResult, type EventCallback, EventViewer, type EventViewerProps, type ExceptionValue, type Experiment, type ExperimentExposure, ExperimentManager, FacebookPixel, type FacebookPixelProps, type FeatureFlag, type FeatureFlagContextValue, type FeatureFlagDefinition, FeatureFlagProvider, type FeatureFlagProviderProps, type FeatureFlagsConfig, FeatureFlagsProvider, type FeatureFlagsProviderProps, FeatureGate, type FeatureGateProps, FeatureValue, type FeatureValueProps, FeatureVariant, type FeatureVariantProps, FeedbackWidget, type FeedbackWidgetProps, FileUpload, type FileUploadProps, type FlagClientEvent, type FlagDefinition, FlagDevTools, type FlagDevToolsProps, type FlagOverrides, FlagStream, type FlagValue, type FlagVariant, type FlagValue$1 as FlagsValue, ForgotPassword, type ForgotPasswordFormState, type ForgotPasswordProps, type GA4DestinationConfig, type GTMDestinationConfig, GoogleAnalytics, type GoogleAnalyticsProps, GoogleConsentMode, type GoogleConsentModeConfig, type GoogleConsentModeProps, type GoogleConsentState, type GoogleConsentType, GoogleTagManager, type GoogleTagManagerProps, Hotjar, type HotjarProps, ImageUploader, type ImageUploaderProps, type InAppMessage, type InAppMessagePriority, type InAppMessageType, type InAppMessageWithReadStatus, type InboxPreferences, Intercom, type IntercomProps, type InviteInfo, InviteMember, type InviteMemberProps, type Invoice, InvoiceHistory, type InvoiceHistoryProps, JobList, type JobListProps, JobScheduler, type JobSchedulerProps, JobsContext, type JobsContextValue, type KeyType, type KeyValidationResult, type KvRateLimitResult, type KvSetOptions, type KvZMember, type ListFilesOptions, LocalEvaluator, type LoginHistoryEntry, type MarkerType, type MemberPermissionsResult, MembersList, type MembersListProps, type MetricRating, type MixpanelDestinationConfig, type MobileDevice, Modal, type ModalProps, ModelCard, type ModelCardProps, ModelGrid, type ModelGridProps, ModelSelector, type ModelSelectorProps, MonitoringContext, type MonitoringContextValue, type MonitoringLevel, NavigationTracker, NetworkError, type NetworkRequest, type NewAPIKey, NewsletterContext, type NewsletterContextValue, NewsletterForm, type NewsletterFormProps, NotFoundError, type Notification, NotificationBell, type NotificationBellProps, NotificationList, type NotificationListProps, NotificationSettings, type NotificationSettingsProps, OAUTH_PROVIDER_META, OAuthButton, type OAuthButtonProps, OAuthButtons, type OAuthButtonsProps, OAuthIcons, type OAuthProvider, type OAuthProviderInfo, type OAuthProviderWithIcon, OrDivider, type OrgRole, type OrganizationInvitation, OrganizationList, type OrganizationListProps, type OrganizationMember, OrganizationProfile, type OrganizationProfileProps, OrganizationSwitcher, type OrganizationSwitcherProps, type PasskeyInfo, type PaymentMethod, PaymentMethodManager, type PaymentMethodManagerProps, type Permission, type Plan, type ClickIds as PlatformClickIds, PlatformContext, type PlatformContextValue, type PostHogDestinationConfig, type PreSubmitResult, type PreferenceOption, PremiumOnly, PricingTable, type PricingTableProps, type PrivacyMode, type ProfileSection, Protect, type ProtectProps, ProtectedRoute, type PushPreferences, PushPrompt, type PushPromptProps, type QueryResult, type RageClick, RageClickDetector, RateLimitError, type RealtimeStatus, type RecorderState, type RecorderStatus, ReferralCard, type ReferralCardProps, type ReferralStats, type ReferrerData, ResetPassword, type ResetPasswordFormState, type ResetPasswordProps, type Role, DEFAULT_CONFIG as SESSION_REPLAY_DEFAULT_CONFIG, type SamplingStrategy, type ScriptManagerContextValue, ScriptManagerProvider, type ScriptQueueItem, type ScriptStrategy, ScrollThrashingDetector, SdkAuthContext, type SdkAuthContextValue, type SdkConnectedAccount, type SdkLoginHistoryEntry, type SdkPasskeyInfo, type SdkPasswordStatus, type SdkSecurityAlert, type SdkSecurityAlertsResult, type SdkTwoFactorStatus, type SdkUserProfile, SecurityContext, type SecurityContextValue, type SecurityFactor, type SecurityGrade, type SecurityPriority, type SecurityRecommendation, type SecurityScoreResult, SecuritySettings, type SecuritySettingsProps, type SegmentDestinationConfig, type SessionData, type SessionMarker, type SessionMetadata, SessionRecorder, type SessionReplayConfig, type SessionSummary, SignIn, SignInForm, type SignInFormProps, type SignInFormState, type SignInMethod, type SignInOptions, type SignInProps, type SignInStep, type SignInWithOAuthOptions, SignUp, SignUpForm, type SignUpFormProps, type SignUpFormState, type SignUpProps, type SignUpStep, type SignUpSubmitResult, SignedIn, SignedOut, SimpleChart, type SimpleChartProps, type AnalyticsEvent as SmartAnalyticsEvent, SpeedInsights, type SpeedInsightsProps, type StackFrame, type StandardRole, StatsCard, type StatsCardProps, StatsGrid, type StatsGridProps, type StorageFile, type FileId as StorageFileId, type StreamMessage, type Subscriber, SubscriberPreferences, type SubscriberPreferencesProps, type SubscriberStatus, type Subscription, type SylphxClientConfig, type SylphxDestinationConfig, SylphxError, SylphxErrorBoundary, type SylphxErrorBoundaryProps, type SylphxErrorCode, SylphxProvider, type SylphxProviderProps, type TargetingCondition, type TargetingOperator, type TargetingRule, TaskScheduler, type TaskSchedulerProps, type ThemeVariables, type TimeSeriesData, type TrackOptions, type TwoFactorSetupResult, type TwoFactorStatus, UnsubscribeConfirm, type UnsubscribeConfirmProps, type UpdateRoleInput, type UploadCallback, type UploadCreateOptions, type UsageItem, UsageOverview, type UsageOverviewProps, type UseAIReturn, type UseAchievementsReturn, type UseAnalyticsQueryOptions, type UseAnalyticsQueryReturn, type UseAnalyticsReturn$1 as UseAnalyticsReturn, type UseAuthReturn, type UseBillingReturn, type UseChatOptions, type UseChatReturn, type UseCombinedMonitoringOptions, type UseCompletionOptions, type UseCompletionReturn, type UseConsentCheckOptions, type UseConsentCheckReturn, type UseConsentGateOptions, type UseConsentGateReturn, type UseConsentReturn, type UseConversionTrackingReturn, type UseDestinationRouterOptions, type UseDestinationRouterReturn, type UseEmailReturn, type UseEmbeddingOptions, type UseEmbeddingReturn, type UseEnhancedErrorTrackingOptions, type UseEnhancedErrorTrackingReturn, type UseErrorBoundaryOptions, type UseErrorTrackingReturn, type UseFeatureFlagOptions, type UseFeatureFlagReturn, type UseFileListReturn, type UseFileReturn, type UseFlagStatusOptions, type UseFlagStatusResult, type UseFeatureFlagsReturn as UseFlagsReturn, type UseForgotPasswordFormOptions, type UseForgotPasswordFormReturn, type UseGlobalErrorHandlerOptions, type UseHasPermissionReturn, type UseInboxReturn, type UseKvOptions, type UseKvReturn, type UseLeaderboardReturn, type UseMemberPermissionsReturn, type UseMobilePushReturn, type UseModelsOptions, type UseModelsReturn, type UseNewsletterReturn, type UseNotificationsReturn, type UseOAuthProvidersReturn, type UseOrganizationReturn, type UsePermissionsReturn, type UseRealtimeChannelsOptions, type UseRealtimeOptions, type UseRealtimeReturn, type UseReferralReturn, type UseResetPasswordFormOptions, type UseResetPasswordFormReturn, type UseRolesReturn, type UseSafeAchievementsReturn, type UseSafeAnalyticsReturn, type UseSafeAuthReturn, type UseSafeBillingReturn, type UseSafeConsentReturn, type UseSafeLeaderboardReturn, type UseSafeStreakReturn, type UseSafeUserReturn, type UseSearchOptions, type UseSearchReturn, type UseSessionReplayOptions, type UseSessionReplayReturn, type UseSessionReturn, type UseSignInFormOptions, type UseSignInFormReturn, type UseSignUpFormOptions, type UseSignUpFormReturn, type UseAnalyticsReturn as UseSmartAnalyticsReturn, type UseStorageReturn, type UseStreakReturn, type UseSubscriberFormOptions, type UseSubscriberFormReturn, type UseSylphxReturn, type UseUserReturn, type UseWebAnalyticsReturn, type UseWebVitalOptions, type UseWebVitalReturn, type UseWebVitalsAnalyticsOptions, type UseWebVitalsOptions, type UseWebVitalsReturn, type UseWebhookDeliveriesOptions, type UseWebhookDeliveriesReturn, type UseWebhookStatsReturn, type UseWebhooksReturn, UserButton, type UserButtonProps, type UserConsent, UserContext, type UserContextValue, UserProfile, type UserProfileProps, type UtmParams, ValidationError, VerifyEmail, type VerifyEmailProps, type VitalReportPayload, WEB_VITALS_THRESHOLDS, WebAnalytics, type WebAnalyticsProps, type WebVitalAttribution, type WebVitalMetric, type WebVitalName, type WebVitalsConfig, type WebVitalsReport, type Webhook, type WebhookDelivery, WebhookDeliveryLog, type WebhookDeliveryLogProps, WebhookManager, type WebhookManagerProps, WebhooksContext, type WebhooksContextValue, type WithSessionReplayProps, addBreadcrumb as addErrorBreadcrumb, analyzeReferrer, baseStyles, buildElementData, calculateExperimentDuration, calculateSampleSize, checkCoreWebVitals, clearBreadcrumbs as clearErrorBreadcrumbs, conditionalStyle, createDestinationRouter, createExperiment, createFlagStream, createStyles, darkTheme, defaultTheme, detectEnvironment, detectKeyType, detectSensitiveFields, enableAutoCapture, fetchFlags, generateElementName, generateEventName, generatePrivacyReport, getAnalyticsTracker, getBucket, getCookieNamespace, getBreadcrumbs as getErrorBreadcrumbs, getEvaluator, getExperimentManager, getMetric, getPrivacyOptions, getRecorder, getTracker, getUserBucket, getWebVitalsReport, initAnalytics, initAutocapture, initErrorTracking, initFeatureFlags, initNavigationTracker, initWebVitals, injectGlobalStyles, isAppId, isDevelopmentKey, isDevelopmentRuntime, isProductionKey, isSecretKey, isSylphxError, isValidRedirectUrl, isWebVitalsInitialized, mergeStyles, murmurHash3, oauthProviderIcon, pollFlags, providerBrandColor, providerDisplayName, resetAnalyticsTracker, resetEvaluator, resetRecorder, resetTracker, resetWebVitals, resolveOAuthProviderIcon, resolveOAuthProviderMeta, safeRedirect, sanitizeForLogging, sanitizeUrl as sanitizeReplayUrl, sanitizeUrl$1 as sanitizeUrl, selectVariant, toSylphxError, useAI, useAIContext, useAchievements, useAnalytics, useAnalyticsQuery, useAppMetadata, useAuth, useBilling, useChat, useCombinedMonitoring, useCompletion, useComponentTracking, useConfig, useOAuthProviders as useConfigOAuthProviders, useConsent, useConsentCheck, useConsentContext, useConsentGate, useConsentTypes, useConversionTracking, useDatabaseContext, useDestinationRouter, useEmail, useEmailContext, useEmbedding, useEnhancedErrorTracking, useErrorBoundary, useErrorTracking, useExperiment, useFeatureFlag, useFeatureFlagDefinitions, useFeatureFlags$1 as useFeatureFlags, useFeatureTracking, useFile, useFileList, useFlag, useFlagEvaluation, useFlagJSON, useFlagNumber, useFlagOverrides, useFlagStatus, useFlagString, useFlagStatus as useFlagWithStatus, useFeatureFlags as useFlags, useFlagsReady, useForgotPasswordForm, useFormTracking, useGlobalErrorHandler, useGoogleConsentMode, useHasPermission, useInbox, useIsInTreatment, useIsInVariant, useKv, useLeaderboard, useMemberPermissions, useMobilePush, useModal, useModels, useMonitoringContext, useNewsletter, useNewsletterContext, useNotifications, useOAuthProviders$1 as useOAuthProviders, useOrganization, usePageView, usePermissions, usePlans, useProtect, useRealtime, useRealtimeChannels, useReferral, useResetPasswordForm, useRoles, useRouterContext, useSafeAchievements, useSafeAnalytics, useSafeAuth, useSafeBilling, useSafeConsent, useSafeLeaderboard, useSafeStreak, useSafeUser, useScriptManager, useSdkAuthContext, useSearch, useSecurityContext, useSession, useSessionReplay, useSessionReplayErrorMarker, useSignInForm, useSignUpForm, useAnalyticsHook as useSmartAnalytics, useStorage, useStreak, useSubscriberForm, useSylphx, useTasksContext, useTimeTracking, useUser, useUserContext, useWebAnalytics, useWebVital, useWebVitals, useWebVitalsAnalytics, useWebhookDeliveries, useWebhookStats, useWebhooks, useWebhooksContext, validateAndSanitizeAppId, validateAndSanitizeKey, validateAndSanitizeSecretKey, validateAppId, validateKey, validateSecretKey, withSessionReplay };