convex-cms 0.0.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 (379) hide show
  1. package/dist/cli/commands/admin.d.ts +16 -0
  2. package/dist/cli/commands/admin.d.ts.map +1 -0
  3. package/dist/cli/commands/admin.js +88 -0
  4. package/dist/cli/commands/admin.js.map +1 -0
  5. package/dist/cli/index.d.ts +3 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +18 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/cli/utils/detectConvexUrl.d.ts +13 -0
  10. package/dist/cli/utils/detectConvexUrl.d.ts.map +1 -0
  11. package/dist/cli/utils/detectConvexUrl.js +48 -0
  12. package/dist/cli/utils/detectConvexUrl.js.map +1 -0
  13. package/dist/cli/utils/openBrowser.d.ts +7 -0
  14. package/dist/cli/utils/openBrowser.d.ts.map +1 -0
  15. package/dist/cli/utils/openBrowser.js +17 -0
  16. package/dist/cli/utils/openBrowser.js.map +1 -0
  17. package/dist/client/admin-config.d.ts +126 -0
  18. package/dist/client/admin-config.d.ts.map +1 -0
  19. package/dist/client/admin-config.js +117 -0
  20. package/dist/client/admin-config.js.map +1 -0
  21. package/dist/client/adminApi.d.ts +2273 -0
  22. package/dist/client/adminApi.d.ts.map +1 -0
  23. package/dist/client/adminApi.js +716 -0
  24. package/dist/client/adminApi.js.map +1 -0
  25. package/dist/client/agentTools.d.ts +933 -0
  26. package/dist/client/agentTools.d.ts.map +1 -0
  27. package/dist/client/agentTools.js +1004 -0
  28. package/dist/client/agentTools.js.map +1 -0
  29. package/dist/client/argTypes.d.ts +212 -0
  30. package/dist/client/argTypes.d.ts.map +1 -0
  31. package/dist/client/argTypes.js +5 -0
  32. package/dist/client/argTypes.js.map +1 -0
  33. package/dist/client/field-types.d.ts +55 -0
  34. package/dist/client/field-types.d.ts.map +1 -0
  35. package/dist/client/field-types.js +152 -0
  36. package/dist/client/field-types.js.map +1 -0
  37. package/dist/client/index.d.ts +189 -0
  38. package/dist/client/index.d.ts.map +1 -0
  39. package/dist/client/index.js +668 -0
  40. package/dist/client/index.js.map +1 -0
  41. package/dist/client/queryBuilder.d.ts +765 -0
  42. package/dist/client/queryBuilder.d.ts.map +1 -0
  43. package/dist/client/queryBuilder.js +970 -0
  44. package/dist/client/queryBuilder.js.map +1 -0
  45. package/dist/client/schema/codegen.d.ts +128 -0
  46. package/dist/client/schema/codegen.d.ts.map +1 -0
  47. package/dist/client/schema/codegen.js +318 -0
  48. package/dist/client/schema/codegen.js.map +1 -0
  49. package/dist/client/schema/defineContentType.d.ts +221 -0
  50. package/dist/client/schema/defineContentType.d.ts.map +1 -0
  51. package/dist/client/schema/defineContentType.js +380 -0
  52. package/dist/client/schema/defineContentType.js.map +1 -0
  53. package/dist/client/schema/index.d.ts +85 -0
  54. package/dist/client/schema/index.d.ts.map +1 -0
  55. package/dist/client/schema/index.js +92 -0
  56. package/dist/client/schema/index.js.map +1 -0
  57. package/dist/client/schema/schemaDrift.d.ts +199 -0
  58. package/dist/client/schema/schemaDrift.d.ts.map +1 -0
  59. package/dist/client/schema/schemaDrift.js +340 -0
  60. package/dist/client/schema/schemaDrift.js.map +1 -0
  61. package/dist/client/schema/typedClient.d.ts +401 -0
  62. package/dist/client/schema/typedClient.d.ts.map +1 -0
  63. package/dist/client/schema/typedClient.js +269 -0
  64. package/dist/client/schema/typedClient.js.map +1 -0
  65. package/dist/client/schema/types.d.ts +477 -0
  66. package/dist/client/schema/types.d.ts.map +1 -0
  67. package/dist/client/schema/types.js +39 -0
  68. package/dist/client/schema/types.js.map +1 -0
  69. package/dist/client/types.d.ts +449 -0
  70. package/dist/client/types.d.ts.map +1 -0
  71. package/dist/client/types.js +149 -0
  72. package/dist/client/types.js.map +1 -0
  73. package/dist/client/workflows.d.ts +51 -0
  74. package/dist/client/workflows.d.ts.map +1 -0
  75. package/dist/client/workflows.js +103 -0
  76. package/dist/client/workflows.js.map +1 -0
  77. package/dist/client/wrapper.d.ts +2198 -0
  78. package/dist/client/wrapper.d.ts.map +1 -0
  79. package/dist/client/wrapper.js +2651 -0
  80. package/dist/client/wrapper.js.map +1 -0
  81. package/dist/component/_generated/api.d.ts +124 -0
  82. package/dist/component/_generated/api.d.ts.map +1 -0
  83. package/dist/component/_generated/api.js +31 -0
  84. package/dist/component/_generated/api.js.map +1 -0
  85. package/dist/component/_generated/component.d.ts +4321 -0
  86. package/dist/component/_generated/component.d.ts.map +1 -0
  87. package/dist/component/_generated/component.js +11 -0
  88. package/dist/component/_generated/component.js.map +1 -0
  89. package/dist/component/_generated/dataModel.d.ts +46 -0
  90. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  91. package/dist/component/_generated/dataModel.js +11 -0
  92. package/dist/component/_generated/dataModel.js.map +1 -0
  93. package/dist/component/_generated/server.d.ts +121 -0
  94. package/dist/component/_generated/server.d.ts.map +1 -0
  95. package/dist/component/_generated/server.js +78 -0
  96. package/dist/component/_generated/server.js.map +1 -0
  97. package/dist/component/auditLog.d.ts +410 -0
  98. package/dist/component/auditLog.d.ts.map +1 -0
  99. package/dist/component/auditLog.js +607 -0
  100. package/dist/component/auditLog.js.map +1 -0
  101. package/dist/component/authorization.d.ts +323 -0
  102. package/dist/component/authorization.d.ts.map +1 -0
  103. package/dist/component/authorization.js +464 -0
  104. package/dist/component/authorization.js.map +1 -0
  105. package/dist/component/authorizationHooks.d.ts +184 -0
  106. package/dist/component/authorizationHooks.d.ts.map +1 -0
  107. package/dist/component/authorizationHooks.js +521 -0
  108. package/dist/component/authorizationHooks.js.map +1 -0
  109. package/dist/component/bulkOperations.d.ts +200 -0
  110. package/dist/component/bulkOperations.d.ts.map +1 -0
  111. package/dist/component/bulkOperations.js +568 -0
  112. package/dist/component/bulkOperations.js.map +1 -0
  113. package/dist/component/contentEntries.d.ts +719 -0
  114. package/dist/component/contentEntries.d.ts.map +1 -0
  115. package/dist/component/contentEntries.js +1617 -0
  116. package/dist/component/contentEntries.js.map +1 -0
  117. package/dist/component/contentEntryMutations.d.ts +505 -0
  118. package/dist/component/contentEntryMutations.d.ts.map +1 -0
  119. package/dist/component/contentEntryMutations.js +1009 -0
  120. package/dist/component/contentEntryMutations.js.map +1 -0
  121. package/dist/component/contentEntryValidation.d.ts +115 -0
  122. package/dist/component/contentEntryValidation.d.ts.map +1 -0
  123. package/dist/component/contentEntryValidation.js +546 -0
  124. package/dist/component/contentEntryValidation.js.map +1 -0
  125. package/dist/component/contentLock.d.ts +328 -0
  126. package/dist/component/contentLock.d.ts.map +1 -0
  127. package/dist/component/contentLock.js +471 -0
  128. package/dist/component/contentLock.js.map +1 -0
  129. package/dist/component/contentTypeMigration.d.ts +411 -0
  130. package/dist/component/contentTypeMigration.d.ts.map +1 -0
  131. package/dist/component/contentTypeMigration.js +805 -0
  132. package/dist/component/contentTypeMigration.js.map +1 -0
  133. package/dist/component/contentTypeMutations.d.ts +975 -0
  134. package/dist/component/contentTypeMutations.d.ts.map +1 -0
  135. package/dist/component/contentTypeMutations.js +768 -0
  136. package/dist/component/contentTypeMutations.js.map +1 -0
  137. package/dist/component/contentTypes.d.ts +538 -0
  138. package/dist/component/contentTypes.d.ts.map +1 -0
  139. package/dist/component/contentTypes.js +304 -0
  140. package/dist/component/contentTypes.js.map +1 -0
  141. package/dist/component/convex.config.d.ts +42 -0
  142. package/dist/component/convex.config.d.ts.map +1 -0
  143. package/dist/component/convex.config.js +43 -0
  144. package/dist/component/convex.config.js.map +1 -0
  145. package/dist/component/documentTypes.d.ts +186 -0
  146. package/dist/component/documentTypes.d.ts.map +1 -0
  147. package/dist/component/documentTypes.js +23 -0
  148. package/dist/component/documentTypes.js.map +1 -0
  149. package/dist/component/eventEmitter.d.ts +281 -0
  150. package/dist/component/eventEmitter.d.ts.map +1 -0
  151. package/dist/component/eventEmitter.js +300 -0
  152. package/dist/component/eventEmitter.js.map +1 -0
  153. package/dist/component/exportImport.d.ts +1120 -0
  154. package/dist/component/exportImport.d.ts.map +1 -0
  155. package/dist/component/exportImport.js +931 -0
  156. package/dist/component/exportImport.js.map +1 -0
  157. package/dist/component/index.d.ts +28 -0
  158. package/dist/component/index.d.ts.map +1 -0
  159. package/dist/component/index.js +142 -0
  160. package/dist/component/index.js.map +1 -0
  161. package/dist/component/lib/deepReferenceResolver.d.ts +252 -0
  162. package/dist/component/lib/deepReferenceResolver.d.ts.map +1 -0
  163. package/dist/component/lib/deepReferenceResolver.js +601 -0
  164. package/dist/component/lib/deepReferenceResolver.js.map +1 -0
  165. package/dist/component/lib/errors.d.ts +306 -0
  166. package/dist/component/lib/errors.d.ts.map +1 -0
  167. package/dist/component/lib/errors.js +407 -0
  168. package/dist/component/lib/errors.js.map +1 -0
  169. package/dist/component/lib/index.d.ts +10 -0
  170. package/dist/component/lib/index.d.ts.map +1 -0
  171. package/dist/component/lib/index.js +33 -0
  172. package/dist/component/lib/index.js.map +1 -0
  173. package/dist/component/lib/mediaReferenceResolver.d.ts +217 -0
  174. package/dist/component/lib/mediaReferenceResolver.d.ts.map +1 -0
  175. package/dist/component/lib/mediaReferenceResolver.js +326 -0
  176. package/dist/component/lib/mediaReferenceResolver.js.map +1 -0
  177. package/dist/component/lib/metadataExtractor.d.ts +245 -0
  178. package/dist/component/lib/metadataExtractor.d.ts.map +1 -0
  179. package/dist/component/lib/metadataExtractor.js +548 -0
  180. package/dist/component/lib/metadataExtractor.js.map +1 -0
  181. package/dist/component/lib/mutationAuth.d.ts +95 -0
  182. package/dist/component/lib/mutationAuth.d.ts.map +1 -0
  183. package/dist/component/lib/mutationAuth.js +146 -0
  184. package/dist/component/lib/mutationAuth.js.map +1 -0
  185. package/dist/component/lib/queries.d.ts +17 -0
  186. package/dist/component/lib/queries.d.ts.map +1 -0
  187. package/dist/component/lib/queries.js +49 -0
  188. package/dist/component/lib/queries.js.map +1 -0
  189. package/dist/component/lib/ragContentChunker.d.ts +423 -0
  190. package/dist/component/lib/ragContentChunker.d.ts.map +1 -0
  191. package/dist/component/lib/ragContentChunker.js +897 -0
  192. package/dist/component/lib/ragContentChunker.js.map +1 -0
  193. package/dist/component/lib/referenceResolver.d.ts +175 -0
  194. package/dist/component/lib/referenceResolver.d.ts.map +1 -0
  195. package/dist/component/lib/referenceResolver.js +293 -0
  196. package/dist/component/lib/referenceResolver.js.map +1 -0
  197. package/dist/component/lib/slugGenerator.d.ts +71 -0
  198. package/dist/component/lib/slugGenerator.d.ts.map +1 -0
  199. package/dist/component/lib/slugGenerator.js +207 -0
  200. package/dist/component/lib/slugGenerator.js.map +1 -0
  201. package/dist/component/lib/slugUniqueness.d.ts +131 -0
  202. package/dist/component/lib/slugUniqueness.d.ts.map +1 -0
  203. package/dist/component/lib/slugUniqueness.js +229 -0
  204. package/dist/component/lib/slugUniqueness.js.map +1 -0
  205. package/dist/component/lib/softDelete.d.ts +18 -0
  206. package/dist/component/lib/softDelete.d.ts.map +1 -0
  207. package/dist/component/lib/softDelete.js +29 -0
  208. package/dist/component/lib/softDelete.js.map +1 -0
  209. package/dist/component/localeFallbackChain.d.ts +410 -0
  210. package/dist/component/localeFallbackChain.d.ts.map +1 -0
  211. package/dist/component/localeFallbackChain.js +467 -0
  212. package/dist/component/localeFallbackChain.js.map +1 -0
  213. package/dist/component/localeFields.d.ts +508 -0
  214. package/dist/component/localeFields.d.ts.map +1 -0
  215. package/dist/component/localeFields.js +592 -0
  216. package/dist/component/localeFields.js.map +1 -0
  217. package/dist/component/mediaAssetMutations.d.ts +235 -0
  218. package/dist/component/mediaAssetMutations.d.ts.map +1 -0
  219. package/dist/component/mediaAssetMutations.js +558 -0
  220. package/dist/component/mediaAssetMutations.js.map +1 -0
  221. package/dist/component/mediaAssets.d.ts +168 -0
  222. package/dist/component/mediaAssets.d.ts.map +1 -0
  223. package/dist/component/mediaAssets.js +618 -0
  224. package/dist/component/mediaAssets.js.map +1 -0
  225. package/dist/component/mediaFolderMutations.d.ts +642 -0
  226. package/dist/component/mediaFolderMutations.d.ts.map +1 -0
  227. package/dist/component/mediaFolderMutations.js +849 -0
  228. package/dist/component/mediaFolderMutations.js.map +1 -0
  229. package/dist/component/mediaUploadMutations.d.ts +136 -0
  230. package/dist/component/mediaUploadMutations.d.ts.map +1 -0
  231. package/dist/component/mediaUploadMutations.js +205 -0
  232. package/dist/component/mediaUploadMutations.js.map +1 -0
  233. package/dist/component/mediaVariantMutations.d.ts +468 -0
  234. package/dist/component/mediaVariantMutations.d.ts.map +1 -0
  235. package/dist/component/mediaVariantMutations.js +737 -0
  236. package/dist/component/mediaVariantMutations.js.map +1 -0
  237. package/dist/component/mediaVariants.d.ts +525 -0
  238. package/dist/component/mediaVariants.d.ts.map +1 -0
  239. package/dist/component/mediaVariants.js +661 -0
  240. package/dist/component/mediaVariants.js.map +1 -0
  241. package/dist/component/ragContentIndexer.d.ts +595 -0
  242. package/dist/component/ragContentIndexer.d.ts.map +1 -0
  243. package/dist/component/ragContentIndexer.js +794 -0
  244. package/dist/component/ragContentIndexer.js.map +1 -0
  245. package/dist/component/rateLimitHooks.d.ts +266 -0
  246. package/dist/component/rateLimitHooks.d.ts.map +1 -0
  247. package/dist/component/rateLimitHooks.js +412 -0
  248. package/dist/component/rateLimitHooks.js.map +1 -0
  249. package/dist/component/roles.d.ts +649 -0
  250. package/dist/component/roles.d.ts.map +1 -0
  251. package/dist/component/roles.js +884 -0
  252. package/dist/component/roles.js.map +1 -0
  253. package/dist/component/scheduledPublish.d.ts +182 -0
  254. package/dist/component/scheduledPublish.d.ts.map +1 -0
  255. package/dist/component/scheduledPublish.js +304 -0
  256. package/dist/component/scheduledPublish.js.map +1 -0
  257. package/dist/component/schema.d.ts +4114 -0
  258. package/dist/component/schema.d.ts.map +1 -0
  259. package/dist/component/schema.js +469 -0
  260. package/dist/component/schema.js.map +1 -0
  261. package/dist/component/taxonomies.d.ts +476 -0
  262. package/dist/component/taxonomies.d.ts.map +1 -0
  263. package/dist/component/taxonomies.js +785 -0
  264. package/dist/component/taxonomies.js.map +1 -0
  265. package/dist/component/taxonomyMutations.d.ts +206 -0
  266. package/dist/component/taxonomyMutations.d.ts.map +1 -0
  267. package/dist/component/taxonomyMutations.js +1001 -0
  268. package/dist/component/taxonomyMutations.js.map +1 -0
  269. package/dist/component/trash.d.ts +265 -0
  270. package/dist/component/trash.d.ts.map +1 -0
  271. package/dist/component/trash.js +621 -0
  272. package/dist/component/trash.js.map +1 -0
  273. package/dist/component/types.d.ts +4 -0
  274. package/dist/component/types.d.ts.map +1 -0
  275. package/dist/component/types.js +2 -0
  276. package/dist/component/types.js.map +1 -0
  277. package/dist/component/userContext.d.ts +508 -0
  278. package/dist/component/userContext.d.ts.map +1 -0
  279. package/dist/component/userContext.js +615 -0
  280. package/dist/component/userContext.js.map +1 -0
  281. package/dist/component/validation.d.ts +387 -0
  282. package/dist/component/validation.d.ts.map +1 -0
  283. package/dist/component/validation.js +1052 -0
  284. package/dist/component/validation.js.map +1 -0
  285. package/dist/component/validators.d.ts +4645 -0
  286. package/dist/component/validators.d.ts.map +1 -0
  287. package/dist/component/validators.js +641 -0
  288. package/dist/component/validators.js.map +1 -0
  289. package/dist/component/versionMutations.d.ts +216 -0
  290. package/dist/component/versionMutations.d.ts.map +1 -0
  291. package/dist/component/versionMutations.js +321 -0
  292. package/dist/component/versionMutations.js.map +1 -0
  293. package/dist/component/webhookTrigger.d.ts +770 -0
  294. package/dist/component/webhookTrigger.d.ts.map +1 -0
  295. package/dist/component/webhookTrigger.js +1413 -0
  296. package/dist/component/webhookTrigger.js.map +1 -0
  297. package/dist/react/index.d.ts +316 -0
  298. package/dist/react/index.d.ts.map +1 -0
  299. package/dist/react/index.js +558 -0
  300. package/dist/react/index.js.map +1 -0
  301. package/dist/test.d.ts +2230 -0
  302. package/dist/test.d.ts.map +1 -0
  303. package/dist/test.js +1107 -0
  304. package/dist/test.js.map +1 -0
  305. package/package.json +95 -0
  306. package/src/cli/commands/admin.ts +104 -0
  307. package/src/cli/index.ts +21 -0
  308. package/src/cli/utils/detectConvexUrl.ts +54 -0
  309. package/src/cli/utils/openBrowser.ts +16 -0
  310. package/src/client/admin-config.ts +138 -0
  311. package/src/client/adminApi.ts +942 -0
  312. package/src/client/agentTools.ts +1311 -0
  313. package/src/client/argTypes.ts +316 -0
  314. package/src/client/field-types.ts +187 -0
  315. package/src/client/index.ts +1301 -0
  316. package/src/client/queryBuilder.ts +1100 -0
  317. package/src/client/schema/codegen.ts +500 -0
  318. package/src/client/schema/defineContentType.ts +501 -0
  319. package/src/client/schema/index.ts +169 -0
  320. package/src/client/schema/schemaDrift.ts +574 -0
  321. package/src/client/schema/typedClient.ts +688 -0
  322. package/src/client/schema/types.ts +666 -0
  323. package/src/client/types.ts +723 -0
  324. package/src/client/workflows.ts +141 -0
  325. package/src/client/wrapper.ts +4304 -0
  326. package/src/component/_generated/api.ts +140 -0
  327. package/src/component/_generated/component.ts +5029 -0
  328. package/src/component/_generated/dataModel.ts +60 -0
  329. package/src/component/_generated/server.ts +156 -0
  330. package/src/component/authorization.ts +647 -0
  331. package/src/component/authorizationHooks.ts +668 -0
  332. package/src/component/bulkOperations.ts +687 -0
  333. package/src/component/contentEntries.ts +1976 -0
  334. package/src/component/contentEntryMutations.ts +1223 -0
  335. package/src/component/contentEntryValidation.ts +707 -0
  336. package/src/component/contentLock.ts +550 -0
  337. package/src/component/contentTypeMigration.ts +1064 -0
  338. package/src/component/contentTypeMutations.ts +969 -0
  339. package/src/component/contentTypes.ts +346 -0
  340. package/src/component/convex.config.ts +44 -0
  341. package/src/component/documentTypes.ts +240 -0
  342. package/src/component/eventEmitter.ts +485 -0
  343. package/src/component/exportImport.ts +1169 -0
  344. package/src/component/index.ts +491 -0
  345. package/src/component/lib/deepReferenceResolver.ts +999 -0
  346. package/src/component/lib/errors.ts +816 -0
  347. package/src/component/lib/index.ts +145 -0
  348. package/src/component/lib/mediaReferenceResolver.ts +495 -0
  349. package/src/component/lib/metadataExtractor.ts +792 -0
  350. package/src/component/lib/mutationAuth.ts +199 -0
  351. package/src/component/lib/queries.ts +79 -0
  352. package/src/component/lib/ragContentChunker.ts +1371 -0
  353. package/src/component/lib/referenceResolver.ts +430 -0
  354. package/src/component/lib/slugGenerator.ts +262 -0
  355. package/src/component/lib/slugUniqueness.ts +333 -0
  356. package/src/component/lib/softDelete.ts +44 -0
  357. package/src/component/localeFallbackChain.ts +673 -0
  358. package/src/component/localeFields.ts +896 -0
  359. package/src/component/mediaAssetMutations.ts +725 -0
  360. package/src/component/mediaAssets.ts +932 -0
  361. package/src/component/mediaFolderMutations.ts +1046 -0
  362. package/src/component/mediaUploadMutations.ts +224 -0
  363. package/src/component/mediaVariantMutations.ts +900 -0
  364. package/src/component/mediaVariants.ts +793 -0
  365. package/src/component/ragContentIndexer.ts +1067 -0
  366. package/src/component/rateLimitHooks.ts +572 -0
  367. package/src/component/roles.ts +1360 -0
  368. package/src/component/scheduledPublish.ts +358 -0
  369. package/src/component/schema.ts +617 -0
  370. package/src/component/taxonomies.ts +949 -0
  371. package/src/component/taxonomyMutations.ts +1210 -0
  372. package/src/component/trash.ts +724 -0
  373. package/src/component/userContext.ts +898 -0
  374. package/src/component/validation.ts +1388 -0
  375. package/src/component/validators.ts +949 -0
  376. package/src/component/versionMutations.ts +392 -0
  377. package/src/component/webhookTrigger.ts +1922 -0
  378. package/src/react/index.ts +898 -0
  379. package/src/test.ts +1580 -0
@@ -0,0 +1,546 @@
1
+ /**
2
+ * Content Entry Validation Internal Functions
3
+ *
4
+ * Provides internal functions to validate content entry data against its
5
+ * content type schema. Used by mutations before creating/updating entries,
6
+ * and can be called directly for preview validation.
7
+ *
8
+ * Validation includes:
9
+ * - Required field checks
10
+ * - Type correctness validation
11
+ * - Custom field constraints (min/max, pattern, etc.)
12
+ * - Reference validation (existence and content type constraints)
13
+ * - Media reference validation
14
+ */
15
+ import { v } from "convex/values";
16
+ import { isDeleted } from "./lib/softDelete.js";
17
+ import { internalQuery, query } from "./_generated/server.js";
18
+ import { validateContentData, } from "./validation.js";
19
+ // =============================================================================
20
+ // Validator Definitions
21
+ // =============================================================================
22
+ /**
23
+ * Argument validator for validateContentEntry
24
+ */
25
+ const validateContentEntryArgs = v.object({
26
+ /** The content type ID to validate against */
27
+ contentTypeId: v.id("contentTypes"),
28
+ /** The content data to validate */
29
+ data: v.any(),
30
+ /** Validation options */
31
+ options: v.optional(v.object({
32
+ validateReferences: v.optional(v.boolean()),
33
+ strictFields: v.optional(v.boolean()),
34
+ })),
35
+ });
36
+ /**
37
+ * Argument validator for validateContentEntryByTypeName
38
+ */
39
+ const validateContentEntryByTypeNameArgs = v.object({
40
+ /** The content type name to validate against */
41
+ contentTypeName: v.string(),
42
+ /** The content data to validate */
43
+ data: v.any(),
44
+ /** Validation options */
45
+ options: v.optional(v.object({
46
+ validateReferences: v.optional(v.boolean()),
47
+ strictFields: v.optional(v.boolean()),
48
+ })),
49
+ });
50
+ /**
51
+ * Return validator for validation results
52
+ */
53
+ const validationResultValidator = v.object({
54
+ valid: v.boolean(),
55
+ errors: v.array(v.object({
56
+ field: v.string(),
57
+ message: v.string(),
58
+ code: v.string(),
59
+ })),
60
+ contentTypeName: v.optional(v.string()),
61
+ contentTypeDisplayName: v.optional(v.string()),
62
+ referencesValidated: v.boolean(),
63
+ });
64
+ // =============================================================================
65
+ // Internal Query: Validate Content Entry
66
+ // =============================================================================
67
+ /**
68
+ * Internal query to validate content entry data against its content type schema.
69
+ *
70
+ * This function performs comprehensive validation including:
71
+ * 1. Required field checks - ensures all required fields have values
72
+ * 2. Type validation - verifies values match expected types (string, number, etc.)
73
+ * 3. Constraint validation - checks min/max length, patterns, allowed values, etc.
74
+ * 4. Reference validation - optionally verifies referenced entries exist and have correct types
75
+ *
76
+ * @param contentTypeId - The ID of the content type to validate against
77
+ * @param data - The content data to validate
78
+ * @param options - Optional validation options
79
+ *
80
+ * @returns ValidationResult with any errors found
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * // Validate blog post data before creating
85
+ * const result = await ctx.runQuery(internal.contentEntryValidation.validateContentEntry, {
86
+ * contentTypeId: blogTypeId,
87
+ * data: {
88
+ * title: "My Post",
89
+ * content: "<p>Hello world!</p>",
90
+ * author: authorEntryId,
91
+ * },
92
+ * });
93
+ *
94
+ * if (!result.valid) {
95
+ * console.error("Validation errors:", result.errors);
96
+ * }
97
+ * ```
98
+ */
99
+ export const validateContentEntry = internalQuery({
100
+ args: validateContentEntryArgs.fields,
101
+ returns: validationResultValidator,
102
+ handler: async (ctx, args) => {
103
+ const { contentTypeId, data, options } = args;
104
+ const validateReferences = options?.validateReferences ?? true;
105
+ const strictFields = options?.strictFields ?? false;
106
+ // Fetch the content type
107
+ const contentType = await ctx.db.get(contentTypeId);
108
+ if (!contentType) {
109
+ return {
110
+ valid: false,
111
+ errors: [
112
+ {
113
+ field: "_contentType",
114
+ message: `Content type not found: ${contentTypeId}`,
115
+ code: "INVALID_CONTENT_TYPE",
116
+ },
117
+ ],
118
+ referencesValidated: false,
119
+ };
120
+ }
121
+ if (isDeleted(contentType)) {
122
+ return {
123
+ valid: false,
124
+ errors: [
125
+ {
126
+ field: "_contentType",
127
+ message: `Content type has been deleted: ${contentType.name}`,
128
+ code: "INVALID_CONTENT_TYPE",
129
+ },
130
+ ],
131
+ contentTypeName: contentType.name,
132
+ contentTypeDisplayName: contentType.displayName,
133
+ referencesValidated: false,
134
+ };
135
+ }
136
+ if (!contentType.isActive) {
137
+ return {
138
+ valid: false,
139
+ errors: [
140
+ {
141
+ field: "_contentType",
142
+ message: `Content type is not active: ${contentType.name}`,
143
+ code: "INVALID_CONTENT_TYPE",
144
+ },
145
+ ],
146
+ contentTypeName: contentType.name,
147
+ contentTypeDisplayName: contentType.displayName,
148
+ referencesValidated: false,
149
+ };
150
+ }
151
+ // Build the schema for validation
152
+ const schema = {
153
+ name: contentType.name,
154
+ displayName: contentType.displayName,
155
+ description: contentType.description,
156
+ fields: contentType.fields,
157
+ titleField: contentType.titleField,
158
+ slugField: contentType.slugField,
159
+ singleton: contentType.singleton,
160
+ };
161
+ // Perform basic validation
162
+ const contentData = data;
163
+ const basicResult = validateContentData(contentData, schema, {
164
+ strictFields,
165
+ });
166
+ // Collect all errors
167
+ const errors = [...basicResult.errors];
168
+ // Perform reference validation if enabled
169
+ let referencesValidated = false;
170
+ if (validateReferences) {
171
+ const referenceErrors = await validateReferences_internal(ctx, contentData, schema.fields);
172
+ errors.push(...referenceErrors);
173
+ referencesValidated = true;
174
+ }
175
+ return {
176
+ valid: errors.length === 0,
177
+ errors,
178
+ contentTypeName: contentType.name,
179
+ contentTypeDisplayName: contentType.displayName,
180
+ referencesValidated,
181
+ };
182
+ },
183
+ });
184
+ /**
185
+ * Public query to validate content entry data.
186
+ *
187
+ * Same as the internal version but exposed as a public query for use
188
+ * from the client (e.g., for form validation before submission).
189
+ */
190
+ export const validateEntry = query({
191
+ args: validateContentEntryArgs.fields,
192
+ returns: validationResultValidator,
193
+ handler: async (ctx, args) => {
194
+ const { contentTypeId, data, options } = args;
195
+ const validateReferencesOption = options?.validateReferences ?? true;
196
+ const strictFields = options?.strictFields ?? false;
197
+ // Fetch the content type
198
+ const contentType = await ctx.db.get(contentTypeId);
199
+ if (!contentType) {
200
+ return {
201
+ valid: false,
202
+ errors: [
203
+ {
204
+ field: "_contentType",
205
+ message: `Content type not found: ${contentTypeId}`,
206
+ code: "INVALID_CONTENT_TYPE",
207
+ },
208
+ ],
209
+ referencesValidated: false,
210
+ };
211
+ }
212
+ if (isDeleted(contentType)) {
213
+ return {
214
+ valid: false,
215
+ errors: [
216
+ {
217
+ field: "_contentType",
218
+ message: `Content type has been deleted: ${contentType.name}`,
219
+ code: "INVALID_CONTENT_TYPE",
220
+ },
221
+ ],
222
+ contentTypeName: contentType.name,
223
+ contentTypeDisplayName: contentType.displayName,
224
+ referencesValidated: false,
225
+ };
226
+ }
227
+ if (!contentType.isActive) {
228
+ return {
229
+ valid: false,
230
+ errors: [
231
+ {
232
+ field: "_contentType",
233
+ message: `Content type is not active: ${contentType.name}`,
234
+ code: "INVALID_CONTENT_TYPE",
235
+ },
236
+ ],
237
+ contentTypeName: contentType.name,
238
+ contentTypeDisplayName: contentType.displayName,
239
+ referencesValidated: false,
240
+ };
241
+ }
242
+ // Build the schema for validation
243
+ const schema = {
244
+ name: contentType.name,
245
+ displayName: contentType.displayName,
246
+ description: contentType.description,
247
+ fields: contentType.fields,
248
+ titleField: contentType.titleField,
249
+ slugField: contentType.slugField,
250
+ singleton: contentType.singleton,
251
+ };
252
+ // Perform basic validation
253
+ const contentData = data;
254
+ const basicResult = validateContentData(contentData, schema, {
255
+ strictFields,
256
+ });
257
+ // Collect all errors
258
+ const errors = [...basicResult.errors];
259
+ // Perform reference validation if enabled
260
+ let referencesValidated = false;
261
+ if (validateReferencesOption) {
262
+ const referenceErrors = await validateReferences_internal(ctx, contentData, schema.fields);
263
+ errors.push(...referenceErrors);
264
+ referencesValidated = true;
265
+ }
266
+ return {
267
+ valid: errors.length === 0,
268
+ errors,
269
+ contentTypeName: contentType.name,
270
+ contentTypeDisplayName: contentType.displayName,
271
+ referencesValidated,
272
+ };
273
+ },
274
+ });
275
+ /**
276
+ * Internal query to validate content entry data by content type name.
277
+ *
278
+ * Same as validateContentEntry but accepts content type name instead of ID.
279
+ * Useful when you know the type name but not the ID.
280
+ */
281
+ export const validateContentEntryByTypeName = internalQuery({
282
+ args: validateContentEntryByTypeNameArgs.fields,
283
+ returns: validationResultValidator,
284
+ handler: async (ctx, args) => {
285
+ const { contentTypeName, data, options } = args;
286
+ // Find the content type by name
287
+ const contentType = await ctx.db
288
+ .query("contentTypes")
289
+ .withIndex("by_name", (q) => q.eq("name", contentTypeName))
290
+ .first();
291
+ if (!contentType) {
292
+ return {
293
+ valid: false,
294
+ errors: [
295
+ {
296
+ field: "_contentType",
297
+ message: `Content type not found: ${contentTypeName}`,
298
+ code: "INVALID_CONTENT_TYPE",
299
+ },
300
+ ],
301
+ referencesValidated: false,
302
+ };
303
+ }
304
+ // Delegate to the ID-based validation
305
+ const validateReferencesOption = options?.validateReferences ?? true;
306
+ const strictFields = options?.strictFields ?? false;
307
+ if (isDeleted(contentType)) {
308
+ return {
309
+ valid: false,
310
+ errors: [
311
+ {
312
+ field: "_contentType",
313
+ message: `Content type has been deleted: ${contentType.name}`,
314
+ code: "INVALID_CONTENT_TYPE",
315
+ },
316
+ ],
317
+ contentTypeName: contentType.name,
318
+ contentTypeDisplayName: contentType.displayName,
319
+ referencesValidated: false,
320
+ };
321
+ }
322
+ if (!contentType.isActive) {
323
+ return {
324
+ valid: false,
325
+ errors: [
326
+ {
327
+ field: "_contentType",
328
+ message: `Content type is not active: ${contentType.name}`,
329
+ code: "INVALID_CONTENT_TYPE",
330
+ },
331
+ ],
332
+ contentTypeName: contentType.name,
333
+ contentTypeDisplayName: contentType.displayName,
334
+ referencesValidated: false,
335
+ };
336
+ }
337
+ // Build the schema for validation
338
+ const schema = {
339
+ name: contentType.name,
340
+ displayName: contentType.displayName,
341
+ description: contentType.description,
342
+ fields: contentType.fields,
343
+ titleField: contentType.titleField,
344
+ slugField: contentType.slugField,
345
+ singleton: contentType.singleton,
346
+ };
347
+ // Perform basic validation
348
+ const contentData = data;
349
+ const basicResult = validateContentData(contentData, schema, {
350
+ strictFields,
351
+ });
352
+ // Collect all errors
353
+ const errors = [...basicResult.errors];
354
+ // Perform reference validation if enabled
355
+ let referencesValidated = false;
356
+ if (validateReferencesOption) {
357
+ const referenceErrors = await validateReferences_internal(ctx, contentData, schema.fields);
358
+ errors.push(...referenceErrors);
359
+ referencesValidated = true;
360
+ }
361
+ return {
362
+ valid: errors.length === 0,
363
+ errors,
364
+ contentTypeName: contentType.name,
365
+ contentTypeDisplayName: contentType.displayName,
366
+ referencesValidated,
367
+ };
368
+ },
369
+ });
370
+ // =============================================================================
371
+ // Helper Functions
372
+ // =============================================================================
373
+ /**
374
+ * Validates reference and media fields by checking that referenced entries exist
375
+ * and belong to allowed content types.
376
+ *
377
+ * @param ctx - The query context for database access
378
+ * @param data - The content data being validated
379
+ * @param fields - The field definitions from the content type
380
+ * @returns Array of validation errors for invalid references
381
+ */
382
+ async function validateReferences_internal(ctx, data, fields) {
383
+ const errors = [];
384
+ for (const field of fields) {
385
+ const value = data[field.name];
386
+ // Skip if no value
387
+ if (value === null || value === undefined) {
388
+ continue;
389
+ }
390
+ if (field.type === "reference") {
391
+ const multiple = field.options?.multiple ?? false;
392
+ const allowedContentTypes = field.options?.allowedContentTypes;
393
+ if (multiple && Array.isArray(value)) {
394
+ // Multiple references
395
+ for (let i = 0; i < value.length; i++) {
396
+ const refId = value[i];
397
+ if (typeof refId === "string") {
398
+ const refErrors = await validateSingleReference(ctx, refId, field.name, allowedContentTypes, i);
399
+ errors.push(...refErrors);
400
+ }
401
+ }
402
+ }
403
+ else if (!multiple && typeof value === "string") {
404
+ // Single reference
405
+ const refErrors = await validateSingleReference(ctx, value, field.name, allowedContentTypes);
406
+ errors.push(...refErrors);
407
+ }
408
+ }
409
+ if (field.type === "media") {
410
+ const multiple = field.options?.multiple ?? false;
411
+ if (multiple && Array.isArray(value)) {
412
+ // Multiple media assets
413
+ for (let i = 0; i < value.length; i++) {
414
+ const assetId = value[i];
415
+ if (typeof assetId === "string") {
416
+ const mediaErrors = await validateSingleMediaAsset(ctx, assetId, field.name, field.options?.allowedMimeTypes, field.options?.maxFileSize, i);
417
+ errors.push(...mediaErrors);
418
+ }
419
+ }
420
+ }
421
+ else if (!multiple && typeof value === "string") {
422
+ // Single media asset
423
+ const mediaErrors = await validateSingleMediaAsset(ctx, value, field.name, field.options?.allowedMimeTypes, field.options?.maxFileSize);
424
+ errors.push(...mediaErrors);
425
+ }
426
+ }
427
+ }
428
+ return errors;
429
+ }
430
+ /**
431
+ * Validates a single reference to a content entry.
432
+ */
433
+ async function validateSingleReference(ctx, referenceId, fieldName, allowedContentTypes, index) {
434
+ const errors = [];
435
+ const fieldLabel = index !== undefined ? `${fieldName}[${index}]` : fieldName;
436
+ try {
437
+ // Try to get the referenced entry
438
+ const entry = await ctx.db.get(referenceId);
439
+ if (!entry) {
440
+ errors.push({
441
+ field: fieldLabel,
442
+ message: `Referenced entry not found: ${referenceId}`,
443
+ code: "INVALID_CONTENT_TYPE",
444
+ });
445
+ return errors;
446
+ }
447
+ // Check if entry is deleted
448
+ if (isDeleted(entry)) {
449
+ errors.push({
450
+ field: fieldLabel,
451
+ message: `Referenced entry has been deleted: ${referenceId}`,
452
+ code: "INVALID_CONTENT_TYPE",
453
+ });
454
+ return errors;
455
+ }
456
+ // Validate content type constraint
457
+ if (allowedContentTypes && allowedContentTypes.length > 0) {
458
+ const contentType = await ctx.db.get(entry.contentTypeId);
459
+ if (contentType) {
460
+ if (!allowedContentTypes.includes(contentType.name)) {
461
+ errors.push({
462
+ field: fieldLabel,
463
+ message: `Reference must be of type: ${allowedContentTypes.join(", ")}. Got: ${contentType.name}`,
464
+ code: "INVALID_CONTENT_TYPE",
465
+ });
466
+ }
467
+ }
468
+ }
469
+ }
470
+ catch {
471
+ // Invalid ID format
472
+ errors.push({
473
+ field: fieldLabel,
474
+ message: `Invalid reference ID format: ${referenceId}`,
475
+ code: "INVALID_TYPE",
476
+ });
477
+ }
478
+ return errors;
479
+ }
480
+ /**
481
+ * Validates a single media asset reference.
482
+ */
483
+ async function validateSingleMediaAsset(ctx, assetId, fieldName, allowedMimeTypes, maxFileSize, index) {
484
+ const errors = [];
485
+ const fieldLabel = index !== undefined ? `${fieldName}[${index}]` : fieldName;
486
+ try {
487
+ // Try to get the media item
488
+ const item = await ctx.db.get(assetId);
489
+ if (!item) {
490
+ errors.push({
491
+ field: fieldLabel,
492
+ message: `Media asset not found: ${assetId}`,
493
+ code: "INVALID_TYPE",
494
+ });
495
+ return errors;
496
+ }
497
+ // Check if it's an asset (not a folder)
498
+ if (item.kind !== "asset") {
499
+ errors.push({
500
+ field: fieldLabel,
501
+ message: `Media reference must be an asset, not a folder: ${assetId}`,
502
+ code: "INVALID_TYPE",
503
+ });
504
+ return errors;
505
+ }
506
+ // Check if asset is deleted
507
+ if (isDeleted(item)) {
508
+ errors.push({
509
+ field: fieldLabel,
510
+ message: `Media asset has been deleted: ${assetId}`,
511
+ code: "INVALID_TYPE",
512
+ });
513
+ return errors;
514
+ }
515
+ // Validate MIME type constraint
516
+ if (allowedMimeTypes && allowedMimeTypes.length > 0) {
517
+ if (!allowedMimeTypes.includes(item.mimeType)) {
518
+ errors.push({
519
+ field: fieldLabel,
520
+ message: `Media type not allowed. Expected: ${allowedMimeTypes.join(", ")}. Got: ${item.mimeType}`,
521
+ code: "INVALID_MIME_TYPE",
522
+ });
523
+ }
524
+ }
525
+ // Validate file size constraint
526
+ if (maxFileSize !== undefined && item.size > maxFileSize) {
527
+ const maxSizeKB = Math.round(maxFileSize / 1024);
528
+ const actualSizeKB = Math.round(item.size / 1024);
529
+ errors.push({
530
+ field: fieldLabel,
531
+ message: `File too large. Maximum: ${maxSizeKB}KB. Actual: ${actualSizeKB}KB`,
532
+ code: "FILE_TOO_LARGE",
533
+ });
534
+ }
535
+ }
536
+ catch {
537
+ // Invalid ID format
538
+ errors.push({
539
+ field: fieldLabel,
540
+ message: `Invalid media asset ID format: ${assetId}`,
541
+ code: "INVALID_TYPE",
542
+ });
543
+ }
544
+ return errors;
545
+ }
546
+ //# sourceMappingURL=contentEntryValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentEntryValidation.js","sourceRoot":"","sources":["../../src/component/contentEntryValidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EACN,mBAAmB,GAKnB,MAAM,iBAAiB,CAAC;AAwCzB,gFAAgF;AAChF,wBAAwB;AACxB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,8CAA8C;IAC9C,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC;I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