@pol-studios/powersync 1.0.30 → 1.0.33

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.
Files changed (116) hide show
  1. package/dist/{CacheSettingsManager-uz-kbnRH.d.ts → CacheSettingsManager-0H_7thHW.d.ts} +21 -3
  2. package/dist/attachments/index.d.ts +30 -30
  3. package/dist/attachments/index.js +13 -4
  4. package/dist/{background-sync-CVR3PkFi.d.ts → background-sync-BujnI3IR.d.ts} +1 -1
  5. package/dist/{chunk-RE5HWLCB.js → chunk-2RDWLXJW.js} +322 -103
  6. package/dist/chunk-2RDWLXJW.js.map +1 -0
  7. package/dist/{chunk-P4HZA6ZT.js → chunk-4665ZSE5.js} +2 -2
  8. package/dist/chunk-4665ZSE5.js.map +1 -0
  9. package/dist/{chunk-XOY2CJ67.js → chunk-4F5B5CZ7.js} +3 -3
  10. package/dist/chunk-5WRI5ZAA.js +31 -0
  11. package/dist/{chunk-BC2SRII2.js → chunk-65A3SYJZ.js} +14 -1
  12. package/dist/chunk-65A3SYJZ.js.map +1 -0
  13. package/dist/chunk-6SZ64KCZ.js +755 -0
  14. package/dist/chunk-6SZ64KCZ.js.map +1 -0
  15. package/dist/{chunk-C2ACBYBZ.js → chunk-74TBHWJ4.js} +10 -96
  16. package/dist/{chunk-C2ACBYBZ.js.map → chunk-74TBHWJ4.js.map} +1 -1
  17. package/dist/chunk-ANXWYQEJ.js +1 -0
  18. package/dist/chunk-ANXWYQEJ.js.map +1 -0
  19. package/dist/{chunk-CAB26E6F.js → chunk-C4J4MLER.js} +29 -24
  20. package/dist/chunk-C4J4MLER.js.map +1 -0
  21. package/dist/{chunk-C5ODS3XH.js → chunk-EOW7JK7Q.js} +9 -16
  22. package/dist/chunk-EOW7JK7Q.js.map +1 -0
  23. package/dist/chunk-HRAVPIAZ.js +220 -0
  24. package/dist/chunk-HRAVPIAZ.js.map +1 -0
  25. package/dist/{chunk-XAEII4ZX.js → chunk-NUGQOTEM.js} +32 -4
  26. package/dist/chunk-NUGQOTEM.js.map +1 -0
  27. package/dist/chunk-OGUFUZSY.js +5415 -0
  28. package/dist/chunk-OGUFUZSY.js.map +1 -0
  29. package/dist/{chunk-JCGOZVWL.js → chunk-P4D6BQ4X.js} +115 -576
  30. package/dist/chunk-P4D6BQ4X.js.map +1 -0
  31. package/dist/{chunk-CACKC6XG.js → chunk-PGEDE6IM.js} +136 -89
  32. package/dist/chunk-PGEDE6IM.js.map +1 -0
  33. package/dist/{chunk-A4IBBWGO.js → chunk-RALHHPTU.js} +1 -1
  34. package/dist/chunk-RIDSPLE5.js +42 -0
  35. package/dist/chunk-RIDSPLE5.js.map +1 -0
  36. package/dist/{chunk-Z6VOBGTU.js → chunk-UOMHWUHV.js} +2 -12
  37. package/dist/chunk-UOMHWUHV.js.map +1 -0
  38. package/dist/{chunk-QREWE3NR.js → chunk-YONQYTVH.js} +2 -2
  39. package/dist/chunk-ZAN22NGL.js +13 -0
  40. package/dist/chunk-ZAN22NGL.js.map +1 -0
  41. package/dist/config/index.d.ts +200 -0
  42. package/dist/config/index.js +23 -0
  43. package/dist/config/index.js.map +1 -0
  44. package/dist/connector/index.d.ts +23 -5
  45. package/dist/connector/index.js +4 -1
  46. package/dist/core/index.d.ts +2 -2
  47. package/dist/core/index.js +1 -0
  48. package/dist/error/index.js +1 -0
  49. package/dist/generator/index.js +2 -0
  50. package/dist/generator/index.js.map +1 -1
  51. package/dist/index.d.ts +19 -16
  52. package/dist/index.js +68 -36
  53. package/dist/index.native.d.ts +18 -14
  54. package/dist/index.native.js +73 -34
  55. package/dist/index.web.d.ts +17 -14
  56. package/dist/index.web.js +68 -36
  57. package/dist/maintenance/index.d.ts +2 -2
  58. package/dist/maintenance/index.js +3 -2
  59. package/dist/platform/index.d.ts +1 -1
  60. package/dist/platform/index.js +2 -0
  61. package/dist/platform/index.js.map +1 -1
  62. package/dist/platform/index.native.d.ts +1 -1
  63. package/dist/platform/index.native.js +1 -0
  64. package/dist/platform/index.web.d.ts +1 -1
  65. package/dist/platform/index.web.js +1 -0
  66. package/dist/pol-attachment-queue-DqBvLAEY.d.ts +255 -0
  67. package/dist/provider/index.d.ts +149 -114
  68. package/dist/provider/index.js +9 -14
  69. package/dist/provider/index.native.d.ts +108 -0
  70. package/dist/provider/index.native.js +121 -0
  71. package/dist/provider/index.native.js.map +1 -0
  72. package/dist/provider/index.web.d.ts +16 -0
  73. package/dist/provider/index.web.js +112 -0
  74. package/dist/provider/index.web.js.map +1 -0
  75. package/dist/react/index.d.ts +16 -65
  76. package/dist/react/index.js +2 -9
  77. package/dist/storage/index.d.ts +5 -4
  78. package/dist/storage/index.js +12 -9
  79. package/dist/storage/index.native.d.ts +5 -4
  80. package/dist/storage/index.native.js +8 -5
  81. package/dist/storage/index.web.d.ts +5 -4
  82. package/dist/storage/index.web.js +11 -8
  83. package/dist/storage/upload/index.d.ts +4 -3
  84. package/dist/storage/upload/index.js +4 -2
  85. package/dist/storage/upload/index.native.d.ts +4 -3
  86. package/dist/storage/upload/index.native.js +4 -2
  87. package/dist/storage/upload/index.web.d.ts +2 -1
  88. package/dist/storage/upload/index.web.js +4 -2
  89. package/dist/{supabase-connector-C4YpH_l3.d.ts → supabase-connector-HMxBA9Kg.d.ts} +2 -2
  90. package/dist/sync/index.d.ts +155 -20
  91. package/dist/sync/index.js +13 -3
  92. package/dist/{types-CyvBaAl8.d.ts → types-6QHGELuY.d.ts} +4 -1
  93. package/dist/{types-Dv1uf0LZ.d.ts → types-B9MptP7E.d.ts} +7 -10
  94. package/dist/types-BhAEsJj-.d.ts +330 -0
  95. package/dist/{types-D0WcHrq6.d.ts → types-CGMibJKD.d.ts} +8 -0
  96. package/dist/{types-CpM2_LhU.d.ts → types-DqJnP50o.d.ts} +6 -1
  97. package/dist/{pol-attachment-queue-BE2HU3Us.d.ts → types-JCEhw2Lf.d.ts} +139 -346
  98. package/package.json +18 -4
  99. package/dist/chunk-654ERHA7.js +0 -1
  100. package/dist/chunk-BC2SRII2.js.map +0 -1
  101. package/dist/chunk-C5ODS3XH.js.map +0 -1
  102. package/dist/chunk-CAB26E6F.js.map +0 -1
  103. package/dist/chunk-CACKC6XG.js.map +0 -1
  104. package/dist/chunk-FNYQFILT.js +0 -44
  105. package/dist/chunk-FNYQFILT.js.map +0 -1
  106. package/dist/chunk-JCGOZVWL.js.map +0 -1
  107. package/dist/chunk-P4HZA6ZT.js.map +0 -1
  108. package/dist/chunk-RBPWEOIV.js +0 -358
  109. package/dist/chunk-RBPWEOIV.js.map +0 -1
  110. package/dist/chunk-RE5HWLCB.js.map +0 -1
  111. package/dist/chunk-XAEII4ZX.js.map +0 -1
  112. package/dist/chunk-Z6VOBGTU.js.map +0 -1
  113. /package/dist/{chunk-XOY2CJ67.js.map → chunk-4F5B5CZ7.js.map} +0 -0
  114. /package/dist/{chunk-654ERHA7.js.map → chunk-5WRI5ZAA.js.map} +0 -0
  115. /package/dist/{chunk-A4IBBWGO.js.map → chunk-RALHHPTU.js.map} +0 -0
  116. /package/dist/{chunk-QREWE3NR.js.map → chunk-YONQYTVH.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { c as SupabaseStorageOptions, a as StorageBackend, D as DownloadResult, S as SupabaseStorage, d as SupabaseClient } from './types-D0WcHrq6.js';
1
+ import { c as SupabaseStorageOptions, a as StorageBackend, D as DownloadResult, S as SupabaseStorage, d as SupabaseClient } from './types-CGMibJKD.js';
2
2
  import { LoggerAdapter, FileSystemAdapter, AsyncStorageAdapter } from './platform/index.js';
3
3
 
4
4
  /**
@@ -202,6 +202,17 @@ interface SupabaseStorageAdapterOptions {
202
202
  logger?: LoggerAdapter;
203
203
  /** Image transform options for compression on download */
204
204
  imageTransform?: ImageTransformOptions;
205
+ /**
206
+ * Whether to use signed URLs for downloads (default: true).
207
+ * Set to false for public buckets to use getPublicUrl instead of createSignedUrl.
208
+ * This avoids rate limits and simplifies access for public assets.
209
+ */
210
+ useSignedUrls?: boolean;
211
+ /**
212
+ * Custom URL resolver for non-Supabase backends.
213
+ * When provided, getDownloadUrl will use this instead of Supabase Storage API.
214
+ */
215
+ customUrlResolver?: (path: string) => Promise<string> | string;
205
216
  }
206
217
  declare class SupabaseStorageAdapter implements SupabaseStorage {
207
218
  private client;
@@ -212,6 +223,8 @@ declare class SupabaseStorageAdapter implements SupabaseStorage {
212
223
  private fileSystem?;
213
224
  private logger?;
214
225
  private imageTransform?;
226
+ private useSignedUrls;
227
+ private customUrlResolver?;
215
228
  constructor(options: SupabaseStorageAdapterOptions, fileSystem?: FileSystemAdapter);
216
229
  /**
217
230
  * Update image transform options (can be set after construction).
@@ -272,9 +285,14 @@ declare class SupabaseStorageAdapter implements SupabaseStorage {
272
285
  */
273
286
  delete(path: string): Promise<void>;
274
287
  /**
275
- * Get a signed download URL for a remote file.
288
+ * Get a download URL for a remote file.
289
+ *
290
+ * Supports three modes:
291
+ * 1. Custom URL resolver (for non-Supabase backends)
292
+ * 2. Public URLs (for public Supabase buckets, when useSignedUrls=false)
293
+ * 3. Signed URLs (default, for private Supabase buckets)
276
294
  *
277
- * Includes session refresh logic to handle stale tokens during background downloads.
295
+ * Includes session refresh logic for signed URLs to handle stale tokens during background downloads.
278
296
  * If the initial request fails with an auth error (400/401/403), refreshes the session
279
297
  * and retries once.
280
298
  */
@@ -1,11 +1,12 @@
1
- import { g as AttachmentStorageAdapter, d as PolAttachmentRecord, i as UploadHandler, U as UploadConfig, u as UploadStatus, l as CacheConfig, W as WatchConfig } from '../pol-attachment-queue-BE2HU3Us.js';
2
- export { f as AttachmentConfig, F as AttachmentRecord, A as AttachmentSourceConfig, x as AttachmentStatsRow, w as AttachmentSyncStats, v as AttachmentSyncStatus, B as BatchFilterContext, n as CACHE_SIZE_PRESETS, y as CacheFileRow, o as CacheSizePreset, p as CacheSizeValue, z as CachedSizeRow, C as CompressionConfig, m as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, k as DEFAULT_DOWNLOAD_CONFIG, h as DEFAULT_UPLOAD_CONFIG, j as DownloadConfig, r as DownloadPhase, s as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, b as PolAttachmentState, S as SimpleAttachmentConfig, e as SkipDownloadContext, t as UploadPhase, c as createPolAttachmentQueue, q as formatCacheSize } from '../pol-attachment-queue-BE2HU3Us.js';
1
+ export { P as PolAttachmentQueue, a as PolAttachmentQueueOptions, c as createPolAttachmentQueue } from '../pol-attachment-queue-DqBvLAEY.js';
3
2
  import { StorageAdapter, EncodingType, AttachmentRecord } from '@powersync/attachments';
4
3
  export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
5
4
  import { PlatformAdapter, LoggerAdapter } from '../platform/index.js';
5
+ import { e as AttachmentStorageAdapter, a as PolAttachmentRecord, h as UploadHandler, U as UploadConfig, t as UploadStatus, k as CacheConfig, W as WatchConfig } from '../types-JCEhw2Lf.js';
6
+ export { d as AttachmentConfig, z as AttachmentRecord, A as AttachmentSource, c as AttachmentSourceConfig, w as AttachmentStatsRow, v as AttachmentSyncStats, u as AttachmentSyncStatus, m as CACHE_SIZE_PRESETS, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, f as CompressionConfig, C as CustomAttachmentSource, l as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, j as DEFAULT_DOWNLOAD_CONFIG, g as DEFAULT_UPLOAD_CONFIG, i as DownloadConfig, q as DownloadPhase, r as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentState, S as SimpleAttachmentConfig, b as SupabaseBucketSource, s as UploadPhase, p as formatCacheSize, H as getCustomUrlResolver, G as isCustomSource, F as isSignedUrlSource, B as resolveBucketFromConfig } from '../types-JCEhw2Lf.js';
6
7
  import { AbstractPowerSyncDatabase } from '@powersync/common';
7
8
  export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
8
- import '../types-Dv1uf0LZ.js';
9
+ import '../types-B9MptP7E.js';
9
10
 
10
11
  /**
11
12
  * POL Storage Adapter
@@ -28,7 +29,7 @@ interface PolStorageAdapterOptions {
28
29
  */
29
30
  remoteStorage: AttachmentStorageAdapter;
30
31
  /**
31
- * Base directory name for attachments within the cache directory.
32
+ * Base directory name for attachments within the documents directory.
32
33
  * Defaults to 'attachments'.
33
34
  */
34
35
  attachmentDirectoryName?: string;
@@ -67,6 +68,11 @@ declare class PolStorageAdapter implements StorageAdapter {
67
68
  uploadFile(filePath: string, data: ArrayBuffer, options?: {
68
69
  mediaType?: string;
69
70
  }): Promise<void>;
71
+ /**
72
+ * Convert base64 string to Blob with error handling.
73
+ * Throws a descriptive error if the base64 data is malformed.
74
+ */
75
+ private _base64ToBlob;
70
76
  /**
71
77
  * Download a file from remote storage.
72
78
  *
@@ -111,7 +117,7 @@ declare class PolStorageAdapter implements StorageAdapter {
111
117
  copyFile(sourceUri: string, targetUri: string): Promise<void>;
112
118
  /**
113
119
  * Get the user's storage directory for attachments.
114
- * Returns the cache directory path ending with '/'.
120
+ * Returns the documents directory path ending with '/'.
115
121
  */
116
122
  getUserStorageDirectory(): string;
117
123
  /**
@@ -271,7 +277,7 @@ declare function blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
271
277
  * This override writes the downloaded file directly to the file system
272
278
  * using platform-native methods.
273
279
  *
274
- * Note: Filtering is handled by skipDownload callback in the queue.
280
+ * Note: Filtering should be done in the watchPaths callback - only emit paths you want to download.
275
281
  */
276
282
  declare function downloadRecord(deps: DownloadManagerDeps, record: AttachmentRecord): Promise<boolean>;
277
283
 
@@ -477,7 +483,9 @@ declare function getLocalUriForStoragePath(deps: CacheManagerDeps, storagePath:
477
483
  fileExists(uri: string): Promise<boolean>;
478
484
  }): Promise<string | null>;
479
485
  /**
480
- * Copy source file to managed cache for durable uploads.
486
+ * Copy source file to documents directory for durable uploads.
487
+ * Uses documents directory (not cache) to prevent iOS from evicting
488
+ * upload source files before they can be uploaded.
481
489
  */
482
490
  declare function copyToManagedCache(platform: PlatformAdapter, logger: LoggerAdapter, sourceUri: string, storagePath: string): Promise<string>;
483
491
  /**
@@ -532,27 +540,21 @@ declare function validateWhereClause(whereClause: string): void;
532
540
  * // FROM EquipmentUnitMediaContent
533
541
  * // WHERE storagePath IS NOT NULL
534
542
  * // ORDER BY takenOn DESC
535
- *
536
- * // Using idColumn (deprecated, still works)
537
- * const query = buildWatchQuery({
538
- * table: 'EquipmentUnitMediaContent',
539
- * idColumn: 'storagePath',
540
- * });
541
543
  * ```
542
544
  */
543
545
  declare function buildWatchQuery(config: WatchConfig): string;
544
546
  /**
545
- * Build a simpler ID-only watch query.
546
- * Use this when you only need IDs without additional columns.
547
+ * Build a simpler path-only watch query.
548
+ * Use this when you only need paths without additional columns.
547
549
  *
548
550
  * @param config - The WatchConfig to build a query from
549
- * @returns SQL query string that selects only IDs
551
+ * @returns SQL query string that selects only paths
550
552
  *
551
553
  * @example
552
554
  * ```typescript
553
555
  * const query = buildIdOnlyWatchQuery({
554
556
  * table: 'EquipmentUnitMediaContent',
555
- * idColumn: 'storagePath',
557
+ * pathColumn: 'storagePath',
556
558
  * where: 'storagePath IS NOT NULL',
557
559
  * });
558
560
  *
@@ -588,7 +590,7 @@ declare function buildRecordFetchQuery(config: WatchConfig, ids?: string[]): {
588
590
  params: unknown[];
589
591
  };
590
592
  /**
591
- * Convert WatchConfig to a legacy format for backwards compatibility.
593
+ * Convert WatchConfig to a source config format.
592
594
  *
593
595
  * @param watchConfig - The WatchConfig to convert
594
596
  * @returns Object with table, pathColumn, and optional orderByColumn
@@ -596,8 +598,6 @@ declare function buildRecordFetchQuery(config: WatchConfig, ids?: string[]): {
596
598
  declare function watchConfigToSourceConfig(watchConfig: WatchConfig): {
597
599
  table: string;
598
600
  pathColumn: string;
599
- /** @deprecated Use pathColumn instead */
600
- idColumn: string;
601
601
  orderByColumn?: string | null;
602
602
  };
603
603
  /**
@@ -612,27 +612,27 @@ declare function extractIdsFromRows(results: {
612
612
  rows?: unknown;
613
613
  }): string[];
614
614
  /**
615
- * Creates a watchIds callback for simple single-table attachment configurations.
615
+ * Creates a watchPaths callback for simple single-table attachment configurations.
616
616
  *
617
- * This is a convenience function that generates a properly typed watchIds callback
617
+ * This is a convenience function that generates a properly typed watchPaths callback
618
618
  * from a table name and path column. Use this for simple cases where you don't need
619
619
  * JOINs or complex watch logic.
620
620
  *
621
621
  * @param table - The source table name
622
- * @param pathColumn - The column containing the attachment path/ID
623
- * @returns A properly typed watchIds callback for use in AttachmentSourceConfig
622
+ * @param pathColumn - The column containing the attachment path
623
+ * @returns A properly typed watchPaths callback for use in AttachmentSourceConfig
624
624
  *
625
625
  * @example
626
626
  * ```typescript
627
- * import { createWatchIds } from '@pol-studios/powersync/attachments';
627
+ * import { createWatchPaths } from '@pol-studios/powersync/attachments';
628
628
  *
629
629
  * const config: AttachmentSourceConfig = {
630
- * bucket: 'photos',
631
- * watchIds: createWatchIds('EquipmentUnitMediaContent', 'storagePath'),
630
+ * source: { type: 'supabase-bucket', bucket: 'photos' },
631
+ * watchPaths: createWatchPaths('EquipmentUnitMediaContent', 'storagePath'),
632
632
  * };
633
633
  * ```
634
634
  */
635
- declare function createWatchIds(table: string, pathColumn: string): (db: AbstractPowerSyncDatabase, onUpdate: (ids: string[]) => void) => () => void;
635
+ declare function createWatchPaths(table: string, pathColumn: string): (db: AbstractPowerSyncDatabase, supabase: unknown, onUpdate: (paths: string[]) => void) => () => void;
636
636
 
637
637
  /**
638
638
  * Migration Utilities for @pol-studios/powersync Attachments
@@ -664,7 +664,7 @@ declare function createWatchIds(table: string, pathColumn: string): (db: Abstrac
664
664
  * QUEUED_SYNC=0, QUEUED_UPLOAD=1, QUEUED_DOWNLOAD=2, SYNCED=3, ARCHIVED=4
665
665
  *
666
666
  * POL extensions add:
667
- * FAILED_PERMANENT=5, DOWNLOAD_SKIPPED=6
667
+ * FAILED_PERMANENT=5
668
668
  *
669
669
  * For migration purposes, most states map 1:1. The mapping exists to:
670
670
  * 1. Document the relationship between old and new states
@@ -843,4 +843,4 @@ declare function recordMigration(stats: MigrationStats, oldState: number, newSta
843
843
  */
844
844
  declare function formatMigrationStats(stats: MigrationStats): string;
845
845
 
846
- export { AttachmentStorageAdapter, CacheConfig, type CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, type DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, type MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolAttachmentRecord, PolStorageAdapter, type PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadConfig, UploadHandler, type UploadManagerDeps, type UploadManagerState, UploadStatus, VALID_STATES, WatchConfig, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState, createWatchIds, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, formatMigrationStats, getCachedSize, getEvictionCandidates, getExcludeProtectedStatesCondition, getFailedPermanentUploads, getLocalUriForStoragePath, getPendingUploads, getProtectedStatesInClause, getSoonestRetryTime, getStaleUploads, getStateName, getSyncedUploadsWithPendingCallback, isCacheNearCapacity, isDownloadWorkflowState, isLocallyAvailable, isPendingDownloadState, isPermanentError, isProtectedUploadState, isStateTransitionAllowed, isTerminalState, isUploadWorkflowState, isValidAttachmentState, markUploadPermanentFailure, markUploadSynced, migrateAttachmentState, migrateAttachmentStateSafe, recordMigration, scheduleUploadRetry, startUploadProcessing, stripFileUri, uploadOne, validateSqlIdentifier, validateSqlIdentifier$1 as validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig };
846
+ export { AttachmentStorageAdapter, CacheConfig, type CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, type DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, type MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolAttachmentRecord, PolStorageAdapter, type PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadConfig, UploadHandler, type UploadManagerDeps, type UploadManagerState, UploadStatus, VALID_STATES, WatchConfig, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState, createWatchPaths, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, formatMigrationStats, getCachedSize, getEvictionCandidates, getExcludeProtectedStatesCondition, getFailedPermanentUploads, getLocalUriForStoragePath, getPendingUploads, getProtectedStatesInClause, getSoonestRetryTime, getStaleUploads, getStateName, getSyncedUploadsWithPendingCallback, isCacheNearCapacity, isDownloadWorkflowState, isLocallyAvailable, isPendingDownloadState, isPermanentError, isProtectedUploadState, isStateTransitionAllowed, isTerminalState, isUploadWorkflowState, isValidAttachmentState, markUploadPermanentFailure, markUploadSynced, migrateAttachmentState, migrateAttachmentStateSafe, recordMigration, scheduleUploadRetry, startUploadProcessing, stripFileUri, uploadOne, validateSqlIdentifier, validateSqlIdentifier$1 as validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig };
@@ -9,7 +9,7 @@ import {
9
9
  buildRecordFetchQuery,
10
10
  buildWatchQuery,
11
11
  createMigrationStats,
12
- createWatchIds,
12
+ createWatchPaths,
13
13
  extractIdsFromRows,
14
14
  formatMigrationStats,
15
15
  getStateName,
@@ -23,7 +23,7 @@ import {
23
23
  validateSqlIdentifier as validateSqlIdentifier2,
24
24
  validateWhereClause,
25
25
  watchConfigToSourceConfig
26
- } from "../chunk-C5ODS3XH.js";
26
+ } from "../chunk-EOW7JK7Q.js";
27
27
  import {
28
28
  ATTACHMENT_TABLE,
29
29
  AbstractAttachmentQueue,
@@ -58,6 +58,7 @@ import {
58
58
  extractErrorCode,
59
59
  formatCacheSize,
60
60
  getCachedSize,
61
+ getCustomUrlResolver,
61
62
  getEvictionCandidates,
62
63
  getExcludeProtectedStatesCondition,
63
64
  getFailedPermanentUploads,
@@ -68,20 +69,24 @@ import {
68
69
  getStaleUploads,
69
70
  getSyncedUploadsWithPendingCallback,
70
71
  isCacheNearCapacity,
72
+ isCustomSource,
71
73
  isLocallyAvailable,
72
74
  isPendingDownloadState,
73
75
  isPermanentError,
74
76
  isProtectedUploadState,
77
+ isSignedUrlSource,
75
78
  isStateTransitionAllowed,
76
79
  markUploadPermanentFailure,
77
80
  markUploadSynced,
81
+ resolveBucketFromConfig,
78
82
  scheduleUploadRetry,
79
83
  startUploadProcessing,
80
84
  stripFileUri,
81
85
  uploadOne,
82
86
  validateSqlIdentifier
83
- } from "../chunk-CACKC6XG.js";
87
+ } from "../chunk-PGEDE6IM.js";
84
88
  import "../chunk-FV2HXEIY.js";
89
+ import "../chunk-5WRI5ZAA.js";
85
90
  export {
86
91
  ATTACHMENT_TABLE,
87
92
  AbstractAttachmentQueue,
@@ -119,7 +124,7 @@ export {
119
124
  createPolAttachmentQueue,
120
125
  createUploadManagerDeps,
121
126
  createUploadManagerState,
122
- createWatchIds,
127
+ createWatchPaths,
123
128
  determineAttachmentState,
124
129
  downloadRecord,
125
130
  enforceCacheLimit,
@@ -129,6 +134,7 @@ export {
129
134
  formatCacheSize,
130
135
  formatMigrationStats,
131
136
  getCachedSize,
137
+ getCustomUrlResolver,
132
138
  getEvictionCandidates,
133
139
  getExcludeProtectedStatesCondition,
134
140
  getFailedPermanentUploads,
@@ -140,11 +146,13 @@ export {
140
146
  getStateName,
141
147
  getSyncedUploadsWithPendingCallback,
142
148
  isCacheNearCapacity,
149
+ isCustomSource,
143
150
  isDownloadWorkflowState,
144
151
  isLocallyAvailable,
145
152
  isPendingDownloadState,
146
153
  isPermanentError,
147
154
  isProtectedUploadState,
155
+ isSignedUrlSource,
148
156
  isStateTransitionAllowed,
149
157
  isTerminalState,
150
158
  isUploadWorkflowState,
@@ -154,6 +162,7 @@ export {
154
162
  migrateAttachmentState,
155
163
  migrateAttachmentStateSafe,
156
164
  recordMigration,
165
+ resolveBucketFromConfig,
157
166
  scheduleUploadRetry,
158
167
  startUploadProcessing,
159
168
  stripFileUri,
@@ -1,4 +1,4 @@
1
- import { a as SyncStatus, S as SyncMode, e as SyncMetrics, b as ConnectionHealth, f as SyncError } from './types-Dv1uf0LZ.js';
1
+ import { a as SyncStatus, S as SyncMode, e as SyncMetrics, b as ConnectionHealth, f as SyncError } from './types-B9MptP7E.js';
2
2
 
3
3
  /**
4
4
  * Sync Module Types for @pol-studios/powersync