@syncular/core 0.1.2 → 0.2.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 (231) hide show
  1. package/README.md +5 -19
  2. package/dist/blob-ref.d.ts +21 -0
  3. package/dist/blob-ref.js +97 -0
  4. package/dist/bytes.d.ts +45 -0
  5. package/dist/bytes.js +242 -0
  6. package/dist/canonical-json.d.ts +10 -0
  7. package/dist/canonical-json.js +18 -0
  8. package/dist/constants.d.ts +5 -0
  9. package/dist/constants.js +5 -0
  10. package/dist/crypto.d.ts +60 -0
  11. package/dist/crypto.js +251 -0
  12. package/dist/errors.d.ts +14 -0
  13. package/dist/errors.js +17 -0
  14. package/dist/frames.d.ts +24 -0
  15. package/dist/frames.js +42 -0
  16. package/dist/index.d.ts +18 -26
  17. package/dist/index.js +18 -43
  18. package/dist/message.d.ts +157 -0
  19. package/dist/message.js +786 -0
  20. package/dist/realtime.d.ts +92 -0
  21. package/dist/realtime.js +222 -0
  22. package/dist/render.d.ts +22 -0
  23. package/dist/render.js +273 -0
  24. package/dist/row-codec.d.ts +39 -0
  25. package/dist/row-codec.js +176 -0
  26. package/dist/segment.d.ts +18 -0
  27. package/dist/segment.js +105 -0
  28. package/dist/stream.d.ts +20 -0
  29. package/dist/stream.js +102 -0
  30. package/package.json +7 -59
  31. package/src/blob-ref.ts +135 -0
  32. package/src/bytes.ts +301 -0
  33. package/src/canonical-json.ts +20 -0
  34. package/src/constants.ts +7 -0
  35. package/src/crypto.ts +335 -0
  36. package/src/errors.ts +18 -0
  37. package/src/frames.ts +47 -0
  38. package/src/index.ts +18 -43
  39. package/src/message.ts +1024 -0
  40. package/src/realtime.ts +340 -0
  41. package/src/render.ts +325 -0
  42. package/src/row-codec.ts +265 -0
  43. package/src/segment.ts +150 -0
  44. package/src/stream.ts +128 -0
  45. package/dist/blobs.d.ts +0 -153
  46. package/dist/blobs.d.ts.map +0 -1
  47. package/dist/blobs.js +0 -47
  48. package/dist/blobs.js.map +0 -1
  49. package/dist/column-codecs.d.ts +0 -59
  50. package/dist/column-codecs.d.ts.map +0 -1
  51. package/dist/column-codecs.js +0 -159
  52. package/dist/column-codecs.js.map +0 -1
  53. package/dist/conflict.d.ts +0 -22
  54. package/dist/conflict.d.ts.map +0 -1
  55. package/dist/conflict.js +0 -81
  56. package/dist/conflict.js.map +0 -1
  57. package/dist/database.d.ts +0 -7
  58. package/dist/database.d.ts.map +0 -1
  59. package/dist/database.js +0 -14
  60. package/dist/database.js.map +0 -1
  61. package/dist/dialect.d.ts +0 -7
  62. package/dist/dialect.d.ts.map +0 -1
  63. package/dist/dialect.js +0 -2
  64. package/dist/dialect.js.map +0 -1
  65. package/dist/error-responses.d.ts +0 -393
  66. package/dist/error-responses.d.ts.map +0 -1
  67. package/dist/error-responses.js +0 -393
  68. package/dist/error-responses.js.map +0 -1
  69. package/dist/http/api-client.d.ts +0 -11
  70. package/dist/http/api-client.d.ts.map +0 -1
  71. package/dist/http/api-client.js +0 -30
  72. package/dist/http/api-client.js.map +0 -1
  73. package/dist/http/blob.d.ts +0 -6
  74. package/dist/http/blob.d.ts.map +0 -1
  75. package/dist/http/blob.js +0 -46
  76. package/dist/http/blob.js.map +0 -1
  77. package/dist/http/generated/api.d.ts +0 -5241
  78. package/dist/http/generated/api.d.ts.map +0 -1
  79. package/dist/http/generated/api.js +0 -6
  80. package/dist/http/generated/api.js.map +0 -1
  81. package/dist/http/index.d.ts +0 -18
  82. package/dist/http/index.d.ts.map +0 -1
  83. package/dist/http/index.js +0 -212
  84. package/dist/http/index.js.map +0 -1
  85. package/dist/http/shared.d.ts +0 -45
  86. package/dist/http/shared.d.ts.map +0 -1
  87. package/dist/http/shared.js +0 -122
  88. package/dist/http/shared.js.map +0 -1
  89. package/dist/http/transport-client.d.ts +0 -31
  90. package/dist/http/transport-client.d.ts.map +0 -1
  91. package/dist/http/transport-client.js +0 -193
  92. package/dist/http/transport-client.js.map +0 -1
  93. package/dist/index.d.ts.map +0 -1
  94. package/dist/index.js.map +0 -1
  95. package/dist/kysely-column-codecs.d.ts +0 -31
  96. package/dist/kysely-column-codecs.d.ts.map +0 -1
  97. package/dist/kysely-column-codecs.js +0 -452
  98. package/dist/kysely-column-codecs.js.map +0 -1
  99. package/dist/logger.d.ts +0 -29
  100. package/dist/logger.d.ts.map +0 -1
  101. package/dist/logger.js +0 -26
  102. package/dist/logger.js.map +0 -1
  103. package/dist/proxy/index.d.ts +0 -54
  104. package/dist/proxy/index.d.ts.map +0 -1
  105. package/dist/proxy/index.js +0 -7
  106. package/dist/proxy/index.js.map +0 -1
  107. package/dist/schemas/blobs.d.ts +0 -82
  108. package/dist/schemas/blobs.d.ts.map +0 -1
  109. package/dist/schemas/blobs.js +0 -64
  110. package/dist/schemas/blobs.js.map +0 -1
  111. package/dist/schemas/common.d.ts +0 -100
  112. package/dist/schemas/common.d.ts.map +0 -1
  113. package/dist/schemas/common.js +0 -64
  114. package/dist/schemas/common.js.map +0 -1
  115. package/dist/schemas/index.d.ts +0 -7
  116. package/dist/schemas/index.d.ts.map +0 -1
  117. package/dist/schemas/index.js +0 -7
  118. package/dist/schemas/index.js.map +0 -1
  119. package/dist/schemas/sync.d.ts +0 -1065
  120. package/dist/schemas/sync.d.ts.map +0 -1
  121. package/dist/schemas/sync.js +0 -361
  122. package/dist/schemas/sync.js.map +0 -1
  123. package/dist/scopes/index.d.ts +0 -113
  124. package/dist/scopes/index.d.ts.map +0 -1
  125. package/dist/scopes/index.js +0 -103
  126. package/dist/scopes/index.js.map +0 -1
  127. package/dist/sentry.d.ts +0 -31
  128. package/dist/sentry.d.ts.map +0 -1
  129. package/dist/sentry.js +0 -147
  130. package/dist/sentry.js.map +0 -1
  131. package/dist/snapshot-chunks.d.ts +0 -110
  132. package/dist/snapshot-chunks.d.ts.map +0 -1
  133. package/dist/snapshot-chunks.js +0 -682
  134. package/dist/snapshot-chunks.js.map +0 -1
  135. package/dist/sync-packs.d.ts +0 -33
  136. package/dist/sync-packs.d.ts.map +0 -1
  137. package/dist/sync-packs.js +0 -821
  138. package/dist/sync-packs.js.map +0 -1
  139. package/dist/telemetry.d.ts +0 -114
  140. package/dist/telemetry.d.ts.map +0 -1
  141. package/dist/telemetry.js +0 -114
  142. package/dist/telemetry.js.map +0 -1
  143. package/dist/transforms.d.ts +0 -146
  144. package/dist/transforms.d.ts.map +0 -1
  145. package/dist/transforms.js +0 -155
  146. package/dist/transforms.js.map +0 -1
  147. package/dist/types.d.ts +0 -210
  148. package/dist/types.d.ts.map +0 -1
  149. package/dist/types.js +0 -20
  150. package/dist/types.js.map +0 -1
  151. package/dist/utils/bytes.d.ts +0 -4
  152. package/dist/utils/bytes.d.ts.map +0 -1
  153. package/dist/utils/bytes.js +0 -66
  154. package/dist/utils/bytes.js.map +0 -1
  155. package/dist/utils/compression.d.ts +0 -22
  156. package/dist/utils/compression.d.ts.map +0 -1
  157. package/dist/utils/compression.js +0 -129
  158. package/dist/utils/compression.js.map +0 -1
  159. package/dist/utils/crypto.d.ts +0 -13
  160. package/dist/utils/crypto.d.ts.map +0 -1
  161. package/dist/utils/crypto.js +0 -107
  162. package/dist/utils/crypto.js.map +0 -1
  163. package/dist/utils/id.d.ts +0 -3
  164. package/dist/utils/id.d.ts.map +0 -1
  165. package/dist/utils/id.js +0 -25
  166. package/dist/utils/id.js.map +0 -1
  167. package/dist/utils/index.d.ts +0 -10
  168. package/dist/utils/index.d.ts.map +0 -1
  169. package/dist/utils/index.js +0 -10
  170. package/dist/utils/index.js.map +0 -1
  171. package/dist/utils/internal-runtime.d.ts +0 -16
  172. package/dist/utils/internal-runtime.d.ts.map +0 -1
  173. package/dist/utils/internal-runtime.js +0 -14
  174. package/dist/utils/internal-runtime.js.map +0 -1
  175. package/dist/utils/object.d.ts +0 -2
  176. package/dist/utils/object.d.ts.map +0 -1
  177. package/dist/utils/object.js +0 -4
  178. package/dist/utils/object.js.map +0 -1
  179. package/dist/utils/realtime-change-index.d.ts +0 -9
  180. package/dist/utils/realtime-change-index.d.ts.map +0 -1
  181. package/dist/utils/realtime-change-index.js +0 -36
  182. package/dist/utils/realtime-change-index.js.map +0 -1
  183. package/dist/utils/realtime-connection-registry.d.ts +0 -40
  184. package/dist/utils/realtime-connection-registry.d.ts.map +0 -1
  185. package/dist/utils/realtime-connection-registry.js +0 -237
  186. package/dist/utils/realtime-connection-registry.js.map +0 -1
  187. package/dist/utils/table-registry.d.ts +0 -10
  188. package/dist/utils/table-registry.d.ts.map +0 -1
  189. package/dist/utils/table-registry.js +0 -54
  190. package/dist/utils/table-registry.js.map +0 -1
  191. package/dist/utils/url.d.ts +0 -3
  192. package/dist/utils/url.d.ts.map +0 -1
  193. package/dist/utils/url.js +0 -20
  194. package/dist/utils/url.js.map +0 -1
  195. package/src/blobs.ts +0 -219
  196. package/src/column-codecs.ts +0 -262
  197. package/src/conflict.ts +0 -92
  198. package/src/database.ts +0 -21
  199. package/src/dialect.ts +0 -8
  200. package/src/error-responses.ts +0 -423
  201. package/src/http/api-client.ts +0 -39
  202. package/src/http/blob.ts +0 -95
  203. package/src/http/generated/api.ts +0 -5241
  204. package/src/http/index.ts +0 -365
  205. package/src/http/shared.ts +0 -220
  206. package/src/http/transport-client.ts +0 -314
  207. package/src/kysely-column-codecs.ts +0 -585
  208. package/src/logger.ts +0 -38
  209. package/src/proxy/index.ts +0 -57
  210. package/src/schemas/blobs.ts +0 -110
  211. package/src/schemas/common.ts +0 -89
  212. package/src/schemas/index.ts +0 -7
  213. package/src/schemas/sync.ts +0 -517
  214. package/src/scopes/index.ts +0 -237
  215. package/src/sentry.ts +0 -200
  216. package/src/snapshot-chunks.ts +0 -964
  217. package/src/sync-packs.ts +0 -1096
  218. package/src/telemetry.ts +0 -243
  219. package/src/transforms.ts +0 -256
  220. package/src/types.ts +0 -267
  221. package/src/utils/bytes.ts +0 -75
  222. package/src/utils/compression.ts +0 -187
  223. package/src/utils/crypto.ts +0 -146
  224. package/src/utils/id.ts +0 -34
  225. package/src/utils/index.ts +0 -9
  226. package/src/utils/internal-runtime.ts +0 -39
  227. package/src/utils/object.ts +0 -3
  228. package/src/utils/realtime-change-index.ts +0 -44
  229. package/src/utils/realtime-connection-registry.ts +0 -286
  230. package/src/utils/table-registry.ts +0 -67
  231. package/src/utils/url.ts +0 -29
@@ -1,1065 +0,0 @@
1
- /**
2
- * @syncular/core - Sync protocol Zod schemas
3
- *
4
- * These schemas define the sync protocol types and can be used for:
5
- * - Runtime validation
6
- * - OpenAPI spec generation
7
- * - Type inference
8
- */
9
- import { z } from 'zod';
10
- export declare const SyncOpSchema: z.ZodEnum<{
11
- delete: "delete";
12
- upsert: "upsert";
13
- }>;
14
- export type SyncOp = z.infer<typeof SyncOpSchema>;
15
- /**
16
- * Scope values in a subscription request (can be arrays)
17
- */
18
- export declare const ScopeValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
19
- export declare const SYNC_AUTH_LEASE_VERSION = 1;
20
- export declare const SYNC_AUTH_LEASE_PROTOCOL_VERSION = 1;
21
- export declare const SYNC_AUTH_LEASE_ALG_ES256 = "ES256";
22
- export declare const SYNC_AUTH_LEASE_TYP = "syncular-auth-lease+jws";
23
- export declare const SYNC_AUTH_LEASE_CODE_MISSING = "sync.auth_lease_missing";
24
- export declare const SYNC_AUTH_LEASE_CODE_INVALID = "sync.auth_lease_invalid";
25
- export declare const SYNC_AUTH_LEASE_CODE_EXPIRED = "sync.auth_lease_expired";
26
- export declare const SYNC_AUTH_LEASE_CODE_SCHEMA_MISMATCH = "sync.auth_lease_schema_mismatch";
27
- export declare const SYNC_AUTH_LEASE_CODE_SCOPE_MISMATCH = "sync.auth_lease_scope_mismatch";
28
- export declare const SYNC_AUTH_LEASE_CODE_SCOPE_REVOKED = "sync.auth_lease_scope_revoked";
29
- export declare const SYNC_AUTH_LEASE_CODE_BUSINESS_REJECTED = "sync.auth_lease_business_rejected";
30
- export declare const SyncAuthLeaseProtectedHeaderSchema: z.ZodObject<{
31
- alg: z.ZodLiteral<"ES256">;
32
- kid: z.ZodString;
33
- typ: z.ZodLiteral<"syncular-auth-lease+jws">;
34
- }, z.core.$strip>;
35
- export type SyncAuthLeaseProtectedHeader = z.infer<typeof SyncAuthLeaseProtectedHeaderSchema>;
36
- export declare const SyncAuthLeaseCapabilitiesSchema: z.ZodObject<{
37
- allowBlobs: z.ZodBoolean;
38
- allowCrdt: z.ZodBoolean;
39
- allowEncryptedFields: z.ZodBoolean;
40
- }, z.core.$strip>;
41
- export type SyncAuthLeaseCapabilities = z.infer<typeof SyncAuthLeaseCapabilitiesSchema>;
42
- export declare const SyncAuthLeaseScopeSchema: z.ZodObject<{
43
- subscriptionId: z.ZodString;
44
- table: z.ZodString;
45
- values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
46
- operations: z.ZodArray<z.ZodEnum<{
47
- delete: "delete";
48
- upsert: "upsert";
49
- }>>;
50
- }, z.core.$strip>;
51
- export type SyncAuthLeaseScope = z.infer<typeof SyncAuthLeaseScopeSchema>;
52
- export declare const SyncAuthLeasePayloadSchema: z.ZodObject<{
53
- version: z.ZodLiteral<1>;
54
- leaseId: z.ZodString;
55
- issuer: z.ZodString;
56
- audience: z.ZodString;
57
- actorId: z.ZodString;
58
- subject: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
59
- schemaVersion: z.ZodNumber;
60
- protocolVersion: z.ZodLiteral<1>;
61
- issuedAtMs: z.ZodNumber;
62
- notBeforeMs: z.ZodNumber;
63
- expiresAtMs: z.ZodNumber;
64
- maxClockSkewMs: z.ZodNumber;
65
- scopes: z.ZodArray<z.ZodObject<{
66
- subscriptionId: z.ZodString;
67
- table: z.ZodString;
68
- values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
69
- operations: z.ZodArray<z.ZodEnum<{
70
- delete: "delete";
71
- upsert: "upsert";
72
- }>>;
73
- }, z.core.$strip>>;
74
- capabilities: z.ZodObject<{
75
- allowBlobs: z.ZodBoolean;
76
- allowCrdt: z.ZodBoolean;
77
- allowEncryptedFields: z.ZodBoolean;
78
- }, z.core.$strip>;
79
- }, z.core.$strip>;
80
- export type SyncAuthLeasePayload = z.infer<typeof SyncAuthLeasePayloadSchema>;
81
- export declare const SyncAuthLeaseIssueRequestSchema: z.ZodObject<{
82
- schemaVersion: z.ZodNumber;
83
- ttlMs: z.ZodOptional<z.ZodNumber>;
84
- scopes: z.ZodArray<z.ZodObject<{
85
- subscriptionId: z.ZodString;
86
- table: z.ZodString;
87
- values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
88
- operations: z.ZodArray<z.ZodEnum<{
89
- delete: "delete";
90
- upsert: "upsert";
91
- }>>;
92
- }, z.core.$strip>>;
93
- }, z.core.$strip>;
94
- export type SyncAuthLeaseIssueRequest = z.infer<typeof SyncAuthLeaseIssueRequestSchema>;
95
- export declare const SyncAuthLeaseIssueResponseSchema: z.ZodObject<{
96
- ok: z.ZodLiteral<true>;
97
- token: z.ZodString;
98
- protectedHeader: z.ZodObject<{
99
- alg: z.ZodLiteral<"ES256">;
100
- kid: z.ZodString;
101
- typ: z.ZodLiteral<"syncular-auth-lease+jws">;
102
- }, z.core.$strip>;
103
- payload: z.ZodObject<{
104
- version: z.ZodLiteral<1>;
105
- leaseId: z.ZodString;
106
- issuer: z.ZodString;
107
- audience: z.ZodString;
108
- actorId: z.ZodString;
109
- subject: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
110
- schemaVersion: z.ZodNumber;
111
- protocolVersion: z.ZodLiteral<1>;
112
- issuedAtMs: z.ZodNumber;
113
- notBeforeMs: z.ZodNumber;
114
- expiresAtMs: z.ZodNumber;
115
- maxClockSkewMs: z.ZodNumber;
116
- scopes: z.ZodArray<z.ZodObject<{
117
- subscriptionId: z.ZodString;
118
- table: z.ZodString;
119
- values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
120
- operations: z.ZodArray<z.ZodEnum<{
121
- delete: "delete";
122
- upsert: "upsert";
123
- }>>;
124
- }, z.core.$strip>>;
125
- capabilities: z.ZodObject<{
126
- allowBlobs: z.ZodBoolean;
127
- allowCrdt: z.ZodBoolean;
128
- allowEncryptedFields: z.ZodBoolean;
129
- }, z.core.$strip>;
130
- }, z.core.$strip>;
131
- }, z.core.$strip>;
132
- export type SyncAuthLeaseIssueResponse = z.infer<typeof SyncAuthLeaseIssueResponseSchema>;
133
- export declare const SyncOperationSchema: z.ZodObject<{
134
- table: z.ZodString;
135
- row_id: z.ZodString;
136
- op: z.ZodEnum<{
137
- delete: "delete";
138
- upsert: "upsert";
139
- }>;
140
- payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
141
- base_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
142
- }, z.core.$strip>;
143
- export type SyncOperation = z.infer<typeof SyncOperationSchema>;
144
- export declare const SyncAuthLeaseProvenanceSchema: z.ZodObject<{
145
- leaseId: z.ZodString;
146
- leaseExpiresAtMs: z.ZodNumber;
147
- leaseStatusAtEnqueue: z.ZodString;
148
- leaseScopeSummaryJson: z.ZodOptional<z.ZodString>;
149
- leaseToken: z.ZodOptional<z.ZodString>;
150
- }, z.core.$strip>;
151
- export type SyncAuthLeaseProvenance = z.infer<typeof SyncAuthLeaseProvenanceSchema>;
152
- export declare const SyncPushRequestSchema: z.ZodObject<{
153
- clientId: z.ZodString;
154
- clientCommitId: z.ZodString;
155
- operations: z.ZodArray<z.ZodObject<{
156
- table: z.ZodString;
157
- row_id: z.ZodString;
158
- op: z.ZodEnum<{
159
- delete: "delete";
160
- upsert: "upsert";
161
- }>;
162
- payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
- base_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
164
- }, z.core.$strip>>;
165
- schemaVersion: z.ZodNumber;
166
- authLease: z.ZodOptional<z.ZodObject<{
167
- leaseId: z.ZodString;
168
- leaseExpiresAtMs: z.ZodNumber;
169
- leaseStatusAtEnqueue: z.ZodString;
170
- leaseScopeSummaryJson: z.ZodOptional<z.ZodString>;
171
- leaseToken: z.ZodOptional<z.ZodString>;
172
- }, z.core.$strip>>;
173
- }, z.core.$strip>;
174
- export type SyncPushRequest = z.infer<typeof SyncPushRequestSchema>;
175
- export declare const SyncPushCommitRequestSchema: z.ZodObject<{
176
- clientCommitId: z.ZodString;
177
- operations: z.ZodArray<z.ZodObject<{
178
- table: z.ZodString;
179
- row_id: z.ZodString;
180
- op: z.ZodEnum<{
181
- delete: "delete";
182
- upsert: "upsert";
183
- }>;
184
- payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
185
- base_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
186
- }, z.core.$strip>>;
187
- schemaVersion: z.ZodNumber;
188
- authLease: z.ZodOptional<z.ZodObject<{
189
- leaseId: z.ZodString;
190
- leaseExpiresAtMs: z.ZodNumber;
191
- leaseStatusAtEnqueue: z.ZodString;
192
- leaseScopeSummaryJson: z.ZodOptional<z.ZodString>;
193
- leaseToken: z.ZodOptional<z.ZodString>;
194
- }, z.core.$strip>>;
195
- }, z.core.$strip>;
196
- export type SyncPushCommitRequest = z.infer<typeof SyncPushCommitRequestSchema>;
197
- export declare const SyncOperationResultSchema: z.ZodUnion<readonly [z.ZodObject<{
198
- opIndex: z.ZodNumber;
199
- status: z.ZodLiteral<"applied">;
200
- }, z.core.$strip>, z.ZodObject<{
201
- opIndex: z.ZodNumber;
202
- status: z.ZodLiteral<"conflict">;
203
- message: z.ZodString;
204
- code: z.ZodOptional<z.ZodString>;
205
- server_version: z.ZodNumber;
206
- server_row: z.ZodUnknown;
207
- }, z.core.$strip>, z.ZodObject<{
208
- opIndex: z.ZodNumber;
209
- status: z.ZodLiteral<"error">;
210
- error: z.ZodString;
211
- code: z.ZodOptional<z.ZodString>;
212
- retriable: z.ZodOptional<z.ZodBoolean>;
213
- }, z.core.$strip>]>;
214
- export type SyncOperationResult = z.infer<typeof SyncOperationResultSchema>;
215
- export declare const SyncPushResponseSchema: z.ZodObject<{
216
- ok: z.ZodLiteral<true>;
217
- status: z.ZodEnum<{
218
- applied: "applied";
219
- cached: "cached";
220
- rejected: "rejected";
221
- }>;
222
- commitSeq: z.ZodOptional<z.ZodNumber>;
223
- results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
224
- opIndex: z.ZodNumber;
225
- status: z.ZodLiteral<"applied">;
226
- }, z.core.$strip>, z.ZodObject<{
227
- opIndex: z.ZodNumber;
228
- status: z.ZodLiteral<"conflict">;
229
- message: z.ZodString;
230
- code: z.ZodOptional<z.ZodString>;
231
- server_version: z.ZodNumber;
232
- server_row: z.ZodUnknown;
233
- }, z.core.$strip>, z.ZodObject<{
234
- opIndex: z.ZodNumber;
235
- status: z.ZodLiteral<"error">;
236
- error: z.ZodString;
237
- code: z.ZodOptional<z.ZodString>;
238
- retriable: z.ZodOptional<z.ZodBoolean>;
239
- }, z.core.$strip>]>>;
240
- }, z.core.$strip>;
241
- export type SyncPushResponse = z.infer<typeof SyncPushResponseSchema>;
242
- export declare const SyncPushBatchCommitResponseSchema: z.ZodObject<{
243
- ok: z.ZodLiteral<true>;
244
- status: z.ZodEnum<{
245
- applied: "applied";
246
- cached: "cached";
247
- rejected: "rejected";
248
- }>;
249
- commitSeq: z.ZodOptional<z.ZodNumber>;
250
- results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
251
- opIndex: z.ZodNumber;
252
- status: z.ZodLiteral<"applied">;
253
- }, z.core.$strip>, z.ZodObject<{
254
- opIndex: z.ZodNumber;
255
- status: z.ZodLiteral<"conflict">;
256
- message: z.ZodString;
257
- code: z.ZodOptional<z.ZodString>;
258
- server_version: z.ZodNumber;
259
- server_row: z.ZodUnknown;
260
- }, z.core.$strip>, z.ZodObject<{
261
- opIndex: z.ZodNumber;
262
- status: z.ZodLiteral<"error">;
263
- error: z.ZodString;
264
- code: z.ZodOptional<z.ZodString>;
265
- retriable: z.ZodOptional<z.ZodBoolean>;
266
- }, z.core.$strip>]>>;
267
- clientCommitId: z.ZodString;
268
- }, z.core.$strip>;
269
- export type SyncPushBatchCommitResponse = z.infer<typeof SyncPushBatchCommitResponseSchema>;
270
- export declare const SyncPushBatchRequestSchema: z.ZodObject<{
271
- clientId: z.ZodString;
272
- commits: z.ZodArray<z.ZodObject<{
273
- clientCommitId: z.ZodString;
274
- operations: z.ZodArray<z.ZodObject<{
275
- table: z.ZodString;
276
- row_id: z.ZodString;
277
- op: z.ZodEnum<{
278
- delete: "delete";
279
- upsert: "upsert";
280
- }>;
281
- payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
- base_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
283
- }, z.core.$strip>>;
284
- schemaVersion: z.ZodNumber;
285
- authLease: z.ZodOptional<z.ZodObject<{
286
- leaseId: z.ZodString;
287
- leaseExpiresAtMs: z.ZodNumber;
288
- leaseStatusAtEnqueue: z.ZodString;
289
- leaseScopeSummaryJson: z.ZodOptional<z.ZodString>;
290
- leaseToken: z.ZodOptional<z.ZodString>;
291
- }, z.core.$strip>>;
292
- }, z.core.$strip>>;
293
- }, z.core.$strip>;
294
- export type SyncPushBatchRequest = z.infer<typeof SyncPushBatchRequestSchema>;
295
- export declare const SyncPushBatchResponseSchema: z.ZodObject<{
296
- ok: z.ZodLiteral<true>;
297
- commits: z.ZodArray<z.ZodObject<{
298
- ok: z.ZodLiteral<true>;
299
- status: z.ZodEnum<{
300
- applied: "applied";
301
- cached: "cached";
302
- rejected: "rejected";
303
- }>;
304
- commitSeq: z.ZodOptional<z.ZodNumber>;
305
- results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
306
- opIndex: z.ZodNumber;
307
- status: z.ZodLiteral<"applied">;
308
- }, z.core.$strip>, z.ZodObject<{
309
- opIndex: z.ZodNumber;
310
- status: z.ZodLiteral<"conflict">;
311
- message: z.ZodString;
312
- code: z.ZodOptional<z.ZodString>;
313
- server_version: z.ZodNumber;
314
- server_row: z.ZodUnknown;
315
- }, z.core.$strip>, z.ZodObject<{
316
- opIndex: z.ZodNumber;
317
- status: z.ZodLiteral<"error">;
318
- error: z.ZodString;
319
- code: z.ZodOptional<z.ZodString>;
320
- retriable: z.ZodOptional<z.ZodBoolean>;
321
- }, z.core.$strip>]>>;
322
- clientCommitId: z.ZodString;
323
- }, z.core.$strip>>;
324
- }, z.core.$strip>;
325
- export type SyncPushBatchResponse = z.infer<typeof SyncPushBatchResponseSchema>;
326
- export declare const SyncBootstrapStateSchema: z.ZodObject<{
327
- asOfCommitSeq: z.ZodNumber;
328
- tables: z.ZodArray<z.ZodString>;
329
- tableIndex: z.ZodNumber;
330
- rowCursor: z.ZodNullable<z.ZodString>;
331
- }, z.core.$strip>;
332
- export type SyncBootstrapState = z.infer<typeof SyncBootstrapStateSchema>;
333
- export declare const SyncCrdtStateVectorHintSchema: z.ZodObject<{
334
- rowId: z.ZodString;
335
- field: z.ZodString;
336
- stateColumn: z.ZodString;
337
- stateVectorBase64: z.ZodString;
338
- syncMode: z.ZodString;
339
- updatedAt: z.ZodNumber;
340
- }, z.core.$strip>;
341
- export type SyncCrdtStateVectorHint = z.infer<typeof SyncCrdtStateVectorHintSchema>;
342
- export declare const SyncSubscriptionRequestSchema: z.ZodObject<{
343
- id: z.ZodString;
344
- table: z.ZodString;
345
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
346
- params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
347
- cursor: z.ZodNumber;
348
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
349
- asOfCommitSeq: z.ZodNumber;
350
- tables: z.ZodArray<z.ZodString>;
351
- tableIndex: z.ZodNumber;
352
- rowCursor: z.ZodNullable<z.ZodString>;
353
- }, z.core.$strip>>>;
354
- verifiedRoot: z.ZodOptional<z.ZodString>;
355
- crdtStateVectors: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
356
- rowId: z.ZodString;
357
- field: z.ZodString;
358
- stateColumn: z.ZodString;
359
- stateVectorBase64: z.ZodString;
360
- syncMode: z.ZodString;
361
- updatedAt: z.ZodNumber;
362
- }, z.core.$strip>>>>;
363
- }, z.core.$strip>;
364
- export type SyncSubscriptionRequest = z.infer<typeof SyncSubscriptionRequestSchema>;
365
- export declare const SyncSnapshotChunkEncodingSchema: z.ZodEnum<{
366
- "binary-table-v1": "binary-table-v1";
367
- }>;
368
- export declare const SyncScopedSnapshotArtifactKindSchema: z.ZodLiteral<"sqlite-snapshot-v1">;
369
- export declare const SyncSnapshotArtifactCompressionSchema: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
370
- export declare const SyncSnapshotArtifactsRequestSchema: z.ZodObject<{
371
- artifactKinds: z.ZodArray<z.ZodLiteral<"sqlite-snapshot-v1">>;
372
- compressions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>>>;
373
- featureSet: z.ZodOptional<z.ZodArray<z.ZodString>>;
374
- }, z.core.$strip>;
375
- export type SyncSnapshotArtifactsRequest = z.infer<typeof SyncSnapshotArtifactsRequestSchema>;
376
- export declare const SyncPullRequestSchema: z.ZodObject<{
377
- clientId: z.ZodString;
378
- schemaVersion: z.ZodNumber;
379
- limitCommits: z.ZodNumber;
380
- limitSnapshotRows: z.ZodOptional<z.ZodNumber>;
381
- maxSnapshotPages: z.ZodOptional<z.ZodNumber>;
382
- dedupeRows: z.ZodOptional<z.ZodBoolean>;
383
- snapshotArtifacts: z.ZodOptional<z.ZodObject<{
384
- artifactKinds: z.ZodArray<z.ZodLiteral<"sqlite-snapshot-v1">>;
385
- compressions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>>>;
386
- featureSet: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
- }, z.core.$strip>>;
388
- subscriptions: z.ZodArray<z.ZodObject<{
389
- id: z.ZodString;
390
- table: z.ZodString;
391
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
392
- params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
- cursor: z.ZodNumber;
394
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
395
- asOfCommitSeq: z.ZodNumber;
396
- tables: z.ZodArray<z.ZodString>;
397
- tableIndex: z.ZodNumber;
398
- rowCursor: z.ZodNullable<z.ZodString>;
399
- }, z.core.$strip>>>;
400
- verifiedRoot: z.ZodOptional<z.ZodString>;
401
- crdtStateVectors: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
402
- rowId: z.ZodString;
403
- field: z.ZodString;
404
- stateColumn: z.ZodString;
405
- stateVectorBase64: z.ZodString;
406
- syncMode: z.ZodString;
407
- updatedAt: z.ZodNumber;
408
- }, z.core.$strip>>>>;
409
- }, z.core.$strip>>;
410
- }, z.core.$strip>;
411
- export type SyncPullRequest = z.infer<typeof SyncPullRequestSchema>;
412
- export declare const SyncChangeSchema: z.ZodObject<{
413
- table: z.ZodString;
414
- row_id: z.ZodString;
415
- op: z.ZodEnum<{
416
- delete: "delete";
417
- upsert: "upsert";
418
- }>;
419
- row_json: z.ZodNullable<z.ZodUnknown>;
420
- row_version: z.ZodNullable<z.ZodNumber>;
421
- scopes: z.ZodRecord<z.ZodString, z.ZodString>;
422
- }, z.core.$strip>;
423
- export type SyncChange = z.infer<typeof SyncChangeSchema>;
424
- export declare const SyncCommitSchema: z.ZodObject<{
425
- commitSeq: z.ZodNumber;
426
- createdAt: z.ZodString;
427
- actorId: z.ZodString;
428
- changes: z.ZodArray<z.ZodObject<{
429
- table: z.ZodString;
430
- row_id: z.ZodString;
431
- op: z.ZodEnum<{
432
- delete: "delete";
433
- upsert: "upsert";
434
- }>;
435
- row_json: z.ZodNullable<z.ZodUnknown>;
436
- row_version: z.ZodNullable<z.ZodNumber>;
437
- scopes: z.ZodRecord<z.ZodString, z.ZodString>;
438
- }, z.core.$strip>>;
439
- }, z.core.$strip>;
440
- export type SyncCommit = z.infer<typeof SyncCommitSchema>;
441
- export declare const SyncPullSubscriptionIntegritySchema: z.ZodObject<{
442
- partitionId: z.ZodString;
443
- previousChainRoot: z.ZodString;
444
- commitChainRoot: z.ZodString;
445
- commitSeq: z.ZodNumber;
446
- }, z.core.$strip>;
447
- export type SyncPullSubscriptionIntegrity = z.infer<typeof SyncPullSubscriptionIntegritySchema>;
448
- export declare const SyncSnapshotChunkRefSchema: z.ZodObject<{
449
- id: z.ZodString;
450
- byteLength: z.ZodNumber;
451
- sha256: z.ZodString;
452
- encoding: z.ZodEnum<{
453
- "binary-table-v1": "binary-table-v1";
454
- }>;
455
- compression: z.ZodLiteral<"gzip">;
456
- }, z.core.$strip>;
457
- export type SyncSnapshotChunkRef = z.infer<typeof SyncSnapshotChunkRefSchema>;
458
- export declare const SyncSnapshotManifestChunkSchema: z.ZodObject<{
459
- id: z.ZodString;
460
- byteLength: z.ZodNumber;
461
- sha256: z.ZodString;
462
- encoding: z.ZodEnum<{
463
- "binary-table-v1": "binary-table-v1";
464
- }>;
465
- compression: z.ZodLiteral<"gzip">;
466
- }, z.core.$strip>;
467
- export declare const SyncSnapshotManifestSchema: z.ZodObject<{
468
- version: z.ZodLiteral<1>;
469
- digest: z.ZodString;
470
- table: z.ZodString;
471
- asOfCommitSeq: z.ZodNumber;
472
- scopeDigest: z.ZodString;
473
- rowCursor: z.ZodNullable<z.ZodString>;
474
- rowLimit: z.ZodNumber;
475
- nextRowCursor: z.ZodNullable<z.ZodString>;
476
- isFirstPage: z.ZodBoolean;
477
- isLastPage: z.ZodBoolean;
478
- chunks: z.ZodArray<z.ZodObject<{
479
- id: z.ZodString;
480
- byteLength: z.ZodNumber;
481
- sha256: z.ZodString;
482
- encoding: z.ZodEnum<{
483
- "binary-table-v1": "binary-table-v1";
484
- }>;
485
- compression: z.ZodLiteral<"gzip">;
486
- }, z.core.$strip>>;
487
- }, z.core.$strip>;
488
- export type SyncSnapshotManifest = z.infer<typeof SyncSnapshotManifestSchema>;
489
- export declare const SyncScopedSnapshotArtifactManifestSchema: z.ZodObject<{
490
- version: z.ZodLiteral<1>;
491
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
492
- digest: z.ZodString;
493
- partitionId: z.ZodString;
494
- subscriptionId: z.ZodString;
495
- table: z.ZodString;
496
- schemaVersion: z.ZodString;
497
- asOfCommitSeq: z.ZodNumber;
498
- scopeDigest: z.ZodString;
499
- rowCursor: z.ZodNullable<z.ZodString>;
500
- rowLimit: z.ZodNumber;
501
- rowCount: z.ZodNumber;
502
- nextRowCursor: z.ZodNullable<z.ZodString>;
503
- isFirstPage: z.ZodBoolean;
504
- isLastPage: z.ZodBoolean;
505
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
506
- byteLength: z.ZodNumber;
507
- sha256: z.ZodString;
508
- featureSet: z.ZodArray<z.ZodString>;
509
- }, z.core.$strip>;
510
- export type SyncScopedSnapshotArtifactManifest = z.infer<typeof SyncScopedSnapshotArtifactManifestSchema>;
511
- export declare const SyncSnapshotArtifactRefSchema: z.ZodObject<{
512
- id: z.ZodString;
513
- byteLength: z.ZodNumber;
514
- sha256: z.ZodString;
515
- manifestDigest: z.ZodString;
516
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
517
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
518
- rowCount: z.ZodNumber;
519
- nextRowCursor: z.ZodNullable<z.ZodString>;
520
- isFirstPage: z.ZodBoolean;
521
- isLastPage: z.ZodBoolean;
522
- manifest: z.ZodObject<{
523
- version: z.ZodLiteral<1>;
524
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
525
- digest: z.ZodString;
526
- partitionId: z.ZodString;
527
- subscriptionId: z.ZodString;
528
- table: z.ZodString;
529
- schemaVersion: z.ZodString;
530
- asOfCommitSeq: z.ZodNumber;
531
- scopeDigest: z.ZodString;
532
- rowCursor: z.ZodNullable<z.ZodString>;
533
- rowLimit: z.ZodNumber;
534
- rowCount: z.ZodNumber;
535
- nextRowCursor: z.ZodNullable<z.ZodString>;
536
- isFirstPage: z.ZodBoolean;
537
- isLastPage: z.ZodBoolean;
538
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
539
- byteLength: z.ZodNumber;
540
- sha256: z.ZodString;
541
- featureSet: z.ZodArray<z.ZodString>;
542
- }, z.core.$strip>;
543
- }, z.core.$strip>;
544
- export type SyncSnapshotArtifactRef = z.infer<typeof SyncSnapshotArtifactRefSchema>;
545
- export declare const SyncSnapshotSchema: z.ZodObject<{
546
- table: z.ZodString;
547
- rows: z.ZodArray<z.ZodUnknown>;
548
- chunks: z.ZodOptional<z.ZodArray<z.ZodObject<{
549
- id: z.ZodString;
550
- byteLength: z.ZodNumber;
551
- sha256: z.ZodString;
552
- encoding: z.ZodEnum<{
553
- "binary-table-v1": "binary-table-v1";
554
- }>;
555
- compression: z.ZodLiteral<"gzip">;
556
- }, z.core.$strip>>>;
557
- manifest: z.ZodOptional<z.ZodObject<{
558
- version: z.ZodLiteral<1>;
559
- digest: z.ZodString;
560
- table: z.ZodString;
561
- asOfCommitSeq: z.ZodNumber;
562
- scopeDigest: z.ZodString;
563
- rowCursor: z.ZodNullable<z.ZodString>;
564
- rowLimit: z.ZodNumber;
565
- nextRowCursor: z.ZodNullable<z.ZodString>;
566
- isFirstPage: z.ZodBoolean;
567
- isLastPage: z.ZodBoolean;
568
- chunks: z.ZodArray<z.ZodObject<{
569
- id: z.ZodString;
570
- byteLength: z.ZodNumber;
571
- sha256: z.ZodString;
572
- encoding: z.ZodEnum<{
573
- "binary-table-v1": "binary-table-v1";
574
- }>;
575
- compression: z.ZodLiteral<"gzip">;
576
- }, z.core.$strip>>;
577
- }, z.core.$strip>>;
578
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
579
- id: z.ZodString;
580
- byteLength: z.ZodNumber;
581
- sha256: z.ZodString;
582
- manifestDigest: z.ZodString;
583
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
584
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
585
- rowCount: z.ZodNumber;
586
- nextRowCursor: z.ZodNullable<z.ZodString>;
587
- isFirstPage: z.ZodBoolean;
588
- isLastPage: z.ZodBoolean;
589
- manifest: z.ZodObject<{
590
- version: z.ZodLiteral<1>;
591
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
592
- digest: z.ZodString;
593
- partitionId: z.ZodString;
594
- subscriptionId: z.ZodString;
595
- table: z.ZodString;
596
- schemaVersion: z.ZodString;
597
- asOfCommitSeq: z.ZodNumber;
598
- scopeDigest: z.ZodString;
599
- rowCursor: z.ZodNullable<z.ZodString>;
600
- rowLimit: z.ZodNumber;
601
- rowCount: z.ZodNumber;
602
- nextRowCursor: z.ZodNullable<z.ZodString>;
603
- isFirstPage: z.ZodBoolean;
604
- isLastPage: z.ZodBoolean;
605
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
606
- byteLength: z.ZodNumber;
607
- sha256: z.ZodString;
608
- featureSet: z.ZodArray<z.ZodString>;
609
- }, z.core.$strip>;
610
- }, z.core.$strip>>>;
611
- isFirstPage: z.ZodBoolean;
612
- isLastPage: z.ZodBoolean;
613
- bootstrapStateAfter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
614
- asOfCommitSeq: z.ZodNumber;
615
- tables: z.ZodArray<z.ZodString>;
616
- tableIndex: z.ZodNumber;
617
- rowCursor: z.ZodNullable<z.ZodString>;
618
- }, z.core.$strip>>>;
619
- }, z.core.$strip>;
620
- export type SyncSnapshot = z.infer<typeof SyncSnapshotSchema>;
621
- export declare const SyncPullSubscriptionResponseSchema: z.ZodObject<{
622
- id: z.ZodString;
623
- status: z.ZodEnum<{
624
- active: "active";
625
- revoked: "revoked";
626
- }>;
627
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
628
- bootstrap: z.ZodBoolean;
629
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
630
- asOfCommitSeq: z.ZodNumber;
631
- tables: z.ZodArray<z.ZodString>;
632
- tableIndex: z.ZodNumber;
633
- rowCursor: z.ZodNullable<z.ZodString>;
634
- }, z.core.$strip>>>;
635
- nextCursor: z.ZodNumber;
636
- integrity: z.ZodOptional<z.ZodObject<{
637
- partitionId: z.ZodString;
638
- previousChainRoot: z.ZodString;
639
- commitChainRoot: z.ZodString;
640
- commitSeq: z.ZodNumber;
641
- }, z.core.$strip>>;
642
- commits: z.ZodArray<z.ZodObject<{
643
- commitSeq: z.ZodNumber;
644
- createdAt: z.ZodString;
645
- actorId: z.ZodString;
646
- changes: z.ZodArray<z.ZodObject<{
647
- table: z.ZodString;
648
- row_id: z.ZodString;
649
- op: z.ZodEnum<{
650
- delete: "delete";
651
- upsert: "upsert";
652
- }>;
653
- row_json: z.ZodNullable<z.ZodUnknown>;
654
- row_version: z.ZodNullable<z.ZodNumber>;
655
- scopes: z.ZodRecord<z.ZodString, z.ZodString>;
656
- }, z.core.$strip>>;
657
- }, z.core.$strip>>;
658
- snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
659
- table: z.ZodString;
660
- rows: z.ZodArray<z.ZodUnknown>;
661
- chunks: z.ZodOptional<z.ZodArray<z.ZodObject<{
662
- id: z.ZodString;
663
- byteLength: z.ZodNumber;
664
- sha256: z.ZodString;
665
- encoding: z.ZodEnum<{
666
- "binary-table-v1": "binary-table-v1";
667
- }>;
668
- compression: z.ZodLiteral<"gzip">;
669
- }, z.core.$strip>>>;
670
- manifest: z.ZodOptional<z.ZodObject<{
671
- version: z.ZodLiteral<1>;
672
- digest: z.ZodString;
673
- table: z.ZodString;
674
- asOfCommitSeq: z.ZodNumber;
675
- scopeDigest: z.ZodString;
676
- rowCursor: z.ZodNullable<z.ZodString>;
677
- rowLimit: z.ZodNumber;
678
- nextRowCursor: z.ZodNullable<z.ZodString>;
679
- isFirstPage: z.ZodBoolean;
680
- isLastPage: z.ZodBoolean;
681
- chunks: z.ZodArray<z.ZodObject<{
682
- id: z.ZodString;
683
- byteLength: z.ZodNumber;
684
- sha256: z.ZodString;
685
- encoding: z.ZodEnum<{
686
- "binary-table-v1": "binary-table-v1";
687
- }>;
688
- compression: z.ZodLiteral<"gzip">;
689
- }, z.core.$strip>>;
690
- }, z.core.$strip>>;
691
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
692
- id: z.ZodString;
693
- byteLength: z.ZodNumber;
694
- sha256: z.ZodString;
695
- manifestDigest: z.ZodString;
696
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
697
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
698
- rowCount: z.ZodNumber;
699
- nextRowCursor: z.ZodNullable<z.ZodString>;
700
- isFirstPage: z.ZodBoolean;
701
- isLastPage: z.ZodBoolean;
702
- manifest: z.ZodObject<{
703
- version: z.ZodLiteral<1>;
704
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
705
- digest: z.ZodString;
706
- partitionId: z.ZodString;
707
- subscriptionId: z.ZodString;
708
- table: z.ZodString;
709
- schemaVersion: z.ZodString;
710
- asOfCommitSeq: z.ZodNumber;
711
- scopeDigest: z.ZodString;
712
- rowCursor: z.ZodNullable<z.ZodString>;
713
- rowLimit: z.ZodNumber;
714
- rowCount: z.ZodNumber;
715
- nextRowCursor: z.ZodNullable<z.ZodString>;
716
- isFirstPage: z.ZodBoolean;
717
- isLastPage: z.ZodBoolean;
718
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
719
- byteLength: z.ZodNumber;
720
- sha256: z.ZodString;
721
- featureSet: z.ZodArray<z.ZodString>;
722
- }, z.core.$strip>;
723
- }, z.core.$strip>>>;
724
- isFirstPage: z.ZodBoolean;
725
- isLastPage: z.ZodBoolean;
726
- bootstrapStateAfter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
727
- asOfCommitSeq: z.ZodNumber;
728
- tables: z.ZodArray<z.ZodString>;
729
- tableIndex: z.ZodNumber;
730
- rowCursor: z.ZodNullable<z.ZodString>;
731
- }, z.core.$strip>>>;
732
- }, z.core.$strip>>>;
733
- }, z.core.$strip>;
734
- export type SyncPullSubscriptionResponse = z.infer<typeof SyncPullSubscriptionResponseSchema>;
735
- export declare const SyncPullResponseSchema: z.ZodObject<{
736
- ok: z.ZodLiteral<true>;
737
- subscriptions: z.ZodArray<z.ZodObject<{
738
- id: z.ZodString;
739
- status: z.ZodEnum<{
740
- active: "active";
741
- revoked: "revoked";
742
- }>;
743
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
744
- bootstrap: z.ZodBoolean;
745
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
746
- asOfCommitSeq: z.ZodNumber;
747
- tables: z.ZodArray<z.ZodString>;
748
- tableIndex: z.ZodNumber;
749
- rowCursor: z.ZodNullable<z.ZodString>;
750
- }, z.core.$strip>>>;
751
- nextCursor: z.ZodNumber;
752
- integrity: z.ZodOptional<z.ZodObject<{
753
- partitionId: z.ZodString;
754
- previousChainRoot: z.ZodString;
755
- commitChainRoot: z.ZodString;
756
- commitSeq: z.ZodNumber;
757
- }, z.core.$strip>>;
758
- commits: z.ZodArray<z.ZodObject<{
759
- commitSeq: z.ZodNumber;
760
- createdAt: z.ZodString;
761
- actorId: z.ZodString;
762
- changes: z.ZodArray<z.ZodObject<{
763
- table: z.ZodString;
764
- row_id: z.ZodString;
765
- op: z.ZodEnum<{
766
- delete: "delete";
767
- upsert: "upsert";
768
- }>;
769
- row_json: z.ZodNullable<z.ZodUnknown>;
770
- row_version: z.ZodNullable<z.ZodNumber>;
771
- scopes: z.ZodRecord<z.ZodString, z.ZodString>;
772
- }, z.core.$strip>>;
773
- }, z.core.$strip>>;
774
- snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
775
- table: z.ZodString;
776
- rows: z.ZodArray<z.ZodUnknown>;
777
- chunks: z.ZodOptional<z.ZodArray<z.ZodObject<{
778
- id: z.ZodString;
779
- byteLength: z.ZodNumber;
780
- sha256: z.ZodString;
781
- encoding: z.ZodEnum<{
782
- "binary-table-v1": "binary-table-v1";
783
- }>;
784
- compression: z.ZodLiteral<"gzip">;
785
- }, z.core.$strip>>>;
786
- manifest: z.ZodOptional<z.ZodObject<{
787
- version: z.ZodLiteral<1>;
788
- digest: z.ZodString;
789
- table: z.ZodString;
790
- asOfCommitSeq: z.ZodNumber;
791
- scopeDigest: z.ZodString;
792
- rowCursor: z.ZodNullable<z.ZodString>;
793
- rowLimit: z.ZodNumber;
794
- nextRowCursor: z.ZodNullable<z.ZodString>;
795
- isFirstPage: z.ZodBoolean;
796
- isLastPage: z.ZodBoolean;
797
- chunks: z.ZodArray<z.ZodObject<{
798
- id: z.ZodString;
799
- byteLength: z.ZodNumber;
800
- sha256: z.ZodString;
801
- encoding: z.ZodEnum<{
802
- "binary-table-v1": "binary-table-v1";
803
- }>;
804
- compression: z.ZodLiteral<"gzip">;
805
- }, z.core.$strip>>;
806
- }, z.core.$strip>>;
807
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
808
- id: z.ZodString;
809
- byteLength: z.ZodNumber;
810
- sha256: z.ZodString;
811
- manifestDigest: z.ZodString;
812
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
813
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
814
- rowCount: z.ZodNumber;
815
- nextRowCursor: z.ZodNullable<z.ZodString>;
816
- isFirstPage: z.ZodBoolean;
817
- isLastPage: z.ZodBoolean;
818
- manifest: z.ZodObject<{
819
- version: z.ZodLiteral<1>;
820
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
821
- digest: z.ZodString;
822
- partitionId: z.ZodString;
823
- subscriptionId: z.ZodString;
824
- table: z.ZodString;
825
- schemaVersion: z.ZodString;
826
- asOfCommitSeq: z.ZodNumber;
827
- scopeDigest: z.ZodString;
828
- rowCursor: z.ZodNullable<z.ZodString>;
829
- rowLimit: z.ZodNumber;
830
- rowCount: z.ZodNumber;
831
- nextRowCursor: z.ZodNullable<z.ZodString>;
832
- isFirstPage: z.ZodBoolean;
833
- isLastPage: z.ZodBoolean;
834
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
835
- byteLength: z.ZodNumber;
836
- sha256: z.ZodString;
837
- featureSet: z.ZodArray<z.ZodString>;
838
- }, z.core.$strip>;
839
- }, z.core.$strip>>>;
840
- isFirstPage: z.ZodBoolean;
841
- isLastPage: z.ZodBoolean;
842
- bootstrapStateAfter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
843
- asOfCommitSeq: z.ZodNumber;
844
- tables: z.ZodArray<z.ZodString>;
845
- tableIndex: z.ZodNumber;
846
- rowCursor: z.ZodNullable<z.ZodString>;
847
- }, z.core.$strip>>>;
848
- }, z.core.$strip>>>;
849
- }, z.core.$strip>>;
850
- }, z.core.$strip>;
851
- export type SyncPullResponse = z.infer<typeof SyncPullResponseSchema>;
852
- export declare const SyncCombinedRequestSchema: z.ZodObject<{
853
- clientId: z.ZodString;
854
- push: z.ZodOptional<z.ZodObject<{
855
- commits: z.ZodArray<z.ZodObject<{
856
- clientCommitId: z.ZodString;
857
- operations: z.ZodArray<z.ZodObject<{
858
- table: z.ZodString;
859
- row_id: z.ZodString;
860
- op: z.ZodEnum<{
861
- delete: "delete";
862
- upsert: "upsert";
863
- }>;
864
- payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
865
- base_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
866
- }, z.core.$strip>>;
867
- schemaVersion: z.ZodNumber;
868
- authLease: z.ZodOptional<z.ZodObject<{
869
- leaseId: z.ZodString;
870
- leaseExpiresAtMs: z.ZodNumber;
871
- leaseStatusAtEnqueue: z.ZodString;
872
- leaseScopeSummaryJson: z.ZodOptional<z.ZodString>;
873
- leaseToken: z.ZodOptional<z.ZodString>;
874
- }, z.core.$strip>>;
875
- }, z.core.$strip>>;
876
- }, z.core.$strip>>;
877
- pull: z.ZodOptional<z.ZodObject<{
878
- schemaVersion: z.ZodNumber;
879
- limitCommits: z.ZodNumber;
880
- limitSnapshotRows: z.ZodOptional<z.ZodNumber>;
881
- maxSnapshotPages: z.ZodOptional<z.ZodNumber>;
882
- dedupeRows: z.ZodOptional<z.ZodBoolean>;
883
- snapshotArtifacts: z.ZodOptional<z.ZodObject<{
884
- artifactKinds: z.ZodArray<z.ZodLiteral<"sqlite-snapshot-v1">>;
885
- compressions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>>>;
886
- featureSet: z.ZodOptional<z.ZodArray<z.ZodString>>;
887
- }, z.core.$strip>>;
888
- subscriptions: z.ZodArray<z.ZodObject<{
889
- id: z.ZodString;
890
- table: z.ZodString;
891
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
892
- params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
893
- cursor: z.ZodNumber;
894
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
895
- asOfCommitSeq: z.ZodNumber;
896
- tables: z.ZodArray<z.ZodString>;
897
- tableIndex: z.ZodNumber;
898
- rowCursor: z.ZodNullable<z.ZodString>;
899
- }, z.core.$strip>>>;
900
- verifiedRoot: z.ZodOptional<z.ZodString>;
901
- crdtStateVectors: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
902
- rowId: z.ZodString;
903
- field: z.ZodString;
904
- stateColumn: z.ZodString;
905
- stateVectorBase64: z.ZodString;
906
- syncMode: z.ZodString;
907
- updatedAt: z.ZodNumber;
908
- }, z.core.$strip>>>>;
909
- }, z.core.$strip>>;
910
- }, z.core.$strip>>;
911
- }, z.core.$strip>;
912
- export type SyncCombinedRequest = z.infer<typeof SyncCombinedRequestSchema>;
913
- export declare const SyncCombinedResponseSchema: z.ZodObject<{
914
- ok: z.ZodLiteral<true>;
915
- requiredSchemaVersion: z.ZodOptional<z.ZodNumber>;
916
- latestSchemaVersion: z.ZodOptional<z.ZodNumber>;
917
- push: z.ZodOptional<z.ZodObject<{
918
- ok: z.ZodLiteral<true>;
919
- commits: z.ZodArray<z.ZodObject<{
920
- ok: z.ZodLiteral<true>;
921
- status: z.ZodEnum<{
922
- applied: "applied";
923
- cached: "cached";
924
- rejected: "rejected";
925
- }>;
926
- commitSeq: z.ZodOptional<z.ZodNumber>;
927
- results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
928
- opIndex: z.ZodNumber;
929
- status: z.ZodLiteral<"applied">;
930
- }, z.core.$strip>, z.ZodObject<{
931
- opIndex: z.ZodNumber;
932
- status: z.ZodLiteral<"conflict">;
933
- message: z.ZodString;
934
- code: z.ZodOptional<z.ZodString>;
935
- server_version: z.ZodNumber;
936
- server_row: z.ZodUnknown;
937
- }, z.core.$strip>, z.ZodObject<{
938
- opIndex: z.ZodNumber;
939
- status: z.ZodLiteral<"error">;
940
- error: z.ZodString;
941
- code: z.ZodOptional<z.ZodString>;
942
- retriable: z.ZodOptional<z.ZodBoolean>;
943
- }, z.core.$strip>]>>;
944
- clientCommitId: z.ZodString;
945
- }, z.core.$strip>>;
946
- }, z.core.$strip>>;
947
- pull: z.ZodOptional<z.ZodObject<{
948
- ok: z.ZodLiteral<true>;
949
- subscriptions: z.ZodArray<z.ZodObject<{
950
- id: z.ZodString;
951
- status: z.ZodEnum<{
952
- active: "active";
953
- revoked: "revoked";
954
- }>;
955
- scopes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
956
- bootstrap: z.ZodBoolean;
957
- bootstrapState: z.ZodOptional<z.ZodNullable<z.ZodObject<{
958
- asOfCommitSeq: z.ZodNumber;
959
- tables: z.ZodArray<z.ZodString>;
960
- tableIndex: z.ZodNumber;
961
- rowCursor: z.ZodNullable<z.ZodString>;
962
- }, z.core.$strip>>>;
963
- nextCursor: z.ZodNumber;
964
- integrity: z.ZodOptional<z.ZodObject<{
965
- partitionId: z.ZodString;
966
- previousChainRoot: z.ZodString;
967
- commitChainRoot: z.ZodString;
968
- commitSeq: z.ZodNumber;
969
- }, z.core.$strip>>;
970
- commits: z.ZodArray<z.ZodObject<{
971
- commitSeq: z.ZodNumber;
972
- createdAt: z.ZodString;
973
- actorId: z.ZodString;
974
- changes: z.ZodArray<z.ZodObject<{
975
- table: z.ZodString;
976
- row_id: z.ZodString;
977
- op: z.ZodEnum<{
978
- delete: "delete";
979
- upsert: "upsert";
980
- }>;
981
- row_json: z.ZodNullable<z.ZodUnknown>;
982
- row_version: z.ZodNullable<z.ZodNumber>;
983
- scopes: z.ZodRecord<z.ZodString, z.ZodString>;
984
- }, z.core.$strip>>;
985
- }, z.core.$strip>>;
986
- snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
987
- table: z.ZodString;
988
- rows: z.ZodArray<z.ZodUnknown>;
989
- chunks: z.ZodOptional<z.ZodArray<z.ZodObject<{
990
- id: z.ZodString;
991
- byteLength: z.ZodNumber;
992
- sha256: z.ZodString;
993
- encoding: z.ZodEnum<{
994
- "binary-table-v1": "binary-table-v1";
995
- }>;
996
- compression: z.ZodLiteral<"gzip">;
997
- }, z.core.$strip>>>;
998
- manifest: z.ZodOptional<z.ZodObject<{
999
- version: z.ZodLiteral<1>;
1000
- digest: z.ZodString;
1001
- table: z.ZodString;
1002
- asOfCommitSeq: z.ZodNumber;
1003
- scopeDigest: z.ZodString;
1004
- rowCursor: z.ZodNullable<z.ZodString>;
1005
- rowLimit: z.ZodNumber;
1006
- nextRowCursor: z.ZodNullable<z.ZodString>;
1007
- isFirstPage: z.ZodBoolean;
1008
- isLastPage: z.ZodBoolean;
1009
- chunks: z.ZodArray<z.ZodObject<{
1010
- id: z.ZodString;
1011
- byteLength: z.ZodNumber;
1012
- sha256: z.ZodString;
1013
- encoding: z.ZodEnum<{
1014
- "binary-table-v1": "binary-table-v1";
1015
- }>;
1016
- compression: z.ZodLiteral<"gzip">;
1017
- }, z.core.$strip>>;
1018
- }, z.core.$strip>>;
1019
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1020
- id: z.ZodString;
1021
- byteLength: z.ZodNumber;
1022
- sha256: z.ZodString;
1023
- manifestDigest: z.ZodString;
1024
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
1025
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
1026
- rowCount: z.ZodNumber;
1027
- nextRowCursor: z.ZodNullable<z.ZodString>;
1028
- isFirstPage: z.ZodBoolean;
1029
- isLastPage: z.ZodBoolean;
1030
- manifest: z.ZodObject<{
1031
- version: z.ZodLiteral<1>;
1032
- artifactKind: z.ZodLiteral<"sqlite-snapshot-v1">;
1033
- digest: z.ZodString;
1034
- partitionId: z.ZodString;
1035
- subscriptionId: z.ZodString;
1036
- table: z.ZodString;
1037
- schemaVersion: z.ZodString;
1038
- asOfCommitSeq: z.ZodNumber;
1039
- scopeDigest: z.ZodString;
1040
- rowCursor: z.ZodNullable<z.ZodString>;
1041
- rowLimit: z.ZodNumber;
1042
- rowCount: z.ZodNumber;
1043
- nextRowCursor: z.ZodNullable<z.ZodString>;
1044
- isFirstPage: z.ZodBoolean;
1045
- isLastPage: z.ZodBoolean;
1046
- compression: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"gzip">]>;
1047
- byteLength: z.ZodNumber;
1048
- sha256: z.ZodString;
1049
- featureSet: z.ZodArray<z.ZodString>;
1050
- }, z.core.$strip>;
1051
- }, z.core.$strip>>>;
1052
- isFirstPage: z.ZodBoolean;
1053
- isLastPage: z.ZodBoolean;
1054
- bootstrapStateAfter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1055
- asOfCommitSeq: z.ZodNumber;
1056
- tables: z.ZodArray<z.ZodString>;
1057
- tableIndex: z.ZodNumber;
1058
- rowCursor: z.ZodNullable<z.ZodString>;
1059
- }, z.core.$strip>>>;
1060
- }, z.core.$strip>>>;
1061
- }, z.core.$strip>>;
1062
- }, z.core.$strip>>;
1063
- }, z.core.$strip>;
1064
- export type SyncCombinedResponse = z.infer<typeof SyncCombinedResponseSchema>;
1065
- //# sourceMappingURL=sync.d.ts.map