@evolu/common 8.10.0 → 8.12.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 (152) hide show
  1. package/dist/src/Bytes.d.ts +39 -2
  2. package/dist/src/Bytes.d.ts.map +1 -1
  3. package/dist/src/Bytes.js +50 -2
  4. package/dist/src/Config.d.ts +22 -22
  5. package/dist/src/Config.d.ts.map +1 -1
  6. package/dist/src/Console.d.ts +62 -7
  7. package/dist/src/Console.d.ts.map +1 -1
  8. package/dist/src/Console.js +20 -4
  9. package/dist/src/Crypto.d.ts +76 -4
  10. package/dist/src/Crypto.d.ts.map +1 -1
  11. package/dist/src/Crypto.js +55 -4
  12. package/dist/src/Error.d.ts +45 -0
  13. package/dist/src/Error.d.ts.map +1 -1
  14. package/dist/src/Error.js +69 -0
  15. package/dist/src/Fs.d.ts +92 -18
  16. package/dist/src/Fs.d.ts.map +1 -1
  17. package/dist/src/Fs.js +2 -0
  18. package/dist/src/Identicon.d.ts +2 -2
  19. package/dist/src/Identicon.js +2 -2
  20. package/dist/src/LeakDetector.d.ts +22 -3
  21. package/dist/src/LeakDetector.d.ts.map +1 -1
  22. package/dist/src/LeakDetector.js +12 -2
  23. package/dist/src/LockManager.d.ts +8 -0
  24. package/dist/src/LockManager.d.ts.map +1 -1
  25. package/dist/src/LockManager.js +6 -0
  26. package/dist/src/Object.d.ts.map +1 -1
  27. package/dist/src/Object.js +5 -0
  28. package/dist/src/Platform.d.ts +47 -7
  29. package/dist/src/Platform.d.ts.map +1 -1
  30. package/dist/src/Platform.js +24 -5
  31. package/dist/src/Random.d.ts +25 -2
  32. package/dist/src/Random.d.ts.map +1 -1
  33. package/dist/src/Random.js +14 -2
  34. package/dist/src/Resource.d.ts +156 -1
  35. package/dist/src/Resource.d.ts.map +1 -1
  36. package/dist/src/Resource.js +201 -72
  37. package/dist/src/Schedule.d.ts +11 -10
  38. package/dist/src/Schedule.d.ts.map +1 -1
  39. package/dist/src/Schedule.js +1 -1
  40. package/dist/src/Sqlite.d.ts +132 -16
  41. package/dist/src/Sqlite.d.ts.map +1 -1
  42. package/dist/src/Sqlite.js +63 -9
  43. package/dist/src/Task.d.ts +15 -4
  44. package/dist/src/Task.d.ts.map +1 -1
  45. package/dist/src/Task.js +41 -15
  46. package/dist/src/Test.d.ts +9 -0
  47. package/dist/src/Test.d.ts.map +1 -1
  48. package/dist/src/Test.js +4 -0
  49. package/dist/src/Time.d.ts +106 -9
  50. package/dist/src/Time.d.ts.map +1 -1
  51. package/dist/src/Time.js +55 -4
  52. package/dist/src/Type.d.ts +1455 -1310
  53. package/dist/src/Type.d.ts.map +1 -1
  54. package/dist/src/Type.js +1274 -517
  55. package/dist/src/WebSocket.d.ts +164 -13
  56. package/dist/src/WebSocket.d.ts.map +1 -1
  57. package/dist/src/WebSocket.js +133 -24
  58. package/dist/src/Worker.d.ts +90 -8
  59. package/dist/src/Worker.d.ts.map +1 -1
  60. package/dist/src/Worker.js +28 -2
  61. package/dist/src/index.d.ts +6 -7
  62. package/dist/src/index.d.ts.map +1 -1
  63. package/dist/src/index.js +2 -3
  64. package/dist/src/local-first/Db.d.ts +52 -3
  65. package/dist/src/local-first/Db.d.ts.map +1 -1
  66. package/dist/src/local-first/Db.js +412 -137
  67. package/dist/src/local-first/Evolu.d.ts +412 -213
  68. package/dist/src/local-first/Evolu.d.ts.map +1 -1
  69. package/dist/src/local-first/Evolu.js +181 -18
  70. package/dist/src/local-first/Owner.d.ts +13 -30
  71. package/dist/src/local-first/Owner.d.ts.map +1 -1
  72. package/dist/src/local-first/Owner.js +13 -30
  73. package/dist/src/local-first/Protocol.d.ts +106 -19
  74. package/dist/src/local-first/Protocol.d.ts.map +1 -1
  75. package/dist/src/local-first/Protocol.js +162 -60
  76. package/dist/src/local-first/Query.d.ts +8 -15
  77. package/dist/src/local-first/Query.d.ts.map +1 -1
  78. package/dist/src/local-first/Relay.d.ts.map +1 -1
  79. package/dist/src/local-first/Relay.js +4 -2
  80. package/dist/src/local-first/Schema.d.ts +346 -23
  81. package/dist/src/local-first/Schema.d.ts.map +1 -1
  82. package/dist/src/local-first/Schema.js +214 -17
  83. package/dist/src/local-first/Shared.d.ts +537 -22
  84. package/dist/src/local-first/Shared.d.ts.map +1 -1
  85. package/dist/src/local-first/Shared.js +1437 -234
  86. package/dist/src/local-first/Storage.d.ts +195 -17
  87. package/dist/src/local-first/Storage.d.ts.map +1 -1
  88. package/dist/src/local-first/Storage.js +85 -22
  89. package/dist/src/local-first/Timestamp.d.ts +392 -41
  90. package/dist/src/local-first/Timestamp.d.ts.map +1 -1
  91. package/dist/src/local-first/Timestamp.js +403 -81
  92. package/dist/src/local-first/index.d.ts +0 -1
  93. package/dist/src/local-first/index.d.ts.map +1 -1
  94. package/dist/src/local-first/index.js +0 -1
  95. package/package.json +1 -1
  96. package/src/Assert.test.ts +2 -5
  97. package/src/Bytes.test.ts +27 -0
  98. package/src/Bytes.ts +58 -2
  99. package/src/Config.test.ts +2 -6
  100. package/src/Config.ts +133 -133
  101. package/src/Console.ts +62 -7
  102. package/src/Crypto.ts +76 -4
  103. package/src/Eq.test.ts +2 -3
  104. package/src/Error.test.ts +76 -3
  105. package/src/Error.ts +71 -0
  106. package/src/Fs.ts +92 -18
  107. package/src/Identicon.ts +2 -2
  108. package/src/LeakDetector.ts +22 -3
  109. package/src/LockManager.ts +8 -0
  110. package/src/Object.test.ts +27 -12
  111. package/src/Object.ts +5 -0
  112. package/src/Platform.ts +50 -8
  113. package/src/Random.ts +25 -2
  114. package/src/Resource.test.ts +837 -0
  115. package/src/Resource.ts +235 -15
  116. package/src/Schedule.test.ts +50 -12
  117. package/src/Schedule.ts +24 -14
  118. package/src/Sqlite.ts +137 -17
  119. package/src/Task.test.ts +189 -8
  120. package/src/Task.ts +56 -17
  121. package/src/Test.ts +9 -0
  122. package/src/Time.ts +106 -9
  123. package/src/Type.test.ts +946 -1028
  124. package/src/Type.ts +4195 -3136
  125. package/src/Types.test.ts +4 -14
  126. package/src/WebSocket.ts +313 -40
  127. package/src/Worker.ts +90 -8
  128. package/src/index.ts +20 -6
  129. package/src/local-first/Db.ts +644 -339
  130. package/src/local-first/Evolu.test.ts +994 -22
  131. package/src/local-first/Evolu.ts +625 -232
  132. package/src/local-first/Owner.ts +13 -30
  133. package/src/local-first/Protocol.test.ts +634 -10
  134. package/src/local-first/Protocol.ts +255 -109
  135. package/src/local-first/Query.ts +8 -15
  136. package/src/local-first/Relay.ts +4 -2
  137. package/src/local-first/Schema.test.ts +143 -0
  138. package/src/local-first/Schema.ts +376 -26
  139. package/src/local-first/Shared.test.ts +7731 -559
  140. package/src/local-first/Shared.ts +2036 -267
  141. package/src/local-first/Storage.ts +224 -36
  142. package/src/local-first/Timestamp.test.ts +344 -70
  143. package/src/local-first/Timestamp.ts +434 -118
  144. package/src/local-first/index.ts +0 -1
  145. package/dist/src/local-first/Error.d.ts +0 -12
  146. package/dist/src/local-first/Error.d.ts.map +0 -1
  147. package/dist/src/local-first/Error.js +0 -6
  148. package/dist/src/local-first/LocalAuth.d.ts +0 -150
  149. package/dist/src/local-first/LocalAuth.d.ts.map +0 -1
  150. package/dist/src/local-first/LocalAuth.js +0 -179
  151. package/src/local-first/Error.ts +0 -17
  152. package/src/local-first/LocalAuth.ts +0 -457
@@ -1 +1 @@
1
- {"version":3,"file":"Relay.d.ts","sourceRoot":"","sources":["../../../src/local-first/Relay.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAsC,MAAM,YAAY,CAAC;AACtE,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EACL,OAAO,EAIR,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAEV,iBAAiB,EACjB,OAAO,EACP,aAAa,EAEd,MAAM,cAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgFG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CACxB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;QACP,iEAAiE;QACjE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;KAC9B,KACE,SAAS,CAAC,OAAO,CAAC,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,KAAM,SAAQ,eAAe;IAC5C,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,wBAAwB,SAC5B,iBAAiB,GAAG,kBAAkB,cACpC,aAAa,KAAG,OAyLxB,CAAC;AAEJ,eAAO,MAAM,wBAAwB,SAAU,SAAS,KAAG,IAuB1D,CAAC"}
@@ -8,7 +8,7 @@ import { assert } from "../Assert.js";
8
8
  import { err, ok } from "../Result.js";
9
9
  import { sql } from "../Sqlite.js";
10
10
  import { createMutexByKey } from "../Task.js";
11
- import { Name, PositiveInt, uint8ArrayToBase64Url } from "../Type.js";
11
+ import { Name, NonNegativeInt, uint8ArrayToBase64Url } from "../Type.js";
12
12
  import { isPromiseLike } from "../Types.js";
13
13
  import { OwnerId, ownerIdBytesToOwnerId,
14
14
  // OwnerTransport,
@@ -70,7 +70,9 @@ export const createRelaySqliteStorage = (deps) => (config) => {
70
70
  }
71
71
  const usage = readOwnerUsageOrDefault(deps)(ownerIdBytes, firstInArray(newMessages).timestamp);
72
72
  const incomingBytes = newMessages.reduce((sum, m) => sum + m.change.length, 0);
73
- const newStoredBytes = PositiveInt.orThrow((usage.storedBytes ?? 0) + incomingBytes);
73
+ // A sum of lengths can be zero. Throwing here would panic the
74
+ // relay's shared Run.
75
+ const newStoredBytes = NonNegativeInt.orThrow((usage.storedBytes ?? 0) + incomingBytes);
74
76
  const quotaResult = config.isOwnerWithinQuota(ownerId, newStoredBytes);
75
77
  const isWithinQuota = isPromiseLike(quotaResult)
76
78
  ? await quotaResult
@@ -7,13 +7,19 @@ import * as Kysely from "kysely";
7
7
  import type { StandardSchemaV1 } from "@standard-schema/spec";
8
8
  import { type ReadonlyRecord } from "../Object.ts";
9
9
  import { SqliteBoolean, type SqliteDep, type SqliteQueryOptions, type SqliteSchema, SqliteValue } from "../Sqlite.ts";
10
+ import type { Millis } from "../Time.ts";
10
11
  import { DateIso, type Id, IdBytes, type InferType, Null, type ObjectType, type UnionType } from "../Type.ts";
11
12
  import type { CompileTimeError, Simplify } from "../Types.ts";
13
+ import type { OwnerIdBytes } from "./Owner.ts";
12
14
  import { OwnerId } from "./Owner.ts";
13
15
  import type { Query, Row } from "./Query.ts";
14
16
  import type { DbChange } from "./Storage.ts";
15
17
  import { TimestampBytes } from "./Timestamp.ts";
16
- /** Any Standard Schema V1 declaration. */
18
+ /**
19
+ * Any Standard Schema V1 declaration.
20
+ *
21
+ * @group Core
22
+ */
17
23
  export type AnyStandardSchemaV1 = StandardSchemaV1<any, any>;
18
24
  /**
19
25
  * Defines the schema of an Evolu database.
@@ -84,10 +90,117 @@ export type AnyStandardSchemaV1 = StandardSchemaV1<any, any>;
84
90
  * };
85
91
  * assertTrue(ZodSchema.todo.title.safeParse("Write docs").success);
86
92
  * ```
93
+ *
94
+ * @group Core
87
95
  */
88
96
  export type EvoluSchema = ReadonlyRecord<string, TableSchema>;
89
- /** A table schema: column names mapped to Standard Schema validators. */
97
+ /**
98
+ * A table schema: column names mapped to Standard Schema validators.
99
+ *
100
+ * @group Core
101
+ */
90
102
  export type TableSchema = ReadonlyRecord<string, AnyStandardSchemaV1>;
103
+ /**
104
+ * Whether a table is local-only: its name starts with an underscore, so its
105
+ * changes are stored without synchronization.
106
+ *
107
+ * @group Core
108
+ */
109
+ export declare const isLocalOnlyTable: (table: string) => boolean;
110
+ /**
111
+ * Todo ID Type for {@link testEvoluSchema}.
112
+ *
113
+ * @group Testing
114
+ */
115
+ export declare const TestTodoId: import("../Type.ts").TableId<"Todo">;
116
+ export type TestTodoId = typeof TestTodoId.Output;
117
+ /**
118
+ * Deterministic {@link TestTodoId} for tests and examples.
119
+ *
120
+ * @group Testing
121
+ */
122
+ export declare const testTodoId: string & import("../Brand.ts").Brand<"Id"> & import("../Brand.ts").Brand<"Todo">;
123
+ /**
124
+ * Project ID Type for {@link testEvoluSchema}.
125
+ *
126
+ * @group Testing
127
+ */
128
+ export declare const TestProjectId: import("../Type.ts").TableId<"Project">;
129
+ export type TestProjectId = typeof TestProjectId.Output;
130
+ /**
131
+ * Deterministic {@link TestProjectId} for tests and examples.
132
+ *
133
+ * @group Testing
134
+ */
135
+ export declare const testProjectId: string & import("../Brand.ts").Brand<"Id"> & import("../Brand.ts").Brand<"Project">;
136
+ /**
137
+ * Todo and project schema for tests and examples. A todo can belong to a
138
+ * project or have no project. Use an explicit schema when teaching schema
139
+ * definition.
140
+ *
141
+ * ### Example
142
+ *
143
+ * ```ts
144
+ * import {
145
+ * assertOk,
146
+ * testEvoluSchema,
147
+ * testProjectId,
148
+ * testTodoId,
149
+ * } from "@evolu/common";
150
+ *
151
+ * assertOk(testEvoluSchema.todo.id.from(testTodoId), testTodoId);
152
+ * assertOk(
153
+ * testEvoluSchema.todo.projectId.from(testProjectId),
154
+ * testProjectId,
155
+ * );
156
+ * ```
157
+ *
158
+ * @group Testing
159
+ */
160
+ export declare const testEvoluSchema: {
161
+ readonly todo: {
162
+ readonly id: import("../Type.ts").TableId<"Todo">;
163
+ readonly title: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>;
164
+ readonly isCompleted: UnionType<readonly [UnionType<readonly [import("../Type.ts").LiteralType<0>, import("../Type.ts").LiteralType<1>]>, import("../Type.ts").LiteralType<null>]>;
165
+ readonly projectId: UnionType<readonly [import("../Type.ts").TableId<"Project">, import("../Type.ts").LiteralType<null>]>;
166
+ };
167
+ readonly project: {
168
+ readonly id: import("../Type.ts").TableId<"Project">;
169
+ readonly name: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>;
170
+ };
171
+ };
172
+ /**
173
+ * Schema type of {@link testEvoluSchema}.
174
+ *
175
+ * @group Testing
176
+ */
177
+ export type TestEvoluSchema = typeof testEvoluSchema;
178
+ /**
179
+ * App-owner registry schema with local tables for tests and examples.
180
+ *
181
+ * Stores operational keys separately from optional recovery material. A null
182
+ * secret represents an owner whose recovery material is managed elsewhere or
183
+ * unavailable. Names are optional device-local labels; identicons can be
184
+ * derived from the owner identity without an additional column.
185
+ *
186
+ * This fixture does not define the production registry's persistence contract.
187
+ *
188
+ * @group Testing
189
+ */
190
+ export declare const testLocalOnlyEvoluSchema: {
191
+ readonly _appOwner: {
192
+ readonly id: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Id", import("../Type.ts").IdError>, "OwnerId", never>;
193
+ readonly encryptionKey: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length32", import("../Type.ts").LengthError<32>>, "EncryptionKey", never>, "OwnerEncryptionKey", never>;
194
+ readonly writeKey: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length16", import("../Type.ts").LengthError<16>>, "OwnerWriteKey", never>;
195
+ readonly secret: UnionType<readonly [import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length32", import("../Type.ts").LengthError<32>>, "OwnerSecret", never>, import("../Type.ts").LiteralType<null>]>;
196
+ readonly name: UnionType<readonly [import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>, import("../Type.ts").LiteralType<null>]>;
197
+ };
198
+ };
199
+ /**
200
+ * Dependency wrapper for {@link SqliteSchema}.
201
+ *
202
+ * @group SQLite
203
+ */
91
204
  export interface SqliteSchemaDep {
92
205
  readonly sqliteSchema: SqliteSchema;
93
206
  }
@@ -103,15 +216,108 @@ export interface SqliteSchemaDep {
103
216
  * 2. The 'id' column output type must extend {@link Id}
104
217
  * 3. Tables cannot use system column names (createdAt, updatedAt, isDeleted)
105
218
  * 4. All column output types must be compatible with SQLite (extend SqliteValue)
219
+ *
220
+ * @group Validation
106
221
  */
107
222
  export type ValidateSchema<S extends EvoluSchema> = ValidateSchemaHasId<S> extends never ? ValidateIdColumnType<S> extends never ? ValidateNoSystemColumns<S> extends never ? ValidateColumnTypes<S> extends never ? S : ValidateColumnTypes<S> : ValidateNoSystemColumns<S> : ValidateIdColumnType<S> : ValidateSchemaHasId<S>;
223
+ /**
224
+ * Defines SQLite indexes with Kysely's index builder.
225
+ *
226
+ * @group SQLite
227
+ */
108
228
  export type IndexesConfig = (create: (indexName: string) => Kysely.CreateIndexBuilder) => ReadonlyArray<Kysely.CreateIndexBuilder<any>>;
229
+ /**
230
+ * Why a message is stored in `evolu_message_quarantine` instead of being
231
+ * applied to its table. Persisted codes: names may change, but numbers must not
232
+ * be reassigned.
233
+ *
234
+ * Quarantine is queryable state, not an error. An application subscribes to a
235
+ * query over `evolu_message_quarantine` to tell the user what is waiting. Each
236
+ * row is one column of a message, so distinct `ownerId` and `timestamp` pairs
237
+ * count messages. `origin` records whether this database stamped the message
238
+ * for a local mutation or received it from sync, see {@link QuarantineOrigin}.
239
+ * `quarantinedAt` is the system time captured for the request that quarantined
240
+ * the row, in milliseconds; it is null for rows written before Evolu recorded
241
+ * it. The clock-drift rules are described in the Timestamp module.
242
+ *
243
+ * ### Example
244
+ *
245
+ * ```ts
246
+ * import {
247
+ * assertType,
248
+ * createQueryBuilder,
249
+ * type Millis,
250
+ * type OwnerIdBytes,
251
+ * type QuarantineOrigin,
252
+ * QuarantineReason,
253
+ * testEvoluSchema,
254
+ * type TimestampBytes,
255
+ * } from "@evolu/common";
256
+ *
257
+ * const createQuery = createQueryBuilder(testEvoluSchema);
258
+ *
259
+ * // Messages waiting in drift quarantine, one row per message.
260
+ * const driftQuarantineQuery = createQuery((db) =>
261
+ * db
262
+ * .selectFrom("evolu_message_quarantine")
263
+ * .select(["ownerId", "timestamp", "origin", "quarantinedAt"])
264
+ * .where("reason", "=", QuarantineReason.TimestampDrift)
265
+ * .distinct(),
266
+ * );
267
+ *
268
+ * assertType<
269
+ * typeof driftQuarantineQuery.Row,
270
+ * {
271
+ * ownerId: OwnerIdBytes;
272
+ * timestamp: TimestampBytes;
273
+ * origin: QuarantineOrigin;
274
+ * quarantinedAt: Millis | null;
275
+ * }
276
+ * >();
277
+ * ```
278
+ *
279
+ * @group Queries
280
+ */
281
+ export declare const QuarantineReason: {
282
+ /**
283
+ * The message has a table or column the current schema does not define. It is
284
+ * applied automatically once a schema update defines them. A received change
285
+ * to a {@link isLocalOnlyTable | local-only} table is also stored here and is
286
+ * never applied.
287
+ */
288
+ readonly Schema: 0;
289
+ /**
290
+ * The message's timestamp exceeded the drift limit when it was stored. It is
291
+ * applied when the database worker starts, once system time comes within the
292
+ * limit of the timestamp.
293
+ */
294
+ readonly TimestampDrift: 1;
295
+ };
296
+ export type QuarantineReason = (typeof QuarantineReason)[keyof typeof QuarantineReason];
297
+ /**
298
+ * Whether a quarantined message was stamped by this database for a local
299
+ * mutation or received from sync. Persisted codes: names may change, but
300
+ * numbers must not be reassigned.
301
+ *
302
+ * @group Queries
303
+ */
304
+ export declare const QuarantineOrigin: {
305
+ readonly LocalMutation: 0;
306
+ readonly ReceivedMessage: 1;
307
+ };
308
+ export type QuarantineOrigin = (typeof QuarantineOrigin)[keyof typeof QuarantineOrigin];
309
+ /**
310
+ * Typed query factory returned by {@link createQueryBuilder}.
311
+ *
312
+ * @group Queries
313
+ */
109
314
  export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback: (db: Pick<Kysely.Kysely<{
110
315
  [Table in keyof S]: {
111
316
  readonly [Column in keyof S[Table]]: Column extends "id" ? StandardSchemaV1.InferOutput<S[Table][Column]> : StandardSchemaV1.InferOutput<S[Table][Column]> | null;
112
317
  } & SystemColumns;
113
318
  } & {
114
319
  readonly evolu_history: {
320
+ readonly ownerId: OwnerIdBytes;
115
321
  readonly timestamp: TimestampBytes;
116
322
  readonly table: keyof S;
117
323
  readonly id: IdBytes;
@@ -119,11 +325,15 @@ export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback:
119
325
  readonly value: SqliteValue;
120
326
  };
121
327
  readonly evolu_message_quarantine: {
328
+ readonly ownerId: OwnerIdBytes;
122
329
  readonly timestamp: TimestampBytes;
123
330
  readonly table: string;
124
331
  readonly id: IdBytes;
125
332
  readonly column: string;
126
333
  readonly value: SqliteValue;
334
+ readonly reason: QuarantineReason;
335
+ readonly origin: QuarantineOrigin;
336
+ readonly quarantinedAt: Millis | null;
127
337
  };
128
338
  }>, "selectFrom" | "fn" | "with" | "withRecursive">) => Kysely.SelectQueryBuilder<any, any, R>, options?: SqliteQueryOptions) => Query<S, Kysely.Simplify<R>>;
129
339
  /**
@@ -134,6 +344,8 @@ export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback:
134
344
  * - `isDeleted`: Soft delete flag created by Evolu and used by the developer to
135
345
  * mark rows as deleted.
136
346
  * - `ownerId`: Represents ownership and logically partitions the database.
347
+ *
348
+ * @group Core
137
349
  */
138
350
  export declare const SystemColumns: ObjectType<{
139
351
  readonly createdAt: typeof DateIso;
@@ -143,6 +355,11 @@ export declare const SystemColumns: ObjectType<{
143
355
  }>;
144
356
  export interface SystemColumns extends InferType<typeof SystemColumns> {
145
357
  }
358
+ /**
359
+ * Kind of a {@link Mutation}: insert, update, or upsert.
360
+ *
361
+ * @group Mutations
362
+ */
146
363
  export type MutationKind = "insert" | "update" | "upsert";
147
364
  /**
148
365
  * Mutation function type. Accepts already-validated values — validation is the
@@ -156,22 +373,48 @@ export type MutationKind = "insert" | "update" | "upsert";
156
373
  * inadvertently generate a large volume of CRDT messages. Each mutation
157
374
  * produces exactly one {@link CrdtMessage} containing all provided columns.
158
375
  *
159
- * Mutations never fail — values are already validated by the caller, and
160
- * changes are stored locally in SQLite.
376
+ * Each mutation must fit within {@link maxMutationSize}. Give every column a
377
+ * Type with a maximum length, such as {@link NonEmptyTrimmedString1000} or
378
+ * `maxLength(100_000)(Uint8Array)`, so that a table's largest values add up to
379
+ * less than the limit and input that is too large is rejected where it enters
380
+ * the app. A larger mutation throws before anything is saved, so the code after
381
+ * it does not run. Check unbounded input with {@link Evolu.getMutationSize}.
382
+ * Large binary data, such as images or videos, does not belong in a single
383
+ * mutation; a chunked API for it is planned.
384
+ *
385
+ * Binary values are copied when the mutation is made, so later changes to a
386
+ * `Uint8Array` do not change what is saved.
161
387
  *
162
388
  * - **insert**: all non-nullable columns required, nullable columns optional,
163
389
  * `id` omitted (auto-generated)
164
390
  * - **update**: only `id` required, everything else optional
165
391
  * - **upsert**: like insert but `id` required too
392
+ *
393
+ * @group Mutations
166
394
  */
167
395
  export type Mutation<S extends EvoluSchema, Kind extends MutationKind> = <TableName extends keyof S>(table: TableName, values: MutationValues<S[TableName], Kind>, options?: MutationOptions) => {
168
396
  readonly id: StandardSchemaV1.InferOutput<S[TableName]["id"]>;
169
397
  };
398
+ /**
399
+ * Options accepted by every {@link Mutation}.
400
+ *
401
+ * @group Mutations
402
+ */
170
403
  export interface MutationOptions {
171
404
  /**
172
- * Called after the mutation is completed and the local state is updated.
173
- * Useful for triggering side effects (e.g., notifications, UI updates) after
174
- * insert, update, or upsert.
405
+ * Called after the mutation's changes are stored and subscribed queries
406
+ * reflect them. Useful for follow-up work (e.g., notifications, navigation)
407
+ * after insert, update, or upsert. It never runs when the database is
408
+ * unavailable.
409
+ *
410
+ * Stored does not always mean visible. A change quarantined for
411
+ * {@link QuarantineReason.TimestampDrift} is stored in
412
+ * `evolu_message_quarantine` without changing application rows. `onComplete`
413
+ * still fires after storage commits; no drift error is reported. Applications
414
+ * can subscribe to the quarantine table; those query results reflect the
415
+ * change before `onComplete` runs. See the
416
+ * {@link @evolu/common!"local-first/Timestamp" | Timestamp module} for drift
417
+ * and release behavior.
175
418
  */
176
419
  readonly onComplete?: () => void;
177
420
  /**
@@ -234,22 +477,34 @@ export interface MutationOptions {
234
477
  */
235
478
  readonly ownerId?: OwnerId;
236
479
  }
480
+ /**
481
+ * Database change produced by a {@link Mutation}, attributed to the
482
+ * {@link OwnerId} that owns the row.
483
+ *
484
+ * @group Mutations
485
+ */
237
486
  export interface MutationChange extends DbChange {
238
487
  readonly ownerId: OwnerId;
239
488
  }
240
489
  /**
241
490
  * Derives the expected values type for a mutation from a table's column schemas
242
491
  * and a {@link MutationKind}.
492
+ *
493
+ * @group Mutations
243
494
  */
244
495
  export type MutationValues<T extends TableSchema, M extends MutationKind> = Simplify<M extends "insert" ? InsertValues<T> : M extends "update" ? UpdateValues<T> : UpsertValues<T>>;
245
496
  /**
246
497
  * Insert values: `id` omitted (auto-generated), nullable columns optional,
247
498
  * non-nullable columns required.
499
+ *
500
+ * @group Mutations
248
501
  */
249
502
  export type InsertValues<T extends TableSchema> = Omit<NullableColumnsToOptional<T>, "id">;
250
503
  /**
251
504
  * Update values: `id` required, all other columns optional. Includes
252
505
  * `isDeleted` for soft deletes.
506
+ *
507
+ * @group Mutations
253
508
  */
254
509
  export type UpdateValues<T extends TableSchema> = {
255
510
  readonly id: StandardSchemaV1.InferOutput<T["id"]>;
@@ -261,30 +516,85 @@ export type UpdateValues<T extends TableSchema> = {
261
516
  /**
262
517
  * Upsert values: `id` required, nullable columns optional, non-nullable columns
263
518
  * required. Includes `isDeleted` for soft deletes.
519
+ *
520
+ * @group Mutations
264
521
  */
265
522
  export type UpsertValues<T extends TableSchema> = NullableColumnsToOptional<T> & {
266
523
  readonly isDeleted?: SqliteBoolean;
267
524
  };
525
+ /**
526
+ * Requires an `id` column in every table.
527
+ *
528
+ * @group Validation
529
+ */
268
530
  export type ValidateSchemaHasId<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? "id" extends keyof S[TableName] ? never : SchemaValidationError<`Table "${TableName & string}" is missing required id column.`> : never : never;
531
+ /**
532
+ * Requires every `id` column output type to extend {@link Id}.
533
+ *
534
+ * @group Validation
535
+ */
269
536
  export type ValidateIdColumnType<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? "id" extends keyof S[TableName] ? StandardSchemaV1.InferOutput<S[TableName]["id"]> extends Id ? never : SchemaValidationError<`Table "${TableName & string}" id column output type must extend Id. Use id("${TableName & string}") from Evolu Type.`> : never : never : never;
537
+ /**
538
+ * Rejects tables that define system column names.
539
+ *
540
+ * @group Validation
541
+ */
270
542
  export type ValidateNoSystemColumns<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? keyof S[TableName] extends infer ColumnName ? ColumnName extends keyof S[TableName] ? ColumnName extends "createdAt" | "updatedAt" | "isDeleted" | "ownerId" ? SchemaValidationError<`Table "${TableName & string}" uses system column name "${ColumnName & string}". System columns (createdAt, updatedAt, isDeleted, ownerId) are added automatically.`> : never : never : never : never : never;
543
+ /**
544
+ * Requires every column output type to be compatible with SQLite.
545
+ *
546
+ * @group Validation
547
+ */
271
548
  export type ValidateColumnTypes<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? keyof S[TableName] extends infer ColumnName ? ColumnName extends keyof S[TableName] ? StandardSchemaV1.InferOutput<S[TableName][ColumnName]> extends SqliteValue | SqliteBoolean ? never : SchemaValidationError<`Table "${TableName & string}" column "${ColumnName & string}" type is not compatible with SQLite. Column types must extend SqliteValue (string, FiniteNumber, Uint8Array, or null).`> : never : never : never : never;
272
- /** Schema validation error that shows clear, readable messages */
549
+ /**
550
+ * Schema validation error that shows clear, readable messages
551
+ *
552
+ * @group Validation
553
+ */
273
554
  export type SchemaValidationError<Message extends string> = CompileTimeError<"Schema", Message>;
274
- /** Makes columns whose output type includes `null` optional. */
555
+ /**
556
+ * Makes columns whose output type includes `null` optional.
557
+ *
558
+ * @group Mutations
559
+ */
275
560
  export type NullableColumnsToOptional<T extends TableSchema> = {
276
561
  readonly [K in RequiredColumnKeys<T>]: StandardSchemaV1.InferOutput<T[K]>;
277
562
  } & {
278
563
  readonly [K in OptionalColumnKeys<T>]?: StandardSchemaV1.InferOutput<T[K]>;
279
564
  };
565
+ /**
566
+ * Column names whose output type excludes `null`.
567
+ *
568
+ * @group Mutations
569
+ */
280
570
  export type RequiredColumnKeys<T extends TableSchema> = {
281
571
  [K in keyof T]: null extends StandardSchemaV1.InferOutput<T[K]> ? never : K;
282
572
  }[keyof T];
573
+ /**
574
+ * Column names whose output type includes `null`.
575
+ *
576
+ * @group Mutations
577
+ */
283
578
  export type OptionalColumnKeys<T extends TableSchema> = {
284
579
  [K in keyof T]: null extends StandardSchemaV1.InferOutput<T[K]> ? K : never;
285
580
  }[keyof T];
581
+ /**
582
+ * Names of {@link SystemColumns}.
583
+ *
584
+ * @group Core
585
+ */
286
586
  export declare const systemColumns: ReadonlySet<string>;
587
+ /**
588
+ * Names of {@link SystemColumns} together with `id`.
589
+ *
590
+ * @group Core
591
+ */
287
592
  export declare const systemColumnsWithId: ReadonlyArray<string>;
593
+ /**
594
+ * Derives {@link SqliteSchema} tables and indexes from an {@link EvoluSchema}.
595
+ *
596
+ * @group SQLite
597
+ */
288
598
  export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema: ValidateSchema<S> extends never ? S : ValidateSchema<S>, indexesConfig?: IndexesConfig) => SqliteSchema;
289
599
  /**
290
600
  * Creates a query builder from a {@link EvoluSchema}.
@@ -301,24 +611,14 @@ export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema:
301
611
  * import {
302
612
  * assertType,
303
613
  * createQueryBuilder,
304
- * id,
614
+ * testEvoluSchema,
615
+ * type TestTodoId,
305
616
  * NonEmptyTrimmedString100,
306
- * nullOr,
307
617
  * SqliteBoolean,
308
618
  * } from "@evolu/common";
309
619
  *
310
- * const TodoId = id("Todo");
311
- * type TodoId = typeof TodoId.Output;
312
- * const Schema = {
313
- * todo: {
314
- * id: TodoId,
315
- * title: NonEmptyTrimmedString100,
316
- * isCompleted: nullOr(SqliteBoolean),
317
- * },
318
- * };
319
- *
320
620
  * // Create one typed builder per schema and reuse it for every query.
321
- * const createQuery = createQueryBuilder(Schema);
621
+ * const createQuery = createQueryBuilder(testEvoluSchema);
322
622
  * const todosQuery = createQuery((db) =>
323
623
  * db.selectFrom("todo").select(["id", "title", "isCompleted"]),
324
624
  * );
@@ -326,15 +626,38 @@ export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema:
326
626
  * assertType<
327
627
  * typeof todosQuery.Row,
328
628
  * {
329
- * id: TodoId;
629
+ * id: TestTodoId;
330
630
  * title: NonEmptyTrimmedString100 | null;
331
631
  * isCompleted: SqliteBoolean | null;
332
632
  * }
333
633
  * >();
334
634
  * ```
635
+ *
636
+ * @group Queries
335
637
  */
336
638
  export declare const createQueryBuilder: <S extends EvoluSchema>(_schema: S) => CreateQuery<S>;
639
+ /**
640
+ * Creates missing tables, columns, and indexes, and drops indexes that the new
641
+ * schema no longer defines.
642
+ *
643
+ * @group SQLite
644
+ */
337
645
  export declare const ensureSqliteSchema: (deps: SqliteDep) => (newSchema: SqliteSchema, currentSchema?: SqliteSchema) => void;
646
+ /**
647
+ * Reads the current application {@link SqliteSchema}, excluding Evolu's internal
648
+ * indexes.
649
+ *
650
+ * @group SQLite
651
+ */
338
652
  export declare const getEvoluSqliteSchema: (deps: SqliteDep) => () => SqliteSchema;
653
+ /**
654
+ * Kysely instance that only compiles queries to SQL. It never executes them;
655
+ * Evolu runs the compiled SQL itself.
656
+ *
657
+ * See [Splitting query building and
658
+ * execution](https://kysely.dev/docs/recipes/splitting-query-building-and-execution).
659
+ *
660
+ * @group Queries
661
+ */
339
662
  export declare const kysely: Kysely.Kysely<unknown>;
340
663
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/local-first/Schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAML,aAAa,EACb,KAAK,SAAS,EAGd,KAAK,kBAAkB,EAE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