@pol-studios/powersync 1.0.25 → 1.0.32

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 (118) hide show
  1. package/README.md +0 -1
  2. package/dist/{CacheSettingsManager-uz-kbnRH.d.ts → CacheSettingsManager-0H_7thHW.d.ts} +21 -3
  3. package/dist/attachments/index.d.ts +30 -30
  4. package/dist/attachments/index.js +13 -4
  5. package/dist/{background-sync-ChCXW-EV.d.ts → background-sync-BujnI3IR.d.ts} +1 -1
  6. package/dist/{chunk-55DKCJV4.js → chunk-2RDWLXJW.js} +408 -78
  7. package/dist/chunk-2RDWLXJW.js.map +1 -0
  8. package/dist/{chunk-P4HZA6ZT.js → chunk-4665ZSE5.js} +2 -2
  9. package/dist/chunk-4665ZSE5.js.map +1 -0
  10. package/dist/{chunk-XOY2CJ67.js → chunk-4F5B5CZ7.js} +3 -3
  11. package/dist/chunk-5WRI5ZAA.js +31 -0
  12. package/dist/{chunk-BGBQYQV3.js → chunk-65A3SYJZ.js} +193 -299
  13. package/dist/chunk-65A3SYJZ.js.map +1 -0
  14. package/dist/chunk-6SZ64KCZ.js +755 -0
  15. package/dist/chunk-6SZ64KCZ.js.map +1 -0
  16. package/dist/{chunk-YSTEESEG.js → chunk-74TBHWJ4.js} +122 -11
  17. package/dist/chunk-74TBHWJ4.js.map +1 -0
  18. package/dist/chunk-ANXWYQEJ.js +1 -0
  19. package/dist/chunk-ANXWYQEJ.js.map +1 -0
  20. package/dist/{chunk-CAB26E6F.js → chunk-C4J4MLER.js} +29 -24
  21. package/dist/chunk-C4J4MLER.js.map +1 -0
  22. package/dist/{chunk-C5ODS3XH.js → chunk-EOW7JK7Q.js} +9 -16
  23. package/dist/chunk-EOW7JK7Q.js.map +1 -0
  24. package/dist/chunk-HRAVPIAZ.js +220 -0
  25. package/dist/chunk-HRAVPIAZ.js.map +1 -0
  26. package/dist/{chunk-XAEII4ZX.js → chunk-NUGQOTEM.js} +32 -4
  27. package/dist/chunk-NUGQOTEM.js.map +1 -0
  28. package/dist/chunk-OGUFUZSY.js +5415 -0
  29. package/dist/chunk-OGUFUZSY.js.map +1 -0
  30. package/dist/{chunk-VB737IVN.js → chunk-P4D6BQ4X.js} +328 -706
  31. package/dist/chunk-P4D6BQ4X.js.map +1 -0
  32. package/dist/{chunk-CACKC6XG.js → chunk-PGEDE6IM.js} +136 -89
  33. package/dist/chunk-PGEDE6IM.js.map +1 -0
  34. package/dist/{chunk-A4IBBWGO.js → chunk-RALHHPTU.js} +1 -1
  35. package/dist/chunk-RIDSPLE5.js +42 -0
  36. package/dist/chunk-RIDSPLE5.js.map +1 -0
  37. package/dist/{chunk-Z6VOBGTU.js → chunk-UOMHWUHV.js} +2 -12
  38. package/dist/chunk-UOMHWUHV.js.map +1 -0
  39. package/dist/{chunk-WGHNIAF7.js → chunk-YONQYTVH.js} +2 -2
  40. package/dist/chunk-ZAN22NGL.js +13 -0
  41. package/dist/chunk-ZAN22NGL.js.map +1 -0
  42. package/dist/config/index.d.ts +200 -0
  43. package/dist/config/index.js +23 -0
  44. package/dist/config/index.js.map +1 -0
  45. package/dist/connector/index.d.ts +23 -5
  46. package/dist/connector/index.js +4 -2
  47. package/dist/core/index.d.ts +2 -2
  48. package/dist/core/index.js +1 -0
  49. package/dist/error/index.js +1 -0
  50. package/dist/generator/index.js +2 -0
  51. package/dist/generator/index.js.map +1 -1
  52. package/dist/index.d.ts +19 -16
  53. package/dist/index.js +88 -46
  54. package/dist/index.native.d.ts +18 -14
  55. package/dist/index.native.js +93 -44
  56. package/dist/index.web.d.ts +17 -14
  57. package/dist/index.web.js +88 -46
  58. package/dist/maintenance/index.d.ts +2 -2
  59. package/dist/maintenance/index.js +3 -2
  60. package/dist/platform/index.d.ts +1 -1
  61. package/dist/platform/index.js +2 -0
  62. package/dist/platform/index.js.map +1 -1
  63. package/dist/platform/index.native.d.ts +1 -1
  64. package/dist/platform/index.native.js +1 -0
  65. package/dist/platform/index.web.d.ts +1 -1
  66. package/dist/platform/index.web.js +1 -0
  67. package/dist/pol-attachment-queue-DqBvLAEY.d.ts +255 -0
  68. package/dist/provider/index.d.ts +319 -124
  69. package/dist/provider/index.js +21 -16
  70. package/dist/provider/index.native.d.ts +108 -0
  71. package/dist/provider/index.native.js +121 -0
  72. package/dist/provider/index.native.js.map +1 -0
  73. package/dist/provider/index.web.d.ts +16 -0
  74. package/dist/provider/index.web.js +112 -0
  75. package/dist/provider/index.web.js.map +1 -0
  76. package/dist/react/index.d.ts +16 -65
  77. package/dist/react/index.js +2 -9
  78. package/dist/storage/index.d.ts +5 -4
  79. package/dist/storage/index.js +12 -9
  80. package/dist/storage/index.native.d.ts +5 -4
  81. package/dist/storage/index.native.js +8 -5
  82. package/dist/storage/index.web.d.ts +5 -4
  83. package/dist/storage/index.web.js +11 -8
  84. package/dist/storage/upload/index.d.ts +4 -3
  85. package/dist/storage/upload/index.js +4 -2
  86. package/dist/storage/upload/index.native.d.ts +4 -3
  87. package/dist/storage/upload/index.native.js +4 -2
  88. package/dist/storage/upload/index.web.d.ts +2 -1
  89. package/dist/storage/upload/index.web.js +4 -2
  90. package/dist/{supabase-connector-D2oIl2t8.d.ts → supabase-connector-HMxBA9Kg.d.ts} +23 -25
  91. package/dist/sync/index.d.ts +183 -11
  92. package/dist/sync/index.js +13 -3
  93. package/dist/{types-CyvBaAl8.d.ts → types-6QHGELuY.d.ts} +4 -1
  94. package/dist/{types-CDqWh56B.d.ts → types-B9MptP7E.d.ts} +13 -1
  95. package/dist/types-BhAEsJj-.d.ts +330 -0
  96. package/dist/{types-D0WcHrq6.d.ts → types-CGMibJKD.d.ts} +8 -0
  97. package/dist/{types-DiBvmGEi.d.ts → types-DqJnP50o.d.ts} +22 -24
  98. package/dist/{pol-attachment-queue-BE2HU3Us.d.ts → types-JCEhw2Lf.d.ts} +139 -346
  99. package/package.json +18 -4
  100. package/dist/chunk-24RDMMCL.js +0 -44
  101. package/dist/chunk-24RDMMCL.js.map +0 -1
  102. package/dist/chunk-55DKCJV4.js.map +0 -1
  103. package/dist/chunk-654ERHA7.js +0 -1
  104. package/dist/chunk-BGBQYQV3.js.map +0 -1
  105. package/dist/chunk-C5ODS3XH.js.map +0 -1
  106. package/dist/chunk-CAB26E6F.js.map +0 -1
  107. package/dist/chunk-CACKC6XG.js.map +0 -1
  108. package/dist/chunk-P4HZA6ZT.js.map +0 -1
  109. package/dist/chunk-TIFL2KWE.js +0 -358
  110. package/dist/chunk-TIFL2KWE.js.map +0 -1
  111. package/dist/chunk-VB737IVN.js.map +0 -1
  112. package/dist/chunk-XAEII4ZX.js.map +0 -1
  113. package/dist/chunk-YSTEESEG.js.map +0 -1
  114. package/dist/chunk-Z6VOBGTU.js.map +0 -1
  115. /package/dist/{chunk-XOY2CJ67.js.map → chunk-4F5B5CZ7.js.map} +0 -0
  116. /package/dist/{chunk-654ERHA7.js.map → chunk-5WRI5ZAA.js.map} +0 -0
  117. /package/dist/{chunk-A4IBBWGO.js.map → chunk-RALHHPTU.js.map} +0 -0
  118. /package/dist/{chunk-WGHNIAF7.js.map → chunk-YONQYTVH.js.map} +0 -0
@@ -0,0 +1,330 @@
1
+ import { Schema } from '@powersync/react-native';
2
+ import { h as UploadErrorMiddleware } from './types-DqJnP50o.js';
3
+ import { A as AttachmentSource } from './types-JCEhw2Lf.js';
4
+
5
+ /**
6
+ * Unified Configuration Types for @pol-studios/powersync
7
+ *
8
+ * This module defines the types for the `definePolConfig` API which provides
9
+ * a streamlined way to configure PowerSync with automatic schema generation.
10
+ */
11
+
12
+ interface MinimalPowerSyncDatabase {
13
+ watch(sql: string, params: unknown[], callbacks: {
14
+ onResult: (results: {
15
+ rows?: {
16
+ _array?: unknown[];
17
+ };
18
+ }) => void;
19
+ onError?: (error: Error) => void;
20
+ }, options?: {
21
+ signal?: AbortSignal;
22
+ tables?: string[];
23
+ throttleMs?: number;
24
+ }): void;
25
+ }
26
+ /**
27
+ * Table specification for PowerSync sync.
28
+ *
29
+ * Can be either:
30
+ * - A string for public schema tables (e.g., "Project")
31
+ * - An object for custom schemas or additional options
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Simple - public schema
36
+ * powersync: ["Project", "Task"]
37
+ *
38
+ * // Custom schema
39
+ * powersync: [
40
+ * "Project",
41
+ * { table: "Profile", schema: "core" },
42
+ * { table: "Comment", schema: "core", trackMetadata: true }
43
+ * ]
44
+ * ```
45
+ */
46
+ type TableSpec = string | {
47
+ /** Table name */
48
+ table: string;
49
+ /** Schema name (default: "public") */
50
+ schema?: string;
51
+ /** Track sync metadata for this table (default: false) */
52
+ trackMetadata?: boolean;
53
+ };
54
+
55
+ /**
56
+ * Configuration for attachment sync.
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * attachments: {
61
+ * source: { type: 'supabase-bucket', bucket: 'photos', signed: true },
62
+ * watchPaths: (db, supabase, onUpdate) => {
63
+ * const abort = new AbortController();
64
+ * db.watch(
65
+ * // Filter directly in the query - only emit paths you want to download
66
+ * `SELECT storagePath FROM photos
67
+ * WHERE storagePath IS NOT NULL
68
+ * AND storagePath NOT LIKE '%.mp4'`,
69
+ * [],
70
+ * { onResult: (r) => onUpdate(r.rows._array.map(row => row.storagePath)) },
71
+ * { signal: abort.signal }
72
+ * );
73
+ * return () => abort.abort();
74
+ * },
75
+ * }
76
+ * ```
77
+ */
78
+ interface PolConfigAttachments {
79
+ /**
80
+ * Attachment storage source configuration.
81
+ * Supports Supabase Storage buckets or custom backends.
82
+ */
83
+ source?: AttachmentSource;
84
+ /**
85
+ * Reactive source of attachment paths.
86
+ *
87
+ * Called once during initialization. Should set up a reactive subscription
88
+ * that calls `onUpdate` whenever the set of attachment paths changes.
89
+ *
90
+ * Filtering should happen in this callback - only emit paths you want to download.
91
+ *
92
+ * @param db - PowerSync database instance
93
+ * @param supabase - Supabase client for additional queries if needed
94
+ * @param onUpdate - Callback to emit current set of attachment paths
95
+ * @returns Optional cleanup function
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * watchPaths: (db, supabase, onUpdate) => {
100
+ * const abort = new AbortController();
101
+ * db.watch(
102
+ * // Filter out videos directly in the query
103
+ * `SELECT storagePath FROM photos
104
+ * WHERE storagePath IS NOT NULL
105
+ * AND storagePath NOT LIKE '%.mp4'`,
106
+ * [],
107
+ * { onResult: (r) => onUpdate(r.rows._array.map(row => row.storagePath)) },
108
+ * { signal: abort.signal }
109
+ * );
110
+ * return () => abort.abort();
111
+ * }
112
+ * ```
113
+ */
114
+ watchPaths?: (db: MinimalPowerSyncDatabase, supabase: unknown, onUpdate: (paths: string[]) => void) => (() => void) | void;
115
+ }
116
+ /**
117
+ * Connector configuration for CRUD upload handling.
118
+ */
119
+ interface PolConfigConnector {
120
+ /**
121
+ * Enable version-based conflict detection.
122
+ * @default false
123
+ */
124
+ conflictDetection?: boolean;
125
+ /**
126
+ * Middleware chain for classifying upload errors.
127
+ *
128
+ * @example
129
+ * ```typescript
130
+ * uploadErrorMiddleware: [
131
+ * idempotentTables(['ReadReceipt', 'Like']),
132
+ * discardOrphaned(),
133
+ * ]
134
+ * ```
135
+ */
136
+ uploadErrorMiddleware?: UploadErrorMiddleware[];
137
+ }
138
+ /**
139
+ * Sync behavior configuration.
140
+ */
141
+ interface PolConfigSync {
142
+ /**
143
+ * Automatically connect when the provider mounts.
144
+ * @default true
145
+ */
146
+ autoConnect?: boolean;
147
+ /**
148
+ * Background sync configuration.
149
+ */
150
+ backgroundSync?: {
151
+ /** Enable background sync */
152
+ enabled: boolean;
153
+ /** Minimum interval between background syncs in minutes */
154
+ minimumInterval?: number;
155
+ };
156
+ /**
157
+ * Enable health monitoring.
158
+ * @default true
159
+ */
160
+ enableHealthMonitoring?: boolean;
161
+ /**
162
+ * Enable metrics collection.
163
+ * @default true
164
+ */
165
+ enableMetrics?: boolean;
166
+ }
167
+ /**
168
+ * Unified configuration for @pol-studios/powersync.
169
+ *
170
+ * This configuration is processed by `definePolConfig` to generate:
171
+ * - PowerSync Schema from the database schema
172
+ * - Table strategies for DataLayer routing
173
+ * - Attachment queue configuration
174
+ *
175
+ * @example
176
+ * ```typescript
177
+ * import { definePolConfig } from '@pol-studios/powersync/config';
178
+ * import { databaseSchema } from './databaseSchema';
179
+ *
180
+ * export const polConfig = definePolConfig({
181
+ * powerSyncUrl: process.env.EXPO_PUBLIC_POWERSYNC_URL,
182
+ * databaseSchema,
183
+ *
184
+ * // Tables to sync via PowerSync
185
+ * powersync: [
186
+ * "Project",
187
+ * "Task",
188
+ * { table: "Profile", schema: "core" },
189
+ * ],
190
+ *
191
+ * attachments: {
192
+ * source: { type: 'supabase-bucket', bucket: 'photos' },
193
+ * watchPaths: (db, supabase, onUpdate) => {
194
+ * const abort = new AbortController();
195
+ * db.watch('SELECT storagePath FROM photos WHERE storagePath IS NOT NULL', [], {
196
+ * onResult: (r) => onUpdate(r.rows._array.map(x => x.storagePath)),
197
+ * }, { signal: abort.signal });
198
+ * return () => abort.abort();
199
+ * },
200
+ * },
201
+ * });
202
+ * ```
203
+ */
204
+ interface PolConfig {
205
+ /**
206
+ * PowerSync service URL.
207
+ * If not provided, runs in online-only mode (Supabase direct).
208
+ *
209
+ * @example "https://your-instance.powersync.journeyapps.com"
210
+ */
211
+ powerSyncUrl?: string;
212
+ /**
213
+ * The database schema object (from generated types).
214
+ * Used to auto-generate the PowerSync schema at runtime.
215
+ *
216
+ * This is the schema object exported from your generated databaseSchema.ts,
217
+ * which contains table definitions with columns and types.
218
+ */
219
+ databaseSchema: DatabaseSchemaObject;
220
+ /**
221
+ * Tables to sync via PowerSync (offline-first).
222
+ *
223
+ * Tables listed here will be synced to the local SQLite database.
224
+ * Tables NOT listed here will query Supabase directly (online-only).
225
+ */
226
+ powersync: TableSpec[];
227
+ /**
228
+ * Connector configuration for CRUD upload handling.
229
+ */
230
+ connector?: PolConfigConnector;
231
+ /**
232
+ * Attachment configuration for offline file caching.
233
+ */
234
+ attachments?: PolConfigAttachments;
235
+ /**
236
+ * Sync behavior configuration.
237
+ */
238
+ sync?: PolConfigSync;
239
+ /**
240
+ * Database filename for the local SQLite database.
241
+ * @default "powersync.db"
242
+ */
243
+ dbFilename?: string;
244
+ }
245
+ /**
246
+ * Table strategy for routing queries.
247
+ */
248
+ type TableStrategyType = 'powersync' | 'supabase';
249
+ /**
250
+ * Processed table strategy info.
251
+ */
252
+ interface ProcessedTableStrategy {
253
+ /** Which backend to use */
254
+ strategy: TableStrategyType;
255
+ /** Original schema name */
256
+ schema: string;
257
+ /** Table name */
258
+ table: string;
259
+ /** PowerSync SQLite alias (e.g., CoreUserGroup for core.UserGroup) */
260
+ alias: string;
261
+ }
262
+ /**
263
+ * Processed configuration returned by `definePolConfig`.
264
+ *
265
+ * Contains the original config plus generated artifacts:
266
+ * - `__generatedSchema`: PowerSync Schema ready to use
267
+ * - `__tableStrategies`: Lookup map for table routing
268
+ * - `__schemaRouter`: Function to resolve table schema
269
+ */
270
+ interface ProcessedPolConfig extends PolConfig {
271
+ /**
272
+ * Generated PowerSync Schema.
273
+ * Pass this to PowerSyncProvider or OfflineDataProvider.
274
+ */
275
+ __generatedSchema: Schema;
276
+ /**
277
+ * Table strategy lookup map.
278
+ * Used by DataLayerProvider to route queries to the correct backend.
279
+ */
280
+ __tableStrategies: Record<string, ProcessedTableStrategy>;
281
+ /**
282
+ * Schema router function.
283
+ * Returns the Supabase schema for a given table name.
284
+ *
285
+ * @param table - Table name (may include schema prefix like "core.Profile")
286
+ * @returns The schema name
287
+ */
288
+ __schemaRouter: (table: string) => string;
289
+ /**
290
+ * List of tables configured for PowerSync sync.
291
+ * Useful for deriving DataLayerConfig.
292
+ */
293
+ __powersyncTables: string[];
294
+ }
295
+ /**
296
+ * Column definition in the database schema.
297
+ */
298
+ interface DatabaseColumnDef {
299
+ name: string;
300
+ /** Column type - accepts any string but common values are: 'string', 'number', 'boolean', 'date', 'enum', 'json' */
301
+ type: string;
302
+ isOptional: boolean;
303
+ isEnum?: boolean;
304
+ enumValues?: string[];
305
+ }
306
+ /**
307
+ * Table definition in the database schema.
308
+ */
309
+ interface DatabaseTableDef {
310
+ name: string;
311
+ columns: DatabaseColumnDef[];
312
+ relationships?: Array<{
313
+ foreignKey: string;
314
+ referencedTable: string;
315
+ referencedColumn: string;
316
+ }>;
317
+ }
318
+ /**
319
+ * Schema definition structure (matches databaseSchema.ts export).
320
+ */
321
+ interface DatabaseSchemaObject {
322
+ schemas: {
323
+ [schemaName: string]: {
324
+ tables: Record<string, DatabaseTableDef>;
325
+ views?: Record<string, DatabaseTableDef>;
326
+ };
327
+ };
328
+ }
329
+
330
+ export type { DatabaseSchemaObject as D, PolConfig as P, TableSpec as T, ProcessedPolConfig as a, ProcessedTableStrategy as b, PolConfigAttachments as c, PolConfigConnector as d, PolConfigSync as e, DatabaseTableDef as f, DatabaseColumnDef as g };
@@ -188,6 +188,14 @@ interface SupabaseClient {
188
188
  } | null;
189
189
  error: Error | null;
190
190
  }>;
191
+ getPublicUrl(path: string, options?: {
192
+ download?: string | boolean;
193
+ transform?: SupabaseTransformOptions;
194
+ }): {
195
+ data: {
196
+ publicUrl: string;
197
+ };
198
+ };
191
199
  upload(path: string, file: Blob | ArrayBuffer | FormData, options?: {
192
200
  contentType?: string;
193
201
  upsert?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { SupabaseClient } from '@supabase/supabase-js';
2
- import { C as CrudEntry, i as ClassifiedError } from './types-CDqWh56B.js';
2
+ import { C as CrudEntry, i as ClassifiedError } from './types-B9MptP7E.js';
3
3
  import { LoggerAdapter } from './platform/index.js';
4
4
 
5
5
  /**
@@ -201,9 +201,9 @@ interface SupabaseConnectorOptions {
201
201
  */
202
202
  conflictBus?: ConflictBus;
203
203
  /**
204
- * Optional: Configuration for retry behavior on upload failures.
205
- * Allows customizing retry attempts, delays, and backoff for different error types.
206
- * @default DEFAULT_RETRY_CONFIG
204
+ * @deprecated No longer used. The connector no longer has internal retry loops.
205
+ * PowerSync SDK handles all retries naturally via its uploadData() recall mechanism.
206
+ * Use `uploadErrorMiddleware` to classify errors as transient (retry) or permanent (fail).
207
207
  */
208
208
  retryConfig?: Partial<RetryConfig>;
209
209
  /**
@@ -215,15 +215,17 @@ interface SupabaseConnectorOptions {
215
215
  circuitBreaker?: ConnectorCircuitBreakerConfig;
216
216
  /**
217
217
  * Optional: Middleware chain for classifying upload errors.
218
- * Allows customizing error handling for specific tables or error codes.
218
+ * This is the single source of truth for error handling decisions.
219
219
  *
220
220
  * Middleware functions are called in order until one returns a non-'continue' result:
221
- * - 'success': Treat as successful (e.g., idempotent duplicate)
222
- * - 'retry': Use the retry configuration to retry the operation
223
- * - 'discard': Permanent failure, remove from queue without retry
224
- * - 'continue': Pass to the next middleware in the chain
221
+ * - 'success': Treat as completed (e.g., idempotent duplicate already exists)
222
+ * - 'discard': Remove from queue silently (e.g., orphaned record)
223
+ * - 'retry': Transient error - throw to let PowerSync retry on next sync cycle
224
+ * - 'fail_transaction': Permanent error - record failure and surface to user
225
+ * - 'continue': Pass to next middleware (default: uses isPermanent from classifySupabaseError)
225
226
  *
226
- * If all middleware return 'continue', the default classification is used.
227
+ * Architecture: No internal retry loops. PowerSync SDK handles all retries.
228
+ * This keeps error handling simple and predictable.
227
229
  *
228
230
  * @example
229
231
  * ```typescript
@@ -275,11 +277,14 @@ interface ConnectorConfig {
275
277
  refreshThresholdSeconds?: number;
276
278
  };
277
279
  /**
278
- * Optional retry configuration for upload failures.
279
- * Allows customizing retry attempts, delays, and backoff for different error types.
280
- * @default DEFAULT_RETRY_CONFIG
280
+ * @deprecated No longer used. PowerSync SDK handles all retries.
281
281
  */
282
282
  retryConfig?: Partial<RetryConfig>;
283
+ /**
284
+ * Optional: Middleware chain for classifying upload errors.
285
+ * Passed to SupabaseConnector for error handling decisions.
286
+ */
287
+ uploadErrorMiddleware?: UploadErrorMiddleware[];
283
288
  }
284
289
  /**
285
290
  * Function that determines which Supabase schema a table belongs to.
@@ -360,18 +365,11 @@ interface RetryConfig {
360
365
  rls: RetryStrategyConfig;
361
366
  }
362
367
  /**
363
- * Default retry configuration
364
- *
365
- * Uses fast exponential backoff for transient errors (network issues):
366
- * - Transient: 1s → 2s → 4s
367
- *
368
- * RLS/permission errors (42501, row-level security violations) use extended delays
369
- * because parent data may need time to sync before child records can be inserted.
370
- * - RLS: 30s → 60s → 120s → 120s → 120s (5 retries over ~7.5 minutes)
368
+ * @deprecated No longer used. The connector no longer has internal retry loops.
369
+ * PowerSync SDK handles all retries via its uploadData() recall mechanism.
370
+ * Use `uploadErrorMiddleware` to classify errors as transient (retry) or permanent (fail).
371
371
  *
372
- * Other permanent errors (validation, constraints) get NO retries
373
- * because they will never succeed - fail fast and surface to user.
374
- * PowerSync's native retry mechanism will re-attempt on next sync cycle.
372
+ * Kept for backwards compatibility only.
375
373
  */
376
374
  declare const DEFAULT_RETRY_CONFIG: RetryConfig;
377
375
  /**