@powersync/service-core 0.0.0-dev-20240718134716 → 0.0.0-dev-20240918082156

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 (352) hide show
  1. package/CHANGELOG.md +89 -6
  2. package/dist/api/RouteAPI.d.ts +68 -0
  3. package/dist/api/RouteAPI.js +2 -0
  4. package/dist/api/RouteAPI.js.map +1 -0
  5. package/dist/api/api-index.d.ts +1 -0
  6. package/dist/api/api-index.js +1 -0
  7. package/dist/api/api-index.js.map +1 -1
  8. package/dist/api/diagnostics.d.ts +4 -4
  9. package/dist/api/diagnostics.js +11 -65
  10. package/dist/api/diagnostics.js.map +1 -1
  11. package/dist/api/schema.d.ts +3 -5
  12. package/dist/api/schema.js +9 -79
  13. package/dist/api/schema.js.map +1 -1
  14. package/dist/auth/KeyStore.d.ts +7 -4
  15. package/dist/auth/KeyStore.js +1 -1
  16. package/dist/auth/KeyStore.js.map +1 -1
  17. package/dist/auth/auth-index.d.ts +0 -1
  18. package/dist/auth/auth-index.js +0 -1
  19. package/dist/auth/auth-index.js.map +1 -1
  20. package/dist/entry/cli-entry.js +4 -2
  21. package/dist/entry/cli-entry.js.map +1 -1
  22. package/dist/entry/commands/compact-action.d.ts +2 -0
  23. package/dist/entry/commands/compact-action.js +52 -0
  24. package/dist/entry/commands/compact-action.js.map +1 -0
  25. package/dist/entry/commands/migrate-action.js +4 -5
  26. package/dist/entry/commands/migrate-action.js.map +1 -1
  27. package/dist/entry/commands/teardown-action.js +2 -2
  28. package/dist/entry/commands/teardown-action.js.map +1 -1
  29. package/dist/entry/entry-index.d.ts +1 -0
  30. package/dist/entry/entry-index.js +1 -0
  31. package/dist/entry/entry-index.js.map +1 -1
  32. package/dist/index.d.ts +4 -2
  33. package/dist/index.js +4 -2
  34. package/dist/index.js.map +1 -1
  35. package/dist/metrics/Metrics.d.ts +6 -5
  36. package/dist/metrics/Metrics.js +53 -10
  37. package/dist/metrics/Metrics.js.map +1 -1
  38. package/dist/migrations/db/migrations/1684951997326-init.d.ts +2 -2
  39. package/dist/migrations/db/migrations/1684951997326-init.js +4 -2
  40. package/dist/migrations/db/migrations/1684951997326-init.js.map +1 -1
  41. package/dist/migrations/db/migrations/1702295701188-sync-rule-state.d.ts +2 -2
  42. package/dist/migrations/db/migrations/1702295701188-sync-rule-state.js +4 -2
  43. package/dist/migrations/db/migrations/1702295701188-sync-rule-state.js.map +1 -1
  44. package/dist/migrations/db/migrations/1711543888062-write-checkpoint-index.d.ts +2 -2
  45. package/dist/migrations/db/migrations/1711543888062-write-checkpoint-index.js +4 -2
  46. package/dist/migrations/db/migrations/1711543888062-write-checkpoint-index.js.map +1 -1
  47. package/dist/migrations/migrations.d.ts +8 -0
  48. package/dist/migrations/migrations.js +19 -7
  49. package/dist/migrations/migrations.js.map +1 -1
  50. package/dist/modules/AbstractModule.d.ts +26 -0
  51. package/dist/modules/AbstractModule.js +11 -0
  52. package/dist/modules/AbstractModule.js.map +1 -0
  53. package/dist/modules/ModuleManager.d.ts +11 -0
  54. package/dist/modules/ModuleManager.js +32 -0
  55. package/dist/modules/ModuleManager.js.map +1 -0
  56. package/dist/modules/modules-index.d.ts +2 -0
  57. package/dist/modules/modules-index.js +3 -0
  58. package/dist/modules/modules-index.js.map +1 -0
  59. package/dist/replication/AbstractReplicationJob.d.ts +38 -0
  60. package/dist/replication/AbstractReplicationJob.js +51 -0
  61. package/dist/replication/AbstractReplicationJob.js.map +1 -0
  62. package/dist/replication/AbstractReplicator.d.ts +53 -0
  63. package/dist/replication/AbstractReplicator.js +187 -0
  64. package/dist/replication/AbstractReplicator.js.map +1 -0
  65. package/dist/replication/ErrorRateLimiter.d.ts +0 -9
  66. package/dist/replication/ErrorRateLimiter.js +1 -42
  67. package/dist/replication/ErrorRateLimiter.js.map +1 -1
  68. package/dist/replication/ReplicationEngine.d.ts +18 -0
  69. package/dist/replication/ReplicationEngine.js +41 -0
  70. package/dist/replication/ReplicationEngine.js.map +1 -0
  71. package/dist/replication/ReplicationModule.d.ts +39 -0
  72. package/dist/replication/ReplicationModule.js +65 -0
  73. package/dist/replication/ReplicationModule.js.map +1 -0
  74. package/dist/replication/replication-index.d.ts +4 -6
  75. package/dist/replication/replication-index.js +4 -6
  76. package/dist/replication/replication-index.js.map +1 -1
  77. package/dist/routes/RouterEngine.d.ts +42 -0
  78. package/dist/routes/RouterEngine.js +80 -0
  79. package/dist/routes/RouterEngine.js.map +1 -0
  80. package/dist/routes/auth.d.ts +2 -2
  81. package/dist/routes/auth.js +11 -11
  82. package/dist/routes/auth.js.map +1 -1
  83. package/dist/routes/configure-fastify.d.ts +737 -0
  84. package/dist/routes/configure-fastify.js +57 -0
  85. package/dist/routes/configure-fastify.js.map +1 -0
  86. package/dist/routes/configure-rsocket.d.ts +13 -0
  87. package/dist/routes/configure-rsocket.js +47 -0
  88. package/dist/routes/configure-rsocket.js.map +1 -0
  89. package/dist/routes/endpoints/admin.d.ts +0 -34
  90. package/dist/routes/endpoints/admin.js +48 -89
  91. package/dist/routes/endpoints/admin.js.map +1 -1
  92. package/dist/routes/endpoints/checkpointing.d.ts +56 -16
  93. package/dist/routes/endpoints/checkpointing.js +33 -12
  94. package/dist/routes/endpoints/checkpointing.js.map +1 -1
  95. package/dist/routes/endpoints/route-endpoints-index.d.ts +0 -1
  96. package/dist/routes/endpoints/route-endpoints-index.js +0 -1
  97. package/dist/routes/endpoints/route-endpoints-index.js.map +1 -1
  98. package/dist/routes/endpoints/socket-route.js +46 -39
  99. package/dist/routes/endpoints/socket-route.js.map +1 -1
  100. package/dist/routes/endpoints/sync-rules.d.ts +1 -1
  101. package/dist/routes/endpoints/sync-rules.js +32 -23
  102. package/dist/routes/endpoints/sync-rules.js.map +1 -1
  103. package/dist/routes/endpoints/sync-stream.d.ts +10 -0
  104. package/dist/routes/endpoints/sync-stream.js +17 -13
  105. package/dist/routes/endpoints/sync-stream.js.map +1 -1
  106. package/dist/routes/route-register.d.ts +1 -1
  107. package/dist/routes/route-register.js +1 -1
  108. package/dist/routes/route-register.js.map +1 -1
  109. package/dist/routes/router-socket.d.ts +5 -4
  110. package/dist/routes/router-socket.js +2 -1
  111. package/dist/routes/router-socket.js.map +1 -1
  112. package/dist/routes/router.d.ts +7 -2
  113. package/dist/routes/router.js.map +1 -1
  114. package/dist/routes/routes-index.d.ts +3 -0
  115. package/dist/routes/routes-index.js +3 -0
  116. package/dist/routes/routes-index.js.map +1 -1
  117. package/dist/runner/teardown.js +47 -76
  118. package/dist/runner/teardown.js.map +1 -1
  119. package/dist/storage/BucketStorage.d.ts +61 -20
  120. package/dist/storage/BucketStorage.js +0 -10
  121. package/dist/storage/BucketStorage.js.map +1 -1
  122. package/dist/storage/MongoBucketStorage.d.ts +4 -4
  123. package/dist/storage/MongoBucketStorage.js +19 -24
  124. package/dist/storage/MongoBucketStorage.js.map +1 -1
  125. package/dist/storage/SourceEntity.d.ts +20 -0
  126. package/dist/storage/SourceEntity.js +2 -0
  127. package/dist/storage/SourceEntity.js.map +1 -0
  128. package/dist/storage/SourceTable.d.ts +4 -5
  129. package/dist/storage/SourceTable.js +3 -4
  130. package/dist/storage/SourceTable.js.map +1 -1
  131. package/dist/storage/StorageEngine.d.ts +24 -0
  132. package/dist/storage/StorageEngine.js +43 -0
  133. package/dist/storage/StorageEngine.js.map +1 -0
  134. package/dist/storage/StorageProvider.d.ts +21 -0
  135. package/dist/storage/StorageProvider.js +2 -0
  136. package/dist/storage/StorageProvider.js.map +1 -0
  137. package/dist/storage/mongo/MongoBucketBatch.d.ts +1 -1
  138. package/dist/storage/mongo/MongoBucketBatch.js +6 -7
  139. package/dist/storage/mongo/MongoBucketBatch.js.map +1 -1
  140. package/dist/storage/mongo/MongoCompactor.d.ts +40 -0
  141. package/dist/storage/mongo/MongoCompactor.js +293 -0
  142. package/dist/storage/mongo/MongoCompactor.js.map +1 -0
  143. package/dist/storage/mongo/MongoPersistedSyncRulesContent.d.ts +2 -2
  144. package/dist/storage/mongo/MongoPersistedSyncRulesContent.js +2 -2
  145. package/dist/storage/mongo/MongoPersistedSyncRulesContent.js.map +1 -1
  146. package/dist/storage/mongo/MongoStorageProvider.d.ts +5 -0
  147. package/dist/storage/mongo/MongoStorageProvider.js +26 -0
  148. package/dist/storage/mongo/MongoStorageProvider.js.map +1 -0
  149. package/dist/storage/mongo/MongoSyncBucketStorage.d.ts +9 -7
  150. package/dist/storage/mongo/MongoSyncBucketStorage.js +43 -28
  151. package/dist/storage/mongo/MongoSyncBucketStorage.js.map +1 -1
  152. package/dist/storage/mongo/MongoSyncRulesLock.js +1 -1
  153. package/dist/storage/mongo/MongoSyncRulesLock.js.map +1 -1
  154. package/dist/storage/mongo/OperationBatch.d.ts +7 -3
  155. package/dist/storage/mongo/OperationBatch.js +16 -7
  156. package/dist/storage/mongo/OperationBatch.js.map +1 -1
  157. package/dist/storage/mongo/PersistedBatch.d.ts +3 -3
  158. package/dist/storage/mongo/PersistedBatch.js +2 -2
  159. package/dist/storage/mongo/PersistedBatch.js.map +1 -1
  160. package/dist/storage/mongo/models.d.ts +17 -7
  161. package/dist/storage/mongo/models.js.map +1 -1
  162. package/dist/storage/mongo/util.d.ts +14 -0
  163. package/dist/storage/mongo/util.js +70 -0
  164. package/dist/storage/mongo/util.js.map +1 -1
  165. package/dist/storage/storage-index.d.ts +5 -2
  166. package/dist/storage/storage-index.js +5 -2
  167. package/dist/storage/storage-index.js.map +1 -1
  168. package/dist/sync/RequestTracker.js +2 -3
  169. package/dist/sync/RequestTracker.js.map +1 -1
  170. package/dist/sync/sync-index.d.ts +1 -0
  171. package/dist/sync/sync-index.js +1 -0
  172. package/dist/sync/sync-index.js.map +1 -1
  173. package/dist/sync/sync.d.ts +2 -1
  174. package/dist/sync/sync.js +56 -17
  175. package/dist/sync/sync.js.map +1 -1
  176. package/dist/system/ServiceContext.d.ts +37 -0
  177. package/dist/system/ServiceContext.js +48 -0
  178. package/dist/system/ServiceContext.js.map +1 -0
  179. package/dist/system/system-index.d.ts +1 -1
  180. package/dist/system/system-index.js +1 -1
  181. package/dist/system/system-index.js.map +1 -1
  182. package/dist/util/config/collectors/config-collector.d.ts +12 -0
  183. package/dist/util/config/collectors/config-collector.js +43 -0
  184. package/dist/util/config/collectors/config-collector.js.map +1 -1
  185. package/dist/util/config/compound-config-collector.d.ts +10 -29
  186. package/dist/util/config/compound-config-collector.js +28 -84
  187. package/dist/util/config/compound-config-collector.js.map +1 -1
  188. package/dist/util/config/sync-rules/sync-rules-provider.d.ts +9 -0
  189. package/dist/util/config/sync-rules/sync-rules-provider.js +15 -0
  190. package/dist/util/config/sync-rules/sync-rules-provider.js.map +1 -0
  191. package/dist/util/config/types.d.ts +6 -4
  192. package/dist/util/config/types.js.map +1 -1
  193. package/dist/util/config.d.ts +3 -4
  194. package/dist/util/config.js +5 -20
  195. package/dist/util/config.js.map +1 -1
  196. package/dist/util/protocol-types.d.ts +4 -0
  197. package/dist/util/protocol-types.js +5 -1
  198. package/dist/util/protocol-types.js.map +1 -1
  199. package/dist/util/util-index.d.ts +3 -6
  200. package/dist/util/util-index.js +3 -6
  201. package/dist/util/util-index.js.map +1 -1
  202. package/dist/util/utils.d.ts +10 -6
  203. package/dist/util/utils.js +45 -25
  204. package/dist/util/utils.js.map +1 -1
  205. package/package.json +7 -7
  206. package/src/api/RouteAPI.ts +78 -0
  207. package/src/api/api-index.ts +1 -0
  208. package/src/api/diagnostics.ts +16 -71
  209. package/src/api/schema.ts +13 -89
  210. package/src/auth/KeyStore.ts +9 -6
  211. package/src/auth/auth-index.ts +0 -1
  212. package/src/entry/cli-entry.ts +4 -2
  213. package/src/entry/commands/compact-action.ts +57 -0
  214. package/src/entry/commands/migrate-action.ts +5 -8
  215. package/src/entry/commands/teardown-action.ts +2 -2
  216. package/src/entry/entry-index.ts +1 -0
  217. package/src/index.ts +5 -2
  218. package/src/metrics/Metrics.ts +70 -15
  219. package/src/migrations/db/migrations/1684951997326-init.ts +9 -4
  220. package/src/migrations/db/migrations/1702295701188-sync-rule-state.ts +7 -4
  221. package/src/migrations/db/migrations/1711543888062-write-checkpoint-index.ts +6 -4
  222. package/src/migrations/migrations.ts +24 -8
  223. package/src/modules/AbstractModule.ts +37 -0
  224. package/src/modules/ModuleManager.ts +34 -0
  225. package/src/modules/modules-index.ts +2 -0
  226. package/src/replication/AbstractReplicationJob.ts +79 -0
  227. package/src/replication/AbstractReplicator.ts +227 -0
  228. package/src/replication/ErrorRateLimiter.ts +0 -44
  229. package/src/replication/ReplicationEngine.ts +43 -0
  230. package/src/replication/ReplicationModule.ts +101 -0
  231. package/src/replication/replication-index.ts +4 -6
  232. package/src/routes/RouterEngine.ts +120 -0
  233. package/src/routes/auth.ts +21 -12
  234. package/src/routes/configure-fastify.ts +101 -0
  235. package/src/routes/configure-rsocket.ts +60 -0
  236. package/src/routes/endpoints/admin.ts +74 -100
  237. package/src/routes/endpoints/checkpointing.ts +46 -12
  238. package/src/routes/endpoints/route-endpoints-index.ts +0 -1
  239. package/src/routes/endpoints/socket-route.ts +50 -42
  240. package/src/routes/endpoints/sync-rules.ts +41 -25
  241. package/src/routes/endpoints/sync-stream.ts +17 -13
  242. package/src/routes/route-register.ts +2 -2
  243. package/src/routes/router-socket.ts +6 -5
  244. package/src/routes/router.ts +7 -2
  245. package/src/routes/routes-index.ts +3 -0
  246. package/src/runner/teardown.ts +50 -88
  247. package/src/storage/BucketStorage.ts +74 -26
  248. package/src/storage/MongoBucketStorage.ts +23 -26
  249. package/src/storage/SourceEntity.ts +22 -0
  250. package/src/storage/SourceTable.ts +4 -6
  251. package/src/storage/StorageEngine.ts +55 -0
  252. package/src/storage/StorageProvider.ts +27 -0
  253. package/src/storage/mongo/MongoBucketBatch.ts +8 -8
  254. package/src/storage/mongo/MongoCompactor.ts +372 -0
  255. package/src/storage/mongo/MongoPersistedSyncRulesContent.ts +3 -3
  256. package/src/storage/mongo/MongoStorageProvider.ts +31 -0
  257. package/src/storage/mongo/MongoSyncBucketStorage.ts +64 -34
  258. package/src/storage/mongo/MongoSyncRulesLock.ts +1 -1
  259. package/src/storage/mongo/OperationBatch.ts +18 -11
  260. package/src/storage/mongo/PersistedBatch.ts +6 -5
  261. package/src/storage/mongo/models.ts +17 -7
  262. package/src/storage/mongo/util.ts +71 -1
  263. package/src/storage/storage-index.ts +5 -2
  264. package/src/sync/RequestTracker.ts +3 -3
  265. package/src/sync/sync-index.ts +1 -0
  266. package/src/sync/sync.ts +66 -17
  267. package/src/system/ServiceContext.ts +68 -0
  268. package/src/system/system-index.ts +1 -1
  269. package/src/util/config/collectors/config-collector.ts +48 -0
  270. package/src/util/config/compound-config-collector.ts +45 -110
  271. package/src/util/config/sync-rules/sync-rules-provider.ts +18 -0
  272. package/src/util/config/types.ts +6 -5
  273. package/src/util/config.ts +6 -23
  274. package/src/util/protocol-types.ts +6 -1
  275. package/src/util/util-index.ts +3 -6
  276. package/src/util/utils.ts +55 -39
  277. package/test/src/__snapshots__/sync.test.ts.snap +90 -5
  278. package/test/src/auth.test.ts +7 -7
  279. package/test/src/broadcast_iterable.test.ts +1 -1
  280. package/test/src/bucket_validation.test.ts +142 -0
  281. package/test/src/bucket_validation.ts +116 -0
  282. package/test/src/checksum_cache.test.ts +3 -3
  283. package/test/src/compacting.test.ts +216 -0
  284. package/test/src/data_storage.test.ts +275 -204
  285. package/test/src/env.ts +1 -3
  286. package/test/src/merge_iterable.test.ts +1 -6
  287. package/test/src/setup.ts +1 -1
  288. package/test/src/stream_utils.ts +42 -0
  289. package/test/src/sync.test.ts +209 -48
  290. package/test/src/util.ts +110 -55
  291. package/test/tsconfig.json +1 -1
  292. package/tsconfig.tsbuildinfo +1 -1
  293. package/dist/auth/SupabaseKeyCollector.d.ts +0 -22
  294. package/dist/auth/SupabaseKeyCollector.js +0 -61
  295. package/dist/auth/SupabaseKeyCollector.js.map +0 -1
  296. package/dist/replication/PgRelation.d.ts +0 -16
  297. package/dist/replication/PgRelation.js +0 -26
  298. package/dist/replication/PgRelation.js.map +0 -1
  299. package/dist/replication/WalConnection.d.ts +0 -34
  300. package/dist/replication/WalConnection.js +0 -190
  301. package/dist/replication/WalConnection.js.map +0 -1
  302. package/dist/replication/WalStream.d.ts +0 -57
  303. package/dist/replication/WalStream.js +0 -517
  304. package/dist/replication/WalStream.js.map +0 -1
  305. package/dist/replication/WalStreamManager.d.ts +0 -30
  306. package/dist/replication/WalStreamManager.js +0 -198
  307. package/dist/replication/WalStreamManager.js.map +0 -1
  308. package/dist/replication/WalStreamRunner.d.ts +0 -38
  309. package/dist/replication/WalStreamRunner.js +0 -155
  310. package/dist/replication/WalStreamRunner.js.map +0 -1
  311. package/dist/replication/util.d.ts +0 -9
  312. package/dist/replication/util.js +0 -62
  313. package/dist/replication/util.js.map +0 -1
  314. package/dist/routes/endpoints/dev.d.ts +0 -312
  315. package/dist/routes/endpoints/dev.js +0 -172
  316. package/dist/routes/endpoints/dev.js.map +0 -1
  317. package/dist/system/CorePowerSyncSystem.d.ts +0 -23
  318. package/dist/system/CorePowerSyncSystem.js +0 -52
  319. package/dist/system/CorePowerSyncSystem.js.map +0 -1
  320. package/dist/util/PgManager.d.ts +0 -24
  321. package/dist/util/PgManager.js +0 -55
  322. package/dist/util/PgManager.js.map +0 -1
  323. package/dist/util/migration_lib.d.ts +0 -11
  324. package/dist/util/migration_lib.js +0 -64
  325. package/dist/util/migration_lib.js.map +0 -1
  326. package/dist/util/pgwire_utils.d.ts +0 -24
  327. package/dist/util/pgwire_utils.js +0 -117
  328. package/dist/util/pgwire_utils.js.map +0 -1
  329. package/dist/util/populate_test_data.d.ts +0 -8
  330. package/dist/util/populate_test_data.js +0 -65
  331. package/dist/util/populate_test_data.js.map +0 -1
  332. package/src/auth/SupabaseKeyCollector.ts +0 -67
  333. package/src/replication/PgRelation.ts +0 -42
  334. package/src/replication/WalConnection.ts +0 -227
  335. package/src/replication/WalStream.ts +0 -628
  336. package/src/replication/WalStreamManager.ts +0 -213
  337. package/src/replication/WalStreamRunner.ts +0 -180
  338. package/src/replication/util.ts +0 -76
  339. package/src/routes/endpoints/dev.ts +0 -199
  340. package/src/system/CorePowerSyncSystem.ts +0 -64
  341. package/src/util/PgManager.ts +0 -64
  342. package/src/util/migration_lib.ts +0 -79
  343. package/src/util/pgwire_utils.ts +0 -139
  344. package/src/util/populate_test_data.ts +0 -78
  345. package/test/src/__snapshots__/pg_test.test.ts.snap +0 -256
  346. package/test/src/large_batch.test.ts +0 -194
  347. package/test/src/pg_test.test.ts +0 -450
  348. package/test/src/schema_changes.test.ts +0 -545
  349. package/test/src/slow_tests.test.ts +0 -296
  350. package/test/src/validation.test.ts +0 -63
  351. package/test/src/wal_stream.test.ts +0 -314
  352. package/test/src/wal_stream_utils.ts +0 -147
@@ -0,0 +1,737 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import type fastify from 'fastify';
3
+ import * as system from '../system/system-index.js';
4
+ import { CreateRequestQueueParams } from './hooks.js';
5
+ import { RouteDefinition } from './router.js';
6
+ /**
7
+ * A list of route definitions to be registered as endpoints.
8
+ * Supplied concurrency limits will be applied to the grouped routes.
9
+ */
10
+ export type RouteRegistrationOptions = {
11
+ routes: RouteDefinition[];
12
+ queue_options: CreateRequestQueueParams;
13
+ };
14
+ /**
15
+ * HTTP routes separated by API and Sync stream categories.
16
+ * This allows for separate concurrency limits.
17
+ */
18
+ export type RouteDefinitions = {
19
+ api?: Partial<RouteRegistrationOptions>;
20
+ sync_stream?: Partial<RouteRegistrationOptions>;
21
+ };
22
+ export type FastifyServerConfig = {
23
+ service_context: system.ServiceContext;
24
+ routes?: RouteDefinitions;
25
+ };
26
+ export declare const DEFAULT_ROUTE_OPTIONS: {
27
+ api: {
28
+ routes: ((import("@powersync/lib-services-framework").Endpoint<{
29
+ sql: {
30
+ query: string;
31
+ args: (string | number | boolean)[];
32
+ };
33
+ connection_id?: string | undefined;
34
+ }, {
35
+ results: {
36
+ columns: string[];
37
+ rows: (string | number | boolean | null)[][];
38
+ };
39
+ success: boolean;
40
+ error?: string | undefined;
41
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
42
+ sql: {
43
+ query: string;
44
+ args: (string | number | boolean)[];
45
+ };
46
+ connection_id?: string | undefined;
47
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
48
+ sql: {
49
+ query: string;
50
+ args: (string | number | boolean)[];
51
+ };
52
+ connection_id?: string | undefined;
53
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
54
+ results: {
55
+ columns: string[];
56
+ rows: (string | number | boolean | null)[][];
57
+ };
58
+ success: boolean;
59
+ error?: string | undefined;
60
+ }>> & {
61
+ path: string;
62
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
63
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
64
+ authorized: boolean;
65
+ errors: string[];
66
+ } | {
67
+ authorized: boolean;
68
+ errors?: undefined;
69
+ };
70
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
71
+ sql: {
72
+ query: string;
73
+ args: (string | number | boolean)[];
74
+ };
75
+ connection_id?: string | undefined;
76
+ }, string[]>;
77
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
78
+ sql: {
79
+ query: string;
80
+ args: (string | number | boolean)[];
81
+ };
82
+ connection_id?: string | undefined;
83
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
84
+ results: {
85
+ columns: string[];
86
+ rows: (string | number | boolean | null)[][];
87
+ };
88
+ success: boolean;
89
+ error?: string | undefined;
90
+ }>;
91
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
92
+ sync_rules_content?: boolean | undefined;
93
+ }, {
94
+ connections: {
95
+ errors: {
96
+ message: string;
97
+ level: "warning" | "fatal";
98
+ }[];
99
+ id: string;
100
+ postgres_uri: string;
101
+ connected: boolean;
102
+ }[];
103
+ active_sync_rules?: {
104
+ errors: {
105
+ level: "warning" | "fatal";
106
+ message: string;
107
+ }[];
108
+ connections: {
109
+ id: string;
110
+ tag: string;
111
+ slot_name: string;
112
+ initial_replication_done: boolean;
113
+ tables: {
114
+ schema: string;
115
+ name: string;
116
+ replication_id: string[];
117
+ data_queries: boolean;
118
+ parameter_queries: boolean;
119
+ errors: {
120
+ level: "warning" | "fatal";
121
+ message: string;
122
+ }[];
123
+ pattern?: string | undefined;
124
+ }[];
125
+ last_lsn?: string | undefined;
126
+ last_keepalive_ts?: string | undefined;
127
+ last_checkpoint_ts?: string | undefined;
128
+ replication_lag_bytes?: number | undefined;
129
+ }[];
130
+ content?: string | undefined;
131
+ } | undefined;
132
+ deploying_sync_rules?: {
133
+ errors: {
134
+ level: "warning" | "fatal";
135
+ message: string;
136
+ }[];
137
+ connections: {
138
+ id: string;
139
+ tag: string;
140
+ slot_name: string;
141
+ initial_replication_done: boolean;
142
+ tables: {
143
+ schema: string;
144
+ name: string;
145
+ replication_id: string[];
146
+ data_queries: boolean;
147
+ parameter_queries: boolean;
148
+ errors: {
149
+ level: "warning" | "fatal";
150
+ message: string;
151
+ }[];
152
+ pattern?: string | undefined;
153
+ }[];
154
+ last_lsn?: string | undefined;
155
+ last_keepalive_ts?: string | undefined;
156
+ last_checkpoint_ts?: string | undefined;
157
+ replication_lag_bytes?: number | undefined;
158
+ }[];
159
+ content?: string | undefined;
160
+ } | undefined;
161
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
162
+ sync_rules_content?: boolean | undefined;
163
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
164
+ sync_rules_content?: boolean | undefined;
165
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
166
+ connections: {
167
+ errors: {
168
+ message: string;
169
+ level: "warning" | "fatal";
170
+ }[];
171
+ id: string;
172
+ postgres_uri: string;
173
+ connected: boolean;
174
+ }[];
175
+ active_sync_rules?: {
176
+ errors: {
177
+ level: "warning" | "fatal";
178
+ message: string;
179
+ }[];
180
+ connections: {
181
+ id: string;
182
+ tag: string;
183
+ slot_name: string;
184
+ initial_replication_done: boolean;
185
+ tables: {
186
+ schema: string;
187
+ name: string;
188
+ replication_id: string[];
189
+ data_queries: boolean;
190
+ parameter_queries: boolean;
191
+ errors: {
192
+ level: "warning" | "fatal";
193
+ message: string;
194
+ }[];
195
+ pattern?: string | undefined;
196
+ }[];
197
+ last_lsn?: string | undefined;
198
+ last_keepalive_ts?: string | undefined;
199
+ last_checkpoint_ts?: string | undefined;
200
+ replication_lag_bytes?: number | undefined;
201
+ }[];
202
+ content?: string | undefined;
203
+ } | undefined;
204
+ deploying_sync_rules?: {
205
+ errors: {
206
+ level: "warning" | "fatal";
207
+ message: string;
208
+ }[];
209
+ connections: {
210
+ id: string;
211
+ tag: string;
212
+ slot_name: string;
213
+ initial_replication_done: boolean;
214
+ tables: {
215
+ schema: string;
216
+ name: string;
217
+ replication_id: string[];
218
+ data_queries: boolean;
219
+ parameter_queries: boolean;
220
+ errors: {
221
+ level: "warning" | "fatal";
222
+ message: string;
223
+ }[];
224
+ pattern?: string | undefined;
225
+ }[];
226
+ last_lsn?: string | undefined;
227
+ last_keepalive_ts?: string | undefined;
228
+ last_checkpoint_ts?: string | undefined;
229
+ replication_lag_bytes?: number | undefined;
230
+ }[];
231
+ content?: string | undefined;
232
+ } | undefined;
233
+ }>> & {
234
+ path: string;
235
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
236
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
237
+ authorized: boolean;
238
+ errors: string[];
239
+ } | {
240
+ authorized: boolean;
241
+ errors?: undefined;
242
+ };
243
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
244
+ sync_rules_content?: boolean | undefined;
245
+ }, string[]>;
246
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
247
+ sync_rules_content?: boolean | undefined;
248
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
249
+ connections: {
250
+ errors: {
251
+ message: string;
252
+ level: "warning" | "fatal";
253
+ }[];
254
+ id: string;
255
+ postgres_uri: string;
256
+ connected: boolean;
257
+ }[];
258
+ active_sync_rules?: {
259
+ errors: {
260
+ level: "warning" | "fatal";
261
+ message: string;
262
+ }[];
263
+ connections: {
264
+ id: string;
265
+ tag: string;
266
+ slot_name: string;
267
+ initial_replication_done: boolean;
268
+ tables: {
269
+ schema: string;
270
+ name: string;
271
+ replication_id: string[];
272
+ data_queries: boolean;
273
+ parameter_queries: boolean;
274
+ errors: {
275
+ level: "warning" | "fatal";
276
+ message: string;
277
+ }[];
278
+ pattern?: string | undefined;
279
+ }[];
280
+ last_lsn?: string | undefined;
281
+ last_keepalive_ts?: string | undefined;
282
+ last_checkpoint_ts?: string | undefined;
283
+ replication_lag_bytes?: number | undefined;
284
+ }[];
285
+ content?: string | undefined;
286
+ } | undefined;
287
+ deploying_sync_rules?: {
288
+ errors: {
289
+ level: "warning" | "fatal";
290
+ message: string;
291
+ }[];
292
+ connections: {
293
+ id: string;
294
+ tag: string;
295
+ slot_name: string;
296
+ initial_replication_done: boolean;
297
+ tables: {
298
+ schema: string;
299
+ name: string;
300
+ replication_id: string[];
301
+ data_queries: boolean;
302
+ parameter_queries: boolean;
303
+ errors: {
304
+ level: "warning" | "fatal";
305
+ message: string;
306
+ }[];
307
+ pattern?: string | undefined;
308
+ }[];
309
+ last_lsn?: string | undefined;
310
+ last_keepalive_ts?: string | undefined;
311
+ last_checkpoint_ts?: string | undefined;
312
+ replication_lag_bytes?: number | undefined;
313
+ }[];
314
+ content?: string | undefined;
315
+ } | undefined;
316
+ }>;
317
+ }) | (import("@powersync/lib-services-framework").Endpoint<{}, {
318
+ connections: {
319
+ tag: string;
320
+ schemas: {
321
+ name: string;
322
+ tables: {
323
+ name: string;
324
+ columns: {
325
+ type: string;
326
+ name: string;
327
+ pg_type: string;
328
+ }[];
329
+ }[];
330
+ }[];
331
+ id?: string | undefined;
332
+ }[];
333
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
334
+ connections: {
335
+ tag: string;
336
+ schemas: {
337
+ name: string;
338
+ tables: {
339
+ name: string;
340
+ columns: {
341
+ type: string;
342
+ name: string;
343
+ pg_type: string;
344
+ }[];
345
+ }[];
346
+ }[];
347
+ id?: string | undefined;
348
+ }[];
349
+ }>> & {
350
+ path: string;
351
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
352
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
353
+ authorized: boolean;
354
+ errors: string[];
355
+ } | {
356
+ authorized: boolean;
357
+ errors?: undefined;
358
+ };
359
+ validator: import("@powersync/lib-services-framework").MicroValidator<{}, string[]>;
360
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
361
+ connections: {
362
+ tag: string;
363
+ schemas: {
364
+ name: string;
365
+ tables: {
366
+ name: string;
367
+ columns: {
368
+ type: string;
369
+ name: string;
370
+ pg_type: string;
371
+ }[];
372
+ }[];
373
+ }[];
374
+ id?: string | undefined;
375
+ }[];
376
+ }>;
377
+ }) | (import("@powersync/lib-services-framework").Endpoint<{}, {
378
+ connections: {
379
+ tag: string;
380
+ slot_name: string;
381
+ id?: string | undefined;
382
+ }[];
383
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
384
+ connections: {
385
+ tag: string;
386
+ slot_name: string;
387
+ id?: string | undefined;
388
+ }[];
389
+ }>> & {
390
+ path: string;
391
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
392
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
393
+ authorized: boolean;
394
+ errors: string[];
395
+ } | {
396
+ authorized: boolean;
397
+ errors?: undefined;
398
+ };
399
+ validator: import("@powersync/lib-services-framework").MicroValidator<{}, string[]>;
400
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
401
+ connections: {
402
+ tag: string;
403
+ slot_name: string;
404
+ id?: string | undefined;
405
+ }[];
406
+ }>;
407
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
408
+ sync_rules: string;
409
+ }, {
410
+ errors: {
411
+ message: string;
412
+ level: "warning" | "fatal";
413
+ }[];
414
+ connections: {
415
+ id: string;
416
+ tag: string;
417
+ slot_name: string;
418
+ initial_replication_done: boolean;
419
+ tables: {
420
+ errors: {
421
+ message: string;
422
+ level: "warning" | "fatal";
423
+ }[];
424
+ name: string;
425
+ schema: string;
426
+ replication_id: string[];
427
+ data_queries: boolean;
428
+ parameter_queries: boolean;
429
+ pattern?: string | undefined;
430
+ }[];
431
+ last_checkpoint_ts?: string | undefined;
432
+ last_keepalive_ts?: string | undefined;
433
+ last_lsn?: string | undefined;
434
+ replication_lag_bytes?: number | undefined;
435
+ }[];
436
+ content?: string | undefined;
437
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
438
+ sync_rules: string;
439
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
440
+ sync_rules: string;
441
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
442
+ errors: {
443
+ message: string;
444
+ level: "warning" | "fatal";
445
+ }[];
446
+ connections: {
447
+ id: string;
448
+ tag: string;
449
+ slot_name: string;
450
+ initial_replication_done: boolean;
451
+ tables: {
452
+ errors: {
453
+ message: string;
454
+ level: "warning" | "fatal";
455
+ }[];
456
+ name: string;
457
+ schema: string;
458
+ replication_id: string[];
459
+ data_queries: boolean;
460
+ parameter_queries: boolean;
461
+ pattern?: string | undefined;
462
+ }[];
463
+ last_checkpoint_ts?: string | undefined;
464
+ last_keepalive_ts?: string | undefined;
465
+ last_lsn?: string | undefined;
466
+ replication_lag_bytes?: number | undefined;
467
+ }[];
468
+ content?: string | undefined;
469
+ }>> & {
470
+ path: string;
471
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
472
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
473
+ authorized: boolean;
474
+ errors: string[];
475
+ } | {
476
+ authorized: boolean;
477
+ errors?: undefined;
478
+ };
479
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
480
+ sync_rules: string;
481
+ }, string[]>;
482
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
483
+ sync_rules: string;
484
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
485
+ errors: {
486
+ message: string;
487
+ level: "warning" | "fatal";
488
+ }[];
489
+ connections: {
490
+ id: string;
491
+ tag: string;
492
+ slot_name: string;
493
+ initial_replication_done: boolean;
494
+ tables: {
495
+ errors: {
496
+ message: string;
497
+ level: "warning" | "fatal";
498
+ }[];
499
+ name: string;
500
+ schema: string;
501
+ replication_id: string[];
502
+ data_queries: boolean;
503
+ parameter_queries: boolean;
504
+ pattern?: string | undefined;
505
+ }[];
506
+ last_checkpoint_ts?: string | undefined;
507
+ last_keepalive_ts?: string | undefined;
508
+ last_lsn?: string | undefined;
509
+ replication_lag_bytes?: number | undefined;
510
+ }[];
511
+ content?: string | undefined;
512
+ }>;
513
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
514
+ client_id?: string | undefined;
515
+ }, {
516
+ checkpoint: string;
517
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
518
+ client_id?: string | undefined;
519
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
520
+ client_id?: string | undefined;
521
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
522
+ checkpoint: string;
523
+ }>> & {
524
+ path: string;
525
+ method: import("@powersync/lib-services-framework").HTTPMethod.GET;
526
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => Promise<{
527
+ authorized: boolean;
528
+ errors: any[];
529
+ } | {
530
+ authorized: boolean;
531
+ errors?: undefined;
532
+ }>;
533
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
534
+ client_id?: string | undefined;
535
+ }, string[]>;
536
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
537
+ client_id?: string | undefined;
538
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
539
+ checkpoint: string;
540
+ }>;
541
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
542
+ client_id?: string | undefined;
543
+ }, {
544
+ write_checkpoint: string;
545
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
546
+ client_id?: string | undefined;
547
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
548
+ client_id?: string | undefined;
549
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
550
+ write_checkpoint: string;
551
+ }>> & {
552
+ path: string;
553
+ method: import("@powersync/lib-services-framework").HTTPMethod.GET;
554
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => Promise<{
555
+ authorized: boolean;
556
+ errors: any[];
557
+ } | {
558
+ authorized: boolean;
559
+ errors?: undefined;
560
+ }>;
561
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
562
+ client_id?: string | undefined;
563
+ }, string[]>;
564
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
565
+ client_id?: string | undefined;
566
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
567
+ write_checkpoint: string;
568
+ }>;
569
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
570
+ content: string;
571
+ }, {
572
+ slot_name: string;
573
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
574
+ content: string;
575
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
576
+ content: string;
577
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
578
+ slot_name: string;
579
+ }>> & {
580
+ path: string;
581
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
582
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
583
+ authorized: boolean;
584
+ errors: string[];
585
+ } | {
586
+ authorized: boolean;
587
+ errors?: undefined;
588
+ };
589
+ parse: boolean;
590
+ plugins: fastify.FastifyPluginAsync[];
591
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
592
+ content: string;
593
+ }, string[]>;
594
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
595
+ content: string;
596
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
597
+ slot_name: string;
598
+ }>;
599
+ }) | (import("@powersync/lib-services-framework").Endpoint<{
600
+ content: string;
601
+ }, import("@powersync/lib-services-framework").RouterResponse<string>, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
602
+ content: string;
603
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
604
+ content: string;
605
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").RouterResponse<string>>> & {
606
+ path: string;
607
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
608
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
609
+ authorized: boolean;
610
+ errors: string[];
611
+ } | {
612
+ authorized: boolean;
613
+ errors?: undefined;
614
+ };
615
+ parse: boolean;
616
+ plugins: fastify.FastifyPluginAsync[];
617
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
618
+ content: string;
619
+ }, string[]>;
620
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
621
+ content: string;
622
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<import("@powersync/lib-services-framework").RouterResponse<string>>;
623
+ }) | (import("@powersync/lib-services-framework").Endpoint<any, import("@powersync/lib-services-framework").RouterResponse<string>, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<any, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<any, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").RouterResponse<string>>> & {
624
+ path: string;
625
+ method: import("@powersync/lib-services-framework").HTTPMethod.GET;
626
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
627
+ authorized: boolean;
628
+ errors: string[];
629
+ } | {
630
+ authorized: boolean;
631
+ errors?: undefined;
632
+ };
633
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<any, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<import("@powersync/lib-services-framework").RouterResponse<string>>;
634
+ }) | (import("@powersync/lib-services-framework").Endpoint<{}, {
635
+ slot_name: string;
636
+ }, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>, {
637
+ slot_name: string;
638
+ }>> & {
639
+ path: string;
640
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
641
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => {
642
+ authorized: boolean;
643
+ errors: string[];
644
+ } | {
645
+ authorized: boolean;
646
+ errors?: undefined;
647
+ };
648
+ validator: import("@powersync/lib-services-framework").MicroValidator<{}, string[]>;
649
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{}, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<{
650
+ slot_name: string;
651
+ }>;
652
+ }))[];
653
+ queue_options: {
654
+ concurrency: number;
655
+ max_queue_depth: number;
656
+ };
657
+ };
658
+ sync_stream: {
659
+ routes: (import("@powersync/lib-services-framework").Endpoint<{
660
+ parameters?: Record<string, any> | undefined;
661
+ buckets?: {
662
+ name: string;
663
+ after: string;
664
+ }[] | undefined;
665
+ only?: string[] | undefined;
666
+ include_checksum?: boolean | undefined;
667
+ raw_data?: boolean | undefined;
668
+ binary_data?: boolean | undefined;
669
+ client_id?: string | undefined;
670
+ }, import("@powersync/lib-services-framework").RouterResponse<import("stream").Readable> | undefined, import("./router.js").Context, import("./router.js").RequestEndpointHandlerPayload<{
671
+ parameters?: Record<string, any> | undefined;
672
+ buckets?: {
673
+ name: string;
674
+ after: string;
675
+ }[] | undefined;
676
+ only?: string[] | undefined;
677
+ include_checksum?: boolean | undefined;
678
+ raw_data?: boolean | undefined;
679
+ binary_data?: boolean | undefined;
680
+ client_id?: string | undefined;
681
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").EndpointHandler<import("./router.js").RequestEndpointHandlerPayload<{
682
+ parameters?: Record<string, any> | undefined;
683
+ buckets?: {
684
+ name: string;
685
+ after: string;
686
+ }[] | undefined;
687
+ only?: string[] | undefined;
688
+ include_checksum?: boolean | undefined;
689
+ raw_data?: boolean | undefined;
690
+ binary_data?: boolean | undefined;
691
+ client_id?: string | undefined;
692
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>, import("@powersync/lib-services-framework").RouterResponse<import("stream").Readable> | undefined>> & {
693
+ path: import("./endpoints/sync-stream.js").SyncRoutes;
694
+ method: import("@powersync/lib-services-framework").HTTPMethod.POST;
695
+ authorize: (payload: import("./router.js").RequestEndpointHandlerPayload) => Promise<{
696
+ authorized: boolean;
697
+ errors: any[];
698
+ } | {
699
+ authorized: boolean;
700
+ errors?: undefined;
701
+ }>;
702
+ validator: import("@powersync/lib-services-framework").MicroValidator<{
703
+ parameters?: Record<string, any> | undefined;
704
+ buckets?: {
705
+ name: string;
706
+ after: string;
707
+ }[] | undefined;
708
+ only?: string[] | undefined;
709
+ include_checksum?: boolean | undefined;
710
+ raw_data?: boolean | undefined;
711
+ binary_data?: boolean | undefined;
712
+ client_id?: string | undefined;
713
+ }, string[]>;
714
+ handler: (payload: import("./router.js").RequestEndpointHandlerPayload<{
715
+ parameters?: Record<string, any> | undefined;
716
+ buckets?: {
717
+ name: string;
718
+ after: string;
719
+ }[] | undefined;
720
+ only?: string[] | undefined;
721
+ include_checksum?: boolean | undefined;
722
+ raw_data?: boolean | undefined;
723
+ binary_data?: boolean | undefined;
724
+ client_id?: string | undefined;
725
+ }, import("./router.js").Context, import("./router.js").BasicRouterRequest>) => Promise<import("@powersync/lib-services-framework").RouterResponse<import("stream").Readable> | undefined>;
726
+ })[];
727
+ queue_options: {
728
+ concurrency: number;
729
+ max_queue_depth: number;
730
+ };
731
+ };
732
+ };
733
+ /**
734
+ * Registers default routes on a Fastify server. Consumers can optionally configure
735
+ * concurrency queue limits or override routes.
736
+ */
737
+ export declare function configureFastifyServer(server: fastify.FastifyInstance, options: FastifyServerConfig): void;