@beechcms/core 0.6.0-preview.4 → 0.6.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 (236) hide show
  1. package/dist/automations/automations-grammar-words.d.ts.map +1 -0
  2. package/dist/automations/automations.repository.interface.d.ts.map +1 -0
  3. package/dist/automations/automations.runner.interface.d.ts.map +1 -0
  4. package/dist/automations/automations.types.d.ts.map +1 -0
  5. package/dist/common/clock.d.ts.map +1 -0
  6. package/dist/common/email.provider.d.ts +32 -0
  7. package/dist/common/email.provider.d.ts.map +1 -0
  8. package/dist/common/email.provider.js +4 -0
  9. package/dist/{hooks.d.ts → common/hooks.d.ts} +2 -2
  10. package/dist/common/hooks.d.ts.map +1 -0
  11. package/dist/common/id-generator.d.ts.map +1 -0
  12. package/dist/common/storage.d.ts.map +1 -0
  13. package/dist/{content-scan.repository.d.ts → content/content-scan.repository.d.ts} +1 -1
  14. package/dist/content/content-scan.repository.d.ts.map +1 -0
  15. package/dist/{content.repository.d.ts → content/content.repository.d.ts} +13 -4
  16. package/dist/content/content.repository.d.ts.map +1 -0
  17. package/dist/content/demo-data.repository.d.ts.map +1 -0
  18. package/dist/content/idempotency.repository.d.ts.map +1 -0
  19. package/dist/content/richtext/richtext-render.d.ts +12 -0
  20. package/dist/content/richtext/richtext-render.d.ts.map +1 -0
  21. package/dist/{richtext-render.js → content/richtext/richtext-render.js} +7 -14
  22. package/dist/content/richtext/richtext.d.ts.map +1 -0
  23. package/dist/{seed.repository.d.ts → content/seed.repository.d.ts} +1 -1
  24. package/dist/content/seed.repository.d.ts.map +1 -0
  25. package/dist/content/slug-utils.d.ts.map +1 -0
  26. package/dist/{dashboard-layout.d.ts → dashboard-layout/dashboard-layout.d.ts} +1 -1
  27. package/dist/dashboard-layout/dashboard-layout.d.ts.map +1 -0
  28. package/dist/dashboard-layout/dashboard-layout.repository.d.ts.map +1 -0
  29. package/dist/dashboard-layout/dashboard-permissions.d.ts.map +1 -0
  30. package/dist/dashboard-layout/dashboard-scopes.d.ts.map +1 -0
  31. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts +19 -0
  32. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts.map +1 -0
  33. package/dist/dashboard-layout/kanban/kanban.d.ts +75 -0
  34. package/dist/dashboard-layout/kanban/kanban.d.ts.map +1 -0
  35. package/dist/dashboard-layout/kanban/kanban.js +82 -0
  36. package/dist/dashboard-layout/layout-permissions.d.ts.map +1 -0
  37. package/dist/{seed-layout.d.ts → dashboard-layout/seed-layout.d.ts} +77 -3
  38. package/dist/dashboard-layout/seed-layout.d.ts.map +1 -0
  39. package/dist/{seed-layout.js → dashboard-layout/seed-layout.js} +101 -8
  40. package/dist/{seed-layout.repository.d.ts → dashboard-layout/seed-layout.repository.d.ts} +5 -1
  41. package/dist/dashboard-layout/seed-layout.repository.d.ts.map +1 -0
  42. package/dist/dashboard-layout/view-authorization.d.ts +18 -0
  43. package/dist/dashboard-layout/view-authorization.d.ts.map +1 -0
  44. package/dist/dashboard-layout/view-authorization.js +28 -0
  45. package/dist/engine/ddl.d.ts +173 -0
  46. package/dist/engine/ddl.d.ts.map +1 -0
  47. package/dist/engine/ddl.js +454 -0
  48. package/dist/engine/define-seed.d.ts.map +1 -0
  49. package/dist/engine/engine.d.ts +4 -0
  50. package/dist/engine/engine.d.ts.map +1 -0
  51. package/dist/engine/engine.js +4 -0
  52. package/dist/engine/policies.d.ts.map +1 -0
  53. package/dist/engine/query.d.ts +23 -0
  54. package/dist/engine/query.d.ts.map +1 -0
  55. package/dist/engine/query.js +208 -0
  56. package/dist/engine/relations.d.ts.map +1 -0
  57. package/dist/{schema-mutator.d.ts → engine/schema-mutator.d.ts} +4 -0
  58. package/dist/engine/schema-mutator.d.ts.map +1 -0
  59. package/dist/engine/seed-ddl-destructive.d.ts.map +1 -0
  60. package/dist/engine/seed-ddl.d.ts.map +1 -0
  61. package/dist/engine/seed-registry.d.ts.map +1 -0
  62. package/dist/{seed-registry.js → engine/seed-registry.js} +1 -1
  63. package/dist/engine/seed-types-generator.d.ts +10 -0
  64. package/dist/engine/seed-types-generator.d.ts.map +1 -0
  65. package/dist/engine/seed-types-generator.js +86 -0
  66. package/dist/engine/seed-validation.d.ts.map +1 -0
  67. package/dist/{seed-validation.js → engine/seed-validation.js} +14 -1
  68. package/dist/engine/seeds.d.ts.map +1 -0
  69. package/dist/engine/serialize.d.ts +20 -0
  70. package/dist/engine/serialize.d.ts.map +1 -0
  71. package/dist/engine/serialize.js +160 -0
  72. package/dist/{types.d.ts → engine/types.d.ts} +102 -63
  73. package/dist/engine/types.d.ts.map +1 -0
  74. package/dist/engine/validation/cache.d.ts +12 -0
  75. package/dist/engine/validation/cache.d.ts.map +1 -0
  76. package/dist/engine/validation/cache.js +115 -0
  77. package/dist/engine/validation/file-branch.d.ts +48 -0
  78. package/dist/engine/validation/file-branch.d.ts.map +1 -0
  79. package/dist/engine/validation/file-branch.js +127 -0
  80. package/dist/engine/validation/index.d.ts +115 -0
  81. package/dist/engine/validation/index.d.ts.map +1 -0
  82. package/dist/engine/validation/index.js +333 -0
  83. package/dist/engine/validation/primitives.d.ts +33 -0
  84. package/dist/engine/validation/primitives.d.ts.map +1 -0
  85. package/dist/engine/validation/primitives.js +43 -0
  86. package/dist/engine/validation/richtext-sanitizer.d.ts +30 -0
  87. package/dist/engine/validation/richtext-sanitizer.d.ts.map +1 -0
  88. package/dist/engine/validation/richtext-sanitizer.js +193 -0
  89. package/dist/engine/validation/schema-builders.d.ts +12 -0
  90. package/dist/engine/validation/schema-builders.d.ts.map +1 -0
  91. package/dist/engine/validation/schema-builders.js +322 -0
  92. package/dist/index.d.ts +48 -44
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +48 -44
  95. package/dist/media/file-types.d.ts +13 -0
  96. package/dist/media/file-types.d.ts.map +1 -0
  97. package/dist/media/media.repository.d.ts.map +1 -0
  98. package/dist/queue/queue.interface.d.ts +39 -0
  99. package/dist/queue/queue.interface.d.ts.map +1 -0
  100. package/dist/queue/queue.stub.d.ts +6 -0
  101. package/dist/queue/queue.stub.d.ts.map +1 -0
  102. package/dist/queue/queue.stub.js +8 -0
  103. package/dist/queue/scheduler.interface.d.ts.map +1 -0
  104. package/dist/queue/scheduler.interface.js +3 -0
  105. package/dist/queue/scheduler.stub.d.ts.map +1 -0
  106. package/dist/queue.interface.d.ts +4 -4
  107. package/dist/queue.interface.d.ts.map +1 -1
  108. package/dist/queue.stub.d.ts.map +1 -1
  109. package/dist/rate-limit/rate-limiter.d.ts +5 -0
  110. package/dist/rate-limit/rate-limiter.d.ts.map +1 -1
  111. package/dist/search/search.repository.d.ts +1 -1
  112. package/dist/search/search.repository.d.ts.map +1 -1
  113. package/dist/seed-types-generator.d.ts +1 -1
  114. package/dist/seed-types-generator.d.ts.map +1 -1
  115. package/dist/settings/site-settings.repository.d.ts.map +1 -0
  116. package/dist/settings/site-settings.repository.js +3 -0
  117. package/dist/webhooks/webhook-crypto.d.ts +8 -0
  118. package/dist/webhooks/webhook-crypto.d.ts.map +1 -0
  119. package/dist/webhooks/webhook-crypto.js +37 -0
  120. package/dist/webhooks/webhook-validation.d.ts.map +1 -0
  121. package/dist/widget/widget.repository.d.ts +1 -1
  122. package/dist/widget/widget.repository.d.ts.map +1 -1
  123. package/package.json +4 -3
  124. package/dist/automations-grammar-words.d.ts.map +0 -1
  125. package/dist/automations.repository.interface.d.ts.map +0 -1
  126. package/dist/automations.runner.interface.d.ts.map +0 -1
  127. package/dist/automations.runner.stub.d.ts +0 -5
  128. package/dist/automations.runner.stub.d.ts.map +0 -1
  129. package/dist/automations.runner.stub.js +0 -7
  130. package/dist/automations.types.d.ts.map +0 -1
  131. package/dist/clock.d.ts.map +0 -1
  132. package/dist/content-scan.repository.d.ts.map +0 -1
  133. package/dist/content.repository.d.ts.map +0 -1
  134. package/dist/dashboard-layout.d.ts.map +0 -1
  135. package/dist/dashboard-layout.repository.d.ts.map +0 -1
  136. package/dist/dashboard-permissions.d.ts.map +0 -1
  137. package/dist/dashboard-scopes.d.ts.map +0 -1
  138. package/dist/define-seed.d.ts.map +0 -1
  139. package/dist/demo-data.repository.d.ts.map +0 -1
  140. package/dist/engine.d.ts +0 -144
  141. package/dist/engine.d.ts.map +0 -1
  142. package/dist/engine.js +0 -723
  143. package/dist/file-types.d.ts +0 -13
  144. package/dist/file-types.d.ts.map +0 -1
  145. package/dist/hooks.d.ts.map +0 -1
  146. package/dist/id-generator.d.ts.map +0 -1
  147. package/dist/idempotency.repository.d.ts.map +0 -1
  148. package/dist/layout-permissions.d.ts.map +0 -1
  149. package/dist/media.repository.d.ts.map +0 -1
  150. package/dist/policies.d.ts.map +0 -1
  151. package/dist/relations.d.ts.map +0 -1
  152. package/dist/richtext-render.d.ts +0 -11
  153. package/dist/richtext-render.d.ts.map +0 -1
  154. package/dist/richtext.d.ts.map +0 -1
  155. package/dist/scheduler.interface.d.ts.map +0 -1
  156. package/dist/scheduler.stub.d.ts.map +0 -1
  157. package/dist/schema-mutator.d.ts.map +0 -1
  158. package/dist/seed-ddl-destructive.d.ts.map +0 -1
  159. package/dist/seed-ddl.d.ts.map +0 -1
  160. package/dist/seed-layout.d.ts.map +0 -1
  161. package/dist/seed-layout.repository.d.ts.map +0 -1
  162. package/dist/seed-registry.d.ts.map +0 -1
  163. package/dist/seed-validation.d.ts.map +0 -1
  164. package/dist/seed.repository.d.ts.map +0 -1
  165. package/dist/seeds.d.ts.map +0 -1
  166. package/dist/site-settings.repository.d.ts.map +0 -1
  167. package/dist/slug-utils.d.ts.map +0 -1
  168. package/dist/storage.d.ts.map +0 -1
  169. package/dist/types.d.ts.map +0 -1
  170. package/dist/validation.d.ts +0 -50
  171. package/dist/validation.d.ts.map +0 -1
  172. package/dist/validation.js +0 -659
  173. package/dist/webhook-validation.d.ts.map +0 -1
  174. /package/dist/{automations-grammar-words.d.ts → automations/automations-grammar-words.d.ts} +0 -0
  175. /package/dist/{automations-grammar-words.js → automations/automations-grammar-words.js} +0 -0
  176. /package/dist/{automations.repository.interface.d.ts → automations/automations.repository.interface.d.ts} +0 -0
  177. /package/dist/{automations.repository.interface.js → automations/automations.repository.interface.js} +0 -0
  178. /package/dist/{automations.runner.interface.d.ts → automations/automations.runner.interface.d.ts} +0 -0
  179. /package/dist/{automations.runner.interface.js → automations/automations.runner.interface.js} +0 -0
  180. /package/dist/{automations.types.d.ts → automations/automations.types.d.ts} +0 -0
  181. /package/dist/{automations.types.js → automations/automations.types.js} +0 -0
  182. /package/dist/{clock.d.ts → common/clock.d.ts} +0 -0
  183. /package/dist/{clock.js → common/clock.js} +0 -0
  184. /package/dist/{hooks.js → common/hooks.js} +0 -0
  185. /package/dist/{id-generator.d.ts → common/id-generator.d.ts} +0 -0
  186. /package/dist/{id-generator.js → common/id-generator.js} +0 -0
  187. /package/dist/{storage.d.ts → common/storage.d.ts} +0 -0
  188. /package/dist/{storage.js → common/storage.js} +0 -0
  189. /package/dist/{content-scan.repository.js → content/content-scan.repository.js} +0 -0
  190. /package/dist/{content.repository.js → content/content.repository.js} +0 -0
  191. /package/dist/{demo-data.repository.d.ts → content/demo-data.repository.d.ts} +0 -0
  192. /package/dist/{demo-data.repository.js → content/demo-data.repository.js} +0 -0
  193. /package/dist/{idempotency.repository.d.ts → content/idempotency.repository.d.ts} +0 -0
  194. /package/dist/{idempotency.repository.js → content/idempotency.repository.js} +0 -0
  195. /package/dist/{richtext.d.ts → content/richtext/richtext.d.ts} +0 -0
  196. /package/dist/{richtext.js → content/richtext/richtext.js} +0 -0
  197. /package/dist/{seed.repository.js → content/seed.repository.js} +0 -0
  198. /package/dist/{slug-utils.d.ts → content/slug-utils.d.ts} +0 -0
  199. /package/dist/{slug-utils.js → content/slug-utils.js} +0 -0
  200. /package/dist/{dashboard-layout.js → dashboard-layout/dashboard-layout.js} +0 -0
  201. /package/dist/{dashboard-layout.repository.d.ts → dashboard-layout/dashboard-layout.repository.d.ts} +0 -0
  202. /package/dist/{dashboard-layout.repository.js → dashboard-layout/dashboard-layout.repository.js} +0 -0
  203. /package/dist/{dashboard-permissions.d.ts → dashboard-layout/dashboard-permissions.d.ts} +0 -0
  204. /package/dist/{dashboard-permissions.js → dashboard-layout/dashboard-permissions.js} +0 -0
  205. /package/dist/{dashboard-scopes.d.ts → dashboard-layout/dashboard-scopes.d.ts} +0 -0
  206. /package/dist/{dashboard-scopes.js → dashboard-layout/dashboard-scopes.js} +0 -0
  207. /package/dist/{media.repository.js → dashboard-layout/kanban/kanban-position.repository.js} +0 -0
  208. /package/dist/{layout-permissions.d.ts → dashboard-layout/layout-permissions.d.ts} +0 -0
  209. /package/dist/{layout-permissions.js → dashboard-layout/layout-permissions.js} +0 -0
  210. /package/dist/{seed-layout.repository.js → dashboard-layout/seed-layout.repository.js} +0 -0
  211. /package/dist/{define-seed.d.ts → engine/define-seed.d.ts} +0 -0
  212. /package/dist/{define-seed.js → engine/define-seed.js} +0 -0
  213. /package/dist/{policies.d.ts → engine/policies.d.ts} +0 -0
  214. /package/dist/{policies.js → engine/policies.js} +0 -0
  215. /package/dist/{relations.d.ts → engine/relations.d.ts} +0 -0
  216. /package/dist/{relations.js → engine/relations.js} +0 -0
  217. /package/dist/{schema-mutator.js → engine/schema-mutator.js} +0 -0
  218. /package/dist/{seed-ddl-destructive.d.ts → engine/seed-ddl-destructive.d.ts} +0 -0
  219. /package/dist/{seed-ddl-destructive.js → engine/seed-ddl-destructive.js} +0 -0
  220. /package/dist/{seed-ddl.d.ts → engine/seed-ddl.d.ts} +0 -0
  221. /package/dist/{seed-ddl.js → engine/seed-ddl.js} +0 -0
  222. /package/dist/{seed-registry.d.ts → engine/seed-registry.d.ts} +0 -0
  223. /package/dist/{seed-validation.d.ts → engine/seed-validation.d.ts} +0 -0
  224. /package/dist/{seeds.d.ts → engine/seeds.d.ts} +0 -0
  225. /package/dist/{seeds.js → engine/seeds.js} +0 -0
  226. /package/dist/{types.js → engine/types.js} +0 -0
  227. /package/dist/{file-types.js → media/file-types.js} +0 -0
  228. /package/dist/{media.repository.d.ts → media/media.repository.d.ts} +0 -0
  229. /package/dist/{scheduler.interface.js → media/media.repository.js} +0 -0
  230. /package/dist/{site-settings.repository.js → queue/queue.interface.js} +0 -0
  231. /package/dist/{scheduler.interface.d.ts → queue/scheduler.interface.d.ts} +0 -0
  232. /package/dist/{scheduler.stub.d.ts → queue/scheduler.stub.d.ts} +0 -0
  233. /package/dist/{scheduler.stub.js → queue/scheduler.stub.js} +0 -0
  234. /package/dist/{site-settings.repository.d.ts → settings/site-settings.repository.d.ts} +0 -0
  235. /package/dist/{webhook-validation.d.ts → webhooks/webhook-validation.d.ts} +0 -0
  236. /package/dist/{webhook-validation.js → webhooks/webhook-validation.js} +0 -0
package/dist/engine.d.ts DELETED
@@ -1,144 +0,0 @@
1
- /**
2
- * Botanical Engine: Schema Compiler + Query Builder.
3
- *
4
- * In v0.4.0 each Seed has a dedicated SQL table (`content_{slug}`) with
5
- * real typed columns. This module generates the DDL and builds parameterized queries.
6
- * It does not know about HTTP, auth, or UI — it's a pure TypeScript library.
7
- */
8
- import type { Seed, Branch, SelectOptions, ParameterizedQuery } from './types.js';
9
- export declare function indexableSearchBranches(seed: Seed): Branch[];
10
- /**
11
- * Generates `CREATE TABLE IF NOT EXISTS content_{slug}` with system columns
12
- * + one column per Branch. Pure function: same Seed → same SQL.
13
- */
14
- export declare function generateCreateTable(seed: Seed): string;
15
- /**
16
- * Generates the drafts table `content_{slug}_drafts` for Seeds with `allowDrafts: true`.
17
- * All branch columns are nullable (drafts are partial).
18
- * Returns null if the Seed does not have `allowDrafts: true`.
19
- */
20
- export declare function generateDraftTable(seed: Seed): string | null;
21
- /**
22
- * Generates `ALTER TABLE content_{slug} ADD COLUMN {alias} {type}`.
23
- * New columns are always nullable (SQLite limit on ALTER TABLE).
24
- */
25
- export declare function generateAddColumn(seed: Seed, branch: Branch): string;
26
- /**
27
- * Generates B-tree indexes for status, created_at and every filterable Branch
28
- * with an indexable type (text, number, date, boolean).
29
- */
30
- export declare function generateIndexes(seed: Seed): string[];
31
- /**
32
- * Generates the FTS5 virtual table for indexable text/richtext Branches.
33
- * Returns null if the Seed has no branches with search enabled.
34
- */
35
- export declare function generateFtsTable(seed: Seed): string | null;
36
- /**
37
- * Generates the 3 SQLite triggers (insert/update/delete) that keep the FTS
38
- * automatically synchronized — eliminates the need for manual syncFts.
39
- * Returns an empty array if the Seed has no indexable branches.
40
- */
41
- export declare function generateFtsTriggers(seed: Seed): string[];
42
- /**
43
- * Builds a parameterized SELECT on `content_{slug}`.
44
- * Never uses json_extract — every column is a real column.
45
- * Unknown columns in filters/orderBy are ignored (fail-closed).
46
- */
47
- export declare function buildSelectQuery(seed: Seed, options?: SelectOptions): ParameterizedQuery;
48
- export interface SchemaColumn {
49
- name: string;
50
- sqlType: 'TEXT' | 'REAL' | 'INTEGER';
51
- notNull: boolean;
52
- isPk: boolean;
53
- }
54
- /**
55
- * Returns the list of expected columns for a Seed's table.
56
- * Used by `beech seed:load --diff` to compare current vs expected schema.
57
- */
58
- export declare function getExpectedColumns(seed: Seed): SchemaColumn[];
59
- /**
60
- * Serializes a value for writing to the DB.
61
- * boolean → 0/1 | date → Unix timestamp | json/asset-list → JSON string
62
- */
63
- export declare function serializeForDb(branch: Branch, value: unknown): string | number | null;
64
- /**
65
- * Returns the junction table name for a many-to-many relation branch.
66
- * Format: `rel_<seedSlug>_<branchAlias>`.
67
- */
68
- export declare function junctionTableName(seedSlug: string, branchAlias: string): string;
69
- /**
70
- * Generates `CREATE TABLE IF NOT EXISTS rel_<seed>_<alias>` for a multi-relation
71
- * branch. The parent FK always cascades (parent lifecycle owns the edge);
72
- * the target FK uses `branch.onDelete` (default CASCADE).
73
- *
74
- * @throws {Error} when called on a non-multi-relation branch
75
- * @throws {Error} when `branch.targetSeed` is missing
76
- */
77
- export declare function generateJunctionTable(seed: Seed, branch: Branch): string;
78
- /**
79
- * Generates the two B-tree indexes for a junction table:
80
- * one on `parent_id` (list entries by parent) and one on `target_id`
81
- * (cascade checks from target side).
82
- */
83
- export declare function generateJunctionIndexes(seed: Seed, branch: Branch): string[];
84
- /**
85
- * Generates the drafts junction table `rel_<seed>_<alias>_drafts` for a
86
- * many-to-many relation branch. Note: no FK on `target_id` — targets may be
87
- * deleted between draft save and publish; the FK would be wrong here.
88
- * Returns null when `seed.allowDrafts` is falsy.
89
- */
90
- export declare function generateJunctionDraftTable(seed: Seed, branch: Branch): string | null;
91
- /**
92
- * Returns every `DROP TABLE IF EXISTS` needed to fully remove a content type:
93
- * the main `content_{slug}` table, its `fts_{slug}` virtual table, the
94
- * `content_{slug}_drafts` mirror (when drafts are enabled), and each
95
- * multi-relation junction table `rel_{slug}_{alias}` (+ its `_drafts` mirror).
96
- *
97
- * FTS triggers reference the main table; dropping the main table also drops
98
- * its triggers in SQLite, but we drop the FTS table explicitly so no orphaned
99
- * virtual table survives. Order: junction (children) → drafts → fts → main.
100
- */
101
- export declare function generateDropTable(seed: Seed): string[];
102
- /**
103
- * Returns the `DROP COLUMN` statements for removing a single field.
104
- *
105
- * - For a multi-relation branch (no column on the parent table) it drops the
106
- * junction table `rel_{slug}_{alias}` (+ `_drafts`) instead.
107
- * - For a normal branch it drops the column from `content_{slug}` and, when
108
- * drafts are enabled, the mirror column from `content_{slug}_drafts`.
109
- * - For an orphan column (no matching branch in the definition) it falls back
110
- * to a plain `ALTER TABLE … DROP COLUMN`, never touching drafts.
111
- *
112
- * Callers must rebuild FTS separately (planFtsRebuild) when the dropped column
113
- * was searchable, since SQLite cannot ALTER an fts5 table's columns.
114
- */
115
- export declare function generateDropColumn(seed: Seed, alias: string): string[];
116
- /**
117
- * Returns the `RENAME COLUMN` statements for renaming a field's alias while
118
- * keeping the stable `branch.id`. Renames the column on `content_{slug}` and,
119
- * when drafts are enabled, the mirror column on `content_{slug}_drafts`.
120
- *
121
- * For a multi-relation branch the alias is part of the junction table name, so
122
- * the junction table (+ `_drafts`) is renamed instead of a column.
123
- *
124
- * Callers must rebuild FTS separately (planFtsRebuild) when the renamed column
125
- * was searchable.
126
- */
127
- export declare function generateRenameColumn(seed: Seed, from: string, to: string): string[];
128
- /**
129
- * Returns the add/copy/drop/rename statements that change a column's SQL type
130
- * in place, preserving data via `CAST`. This is the documented simpler
131
- * alternative to SQLite's full 12-step table rebuild.
132
- *
133
- * The `branch` passed in is the *target* definition (already carrying the new
134
- * `type`); its SQL type is read from BRANCH_TYPE_SQL. Multi-relation branches
135
- * have no column to retype and are rejected. Mirrors the change onto the drafts
136
- * table when drafts are enabled. Callers rebuild FTS separately when needed.
137
- */
138
- export declare function generateRetypeColumn(seed: Seed, branch: Branch): string[];
139
- /**
140
- * Deserializes a value read from the DB for the API response.
141
- * 0/1 → boolean | Unix timestamp → ISO 8601 | JSON string → object
142
- */
143
- export declare function deserializeFromDb(branch: Branch, value: unknown): unknown;
144
- //# sourceMappingURL=engine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,IAAI,EACJ,MAAM,EAKN,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAA;AAsCnB,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAI5D;AAkED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA0BtD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAyB5D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAuBpD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAc1D;A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