sandcms 0.5.2

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 (391) hide show
  1. package/LICENSE +57 -0
  2. package/README.md +84 -0
  3. package/dist/Image.svelte +53 -0
  4. package/dist/Image.svelte.d.ts +10 -0
  5. package/dist/Seo.svelte +29 -0
  6. package/dist/Seo.svelte.d.ts +10 -0
  7. package/dist/admin/Access.svelte +129 -0
  8. package/dist/admin/Access.svelte.d.ts +7 -0
  9. package/dist/admin/Account.svelte +190 -0
  10. package/dist/admin/Account.svelte.d.ts +7 -0
  11. package/dist/admin/Admin.svelte +42 -0
  12. package/dist/admin/Admin.svelte.d.ts +8 -0
  13. package/dist/admin/AssetAttachment.svelte +77 -0
  14. package/dist/admin/AssetAttachment.svelte.d.ts +15 -0
  15. package/dist/admin/Collection.svelte +52 -0
  16. package/dist/admin/Collection.svelte.d.ts +7 -0
  17. package/dist/admin/Dashboard.svelte +105 -0
  18. package/dist/admin/Dashboard.svelte.d.ts +7 -0
  19. package/dist/admin/Editor.svelte +192 -0
  20. package/dist/admin/Editor.svelte.d.ts +7 -0
  21. package/dist/admin/Fields.svelte +221 -0
  22. package/dist/admin/Fields.svelte.d.ts +17 -0
  23. package/dist/admin/Gallery.svelte +130 -0
  24. package/dist/admin/Gallery.svelte.d.ts +16 -0
  25. package/dist/admin/Inbox.svelte +154 -0
  26. package/dist/admin/Inbox.svelte.d.ts +8 -0
  27. package/dist/admin/Login.svelte +104 -0
  28. package/dist/admin/Login.svelte.d.ts +7 -0
  29. package/dist/admin/MediaLibrary.svelte +231 -0
  30. package/dist/admin/MediaLibrary.svelte.d.ts +7 -0
  31. package/dist/admin/MediaPicker.svelte +273 -0
  32. package/dist/admin/MediaPicker.svelte.d.ts +16 -0
  33. package/dist/admin/Notice.svelte +13 -0
  34. package/dist/admin/Notice.svelte.d.ts +8 -0
  35. package/dist/admin/NotificationSettings.svelte +153 -0
  36. package/dist/admin/NotificationSettings.svelte.d.ts +7 -0
  37. package/dist/admin/RichText.svelte +103 -0
  38. package/dist/admin/RichText.svelte.d.ts +9 -0
  39. package/dist/admin/RichTextLink.svelte +71 -0
  40. package/dist/admin/RichTextLink.svelte.d.ts +7 -0
  41. package/dist/admin/SelectField.svelte +39 -0
  42. package/dist/admin/SelectField.svelte.d.ts +15 -0
  43. package/dist/admin/Shell.svelte +106 -0
  44. package/dist/admin/Shell.svelte.d.ts +9 -0
  45. package/dist/admin/SortableList.svelte +104 -0
  46. package/dist/admin/SortableList.svelte.d.ts +30 -0
  47. package/dist/admin/UnsavedChanges.svelte +54 -0
  48. package/dist/admin/UnsavedChanges.svelte.d.ts +6 -0
  49. package/dist/admin/UploadButton.svelte +42 -0
  50. package/dist/admin/UploadButton.svelte.d.ts +10 -0
  51. package/dist/admin/UploadQueue.svelte +40 -0
  52. package/dist/admin/UploadQueue.svelte.d.ts +7 -0
  53. package/dist/admin/Users.svelte +185 -0
  54. package/dist/admin/Users.svelte.d.ts +7 -0
  55. package/dist/admin/client.d.ts +720 -0
  56. package/dist/admin/client.js +29 -0
  57. package/dist/admin/components/ui/alert/alert-action.svelte +20 -0
  58. package/dist/admin/components/ui/alert/alert-action.svelte.d.ts +5 -0
  59. package/dist/admin/components/ui/alert/alert-description.svelte +23 -0
  60. package/dist/admin/components/ui/alert/alert-description.svelte.d.ts +5 -0
  61. package/dist/admin/components/ui/alert/alert-title.svelte +23 -0
  62. package/dist/admin/components/ui/alert/alert-title.svelte.d.ts +5 -0
  63. package/dist/admin/components/ui/alert/alert.svelte +44 -0
  64. package/dist/admin/components/ui/alert/alert.svelte.d.ts +26 -0
  65. package/dist/admin/components/ui/alert/index.d.ts +6 -0
  66. package/dist/admin/components/ui/alert/index.js +8 -0
  67. package/dist/admin/components/ui/alert-dialog/alert-dialog-action.svelte +27 -0
  68. package/dist/admin/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +9 -0
  69. package/dist/admin/components/ui/alert-dialog/alert-dialog-cancel.svelte +27 -0
  70. package/dist/admin/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
  71. package/dist/admin/components/ui/alert-dialog/alert-dialog-content.svelte +32 -0
  72. package/dist/admin/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +11 -0
  73. package/dist/admin/components/ui/alert-dialog/alert-dialog-description.svelte +20 -0
  74. package/dist/admin/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
  75. package/dist/admin/components/ui/alert-dialog/alert-dialog-footer.svelte +23 -0
  76. package/dist/admin/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
  77. package/dist/admin/components/ui/alert-dialog/alert-dialog-header.svelte +23 -0
  78. package/dist/admin/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
  79. package/dist/admin/components/ui/alert-dialog/alert-dialog-media.svelte +23 -0
  80. package/dist/admin/components/ui/alert-dialog/alert-dialog-media.svelte.d.ts +5 -0
  81. package/dist/admin/components/ui/alert-dialog/alert-dialog-overlay.svelte +20 -0
  82. package/dist/admin/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
  83. package/dist/admin/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
  84. package/dist/admin/components/ui/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
  85. package/dist/admin/components/ui/alert-dialog/alert-dialog-title.svelte +20 -0
  86. package/dist/admin/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
  87. package/dist/admin/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
  88. package/dist/admin/components/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
  89. package/dist/admin/components/ui/alert-dialog/alert-dialog.svelte +7 -0
  90. package/dist/admin/components/ui/alert-dialog/alert-dialog.svelte.d.ts +3 -0
  91. package/dist/admin/components/ui/alert-dialog/index.d.ts +13 -0
  92. package/dist/admin/components/ui/alert-dialog/index.js +15 -0
  93. package/dist/admin/components/ui/attachment/attachment-action.svelte +21 -0
  94. package/dist/admin/components/ui/attachment/attachment-action.svelte.d.ts +4 -0
  95. package/dist/admin/components/ui/attachment/attachment-actions.svelte +23 -0
  96. package/dist/admin/components/ui/attachment/attachment-actions.svelte.d.ts +5 -0
  97. package/dist/admin/components/ui/attachment/attachment-content.svelte +23 -0
  98. package/dist/admin/components/ui/attachment/attachment-content.svelte.d.ts +5 -0
  99. package/dist/admin/components/ui/attachment/attachment-description.svelte +24 -0
  100. package/dist/admin/components/ui/attachment/attachment-description.svelte.d.ts +5 -0
  101. package/dist/admin/components/ui/attachment/attachment-group.svelte +23 -0
  102. package/dist/admin/components/ui/attachment/attachment-group.svelte.d.ts +5 -0
  103. package/dist/admin/components/ui/attachment/attachment-media.svelte +44 -0
  104. package/dist/admin/components/ui/attachment/attachment-media.svelte.d.ts +26 -0
  105. package/dist/admin/components/ui/attachment/attachment-title.svelte +23 -0
  106. package/dist/admin/components/ui/attachment/attachment-title.svelte.d.ts +5 -0
  107. package/dist/admin/components/ui/attachment/attachment-trigger.svelte +29 -0
  108. package/dist/admin/components/ui/attachment/attachment-trigger.svelte.d.ts +11 -0
  109. package/dist/admin/components/ui/attachment/attachment.svelte +54 -0
  110. package/dist/admin/components/ui/attachment/attachment.svelte.d.ts +45 -0
  111. package/dist/admin/components/ui/attachment/index.d.ts +10 -0
  112. package/dist/admin/components/ui/attachment/index.js +12 -0
  113. package/dist/admin/components/ui/avatar/avatar-badge.svelte +26 -0
  114. package/dist/admin/components/ui/avatar/avatar-badge.svelte.d.ts +5 -0
  115. package/dist/admin/components/ui/avatar/avatar-fallback.svelte +20 -0
  116. package/dist/admin/components/ui/avatar/avatar-fallback.svelte.d.ts +4 -0
  117. package/dist/admin/components/ui/avatar/avatar-group-count.svelte +23 -0
  118. package/dist/admin/components/ui/avatar/avatar-group-count.svelte.d.ts +5 -0
  119. package/dist/admin/components/ui/avatar/avatar-group.svelte +23 -0
  120. package/dist/admin/components/ui/avatar/avatar-group.svelte.d.ts +5 -0
  121. package/dist/admin/components/ui/avatar/avatar-image.svelte +17 -0
  122. package/dist/admin/components/ui/avatar/avatar-image.svelte.d.ts +4 -0
  123. package/dist/admin/components/ui/avatar/avatar.svelte +26 -0
  124. package/dist/admin/components/ui/avatar/avatar.svelte.d.ts +7 -0
  125. package/dist/admin/components/ui/avatar/index.d.ts +7 -0
  126. package/dist/admin/components/ui/avatar/index.js +9 -0
  127. package/dist/admin/components/ui/badge/badge.svelte +50 -0
  128. package/dist/admin/components/ui/badge/badge.svelte.d.ts +38 -0
  129. package/dist/admin/components/ui/badge/index.d.ts +2 -0
  130. package/dist/admin/components/ui/badge/index.js +2 -0
  131. package/dist/admin/components/ui/button/button.svelte +87 -0
  132. package/dist/admin/components/ui/button/button.svelte.d.ts +70 -0
  133. package/dist/admin/components/ui/button/index.d.ts +2 -0
  134. package/dist/admin/components/ui/button/index.js +4 -0
  135. package/dist/admin/components/ui/card/card-action.svelte +20 -0
  136. package/dist/admin/components/ui/card/card-action.svelte.d.ts +5 -0
  137. package/dist/admin/components/ui/card/card-content.svelte +20 -0
  138. package/dist/admin/components/ui/card/card-content.svelte.d.ts +5 -0
  139. package/dist/admin/components/ui/card/card-description.svelte +20 -0
  140. package/dist/admin/components/ui/card/card-description.svelte.d.ts +5 -0
  141. package/dist/admin/components/ui/card/card-footer.svelte +20 -0
  142. package/dist/admin/components/ui/card/card-footer.svelte.d.ts +5 -0
  143. package/dist/admin/components/ui/card/card-header.svelte +23 -0
  144. package/dist/admin/components/ui/card/card-header.svelte.d.ts +5 -0
  145. package/dist/admin/components/ui/card/card-title.svelte +20 -0
  146. package/dist/admin/components/ui/card/card-title.svelte.d.ts +5 -0
  147. package/dist/admin/components/ui/card/card.svelte +25 -0
  148. package/dist/admin/components/ui/card/card.svelte.d.ts +8 -0
  149. package/dist/admin/components/ui/card/index.d.ts +8 -0
  150. package/dist/admin/components/ui/card/index.js +10 -0
  151. package/dist/admin/components/ui/checkbox/checkbox.svelte +39 -0
  152. package/dist/admin/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
  153. package/dist/admin/components/ui/checkbox/index.d.ts +2 -0
  154. package/dist/admin/components/ui/checkbox/index.js +4 -0
  155. package/dist/admin/components/ui/dialog/dialog-close.svelte +11 -0
  156. package/dist/admin/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
  157. package/dist/admin/components/ui/dialog/dialog-content.svelte +48 -0
  158. package/dist/admin/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
  159. package/dist/admin/components/ui/dialog/dialog-description.svelte +20 -0
  160. package/dist/admin/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
  161. package/dist/admin/components/ui/dialog/dialog-footer.svelte +32 -0
  162. package/dist/admin/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
  163. package/dist/admin/components/ui/dialog/dialog-header.svelte +20 -0
  164. package/dist/admin/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
  165. package/dist/admin/components/ui/dialog/dialog-overlay.svelte +20 -0
  166. package/dist/admin/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
  167. package/dist/admin/components/ui/dialog/dialog-portal.svelte +7 -0
  168. package/dist/admin/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
  169. package/dist/admin/components/ui/dialog/dialog-title.svelte +17 -0
  170. package/dist/admin/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
  171. package/dist/admin/components/ui/dialog/dialog-trigger.svelte +11 -0
  172. package/dist/admin/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
  173. package/dist/admin/components/ui/dialog/dialog.svelte +7 -0
  174. package/dist/admin/components/ui/dialog/dialog.svelte.d.ts +3 -0
  175. package/dist/admin/components/ui/dialog/index.d.ts +11 -0
  176. package/dist/admin/components/ui/dialog/index.js +13 -0
  177. package/dist/admin/components/ui/input/index.d.ts +2 -0
  178. package/dist/admin/components/ui/input/index.js +4 -0
  179. package/dist/admin/components/ui/input/input.svelte +48 -0
  180. package/dist/admin/components/ui/input/input.svelte.d.ts +13 -0
  181. package/dist/admin/components/ui/label/index.d.ts +2 -0
  182. package/dist/admin/components/ui/label/index.js +4 -0
  183. package/dist/admin/components/ui/label/label.svelte +20 -0
  184. package/dist/admin/components/ui/label/label.svelte.d.ts +4 -0
  185. package/dist/admin/components/ui/select/index.d.ts +13 -0
  186. package/dist/admin/components/ui/select/index.js +15 -0
  187. package/dist/admin/components/ui/select/select-content.svelte +45 -0
  188. package/dist/admin/components/ui/select/select-content.svelte.d.ts +11 -0
  189. package/dist/admin/components/ui/select/select-group-heading.svelte +21 -0
  190. package/dist/admin/components/ui/select/select-group-heading.svelte.d.ts +10 -0
  191. package/dist/admin/components/ui/select/select-group.svelte +17 -0
  192. package/dist/admin/components/ui/select/select-group.svelte.d.ts +4 -0
  193. package/dist/admin/components/ui/select/select-item.svelte +42 -0
  194. package/dist/admin/components/ui/select/select-item.svelte.d.ts +4 -0
  195. package/dist/admin/components/ui/select/select-label.svelte +20 -0
  196. package/dist/admin/components/ui/select/select-label.svelte.d.ts +6 -0
  197. package/dist/admin/components/ui/select/select-portal.svelte +7 -0
  198. package/dist/admin/components/ui/select/select-portal.svelte.d.ts +3 -0
  199. package/dist/admin/components/ui/select/select-scroll-down-button.svelte +23 -0
  200. package/dist/admin/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
  201. package/dist/admin/components/ui/select/select-scroll-up-button.svelte +23 -0
  202. package/dist/admin/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
  203. package/dist/admin/components/ui/select/select-separator.svelte +18 -0
  204. package/dist/admin/components/ui/select/select-separator.svelte.d.ts +4 -0
  205. package/dist/admin/components/ui/select/select-trigger.svelte +29 -0
  206. package/dist/admin/components/ui/select/select-trigger.svelte.d.ts +8 -0
  207. package/dist/admin/components/ui/select/select-value.svelte +7 -0
  208. package/dist/admin/components/ui/select/select-value.svelte.d.ts +4 -0
  209. package/dist/admin/components/ui/select/select.svelte +11 -0
  210. package/dist/admin/components/ui/select/select.svelte.d.ts +3 -0
  211. package/dist/admin/components/ui/separator/index.d.ts +2 -0
  212. package/dist/admin/components/ui/separator/index.js +4 -0
  213. package/dist/admin/components/ui/separator/separator.svelte +21 -0
  214. package/dist/admin/components/ui/separator/separator.svelte.d.ts +4 -0
  215. package/dist/admin/components/ui/switch/index.d.ts +2 -0
  216. package/dist/admin/components/ui/switch/index.js +4 -0
  217. package/dist/admin/components/ui/switch/switch.svelte +34 -0
  218. package/dist/admin/components/ui/switch/switch.svelte.d.ts +8 -0
  219. package/dist/admin/components/ui/table/index.d.ts +9 -0
  220. package/dist/admin/components/ui/table/index.js +11 -0
  221. package/dist/admin/components/ui/table/table-body.svelte +20 -0
  222. package/dist/admin/components/ui/table/table-body.svelte.d.ts +5 -0
  223. package/dist/admin/components/ui/table/table-caption.svelte +20 -0
  224. package/dist/admin/components/ui/table/table-caption.svelte.d.ts +5 -0
  225. package/dist/admin/components/ui/table/table-cell.svelte +20 -0
  226. package/dist/admin/components/ui/table/table-cell.svelte.d.ts +5 -0
  227. package/dist/admin/components/ui/table/table-footer.svelte +20 -0
  228. package/dist/admin/components/ui/table/table-footer.svelte.d.ts +5 -0
  229. package/dist/admin/components/ui/table/table-head.svelte +23 -0
  230. package/dist/admin/components/ui/table/table-head.svelte.d.ts +5 -0
  231. package/dist/admin/components/ui/table/table-header.svelte +20 -0
  232. package/dist/admin/components/ui/table/table-header.svelte.d.ts +5 -0
  233. package/dist/admin/components/ui/table/table-row.svelte +23 -0
  234. package/dist/admin/components/ui/table/table-row.svelte.d.ts +5 -0
  235. package/dist/admin/components/ui/table/table.svelte +22 -0
  236. package/dist/admin/components/ui/table/table.svelte.d.ts +5 -0
  237. package/dist/admin/components/ui/textarea/index.d.ts +2 -0
  238. package/dist/admin/components/ui/textarea/index.js +4 -0
  239. package/dist/admin/components/ui/textarea/textarea.svelte +22 -0
  240. package/dist/admin/components/ui/textarea/textarea.svelte.d.ts +5 -0
  241. package/dist/admin/components/ui/toggle/index.d.ts +3 -0
  242. package/dist/admin/components/ui/toggle/index.js +5 -0
  243. package/dist/admin/components/ui/toggle/toggle.svelte +52 -0
  244. package/dist/admin/components/ui/toggle/toggle.svelte.d.ts +43 -0
  245. package/dist/admin/generated/FONT-LICENSE +93 -0
  246. package/dist/admin/generated/Geist-LICENSE.txt +93 -0
  247. package/dist/admin/generated/admin.css +3276 -0
  248. package/dist/admin/generated/fonts/geist-cyrillic-ext-wght-italic.woff2 +0 -0
  249. package/dist/admin/generated/fonts/geist-cyrillic-ext-wght-normal.woff2 +0 -0
  250. package/dist/admin/generated/fonts/geist-cyrillic-wght-italic.woff2 +0 -0
  251. package/dist/admin/generated/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
  252. package/dist/admin/generated/fonts/geist-latin-ext-wght-italic.woff2 +0 -0
  253. package/dist/admin/generated/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
  254. package/dist/admin/generated/fonts/geist-latin-wght-italic.woff2 +0 -0
  255. package/dist/admin/generated/fonts/geist-latin-wght-normal.woff2 +0 -0
  256. package/dist/admin/generated/fonts/geist-vietnamese-wght-italic.woff2 +0 -0
  257. package/dist/admin/generated/fonts/geist-vietnamese-wght-normal.woff2 +0 -0
  258. package/dist/admin/generated/geist-cyrillic-ext-wght-normal.woff2 +0 -0
  259. package/dist/admin/generated/geist-cyrillic-wght-normal.woff2 +0 -0
  260. package/dist/admin/generated/geist-latin-ext-wght-normal.woff2 +0 -0
  261. package/dist/admin/generated/geist-latin-wght-normal.woff2 +0 -0
  262. package/dist/admin/generated/geist-vietnamese-wght-normal.woff2 +0 -0
  263. package/dist/admin/generated/styles.css +2772 -0
  264. package/dist/admin/index.d.ts +2 -0
  265. package/dist/admin/index.js +1 -0
  266. package/dist/admin/types.d.ts +63 -0
  267. package/dist/admin/types.js +1 -0
  268. package/dist/admin/uploads.d.ts +12 -0
  269. package/dist/admin/uploads.js +23 -0
  270. package/dist/admin/utils.d.ts +11 -0
  271. package/dist/admin/utils.js +1 -0
  272. package/dist/blueprints/files.d.ts +7 -0
  273. package/dist/blueprints/files.js +112 -0
  274. package/dist/blueprints/gallery.d.ts +3 -0
  275. package/dist/blueprints/gallery.js +14 -0
  276. package/dist/blueprints/load.d.ts +6 -0
  277. package/dist/blueprints/load.js +186 -0
  278. package/dist/blueprints/merge.d.ts +2 -0
  279. package/dist/blueprints/merge.js +18 -0
  280. package/dist/blueprints/types.d.ts +58 -0
  281. package/dist/blueprints/types.js +1 -0
  282. package/dist/blueprints/validate.d.ts +8 -0
  283. package/dist/blueprints/validate.js +133 -0
  284. package/dist/cli/backup.d.ts +6 -0
  285. package/dist/cli/backup.js +85 -0
  286. package/dist/cli/cloudflare.d.ts +8 -0
  287. package/dist/cli/cloudflare.js +123 -0
  288. package/dist/cli/doctor.d.ts +1 -0
  289. package/dist/cli/doctor.js +56 -0
  290. package/dist/cli/files.d.ts +30 -0
  291. package/dist/cli/files.js +114 -0
  292. package/dist/cli/index.d.ts +2 -0
  293. package/dist/cli/index.js +182 -0
  294. package/dist/cli/prompts.d.ts +5 -0
  295. package/dist/cli/prompts.js +41 -0
  296. package/dist/cli/scaffold.d.ts +2 -0
  297. package/dist/cli/scaffold.js +58 -0
  298. package/dist/cli/setup.d.ts +11 -0
  299. package/dist/cli/setup.js +116 -0
  300. package/dist/cli/upgrade.d.ts +1 -0
  301. package/dist/cli/upgrade.js +47 -0
  302. package/dist/index.d.ts +5 -0
  303. package/dist/index.js +4 -0
  304. package/dist/media.d.ts +26 -0
  305. package/dist/media.js +27 -0
  306. package/dist/notification-fields.d.ts +8 -0
  307. package/dist/notification-fields.js +26 -0
  308. package/dist/richtext.d.ts +14 -0
  309. package/dist/richtext.js +73 -0
  310. package/dist/server/access.d.ts +16 -0
  311. package/dist/server/access.js +216 -0
  312. package/dist/server/admin-load.d.ts +342 -0
  313. package/dist/server/admin-load.js +135 -0
  314. package/dist/server/api.d.ts +3 -0
  315. package/dist/server/api.js +144 -0
  316. package/dist/server/auth.d.ts +744 -0
  317. package/dist/server/auth.js +142 -0
  318. package/dist/server/blueprint-icons.d.ts +4 -0
  319. package/dist/server/blueprint-icons.js +14 -0
  320. package/dist/server/cms.d.ts +1054 -0
  321. package/dist/server/cms.js +58 -0
  322. package/dist/server/content.d.ts +101 -0
  323. package/dist/server/content.js +285 -0
  324. package/dist/server/db/migration-data.d.ts +4 -0
  325. package/dist/server/db/migration-data.js +7 -0
  326. package/dist/server/db/migrations/0000_foundation.sql +180 -0
  327. package/dist/server/db/migrations/meta/0000_snapshot.json +1188 -0
  328. package/dist/server/db/migrations/meta/_journal.json +13 -0
  329. package/dist/server/db/schema.d.ts +2212 -0
  330. package/dist/server/db/schema.js +171 -0
  331. package/dist/server/db/store.d.ts +33 -0
  332. package/dist/server/db/store.js +131 -0
  333. package/dist/server/email/index.d.ts +50 -0
  334. package/dist/server/email/index.js +175 -0
  335. package/dist/server/email/template.d.ts +8 -0
  336. package/dist/server/email/template.js +53 -0
  337. package/dist/server/forms.d.ts +40 -0
  338. package/dist/server/forms.js +84 -0
  339. package/dist/server/hooks.d.ts +3 -0
  340. package/dist/server/hooks.js +85 -0
  341. package/dist/server/http.d.ts +3 -0
  342. package/dist/server/http.js +3 -0
  343. package/dist/server/index.d.ts +8 -0
  344. package/dist/server/index.js +7 -0
  345. package/dist/server/media/delivery.d.ts +3 -0
  346. package/dist/server/media/delivery.js +42 -0
  347. package/dist/server/media/presets.d.ts +2 -0
  348. package/dist/server/media/presets.js +8 -0
  349. package/dist/server/media/runner.d.ts +2 -0
  350. package/dist/server/media/runner.js +128 -0
  351. package/dist/server/media/service.d.ts +144 -0
  352. package/dist/server/media/service.js +280 -0
  353. package/dist/server/notifications.d.ts +9 -0
  354. package/dist/server/notifications.js +161 -0
  355. package/dist/server/request.d.ts +2 -0
  356. package/dist/server/request.js +39 -0
  357. package/dist/server/seo.d.ts +12 -0
  358. package/dist/server/seo.js +62 -0
  359. package/dist/worker/index.d.ts +10 -0
  360. package/dist/worker/index.js +266 -0
  361. package/dist/worker/source.d.ts +2 -0
  362. package/dist/worker/source.js +31 -0
  363. package/dist/worker/svg.d.ts +5 -0
  364. package/dist/worker/svg.js +142 -0
  365. package/docs/acceptance.md +58 -0
  366. package/docs/cloudflare.md +146 -0
  367. package/docs/content.md +188 -0
  368. package/docs/deployment.md +89 -0
  369. package/docs/email.md +124 -0
  370. package/docs/forms.md +18 -0
  371. package/docs/media.md +105 -0
  372. package/docs/package.md +84 -0
  373. package/docs/releases.md +29 -0
  374. package/docs/upgrades.md +62 -0
  375. package/package.json +124 -0
  376. package/templates/dockerignore +15 -0
  377. package/templates/hooks.server.ts +4 -0
  378. package/templates/integration.ts +20 -0
  379. package/templates/railpack.json +7 -0
  380. package/templates/routes/admin/+page.server.ts +3 -0
  381. package/templates/routes/admin/+page.svelte +6 -0
  382. package/templates/routes/api/+server.ts +4 -0
  383. package/templates/sandcms/blueprints/collections/photographers.yaml +6 -0
  384. package/templates/sandcms/blueprints/collections/projects.yaml +26 -0
  385. package/templates/sandcms/blueprints/files/image.yaml +6 -0
  386. package/templates/sandcms/blueprints/forms/registration.yaml +15 -0
  387. package/templates/sandcms/blueprints/pages/home.yaml +9 -0
  388. package/templates/sandcms/blueprints/site.yaml +13 -0
  389. package/templates/sandcms/config.yaml +12 -0
  390. package/templates/sandcms/worker/index.ts +1 -0
  391. package/templates/sandcms/worker/wrangler.jsonc +7 -0
@@ -0,0 +1,1054 @@
1
+ import { type SeoOptions } from './seo.js';
2
+ import { type EmailOptions } from './email/index.js';
3
+ import { type RequestEvent } from '@sveltejs/kit';
4
+ import type { SiteDefinition } from '../blueprints/types.js';
5
+ export interface CmsOptions {
6
+ database: string;
7
+ origin: string;
8
+ secret: string;
9
+ root?: string;
10
+ definition?: SiteDefinition;
11
+ workerToken?: string;
12
+ workerUrl?: string;
13
+ trustedProxyHeader?: string;
14
+ migrate?: boolean;
15
+ email?: EmailOptions;
16
+ seo?: SeoOptions;
17
+ }
18
+ export declare function createCMS(options: CmsOptions): {
19
+ definition: SiteDefinition;
20
+ store: import("./db/store.js").Store;
21
+ auth: import("better-auth").Auth<{
22
+ appName: string;
23
+ baseURL: string;
24
+ basePath: string;
25
+ secret: string;
26
+ database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
27
+ emailAndPassword: {
28
+ enabled: true;
29
+ disableSignUp: true;
30
+ minPasswordLength: number;
31
+ maxPasswordLength: number;
32
+ };
33
+ trustedOrigins: string[];
34
+ session: {
35
+ expiresIn: number;
36
+ updateAge: number;
37
+ };
38
+ user: {
39
+ additionalFields: {
40
+ role: {
41
+ type: "string";
42
+ defaultValue: string;
43
+ input: false;
44
+ };
45
+ mustChangePassword: {
46
+ type: "boolean";
47
+ defaultValue: true;
48
+ input: false;
49
+ };
50
+ };
51
+ };
52
+ advanced: {
53
+ useSecureCookies: boolean;
54
+ ipAddress: {
55
+ ipAddressHeaders: string[];
56
+ disableIpTracking: boolean;
57
+ };
58
+ };
59
+ rateLimit: {
60
+ enabled: true;
61
+ window: number;
62
+ max: number;
63
+ customRules: {
64
+ '/sign-in/email': {
65
+ window: number;
66
+ max: number;
67
+ };
68
+ };
69
+ };
70
+ plugins: [{
71
+ id: "two-factor";
72
+ version: string;
73
+ endpoints: {
74
+ enableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/enable", {
75
+ method: "POST";
76
+ body: import("zod").ZodObject<{
77
+ password: import("zod").ZodOptional<import("zod").ZodString>;
78
+ method: import("zod").ZodDefault<import("zod").ZodEnum<{
79
+ otp: "otp";
80
+ totp: "totp";
81
+ }>>;
82
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
83
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
84
+ password: import("zod").ZodString;
85
+ method: import("zod").ZodDefault<import("zod").ZodEnum<{
86
+ otp: "otp";
87
+ totp: "totp";
88
+ }>>;
89
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
90
+ }, import("zod/v4/core").$strip>;
91
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
92
+ session: {
93
+ session: Record<string, any> & {
94
+ id: string;
95
+ createdAt: Date;
96
+ updatedAt: Date;
97
+ userId: string;
98
+ expiresAt: Date;
99
+ token: string;
100
+ ipAddress?: string | null | undefined;
101
+ userAgent?: string | null | undefined;
102
+ };
103
+ user: Record<string, any> & {
104
+ id: string;
105
+ createdAt: Date;
106
+ updatedAt: Date;
107
+ email: string;
108
+ emailVerified: boolean;
109
+ name: string;
110
+ image?: string | null | undefined;
111
+ };
112
+ };
113
+ }>>[];
114
+ metadata: {
115
+ openapi: {
116
+ summary: string;
117
+ description: string;
118
+ responses: {
119
+ 200: {
120
+ description: string;
121
+ content: {
122
+ "application/json": {
123
+ schema: {
124
+ type: "object";
125
+ properties: {
126
+ method: {
127
+ type: string;
128
+ enum: string[];
129
+ description: string;
130
+ };
131
+ totpURI: {
132
+ type: string;
133
+ description: string;
134
+ };
135
+ backupCodes: {
136
+ type: string;
137
+ items: {
138
+ type: string;
139
+ };
140
+ description: string;
141
+ };
142
+ };
143
+ required: string[];
144
+ };
145
+ };
146
+ };
147
+ };
148
+ };
149
+ };
150
+ };
151
+ }, {
152
+ method: "otp";
153
+ } | {
154
+ method: "totp";
155
+ totpURI: string;
156
+ backupCodes: string[];
157
+ }>;
158
+ disableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/disable", {
159
+ method: "POST";
160
+ body: import("zod").ZodObject<{
161
+ password: import("zod").ZodOptional<import("zod").ZodString>;
162
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
163
+ password: import("zod").ZodString;
164
+ }, import("zod/v4/core").$strip>;
165
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
166
+ session: {
167
+ session: Record<string, any> & {
168
+ id: string;
169
+ createdAt: Date;
170
+ updatedAt: Date;
171
+ userId: string;
172
+ expiresAt: Date;
173
+ token: string;
174
+ ipAddress?: string | null | undefined;
175
+ userAgent?: string | null | undefined;
176
+ };
177
+ user: Record<string, any> & {
178
+ id: string;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ email: string;
182
+ emailVerified: boolean;
183
+ name: string;
184
+ image?: string | null | undefined;
185
+ };
186
+ };
187
+ }>>[];
188
+ metadata: {
189
+ openapi: {
190
+ summary: string;
191
+ description: string;
192
+ responses: {
193
+ 200: {
194
+ description: string;
195
+ content: {
196
+ "application/json": {
197
+ schema: {
198
+ type: "object";
199
+ properties: {
200
+ status: {
201
+ type: string;
202
+ };
203
+ };
204
+ };
205
+ };
206
+ };
207
+ };
208
+ };
209
+ };
210
+ };
211
+ }, {
212
+ status: boolean;
213
+ }>;
214
+ verifyBackupCode: import("better-auth").StrictEndpoint<"/two-factor/verify-backup-code", {
215
+ method: "POST";
216
+ body: import("zod").ZodObject<{
217
+ code: import("zod").ZodString;
218
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
219
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
220
+ }, import("zod/v4/core").$strip>;
221
+ metadata: {
222
+ openapi: {
223
+ description: string;
224
+ responses: {
225
+ "200": {
226
+ description: string;
227
+ content: {
228
+ "application/json": {
229
+ schema: {
230
+ type: "object";
231
+ properties: {
232
+ user: {
233
+ type: string;
234
+ properties: {
235
+ id: {
236
+ type: string;
237
+ description: string;
238
+ };
239
+ email: {
240
+ type: string;
241
+ format: string;
242
+ nullable: boolean;
243
+ description: string;
244
+ };
245
+ emailVerified: {
246
+ type: string;
247
+ nullable: boolean;
248
+ description: string;
249
+ };
250
+ name: {
251
+ type: string;
252
+ nullable: boolean;
253
+ description: string;
254
+ };
255
+ image: {
256
+ type: string;
257
+ format: string;
258
+ nullable: boolean;
259
+ description: string;
260
+ };
261
+ twoFactorEnabled: {
262
+ type: string;
263
+ description: string;
264
+ };
265
+ createdAt: {
266
+ type: string;
267
+ format: string;
268
+ description: string;
269
+ };
270
+ updatedAt: {
271
+ type: string;
272
+ format: string;
273
+ description: string;
274
+ };
275
+ };
276
+ required: string[];
277
+ description: string;
278
+ };
279
+ session: {
280
+ type: string;
281
+ properties: {
282
+ token: {
283
+ type: string;
284
+ description: string;
285
+ };
286
+ userId: {
287
+ type: string;
288
+ description: string;
289
+ };
290
+ createdAt: {
291
+ type: string;
292
+ format: string;
293
+ description: string;
294
+ };
295
+ expiresAt: {
296
+ type: string;
297
+ format: string;
298
+ description: string;
299
+ };
300
+ };
301
+ required: string[];
302
+ description: string;
303
+ };
304
+ };
305
+ required: string[];
306
+ };
307
+ };
308
+ };
309
+ };
310
+ };
311
+ };
312
+ };
313
+ }, {
314
+ token: string | undefined;
315
+ user: (Record<string, any> & {
316
+ id: string;
317
+ createdAt: Date;
318
+ updatedAt: Date;
319
+ email: string;
320
+ emailVerified: boolean;
321
+ name: string;
322
+ image?: string | null | undefined;
323
+ }) | import("better-auth/plugins").UserWithTwoFactor;
324
+ }>;
325
+ generateBackupCodes: import("better-auth").StrictEndpoint<"/two-factor/generate-backup-codes", {
326
+ method: "POST";
327
+ body: import("zod").ZodObject<{
328
+ password: import("zod").ZodOptional<import("zod").ZodString>;
329
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
330
+ password: import("zod").ZodString;
331
+ }, import("zod/v4/core").$strip>;
332
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
333
+ session: {
334
+ session: Record<string, any> & {
335
+ id: string;
336
+ createdAt: Date;
337
+ updatedAt: Date;
338
+ userId: string;
339
+ expiresAt: Date;
340
+ token: string;
341
+ ipAddress?: string | null | undefined;
342
+ userAgent?: string | null | undefined;
343
+ };
344
+ user: Record<string, any> & {
345
+ id: string;
346
+ createdAt: Date;
347
+ updatedAt: Date;
348
+ email: string;
349
+ emailVerified: boolean;
350
+ name: string;
351
+ image?: string | null | undefined;
352
+ };
353
+ };
354
+ }>>[];
355
+ metadata: {
356
+ openapi: {
357
+ description: string;
358
+ responses: {
359
+ "200": {
360
+ description: string;
361
+ content: {
362
+ "application/json": {
363
+ schema: {
364
+ type: "object";
365
+ properties: {
366
+ status: {
367
+ type: string;
368
+ description: string;
369
+ enum: boolean[];
370
+ };
371
+ backupCodes: {
372
+ type: string;
373
+ items: {
374
+ type: string;
375
+ };
376
+ description: string;
377
+ };
378
+ };
379
+ required: string[];
380
+ };
381
+ };
382
+ };
383
+ };
384
+ };
385
+ };
386
+ };
387
+ }, {
388
+ status: boolean;
389
+ backupCodes: string[];
390
+ }>;
391
+ viewBackupCodes: import("better-auth").StrictEndpoint<string, {
392
+ method: "POST";
393
+ body: import("zod").ZodObject<{
394
+ userId: import("zod").ZodCoercedString<unknown>;
395
+ }, import("zod/v4/core").$strip>;
396
+ }, {
397
+ status: boolean;
398
+ backupCodes: string[];
399
+ }>;
400
+ sendTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/send-otp", {
401
+ method: "POST";
402
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
403
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
404
+ }, import("zod/v4/core").$strip>>;
405
+ metadata: {
406
+ openapi: {
407
+ summary: string;
408
+ description: string;
409
+ responses: {
410
+ 200: {
411
+ description: string;
412
+ content: {
413
+ "application/json": {
414
+ schema: {
415
+ type: "object";
416
+ properties: {
417
+ status: {
418
+ type: string;
419
+ };
420
+ };
421
+ };
422
+ };
423
+ };
424
+ };
425
+ };
426
+ };
427
+ };
428
+ }, {
429
+ status: boolean;
430
+ }>;
431
+ verifyTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-otp", {
432
+ method: "POST";
433
+ body: import("zod").ZodObject<{
434
+ code: import("zod").ZodString;
435
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
436
+ }, import("zod/v4/core").$strip>;
437
+ metadata: {
438
+ openapi: {
439
+ summary: string;
440
+ description: string;
441
+ responses: {
442
+ "200": {
443
+ description: string;
444
+ content: {
445
+ "application/json": {
446
+ schema: {
447
+ type: "object";
448
+ properties: {
449
+ token: {
450
+ type: string;
451
+ description: string;
452
+ };
453
+ user: {
454
+ type: string;
455
+ properties: {
456
+ id: {
457
+ type: string;
458
+ description: string;
459
+ };
460
+ email: {
461
+ type: string;
462
+ format: string;
463
+ nullable: boolean;
464
+ description: string;
465
+ };
466
+ emailVerified: {
467
+ type: string;
468
+ nullable: boolean;
469
+ description: string;
470
+ };
471
+ name: {
472
+ type: string;
473
+ nullable: boolean;
474
+ description: string;
475
+ };
476
+ image: {
477
+ type: string;
478
+ format: string;
479
+ nullable: boolean;
480
+ description: string;
481
+ };
482
+ createdAt: {
483
+ type: string;
484
+ format: string;
485
+ description: string;
486
+ };
487
+ updatedAt: {
488
+ type: string;
489
+ format: string;
490
+ description: string;
491
+ };
492
+ };
493
+ required: string[];
494
+ description: string;
495
+ };
496
+ };
497
+ required: string[];
498
+ };
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ }, {
506
+ token: string;
507
+ user: import("better-auth/plugins").UserWithTwoFactor;
508
+ } | {
509
+ token: string;
510
+ user: Record<string, any> & {
511
+ id: string;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ email: string;
515
+ emailVerified: boolean;
516
+ name: string;
517
+ image?: string | null | undefined;
518
+ };
519
+ }>;
520
+ generateTOTP: import("better-auth").StrictEndpoint<string, {
521
+ method: "POST";
522
+ body: import("zod").ZodObject<{
523
+ secret: import("zod").ZodString;
524
+ }, import("zod/v4/core").$strip>;
525
+ metadata: {
526
+ openapi: {
527
+ summary: string;
528
+ description: string;
529
+ responses: {
530
+ 200: {
531
+ description: string;
532
+ content: {
533
+ "application/json": {
534
+ schema: {
535
+ type: "object";
536
+ properties: {
537
+ code: {
538
+ type: string;
539
+ };
540
+ };
541
+ };
542
+ };
543
+ };
544
+ };
545
+ };
546
+ };
547
+ };
548
+ }, {
549
+ code: string;
550
+ }>;
551
+ getTOTPURI: import("better-auth").StrictEndpoint<"/two-factor/get-totp-uri", {
552
+ method: "POST";
553
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
554
+ session: {
555
+ session: Record<string, any> & {
556
+ id: string;
557
+ createdAt: Date;
558
+ updatedAt: Date;
559
+ userId: string;
560
+ expiresAt: Date;
561
+ token: string;
562
+ ipAddress?: string | null | undefined;
563
+ userAgent?: string | null | undefined;
564
+ };
565
+ user: Record<string, any> & {
566
+ id: string;
567
+ createdAt: Date;
568
+ updatedAt: Date;
569
+ email: string;
570
+ emailVerified: boolean;
571
+ name: string;
572
+ image?: string | null | undefined;
573
+ };
574
+ };
575
+ }>>[];
576
+ body: import("zod").ZodObject<{
577
+ password: import("zod").ZodOptional<import("zod").ZodString>;
578
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
579
+ password: import("zod").ZodString;
580
+ }, import("zod/v4/core").$strip>;
581
+ metadata: {
582
+ openapi: {
583
+ summary: string;
584
+ description: string;
585
+ responses: {
586
+ 200: {
587
+ description: string;
588
+ content: {
589
+ "application/json": {
590
+ schema: {
591
+ type: "object";
592
+ properties: {
593
+ totpURI: {
594
+ type: string;
595
+ };
596
+ };
597
+ };
598
+ };
599
+ };
600
+ };
601
+ };
602
+ };
603
+ };
604
+ }, {
605
+ totpURI: string;
606
+ }>;
607
+ verifyTOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-totp", {
608
+ method: "POST";
609
+ body: import("zod").ZodObject<{
610
+ code: import("zod").ZodString;
611
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
612
+ }, import("zod/v4/core").$strip>;
613
+ metadata: {
614
+ openapi: {
615
+ summary: string;
616
+ description: string;
617
+ responses: {
618
+ 200: {
619
+ description: string;
620
+ content: {
621
+ "application/json": {
622
+ schema: {
623
+ type: "object";
624
+ properties: {
625
+ status: {
626
+ type: string;
627
+ };
628
+ };
629
+ };
630
+ };
631
+ };
632
+ };
633
+ };
634
+ };
635
+ };
636
+ }, {
637
+ token: string;
638
+ user: import("better-auth/plugins").UserWithTwoFactor;
639
+ } | {
640
+ token: string;
641
+ user: Record<string, any> & {
642
+ id: string;
643
+ createdAt: Date;
644
+ updatedAt: Date;
645
+ email: string;
646
+ emailVerified: boolean;
647
+ name: string;
648
+ image?: string | null | undefined;
649
+ };
650
+ }>;
651
+ };
652
+ options: NoInfer<{
653
+ issuer: string;
654
+ }>;
655
+ hooks: {
656
+ after: {
657
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
658
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
659
+ twoFactorRedirect: boolean;
660
+ twoFactorMethods: string[];
661
+ } | undefined>>;
662
+ }[];
663
+ };
664
+ schema: {
665
+ user: {
666
+ fields: {
667
+ twoFactorEnabled: {
668
+ type: "boolean";
669
+ required: false;
670
+ defaultValue: false;
671
+ input: false;
672
+ };
673
+ };
674
+ };
675
+ twoFactor: {
676
+ fields: {
677
+ secret: {
678
+ type: "string";
679
+ required: true;
680
+ returned: false;
681
+ index: true;
682
+ };
683
+ backupCodes: {
684
+ type: "string";
685
+ required: true;
686
+ returned: false;
687
+ };
688
+ userId: {
689
+ type: "string";
690
+ required: true;
691
+ returned: false;
692
+ references: {
693
+ model: string;
694
+ field: string;
695
+ };
696
+ index: true;
697
+ };
698
+ verified: {
699
+ type: "boolean";
700
+ required: false;
701
+ defaultValue: true;
702
+ input: false;
703
+ };
704
+ failedVerificationCount: {
705
+ type: "number";
706
+ required: false;
707
+ defaultValue: number;
708
+ input: false;
709
+ returned: false;
710
+ };
711
+ lockedUntil: {
712
+ type: "date";
713
+ required: false;
714
+ input: false;
715
+ returned: false;
716
+ };
717
+ };
718
+ };
719
+ };
720
+ rateLimit: {
721
+ pathMatcher(path: string): boolean;
722
+ window: number;
723
+ max: number;
724
+ }[];
725
+ $ERROR_CODES: {
726
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
727
+ OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
728
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
729
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
730
+ TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
731
+ TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
732
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
733
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
734
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
735
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
736
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
737
+ ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
738
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
739
+ };
740
+ }];
741
+ }>;
742
+ content: {
743
+ blueprint: (id: string) => import("../blueprints/types.js").Blueprint;
744
+ get: (id: string) => {
745
+ id: string;
746
+ blueprint: string;
747
+ singleton: string | null;
748
+ draft: import("../blueprints/types.js").Payload;
749
+ published: import("../blueprints/types.js").Payload | null;
750
+ draftSlug: string | null;
751
+ publishedSlug: string | null;
752
+ version: number;
753
+ publishedAt: number | null;
754
+ updatedAt: number;
755
+ createdAt: number;
756
+ } | undefined;
757
+ list: (id: string) => {
758
+ id: string;
759
+ blueprint: string;
760
+ singleton: string | null;
761
+ draft: import("../blueprints/types.js").Payload;
762
+ published: import("../blueprints/types.js").Payload | null;
763
+ draftSlug: string | null;
764
+ publishedSlug: string | null;
765
+ version: number;
766
+ publishedAt: number | null;
767
+ updatedAt: number;
768
+ createdAt: number;
769
+ }[];
770
+ ensureSingleton: (id: string) => {
771
+ id: string;
772
+ blueprint: string;
773
+ singleton: string | null;
774
+ draft: import("../blueprints/types.js").Payload;
775
+ published: import("../blueprints/types.js").Payload | null;
776
+ draftSlug: string | null;
777
+ publishedSlug: string | null;
778
+ version: number;
779
+ publishedAt: number | null;
780
+ updatedAt: number;
781
+ createdAt: number;
782
+ };
783
+ save: (blueprintId: string, input: unknown, id?: string, version?: number) => {
784
+ id: string;
785
+ blueprint: string;
786
+ singleton: string | null;
787
+ draft: import("../blueprints/types.js").Payload;
788
+ published: import("../blueprints/types.js").Payload | null;
789
+ draftSlug: string | null;
790
+ publishedSlug: string | null;
791
+ version: number;
792
+ publishedAt: number | null;
793
+ updatedAt: number;
794
+ createdAt: number;
795
+ };
796
+ publish: (id: string, version: number) => {
797
+ id: string;
798
+ blueprint: string;
799
+ singleton: string | null;
800
+ draft: import("../blueprints/types.js").Payload;
801
+ published: import("../blueprints/types.js").Payload | null;
802
+ draftSlug: string | null;
803
+ publishedSlug: string | null;
804
+ version: number;
805
+ publishedAt: number | null;
806
+ updatedAt: number;
807
+ createdAt: number;
808
+ };
809
+ remove: (id: string) => void;
810
+ clearReferences: (targetId: string, kind: "entry" | "media") => void;
811
+ published: (id: string, slug?: string) => {
812
+ id: string;
813
+ blueprint: string;
814
+ data: import("../blueprints/types.js").Payload;
815
+ publishedAt: number | null;
816
+ }[];
817
+ resolveRelation: (id: string) => {
818
+ id: string;
819
+ data: import("../blueprints/types.js").Payload;
820
+ } | null;
821
+ unpublish: (id: string) => {
822
+ id: string;
823
+ blueprint: string;
824
+ singleton: string | null;
825
+ draft: import("../blueprints/types.js").Payload;
826
+ published: import("../blueprints/types.js").Payload | null;
827
+ draftSlug: string | null;
828
+ publishedSlug: string | null;
829
+ version: number;
830
+ publishedAt: number | null;
831
+ updatedAt: number;
832
+ createdAt: number;
833
+ };
834
+ usages: (id: string) => {
835
+ documentId: string;
836
+ snapshot: "draft" | "published";
837
+ blueprint: string;
838
+ }[];
839
+ };
840
+ forms: {
841
+ submit: (formId: string, data: import("../blueprints/types.js").Payload, { clientKey, honeypot }: {
842
+ clientKey: string;
843
+ honeypot?: string;
844
+ }) => Promise<{
845
+ accepted: boolean;
846
+ }>;
847
+ list: (formId: string) => {
848
+ id: string;
849
+ formId: string;
850
+ data: import("../blueprints/types.js").Payload;
851
+ schema: import("../blueprints/types.js").Blueprint;
852
+ read: boolean;
853
+ notification: {
854
+ attemptedAt: number;
855
+ outcomes: import("./db/schema.ts").NotificationOutcome[];
856
+ } | null;
857
+ createdAt: number;
858
+ }[];
859
+ get: (id: string) => {
860
+ id: string;
861
+ formId: string;
862
+ data: import("../blueprints/types.js").Payload;
863
+ schema: import("../blueprints/types.js").Blueprint;
864
+ read: boolean;
865
+ notification: {
866
+ attemptedAt: number;
867
+ outcomes: import("./db/schema.ts").NotificationOutcome[];
868
+ } | null;
869
+ createdAt: number;
870
+ } | undefined;
871
+ mark: (id: string, read: boolean) => void;
872
+ remove: (id: string) => void;
873
+ csv: (formId: string) => string;
874
+ };
875
+ notifications: {
876
+ get: (formId: string) => import("./db/schema.ts").NotificationSettings;
877
+ save: (formId: string, input: unknown, actor: string) => import("./db/schema.ts").NotificationSettings;
878
+ send: (id: string, manual?: boolean) => Promise<void>;
879
+ };
880
+ access: {
881
+ list: () => {
882
+ id: string;
883
+ email: string;
884
+ role: "admin" | "editor";
885
+ expiresAt: number;
886
+ status: "failed" | "sending" | "accepted";
887
+ }[];
888
+ invite: (recipient: string, role: "admin" | "editor", actor: string) => Promise<void>;
889
+ resend: (id: string, actor: string) => Promise<void>;
890
+ revoke: (id: string, actor: string) => void;
891
+ requestReset(recipient: string): Promise<void>;
892
+ redeem(kind: "invite" | "reset", token: string, password: string, name?: string): Promise<void>;
893
+ };
894
+ email: {
895
+ enabled: boolean;
896
+ send(message: import("./email/index.js").EmailMessage): Promise<import("./email/index.js").EmailResult>;
897
+ };
898
+ media: {
899
+ get: (id: string) => {
900
+ blueprint: string;
901
+ metadata: import("../blueprints/types.js").Payload;
902
+ id: string;
903
+ filename: string;
904
+ mime: string;
905
+ bytes: number;
906
+ status: "processing" | "ready" | "failed";
907
+ activeVersion: string | null;
908
+ targetVersion: string;
909
+ variants: import("./db/schema.ts").Variant[];
910
+ error: string | null;
911
+ createdAt: number;
912
+ } | undefined;
913
+ upload: (file: File, blueprintId?: string) => Promise<{
914
+ blueprint: string;
915
+ metadata: import("../blueprints/types.js").Payload;
916
+ id: string;
917
+ filename: string;
918
+ mime: string;
919
+ bytes: number;
920
+ status: "processing" | "ready" | "failed";
921
+ activeVersion: string | null;
922
+ targetVersion: string;
923
+ variants: import("./db/schema.ts").Variant[];
924
+ error: string | null;
925
+ createdAt: number;
926
+ }>;
927
+ tick: () => Promise<boolean>;
928
+ retry: (id: string) => void;
929
+ version: string;
930
+ workerUrl: string;
931
+ list: () => {
932
+ blueprint: string;
933
+ metadata: import("../blueprints/types.js").Payload;
934
+ id: string;
935
+ filename: string;
936
+ mime: string;
937
+ bytes: number;
938
+ status: "processing" | "ready" | "failed";
939
+ activeVersion: string | null;
940
+ targetVersion: string;
941
+ variants: import("./db/schema.ts").Variant[];
942
+ error: string | null;
943
+ createdAt: number;
944
+ }[];
945
+ updateMetadata: (id: string, input: unknown) => void;
946
+ health(): Promise<{
947
+ protocol: number;
948
+ }>;
949
+ rebuild: () => void;
950
+ remove(id: string): Promise<void>;
951
+ publicAsset: (id: string, overrides?: import("../blueprints/types.js").Payload) => {
952
+ id: string;
953
+ blueprint: string;
954
+ metadata: import("../blueprints/types.js").Payload;
955
+ alt: string;
956
+ variants: {
957
+ url: string;
958
+ key: string;
959
+ preset: string;
960
+ size: number;
961
+ width: number;
962
+ height: number;
963
+ format: string;
964
+ }[];
965
+ photographer: {
966
+ id: string;
967
+ name: string;
968
+ } | null;
969
+ } | null;
970
+ previewAsset: (id: string, overrides?: import("../blueprints/types.js").Payload) => {
971
+ id: string;
972
+ blueprint: string;
973
+ metadata: import("../blueprints/types.js").Payload;
974
+ alt: string;
975
+ variants: {
976
+ url: string;
977
+ key: string;
978
+ preset: string;
979
+ size: number;
980
+ width: number;
981
+ height: number;
982
+ format: string;
983
+ }[];
984
+ photographer: {
985
+ id: string;
986
+ name: string;
987
+ } | null;
988
+ } | null;
989
+ deliver(key: string, method: "GET" | "HEAD", preview?: boolean, ifNoneMatch?: string | null): Promise<Response>;
990
+ publicGallery: (rows: unknown, field?: import("../blueprints/types.js").Field) => {
991
+ image: string;
992
+ caption: string;
993
+ asset: {
994
+ id: string;
995
+ blueprint: string;
996
+ metadata: import("../blueprints/types.js").Payload;
997
+ alt: string;
998
+ variants: {
999
+ url: string;
1000
+ key: string;
1001
+ preset: string;
1002
+ size: number;
1003
+ width: number;
1004
+ height: number;
1005
+ format: string;
1006
+ }[];
1007
+ photographer: {
1008
+ id: string;
1009
+ name: string;
1010
+ } | null;
1011
+ };
1012
+ }[];
1013
+ previewGallery: (rows: unknown, field?: import("../blueprints/types.js").Field) => {
1014
+ image: string;
1015
+ caption: string;
1016
+ asset: {
1017
+ id: string;
1018
+ blueprint: string;
1019
+ metadata: import("../blueprints/types.js").Payload;
1020
+ alt: string;
1021
+ variants: {
1022
+ url: string;
1023
+ key: string;
1024
+ preset: string;
1025
+ size: number;
1026
+ width: number;
1027
+ height: number;
1028
+ format: string;
1029
+ }[];
1030
+ photographer: {
1031
+ id: string;
1032
+ name: string;
1033
+ } | null;
1034
+ };
1035
+ }[];
1036
+ start: () => () => void;
1037
+ };
1038
+ options: CmsOptions;
1039
+ seo: {
1040
+ robots(): string;
1041
+ sitemap(): string;
1042
+ } | null;
1043
+ read(blueprint: string, event?: RequestEvent, slug?: string): Promise<{
1044
+ id: string;
1045
+ blueprint: string;
1046
+ data: import("../blueprints/types.js").Payload;
1047
+ publishedAt: number | null;
1048
+ } | {
1049
+ id: string;
1050
+ data: import("../blueprints/types.js").Payload;
1051
+ } | null>;
1052
+ close(): void;
1053
+ };
1054
+ export type CMS = ReturnType<typeof createCMS>;