@beechcms/core 0.8.1 → 0.9.1

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 (362) hide show
  1. package/dist/antivirus/noop-antivirus.provider.d.ts.map +1 -1
  2. package/dist/antivirus/virustotal-antivirus.provider.d.ts.map +1 -1
  3. package/dist/auth/account-email.d.ts +3 -0
  4. package/dist/auth/account-email.d.ts.map +1 -0
  5. package/dist/auth/account-email.js +9 -0
  6. package/dist/auth/password-reset-token.repository.d.ts +13 -2
  7. package/dist/auth/password-reset-token.repository.d.ts.map +1 -1
  8. package/dist/auth/user.repository.d.ts +69 -4
  9. package/dist/auth/user.repository.d.ts.map +1 -1
  10. package/dist/common/canonical-json.d.ts +2 -1
  11. package/dist/common/canonical-json.d.ts.map +1 -1
  12. package/dist/common/canonical-json.js +5 -3
  13. package/dist/content/content-scan.repository.d.ts +1 -1
  14. package/dist/content/content.repository.d.ts +156 -5
  15. package/dist/content/content.repository.d.ts.map +1 -1
  16. package/dist/content/content.repository.js +62 -0
  17. package/dist/content/seed-media-purge.repository.d.ts +34 -0
  18. package/dist/content/seed-media-purge.repository.d.ts.map +1 -0
  19. package/dist/content/seed.repository.d.ts +14 -0
  20. package/dist/content/seed.repository.d.ts.map +1 -1
  21. package/dist/dashboard-layout/content-view.d.ts +757 -0
  22. package/dist/dashboard-layout/content-view.d.ts.map +1 -0
  23. package/dist/dashboard-layout/content-view.js +285 -0
  24. package/dist/dashboard-layout/content-view.repository.d.ts +39 -0
  25. package/dist/dashboard-layout/content-view.repository.d.ts.map +1 -0
  26. package/dist/dashboard-layout/dashboard-layout.d.ts +5 -0
  27. package/dist/dashboard-layout/dashboard-layout.d.ts.map +1 -1
  28. package/dist/dashboard-layout/dashboard-layout.js +17 -9
  29. package/dist/dashboard-layout/kanban/kanban.d.ts +32 -18
  30. package/dist/dashboard-layout/kanban/kanban.d.ts.map +1 -1
  31. package/dist/dashboard-layout/kanban/kanban.js +45 -21
  32. package/dist/dashboard-layout/seed-layout.d.ts +22 -31
  33. package/dist/dashboard-layout/seed-layout.d.ts.map +1 -1
  34. package/dist/dashboard-layout/seed-layout.js +93 -18
  35. package/dist/dashboard-layout/seed-layout.repository.d.ts +1 -5
  36. package/dist/dashboard-layout/seed-layout.repository.d.ts.map +1 -1
  37. package/dist/engine/ddl/ddl.d.ts +31 -0
  38. package/dist/engine/ddl/ddl.d.ts.map +1 -1
  39. package/dist/engine/ddl/ddl.js +92 -13
  40. package/dist/engine/ddl/schema-mutator.d.ts +3 -0
  41. package/dist/engine/ddl/schema-mutator.d.ts.map +1 -1
  42. package/dist/engine/ddl/seed-purge-guards.d.ts +7 -0
  43. package/dist/engine/ddl/seed-purge-guards.d.ts.map +1 -0
  44. package/dist/engine/ddl/seed-purge-guards.js +19 -0
  45. package/dist/engine/engine.d.ts +4 -3
  46. package/dist/engine/engine.d.ts.map +1 -1
  47. package/dist/engine/engine.js +4 -3
  48. package/dist/engine/introspection/relation-audit.d.ts +46 -0
  49. package/dist/engine/introspection/relation-audit.d.ts.map +1 -0
  50. package/dist/engine/introspection/relation-audit.js +103 -0
  51. package/dist/engine/introspection/schema-fingerprint.d.ts +2 -1
  52. package/dist/engine/introspection/schema-fingerprint.d.ts.map +1 -1
  53. package/dist/engine/introspection/schema-fingerprint.js +8 -3
  54. package/dist/engine/privacy/policies.d.ts +1 -1
  55. package/dist/engine/privacy/policies.d.ts.map +1 -1
  56. package/dist/engine/privacy/policies.js +12 -6
  57. package/dist/engine/privacy/privacy.service.d.ts +13 -0
  58. package/dist/engine/privacy/privacy.service.d.ts.map +1 -1
  59. package/dist/engine/privacy/privacy.service.js +24 -0
  60. package/dist/engine/query/active-clause.d.ts +19 -0
  61. package/dist/engine/query/active-clause.d.ts.map +1 -0
  62. package/dist/engine/query/active-clause.js +27 -0
  63. package/dist/engine/query/query.d.ts +14 -1
  64. package/dist/engine/query/query.d.ts.map +1 -1
  65. package/dist/engine/query/query.js +105 -13
  66. package/dist/engine/seeds/candidate-ids.d.ts +14 -0
  67. package/dist/engine/seeds/candidate-ids.d.ts.map +1 -0
  68. package/dist/engine/seeds/candidate-ids.js +40 -0
  69. package/dist/engine/seeds/seed-definition-diff.d.ts +38 -0
  70. package/dist/engine/seeds/seed-definition-diff.d.ts.map +1 -0
  71. package/dist/engine/seeds/seed-definition-diff.js +51 -0
  72. package/dist/engine/seeds/seed-registry.d.ts +17 -0
  73. package/dist/engine/seeds/seed-registry.d.ts.map +1 -1
  74. package/dist/engine/seeds/seed-registry.js +27 -0
  75. package/dist/engine/seeds/seed-types-generator.d.ts.map +1 -1
  76. package/dist/engine/seeds/seed-types-generator.js +4 -5
  77. package/dist/engine/seeds/seed-validation.d.ts +5 -0
  78. package/dist/engine/seeds/seed-validation.d.ts.map +1 -1
  79. package/dist/engine/seeds/seed-validation.js +39 -19
  80. package/dist/engine/seeds/tag-migration.d.ts +73 -0
  81. package/dist/engine/seeds/tag-migration.d.ts.map +1 -0
  82. package/dist/engine/seeds/tag-migration.js +212 -0
  83. package/dist/engine/seeds/tag-options.d.ts +15 -0
  84. package/dist/engine/seeds/tag-options.d.ts.map +1 -0
  85. package/dist/engine/seeds/tag-options.js +111 -0
  86. package/dist/engine/seeds/tag-value.d.ts +31 -0
  87. package/dist/engine/seeds/tag-value.d.ts.map +1 -0
  88. package/dist/engine/seeds/tag-value.js +51 -0
  89. package/dist/engine/types.d.ts +59 -7
  90. package/dist/engine/types.d.ts.map +1 -1
  91. package/dist/engine/validation/cache.d.ts.map +1 -1
  92. package/dist/engine/validation/cache.js +20 -4
  93. package/dist/engine/validation/index.d.ts +12 -1
  94. package/dist/engine/validation/index.d.ts.map +1 -1
  95. package/dist/engine/validation/index.js +29 -33
  96. package/dist/engine/validation/primitives.d.ts +12 -0
  97. package/dist/engine/validation/primitives.d.ts.map +1 -1
  98. package/dist/engine/validation/primitives.js +22 -0
  99. package/dist/engine/validation/richtext-sanitizer.d.ts +9 -1
  100. package/dist/engine/validation/richtext-sanitizer.d.ts.map +1 -1
  101. package/dist/engine/validation/richtext-sanitizer.js +36 -7
  102. package/dist/engine/validation/schema-builders.d.ts +16 -0
  103. package/dist/engine/validation/schema-builders.d.ts.map +1 -1
  104. package/dist/engine/validation/schema-builders.js +125 -18
  105. package/dist/index.d.ts +34 -11
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +34 -11
  108. package/dist/media/file-types.d.ts +12 -0
  109. package/dist/media/file-types.d.ts.map +1 -1
  110. package/dist/media/file-types.js +24 -4
  111. package/dist/media/magic-bytes.d.ts.map +1 -1
  112. package/dist/media/magic-bytes.js +19 -9
  113. package/dist/media/media-transform.d.ts +8 -4
  114. package/dist/media/media-transform.d.ts.map +1 -1
  115. package/dist/media/media-transform.js +10 -6
  116. package/dist/media/media.repository.d.ts +5 -0
  117. package/dist/media/media.repository.d.ts.map +1 -1
  118. package/dist/notifications/notification-service.d.ts +1 -1
  119. package/dist/notifications/notification.repository.d.ts +11 -2
  120. package/dist/notifications/notification.repository.d.ts.map +1 -1
  121. package/dist/oauth/authorization-code.repository.d.ts +10 -5
  122. package/dist/oauth/authorization-code.repository.d.ts.map +1 -1
  123. package/dist/oauth/pkce.d.ts +1 -1
  124. package/dist/oauth/role-guard.d.ts +30 -11
  125. package/dist/oauth/role-guard.d.ts.map +1 -1
  126. package/dist/oauth/role-guard.js +27 -5
  127. package/dist/oauth/scopes.d.ts +1 -1
  128. package/dist/oauth/scopes.d.ts.map +1 -1
  129. package/dist/oauth/token.repository.d.ts +2 -0
  130. package/dist/oauth/token.repository.d.ts.map +1 -1
  131. package/dist/queue/queue.interface.d.ts +9 -1
  132. package/dist/queue/queue.interface.d.ts.map +1 -1
  133. package/dist/queue/queue.stub.d.ts +1 -1
  134. package/dist/queue/queue.stub.d.ts.map +1 -1
  135. package/dist/queue/queue.stub.js +2 -3
  136. package/dist/queue/scheduler.stub.d.ts.map +1 -1
  137. package/dist/rate-limit/token-bucket-rate-limiter.d.ts +7 -0
  138. package/dist/rate-limit/token-bucket-rate-limiter.d.ts.map +1 -1
  139. package/dist/rate-limit/token-bucket-rate-limiter.js +66 -0
  140. package/dist/rbac/invitation.repository.d.ts +28 -10
  141. package/dist/rbac/invitation.repository.d.ts.map +1 -1
  142. package/dist/rbac/types.d.ts +40 -28
  143. package/dist/rbac/types.d.ts.map +1 -1
  144. package/dist/rbac/types.js +2 -1
  145. package/dist/schema/manifest-seeds.js +3 -3
  146. package/dist/search/search.repository.d.ts +5 -4
  147. package/dist/search/search.repository.d.ts.map +1 -1
  148. package/dist/search/vector-extractor.d.ts.map +1 -1
  149. package/dist/search/vector-extractor.js +23 -2
  150. package/dist/search/vector.repository.d.ts +2 -1
  151. package/dist/search/vector.repository.d.ts.map +1 -1
  152. package/dist/security/time-trap-token.repository.d.ts +5 -3
  153. package/dist/security/time-trap-token.repository.d.ts.map +1 -1
  154. package/dist/settings/site-settings.repository.d.ts +8 -0
  155. package/dist/settings/site-settings.repository.d.ts.map +1 -1
  156. package/dist/transfer/flat-seed.d.ts.map +1 -1
  157. package/dist/transfer/flat-seed.js +6 -1
  158. package/dist/transfer/row-mapping.d.ts.map +1 -1
  159. package/dist/transfer/row-mapping.js +9 -2
  160. package/package.json +9 -4
  161. package/dist/.tsbuildinfo +0 -1
  162. package/dist/automations-grammar-words.d.ts +0 -2
  163. package/dist/automations-grammar-words.d.ts.map +0 -1
  164. package/dist/automations-grammar-words.js +0 -8
  165. package/dist/automations.repository.interface.d.ts +0 -19
  166. package/dist/automations.repository.interface.d.ts.map +0 -1
  167. package/dist/automations.runner.interface.d.ts +0 -10
  168. package/dist/automations.runner.interface.d.ts.map +0 -1
  169. package/dist/automations.runner.stub.d.ts +0 -5
  170. package/dist/automations.runner.stub.d.ts.map +0 -1
  171. package/dist/automations.runner.stub.js +0 -7
  172. package/dist/automations.types.d.ts +0 -75
  173. package/dist/automations.types.d.ts.map +0 -1
  174. package/dist/automations.types.js +0 -3
  175. package/dist/clock.d.ts +0 -25
  176. package/dist/clock.d.ts.map +0 -1
  177. package/dist/clock.js +0 -11
  178. package/dist/content-scan.repository.d.ts +0 -9
  179. package/dist/content-scan.repository.d.ts.map +0 -1
  180. package/dist/content-scan.repository.js +0 -3
  181. package/dist/content.repository.d.ts +0 -247
  182. package/dist/content.repository.d.ts.map +0 -1
  183. package/dist/content.repository.js +0 -59
  184. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts +0 -19
  185. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts.map +0 -1
  186. package/dist/dashboard-layout/kanban/kanban-position.repository.js +0 -3
  187. package/dist/dashboard-layout.d.ts +0 -154
  188. package/dist/dashboard-layout.d.ts.map +0 -1
  189. package/dist/dashboard-layout.js +0 -186
  190. package/dist/dashboard-layout.repository.d.ts +0 -18
  191. package/dist/dashboard-layout.repository.d.ts.map +0 -1
  192. package/dist/dashboard-layout.repository.js +0 -3
  193. package/dist/dashboard-permissions.d.ts +0 -3
  194. package/dist/dashboard-permissions.d.ts.map +0 -1
  195. package/dist/dashboard-permissions.js +0 -11
  196. package/dist/dashboard-scopes.d.ts +0 -12
  197. package/dist/dashboard-scopes.d.ts.map +0 -1
  198. package/dist/dashboard-scopes.js +0 -30
  199. package/dist/define-seed.d.ts +0 -3
  200. package/dist/define-seed.d.ts.map +0 -1
  201. package/dist/define-seed.js +0 -5
  202. package/dist/demo-data.repository.d.ts +0 -5
  203. package/dist/demo-data.repository.d.ts.map +0 -1
  204. package/dist/demo-data.repository.js +0 -3
  205. package/dist/email.provider.d.ts +0 -32
  206. package/dist/email.provider.d.ts.map +0 -1
  207. package/dist/email.provider.js +0 -4
  208. package/dist/engine/ddl/seed-ddl-destructive.d.ts +0 -40
  209. package/dist/engine/ddl/seed-ddl-destructive.d.ts.map +0 -1
  210. package/dist/engine/ddl/seed-ddl-destructive.js +0 -149
  211. package/dist/engine/ddl.d.ts +0 -193
  212. package/dist/engine/ddl.d.ts.map +0 -1
  213. package/dist/engine/ddl.js +0 -518
  214. package/dist/engine/define-seed.d.ts +0 -3
  215. package/dist/engine/define-seed.d.ts.map +0 -1
  216. package/dist/engine/define-seed.js +0 -5
  217. package/dist/engine/introspection.d.ts +0 -101
  218. package/dist/engine/introspection.d.ts.map +0 -1
  219. package/dist/engine/introspection.js +0 -127
  220. package/dist/engine/localization.d.ts +0 -127
  221. package/dist/engine/localization.d.ts.map +0 -1
  222. package/dist/engine/localization.js +0 -212
  223. package/dist/engine/policies.d.ts +0 -58
  224. package/dist/engine/policies.d.ts.map +0 -1
  225. package/dist/engine/policies.js +0 -168
  226. package/dist/engine/privacy.service.d.ts +0 -65
  227. package/dist/engine/privacy.service.d.ts.map +0 -1
  228. package/dist/engine/privacy.service.js +0 -114
  229. package/dist/engine/query.d.ts +0 -23
  230. package/dist/engine/query.d.ts.map +0 -1
  231. package/dist/engine/query.js +0 -236
  232. package/dist/engine/relations.d.ts +0 -28
  233. package/dist/engine/relations.d.ts.map +0 -1
  234. package/dist/engine/relations.js +0 -25
  235. package/dist/engine/schema-fingerprint.d.ts +0 -73
  236. package/dist/engine/schema-fingerprint.d.ts.map +0 -1
  237. package/dist/engine/schema-fingerprint.js +0 -97
  238. package/dist/engine/schema-mutator.d.ts +0 -26
  239. package/dist/engine/schema-mutator.d.ts.map +0 -1
  240. package/dist/engine/schema-mutator.js +0 -3
  241. package/dist/engine/seed-ddl-destructive.d.ts +0 -40
  242. package/dist/engine/seed-ddl-destructive.d.ts.map +0 -1
  243. package/dist/engine/seed-ddl-destructive.js +0 -149
  244. package/dist/engine/seed-ddl.d.ts +0 -40
  245. package/dist/engine/seed-ddl.d.ts.map +0 -1
  246. package/dist/engine/seed-ddl.js +0 -100
  247. package/dist/engine/seed-registry.d.ts +0 -71
  248. package/dist/engine/seed-registry.d.ts.map +0 -1
  249. package/dist/engine/seed-registry.js +0 -167
  250. package/dist/engine/seed-types-generator.d.ts +0 -10
  251. package/dist/engine/seed-types-generator.d.ts.map +0 -1
  252. package/dist/engine/seed-types-generator.js +0 -89
  253. package/dist/engine/seed-validation.d.ts +0 -30
  254. package/dist/engine/seed-validation.d.ts.map +0 -1
  255. package/dist/engine/seed-validation.js +0 -319
  256. package/dist/engine/seeds.d.ts +0 -20
  257. package/dist/engine/seeds.d.ts.map +0 -1
  258. package/dist/engine/seeds.js +0 -21
  259. package/dist/engine/serialize.d.ts +0 -20
  260. package/dist/engine/serialize.d.ts.map +0 -1
  261. package/dist/engine/serialize.js +0 -160
  262. package/dist/engine.d.ts +0 -144
  263. package/dist/engine.d.ts.map +0 -1
  264. package/dist/engine.js +0 -741
  265. package/dist/file-types.d.ts +0 -13
  266. package/dist/file-types.d.ts.map +0 -1
  267. package/dist/file-types.js +0 -85
  268. package/dist/hooks.d.ts +0 -29
  269. package/dist/hooks.d.ts.map +0 -1
  270. package/dist/hooks.js +0 -3
  271. package/dist/id-generator.d.ts +0 -26
  272. package/dist/id-generator.d.ts.map +0 -1
  273. package/dist/id-generator.js +0 -12
  274. package/dist/idempotency.repository.d.ts +0 -13
  275. package/dist/idempotency.repository.d.ts.map +0 -1
  276. package/dist/idempotency.repository.js +0 -3
  277. package/dist/kanban-position.repository.d.ts +0 -19
  278. package/dist/kanban-position.repository.d.ts.map +0 -1
  279. package/dist/kanban-position.repository.js +0 -3
  280. package/dist/kanban.d.ts +0 -75
  281. package/dist/kanban.d.ts.map +0 -1
  282. package/dist/kanban.js +0 -82
  283. package/dist/layout-permissions.d.ts +0 -3
  284. package/dist/layout-permissions.d.ts.map +0 -1
  285. package/dist/layout-permissions.js +0 -11
  286. package/dist/media.repository.d.ts +0 -61
  287. package/dist/media.repository.d.ts.map +0 -1
  288. package/dist/media.repository.js +0 -3
  289. package/dist/policies.d.ts +0 -10
  290. package/dist/policies.d.ts.map +0 -1
  291. package/dist/policies.js +0 -33
  292. package/dist/queue.interface.d.ts +0 -39
  293. package/dist/queue.interface.d.ts.map +0 -1
  294. package/dist/queue.interface.js +0 -3
  295. package/dist/queue.stub.d.ts +0 -6
  296. package/dist/queue.stub.d.ts.map +0 -1
  297. package/dist/queue.stub.js +0 -8
  298. package/dist/relations.d.ts +0 -28
  299. package/dist/relations.d.ts.map +0 -1
  300. package/dist/relations.js +0 -25
  301. package/dist/richtext-render.d.ts +0 -11
  302. package/dist/richtext-render.d.ts.map +0 -1
  303. package/dist/richtext-render.js +0 -87
  304. package/dist/richtext.d.ts +0 -11
  305. package/dist/richtext.d.ts.map +0 -1
  306. package/dist/richtext.js +0 -13
  307. package/dist/scheduler.interface.d.ts +0 -4
  308. package/dist/scheduler.interface.d.ts.map +0 -1
  309. package/dist/scheduler.interface.js +0 -3
  310. package/dist/scheduler.stub.d.ts +0 -5
  311. package/dist/scheduler.stub.d.ts.map +0 -1
  312. package/dist/scheduler.stub.js +0 -7
  313. package/dist/schema-mutator.d.ts +0 -26
  314. package/dist/schema-mutator.d.ts.map +0 -1
  315. package/dist/schema-mutator.js +0 -3
  316. package/dist/seed-ddl-destructive.d.ts +0 -40
  317. package/dist/seed-ddl-destructive.d.ts.map +0 -1
  318. package/dist/seed-ddl-destructive.js +0 -149
  319. package/dist/seed-ddl.d.ts +0 -40
  320. package/dist/seed-ddl.d.ts.map +0 -1
  321. package/dist/seed-ddl.js +0 -100
  322. package/dist/seed-layout.d.ts +0 -145
  323. package/dist/seed-layout.d.ts.map +0 -1
  324. package/dist/seed-layout.js +0 -192
  325. package/dist/seed-layout.repository.d.ts +0 -22
  326. package/dist/seed-layout.repository.d.ts.map +0 -1
  327. package/dist/seed-layout.repository.js +0 -3
  328. package/dist/seed-registry.d.ts +0 -71
  329. package/dist/seed-registry.d.ts.map +0 -1
  330. package/dist/seed-registry.js +0 -143
  331. package/dist/seed-types-generator.d.ts +0 -10
  332. package/dist/seed-types-generator.d.ts.map +0 -1
  333. package/dist/seed-types-generator.js +0 -86
  334. package/dist/seed-validation.d.ts +0 -23
  335. package/dist/seed-validation.d.ts.map +0 -1
  336. package/dist/seed-validation.js +0 -224
  337. package/dist/seed.repository.d.ts +0 -37
  338. package/dist/seed.repository.d.ts.map +0 -1
  339. package/dist/seed.repository.js +0 -3
  340. package/dist/seeds.d.ts +0 -20
  341. package/dist/seeds.d.ts.map +0 -1
  342. package/dist/seeds.js +0 -21
  343. package/dist/site-settings.repository.d.ts +0 -16
  344. package/dist/site-settings.repository.d.ts.map +0 -1
  345. package/dist/site-settings.repository.js +0 -3
  346. package/dist/slug-utils.d.ts +0 -18
  347. package/dist/slug-utils.d.ts.map +0 -1
  348. package/dist/slug-utils.js +0 -32
  349. package/dist/storage.d.ts +0 -46
  350. package/dist/storage.d.ts.map +0 -1
  351. package/dist/storage.js +0 -3
  352. package/dist/types.d.ts +0 -243
  353. package/dist/types.d.ts.map +0 -1
  354. package/dist/types.js +0 -3
  355. package/dist/validation.d.ts +0 -50
  356. package/dist/validation.d.ts.map +0 -1
  357. package/dist/validation.js +0 -660
  358. package/dist/webhook-validation.d.ts +0 -3
  359. package/dist/webhook-validation.d.ts.map +0 -1
  360. package/dist/webhook-validation.js +0 -6
  361. /package/dist/{automations.repository.interface.js → content/seed-media-purge.repository.js} +0 -0
  362. /package/dist/{automations.runner.interface.js → dashboard-layout/content-view.repository.js} +0 -0
@@ -1,193 +0,0 @@
1
- import type { Seed, Branch } from './types.js';
2
- /**
3
- * Helper function to determine if a branch requires a blind index column.
4
- * Returns true if storage classification is 'encrypt' and filtering is not explicitly disabled.
5
- */
6
- export declare function hasBlindIndex(branch: Branch): boolean;
7
- /**
8
- * System-defined columns that exist on all content tables.
9
- */
10
- export declare const SYSTEM_COLUMNS: Set<string>;
11
- /**
12
- * Returns the SQL table name for a given Seed.
13
- *
14
- * @param seed The seed definition.
15
- * @returns The table name.
16
- */
17
- export declare function tableName(seed: Seed): string;
18
- /**
19
- * Returns the FTS (Full-Text Search) virtual table name for a given Seed.
20
- *
21
- * @param seed The seed definition.
22
- * @returns The FTS table name.
23
- */
24
- export declare function ftsTableName(seed: Seed): string;
25
- /**
26
- * Returns the vector table name for a given Seed.
27
- *
28
- * @param seed The seed definition.
29
- * @returns The vector table name.
30
- */
31
- export declare function vectorTableName(seed: Seed): string;
32
- /**
33
- * Determines whether a column is valid for a given Seed (either system column or branch alias).
34
- *
35
- * @param seed The seed definition.
36
- * @param col The column name to check.
37
- * @returns True if the column is valid, false otherwise.
38
- */
39
- export declare function isValidColumn(seed: Seed, col: string): boolean;
40
- /**
41
- * Filters the branches of a Seed to return only the ones that are indexable for full-text search.
42
- *
43
- * @param seed The seed definition.
44
- * @returns An array of indexable branches.
45
- */
46
- export declare function indexableSearchBranches(seed: Seed): Branch[];
47
- /**
48
- * Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}` statement
49
- * with system columns and one column per branch.
50
- *
51
- * @param seed The seed definition.
52
- * @returns The CREATE TABLE SQL statement.
53
- */
54
- export declare function generateCreateTable(seed: Seed): string;
55
- /**
56
- * Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}_drafts` statement
57
- * for seeds that allow drafts.
58
- *
59
- * @param seed The seed definition.
60
- * @returns The draft table CREATE TABLE SQL statement, or null if drafts are disabled.
61
- */
62
- export declare function generateDraftTable(seed: Seed): string | null;
63
- /**
64
- * Generates the SQL `ALTER TABLE content_{slug} ADD COLUMN {alias} {type}` statement.
65
- *
66
- * @param seed The seed definition.
67
- * @param branch The branch definition for the new column.
68
- * @returns The ALTER TABLE SQL statement.
69
- */
70
- export declare function generateAddColumn(seed: Seed, branch: Branch): string;
71
- /**
72
- * Generates SQL index statements for system fields (status, created_at)
73
- * and indexable branch columns.
74
- *
75
- * @param seed The seed definition.
76
- * @returns An array of CREATE INDEX SQL statements.
77
- */
78
- export declare function generateIndexes(seed: Seed): string[];
79
- /**
80
- * Generates the FTS5 virtual table definition for indexable text/richtext branches.
81
- *
82
- * @param seed The seed definition.
83
- * @returns The CREATE VIRTUAL TABLE SQL statement, or null if no branches are indexable.
84
- */
85
- export declare function generateFtsTable(seed: Seed): string | null;
86
- /**
87
- * Generates FTS5 triggers (insert, update, delete) to keep the FTS virtual table synchronized.
88
- *
89
- * @param seed The seed definition.
90
- * @returns An array of CREATE TRIGGER SQL statements.
91
- */
92
- export declare function generateFtsTriggers(seed: Seed): string[];
93
- /**
94
- * Generates the SQL `CREATE TABLE IF NOT EXISTS vector_{slug}` statement
95
- * for indexable text/richtext branches.
96
- *
97
- * @param seed The seed definition.
98
- * @returns The CREATE TABLE SQL statement, or null if no branches are indexable.
99
- */
100
- export declare function generateVectorTable(seed: Seed): string | null;
101
- /**
102
- * Expected database schema column interface.
103
- */
104
- export interface SchemaColumn {
105
- /** Column name. */
106
- name: string;
107
- /** SQLite storage type. */
108
- sqlType: 'TEXT' | 'REAL' | 'INTEGER';
109
- /** Whether the column is NOT NULL. */
110
- notNull: boolean;
111
- /** Whether the column is the PRIMARY KEY. */
112
- isPk: boolean;
113
- }
114
- /**
115
- * Returns the list of expected columns for a Seed's table.
116
- * Used to compare current vs expected schema (diffing).
117
- *
118
- * @param seed The seed definition.
119
- * @returns The array of expected schema columns.
120
- */
121
- export declare function getExpectedColumns(seed: Seed): SchemaColumn[];
122
- /**
123
- * Returns the junction table name for a many-to-many relation branch.
124
- * Format: `rel_<seedSlug>_<branchAlias>`.
125
- *
126
- * @param seedSlug The slug of the parent Seed.
127
- * @param branchAlias The alias of the relation branch.
128
- * @returns The junction table name.
129
- */
130
- export declare function junctionTableName(seedSlug: string, branchAlias: string): string;
131
- /**
132
- * Generates `CREATE TABLE IF NOT EXISTS rel_<seed>_<alias>` statement for a multi-relation branch.
133
- *
134
- * @param seed The parent seed definition.
135
- * @param branch The multi-relation branch definition.
136
- * @throws {Error} If called on a non-multi-relation branch or if `targetSeed` is missing.
137
- * @returns The CREATE TABLE SQL statement.
138
- */
139
- export declare function generateJunctionTable(seed: Seed, branch: Branch): string;
140
- /**
141
- * Generates the two B-tree indexes for a junction table:
142
- * one on `parent_id` (listing entries by parent) and one on `target_id` (handling cascade checks from target side).
143
- *
144
- * @param seed The parent seed definition.
145
- * @param branch The multi-relation branch definition.
146
- * @returns An array of CREATE INDEX SQL statements.
147
- */
148
- export declare function generateJunctionIndexes(seed: Seed, branch: Branch): string[];
149
- /**
150
- * Generates the drafts junction table `rel_<seed>_<alias>_drafts` for a many-to-many relation branch.
151
- *
152
- * @param seed The parent seed definition.
153
- * @param branch The multi-relation branch definition.
154
- * @returns The CREATE TABLE SQL statement, or null if drafts are disabled.
155
- */
156
- export declare function generateJunctionDraftTable(seed: Seed, branch: Branch): string | null;
157
- /**
158
- * Returns every `DROP TABLE IF EXISTS` needed to fully remove a content type:
159
- * the main table, the drafts table (if drafts enabled), full-text search table/triggers, and junction tables.
160
- *
161
- * @param seed The seed definition.
162
- * @returns An array of DROP TABLE / DROP TRIGGER SQL statements.
163
- */
164
- export declare function generateDropTable(seed: Seed): string[];
165
- /**
166
- * Returns the `DROP COLUMN` SQL statements for removing a single field.
167
- * Drops the junction table for multi-relations, or alters the tables to drop the column.
168
- *
169
- * @param seed The seed definition.
170
- * @param alias The alias of the branch to drop.
171
- * @returns An array of SQL statements.
172
- */
173
- export declare function generateDropColumn(seed: Seed, alias: string): string[];
174
- /**
175
- * Returns the `RENAME COLUMN` SQL statements for renaming a field's alias.
176
- * For a multi-relation branch, renames the junction table (+ drafts junction table) instead.
177
- *
178
- * @param seed The seed definition.
179
- * @param from The old alias.
180
- * @param to The new alias.
181
- * @returns An array of SQL statements.
182
- */
183
- export declare function generateRenameColumn(seed: Seed, from: string, to: string): string[];
184
- /**
185
- * Returns the statements that change a column's SQL type in place using CAST, bypassing SQLite rebuild limitations.
186
- *
187
- * @param seed The seed definition.
188
- * @param branch The target branch definition (carrying the new type).
189
- * @throws {Error} If called on a multi-relation branch.
190
- * @returns An array of SQL statements.
191
- */
192
- export declare function generateRetypeColumn(seed: Seed, branch: Branch): string[];
193
- //# sourceMappingURL=ddl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ddl.d.ts","sourceRoot":"","sources":["../../src/engine/ddl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACJ,MAAM,EAOP,MAAM,YAAY,C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