@kyro-cms/core 0.13.2 → 0.13.5

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 (262) hide show
  1. package/dist/{WebhookService-BOJMgjBm.d.cts → WebhookService-BJTCP3cU.d.cts} +1 -1
  2. package/dist/{WebhookService-BLi5Rz2m.d.ts → WebhookService-Bqr_66lK.d.ts} +1 -1
  3. package/dist/api-handler-graphql.cjs +1 -1
  4. package/dist/api-handler-graphql.js +1 -1
  5. package/dist/api-handler-trpc.cjs +1 -1
  6. package/dist/api-handler-trpc.js +1 -1
  7. package/dist/api-handler.cjs +1 -1
  8. package/dist/api-handler.js +1 -1
  9. package/dist/{base-OYfoYPYP.d.ts → base-A9AJPCG5.d.ts} +1 -0
  10. package/dist/{base-BCgFt3Yx.d.ts → base-C2DOe8wD.d.ts} +3 -2
  11. package/dist/{base-BaOJ5uWd.d.cts → base-C6wyX2nC.d.cts} +1 -0
  12. package/dist/{base-B-i-tjm1.d.ts → base-DIpT2Vuz.d.cts} +3 -2
  13. package/dist/{bootstrap-QQ6D3OYG.js → bootstrap-PG2LGDLB.js} +1 -1
  14. package/dist/bootstrap-YD3GLTWX.cjs +1 -0
  15. package/dist/chunk-2SPWRQ5O.js +122 -0
  16. package/dist/chunk-2TYITUOC.js +122 -0
  17. package/dist/{chunk-GV2IB4WQ.cjs → chunk-3CIMGC2F.cjs} +3 -3
  18. package/dist/{chunk-S5HTTLN7.cjs → chunk-4NTIK6DF.cjs} +1 -1
  19. package/dist/chunk-6E44MQQ5.js +115 -0
  20. package/dist/{chunk-PTPVFLET.js → chunk-6LWF5MPL.js} +1 -1
  21. package/dist/chunk-6YS6XLOD.cjs +121 -0
  22. package/dist/{chunk-2OS5Y4LE.cjs → chunk-7KLEANTO.cjs} +1 -1
  23. package/dist/{chunk-3GXLOYM3.js → chunk-ALTU3FDG.js} +1 -1
  24. package/dist/{chunk-OPTVCCQQ.cjs → chunk-EQN3HDES.cjs} +7 -6
  25. package/dist/{chunk-3O3AVMWM.cjs → chunk-EW424IBO.cjs} +1 -1
  26. package/dist/{chunk-JZ7Z6WC2.cjs → chunk-GTR7JAKP.cjs} +2 -2
  27. package/dist/{chunk-M75VGFCI.js → chunk-HPIJI7TM.js} +1 -1
  28. package/dist/chunk-J6V573PE.cjs +1 -0
  29. package/dist/{chunk-3LAWUINR.cjs → chunk-LKRI5X2V.cjs} +1 -1
  30. package/dist/{chunk-6MNLRAKM.cjs → chunk-NRE6VKL6.cjs} +12 -12
  31. package/dist/{chunk-MYHNTJLR.cjs → chunk-OOVNTOZC.cjs} +6 -6
  32. package/dist/{chunk-SMQ6736Y.js → chunk-PYUWSKKP.js} +1 -1
  33. package/dist/{chunk-XBQ6HV3T.cjs → chunk-QYN6C3FZ.cjs} +4 -4
  34. package/dist/{chunk-ATI2UZ7U.js → chunk-RYXLEFS5.js} +1 -1
  35. package/dist/{chunk-E4H3ZZ7U.js → chunk-SRIXRJHL.js} +1 -1
  36. package/dist/chunk-V4FAL7AG.js +2 -0
  37. package/dist/{chunk-6DD4J7LI.js → chunk-WAVGRSE6.js} +1 -1
  38. package/dist/{chunk-N6MNQIQU.js → chunk-WNU76M2C.js} +7 -6
  39. package/dist/chunk-XDQVYCIR.cjs +1 -0
  40. package/dist/{chunk-K5XGP57D.cjs → chunk-XOR64WUQ.cjs} +1 -1
  41. package/dist/chunk-YGI5W4RS.js +2 -0
  42. package/dist/{chunk-I6UJVO2P.js → chunk-YIFKTA5N.js} +6 -6
  43. package/dist/cli/index.cjs +86 -86
  44. package/dist/cli/index.js +87 -87
  45. package/dist/client.d.cts +26 -0
  46. package/dist/client.d.ts +26 -0
  47. package/dist/drizzle/index.cjs +1 -1
  48. package/dist/drizzle/index.d.cts +3 -3
  49. package/dist/drizzle/index.d.ts +3 -3
  50. package/dist/drizzle/index.js +1 -1
  51. package/dist/fields/index.d.cts +2 -2
  52. package/dist/fields/index.d.ts +2 -2
  53. package/dist/graphql/index.d.cts +3 -3
  54. package/dist/graphql/index.d.ts +3 -3
  55. package/dist/{index-BttsFZDa.d.ts → index-C9uBoJtm.d.ts} +2 -2
  56. package/dist/{index-8Ino7vKq.d.ts → index-Ci7aUrmN.d.cts} +2 -2
  57. package/dist/index.cjs +4 -4
  58. package/dist/index.d.cts +13 -10
  59. package/dist/index.d.ts +13 -10
  60. package/dist/index.js +4 -4
  61. package/dist/{local-DPLKZQA3.js → local-6UUGBZ4M.js} +1 -1
  62. package/dist/{local-KR3AIGVA.cjs → local-ZYHV3J2K.cjs} +1 -1
  63. package/dist/{mongo-auth-adapter-EUHAYWJ6.cjs → mongo-auth-adapter-2H2AXDRH.cjs} +1 -1
  64. package/dist/{mongo-auth-adapter-FW7ATYQ6.js → mongo-auth-adapter-YWMEOC42.js} +1 -1
  65. package/dist/mongodb/index.cjs +1 -1
  66. package/dist/mongodb/index.d.cts +3 -3
  67. package/dist/mongodb/index.d.ts +3 -3
  68. package/dist/mongodb/index.js +1 -1
  69. package/dist/{postgres-auth-adapter-SK3N3OSS.js → postgres-auth-adapter-QKBNXVPT.js} +1 -1
  70. package/dist/{postgres-auth-adapter-ZO6HK5AK.cjs → postgres-auth-adapter-WMLM4UUC.cjs} +1 -1
  71. package/dist/{redis-adapter-EGMUN65D.cjs → redis-adapter-EVK2SMKH.cjs} +1 -1
  72. package/dist/{redis-adapter-QPCTMF55.js → redis-adapter-LY2NBSAG.js} +1 -1
  73. package/dist/rest/index.cjs +1 -1
  74. package/dist/rest/index.d.cts +4 -4
  75. package/dist/rest/index.d.ts +4 -4
  76. package/dist/rest/index.js +1 -1
  77. package/dist/{sqlite-adapter-MNNZZXGX.cjs → sqlite-adapter-KPSISY6E.cjs} +1 -1
  78. package/dist/{sqlite-adapter-52PL52VU.js → sqlite-adapter-PI6SIY7O.js} +1 -1
  79. package/dist/templates/index.cjs +1 -1
  80. package/dist/templates/index.d.cts +2 -2
  81. package/dist/templates/index.d.ts +2 -2
  82. package/dist/templates/index.js +1 -1
  83. package/dist/trpc/index.d.cts +3 -3
  84. package/dist/trpc/index.d.ts +3 -3
  85. package/dist/{types-Bii0bhUV.d.ts → types-C3QFX0l6.d.cts} +5 -0
  86. package/dist/{types-B9oXBEKI.d.cts → types-C3QFX0l6.d.ts} +5 -1
  87. package/dist/{types-Cdssrcbz.d.cts → types-CKWnrUAh.d.ts} +23 -2
  88. package/dist/{types-BRDBNacn.d.ts → types-CdwfDpyW.d.cts} +23 -2
  89. package/package.json +2 -2
  90. package/dist/WebhookService-BcuD8tnn.d.cts +0 -143
  91. package/dist/WebhookService-CFe6Zd0_.d.cts +0 -143
  92. package/dist/WebhookService-CVXmjbtQ.d.cts +0 -143
  93. package/dist/WebhookService-D5PSI5t6.d.cts +0 -143
  94. package/dist/WebhookService-DPCCn_12.d.ts +0 -143
  95. package/dist/WebhookService-Dk1lzSrG.d.cts +0 -143
  96. package/dist/WebhookService-Dncnbgm9.d.cts +0 -143
  97. package/dist/WebhookService-I6hdue2Y.d.ts +0 -143
  98. package/dist/WebhookService-KnQ2UDlW.d.ts +0 -143
  99. package/dist/WebhookService-UY5p89Bj.d.ts +0 -143
  100. package/dist/WebhookService-YZXBCRXA.d.ts +0 -143
  101. package/dist/WebhookService-fk0FGRlk.d.ts +0 -143
  102. package/dist/WebhookService-vsFnWrOh.d.ts +0 -143
  103. package/dist/WebhookService-zrDmAx7L.d.cts +0 -143
  104. package/dist/base-B--L0lCn.d.cts +0 -218
  105. package/dist/base-B-siit_y.d.cts +0 -218
  106. package/dist/base-B8SyZI4D.d.ts +0 -218
  107. package/dist/base-BHRGJ40F.d.cts +0 -218
  108. package/dist/base-BVoDPNjJ.d.cts +0 -218
  109. package/dist/base-BfPaVEAE.d.cts +0 -218
  110. package/dist/base-BxrX5EPU.d.cts +0 -218
  111. package/dist/base-CAb9EYQs.d.ts +0 -218
  112. package/dist/base-CcZIEll-.d.ts +0 -218
  113. package/dist/base-CyG7aF1e.d.cts +0 -218
  114. package/dist/base-DOImeJ-F.d.ts +0 -218
  115. package/dist/base-DbnwE42-.d.cts +0 -218
  116. package/dist/base-NyiSsD-n.d.ts +0 -218
  117. package/dist/base-xflndGDO.d.ts +0 -218
  118. package/dist/bootstrap-E24SGUJP.cjs +0 -1
  119. package/dist/bootstrap-QVKSKXJF.cjs +0 -1
  120. package/dist/bootstrap-RILR44UM.cjs +0 -1
  121. package/dist/bootstrap-YFVE7MRG.js +0 -1
  122. package/dist/bootstrap-ZRRUPRUR.js +0 -1
  123. package/dist/chunk-2FSOHXOU.cjs +0 -56
  124. package/dist/chunk-2PXXQKN3.cjs +0 -3
  125. package/dist/chunk-355R4LS5.cjs +0 -56
  126. package/dist/chunk-35IVNLMA.js +0 -122
  127. package/dist/chunk-3U6MKWET.cjs +0 -120
  128. package/dist/chunk-4YCI3HBD.js +0 -3
  129. package/dist/chunk-4ZWLNGLS.js +0 -2
  130. package/dist/chunk-5A7E7N4B.cjs +0 -431
  131. package/dist/chunk-5ZEYOFAK.js +0 -2
  132. package/dist/chunk-6GGPY7U2.js +0 -4
  133. package/dist/chunk-73Y63IPP.js +0 -57
  134. package/dist/chunk-7DUKWHRN.cjs +0 -1
  135. package/dist/chunk-7K6ZUNJM.js +0 -4
  136. package/dist/chunk-7LLCXY5O.cjs +0 -19
  137. package/dist/chunk-A35ZP72D.cjs +0 -132
  138. package/dist/chunk-A3IOQOV6.js +0 -2
  139. package/dist/chunk-A3XVL6ED.cjs +0 -3
  140. package/dist/chunk-APDQ6ZTG.cjs +0 -120
  141. package/dist/chunk-AWQGDMOE.js +0 -3
  142. package/dist/chunk-B3BSVEFC.cjs +0 -3
  143. package/dist/chunk-B4AC23SG.js +0 -122
  144. package/dist/chunk-BD6XHMMM.cjs +0 -2
  145. package/dist/chunk-CHYVUWZ3.js +0 -2
  146. package/dist/chunk-CIVA6SKW.js +0 -2
  147. package/dist/chunk-CNHUCCQJ.js +0 -121
  148. package/dist/chunk-CRP6PSCE.js +0 -2
  149. package/dist/chunk-DI6TCZSE.js +0 -122
  150. package/dist/chunk-DORUYZQV.cjs +0 -1
  151. package/dist/chunk-EFKEVWAD.js +0 -4
  152. package/dist/chunk-EI7FRSNY.js +0 -57
  153. package/dist/chunk-EON4XLKQ.cjs +0 -1
  154. package/dist/chunk-EUQAOYEO.cjs +0 -121
  155. package/dist/chunk-EVAUBT7H.js +0 -57
  156. package/dist/chunk-EYHD7HZE.cjs +0 -1
  157. package/dist/chunk-EYYIPA5N.js +0 -432
  158. package/dist/chunk-FBWLSWZ4.js +0 -122
  159. package/dist/chunk-FDKU7HJX.js +0 -2
  160. package/dist/chunk-FG3IFGJP.cjs +0 -1
  161. package/dist/chunk-FGN6IMPY.cjs +0 -3
  162. package/dist/chunk-FLS2FJM6.cjs +0 -431
  163. package/dist/chunk-FP5UK272.cjs +0 -1
  164. package/dist/chunk-FSL3NLRT.cjs +0 -2
  165. package/dist/chunk-FUFS65Q5.js +0 -133
  166. package/dist/chunk-GWIZT2P5.js +0 -57
  167. package/dist/chunk-H3FJ54KB.cjs +0 -121
  168. package/dist/chunk-HY3EAWB2.js +0 -4
  169. package/dist/chunk-IQSF6XRV.js +0 -57
  170. package/dist/chunk-IXGDTAES.js +0 -4
  171. package/dist/chunk-JCEJ4VTN.js +0 -20
  172. package/dist/chunk-LPFRMQFQ.js +0 -121
  173. package/dist/chunk-LYU44UNN.cjs +0 -56
  174. package/dist/chunk-MFNN5DYG.cjs +0 -1
  175. package/dist/chunk-MJAODEFC.cjs +0 -121
  176. package/dist/chunk-MSC4G2HF.cjs +0 -2
  177. package/dist/chunk-N2YHO2WI.cjs +0 -3
  178. package/dist/chunk-NPBXLPOP.js +0 -3
  179. package/dist/chunk-ON5XJEPO.cjs +0 -3
  180. package/dist/chunk-OT2Z4XBD.cjs +0 -1
  181. package/dist/chunk-PFKVHUOT.js +0 -432
  182. package/dist/chunk-PFTBTWSC.cjs +0 -1
  183. package/dist/chunk-PZDLPRJF.js +0 -4
  184. package/dist/chunk-QC4YXUBT.cjs +0 -383
  185. package/dist/chunk-QUTYCUST.js +0 -4
  186. package/dist/chunk-REKKBAQX.cjs +0 -56
  187. package/dist/chunk-RTNQP6BV.js +0 -2
  188. package/dist/chunk-RUJW47ZJ.js +0 -2
  189. package/dist/chunk-RXYCFZJC.cjs +0 -121
  190. package/dist/chunk-S2MZNEBQ.cjs +0 -1
  191. package/dist/chunk-S73YERS2.js +0 -57
  192. package/dist/chunk-T3DJ3UTP.cjs +0 -121
  193. package/dist/chunk-TJZO7ZSX.cjs +0 -3
  194. package/dist/chunk-TKUNRCRH.js +0 -4
  195. package/dist/chunk-TQLCOMKC.js +0 -4
  196. package/dist/chunk-TRXYDWGE.cjs +0 -1
  197. package/dist/chunk-TS55CUNJ.js +0 -57
  198. package/dist/chunk-UFBJ3WOZ.js +0 -2
  199. package/dist/chunk-UQRVQUVR.js +0 -2
  200. package/dist/chunk-UW5W35NP.js +0 -122
  201. package/dist/chunk-VI7WCO2J.cjs +0 -3
  202. package/dist/chunk-VTOL3URF.js +0 -4
  203. package/dist/chunk-VVVCCB6R.js +0 -2
  204. package/dist/chunk-W2GPP6RB.js +0 -122
  205. package/dist/chunk-WHOA7YJU.cjs +0 -1
  206. package/dist/chunk-WNRUPL26.js +0 -2
  207. package/dist/chunk-XIAJQLGS.js +0 -2
  208. package/dist/chunk-XK6UB77Q.js +0 -4
  209. package/dist/chunk-Y2VHO66Q.cjs +0 -3
  210. package/dist/chunk-Y5O2OD7J.cjs +0 -3
  211. package/dist/chunk-YARB43JG.cjs +0 -56
  212. package/dist/chunk-YLCEMVYY.cjs +0 -56
  213. package/dist/chunk-YSOM57GK.cjs +0 -3
  214. package/dist/chunk-Z3UVDGYS.cjs +0 -56
  215. package/dist/chunk-ZO3YB5DK.cjs +0 -1
  216. package/dist/chunk-ZOVH6QT5.cjs +0 -1
  217. package/dist/chunk-ZRIBWDYJ.js +0 -384
  218. package/dist/chunk-ZWDBPEXL.js +0 -115
  219. package/dist/index-B9BFNOHd.d.cts +0 -105
  220. package/dist/index-BMcYFpTv.d.cts +0 -105
  221. package/dist/index-ByOM1Y5x.d.ts +0 -105
  222. package/dist/index-C6xmtRio.d.cts +0 -105
  223. package/dist/index-CTI3K_uq.d.cts +0 -105
  224. package/dist/index-CTL4zv_u.d.ts +0 -105
  225. package/dist/index-CaDbioSg.d.ts +0 -105
  226. package/dist/index-CxA9uOv0.d.ts +0 -105
  227. package/dist/index-D6AXbuPI.d.ts +0 -105
  228. package/dist/index-DF0KDBaM.d.cts +0 -105
  229. package/dist/index-DG4Xu7gA.d.cts +0 -105
  230. package/dist/index-DS3DpJli.d.cts +0 -105
  231. package/dist/index-eHex8Iwj.d.ts +0 -105
  232. package/dist/index-rm7uyOK1.d.cts +0 -105
  233. package/dist/lib-5QYYN6ML.cjs +0 -12
  234. package/dist/lib-XXYYUPMW.js +0 -13
  235. package/dist/local-S5VA7IXE.cjs +0 -1
  236. package/dist/local-T7GISZBL.js +0 -1
  237. package/dist/mongo-auth-adapter-GR2CFFEA.js +0 -1
  238. package/dist/mongo-auth-adapter-UOO2LZUJ.cjs +0 -1
  239. package/dist/nodemailer-transport-CHO2WKIY.js +0 -1
  240. package/dist/nodemailer-transport-ED2IXNGW.cjs +0 -1
  241. package/dist/types-6ShQp2EM.d.cts +0 -839
  242. package/dist/types-B5Qz1svz.d.cts +0 -822
  243. package/dist/types-B9oXBEKI.d.ts +0 -330
  244. package/dist/types-Bii0bhUV.d.cts +0 -329
  245. package/dist/types-Bt2_ycUO.d.ts +0 -811
  246. package/dist/types-C4wXHImf.d.ts +0 -822
  247. package/dist/types-C8yIAV6K.d.cts +0 -839
  248. package/dist/types-CORUQhY-.d.ts +0 -839
  249. package/dist/types-CjGqxBd3.d.cts +0 -330
  250. package/dist/types-CjGqxBd3.d.ts +0 -330
  251. package/dist/types-DBGR-eQl.d.cts +0 -839
  252. package/dist/types-DCWgPFmi.d.cts +0 -822
  253. package/dist/types-DROqAsr0.d.cts +0 -330
  254. package/dist/types-DROqAsr0.d.ts +0 -330
  255. package/dist/types-DlGSbh7I.d.cts +0 -297
  256. package/dist/types-DlGSbh7I.d.ts +0 -297
  257. package/dist/types-DsF64Wrc.d.cts +0 -811
  258. package/dist/types-IeKFn7Ky.d.ts +0 -839
  259. package/dist/types-ZrjEVWfi.d.ts +0 -811
  260. package/dist/types-dEy5JxvN.d.ts +0 -822
  261. package/dist/types-tVJc9YbX.d.cts +0 -811
  262. package/dist/types-zt5qIvje.d.ts +0 -839
@@ -1,4 +1,4 @@
1
- import { F as Field } from './types-B9oXBEKI.cjs';
1
+ import { F as Field } from './types-C3QFX0l6.js';
2
2
 
3
3
  interface Request {
4
4
  body?: any;
@@ -834,6 +834,27 @@ interface KyroConfig {
834
834
  max?: number;
835
835
  };
836
836
  debug?: boolean;
837
+ /**
838
+ * Experimental features configuration.
839
+ * Opt-in to features undergoing active development.
840
+ */
841
+ experimental?: ExperimentalConfig;
842
+ }
843
+ /**
844
+ * Experimental features configuration.
845
+ * Features toggled here are active work-in-progress and subject to change across minor releases.
846
+ */
847
+ interface ExperimentalConfig {
848
+ /** Enable WebSocket real-time engine and multiplayer presence synchronization */
849
+ websockets?: boolean;
850
+ /** Enable AI Assistant and LLM copilot integrations */
851
+ aiAssistant?: boolean;
852
+ /** Enable vector embeddings and semantic search endpoints */
853
+ vectorSearch?: boolean;
854
+ /** Enable dynamic design token compilation (/api/tokens.css) */
855
+ designTokens?: boolean;
856
+ /** Enable live visual preview / island canvas */
857
+ visualCanvas?: boolean;
837
858
  }
838
859
 
839
- export { getWhereClause as $, type AccessArgs as A, type BaseAdapter as B, type CollectionConfig as C, type DeleteArgs as D, type EmailConfig as E, type FindArgs as F, type GlobalConfig as G, type HierarchyConfig as H, type ImageSize as I, type PluginHooks as J, KyroPlugin as K, type ProjectConfig as L, ReviewsPlugin as M, SEOPlugin as N, type OrganizationConfig as O, PluginManager as P, type SmartViewConfig as Q, type Request as R, type StorageConfig as S, type TenantContext as T, type UpdateArgs as U, type VersionRecord as V, type UploadConfig as W, type VersionConfig as X, type WhereClause as Y, WishlistPlugin as Z, evaluateAccess as _, type StorageProvider as a, mergeWhereClauses as a0, presetPlugins as a1, resolveProvider as a2, runFieldHooks as a3, runHooks as a4, type FindResult as b, type FindByIDArgs as c, type CreateArgs as d, type FindOneArgs as e, type FindVersionsArgs as f, type CreateVersionArgs as g, type KyroConfig as h, type User as i, type AccessControl as j, type AdapterConfig as k, type AdminConfig as l, AnalyticsPlugin as m, type AuthConfig as n, type CollectionAccess as o, type CollectionHooks as p, CommentsPlugin as q, ConfigService as r, type CreateResult as s, type FieldAccess as t, type FieldHooks as u, type GlobalAccess as v, type GlobalHooks as w, type Hook as x, type HookArgs as y, type PluginAPI as z };
860
+ export { evaluateAccess as $, type AccessArgs as A, type BaseAdapter as B, type CollectionConfig as C, type DeleteArgs as D, type EmailConfig as E, type FindArgs as F, type GlobalConfig as G, type HierarchyConfig as H, type ImageSize as I, type PluginAPI as J, KyroPlugin as K, type PluginHooks as L, type ProjectConfig as M, ReviewsPlugin as N, type OrganizationConfig as O, PluginManager as P, SEOPlugin as Q, type Request as R, type StorageConfig as S, type TenantContext as T, type UpdateArgs as U, type VersionRecord as V, type SmartViewConfig as W, type UploadConfig as X, type VersionConfig as Y, type WhereClause as Z, WishlistPlugin as _, type StorageProvider as a, getWhereClause as a0, mergeWhereClauses as a1, presetPlugins as a2, resolveProvider as a3, runFieldHooks as a4, runHooks as a5, type FindResult as b, type FindByIDArgs as c, type CreateArgs as d, type FindOneArgs as e, type FindVersionsArgs as f, type CreateVersionArgs as g, type KyroConfig as h, type User as i, type AccessControl as j, type AdapterConfig as k, type AdminConfig as l, AnalyticsPlugin as m, type AuthConfig as n, type CollectionAccess as o, type CollectionHooks as p, CommentsPlugin as q, ConfigService as r, type CreateResult as s, type ExperimentalConfig as t, type FieldAccess as u, type FieldHooks as v, type GlobalAccess as w, type GlobalHooks as x, type Hook as y, type HookArgs as z };
@@ -1,4 +1,4 @@
1
- import { F as Field } from './types-CjGqxBd3.js';
1
+ import { F as Field } from './types-C3QFX0l6.cjs';
2
2
 
3
3
  interface Request {
4
4
  body?: any;
@@ -834,6 +834,27 @@ interface KyroConfig {
834
834
  max?: number;
835
835
  };
836
836
  debug?: boolean;
837
+ /**
838
+ * Experimental features configuration.
839
+ * Opt-in to features undergoing active development.
840
+ */
841
+ experimental?: ExperimentalConfig;
842
+ }
843
+ /**
844
+ * Experimental features configuration.
845
+ * Features toggled here are active work-in-progress and subject to change across minor releases.
846
+ */
847
+ interface ExperimentalConfig {
848
+ /** Enable WebSocket real-time engine and multiplayer presence synchronization */
849
+ websockets?: boolean;
850
+ /** Enable AI Assistant and LLM copilot integrations */
851
+ aiAssistant?: boolean;
852
+ /** Enable vector embeddings and semantic search endpoints */
853
+ vectorSearch?: boolean;
854
+ /** Enable dynamic design token compilation (/api/tokens.css) */
855
+ designTokens?: boolean;
856
+ /** Enable live visual preview / island canvas */
857
+ visualCanvas?: boolean;
837
858
  }
838
859
 
839
- export { getWhereClause as $, type AccessArgs as A, type BaseAdapter as B, type CollectionConfig as C, type DeleteArgs as D, type EmailConfig as E, type FindArgs as F, type GlobalConfig as G, type HierarchyConfig as H, type ImageSize as I, type PluginHooks as J, KyroPlugin as K, type ProjectConfig as L, ReviewsPlugin as M, SEOPlugin as N, type OrganizationConfig as O, PluginManager as P, type SmartViewConfig as Q, type Request as R, type StorageConfig as S, type TenantContext as T, type UpdateArgs as U, type VersionRecord as V, type UploadConfig as W, type VersionConfig as X, type WhereClause as Y, WishlistPlugin as Z, evaluateAccess as _, type StorageProvider as a, mergeWhereClauses as a0, presetPlugins as a1, resolveProvider as a2, runFieldHooks as a3, runHooks as a4, type FindResult as b, type FindByIDArgs as c, type CreateArgs as d, type FindOneArgs as e, type FindVersionsArgs as f, type CreateVersionArgs as g, type KyroConfig as h, type User as i, type AccessControl as j, type AdapterConfig as k, type AdminConfig as l, AnalyticsPlugin as m, type AuthConfig as n, type CollectionAccess as o, type CollectionHooks as p, CommentsPlugin as q, ConfigService as r, type CreateResult as s, type FieldAccess as t, type FieldHooks as u, type GlobalAccess as v, type GlobalHooks as w, type Hook as x, type HookArgs as y, type PluginAPI as z };
860
+ export { evaluateAccess as $, type AccessArgs as A, type BaseAdapter as B, type CollectionConfig as C, type DeleteArgs as D, type EmailConfig as E, type FindArgs as F, type GlobalConfig as G, type HierarchyConfig as H, type ImageSize as I, type PluginAPI as J, KyroPlugin as K, type PluginHooks as L, type ProjectConfig as M, ReviewsPlugin as N, type OrganizationConfig as O, PluginManager as P, SEOPlugin as Q, type Request as R, type StorageConfig as S, type TenantContext as T, type UpdateArgs as U, type VersionRecord as V, type SmartViewConfig as W, type UploadConfig as X, type VersionConfig as Y, type WhereClause as Z, WishlistPlugin as _, type StorageProvider as a, getWhereClause as a0, mergeWhereClauses as a1, presetPlugins as a2, resolveProvider as a3, runFieldHooks as a4, runHooks as a5, type FindResult as b, type FindByIDArgs as c, type CreateArgs as d, type FindOneArgs as e, type FindVersionsArgs as f, type CreateVersionArgs as g, type KyroConfig as h, type User as i, type AccessControl as j, type AdapterConfig as k, type AdminConfig as l, AnalyticsPlugin as m, type AuthConfig as n, type CollectionAccess as o, type CollectionHooks as p, CommentsPlugin as q, ConfigService as r, type CreateResult as s, type ExperimentalConfig as t, type FieldAccess as u, type FieldHooks as v, type GlobalAccess as w, type GlobalHooks as x, type Hook as y, type HookArgs as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyro-cms/core",
3
- "version": "0.13.2",
3
+ "version": "0.13.5",
4
4
  "description": "Astro-native headless CMS with multi-database adapters, multi-protocol APIs, and multi-vendor support",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -191,7 +191,7 @@
191
191
  "ws": "^8.18.0",
192
192
  "zod": "^3.24.0",
193
193
  "zod-to-json-schema": "^3.25.2",
194
- "@kyro-cms/ai": "0.13.0"
194
+ "@kyro-cms/ai": "0.13.1"
195
195
  },
196
196
  "devDependencies": {
197
197
  "@tailwindcss/vite": "^4.0.0",
@@ -1,143 +0,0 @@
1
- import { B as BaseAdapter } from './types-DCWgPFmi.cjs';
2
-
3
- declare const WEBHOOK_EVENTS: {
4
- readonly COLLECTION_CREATE: "collection.create";
5
- readonly COLLECTION_UPDATE: "collection.update";
6
- readonly COLLECTION_DELETE: "collection.delete";
7
- readonly MEDIA_UPLOAD: "media.upload";
8
- readonly MEDIA_DELETE: "media.delete";
9
- readonly AUTH_LOGIN: "auth.login";
10
- readonly AUTH_REGISTER: "auth.register";
11
- readonly AUTH_LOGOUT: "auth.logout";
12
- readonly ORDER_CREATED: "order.created";
13
- readonly ORDER_PAID: "order.paid";
14
- readonly ORDER_SHIPPED: "order.shipped";
15
- readonly ORDER_DELIVERED: "order.delivered";
16
- };
17
- type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
18
- declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
19
- type WebhookActionType = "generic" | "github-push";
20
- interface WebhookActionConfig {
21
- githubOwner?: string;
22
- githubRepo?: string;
23
- githubBranch?: string;
24
- }
25
- interface WebhookConfig {
26
- id: string;
27
- name: string;
28
- url: string;
29
- events: WebhookEvent[];
30
- collections?: string[];
31
- status: "active" | "inactive" | "error";
32
- secret?: string;
33
- headers?: Record<string, string>;
34
- action?: WebhookActionType;
35
- config?: WebhookActionConfig;
36
- lastTriggered?: string;
37
- lastError?: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- }
41
- interface CreateWebhookData {
42
- name: string;
43
- url: string;
44
- events: (WebhookEvent | "create" | "update" | "delete")[];
45
- collections?: string[];
46
- status?: "active" | "inactive";
47
- secret?: string;
48
- headers?: Record<string, string>;
49
- action?: WebhookActionType;
50
- config?: WebhookActionConfig;
51
- }
52
- interface UpdateWebhookData {
53
- name?: string;
54
- url?: string;
55
- events?: (WebhookEvent | "create" | "update" | "delete")[];
56
- collections?: string[];
57
- status?: "active" | "inactive" | "error";
58
- secret?: string;
59
- headers?: Record<string, string>;
60
- action?: WebhookActionType;
61
- config?: WebhookActionConfig;
62
- lastTriggered?: string | null;
63
- lastError?: string | null;
64
- }
65
- interface WebhookPayload {
66
- id: string;
67
- event: WebhookEvent;
68
- timestamp: string;
69
- collection?: string;
70
- operation?: "create" | "update" | "delete";
71
- data?: unknown;
72
- previousData?: unknown;
73
- user?: {
74
- id: string;
75
- email?: string;
76
- role?: string;
77
- };
78
- tenantId?: string;
79
- metadata?: Record<string, unknown>;
80
- }
81
- interface WebhookDelivery {
82
- id: string;
83
- webhookId: string;
84
- event: WebhookEvent;
85
- payload: WebhookPayload;
86
- attempt: number;
87
- status: "pending" | "success" | "failed" | "retrying";
88
- responseStatus?: number;
89
- responseBody?: string;
90
- error?: string;
91
- duration?: number;
92
- createdAt: string;
93
- deliveredAt?: string;
94
- nextRetryAt?: string;
95
- }
96
- interface WebhookTriggerResult {
97
- deliveryId: string;
98
- webhookId: string;
99
- event: WebhookEvent;
100
- status: "queued" | "success" | "failed";
101
- responseStatus?: number;
102
- duration?: number;
103
- error?: string;
104
- }
105
- declare const WEBHOOK_COLLECTION = "_webhooks";
106
- declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
107
- interface DeliveryResult {
108
- success: boolean;
109
- status: number;
110
- statusText?: string;
111
- body?: string;
112
- duration: number;
113
- error?: string;
114
- }
115
- interface DeliveryOptions {
116
- timeout?: number;
117
- maxRetries?: number;
118
- retryDelay?: number;
119
- onRetry?: (attempt: number, error: string) => void;
120
- onSuccess?: (result: DeliveryResult) => void;
121
- onFailure?: (error: string) => void;
122
- }
123
-
124
- declare class WebhookService {
125
- private db;
126
- constructor(db: BaseAdapter);
127
- getWebhooks(filters?: {
128
- status?: string;
129
- event?: WebhookEvent;
130
- }): Promise<WebhookConfig[]>;
131
- getWebhookById(id: string): Promise<WebhookConfig | null>;
132
- createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
133
- updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
134
- deleteWebhook(id: string): Promise<void>;
135
- trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
136
- triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
137
- testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
138
- getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
139
- retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
140
- }
141
- declare function createWebhookService(db: BaseAdapter): WebhookService;
142
-
143
- export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
@@ -1,143 +0,0 @@
1
- import { B as BaseAdapter } from './types-6ShQp2EM.cjs';
2
-
3
- declare const WEBHOOK_EVENTS: {
4
- readonly COLLECTION_CREATE: "collection.create";
5
- readonly COLLECTION_UPDATE: "collection.update";
6
- readonly COLLECTION_DELETE: "collection.delete";
7
- readonly MEDIA_UPLOAD: "media.upload";
8
- readonly MEDIA_DELETE: "media.delete";
9
- readonly AUTH_LOGIN: "auth.login";
10
- readonly AUTH_REGISTER: "auth.register";
11
- readonly AUTH_LOGOUT: "auth.logout";
12
- readonly ORDER_CREATED: "order.created";
13
- readonly ORDER_PAID: "order.paid";
14
- readonly ORDER_SHIPPED: "order.shipped";
15
- readonly ORDER_DELIVERED: "order.delivered";
16
- };
17
- type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
18
- declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
19
- type WebhookActionType = "generic" | "github-push";
20
- interface WebhookActionConfig {
21
- githubOwner?: string;
22
- githubRepo?: string;
23
- githubBranch?: string;
24
- }
25
- interface WebhookConfig {
26
- id: string;
27
- name: string;
28
- url: string;
29
- events: WebhookEvent[];
30
- collections?: string[];
31
- status: "active" | "inactive" | "error";
32
- secret?: string;
33
- headers?: Record<string, string>;
34
- action?: WebhookActionType;
35
- config?: WebhookActionConfig;
36
- lastTriggered?: string;
37
- lastError?: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- }
41
- interface CreateWebhookData {
42
- name: string;
43
- url: string;
44
- events: (WebhookEvent | "create" | "update" | "delete")[];
45
- collections?: string[];
46
- status?: "active" | "inactive";
47
- secret?: string;
48
- headers?: Record<string, string>;
49
- action?: WebhookActionType;
50
- config?: WebhookActionConfig;
51
- }
52
- interface UpdateWebhookData {
53
- name?: string;
54
- url?: string;
55
- events?: (WebhookEvent | "create" | "update" | "delete")[];
56
- collections?: string[];
57
- status?: "active" | "inactive" | "error";
58
- secret?: string;
59
- headers?: Record<string, string>;
60
- action?: WebhookActionType;
61
- config?: WebhookActionConfig;
62
- lastTriggered?: string | null;
63
- lastError?: string | null;
64
- }
65
- interface WebhookPayload {
66
- id: string;
67
- event: WebhookEvent;
68
- timestamp: string;
69
- collection?: string;
70
- operation?: "create" | "update" | "delete";
71
- data?: unknown;
72
- previousData?: unknown;
73
- user?: {
74
- id: string;
75
- email?: string;
76
- role?: string;
77
- };
78
- tenantId?: string;
79
- metadata?: Record<string, unknown>;
80
- }
81
- interface WebhookDelivery {
82
- id: string;
83
- webhookId: string;
84
- event: WebhookEvent;
85
- payload: WebhookPayload;
86
- attempt: number;
87
- status: "pending" | "success" | "failed" | "retrying";
88
- responseStatus?: number;
89
- responseBody?: string;
90
- error?: string;
91
- duration?: number;
92
- createdAt: string;
93
- deliveredAt?: string;
94
- nextRetryAt?: string;
95
- }
96
- interface WebhookTriggerResult {
97
- deliveryId: string;
98
- webhookId: string;
99
- event: WebhookEvent;
100
- status: "queued" | "success" | "failed";
101
- responseStatus?: number;
102
- duration?: number;
103
- error?: string;
104
- }
105
- declare const WEBHOOK_COLLECTION = "_webhooks";
106
- declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
107
- interface DeliveryResult {
108
- success: boolean;
109
- status: number;
110
- statusText?: string;
111
- body?: string;
112
- duration: number;
113
- error?: string;
114
- }
115
- interface DeliveryOptions {
116
- timeout?: number;
117
- maxRetries?: number;
118
- retryDelay?: number;
119
- onRetry?: (attempt: number, error: string) => void;
120
- onSuccess?: (result: DeliveryResult) => void;
121
- onFailure?: (error: string) => void;
122
- }
123
-
124
- declare class WebhookService {
125
- private db;
126
- constructor(db: BaseAdapter);
127
- getWebhooks(filters?: {
128
- status?: string;
129
- event?: WebhookEvent;
130
- }): Promise<WebhookConfig[]>;
131
- getWebhookById(id: string): Promise<WebhookConfig | null>;
132
- createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
133
- updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
134
- deleteWebhook(id: string): Promise<void>;
135
- trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
136
- triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
137
- testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
138
- getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
139
- retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
140
- }
141
- declare function createWebhookService(db: BaseAdapter): WebhookService;
142
-
143
- export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
@@ -1,143 +0,0 @@
1
- import { B as BaseAdapter } from './types-Cdssrcbz.cjs';
2
-
3
- declare const WEBHOOK_EVENTS: {
4
- readonly COLLECTION_CREATE: "collection.create";
5
- readonly COLLECTION_UPDATE: "collection.update";
6
- readonly COLLECTION_DELETE: "collection.delete";
7
- readonly MEDIA_UPLOAD: "media.upload";
8
- readonly MEDIA_DELETE: "media.delete";
9
- readonly AUTH_LOGIN: "auth.login";
10
- readonly AUTH_REGISTER: "auth.register";
11
- readonly AUTH_LOGOUT: "auth.logout";
12
- readonly ORDER_CREATED: "order.created";
13
- readonly ORDER_PAID: "order.paid";
14
- readonly ORDER_SHIPPED: "order.shipped";
15
- readonly ORDER_DELIVERED: "order.delivered";
16
- };
17
- type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
18
- declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
19
- type WebhookActionType = "generic" | "github-push";
20
- interface WebhookActionConfig {
21
- githubOwner?: string;
22
- githubRepo?: string;
23
- githubBranch?: string;
24
- }
25
- interface WebhookConfig {
26
- id: string;
27
- name: string;
28
- url: string;
29
- events: WebhookEvent[];
30
- collections?: string[];
31
- status: "active" | "inactive" | "error";
32
- secret?: string;
33
- headers?: Record<string, string>;
34
- action?: WebhookActionType;
35
- config?: WebhookActionConfig;
36
- lastTriggered?: string;
37
- lastError?: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- }
41
- interface CreateWebhookData {
42
- name: string;
43
- url: string;
44
- events: (WebhookEvent | "create" | "update" | "delete")[];
45
- collections?: string[];
46
- status?: "active" | "inactive";
47
- secret?: string;
48
- headers?: Record<string, string>;
49
- action?: WebhookActionType;
50
- config?: WebhookActionConfig;
51
- }
52
- interface UpdateWebhookData {
53
- name?: string;
54
- url?: string;
55
- events?: (WebhookEvent | "create" | "update" | "delete")[];
56
- collections?: string[];
57
- status?: "active" | "inactive" | "error";
58
- secret?: string;
59
- headers?: Record<string, string>;
60
- action?: WebhookActionType;
61
- config?: WebhookActionConfig;
62
- lastTriggered?: string | null;
63
- lastError?: string | null;
64
- }
65
- interface WebhookPayload {
66
- id: string;
67
- event: WebhookEvent;
68
- timestamp: string;
69
- collection?: string;
70
- operation?: "create" | "update" | "delete";
71
- data?: unknown;
72
- previousData?: unknown;
73
- user?: {
74
- id: string;
75
- email?: string;
76
- role?: string;
77
- };
78
- tenantId?: string;
79
- metadata?: Record<string, unknown>;
80
- }
81
- interface WebhookDelivery {
82
- id: string;
83
- webhookId: string;
84
- event: WebhookEvent;
85
- payload: WebhookPayload;
86
- attempt: number;
87
- status: "pending" | "success" | "failed" | "retrying";
88
- responseStatus?: number;
89
- responseBody?: string;
90
- error?: string;
91
- duration?: number;
92
- createdAt: string;
93
- deliveredAt?: string;
94
- nextRetryAt?: string;
95
- }
96
- interface WebhookTriggerResult {
97
- deliveryId: string;
98
- webhookId: string;
99
- event: WebhookEvent;
100
- status: "queued" | "success" | "failed";
101
- responseStatus?: number;
102
- duration?: number;
103
- error?: string;
104
- }
105
- declare const WEBHOOK_COLLECTION = "_webhooks";
106
- declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
107
- interface DeliveryResult {
108
- success: boolean;
109
- status: number;
110
- statusText?: string;
111
- body?: string;
112
- duration: number;
113
- error?: string;
114
- }
115
- interface DeliveryOptions {
116
- timeout?: number;
117
- maxRetries?: number;
118
- retryDelay?: number;
119
- onRetry?: (attempt: number, error: string) => void;
120
- onSuccess?: (result: DeliveryResult) => void;
121
- onFailure?: (error: string) => void;
122
- }
123
-
124
- declare class WebhookService {
125
- private db;
126
- constructor(db: BaseAdapter);
127
- getWebhooks(filters?: {
128
- status?: string;
129
- event?: WebhookEvent;
130
- }): Promise<WebhookConfig[]>;
131
- getWebhookById(id: string): Promise<WebhookConfig | null>;
132
- createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
133
- updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
134
- deleteWebhook(id: string): Promise<void>;
135
- trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
136
- triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
137
- testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
138
- getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
139
- retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
140
- }
141
- declare function createWebhookService(db: BaseAdapter): WebhookService;
142
-
143
- export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };
@@ -1,143 +0,0 @@
1
- import { B as BaseAdapter } from './types-B5Qz1svz.cjs';
2
-
3
- declare const WEBHOOK_EVENTS: {
4
- readonly COLLECTION_CREATE: "collection.create";
5
- readonly COLLECTION_UPDATE: "collection.update";
6
- readonly COLLECTION_DELETE: "collection.delete";
7
- readonly MEDIA_UPLOAD: "media.upload";
8
- readonly MEDIA_DELETE: "media.delete";
9
- readonly AUTH_LOGIN: "auth.login";
10
- readonly AUTH_REGISTER: "auth.register";
11
- readonly AUTH_LOGOUT: "auth.logout";
12
- readonly ORDER_CREATED: "order.created";
13
- readonly ORDER_PAID: "order.paid";
14
- readonly ORDER_SHIPPED: "order.shipped";
15
- readonly ORDER_DELIVERED: "order.delivered";
16
- };
17
- type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
18
- declare const ALL_WEBHOOK_EVENTS: WebhookEvent[];
19
- type WebhookActionType = "generic" | "github-push";
20
- interface WebhookActionConfig {
21
- githubOwner?: string;
22
- githubRepo?: string;
23
- githubBranch?: string;
24
- }
25
- interface WebhookConfig {
26
- id: string;
27
- name: string;
28
- url: string;
29
- events: WebhookEvent[];
30
- collections?: string[];
31
- status: "active" | "inactive" | "error";
32
- secret?: string;
33
- headers?: Record<string, string>;
34
- action?: WebhookActionType;
35
- config?: WebhookActionConfig;
36
- lastTriggered?: string;
37
- lastError?: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- }
41
- interface CreateWebhookData {
42
- name: string;
43
- url: string;
44
- events: (WebhookEvent | "create" | "update" | "delete")[];
45
- collections?: string[];
46
- status?: "active" | "inactive";
47
- secret?: string;
48
- headers?: Record<string, string>;
49
- action?: WebhookActionType;
50
- config?: WebhookActionConfig;
51
- }
52
- interface UpdateWebhookData {
53
- name?: string;
54
- url?: string;
55
- events?: (WebhookEvent | "create" | "update" | "delete")[];
56
- collections?: string[];
57
- status?: "active" | "inactive" | "error";
58
- secret?: string;
59
- headers?: Record<string, string>;
60
- action?: WebhookActionType;
61
- config?: WebhookActionConfig;
62
- lastTriggered?: string | null;
63
- lastError?: string | null;
64
- }
65
- interface WebhookPayload {
66
- id: string;
67
- event: WebhookEvent;
68
- timestamp: string;
69
- collection?: string;
70
- operation?: "create" | "update" | "delete";
71
- data?: unknown;
72
- previousData?: unknown;
73
- user?: {
74
- id: string;
75
- email?: string;
76
- role?: string;
77
- };
78
- tenantId?: string;
79
- metadata?: Record<string, unknown>;
80
- }
81
- interface WebhookDelivery {
82
- id: string;
83
- webhookId: string;
84
- event: WebhookEvent;
85
- payload: WebhookPayload;
86
- attempt: number;
87
- status: "pending" | "success" | "failed" | "retrying";
88
- responseStatus?: number;
89
- responseBody?: string;
90
- error?: string;
91
- duration?: number;
92
- createdAt: string;
93
- deliveredAt?: string;
94
- nextRetryAt?: string;
95
- }
96
- interface WebhookTriggerResult {
97
- deliveryId: string;
98
- webhookId: string;
99
- event: WebhookEvent;
100
- status: "queued" | "success" | "failed";
101
- responseStatus?: number;
102
- duration?: number;
103
- error?: string;
104
- }
105
- declare const WEBHOOK_COLLECTION = "_webhooks";
106
- declare const WEBHOOK_DELIVERY_COLLECTION = "_webhook_deliveries";
107
- interface DeliveryResult {
108
- success: boolean;
109
- status: number;
110
- statusText?: string;
111
- body?: string;
112
- duration: number;
113
- error?: string;
114
- }
115
- interface DeliveryOptions {
116
- timeout?: number;
117
- maxRetries?: number;
118
- retryDelay?: number;
119
- onRetry?: (attempt: number, error: string) => void;
120
- onSuccess?: (result: DeliveryResult) => void;
121
- onFailure?: (error: string) => void;
122
- }
123
-
124
- declare class WebhookService {
125
- private db;
126
- constructor(db: BaseAdapter);
127
- getWebhooks(filters?: {
128
- status?: string;
129
- event?: WebhookEvent;
130
- }): Promise<WebhookConfig[]>;
131
- getWebhookById(id: string): Promise<WebhookConfig | null>;
132
- createWebhook(data: CreateWebhookData): Promise<WebhookConfig>;
133
- updateWebhook(id: string, data: UpdateWebhookData): Promise<WebhookConfig | null>;
134
- deleteWebhook(id: string): Promise<void>;
135
- trigger(event: WebhookEvent, payloadData: Omit<WebhookPayload, "id" | "event" | "timestamp">): Promise<WebhookTriggerResult[]>;
136
- triggerWebhook(webhook: WebhookConfig, payload: WebhookPayload): Promise<WebhookTriggerResult>;
137
- testWebhook(webhookId: string): Promise<WebhookTriggerResult | null>;
138
- getDeliveryHistory(webhookId: string, limit?: number): Promise<WebhookDelivery[]>;
139
- retryDelivery(deliveryId: string): Promise<WebhookTriggerResult | null>;
140
- }
141
- declare function createWebhookService(db: BaseAdapter): WebhookService;
142
-
143
- export { ALL_WEBHOOK_EVENTS as A, type CreateWebhookData as C, type DeliveryResult as D, type UpdateWebhookData as U, type WebhookPayload as W, type WebhookDelivery as a, type WebhookConfig as b, type DeliveryOptions as c, WebhookService as d, WEBHOOK_COLLECTION as e, WEBHOOK_DELIVERY_COLLECTION as f, WEBHOOK_EVENTS as g, type WebhookEvent as h, type WebhookTriggerResult as i, createWebhookService as j };