@powersync/service-core 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/api/diagnostics.js +2 -2
  3. package/dist/api/diagnostics.js.map +1 -1
  4. package/dist/api/schema.js.map +1 -1
  5. package/dist/auth/CachedKeyCollector.js.map +1 -1
  6. package/dist/auth/JwtPayload.d.ts +6 -2
  7. package/dist/auth/KeySpec.js.map +1 -1
  8. package/dist/auth/KeyStore.js +3 -9
  9. package/dist/auth/KeyStore.js.map +1 -1
  10. package/dist/auth/LeakyBucket.js.map +1 -1
  11. package/dist/auth/RemoteJWKSCollector.js.map +1 -1
  12. package/dist/auth/SupabaseKeyCollector.js.map +1 -1
  13. package/dist/db/mongo.js.map +1 -1
  14. package/dist/entry/cli-entry.js +2 -2
  15. package/dist/entry/cli-entry.js.map +1 -1
  16. package/dist/entry/commands/config-command.js.map +1 -1
  17. package/dist/entry/commands/migrate-action.js +12 -4
  18. package/dist/entry/commands/migrate-action.js.map +1 -1
  19. package/dist/entry/commands/start-action.js.map +1 -1
  20. package/dist/entry/commands/teardown-action.js.map +1 -1
  21. package/dist/index.d.ts +3 -2
  22. package/dist/index.js +4 -2
  23. package/dist/index.js.map +1 -1
  24. package/dist/locks/LockManager.d.ts +10 -0
  25. package/dist/locks/LockManager.js +7 -0
  26. package/dist/locks/LockManager.js.map +1 -0
  27. package/dist/locks/MongoLocks.d.ts +36 -0
  28. package/dist/locks/MongoLocks.js +81 -0
  29. package/dist/locks/MongoLocks.js.map +1 -0
  30. package/dist/locks/locks-index.d.ts +2 -0
  31. package/dist/locks/locks-index.js +3 -0
  32. package/dist/locks/locks-index.js.map +1 -0
  33. package/dist/metrics/Metrics.js +6 -6
  34. package/dist/metrics/Metrics.js.map +1 -1
  35. package/dist/migrations/db/migrations/1684951997326-init.js.map +1 -1
  36. package/dist/migrations/db/migrations/1702295701188-sync-rule-state.js.map +1 -1
  37. package/dist/migrations/db/migrations/1711543888062-write-checkpoint-index.js.map +1 -1
  38. package/dist/migrations/definitions.d.ts +18 -0
  39. package/dist/migrations/definitions.js +6 -0
  40. package/dist/migrations/definitions.js.map +1 -0
  41. package/dist/migrations/executor.d.ts +16 -0
  42. package/dist/migrations/executor.js +64 -0
  43. package/dist/migrations/executor.js.map +1 -0
  44. package/dist/migrations/migrations-index.d.ts +3 -0
  45. package/dist/migrations/migrations-index.js +4 -0
  46. package/dist/migrations/migrations-index.js.map +1 -0
  47. package/dist/migrations/migrations.d.ts +1 -1
  48. package/dist/migrations/migrations.js +12 -8
  49. package/dist/migrations/migrations.js.map +1 -1
  50. package/dist/migrations/store/migration-store.d.ts +11 -0
  51. package/dist/migrations/store/migration-store.js +46 -0
  52. package/dist/migrations/store/migration-store.js.map +1 -0
  53. package/dist/replication/ErrorRateLimiter.js.map +1 -1
  54. package/dist/replication/PgRelation.js.map +1 -1
  55. package/dist/replication/WalConnection.js.map +1 -1
  56. package/dist/replication/WalStream.d.ts +0 -1
  57. package/dist/replication/WalStream.js +21 -25
  58. package/dist/replication/WalStream.js.map +1 -1
  59. package/dist/replication/WalStreamManager.js +12 -13
  60. package/dist/replication/WalStreamManager.js.map +1 -1
  61. package/dist/replication/WalStreamRunner.js +8 -8
  62. package/dist/replication/WalStreamRunner.js.map +1 -1
  63. package/dist/replication/util.js.map +1 -1
  64. package/dist/routes/auth.d.ts +8 -10
  65. package/dist/routes/auth.js.map +1 -1
  66. package/dist/routes/endpoints/admin.d.ts +1011 -0
  67. package/dist/routes/{admin.js → endpoints/admin.js} +33 -18
  68. package/dist/routes/endpoints/admin.js.map +1 -0
  69. package/dist/routes/endpoints/checkpointing.d.ts +76 -0
  70. package/dist/routes/endpoints/checkpointing.js +36 -0
  71. package/dist/routes/endpoints/checkpointing.js.map +1 -0
  72. package/dist/routes/endpoints/dev.d.ts +312 -0
  73. package/dist/routes/{dev.js → endpoints/dev.js} +25 -16
  74. package/dist/routes/endpoints/dev.js.map +1 -0
  75. package/dist/routes/endpoints/route-endpoints-index.d.ts +6 -0
  76. package/dist/routes/endpoints/route-endpoints-index.js +7 -0
  77. package/dist/routes/endpoints/route-endpoints-index.js.map +1 -0
  78. package/dist/routes/endpoints/socket-route.d.ts +2 -0
  79. package/dist/routes/{socket-route.js → endpoints/socket-route.js} +12 -12
  80. package/dist/routes/endpoints/socket-route.js.map +1 -0
  81. package/dist/routes/endpoints/sync-rules.d.ts +174 -0
  82. package/dist/routes/{sync-rules.js → endpoints/sync-rules.js} +44 -24
  83. package/dist/routes/endpoints/sync-rules.js.map +1 -0
  84. package/dist/routes/endpoints/sync-stream.d.ts +132 -0
  85. package/dist/routes/{sync-stream.js → endpoints/sync-stream.js} +28 -19
  86. package/dist/routes/endpoints/sync-stream.js.map +1 -0
  87. package/dist/routes/hooks.d.ts +10 -0
  88. package/dist/routes/hooks.js +31 -0
  89. package/dist/routes/hooks.js.map +1 -0
  90. package/dist/routes/route-register.d.ts +10 -0
  91. package/dist/routes/route-register.js +87 -0
  92. package/dist/routes/route-register.js.map +1 -0
  93. package/dist/routes/router.d.ts +16 -4
  94. package/dist/routes/router.js +6 -1
  95. package/dist/routes/router.js.map +1 -1
  96. package/dist/routes/routes-index.d.ts +5 -3
  97. package/dist/routes/routes-index.js +5 -3
  98. package/dist/routes/routes-index.js.map +1 -1
  99. package/dist/runner/teardown.js +9 -9
  100. package/dist/runner/teardown.js.map +1 -1
  101. package/dist/storage/BucketStorage.d.ts +3 -0
  102. package/dist/storage/BucketStorage.js.map +1 -1
  103. package/dist/storage/ChecksumCache.js.map +1 -1
  104. package/dist/storage/MongoBucketStorage.js +5 -5
  105. package/dist/storage/MongoBucketStorage.js.map +1 -1
  106. package/dist/storage/SourceTable.js.map +1 -1
  107. package/dist/storage/mongo/MongoBucketBatch.js +23 -18
  108. package/dist/storage/mongo/MongoBucketBatch.js.map +1 -1
  109. package/dist/storage/mongo/MongoIdSequence.js.map +1 -1
  110. package/dist/storage/mongo/MongoSyncBucketStorage.js.map +1 -1
  111. package/dist/storage/mongo/MongoSyncRulesLock.js +3 -3
  112. package/dist/storage/mongo/MongoSyncRulesLock.js.map +1 -1
  113. package/dist/storage/mongo/OperationBatch.js.map +1 -1
  114. package/dist/storage/mongo/PersistedBatch.js +2 -2
  115. package/dist/storage/mongo/PersistedBatch.js.map +1 -1
  116. package/dist/storage/mongo/db.d.ts +2 -2
  117. package/dist/storage/mongo/db.js.map +1 -1
  118. package/dist/storage/mongo/util.js.map +1 -1
  119. package/dist/sync/BroadcastIterable.js.map +1 -1
  120. package/dist/sync/LastValueSink.js.map +1 -1
  121. package/dist/sync/merge.js.map +1 -1
  122. package/dist/sync/safeRace.js.map +1 -1
  123. package/dist/sync/sync.d.ts +2 -2
  124. package/dist/sync/sync.js +5 -5
  125. package/dist/sync/sync.js.map +1 -1
  126. package/dist/sync/util.js.map +1 -1
  127. package/dist/system/CorePowerSyncSystem.d.ts +12 -7
  128. package/dist/system/CorePowerSyncSystem.js +26 -2
  129. package/dist/system/CorePowerSyncSystem.js.map +1 -1
  130. package/dist/system/system-index.d.ts +1 -0
  131. package/dist/system/system-index.js +2 -0
  132. package/dist/system/system-index.js.map +1 -0
  133. package/dist/util/Mutex.js.map +1 -1
  134. package/dist/util/PgManager.js.map +1 -1
  135. package/dist/util/alerting.d.ts +0 -2
  136. package/dist/util/alerting.js +0 -6
  137. package/dist/util/alerting.js.map +1 -1
  138. package/dist/util/config/collectors/config-collector.js +3 -3
  139. package/dist/util/config/collectors/config-collector.js.map +1 -1
  140. package/dist/util/config/collectors/impl/base64-config-collector.js.map +1 -1
  141. package/dist/util/config/collectors/impl/filesystem-config-collector.js +7 -5
  142. package/dist/util/config/collectors/impl/filesystem-config-collector.js.map +1 -1
  143. package/dist/util/config/compound-config-collector.js +4 -4
  144. package/dist/util/config/compound-config-collector.js.map +1 -1
  145. package/dist/util/config/sync-rules/impl/base64-sync-rules-collector.js.map +1 -1
  146. package/dist/util/config/sync-rules/impl/filesystem-sync-rules-collector.js.map +1 -1
  147. package/dist/util/config/sync-rules/impl/inline-sync-rules-collector.js.map +1 -1
  148. package/dist/util/config.js.map +1 -1
  149. package/dist/util/env.d.ts +1 -2
  150. package/dist/util/env.js +3 -2
  151. package/dist/util/env.js.map +1 -1
  152. package/dist/util/memory-tracking.js +2 -2
  153. package/dist/util/memory-tracking.js.map +1 -1
  154. package/dist/util/migration_lib.js.map +1 -1
  155. package/dist/util/pgwire_utils.js +2 -2
  156. package/dist/util/pgwire_utils.js.map +1 -1
  157. package/dist/util/populate_test_data.js.map +1 -1
  158. package/dist/util/secs.js.map +1 -1
  159. package/dist/util/utils.js +4 -4
  160. package/dist/util/utils.js.map +1 -1
  161. package/package.json +13 -10
  162. package/src/api/diagnostics.ts +5 -5
  163. package/src/api/schema.ts +1 -1
  164. package/src/auth/JwtPayload.ts +6 -2
  165. package/src/auth/KeyStore.ts +3 -9
  166. package/src/entry/cli-entry.ts +3 -4
  167. package/src/entry/commands/config-command.ts +1 -1
  168. package/src/entry/commands/migrate-action.ts +14 -6
  169. package/src/entry/commands/start-action.ts +1 -1
  170. package/src/entry/commands/teardown-action.ts +1 -1
  171. package/src/index.ts +5 -2
  172. package/src/locks/LockManager.ts +16 -0
  173. package/src/locks/MongoLocks.ts +142 -0
  174. package/src/locks/locks-index.ts +2 -0
  175. package/src/metrics/Metrics.ts +8 -8
  176. package/src/migrations/db/migrations/1684951997326-init.ts +3 -3
  177. package/src/migrations/db/migrations/1702295701188-sync-rule-state.ts +3 -3
  178. package/src/migrations/db/migrations/1711543888062-write-checkpoint-index.ts +2 -2
  179. package/src/migrations/definitions.ts +21 -0
  180. package/src/migrations/executor.ts +87 -0
  181. package/src/migrations/migrations-index.ts +3 -0
  182. package/src/migrations/migrations.ts +15 -11
  183. package/src/migrations/store/migration-store.ts +63 -0
  184. package/src/replication/WalConnection.ts +2 -2
  185. package/src/replication/WalStream.ts +24 -29
  186. package/src/replication/WalStreamManager.ts +14 -15
  187. package/src/replication/WalStreamRunner.ts +10 -10
  188. package/src/replication/util.ts +1 -1
  189. package/src/routes/auth.ts +22 -16
  190. package/src/routes/endpoints/admin.ts +237 -0
  191. package/src/routes/endpoints/checkpointing.ts +41 -0
  192. package/src/routes/endpoints/dev.ts +199 -0
  193. package/src/routes/endpoints/route-endpoints-index.ts +6 -0
  194. package/src/routes/{socket-route.ts → endpoints/socket-route.ts} +13 -16
  195. package/src/routes/endpoints/sync-rules.ts +227 -0
  196. package/src/routes/endpoints/sync-stream.ts +98 -0
  197. package/src/routes/hooks.ts +45 -0
  198. package/src/routes/route-register.ts +104 -0
  199. package/src/routes/router.ts +34 -6
  200. package/src/routes/routes-index.ts +5 -4
  201. package/src/runner/teardown.ts +9 -9
  202. package/src/storage/BucketStorage.ts +7 -2
  203. package/src/storage/ChecksumCache.ts +2 -2
  204. package/src/storage/MongoBucketStorage.ts +8 -8
  205. package/src/storage/SourceTable.ts +2 -2
  206. package/src/storage/mongo/MongoBucketBatch.ts +29 -22
  207. package/src/storage/mongo/MongoSyncBucketStorage.ts +3 -3
  208. package/src/storage/mongo/MongoSyncRulesLock.ts +3 -3
  209. package/src/storage/mongo/OperationBatch.ts +1 -1
  210. package/src/storage/mongo/PersistedBatch.ts +3 -3
  211. package/src/storage/mongo/db.ts +3 -4
  212. package/src/sync/sync.ts +11 -11
  213. package/src/sync/util.ts +2 -2
  214. package/src/system/CorePowerSyncSystem.ts +31 -10
  215. package/src/system/system-index.ts +1 -0
  216. package/src/util/alerting.ts +0 -8
  217. package/src/util/config/collectors/config-collector.ts +5 -3
  218. package/src/util/config/collectors/impl/filesystem-config-collector.ts +8 -6
  219. package/src/util/config/compound-config-collector.ts +4 -4
  220. package/src/util/env.ts +4 -2
  221. package/src/util/memory-tracking.ts +2 -2
  222. package/src/util/pgwire_utils.ts +3 -3
  223. package/src/util/utils.ts +5 -5
  224. package/test/src/auth.test.ts +4 -2
  225. package/test/src/data_storage.test.ts +181 -19
  226. package/test/src/env.ts +6 -6
  227. package/test/src/setup.ts +7 -0
  228. package/test/src/slow_tests.test.ts +45 -6
  229. package/test/src/sync.test.ts +6 -5
  230. package/test/tsconfig.json +1 -1
  231. package/tsconfig.json +5 -6
  232. package/tsconfig.tsbuildinfo +1 -1
  233. package/vitest.config.ts +1 -3
  234. package/dist/migrations/db/store.d.ts +0 -3
  235. package/dist/migrations/db/store.js +0 -10
  236. package/dist/migrations/db/store.js.map +0 -1
  237. package/dist/routes/admin.d.ts +0 -7
  238. package/dist/routes/admin.js.map +0 -1
  239. package/dist/routes/checkpointing.d.ts +0 -3
  240. package/dist/routes/checkpointing.js +0 -30
  241. package/dist/routes/checkpointing.js.map +0 -1
  242. package/dist/routes/dev.d.ts +0 -6
  243. package/dist/routes/dev.js.map +0 -1
  244. package/dist/routes/route-generators.d.ts +0 -15
  245. package/dist/routes/route-generators.js +0 -32
  246. package/dist/routes/route-generators.js.map +0 -1
  247. package/dist/routes/socket-route.d.ts +0 -2
  248. package/dist/routes/socket-route.js.map +0 -1
  249. package/dist/routes/sync-rules.d.ts +0 -6
  250. package/dist/routes/sync-rules.js.map +0 -1
  251. package/dist/routes/sync-stream.d.ts +0 -5
  252. package/dist/routes/sync-stream.js.map +0 -1
  253. package/src/migrations/db/store.ts +0 -11
  254. package/src/routes/admin.ts +0 -229
  255. package/src/routes/checkpointing.ts +0 -38
  256. package/src/routes/dev.ts +0 -194
  257. package/src/routes/route-generators.ts +0 -39
  258. package/src/routes/sync-rules.ts +0 -210
  259. package/src/routes/sync-stream.ts +0 -95
  260. package/test/src/sql_functions.test.ts +0 -254
  261. package/test/src/sql_operators.test.ts +0 -132
  262. package/test/src/sync_rules.test.ts +0 -1053
@@ -0,0 +1,1011 @@
1
+ import { router, schema } from '@powersync/lib-services-framework';
2
+ export declare const executeSql: router.Endpoint<{
3
+ sql: {
4
+ query: string;
5
+ args: (string | number | boolean)[];
6
+ };
7
+ connection_id?: string | undefined;
8
+ }, {
9
+ results: {
10
+ columns: string[];
11
+ rows: (string | number | boolean | null)[][];
12
+ };
13
+ success: boolean;
14
+ error?: string | undefined;
15
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
16
+ sql: {
17
+ query: string;
18
+ args: (string | number | boolean)[];
19
+ };
20
+ connection_id?: string | undefined;
21
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
22
+ sql: {
23
+ query: string;
24
+ args: (string | number | boolean)[];
25
+ };
26
+ connection_id?: string | undefined;
27
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
28
+ results: {
29
+ columns: string[];
30
+ rows: (string | number | boolean | null)[][];
31
+ };
32
+ success: boolean;
33
+ error?: string | undefined;
34
+ }>> & {
35
+ path: string;
36
+ method: router.HTTPMethod.POST;
37
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
38
+ authorized: boolean;
39
+ errors: string[];
40
+ } | {
41
+ authorized: boolean;
42
+ errors?: undefined;
43
+ };
44
+ validator: schema.MicroValidator<{
45
+ sql: {
46
+ query: string;
47
+ args: (string | number | boolean)[];
48
+ };
49
+ connection_id?: string | undefined;
50
+ }, string[]>;
51
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
52
+ sql: {
53
+ query: string;
54
+ args: (string | number | boolean)[];
55
+ };
56
+ connection_id?: string | undefined;
57
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
58
+ results: {
59
+ columns: string[];
60
+ rows: (string | number | boolean | null)[][];
61
+ };
62
+ success: boolean;
63
+ error?: string | undefined;
64
+ }>;
65
+ };
66
+ export declare const diagnostics: router.Endpoint<{
67
+ sync_rules_content?: boolean | undefined;
68
+ }, {
69
+ connections: {
70
+ errors: {
71
+ message: string;
72
+ level: "warning" | "fatal";
73
+ }[];
74
+ id: string;
75
+ postgres_uri: string;
76
+ connected: boolean;
77
+ }[];
78
+ active_sync_rules?: {
79
+ errors: {
80
+ level: "warning" | "fatal";
81
+ message: string;
82
+ }[];
83
+ connections: {
84
+ id: string;
85
+ tag: string;
86
+ slot_name: string;
87
+ initial_replication_done: boolean;
88
+ tables: {
89
+ schema: string;
90
+ name: string;
91
+ replication_id: string[];
92
+ data_queries: boolean;
93
+ parameter_queries: boolean;
94
+ errors: {
95
+ level: "warning" | "fatal";
96
+ message: string;
97
+ }[];
98
+ pattern?: string | undefined;
99
+ }[];
100
+ last_lsn?: string | undefined;
101
+ last_keepalive_ts?: string | undefined;
102
+ last_checkpoint_ts?: string | undefined;
103
+ replication_lag_bytes?: number | undefined;
104
+ }[];
105
+ content?: string | undefined;
106
+ } | undefined;
107
+ deploying_sync_rules?: {
108
+ errors: {
109
+ level: "warning" | "fatal";
110
+ message: string;
111
+ }[];
112
+ connections: {
113
+ id: string;
114
+ tag: string;
115
+ slot_name: string;
116
+ initial_replication_done: boolean;
117
+ tables: {
118
+ schema: string;
119
+ name: string;
120
+ replication_id: string[];
121
+ data_queries: boolean;
122
+ parameter_queries: boolean;
123
+ errors: {
124
+ level: "warning" | "fatal";
125
+ message: string;
126
+ }[];
127
+ pattern?: string | undefined;
128
+ }[];
129
+ last_lsn?: string | undefined;
130
+ last_keepalive_ts?: string | undefined;
131
+ last_checkpoint_ts?: string | undefined;
132
+ replication_lag_bytes?: number | undefined;
133
+ }[];
134
+ content?: string | undefined;
135
+ } | undefined;
136
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
137
+ sync_rules_content?: boolean | undefined;
138
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
139
+ sync_rules_content?: boolean | undefined;
140
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
141
+ connections: {
142
+ errors: {
143
+ message: string;
144
+ level: "warning" | "fatal";
145
+ }[];
146
+ id: string;
147
+ postgres_uri: string;
148
+ connected: boolean;
149
+ }[];
150
+ active_sync_rules?: {
151
+ errors: {
152
+ level: "warning" | "fatal";
153
+ message: string;
154
+ }[];
155
+ connections: {
156
+ id: string;
157
+ tag: string;
158
+ slot_name: string;
159
+ initial_replication_done: boolean;
160
+ tables: {
161
+ schema: string;
162
+ name: string;
163
+ replication_id: string[];
164
+ data_queries: boolean;
165
+ parameter_queries: boolean;
166
+ errors: {
167
+ level: "warning" | "fatal";
168
+ message: string;
169
+ }[];
170
+ pattern?: string | undefined;
171
+ }[];
172
+ last_lsn?: string | undefined;
173
+ last_keepalive_ts?: string | undefined;
174
+ last_checkpoint_ts?: string | undefined;
175
+ replication_lag_bytes?: number | undefined;
176
+ }[];
177
+ content?: string | undefined;
178
+ } | undefined;
179
+ deploying_sync_rules?: {
180
+ errors: {
181
+ level: "warning" | "fatal";
182
+ message: string;
183
+ }[];
184
+ connections: {
185
+ id: string;
186
+ tag: string;
187
+ slot_name: string;
188
+ initial_replication_done: boolean;
189
+ tables: {
190
+ schema: string;
191
+ name: string;
192
+ replication_id: string[];
193
+ data_queries: boolean;
194
+ parameter_queries: boolean;
195
+ errors: {
196
+ level: "warning" | "fatal";
197
+ message: string;
198
+ }[];
199
+ pattern?: string | undefined;
200
+ }[];
201
+ last_lsn?: string | undefined;
202
+ last_keepalive_ts?: string | undefined;
203
+ last_checkpoint_ts?: string | undefined;
204
+ replication_lag_bytes?: number | undefined;
205
+ }[];
206
+ content?: string | undefined;
207
+ } | undefined;
208
+ }>> & {
209
+ path: string;
210
+ method: router.HTTPMethod.POST;
211
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
212
+ authorized: boolean;
213
+ errors: string[];
214
+ } | {
215
+ authorized: boolean;
216
+ errors?: undefined;
217
+ };
218
+ validator: schema.MicroValidator<{
219
+ sync_rules_content?: boolean | undefined;
220
+ }, string[]>;
221
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
222
+ sync_rules_content?: boolean | undefined;
223
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
224
+ connections: {
225
+ errors: {
226
+ message: string;
227
+ level: "warning" | "fatal";
228
+ }[];
229
+ id: string;
230
+ postgres_uri: string;
231
+ connected: boolean;
232
+ }[];
233
+ active_sync_rules?: {
234
+ errors: {
235
+ level: "warning" | "fatal";
236
+ message: string;
237
+ }[];
238
+ connections: {
239
+ id: string;
240
+ tag: string;
241
+ slot_name: string;
242
+ initial_replication_done: boolean;
243
+ tables: {
244
+ schema: string;
245
+ name: string;
246
+ replication_id: string[];
247
+ data_queries: boolean;
248
+ parameter_queries: boolean;
249
+ errors: {
250
+ level: "warning" | "fatal";
251
+ message: string;
252
+ }[];
253
+ pattern?: string | undefined;
254
+ }[];
255
+ last_lsn?: string | undefined;
256
+ last_keepalive_ts?: string | undefined;
257
+ last_checkpoint_ts?: string | undefined;
258
+ replication_lag_bytes?: number | undefined;
259
+ }[];
260
+ content?: string | undefined;
261
+ } | undefined;
262
+ deploying_sync_rules?: {
263
+ errors: {
264
+ level: "warning" | "fatal";
265
+ message: string;
266
+ }[];
267
+ connections: {
268
+ id: string;
269
+ tag: string;
270
+ slot_name: string;
271
+ initial_replication_done: boolean;
272
+ tables: {
273
+ schema: string;
274
+ name: string;
275
+ replication_id: string[];
276
+ data_queries: boolean;
277
+ parameter_queries: boolean;
278
+ errors: {
279
+ level: "warning" | "fatal";
280
+ message: string;
281
+ }[];
282
+ pattern?: string | undefined;
283
+ }[];
284
+ last_lsn?: string | undefined;
285
+ last_keepalive_ts?: string | undefined;
286
+ last_checkpoint_ts?: string | undefined;
287
+ replication_lag_bytes?: number | undefined;
288
+ }[];
289
+ content?: string | undefined;
290
+ } | undefined;
291
+ }>;
292
+ };
293
+ export declare const getSchema: router.Endpoint<{}, {
294
+ connections: {
295
+ tag: string;
296
+ schemas: {
297
+ name: string;
298
+ tables: {
299
+ name: string;
300
+ columns: {
301
+ type: string;
302
+ name: string;
303
+ pg_type: string;
304
+ }[];
305
+ }[];
306
+ }[];
307
+ id?: string | undefined;
308
+ }[];
309
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
310
+ connections: {
311
+ tag: string;
312
+ schemas: {
313
+ name: string;
314
+ tables: {
315
+ name: string;
316
+ columns: {
317
+ type: string;
318
+ name: string;
319
+ pg_type: string;
320
+ }[];
321
+ }[];
322
+ }[];
323
+ id?: string | undefined;
324
+ }[];
325
+ }>> & {
326
+ path: string;
327
+ method: router.HTTPMethod.POST;
328
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
329
+ authorized: boolean;
330
+ errors: string[];
331
+ } | {
332
+ authorized: boolean;
333
+ errors?: undefined;
334
+ };
335
+ validator: schema.MicroValidator<{}, string[]>;
336
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
337
+ connections: {
338
+ tag: string;
339
+ schemas: {
340
+ name: string;
341
+ tables: {
342
+ name: string;
343
+ columns: {
344
+ type: string;
345
+ name: string;
346
+ pg_type: string;
347
+ }[];
348
+ }[];
349
+ }[];
350
+ id?: string | undefined;
351
+ }[];
352
+ }>;
353
+ };
354
+ export declare const reprocess: router.Endpoint<{}, {
355
+ connections: {
356
+ tag: string;
357
+ slot_name: string;
358
+ id?: string | undefined;
359
+ }[];
360
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
361
+ connections: {
362
+ tag: string;
363
+ slot_name: string;
364
+ id?: string | undefined;
365
+ }[];
366
+ }>> & {
367
+ path: string;
368
+ method: router.HTTPMethod.POST;
369
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
370
+ authorized: boolean;
371
+ errors: string[];
372
+ } | {
373
+ authorized: boolean;
374
+ errors?: undefined;
375
+ };
376
+ validator: schema.MicroValidator<{}, string[]>;
377
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
378
+ connections: {
379
+ tag: string;
380
+ slot_name: string;
381
+ id?: string | undefined;
382
+ }[];
383
+ }>;
384
+ };
385
+ export declare const validate: router.Endpoint<{
386
+ sync_rules: string;
387
+ }, {
388
+ errors: {
389
+ message: string;
390
+ level: "warning" | "fatal";
391
+ }[];
392
+ connections: {
393
+ id: string;
394
+ tag: string;
395
+ slot_name: string;
396
+ initial_replication_done: boolean;
397
+ tables: {
398
+ errors: {
399
+ message: string;
400
+ level: "warning" | "fatal";
401
+ }[];
402
+ name: string;
403
+ schema: string;
404
+ replication_id: string[];
405
+ data_queries: boolean;
406
+ parameter_queries: boolean;
407
+ pattern?: string | undefined;
408
+ }[];
409
+ last_checkpoint_ts?: string | undefined;
410
+ last_keepalive_ts?: string | undefined;
411
+ last_lsn?: string | undefined;
412
+ replication_lag_bytes?: number | undefined;
413
+ }[];
414
+ content?: string | undefined;
415
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
416
+ sync_rules: string;
417
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
418
+ sync_rules: string;
419
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
420
+ errors: {
421
+ message: string;
422
+ level: "warning" | "fatal";
423
+ }[];
424
+ connections: {
425
+ id: string;
426
+ tag: string;
427
+ slot_name: string;
428
+ initial_replication_done: boolean;
429
+ tables: {
430
+ errors: {
431
+ message: string;
432
+ level: "warning" | "fatal";
433
+ }[];
434
+ name: string;
435
+ schema: string;
436
+ replication_id: string[];
437
+ data_queries: boolean;
438
+ parameter_queries: boolean;
439
+ pattern?: string | undefined;
440
+ }[];
441
+ last_checkpoint_ts?: string | undefined;
442
+ last_keepalive_ts?: string | undefined;
443
+ last_lsn?: string | undefined;
444
+ replication_lag_bytes?: number | undefined;
445
+ }[];
446
+ content?: string | undefined;
447
+ }>> & {
448
+ path: string;
449
+ method: router.HTTPMethod.POST;
450
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
451
+ authorized: boolean;
452
+ errors: string[];
453
+ } | {
454
+ authorized: boolean;
455
+ errors?: undefined;
456
+ };
457
+ validator: schema.MicroValidator<{
458
+ sync_rules: string;
459
+ }, string[]>;
460
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
461
+ sync_rules: string;
462
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
463
+ errors: {
464
+ message: string;
465
+ level: "warning" | "fatal";
466
+ }[];
467
+ connections: {
468
+ id: string;
469
+ tag: string;
470
+ slot_name: string;
471
+ initial_replication_done: boolean;
472
+ tables: {
473
+ errors: {
474
+ message: string;
475
+ level: "warning" | "fatal";
476
+ }[];
477
+ name: string;
478
+ schema: string;
479
+ replication_id: string[];
480
+ data_queries: boolean;
481
+ parameter_queries: boolean;
482
+ pattern?: string | undefined;
483
+ }[];
484
+ last_checkpoint_ts?: string | undefined;
485
+ last_keepalive_ts?: string | undefined;
486
+ last_lsn?: string | undefined;
487
+ replication_lag_bytes?: number | undefined;
488
+ }[];
489
+ content?: string | undefined;
490
+ }>;
491
+ };
492
+ export declare const ADMIN_ROUTES: ((router.Endpoint<{
493
+ connection_id?: string | undefined;
494
+ }, {
495
+ credentials?: {
496
+ postgres_uri: string;
497
+ } | undefined;
498
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
499
+ connection_id?: string | undefined;
500
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
501
+ connection_id?: string | undefined;
502
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
503
+ credentials?: {
504
+ postgres_uri: string;
505
+ } | undefined;
506
+ }>> & {
507
+ path: string;
508
+ method: router.HTTPMethod.POST;
509
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
510
+ authorized: boolean;
511
+ errors: string[];
512
+ } | {
513
+ authorized: boolean;
514
+ errors?: undefined;
515
+ };
516
+ validator: schema.MicroValidator<{
517
+ connection_id?: string | undefined;
518
+ }, string[]>;
519
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
520
+ connection_id?: string | undefined;
521
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
522
+ credentials?: {
523
+ postgres_uri: string;
524
+ } | undefined;
525
+ }>;
526
+ }) | (router.Endpoint<{
527
+ sql: {
528
+ query: string;
529
+ args: (string | number | boolean)[];
530
+ };
531
+ connection_id?: string | undefined;
532
+ }, {
533
+ results: {
534
+ columns: string[];
535
+ rows: (string | number | boolean | null)[][];
536
+ };
537
+ success: boolean;
538
+ error?: string | undefined;
539
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
540
+ sql: {
541
+ query: string;
542
+ args: (string | number | boolean)[];
543
+ };
544
+ connection_id?: string | undefined;
545
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
546
+ sql: {
547
+ query: string;
548
+ args: (string | number | boolean)[];
549
+ };
550
+ connection_id?: string | undefined;
551
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
552
+ results: {
553
+ columns: string[];
554
+ rows: (string | number | boolean | null)[][];
555
+ };
556
+ success: boolean;
557
+ error?: string | undefined;
558
+ }>> & {
559
+ path: string;
560
+ method: router.HTTPMethod.POST;
561
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
562
+ authorized: boolean;
563
+ errors: string[];
564
+ } | {
565
+ authorized: boolean;
566
+ errors?: undefined;
567
+ };
568
+ validator: schema.MicroValidator<{
569
+ sql: {
570
+ query: string;
571
+ args: (string | number | boolean)[];
572
+ };
573
+ connection_id?: string | undefined;
574
+ }, string[]>;
575
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
576
+ sql: {
577
+ query: string;
578
+ args: (string | number | boolean)[];
579
+ };
580
+ connection_id?: string | undefined;
581
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
582
+ results: {
583
+ columns: string[];
584
+ rows: (string | number | boolean | null)[][];
585
+ };
586
+ success: boolean;
587
+ error?: string | undefined;
588
+ }>;
589
+ }) | (router.Endpoint<{
590
+ sync_rules_content?: boolean | undefined;
591
+ }, {
592
+ connections: {
593
+ errors: {
594
+ message: string;
595
+ level: "warning" | "fatal";
596
+ }[];
597
+ id: string;
598
+ postgres_uri: string;
599
+ connected: boolean;
600
+ }[];
601
+ active_sync_rules?: {
602
+ errors: {
603
+ level: "warning" | "fatal";
604
+ message: string;
605
+ }[];
606
+ connections: {
607
+ id: string;
608
+ tag: string;
609
+ slot_name: string;
610
+ initial_replication_done: boolean;
611
+ tables: {
612
+ schema: string;
613
+ name: string;
614
+ replication_id: string[];
615
+ data_queries: boolean;
616
+ parameter_queries: boolean;
617
+ errors: {
618
+ level: "warning" | "fatal";
619
+ message: string;
620
+ }[];
621
+ pattern?: string | undefined;
622
+ }[];
623
+ last_lsn?: string | undefined;
624
+ last_keepalive_ts?: string | undefined;
625
+ last_checkpoint_ts?: string | undefined;
626
+ replication_lag_bytes?: number | undefined;
627
+ }[];
628
+ content?: string | undefined;
629
+ } | undefined;
630
+ deploying_sync_rules?: {
631
+ errors: {
632
+ level: "warning" | "fatal";
633
+ message: string;
634
+ }[];
635
+ connections: {
636
+ id: string;
637
+ tag: string;
638
+ slot_name: string;
639
+ initial_replication_done: boolean;
640
+ tables: {
641
+ schema: string;
642
+ name: string;
643
+ replication_id: string[];
644
+ data_queries: boolean;
645
+ parameter_queries: boolean;
646
+ errors: {
647
+ level: "warning" | "fatal";
648
+ message: string;
649
+ }[];
650
+ pattern?: string | undefined;
651
+ }[];
652
+ last_lsn?: string | undefined;
653
+ last_keepalive_ts?: string | undefined;
654
+ last_checkpoint_ts?: string | undefined;
655
+ replication_lag_bytes?: number | undefined;
656
+ }[];
657
+ content?: string | undefined;
658
+ } | undefined;
659
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
660
+ sync_rules_content?: boolean | undefined;
661
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
662
+ sync_rules_content?: boolean | undefined;
663
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
664
+ connections: {
665
+ errors: {
666
+ message: string;
667
+ level: "warning" | "fatal";
668
+ }[];
669
+ id: string;
670
+ postgres_uri: string;
671
+ connected: boolean;
672
+ }[];
673
+ active_sync_rules?: {
674
+ errors: {
675
+ level: "warning" | "fatal";
676
+ message: string;
677
+ }[];
678
+ connections: {
679
+ id: string;
680
+ tag: string;
681
+ slot_name: string;
682
+ initial_replication_done: boolean;
683
+ tables: {
684
+ schema: string;
685
+ name: string;
686
+ replication_id: string[];
687
+ data_queries: boolean;
688
+ parameter_queries: boolean;
689
+ errors: {
690
+ level: "warning" | "fatal";
691
+ message: string;
692
+ }[];
693
+ pattern?: string | undefined;
694
+ }[];
695
+ last_lsn?: string | undefined;
696
+ last_keepalive_ts?: string | undefined;
697
+ last_checkpoint_ts?: string | undefined;
698
+ replication_lag_bytes?: number | undefined;
699
+ }[];
700
+ content?: string | undefined;
701
+ } | undefined;
702
+ deploying_sync_rules?: {
703
+ errors: {
704
+ level: "warning" | "fatal";
705
+ message: string;
706
+ }[];
707
+ connections: {
708
+ id: string;
709
+ tag: string;
710
+ slot_name: string;
711
+ initial_replication_done: boolean;
712
+ tables: {
713
+ schema: string;
714
+ name: string;
715
+ replication_id: string[];
716
+ data_queries: boolean;
717
+ parameter_queries: boolean;
718
+ errors: {
719
+ level: "warning" | "fatal";
720
+ message: string;
721
+ }[];
722
+ pattern?: string | undefined;
723
+ }[];
724
+ last_lsn?: string | undefined;
725
+ last_keepalive_ts?: string | undefined;
726
+ last_checkpoint_ts?: string | undefined;
727
+ replication_lag_bytes?: number | undefined;
728
+ }[];
729
+ content?: string | undefined;
730
+ } | undefined;
731
+ }>> & {
732
+ path: string;
733
+ method: router.HTTPMethod.POST;
734
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
735
+ authorized: boolean;
736
+ errors: string[];
737
+ } | {
738
+ authorized: boolean;
739
+ errors?: undefined;
740
+ };
741
+ validator: schema.MicroValidator<{
742
+ sync_rules_content?: boolean | undefined;
743
+ }, string[]>;
744
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
745
+ sync_rules_content?: boolean | undefined;
746
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
747
+ connections: {
748
+ errors: {
749
+ message: string;
750
+ level: "warning" | "fatal";
751
+ }[];
752
+ id: string;
753
+ postgres_uri: string;
754
+ connected: boolean;
755
+ }[];
756
+ active_sync_rules?: {
757
+ errors: {
758
+ level: "warning" | "fatal";
759
+ message: string;
760
+ }[];
761
+ connections: {
762
+ id: string;
763
+ tag: string;
764
+ slot_name: string;
765
+ initial_replication_done: boolean;
766
+ tables: {
767
+ schema: string;
768
+ name: string;
769
+ replication_id: string[];
770
+ data_queries: boolean;
771
+ parameter_queries: boolean;
772
+ errors: {
773
+ level: "warning" | "fatal";
774
+ message: string;
775
+ }[];
776
+ pattern?: string | undefined;
777
+ }[];
778
+ last_lsn?: string | undefined;
779
+ last_keepalive_ts?: string | undefined;
780
+ last_checkpoint_ts?: string | undefined;
781
+ replication_lag_bytes?: number | undefined;
782
+ }[];
783
+ content?: string | undefined;
784
+ } | undefined;
785
+ deploying_sync_rules?: {
786
+ errors: {
787
+ level: "warning" | "fatal";
788
+ message: string;
789
+ }[];
790
+ connections: {
791
+ id: string;
792
+ tag: string;
793
+ slot_name: string;
794
+ initial_replication_done: boolean;
795
+ tables: {
796
+ schema: string;
797
+ name: string;
798
+ replication_id: string[];
799
+ data_queries: boolean;
800
+ parameter_queries: boolean;
801
+ errors: {
802
+ level: "warning" | "fatal";
803
+ message: string;
804
+ }[];
805
+ pattern?: string | undefined;
806
+ }[];
807
+ last_lsn?: string | undefined;
808
+ last_keepalive_ts?: string | undefined;
809
+ last_checkpoint_ts?: string | undefined;
810
+ replication_lag_bytes?: number | undefined;
811
+ }[];
812
+ content?: string | undefined;
813
+ } | undefined;
814
+ }>;
815
+ }) | (router.Endpoint<{}, {
816
+ connections: {
817
+ tag: string;
818
+ schemas: {
819
+ name: string;
820
+ tables: {
821
+ name: string;
822
+ columns: {
823
+ type: string;
824
+ name: string;
825
+ pg_type: string;
826
+ }[];
827
+ }[];
828
+ }[];
829
+ id?: string | undefined;
830
+ }[];
831
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
832
+ connections: {
833
+ tag: string;
834
+ schemas: {
835
+ name: string;
836
+ tables: {
837
+ name: string;
838
+ columns: {
839
+ type: string;
840
+ name: string;
841
+ pg_type: string;
842
+ }[];
843
+ }[];
844
+ }[];
845
+ id?: string | undefined;
846
+ }[];
847
+ }>> & {
848
+ path: string;
849
+ method: router.HTTPMethod.POST;
850
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
851
+ authorized: boolean;
852
+ errors: string[];
853
+ } | {
854
+ authorized: boolean;
855
+ errors?: undefined;
856
+ };
857
+ validator: schema.MicroValidator<{}, string[]>;
858
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
859
+ connections: {
860
+ tag: string;
861
+ schemas: {
862
+ name: string;
863
+ tables: {
864
+ name: string;
865
+ columns: {
866
+ type: string;
867
+ name: string;
868
+ pg_type: string;
869
+ }[];
870
+ }[];
871
+ }[];
872
+ id?: string | undefined;
873
+ }[];
874
+ }>;
875
+ }) | (router.Endpoint<{}, {
876
+ connections: {
877
+ tag: string;
878
+ slot_name: string;
879
+ id?: string | undefined;
880
+ }[];
881
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
882
+ connections: {
883
+ tag: string;
884
+ slot_name: string;
885
+ id?: string | undefined;
886
+ }[];
887
+ }>> & {
888
+ path: string;
889
+ method: router.HTTPMethod.POST;
890
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
891
+ authorized: boolean;
892
+ errors: string[];
893
+ } | {
894
+ authorized: boolean;
895
+ errors?: undefined;
896
+ };
897
+ validator: schema.MicroValidator<{}, string[]>;
898
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{}, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
899
+ connections: {
900
+ tag: string;
901
+ slot_name: string;
902
+ id?: string | undefined;
903
+ }[];
904
+ }>;
905
+ }) | (router.Endpoint<{
906
+ sync_rules: string;
907
+ }, {
908
+ errors: {
909
+ message: string;
910
+ level: "warning" | "fatal";
911
+ }[];
912
+ connections: {
913
+ id: string;
914
+ tag: string;
915
+ slot_name: string;
916
+ initial_replication_done: boolean;
917
+ tables: {
918
+ errors: {
919
+ message: string;
920
+ level: "warning" | "fatal";
921
+ }[];
922
+ name: string;
923
+ schema: string;
924
+ replication_id: string[];
925
+ data_queries: boolean;
926
+ parameter_queries: boolean;
927
+ pattern?: string | undefined;
928
+ }[];
929
+ last_checkpoint_ts?: string | undefined;
930
+ last_keepalive_ts?: string | undefined;
931
+ last_lsn?: string | undefined;
932
+ replication_lag_bytes?: number | undefined;
933
+ }[];
934
+ content?: string | undefined;
935
+ }, import("../router.js").Context, import("../router.js").RequestEndpointHandlerPayload<{
936
+ sync_rules: string;
937
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, router.EndpointHandler<import("../router.js").RequestEndpointHandlerPayload<{
938
+ sync_rules: string;
939
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>, {
940
+ errors: {
941
+ message: string;
942
+ level: "warning" | "fatal";
943
+ }[];
944
+ connections: {
945
+ id: string;
946
+ tag: string;
947
+ slot_name: string;
948
+ initial_replication_done: boolean;
949
+ tables: {
950
+ errors: {
951
+ message: string;
952
+ level: "warning" | "fatal";
953
+ }[];
954
+ name: string;
955
+ schema: string;
956
+ replication_id: string[];
957
+ data_queries: boolean;
958
+ parameter_queries: boolean;
959
+ pattern?: string | undefined;
960
+ }[];
961
+ last_checkpoint_ts?: string | undefined;
962
+ last_keepalive_ts?: string | undefined;
963
+ last_lsn?: string | undefined;
964
+ replication_lag_bytes?: number | undefined;
965
+ }[];
966
+ content?: string | undefined;
967
+ }>> & {
968
+ path: string;
969
+ method: router.HTTPMethod.POST;
970
+ authorize: (payload: import("../router.js").RequestEndpointHandlerPayload) => {
971
+ authorized: boolean;
972
+ errors: string[];
973
+ } | {
974
+ authorized: boolean;
975
+ errors?: undefined;
976
+ };
977
+ validator: schema.MicroValidator<{
978
+ sync_rules: string;
979
+ }, string[]>;
980
+ handler: (payload: import("../router.js").RequestEndpointHandlerPayload<{
981
+ sync_rules: string;
982
+ }, import("../router.js").Context, import("../router.js").BasicRouterRequest>) => Promise<{
983
+ errors: {
984
+ message: string;
985
+ level: "warning" | "fatal";
986
+ }[];
987
+ connections: {
988
+ id: string;
989
+ tag: string;
990
+ slot_name: string;
991
+ initial_replication_done: boolean;
992
+ tables: {
993
+ errors: {
994
+ message: string;
995
+ level: "warning" | "fatal";
996
+ }[];
997
+ name: string;
998
+ schema: string;
999
+ replication_id: string[];
1000
+ data_queries: boolean;
1001
+ parameter_queries: boolean;
1002
+ pattern?: string | undefined;
1003
+ }[];
1004
+ last_checkpoint_ts?: string | undefined;
1005
+ last_keepalive_ts?: string | undefined;
1006
+ last_lsn?: string | undefined;
1007
+ replication_lag_bytes?: number | undefined;
1008
+ }[];
1009
+ content?: string | undefined;
1010
+ }>;
1011
+ }))[];