@mastra/server 1.58.0-alpha.8 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/dist/{a2a-_D2EA4oa.js → a2a-CUkzkdTZ.js} +3 -3
  3. package/dist/{a2a-_D2EA4oa.js.map → a2a-CUkzkdTZ.js.map} +1 -1
  4. package/dist/{a2a-B6YkZ2i9.cjs → a2a-DzZHH3OH.cjs} +3 -3
  5. package/dist/{a2a-B6YkZ2i9.cjs.map → a2a-DzZHH3OH.cjs.map} +1 -1
  6. package/dist/{agent-versions-DBwhQgbJ.js → agent-versions-CWEnD62A.js} +3 -3
  7. package/dist/{agent-versions-DBwhQgbJ.js.map → agent-versions-CWEnD62A.js.map} +1 -1
  8. package/dist/{agent-versions-znzuht90.cjs → agent-versions-xeysPGel.cjs} +3 -3
  9. package/dist/{agent-versions-znzuht90.cjs.map → agent-versions-xeysPGel.cjs.map} +1 -1
  10. package/dist/{agents--m8fNv8n.cjs → agents-0Tw3kkD_.cjs} +8 -4
  11. package/dist/agents-0Tw3kkD_.cjs.map +1 -0
  12. package/dist/{agents-DpZKzU92.js → agents-uT8ZDE4k.js} +8 -4
  13. package/dist/agents-uT8ZDE4k.js.map +1 -0
  14. package/dist/{api-schema-manifest-ShM6oDjl.cjs → api-schema-manifest-BPk3u4B-.cjs} +3 -3
  15. package/dist/{api-schema-manifest-ShM6oDjl.cjs.map → api-schema-manifest-BPk3u4B-.cjs.map} +1 -1
  16. package/dist/{api-schema-manifest-BEbcI0wc.js → api-schema-manifest-DSelT9XK.js} +3 -3
  17. package/dist/{api-schema-manifest-BEbcI0wc.js.map → api-schema-manifest-DSelT9XK.js.map} +1 -1
  18. package/dist/{background-tasks-DnmhLalp.js → background-tasks-BtWM0sZs.js} +2 -2
  19. package/dist/{background-tasks-DnmhLalp.js.map → background-tasks-BtWM0sZs.js.map} +1 -1
  20. package/dist/{background-tasks-CYgzzUnb.cjs → background-tasks-C5G2jJax.cjs} +2 -2
  21. package/dist/{background-tasks-CYgzzUnb.cjs.map → background-tasks-C5G2jJax.cjs.map} +1 -1
  22. package/dist/{builder-registry-DE5w7bNk.js → builder-registry-B8KyPAOP.js} +3 -3
  23. package/dist/{builder-registry-DE5w7bNk.js.map → builder-registry-B8KyPAOP.js.map} +1 -1
  24. package/dist/{builder-registry-BoaXBdm_.cjs → builder-registry-Dcou-kzd.cjs} +3 -3
  25. package/dist/{builder-registry-BoaXBdm_.cjs.map → builder-registry-Dcou-kzd.cjs.map} +1 -1
  26. package/dist/{channels-BqkOxxEk.js → channels-B9yt3a2P.js} +2 -2
  27. package/dist/{channels-BqkOxxEk.js.map → channels-B9yt3a2P.js.map} +1 -1
  28. package/dist/{channels-BonQBJT0.cjs → channels-BRoq3VKR.cjs} +2 -2
  29. package/dist/{channels-BonQBJT0.cjs.map → channels-BRoq3VKR.cjs.map} +1 -1
  30. package/dist/{default-options-BcPyp2Gx.cjs → default-options-C9HZGjYi.cjs} +6 -3
  31. package/dist/{default-options-BcPyp2Gx.cjs.map → default-options-C9HZGjYi.cjs.map} +1 -1
  32. package/dist/{default-options-DGCDKR3I.js → default-options-C9JVjlto.js} +6 -3
  33. package/dist/{default-options-DGCDKR3I.js.map → default-options-C9JVjlto.js.map} +1 -1
  34. package/dist/{dist-D-2BtcNU.js → dist-7r8jzEWH.js} +68 -1303
  35. package/dist/dist-7r8jzEWH.js.map +1 -0
  36. package/dist/{dist-DhqgxyoU.cjs → dist-DEgLyP8h.cjs} +77 -1315
  37. package/dist/dist-DEgLyP8h.cjs.map +1 -0
  38. package/dist/docs/SKILL.md +2 -1
  39. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  40. package/dist/docs/references/docs-server-custom-adapters.md +1 -1
  41. package/dist/docs/references/docs-server-custom-api-routes.md +375 -0
  42. package/dist/docs/references/reference-server-create-route.md +27 -1
  43. package/dist/{dynamic-workflows-B4LI2B52.js → dynamic-workflows-B0TE8mjA.js} +2 -2
  44. package/dist/{dynamic-workflows-B4LI2B52.js.map → dynamic-workflows-B0TE8mjA.js.map} +1 -1
  45. package/dist/{dynamic-workflows-BXeywVEf.cjs → dynamic-workflows-C-6vmau5.cjs} +2 -2
  46. package/dist/{dynamic-workflows-BXeywVEf.cjs.map → dynamic-workflows-C-6vmau5.cjs.map} +1 -1
  47. package/dist/{editor-builder-DTC6ejp8.js → editor-builder-Byg6wbi6.js} +3 -3
  48. package/dist/{editor-builder-DTC6ejp8.js.map → editor-builder-Byg6wbi6.js.map} +1 -1
  49. package/dist/{editor-builder-CIKX5MYh.cjs → editor-builder-C3ZvffGu.cjs} +2 -2
  50. package/dist/{editor-builder-CIKX5MYh.cjs.map → editor-builder-C3ZvffGu.cjs.map} +1 -1
  51. package/dist/{editor-builder-D20yfDgw.js → editor-builder-DJUxdzC8.js} +2 -2
  52. package/dist/{editor-builder-D20yfDgw.js.map → editor-builder-DJUxdzC8.js.map} +1 -1
  53. package/dist/{editor-builder-B7yBsr6o.cjs → editor-builder-DT7ypWfa.cjs} +3 -3
  54. package/dist/{editor-builder-B7yBsr6o.cjs.map → editor-builder-DT7ypWfa.cjs.map} +1 -1
  55. package/dist/{observability-new-endpoints-Dk3oatL8.cjs → observability-new-endpoints-BC-dasRY.cjs} +2 -2
  56. package/dist/{observability-new-endpoints-Dk3oatL8.cjs.map → observability-new-endpoints-BC-dasRY.cjs.map} +1 -1
  57. package/dist/{observability-new-endpoints-YK2DjZto.js → observability-new-endpoints-Drx0C8uc.js} +2 -2
  58. package/dist/{observability-new-endpoints-YK2DjZto.js.map → observability-new-endpoints-Drx0C8uc.js.map} +1 -1
  59. package/dist/{probe-image-size-DYJVSL0b.cjs → probe-image-size-C2F59z8Z.cjs} +56 -1707
  60. package/dist/probe-image-size-C2F59z8Z.cjs.map +1 -0
  61. package/dist/{probe-image-size-BQgIJeY_.js → probe-image-size-mXCWYNrz.js} +22 -1673
  62. package/dist/probe-image-size-mXCWYNrz.js.map +1 -0
  63. package/dist/{route-builder-CgLVYL1c.cjs → route-builder-BAAedfru.cjs} +11 -2
  64. package/dist/route-builder-BAAedfru.cjs.map +1 -0
  65. package/dist/{route-builder-CIk5k35M.js → route-builder-YQ_gLIvW.js} +11 -2
  66. package/dist/route-builder-YQ_gLIvW.js.map +1 -0
  67. package/dist/{routes-UhNfqEIU.cjs → routes-0BEh3stO.cjs} +10 -10
  68. package/dist/{routes-UhNfqEIU.cjs.map → routes-0BEh3stO.cjs.map} +1 -1
  69. package/dist/{routes-CQgza68o.js → routes-BsMPy5bu.js} +10 -10
  70. package/dist/{routes-CQgza68o.js.map → routes-BsMPy5bu.js.map} +1 -1
  71. package/dist/{schedules-CK3-IE0h.cjs → schedules-DOK225ZZ.cjs} +2 -2
  72. package/dist/{schedules-CK3-IE0h.cjs.map → schedules-DOK225ZZ.cjs.map} +1 -1
  73. package/dist/{schedules-qxFoU-Tb.js → schedules-RjPcNOmY.js} +2 -2
  74. package/dist/{schedules-qxFoU-Tb.js.map → schedules-RjPcNOmY.js.map} +1 -1
  75. package/dist/{schema-Bv9OdW1f-BY6u3u8K.cjs → schema-Bv9OdW1f-CHHI-NTr.cjs} +2 -76
  76. package/dist/schema-Bv9OdW1f-CHHI-NTr.cjs.map +1 -0
  77. package/dist/{schema-Bv9OdW1f-CIOfv-3w.js → schema-Bv9OdW1f-DLSJSqQv.js} +2 -76
  78. package/dist/schema-Bv9OdW1f-DLSJSqQv.js.map +1 -0
  79. package/dist/schema-CGeYTFwm.js +2 -0
  80. package/dist/schema-DkBbires.cjs +1 -0
  81. package/dist/{scorer-versions-PL0wCOT-.cjs → scorer-versions-CYXtxMTU.cjs} +2 -2
  82. package/dist/{scorer-versions-PL0wCOT-.cjs.map → scorer-versions-CYXtxMTU.cjs.map} +1 -1
  83. package/dist/{scorer-versions-DNdVTLOq.js → scorer-versions-CdVjOtQO.js} +2 -2
  84. package/dist/{scorer-versions-DNdVTLOq.js.map → scorer-versions-CdVjOtQO.js.map} +1 -1
  85. package/dist/server/handlers/a2a.cjs +1 -1
  86. package/dist/server/handlers/a2a.d.ts +545 -505
  87. package/dist/server/handlers/a2a.d.ts.map +1 -1
  88. package/dist/server/handlers/a2a.js +1 -1
  89. package/dist/server/handlers/agent-builder.cjs +4 -4
  90. package/dist/server/handlers/agent-builder.d.ts +1069 -764
  91. package/dist/server/handlers/agent-builder.d.ts.map +1 -1
  92. package/dist/server/handlers/agent-builder.js +4 -4
  93. package/dist/server/handlers/agent-controller.cjs +61 -11
  94. package/dist/server/handlers/agent-controller.cjs.map +1 -1
  95. package/dist/server/handlers/agent-controller.d.ts +1547 -893
  96. package/dist/server/handlers/agent-controller.d.ts.map +1 -1
  97. package/dist/server/handlers/agent-controller.js +61 -11
  98. package/dist/server/handlers/agent-controller.js.map +1 -1
  99. package/dist/server/handlers/agent-versions.cjs +3 -3
  100. package/dist/server/handlers/agent-versions.d.ts +8504 -8312
  101. package/dist/server/handlers/agent-versions.d.ts.map +1 -1
  102. package/dist/server/handlers/agent-versions.js +3 -3
  103. package/dist/server/handlers/agents.cjs +6 -6
  104. package/dist/server/handlers/agents.d.ts +9984 -9826
  105. package/dist/server/handlers/agents.d.ts.map +1 -1
  106. package/dist/server/handlers/agents.js +6 -6
  107. package/dist/server/handlers/auth.cjs +1 -1
  108. package/dist/server/handlers/auth.d.ts +693 -297
  109. package/dist/server/handlers/auth.d.ts.map +1 -1
  110. package/dist/server/handlers/auth.js +1 -1
  111. package/dist/server/handlers/background-tasks.cjs +1 -1
  112. package/dist/server/handlers/background-tasks.d.ts +190 -130
  113. package/dist/server/handlers/background-tasks.d.ts.map +1 -1
  114. package/dist/server/handlers/background-tasks.js +1 -1
  115. package/dist/server/handlers/builder-registry.cjs +1 -1
  116. package/dist/server/handlers/builder-registry.d.ts +218 -121
  117. package/dist/server/handlers/builder-registry.d.ts.map +1 -1
  118. package/dist/server/handlers/builder-registry.js +1 -1
  119. package/dist/server/handlers/channels.cjs +1 -1
  120. package/dist/server/handlers/channels.d.ts +157 -77
  121. package/dist/server/handlers/channels.d.ts.map +1 -1
  122. package/dist/server/handlers/channels.js +1 -1
  123. package/dist/server/handlers/conversations.cjs +1 -1
  124. package/dist/server/handlers/conversations.d.ts +221 -141
  125. package/dist/server/handlers/conversations.d.ts.map +1 -1
  126. package/dist/server/handlers/conversations.js +1 -1
  127. package/dist/server/handlers/datasets.cjs +1 -1
  128. package/dist/server/handlers/datasets.d.ts +2669 -2234
  129. package/dist/server/handlers/datasets.d.ts.map +1 -1
  130. package/dist/server/handlers/datasets.js +1 -1
  131. package/dist/server/handlers/dynamic-workflows.cjs +1 -1
  132. package/dist/server/handlers/dynamic-workflows.d.ts +506 -426
  133. package/dist/server/handlers/dynamic-workflows.d.ts.map +1 -1
  134. package/dist/server/handlers/dynamic-workflows.js +1 -1
  135. package/dist/server/handlers/editor-builder.cjs +1 -1
  136. package/dist/server/handlers/editor-builder.d.ts +305 -245
  137. package/dist/server/handlers/editor-builder.d.ts.map +1 -1
  138. package/dist/server/handlers/editor-builder.js +1 -1
  139. package/dist/server/handlers/favorites-enrichment.cjs +1 -1
  140. package/dist/server/handlers/favorites-enrichment.js +1 -1
  141. package/dist/server/handlers/logs.cjs +1 -1
  142. package/dist/server/handlers/logs.d.ts +245 -185
  143. package/dist/server/handlers/logs.d.ts.map +1 -1
  144. package/dist/server/handlers/logs.js +1 -1
  145. package/dist/server/handlers/mcp-client-versions.cjs +2 -2
  146. package/dist/server/handlers/mcp-client-versions.d.ts +447 -307
  147. package/dist/server/handlers/mcp-client-versions.d.ts.map +1 -1
  148. package/dist/server/handlers/mcp-client-versions.js +2 -2
  149. package/dist/server/handlers/mcp.cjs +1 -1
  150. package/dist/server/handlers/mcp.d.ts +357 -156
  151. package/dist/server/handlers/mcp.d.ts.map +1 -1
  152. package/dist/server/handlers/mcp.js +1 -1
  153. package/dist/server/handlers/memory.cjs +1 -1
  154. package/dist/server/handlers/memory.d.ts +1723 -1223
  155. package/dist/server/handlers/memory.d.ts.map +1 -1
  156. package/dist/server/handlers/memory.js +1 -1
  157. package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
  158. package/dist/server/handlers/observability-new-endpoints.d.ts +3239 -2158
  159. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  160. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  161. package/dist/server/handlers/observability-shared.cjs +1 -1
  162. package/dist/server/handlers/observability-shared.js +1 -1
  163. package/dist/server/handlers/observability.cjs +2 -2
  164. package/dist/server/handlers/observability.d.ts +267 -149
  165. package/dist/server/handlers/observability.d.ts.map +1 -1
  166. package/dist/server/handlers/observability.js +2 -2
  167. package/dist/server/handlers/processor-providers.cjs +1 -1
  168. package/dist/server/handlers/processor-providers.d.ts +74 -34
  169. package/dist/server/handlers/processor-providers.d.ts.map +1 -1
  170. package/dist/server/handlers/processor-providers.js +1 -1
  171. package/dist/server/handlers/processors.cjs +1 -1
  172. package/dist/server/handlers/processors.d.ts +222 -173
  173. package/dist/server/handlers/processors.d.ts.map +1 -1
  174. package/dist/server/handlers/processors.js +1 -1
  175. package/dist/server/handlers/prompt-block-versions.cjs +2 -2
  176. package/dist/server/handlers/prompt-block-versions.d.ts +646 -506
  177. package/dist/server/handlers/prompt-block-versions.d.ts.map +1 -1
  178. package/dist/server/handlers/prompt-block-versions.js +2 -2
  179. package/dist/server/handlers/responses.cjs +1 -1
  180. package/dist/server/handlers/responses.d.ts +352 -362
  181. package/dist/server/handlers/responses.d.ts.map +1 -1
  182. package/dist/server/handlers/responses.js +1 -1
  183. package/dist/server/handlers/schedules.cjs +1 -1
  184. package/dist/server/handlers/schedules.d.ts +1190 -1028
  185. package/dist/server/handlers/schedules.d.ts.map +1 -1
  186. package/dist/server/handlers/schedules.js +1 -1
  187. package/dist/server/handlers/scorer-versions.cjs +3 -3
  188. package/dist/server/handlers/scorer-versions.d.ts +551 -411
  189. package/dist/server/handlers/scorer-versions.d.ts.map +1 -1
  190. package/dist/server/handlers/scorer-versions.js +3 -3
  191. package/dist/server/handlers/scores.cjs +1 -1
  192. package/dist/server/handlers/scores.d.ts +287 -167
  193. package/dist/server/handlers/scores.d.ts.map +1 -1
  194. package/dist/server/handlers/scores.js +1 -1
  195. package/dist/server/handlers/stored-agent-favorites.cjs +4 -4
  196. package/dist/server/handlers/stored-agent-favorites.d.ts +62 -22
  197. package/dist/server/handlers/stored-agent-favorites.d.ts.map +1 -1
  198. package/dist/server/handlers/stored-agent-favorites.js +4 -4
  199. package/dist/server/handlers/stored-agents.cjs +4 -4
  200. package/dist/server/handlers/stored-agents.d.ts +12056 -16152
  201. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  202. package/dist/server/handlers/stored-agents.js +4 -4
  203. package/dist/server/handlers/stored-mcp-clients.cjs +2 -2
  204. package/dist/server/handlers/stored-mcp-clients.d.ts +417 -324
  205. package/dist/server/handlers/stored-mcp-clients.d.ts.map +1 -1
  206. package/dist/server/handlers/stored-mcp-clients.js +2 -2
  207. package/dist/server/handlers/stored-prompt-blocks.cjs +2 -2
  208. package/dist/server/handlers/stored-prompt-blocks.d.ts +603 -555
  209. package/dist/server/handlers/stored-prompt-blocks.d.ts.map +1 -1
  210. package/dist/server/handlers/stored-prompt-blocks.js +2 -2
  211. package/dist/server/handlers/stored-scorers.cjs +3 -3
  212. package/dist/server/handlers/stored-scorers.d.ts +556 -472
  213. package/dist/server/handlers/stored-scorers.d.ts.map +1 -1
  214. package/dist/server/handlers/stored-scorers.js +3 -3
  215. package/dist/server/handlers/stored-skill-favorites.cjs +3 -3
  216. package/dist/server/handlers/stored-skill-favorites.d.ts +62 -22
  217. package/dist/server/handlers/stored-skill-favorites.d.ts.map +1 -1
  218. package/dist/server/handlers/stored-skill-favorites.js +3 -3
  219. package/dist/server/handlers/stored-skills.cjs +3 -3
  220. package/dist/server/handlers/stored-skills.d.ts +632 -515
  221. package/dist/server/handlers/stored-skills.d.ts.map +1 -1
  222. package/dist/server/handlers/stored-skills.js +3 -3
  223. package/dist/server/handlers/stored-workspaces.cjs +2 -2
  224. package/dist/server/handlers/stored-workspaces.d.ts +646 -546
  225. package/dist/server/handlers/stored-workspaces.d.ts.map +1 -1
  226. package/dist/server/handlers/stored-workspaces.js +2 -2
  227. package/dist/server/handlers/system.cjs +2 -2
  228. package/dist/server/handlers/system.d.ts +146 -106
  229. package/dist/server/handlers/system.d.ts.map +1 -1
  230. package/dist/server/handlers/system.js +2 -2
  231. package/dist/server/handlers/tool-providers.cjs +1 -1
  232. package/dist/server/handlers/tool-providers.d.ts +580 -331
  233. package/dist/server/handlers/tool-providers.d.ts.map +1 -1
  234. package/dist/server/handlers/tool-providers.js +1 -1
  235. package/dist/server/handlers/tools.cjs +5 -5
  236. package/dist/server/handlers/tools.d.ts +177 -77
  237. package/dist/server/handlers/tools.d.ts.map +1 -1
  238. package/dist/server/handlers/tools.js +5 -5
  239. package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
  240. package/dist/server/handlers/validate-agent-instructions.js +1 -1
  241. package/dist/server/handlers/vector.cjs +1 -1
  242. package/dist/server/handlers/vector.d.ts +282 -126
  243. package/dist/server/handlers/vector.d.ts.map +1 -1
  244. package/dist/server/handlers/vector.js +1 -1
  245. package/dist/server/handlers/workflows.cjs +3 -3
  246. package/dist/server/handlers/workflows.d.ts +1703 -1181
  247. package/dist/server/handlers/workflows.d.ts.map +1 -1
  248. package/dist/server/handlers/workflows.js +3 -3
  249. package/dist/server/handlers/workspace.cjs +1 -1
  250. package/dist/server/handlers/workspace.d.ts +1936 -1150
  251. package/dist/server/handlers/workspace.d.ts.map +1 -1
  252. package/dist/server/handlers/workspace.js +1 -1
  253. package/dist/server/handlers.cjs +2 -2
  254. package/dist/server/handlers.js +2 -2
  255. package/dist/server/schemas/agent-versions.d.ts +70 -10
  256. package/dist/server/schemas/agent-versions.d.ts.map +1 -1
  257. package/dist/server/schemas/agents.d.ts +23 -3
  258. package/dist/server/schemas/agents.d.ts.map +1 -1
  259. package/dist/server/schemas/default-options.d.ts +7 -1
  260. package/dist/server/schemas/default-options.d.ts.map +1 -1
  261. package/dist/server/schemas/index.cjs +7 -7
  262. package/dist/server/schemas/index.js +7 -7
  263. package/dist/server/schemas/stored-agents.d.ts +140 -20
  264. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  265. package/dist/server/server-adapter/index.cjs +28 -7
  266. package/dist/server/server-adapter/index.cjs.map +1 -1
  267. package/dist/server/server-adapter/index.d.ts +14 -1
  268. package/dist/server/server-adapter/index.d.ts.map +1 -1
  269. package/dist/server/server-adapter/index.js +28 -7
  270. package/dist/server/server-adapter/index.js.map +1 -1
  271. package/dist/server/server-adapter/openapi-utils.d.ts.map +1 -1
  272. package/dist/server/server-adapter/routes/a2a.d.ts +544 -504
  273. package/dist/server/server-adapter/routes/a2a.d.ts.map +1 -1
  274. package/dist/server/server-adapter/routes/agent-builder.d.ts +1054 -749
  275. package/dist/server/server-adapter/routes/agent-builder.d.ts.map +1 -1
  276. package/dist/server/server-adapter/routes/channels.d.ts +153 -73
  277. package/dist/server/server-adapter/routes/channels.d.ts.map +1 -1
  278. package/dist/server/server-adapter/routes/conversations.d.ts +218 -138
  279. package/dist/server/server-adapter/routes/conversations.d.ts.map +1 -1
  280. package/dist/server/server-adapter/routes/datasets.d.ts +2312 -1877
  281. package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
  282. package/dist/server/server-adapter/routes/editor-builder.d.ts +506 -349
  283. package/dist/server/server-adapter/routes/editor-builder.d.ts.map +1 -1
  284. package/dist/server/server-adapter/routes/legacy.d.ts +615 -629
  285. package/dist/server/server-adapter/routes/legacy.d.ts.map +1 -1
  286. package/dist/server/server-adapter/routes/logs.d.ts +243 -183
  287. package/dist/server/server-adapter/routes/logs.d.ts.map +1 -1
  288. package/dist/server/server-adapter/routes/mcp.d.ts +347 -147
  289. package/dist/server/server-adapter/routes/mcp.d.ts.map +1 -1
  290. package/dist/server/server-adapter/routes/memory.d.ts +1699 -1199
  291. package/dist/server/server-adapter/routes/memory.d.ts.map +1 -1
  292. package/dist/server/server-adapter/routes/observability.d.ts +2761 -2103
  293. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  294. package/dist/server/server-adapter/routes/processor-providers.d.ts +70 -30
  295. package/dist/server/server-adapter/routes/processor-providers.d.ts.map +1 -1
  296. package/dist/server/server-adapter/routes/processors.d.ts +220 -171
  297. package/dist/server/server-adapter/routes/processors.d.ts.map +1 -1
  298. package/dist/server/server-adapter/routes/responses.d.ts +350 -360
  299. package/dist/server/server-adapter/routes/responses.d.ts.map +1 -1
  300. package/dist/server/server-adapter/routes/route-builder.d.ts +6 -2
  301. package/dist/server/server-adapter/routes/route-builder.d.ts.map +1 -1
  302. package/dist/server/server-adapter/routes/scorers.d.ts +282 -162
  303. package/dist/server/server-adapter/routes/scorers.d.ts.map +1 -1
  304. package/dist/server/server-adapter/routes/stored-mcp-clients.d.ts +821 -588
  305. package/dist/server/server-adapter/routes/stored-mcp-clients.d.ts.map +1 -1
  306. package/dist/server/server-adapter/routes/stored-prompt-blocks.d.ts +1252 -1064
  307. package/dist/server/server-adapter/routes/stored-prompt-blocks.d.ts.map +1 -1
  308. package/dist/server/server-adapter/routes/stored-scorers.d.ts +1046 -822
  309. package/dist/server/server-adapter/routes/stored-scorers.d.ts.map +1 -1
  310. package/dist/server/server-adapter/routes/stored-skills.d.ts +683 -526
  311. package/dist/server/server-adapter/routes/stored-skills.d.ts.map +1 -1
  312. package/dist/server/server-adapter/routes/stored-workspaces.d.ts +637 -537
  313. package/dist/server/server-adapter/routes/stored-workspaces.d.ts.map +1 -1
  314. package/dist/server/server-adapter/routes/system.d.ts +145 -105
  315. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  316. package/dist/server/server-adapter/routes/tool-providers.d.ts +566 -317
  317. package/dist/server/server-adapter/routes/tool-providers.d.ts.map +1 -1
  318. package/dist/server/server-adapter/routes/tools.d.ts +103 -43
  319. package/dist/server/server-adapter/routes/tools.d.ts.map +1 -1
  320. package/dist/server/server-adapter/routes/vectors.d.ts +275 -119
  321. package/dist/server/server-adapter/routes/vectors.d.ts.map +1 -1
  322. package/dist/server/server-adapter/routes/workflows.d.ts +1586 -1104
  323. package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -1
  324. package/dist/server/server-adapter/routes/workspace.d.ts +1026 -613
  325. package/dist/server/server-adapter/routes/workspace.d.ts.map +1 -1
  326. package/dist/{stored-agents-CWC-Nj6N.js → stored-agents-BRBZM-Xl.js} +2 -2
  327. package/dist/{stored-agents-CWC-Nj6N.js.map → stored-agents-BRBZM-Xl.js.map} +1 -1
  328. package/dist/{stored-agents-d2kvyKAb.cjs → stored-agents-CPxfYRH9.cjs} +2 -2
  329. package/dist/{stored-agents-d2kvyKAb.cjs.map → stored-agents-CPxfYRH9.cjs.map} +1 -1
  330. package/dist/{stored-scorers-yaft2JFH.js → stored-scorers-B__LF0Cy.js} +2 -2
  331. package/dist/{stored-scorers-yaft2JFH.js.map → stored-scorers-B__LF0Cy.js.map} +1 -1
  332. package/dist/{stored-scorers-Dm0HwOZe.cjs → stored-scorers-Cml7jPJv.cjs} +2 -2
  333. package/dist/{stored-scorers-Dm0HwOZe.cjs.map → stored-scorers-Cml7jPJv.cjs.map} +1 -1
  334. package/dist/sync-BHatXKfg.cjs +1679 -0
  335. package/dist/sync-BHatXKfg.cjs.map +1 -0
  336. package/dist/sync-djJ8Lmds.js +1656 -0
  337. package/dist/sync-djJ8Lmds.js.map +1 -0
  338. package/dist/{utils-wESuBh27.cjs → utils-Bna_JCkb.cjs} +3 -3
  339. package/dist/{utils-wESuBh27.cjs.map → utils-Bna_JCkb.cjs.map} +1 -1
  340. package/dist/{utils-BUK03Frl.js → utils-QXKhjIm6.js} +3 -3
  341. package/dist/{utils-BUK03Frl.js.map → utils-QXKhjIm6.js.map} +1 -1
  342. package/package.json +9 -9
  343. package/dist/agents--m8fNv8n.cjs.map +0 -1
  344. package/dist/agents-DpZKzU92.js.map +0 -1
  345. package/dist/dist-D-2BtcNU.js.map +0 -1
  346. package/dist/dist-DhqgxyoU.cjs.map +0 -1
  347. package/dist/probe-image-size-BQgIJeY_.js.map +0 -1
  348. package/dist/probe-image-size-DYJVSL0b.cjs.map +0 -1
  349. package/dist/route-builder-CIk5k35M.js.map +0 -1
  350. package/dist/route-builder-CgLVYL1c.cjs.map +0 -1
  351. package/dist/schema-B8-5YCsA.js +0 -2
  352. package/dist/schema-BieM1qrc.cjs +0 -1
  353. package/dist/schema-Bv9OdW1f-BY6u3u8K.cjs.map +0 -1
  354. package/dist/schema-Bv9OdW1f-CIOfv-3w.js.map +0 -1
@@ -1,49 +1,244 @@
1
- export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRoute<import(".").InferParams<undefined, import("zod").ZodObject<{
2
- perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
3
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
4
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
5
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
6
- createdAt: "createdAt";
7
- updatedAt: "updatedAt";
1
+ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
2
+ method: "GET";
3
+ path: "/stored/prompt-blocks";
4
+ responseType: "json";
5
+ streamFormat?: "sse" | "stream";
6
+ sseFlushOnConnect?: boolean;
7
+ handler(params: import(".").InferParams<undefined, import("zod").ZodObject<{
8
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
9
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
10
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
11
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
12
+ createdAt: "createdAt";
13
+ updatedAt: "updatedAt";
14
+ }>>;
15
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
16
+ ASC: "ASC";
17
+ DESC: "DESC";
18
+ }>>;
19
+ }, import("zod/v4/core").$strip>>;
20
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
21
+ draft: "draft";
22
+ published: "published";
23
+ archived: "archived";
8
24
  }>>;
9
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
10
- ASC: "ASC";
11
- DESC: "DESC";
25
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
26
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
27
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
28
+ perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
29
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
30
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
31
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
32
+ createdAt: "createdAt";
33
+ updatedAt: "updatedAt";
34
+ }>>;
35
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
36
+ ASC: "ASC";
37
+ DESC: "DESC";
38
+ }>>;
39
+ }, import("zod/v4/core").$strip>>;
40
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
41
+ draft: "draft";
42
+ published: "published";
43
+ archived: "archived";
12
44
  }>>;
13
- }, import("zod/v4/core").$strip>>;
14
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
15
- draft: "draft";
16
- published: "published";
17
- archived: "archived";
18
- }>>;
19
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
20
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
21
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
22
- perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
23
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
24
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
25
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
26
- createdAt: "createdAt";
27
- updatedAt: "updatedAt";
45
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
46
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
47
+ }, import("zod/v4/core").$strip>, undefined> & import(".").ServerContext): Promise<{
48
+ total: number;
49
+ page: number;
50
+ perPage: number | false;
51
+ hasMore: boolean;
52
+ promptBlocks: {
53
+ id: string;
54
+ status: string;
55
+ createdAt: Date;
56
+ updatedAt: Date;
57
+ name: string;
58
+ content: string;
59
+ activeVersionId?: string | undefined;
60
+ hasDraft?: boolean | undefined;
61
+ authorId?: string | undefined;
62
+ metadata?: Record<string, unknown> | undefined;
63
+ description?: string | undefined;
64
+ rules?: {
65
+ operator: "AND" | "OR";
66
+ conditions: ({
67
+ field: string;
68
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
69
+ value?: unknown;
70
+ } | {
71
+ operator: "AND" | "OR";
72
+ conditions: ({
73
+ field: string;
74
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
75
+ value?: unknown;
76
+ } | {
77
+ operator: "AND" | "OR";
78
+ conditions: {
79
+ field: string;
80
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
81
+ value?: unknown;
82
+ }[];
83
+ })[];
84
+ })[];
85
+ } | undefined;
86
+ requestContextSchema?: Record<string, unknown> | undefined;
87
+ }[];
88
+ }>;
89
+ pathParamSchema?: import("zod").ZodType;
90
+ queryParamSchema?: import("zod").ZodType;
91
+ bodySchema?: import("zod").ZodType;
92
+ responseSchema?: import("zod").ZodType;
93
+ openapi?: import("../openapi-utils").OpenAPIRoute;
94
+ maxBodySize?: number;
95
+ deprecated?: boolean;
96
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
97
+ fga?: import("@mastra/core/auth").FGARouteConfig;
98
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
99
+ readonly __schemas?: import(".").RouteSchemas<undefined, import("zod").ZodObject<{
100
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
101
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
102
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
103
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
104
+ createdAt: "createdAt";
105
+ updatedAt: "updatedAt";
106
+ }>>;
107
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
108
+ ASC: "ASC";
109
+ DESC: "DESC";
110
+ }>>;
111
+ }, import("zod/v4/core").$strip>>;
112
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
113
+ draft: "draft";
114
+ published: "published";
115
+ archived: "archived";
28
116
  }>>;
29
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
30
- ASC: "ASC";
31
- DESC: "DESC";
117
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
118
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
119
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
120
+ perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
121
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
122
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
123
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
124
+ createdAt: "createdAt";
125
+ updatedAt: "updatedAt";
126
+ }>>;
127
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
128
+ ASC: "ASC";
129
+ DESC: "DESC";
130
+ }>>;
131
+ }, import("zod/v4/core").$strip>>;
132
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
133
+ draft: "draft";
134
+ published: "published";
135
+ archived: "archived";
32
136
  }>>;
33
- }, import("zod/v4/core").$strip>>;
34
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
35
- draft: "draft";
36
- published: "published";
37
- archived: "archived";
38
- }>>;
39
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
40
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
41
- }, import("zod/v4/core").$strip>, undefined>, {
42
- total: number;
43
- page: number;
44
- perPage: number | false;
45
- hasMore: boolean;
46
- promptBlocks: {
137
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
138
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
139
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
140
+ total: import("zod").ZodNumber;
141
+ page: import("zod").ZodNumber;
142
+ perPage: import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<false>]>;
143
+ hasMore: import("zod").ZodBoolean;
144
+ promptBlocks: import("zod").ZodArray<import("zod").ZodObject<{
145
+ id: import("zod").ZodString;
146
+ status: import("zod").ZodString;
147
+ activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
148
+ hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
149
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
150
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
151
+ createdAt: import("zod").ZodCoercedDate<unknown>;
152
+ updatedAt: import("zod").ZodCoercedDate<unknown>;
153
+ name: import("zod").ZodString;
154
+ description: import("zod").ZodOptional<import("zod").ZodString>;
155
+ content: import("zod").ZodString;
156
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
157
+ operator: import("zod").ZodEnum<{
158
+ AND: "AND";
159
+ OR: "OR";
160
+ }>;
161
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
162
+ field: import("zod").ZodString;
163
+ operator: import("zod").ZodEnum<{
164
+ in: "in";
165
+ equals: "equals";
166
+ not_equals: "not_equals";
167
+ contains: "contains";
168
+ not_contains: "not_contains";
169
+ greater_than: "greater_than";
170
+ less_than: "less_than";
171
+ greater_than_or_equal: "greater_than_or_equal";
172
+ less_than_or_equal: "less_than_or_equal";
173
+ not_in: "not_in";
174
+ exists: "exists";
175
+ not_exists: "not_exists";
176
+ }>;
177
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
178
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
179
+ operator: import("zod").ZodEnum<{
180
+ AND: "AND";
181
+ OR: "OR";
182
+ }>;
183
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
184
+ field: import("zod").ZodString;
185
+ operator: import("zod").ZodEnum<{
186
+ in: "in";
187
+ equals: "equals";
188
+ not_equals: "not_equals";
189
+ contains: "contains";
190
+ not_contains: "not_contains";
191
+ greater_than: "greater_than";
192
+ less_than: "less_than";
193
+ greater_than_or_equal: "greater_than_or_equal";
194
+ less_than_or_equal: "less_than_or_equal";
195
+ not_in: "not_in";
196
+ exists: "exists";
197
+ not_exists: "not_exists";
198
+ }>;
199
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
200
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
201
+ operator: import("zod").ZodEnum<{
202
+ AND: "AND";
203
+ OR: "OR";
204
+ }>;
205
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
206
+ field: import("zod").ZodString;
207
+ operator: import("zod").ZodEnum<{
208
+ in: "in";
209
+ equals: "equals";
210
+ not_equals: "not_equals";
211
+ contains: "contains";
212
+ not_contains: "not_contains";
213
+ greater_than: "greater_than";
214
+ less_than: "less_than";
215
+ greater_than_or_equal: "greater_than_or_equal";
216
+ less_than_or_equal: "less_than_or_equal";
217
+ not_in: "not_in";
218
+ exists: "exists";
219
+ not_exists: "not_exists";
220
+ }>;
221
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
222
+ }, import("zod/v4/core").$strip>>;
223
+ }, import("zod/v4/core").$strip>]>>;
224
+ }, import("zod/v4/core").$strip>]>>;
225
+ }, import("zod/v4/core").$strip>>;
226
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
227
+ }, import("zod/v4/core").$strip>>;
228
+ }, import("zod/v4/core").$strip>> | undefined;
229
+ } & {
230
+ readonly _mastraSchemaRoute: true;
231
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
232
+ method: "GET";
233
+ path: "/stored/prompt-blocks/:storedPromptBlockId";
234
+ responseType: "json";
235
+ streamFormat?: "sse" | "stream";
236
+ sseFlushOnConnect?: boolean;
237
+ handler(params: {
238
+ storedPromptBlockId: string;
239
+ } & {
240
+ status: "draft" | "published" | "archived";
241
+ } & import(".").ServerContext): Promise<{
47
242
  id: string;
48
243
  status: string;
49
244
  createdAt: Date;
@@ -78,53 +273,26 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
78
273
  })[];
79
274
  } | undefined;
80
275
  requestContextSchema?: Record<string, unknown> | undefined;
81
- }[];
82
- }, "json", import(".").RouteSchemas<undefined, import("zod").ZodObject<{
83
- perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
84
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
85
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
86
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
87
- createdAt: "createdAt";
88
- updatedAt: "updatedAt";
89
- }>>;
90
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
91
- ASC: "ASC";
92
- DESC: "DESC";
93
- }>>;
94
- }, import("zod/v4/core").$strip>>;
95
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
96
- draft: "draft";
97
- published: "published";
98
- archived: "archived";
99
- }>>;
100
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
101
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
102
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
103
- perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
104
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
105
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
106
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
107
- createdAt: "createdAt";
108
- updatedAt: "updatedAt";
109
- }>>;
110
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
111
- ASC: "ASC";
112
- DESC: "DESC";
113
- }>>;
114
- }, import("zod/v4/core").$strip>>;
115
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
116
- draft: "draft";
117
- published: "published";
118
- archived: "archived";
119
- }>>;
120
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
121
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
122
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
123
- total: import("zod").ZodNumber;
124
- page: import("zod").ZodNumber;
125
- perPage: import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<false>]>;
126
- hasMore: import("zod").ZodBoolean;
127
- promptBlocks: import("zod").ZodArray<import("zod").ZodObject<{
276
+ }>;
277
+ pathParamSchema?: import("zod").ZodType;
278
+ queryParamSchema?: import("zod").ZodType;
279
+ bodySchema?: import("zod").ZodType;
280
+ responseSchema?: import("zod").ZodType;
281
+ openapi?: import("../openapi-utils").OpenAPIRoute;
282
+ maxBodySize?: number;
283
+ deprecated?: boolean;
284
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
285
+ fga?: import("@mastra/core/auth").FGARouteConfig;
286
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
287
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
288
+ storedPromptBlockId: import("zod").ZodString;
289
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
290
+ status: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
291
+ draft: "draft";
292
+ published: "published";
293
+ archived: "archived";
294
+ }>>>;
295
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
128
296
  id: import("zod").ZodString;
129
297
  status: import("zod").ZodString;
130
298
  activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
@@ -207,190 +375,23 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
207
375
  }, import("zod/v4/core").$strip>]>>;
208
376
  }, import("zod/v4/core").$strip>>;
209
377
  requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
210
- }, import("zod/v4/core").$strip>>;
211
- }, import("zod/v4/core").$strip>>, "GET", "/stored/prompt-blocks">, import(".").ServerRoute<import(".").InferParams<import("zod").ZodObject<{
212
- storedPromptBlockId: import("zod").ZodString;
213
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
214
- status: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
215
- draft: "draft";
216
- published: "published";
217
- archived: "archived";
218
- }>>>;
219
- }, import("zod/v4/core").$strip>, undefined>, {
220
- id: string;
221
- status: string;
222
- createdAt: Date;
223
- updatedAt: Date;
224
- name: string;
225
- content: string;
226
- activeVersionId?: string | undefined;
227
- hasDraft?: boolean | undefined;
228
- authorId?: string | undefined;
229
- metadata?: Record<string, unknown> | undefined;
230
- description?: string | undefined;
231
- rules?: {
232
- operator: "AND" | "OR";
233
- conditions: ({
234
- field: string;
235
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
236
- value?: unknown;
237
- } | {
238
- operator: "AND" | "OR";
239
- conditions: ({
240
- field: string;
241
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
242
- value?: unknown;
243
- } | {
244
- operator: "AND" | "OR";
245
- conditions: {
246
- field: string;
247
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
248
- value?: unknown;
249
- }[];
250
- })[];
251
- })[];
252
- } | undefined;
253
- requestContextSchema?: Record<string, unknown> | undefined;
254
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
255
- storedPromptBlockId: import("zod").ZodString;
256
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
257
- status: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
258
- draft: "draft";
259
- published: "published";
260
- archived: "archived";
261
- }>>>;
262
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
263
- id: import("zod").ZodString;
264
- status: import("zod").ZodString;
265
- activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
266
- hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
267
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
268
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
269
- createdAt: import("zod").ZodCoercedDate<unknown>;
270
- updatedAt: import("zod").ZodCoercedDate<unknown>;
271
- name: import("zod").ZodString;
272
- description: import("zod").ZodOptional<import("zod").ZodString>;
273
- content: import("zod").ZodString;
274
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
275
- operator: import("zod").ZodEnum<{
276
- AND: "AND";
277
- OR: "OR";
278
- }>;
279
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
280
- field: import("zod").ZodString;
281
- operator: import("zod").ZodEnum<{
282
- in: "in";
283
- equals: "equals";
284
- not_equals: "not_equals";
285
- contains: "contains";
286
- not_contains: "not_contains";
287
- greater_than: "greater_than";
288
- less_than: "less_than";
289
- greater_than_or_equal: "greater_than_or_equal";
290
- less_than_or_equal: "less_than_or_equal";
291
- not_in: "not_in";
292
- exists: "exists";
293
- not_exists: "not_exists";
294
- }>;
295
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
296
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
297
- operator: import("zod").ZodEnum<{
298
- AND: "AND";
299
- OR: "OR";
300
- }>;
301
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
302
- field: import("zod").ZodString;
303
- operator: import("zod").ZodEnum<{
304
- in: "in";
305
- equals: "equals";
306
- not_equals: "not_equals";
307
- contains: "contains";
308
- not_contains: "not_contains";
309
- greater_than: "greater_than";
310
- less_than: "less_than";
311
- greater_than_or_equal: "greater_than_or_equal";
312
- less_than_or_equal: "less_than_or_equal";
313
- not_in: "not_in";
314
- exists: "exists";
315
- not_exists: "not_exists";
316
- }>;
317
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
318
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
319
- operator: import("zod").ZodEnum<{
320
- AND: "AND";
321
- OR: "OR";
322
- }>;
323
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
324
- field: import("zod").ZodString;
325
- operator: import("zod").ZodEnum<{
326
- in: "in";
327
- equals: "equals";
328
- not_equals: "not_equals";
329
- contains: "contains";
330
- not_contains: "not_contains";
331
- greater_than: "greater_than";
332
- less_than: "less_than";
333
- greater_than_or_equal: "greater_than_or_equal";
334
- less_than_or_equal: "less_than_or_equal";
335
- not_in: "not_in";
336
- exists: "exists";
337
- not_exists: "not_exists";
338
- }>;
339
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
340
- }, import("zod/v4/core").$strip>>;
341
- }, import("zod/v4/core").$strip>]>>;
342
- }, import("zod/v4/core").$strip>]>>;
343
- }, import("zod/v4/core").$strip>>;
344
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
345
- }, import("zod/v4/core").$strip>>, "GET", "/stored/prompt-blocks/:storedPromptBlockId">, import(".").ServerRoute<{
346
- name: string;
347
- content: string;
348
- id?: string | undefined;
349
- authorId?: string | undefined;
350
- metadata?: Record<string, unknown> | undefined;
351
- description?: string | undefined;
352
- rules?: {
353
- operator: "AND" | "OR";
354
- conditions: ({
355
- field: string;
356
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
357
- value?: unknown;
358
- } | {
359
- operator: "AND" | "OR";
360
- conditions: ({
361
- field: string;
362
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
363
- value?: unknown;
364
- } | {
365
- operator: "AND" | "OR";
366
- conditions: {
367
- field: string;
368
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
369
- value?: unknown;
370
- }[];
371
- })[];
372
- })[];
373
- } | undefined;
374
- requestContextSchema?: Record<string, unknown> | undefined;
375
- }, {
376
- id: string;
377
- status: string;
378
- createdAt: Date;
379
- updatedAt: Date;
380
- name: string;
381
- content: string;
382
- activeVersionId?: string | undefined;
383
- hasDraft?: boolean | undefined;
384
- authorId?: string | undefined;
385
- metadata?: Record<string, unknown> | undefined;
386
- description?: string | undefined;
387
- rules?: {
388
- operator: "AND" | "OR";
389
- conditions: ({
390
- field: string;
391
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
392
- value?: unknown;
393
- } | {
378
+ }, import("zod/v4/core").$strip>> | undefined;
379
+ } & {
380
+ readonly _mastraSchemaRoute: true;
381
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
382
+ method: "POST";
383
+ path: "/stored/prompt-blocks";
384
+ responseType: "json";
385
+ streamFormat?: "sse" | "stream";
386
+ sseFlushOnConnect?: boolean;
387
+ handler(params: {
388
+ name: string;
389
+ content: string;
390
+ id?: string | undefined;
391
+ authorId?: string | undefined;
392
+ metadata?: Record<string, unknown> | undefined;
393
+ description?: string | undefined;
394
+ rules?: {
394
395
  operator: "AND" | "OR";
395
396
  conditions: ({
396
397
  field: string;
@@ -398,274 +399,34 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
398
399
  value?: unknown;
399
400
  } | {
400
401
  operator: "AND" | "OR";
401
- conditions: {
402
+ conditions: ({
402
403
  field: string;
403
404
  operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
404
405
  value?: unknown;
405
- }[];
406
+ } | {
407
+ operator: "AND" | "OR";
408
+ conditions: {
409
+ field: string;
410
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
411
+ value?: unknown;
412
+ }[];
413
+ })[];
406
414
  })[];
407
- })[];
408
- } | undefined;
409
- requestContextSchema?: Record<string, unknown> | undefined;
410
- }, "json", import(".").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
411
- id: import("zod").ZodOptional<import("zod").ZodString>;
412
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
413
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
414
- name: import("zod").ZodString;
415
- description: import("zod").ZodOptional<import("zod").ZodString>;
416
- content: import("zod").ZodString;
417
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
418
- operator: import("zod").ZodEnum<{
419
- AND: "AND";
420
- OR: "OR";
421
- }>;
422
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
423
- field: import("zod").ZodString;
424
- operator: import("zod").ZodEnum<{
425
- in: "in";
426
- equals: "equals";
427
- not_equals: "not_equals";
428
- contains: "contains";
429
- not_contains: "not_contains";
430
- greater_than: "greater_than";
431
- less_than: "less_than";
432
- greater_than_or_equal: "greater_than_or_equal";
433
- less_than_or_equal: "less_than_or_equal";
434
- not_in: "not_in";
435
- exists: "exists";
436
- not_exists: "not_exists";
437
- }>;
438
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
439
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
440
- operator: import("zod").ZodEnum<{
441
- AND: "AND";
442
- OR: "OR";
443
- }>;
444
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
445
- field: import("zod").ZodString;
446
- operator: import("zod").ZodEnum<{
447
- in: "in";
448
- equals: "equals";
449
- not_equals: "not_equals";
450
- contains: "contains";
451
- not_contains: "not_contains";
452
- greater_than: "greater_than";
453
- less_than: "less_than";
454
- greater_than_or_equal: "greater_than_or_equal";
455
- less_than_or_equal: "less_than_or_equal";
456
- not_in: "not_in";
457
- exists: "exists";
458
- not_exists: "not_exists";
459
- }>;
460
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
461
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
462
- operator: import("zod").ZodEnum<{
463
- AND: "AND";
464
- OR: "OR";
465
- }>;
466
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
467
- field: import("zod").ZodString;
468
- operator: import("zod").ZodEnum<{
469
- in: "in";
470
- equals: "equals";
471
- not_equals: "not_equals";
472
- contains: "contains";
473
- not_contains: "not_contains";
474
- greater_than: "greater_than";
475
- less_than: "less_than";
476
- greater_than_or_equal: "greater_than_or_equal";
477
- less_than_or_equal: "less_than_or_equal";
478
- not_in: "not_in";
479
- exists: "exists";
480
- not_exists: "not_exists";
481
- }>;
482
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
483
- }, import("zod/v4/core").$strip>>;
484
- }, import("zod/v4/core").$strip>]>>;
485
- }, import("zod/v4/core").$strip>]>>;
486
- }, import("zod/v4/core").$strip>>;
487
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
488
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
489
- id: import("zod").ZodString;
490
- status: import("zod").ZodString;
491
- activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
492
- hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
493
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
494
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
495
- createdAt: import("zod").ZodCoercedDate<unknown>;
496
- updatedAt: import("zod").ZodCoercedDate<unknown>;
497
- name: import("zod").ZodString;
498
- description: import("zod").ZodOptional<import("zod").ZodString>;
499
- content: import("zod").ZodString;
500
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
501
- operator: import("zod").ZodEnum<{
502
- AND: "AND";
503
- OR: "OR";
504
- }>;
505
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
506
- field: import("zod").ZodString;
507
- operator: import("zod").ZodEnum<{
508
- in: "in";
509
- equals: "equals";
510
- not_equals: "not_equals";
511
- contains: "contains";
512
- not_contains: "not_contains";
513
- greater_than: "greater_than";
514
- less_than: "less_than";
515
- greater_than_or_equal: "greater_than_or_equal";
516
- less_than_or_equal: "less_than_or_equal";
517
- not_in: "not_in";
518
- exists: "exists";
519
- not_exists: "not_exists";
520
- }>;
521
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
522
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
523
- operator: import("zod").ZodEnum<{
524
- AND: "AND";
525
- OR: "OR";
526
- }>;
527
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
528
- field: import("zod").ZodString;
529
- operator: import("zod").ZodEnum<{
530
- in: "in";
531
- equals: "equals";
532
- not_equals: "not_equals";
533
- contains: "contains";
534
- not_contains: "not_contains";
535
- greater_than: "greater_than";
536
- less_than: "less_than";
537
- greater_than_or_equal: "greater_than_or_equal";
538
- less_than_or_equal: "less_than_or_equal";
539
- not_in: "not_in";
540
- exists: "exists";
541
- not_exists: "not_exists";
542
- }>;
543
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
544
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
545
- operator: import("zod").ZodEnum<{
546
- AND: "AND";
547
- OR: "OR";
548
- }>;
549
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
550
- field: import("zod").ZodString;
551
- operator: import("zod").ZodEnum<{
552
- in: "in";
553
- equals: "equals";
554
- not_equals: "not_equals";
555
- contains: "contains";
556
- not_contains: "not_contains";
557
- greater_than: "greater_than";
558
- less_than: "less_than";
559
- greater_than_or_equal: "greater_than_or_equal";
560
- less_than_or_equal: "less_than_or_equal";
561
- not_in: "not_in";
562
- exists: "exists";
563
- not_exists: "not_exists";
564
- }>;
565
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
566
- }, import("zod/v4/core").$strip>>;
567
- }, import("zod/v4/core").$strip>]>>;
568
- }, import("zod/v4/core").$strip>]>>;
569
- }, import("zod/v4/core").$strip>>;
570
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
571
- }, import("zod/v4/core").$strip>>, "POST", "/stored/prompt-blocks">, import(".").ServerRoute<import(".").InferParams<import("zod").ZodObject<{
572
- storedPromptBlockId: import("zod").ZodString;
573
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
574
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
575
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
576
- name: import("zod").ZodOptional<import("zod").ZodString>;
577
- description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
578
- content: import("zod").ZodOptional<import("zod").ZodString>;
579
- rules: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
580
- operator: import("zod").ZodEnum<{
581
- AND: "AND";
582
- OR: "OR";
583
- }>;
584
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
585
- field: import("zod").ZodString;
586
- operator: import("zod").ZodEnum<{
587
- in: "in";
588
- equals: "equals";
589
- not_equals: "not_equals";
590
- contains: "contains";
591
- not_contains: "not_contains";
592
- greater_than: "greater_than";
593
- less_than: "less_than";
594
- greater_than_or_equal: "greater_than_or_equal";
595
- less_than_or_equal: "less_than_or_equal";
596
- not_in: "not_in";
597
- exists: "exists";
598
- not_exists: "not_exists";
599
- }>;
600
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
601
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
602
- operator: import("zod").ZodEnum<{
603
- AND: "AND";
604
- OR: "OR";
605
- }>;
606
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
607
- field: import("zod").ZodString;
608
- operator: import("zod").ZodEnum<{
609
- in: "in";
610
- equals: "equals";
611
- not_equals: "not_equals";
612
- contains: "contains";
613
- not_contains: "not_contains";
614
- greater_than: "greater_than";
615
- less_than: "less_than";
616
- greater_than_or_equal: "greater_than_or_equal";
617
- less_than_or_equal: "less_than_or_equal";
618
- not_in: "not_in";
619
- exists: "exists";
620
- not_exists: "not_exists";
621
- }>;
622
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
623
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
624
- operator: import("zod").ZodEnum<{
625
- AND: "AND";
626
- OR: "OR";
627
- }>;
628
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
629
- field: import("zod").ZodString;
630
- operator: import("zod").ZodEnum<{
631
- in: "in";
632
- equals: "equals";
633
- not_equals: "not_equals";
634
- contains: "contains";
635
- not_contains: "not_contains";
636
- greater_than: "greater_than";
637
- less_than: "less_than";
638
- greater_than_or_equal: "greater_than_or_equal";
639
- less_than_or_equal: "less_than_or_equal";
640
- not_in: "not_in";
641
- exists: "exists";
642
- not_exists: "not_exists";
643
- }>;
644
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
645
- }, import("zod/v4/core").$strip>>;
646
- }, import("zod/v4/core").$strip>]>>;
647
- }, import("zod/v4/core").$strip>]>>;
648
- }, import("zod/v4/core").$strip>>>;
649
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
650
- }, import("zod/v4/core").$strip>>, {
651
- id: string;
652
- status: string;
653
- createdAt: Date;
654
- updatedAt: Date;
655
- name: string;
656
- content: string;
657
- activeVersionId?: string | undefined;
658
- hasDraft?: boolean | undefined;
659
- authorId?: string | undefined;
660
- metadata?: Record<string, unknown> | undefined;
661
- description?: string | undefined;
662
- rules?: {
663
- operator: "AND" | "OR";
664
- conditions: ({
665
- field: string;
666
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
667
- value?: unknown;
668
- } | {
415
+ } | undefined;
416
+ requestContextSchema?: Record<string, unknown> | undefined;
417
+ } & import(".").ServerContext): Promise<{
418
+ id: string;
419
+ status: string;
420
+ createdAt: Date;
421
+ updatedAt: Date;
422
+ name: string;
423
+ content: string;
424
+ activeVersionId?: string | undefined;
425
+ hasDraft?: boolean | undefined;
426
+ authorId?: string | undefined;
427
+ metadata?: Record<string, unknown> | undefined;
428
+ description?: string | undefined;
429
+ rules?: {
669
430
  operator: "AND" | "OR";
670
431
  conditions: ({
671
432
  field: string;
@@ -673,54 +434,40 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
673
434
  value?: unknown;
674
435
  } | {
675
436
  operator: "AND" | "OR";
676
- conditions: {
437
+ conditions: ({
677
438
  field: string;
678
439
  operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
679
440
  value?: unknown;
680
- }[];
441
+ } | {
442
+ operator: "AND" | "OR";
443
+ conditions: {
444
+ field: string;
445
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
446
+ value?: unknown;
447
+ }[];
448
+ })[];
681
449
  })[];
682
- })[];
683
- } | undefined;
684
- requestContextSchema?: Record<string, unknown> | undefined;
685
- } | {
686
- id: string;
687
- status: string;
688
- createdAt: Date;
689
- updatedAt: Date;
690
- activeVersionId?: string | undefined;
691
- authorId?: string | undefined;
692
- metadata?: Record<string, unknown> | undefined;
693
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
694
- storedPromptBlockId: import("zod").ZodString;
695
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
696
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
697
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
698
- name: import("zod").ZodOptional<import("zod").ZodString>;
699
- description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
700
- content: import("zod").ZodOptional<import("zod").ZodString>;
701
- rules: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
702
- operator: import("zod").ZodEnum<{
703
- AND: "AND";
704
- OR: "OR";
705
- }>;
706
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
707
- field: import("zod").ZodString;
708
- operator: import("zod").ZodEnum<{
709
- in: "in";
710
- equals: "equals";
711
- not_equals: "not_equals";
712
- contains: "contains";
713
- not_contains: "not_contains";
714
- greater_than: "greater_than";
715
- less_than: "less_than";
716
- greater_than_or_equal: "greater_than_or_equal";
717
- less_than_or_equal: "less_than_or_equal";
718
- not_in: "not_in";
719
- exists: "exists";
720
- not_exists: "not_exists";
721
- }>;
722
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
723
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
450
+ } | undefined;
451
+ requestContextSchema?: Record<string, unknown> | undefined;
452
+ }>;
453
+ pathParamSchema?: import("zod").ZodType;
454
+ queryParamSchema?: import("zod").ZodType;
455
+ bodySchema?: import("zod").ZodType;
456
+ responseSchema?: import("zod").ZodType;
457
+ openapi?: import("../openapi-utils").OpenAPIRoute;
458
+ maxBodySize?: number;
459
+ deprecated?: boolean;
460
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
461
+ fga?: import("@mastra/core/auth").FGARouteConfig;
462
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
463
+ readonly __schemas?: import(".").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
464
+ id: import("zod").ZodOptional<import("zod").ZodString>;
465
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
466
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
467
+ name: import("zod").ZodString;
468
+ description: import("zod").ZodOptional<import("zod").ZodString>;
469
+ content: import("zod").ZodString;
470
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
724
471
  operator: import("zod").ZodEnum<{
725
472
  AND: "AND";
726
473
  OR: "OR";
@@ -747,7 +494,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
747
494
  AND: "AND";
748
495
  OR: "OR";
749
496
  }>;
750
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
497
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
751
498
  field: import("zod").ZodString;
752
499
  operator: import("zod").ZodEnum<{
753
500
  in: "in";
@@ -764,54 +511,46 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
764
511
  not_exists: "not_exists";
765
512
  }>;
766
513
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
767
- }, import("zod/v4/core").$strip>>;
514
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
515
+ operator: import("zod").ZodEnum<{
516
+ AND: "AND";
517
+ OR: "OR";
518
+ }>;
519
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
520
+ field: import("zod").ZodString;
521
+ operator: import("zod").ZodEnum<{
522
+ in: "in";
523
+ equals: "equals";
524
+ not_equals: "not_equals";
525
+ contains: "contains";
526
+ not_contains: "not_contains";
527
+ greater_than: "greater_than";
528
+ less_than: "less_than";
529
+ greater_than_or_equal: "greater_than_or_equal";
530
+ less_than_or_equal: "less_than_or_equal";
531
+ not_in: "not_in";
532
+ exists: "exists";
533
+ not_exists: "not_exists";
534
+ }>;
535
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
536
+ }, import("zod/v4/core").$strip>>;
537
+ }, import("zod/v4/core").$strip>]>>;
768
538
  }, import("zod/v4/core").$strip>]>>;
769
- }, import("zod/v4/core").$strip>]>>;
770
- }, import("zod/v4/core").$strip>>>;
771
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
772
- }, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
773
- id: import("zod").ZodString;
774
- status: import("zod").ZodString;
775
- activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
776
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
777
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
778
- createdAt: import("zod").ZodCoercedDate<unknown>;
779
- updatedAt: import("zod").ZodCoercedDate<unknown>;
780
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
781
- id: import("zod").ZodString;
782
- status: import("zod").ZodString;
783
- activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
784
- hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
785
- authorId: import("zod").ZodOptional<import("zod").ZodString>;
786
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
787
- createdAt: import("zod").ZodCoercedDate<unknown>;
788
- updatedAt: import("zod").ZodCoercedDate<unknown>;
789
- name: import("zod").ZodString;
790
- description: import("zod").ZodOptional<import("zod").ZodString>;
791
- content: import("zod").ZodString;
792
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
793
- operator: import("zod").ZodEnum<{
794
- AND: "AND";
795
- OR: "OR";
796
- }>;
797
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
798
- field: import("zod").ZodString;
799
- operator: import("zod").ZodEnum<{
800
- in: "in";
801
- equals: "equals";
802
- not_equals: "not_equals";
803
- contains: "contains";
804
- not_contains: "not_contains";
805
- greater_than: "greater_than";
806
- less_than: "less_than";
807
- greater_than_or_equal: "greater_than_or_equal";
808
- less_than_or_equal: "less_than_or_equal";
809
- not_in: "not_in";
810
- exists: "exists";
811
- not_exists: "not_exists";
812
- }>;
813
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
814
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
539
+ }, import("zod/v4/core").$strip>>;
540
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
541
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
542
+ id: import("zod").ZodString;
543
+ status: import("zod").ZodString;
544
+ activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
545
+ hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
546
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
547
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
548
+ createdAt: import("zod").ZodCoercedDate<unknown>;
549
+ updatedAt: import("zod").ZodCoercedDate<unknown>;
550
+ name: import("zod").ZodString;
551
+ description: import("zod").ZodOptional<import("zod").ZodString>;
552
+ content: import("zod").ZodString;
553
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
815
554
  operator: import("zod").ZodEnum<{
816
555
  AND: "AND";
817
556
  OR: "OR";
@@ -838,7 +577,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
838
577
  AND: "AND";
839
578
  OR: "OR";
840
579
  }>;
841
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
580
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
842
581
  field: import("zod").ZodString;
843
582
  operator: import("zod").ZodEnum<{
844
583
  in: "in";
@@ -855,61 +594,84 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
855
594
  not_exists: "not_exists";
856
595
  }>;
857
596
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
858
- }, import("zod/v4/core").$strip>>;
597
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
598
+ operator: import("zod").ZodEnum<{
599
+ AND: "AND";
600
+ OR: "OR";
601
+ }>;
602
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
603
+ field: import("zod").ZodString;
604
+ operator: import("zod").ZodEnum<{
605
+ in: "in";
606
+ equals: "equals";
607
+ not_equals: "not_equals";
608
+ contains: "contains";
609
+ not_contains: "not_contains";
610
+ greater_than: "greater_than";
611
+ less_than: "less_than";
612
+ greater_than_or_equal: "greater_than_or_equal";
613
+ less_than_or_equal: "less_than_or_equal";
614
+ not_in: "not_in";
615
+ exists: "exists";
616
+ not_exists: "not_exists";
617
+ }>;
618
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
619
+ }, import("zod/v4/core").$strip>>;
620
+ }, import("zod/v4/core").$strip>]>>;
859
621
  }, import("zod/v4/core").$strip>]>>;
860
- }, import("zod/v4/core").$strip>]>>;
861
- }, import("zod/v4/core").$strip>>;
862
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
863
- }, import("zod/v4/core").$strip>]>>, "PATCH", "/stored/prompt-blocks/:storedPromptBlockId">, import(".").ServerRoute<{
864
- storedPromptBlockId: string;
865
- }, {
866
- success: boolean;
867
- message: string;
868
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
869
- storedPromptBlockId: import("zod").ZodString;
870
- }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
871
- success: import("zod").ZodBoolean;
872
- message: import("zod").ZodString;
873
- }, import("zod/v4/core").$strip>>, "DELETE", "/stored/prompt-blocks/:storedPromptBlockId">, import(".").ServerRoute<import(".").InferParams<import("zod").ZodObject<{
874
- promptBlockId: import("zod").ZodString;
875
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
876
- perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
877
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
878
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
879
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
880
- createdAt: "createdAt";
881
- versionNumber: "versionNumber";
882
- }>>;
883
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
884
- ASC: "ASC";
885
- DESC: "DESC";
886
- }>>;
887
- }, import("zod/v4/core").$strip>>;
888
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
889
- perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
890
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
891
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
892
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
893
- createdAt: "createdAt";
894
- versionNumber: "versionNumber";
895
- }>>;
896
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
897
- ASC: "ASC";
898
- DESC: "DESC";
899
- }>>;
900
- }, import("zod/v4/core").$strip>>;
901
- }, import("zod/v4/core").$strip>, undefined>, {
902
- total: number;
903
- page: number;
904
- perPage: number | false;
905
- hasMore: boolean;
906
- versions: {
622
+ }, import("zod/v4/core").$strip>>;
623
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
624
+ }, import("zod/v4/core").$strip>> | undefined;
625
+ } & {
626
+ readonly _mastraSchemaRoute: true;
627
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
628
+ method: "PATCH";
629
+ path: "/stored/prompt-blocks/:storedPromptBlockId";
630
+ responseType: "json";
631
+ streamFormat?: "sse" | "stream";
632
+ sseFlushOnConnect?: boolean;
633
+ handler(params: {
634
+ storedPromptBlockId: string;
635
+ } & {
636
+ authorId?: string | undefined;
637
+ metadata?: Record<string, unknown> | undefined;
638
+ name?: string | undefined;
639
+ description?: string | undefined;
640
+ content?: string | undefined;
641
+ rules?: {
642
+ operator: "AND" | "OR";
643
+ conditions: ({
644
+ field: string;
645
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
646
+ value?: unknown;
647
+ } | {
648
+ operator: "AND" | "OR";
649
+ conditions: ({
650
+ field: string;
651
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
652
+ value?: unknown;
653
+ } | {
654
+ operator: "AND" | "OR";
655
+ conditions: {
656
+ field: string;
657
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
658
+ value?: unknown;
659
+ }[];
660
+ })[];
661
+ })[];
662
+ } | undefined;
663
+ requestContextSchema?: Record<string, unknown> | undefined;
664
+ } & import(".").ServerContext): Promise<{
907
665
  id: string;
908
- blockId: string;
909
- versionNumber: number;
666
+ status: string;
667
+ createdAt: Date;
668
+ updatedAt: Date;
910
669
  name: string;
911
670
  content: string;
912
- createdAt: Date;
671
+ activeVersionId?: string | undefined;
672
+ hasDraft?: boolean | undefined;
673
+ authorId?: string | undefined;
674
+ metadata?: Record<string, unknown> | undefined;
913
675
  description?: string | undefined;
914
676
  rules?: {
915
677
  operator: "AND" | "OR";
@@ -934,50 +696,34 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
934
696
  })[];
935
697
  } | undefined;
936
698
  requestContextSchema?: Record<string, unknown> | undefined;
937
- changedFields?: string[] | undefined;
938
- changeMessage?: string | undefined;
939
- }[];
940
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
941
- promptBlockId: import("zod").ZodString;
942
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
943
- perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
944
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
945
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
946
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
947
- createdAt: "createdAt";
948
- versionNumber: "versionNumber";
949
- }>>;
950
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
951
- ASC: "ASC";
952
- DESC: "DESC";
953
- }>>;
954
- }, import("zod/v4/core").$strip>>;
955
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
956
- perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
957
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
958
- orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
959
- field: import("zod").ZodOptional<import("zod").ZodEnum<{
960
- createdAt: "createdAt";
961
- versionNumber: "versionNumber";
962
- }>>;
963
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
964
- ASC: "ASC";
965
- DESC: "DESC";
966
- }>>;
967
- }, import("zod/v4/core").$strip>>;
968
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
969
- total: import("zod").ZodNumber;
970
- page: import("zod").ZodNumber;
971
- perPage: import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<false>]>;
972
- hasMore: import("zod").ZodBoolean;
973
- versions: import("zod").ZodArray<import("zod").ZodObject<{
974
- id: import("zod").ZodString;
975
- blockId: import("zod").ZodString;
976
- versionNumber: import("zod").ZodNumber;
977
- name: import("zod").ZodString;
978
- description: import("zod").ZodOptional<import("zod").ZodString>;
979
- content: import("zod").ZodString;
980
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
699
+ } | {
700
+ id: string;
701
+ status: string;
702
+ createdAt: Date;
703
+ updatedAt: Date;
704
+ activeVersionId?: string | undefined;
705
+ authorId?: string | undefined;
706
+ metadata?: Record<string, unknown> | undefined;
707
+ }>;
708
+ pathParamSchema?: import("zod").ZodType;
709
+ queryParamSchema?: import("zod").ZodType;
710
+ bodySchema?: import("zod").ZodType;
711
+ responseSchema?: import("zod").ZodType;
712
+ openapi?: import("../openapi-utils").OpenAPIRoute;
713
+ maxBodySize?: number;
714
+ deprecated?: boolean;
715
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
716
+ fga?: import("@mastra/core/auth").FGARouteConfig;
717
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
718
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
719
+ storedPromptBlockId: import("zod").ZodString;
720
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
721
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
722
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
723
+ name: import("zod").ZodOptional<import("zod").ZodString>;
724
+ description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
725
+ content: import("zod").ZodOptional<import("zod").ZodString>;
726
+ rules: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
981
727
  operator: import("zod").ZodEnum<{
982
728
  AND: "AND";
983
729
  OR: "OR";
@@ -1046,80 +792,29 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1046
792
  }, import("zod/v4/core").$strip>>;
1047
793
  }, import("zod/v4/core").$strip>]>>;
1048
794
  }, import("zod/v4/core").$strip>]>>;
1049
- }, import("zod/v4/core").$strip>>;
1050
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1051
- changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1052
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
795
+ }, import("zod/v4/core").$strip>>>;
796
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
797
+ }, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
798
+ id: import("zod").ZodString;
799
+ status: import("zod").ZodString;
800
+ activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
801
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
802
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1053
803
  createdAt: import("zod").ZodCoercedDate<unknown>;
1054
- }, import("zod/v4/core").$strip>>;
1055
- }, import("zod/v4/core").$strip>>, "GET", "/stored/prompt-blocks/:promptBlockId/versions">, import(".").ServerRoute<import(".").InferParams<import("zod").ZodObject<{
1056
- promptBlockId: import("zod").ZodString;
1057
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1058
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1059
- }, import("zod/v4/core").$strip>>, {
1060
- id: string;
1061
- blockId: string;
1062
- versionNumber: number;
1063
- createdAt: Date;
1064
- name?: string | undefined;
1065
- description?: string | undefined;
1066
- content?: string | undefined;
1067
- rules?: {
1068
- operator: "AND" | "OR";
1069
- conditions: ({
1070
- field: string;
1071
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1072
- value?: unknown;
1073
- } | {
1074
- operator: "AND" | "OR";
1075
- conditions: ({
1076
- field: string;
1077
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1078
- value?: unknown;
1079
- } | {
1080
- operator: "AND" | "OR";
1081
- conditions: {
1082
- field: string;
1083
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1084
- value?: unknown;
1085
- }[];
1086
- })[];
1087
- })[];
1088
- } | undefined;
1089
- requestContextSchema?: Record<string, unknown> | undefined;
1090
- changedFields?: string[] | undefined;
1091
- changeMessage?: string | undefined;
1092
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1093
- promptBlockId: import("zod").ZodString;
1094
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1095
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1096
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1097
- name: import("zod").ZodOptional<import("zod").ZodString>;
1098
- description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
1099
- content: import("zod").ZodOptional<import("zod").ZodString>;
1100
- rules: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
1101
- operator: import("zod").ZodEnum<{
1102
- AND: "AND";
1103
- OR: "OR";
1104
- }>;
1105
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1106
- field: import("zod").ZodString;
1107
- operator: import("zod").ZodEnum<{
1108
- in: "in";
1109
- equals: "equals";
1110
- not_equals: "not_equals";
1111
- contains: "contains";
1112
- not_contains: "not_contains";
1113
- greater_than: "greater_than";
1114
- less_than: "less_than";
1115
- greater_than_or_equal: "greater_than_or_equal";
1116
- less_than_or_equal: "less_than_or_equal";
1117
- not_in: "not_in";
1118
- exists: "exists";
1119
- not_exists: "not_exists";
1120
- }>;
1121
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1122
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
804
+ updatedAt: import("zod").ZodCoercedDate<unknown>;
805
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
806
+ id: import("zod").ZodString;
807
+ status: import("zod").ZodString;
808
+ activeVersionId: import("zod").ZodOptional<import("zod").ZodString>;
809
+ hasDraft: import("zod").ZodOptional<import("zod").ZodBoolean>;
810
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
811
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
812
+ createdAt: import("zod").ZodCoercedDate<unknown>;
813
+ updatedAt: import("zod").ZodCoercedDate<unknown>;
814
+ name: import("zod").ZodString;
815
+ description: import("zod").ZodOptional<import("zod").ZodString>;
816
+ content: import("zod").ZodString;
817
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1123
818
  operator: import("zod").ZodEnum<{
1124
819
  AND: "AND";
1125
820
  OR: "OR";
@@ -1146,7 +841,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1146
841
  AND: "AND";
1147
842
  OR: "OR";
1148
843
  }>;
1149
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
844
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1150
845
  field: import("zod").ZodString;
1151
846
  operator: import("zod").ZodEnum<{
1152
847
  in: "in";
@@ -1163,43 +858,114 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1163
858
  not_exists: "not_exists";
1164
859
  }>;
1165
860
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1166
- }, import("zod/v4/core").$strip>>;
861
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
862
+ operator: import("zod").ZodEnum<{
863
+ AND: "AND";
864
+ OR: "OR";
865
+ }>;
866
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
867
+ field: import("zod").ZodString;
868
+ operator: import("zod").ZodEnum<{
869
+ in: "in";
870
+ equals: "equals";
871
+ not_equals: "not_equals";
872
+ contains: "contains";
873
+ not_contains: "not_contains";
874
+ greater_than: "greater_than";
875
+ less_than: "less_than";
876
+ greater_than_or_equal: "greater_than_or_equal";
877
+ less_than_or_equal: "less_than_or_equal";
878
+ not_in: "not_in";
879
+ exists: "exists";
880
+ not_exists: "not_exists";
881
+ }>;
882
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
883
+ }, import("zod/v4/core").$strip>>;
884
+ }, import("zod/v4/core").$strip>]>>;
1167
885
  }, import("zod/v4/core").$strip>]>>;
1168
- }, import("zod/v4/core").$strip>]>>;
1169
- }, import("zod/v4/core").$strip>>>;
1170
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
1171
- changedFields: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>>;
1172
- changeMessage: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
1173
- id: import("zod").ZodString;
1174
- blockId: import("zod").ZodString;
1175
- versionNumber: import("zod").ZodNumber;
1176
- createdAt: import("zod").ZodCoercedDate<unknown>;
1177
- }, import("zod/v4/core").$strip>>, "POST", "/stored/prompt-blocks/:promptBlockId/versions">, import(".").ServerRoute<import(".").InferParams<import("zod").ZodObject<{
1178
- promptBlockId: import("zod").ZodString;
1179
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1180
- from: import("zod").ZodString;
1181
- to: import("zod").ZodString;
1182
- }, import("zod/v4/core").$strip>, undefined>, {
1183
- diffs: {
1184
- field: string;
1185
- previousValue: unknown;
1186
- currentValue: unknown;
1187
- }[];
1188
- fromVersion: {
1189
- id: string;
1190
- blockId: string;
1191
- versionNumber: number;
1192
- name: string;
1193
- content: string;
1194
- createdAt: Date;
1195
- description?: string | undefined;
1196
- rules?: {
1197
- operator: "AND" | "OR";
1198
- conditions: ({
1199
- field: string;
1200
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1201
- value?: unknown;
1202
- } | {
886
+ }, import("zod/v4/core").$strip>>;
887
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
888
+ }, import("zod/v4/core").$strip>]>> | undefined;
889
+ } & {
890
+ readonly _mastraSchemaRoute: true;
891
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
892
+ method: "DELETE";
893
+ path: "/stored/prompt-blocks/:storedPromptBlockId";
894
+ responseType: "json";
895
+ streamFormat?: "sse" | "stream";
896
+ sseFlushOnConnect?: boolean;
897
+ handler(params: {
898
+ storedPromptBlockId: string;
899
+ } & import(".").ServerContext): Promise<{
900
+ success: boolean;
901
+ message: string;
902
+ }>;
903
+ pathParamSchema?: import("zod").ZodType;
904
+ queryParamSchema?: import("zod").ZodType;
905
+ bodySchema?: import("zod").ZodType;
906
+ responseSchema?: import("zod").ZodType;
907
+ openapi?: import("../openapi-utils").OpenAPIRoute;
908
+ maxBodySize?: number;
909
+ deprecated?: boolean;
910
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
911
+ fga?: import("@mastra/core/auth").FGARouteConfig;
912
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
913
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
914
+ storedPromptBlockId: import("zod").ZodString;
915
+ }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
916
+ success: import("zod").ZodBoolean;
917
+ message: import("zod").ZodString;
918
+ }, import("zod/v4/core").$strip>> | undefined;
919
+ } & {
920
+ readonly _mastraSchemaRoute: true;
921
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
922
+ method: "GET";
923
+ path: "/stored/prompt-blocks/:promptBlockId/versions";
924
+ responseType: "json";
925
+ streamFormat?: "sse" | "stream";
926
+ sseFlushOnConnect?: boolean;
927
+ handler(params: import(".").InferParams<import("zod").ZodObject<{
928
+ promptBlockId: import("zod").ZodString;
929
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
930
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
931
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
932
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
933
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
934
+ createdAt: "createdAt";
935
+ versionNumber: "versionNumber";
936
+ }>>;
937
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
938
+ ASC: "ASC";
939
+ DESC: "DESC";
940
+ }>>;
941
+ }, import("zod/v4/core").$strip>>;
942
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
943
+ perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
944
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
945
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
946
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
947
+ createdAt: "createdAt";
948
+ versionNumber: "versionNumber";
949
+ }>>;
950
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
951
+ ASC: "ASC";
952
+ DESC: "DESC";
953
+ }>>;
954
+ }, import("zod/v4/core").$strip>>;
955
+ }, import("zod/v4/core").$strip>, undefined> & import(".").ServerContext): Promise<{
956
+ total: number;
957
+ page: number;
958
+ perPage: number | false;
959
+ hasMore: boolean;
960
+ versions: {
961
+ id: string;
962
+ blockId: string;
963
+ versionNumber: number;
964
+ name: string;
965
+ content: string;
966
+ createdAt: Date;
967
+ description?: string | undefined;
968
+ rules?: {
1203
969
  operator: "AND" | "OR";
1204
970
  conditions: ({
1205
971
  field: string;
@@ -1207,26 +973,171 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1207
973
  value?: unknown;
1208
974
  } | {
1209
975
  operator: "AND" | "OR";
1210
- conditions: {
976
+ conditions: ({
1211
977
  field: string;
1212
978
  operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1213
979
  value?: unknown;
1214
- }[];
980
+ } | {
981
+ operator: "AND" | "OR";
982
+ conditions: {
983
+ field: string;
984
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
985
+ value?: unknown;
986
+ }[];
987
+ })[];
1215
988
  })[];
1216
- })[];
1217
- } | undefined;
1218
- requestContextSchema?: Record<string, unknown> | undefined;
1219
- changedFields?: string[] | undefined;
989
+ } | undefined;
990
+ requestContextSchema?: Record<string, unknown> | undefined;
991
+ changedFields?: string[] | undefined;
992
+ changeMessage?: string | undefined;
993
+ }[];
994
+ }>;
995
+ pathParamSchema?: import("zod").ZodType;
996
+ queryParamSchema?: import("zod").ZodType;
997
+ bodySchema?: import("zod").ZodType;
998
+ responseSchema?: import("zod").ZodType;
999
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1000
+ maxBodySize?: number;
1001
+ deprecated?: boolean;
1002
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1003
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1004
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1005
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1006
+ promptBlockId: import("zod").ZodString;
1007
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1008
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
1009
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
1010
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
1011
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
1012
+ createdAt: "createdAt";
1013
+ versionNumber: "versionNumber";
1014
+ }>>;
1015
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
1016
+ ASC: "ASC";
1017
+ DESC: "DESC";
1018
+ }>>;
1019
+ }, import("zod/v4/core").$strip>>;
1020
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
1021
+ perPage: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1022
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
1023
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
1024
+ field: import("zod").ZodOptional<import("zod").ZodEnum<{
1025
+ createdAt: "createdAt";
1026
+ versionNumber: "versionNumber";
1027
+ }>>;
1028
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
1029
+ ASC: "ASC";
1030
+ DESC: "DESC";
1031
+ }>>;
1032
+ }, import("zod/v4/core").$strip>>;
1033
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1034
+ total: import("zod").ZodNumber;
1035
+ page: import("zod").ZodNumber;
1036
+ perPage: import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodLiteral<false>]>;
1037
+ hasMore: import("zod").ZodBoolean;
1038
+ versions: import("zod").ZodArray<import("zod").ZodObject<{
1039
+ id: import("zod").ZodString;
1040
+ blockId: import("zod").ZodString;
1041
+ versionNumber: import("zod").ZodNumber;
1042
+ name: import("zod").ZodString;
1043
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1044
+ content: import("zod").ZodString;
1045
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1046
+ operator: import("zod").ZodEnum<{
1047
+ AND: "AND";
1048
+ OR: "OR";
1049
+ }>;
1050
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1051
+ field: import("zod").ZodString;
1052
+ operator: import("zod").ZodEnum<{
1053
+ in: "in";
1054
+ equals: "equals";
1055
+ not_equals: "not_equals";
1056
+ contains: "contains";
1057
+ not_contains: "not_contains";
1058
+ greater_than: "greater_than";
1059
+ less_than: "less_than";
1060
+ greater_than_or_equal: "greater_than_or_equal";
1061
+ less_than_or_equal: "less_than_or_equal";
1062
+ not_in: "not_in";
1063
+ exists: "exists";
1064
+ not_exists: "not_exists";
1065
+ }>;
1066
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1067
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1068
+ operator: import("zod").ZodEnum<{
1069
+ AND: "AND";
1070
+ OR: "OR";
1071
+ }>;
1072
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1073
+ field: import("zod").ZodString;
1074
+ operator: import("zod").ZodEnum<{
1075
+ in: "in";
1076
+ equals: "equals";
1077
+ not_equals: "not_equals";
1078
+ contains: "contains";
1079
+ not_contains: "not_contains";
1080
+ greater_than: "greater_than";
1081
+ less_than: "less_than";
1082
+ greater_than_or_equal: "greater_than_or_equal";
1083
+ less_than_or_equal: "less_than_or_equal";
1084
+ not_in: "not_in";
1085
+ exists: "exists";
1086
+ not_exists: "not_exists";
1087
+ }>;
1088
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1089
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1090
+ operator: import("zod").ZodEnum<{
1091
+ AND: "AND";
1092
+ OR: "OR";
1093
+ }>;
1094
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
1095
+ field: import("zod").ZodString;
1096
+ operator: import("zod").ZodEnum<{
1097
+ in: "in";
1098
+ equals: "equals";
1099
+ not_equals: "not_equals";
1100
+ contains: "contains";
1101
+ not_contains: "not_contains";
1102
+ greater_than: "greater_than";
1103
+ less_than: "less_than";
1104
+ greater_than_or_equal: "greater_than_or_equal";
1105
+ less_than_or_equal: "less_than_or_equal";
1106
+ not_in: "not_in";
1107
+ exists: "exists";
1108
+ not_exists: "not_exists";
1109
+ }>;
1110
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1111
+ }, import("zod/v4/core").$strip>>;
1112
+ }, import("zod/v4/core").$strip>]>>;
1113
+ }, import("zod/v4/core").$strip>]>>;
1114
+ }, import("zod/v4/core").$strip>>;
1115
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1116
+ changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1117
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1118
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1119
+ }, import("zod/v4/core").$strip>>;
1120
+ }, import("zod/v4/core").$strip>> | undefined;
1121
+ } & {
1122
+ readonly _mastraSchemaRoute: true;
1123
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1124
+ method: "POST";
1125
+ path: "/stored/prompt-blocks/:promptBlockId/versions";
1126
+ responseType: "json";
1127
+ streamFormat?: "sse" | "stream";
1128
+ sseFlushOnConnect?: boolean;
1129
+ handler(params: {
1130
+ promptBlockId: string;
1131
+ } & {
1220
1132
  changeMessage?: string | undefined;
1221
- };
1222
- toVersion: {
1133
+ } & import(".").ServerContext): Promise<{
1223
1134
  id: string;
1224
1135
  blockId: string;
1225
1136
  versionNumber: number;
1226
- name: string;
1227
- content: string;
1228
1137
  createdAt: Date;
1138
+ name?: string | undefined;
1229
1139
  description?: string | undefined;
1140
+ content?: string | undefined;
1230
1141
  rules?: {
1231
1142
  operator: "AND" | "OR";
1232
1143
  conditions: ({
@@ -1252,26 +1163,26 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1252
1163
  requestContextSchema?: Record<string, unknown> | undefined;
1253
1164
  changedFields?: string[] | undefined;
1254
1165
  changeMessage?: string | undefined;
1255
- };
1256
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1257
- promptBlockId: import("zod").ZodString;
1258
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1259
- from: import("zod").ZodString;
1260
- to: import("zod").ZodString;
1261
- }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1262
- diffs: import("zod").ZodArray<import("zod").ZodObject<{
1263
- field: import("zod").ZodString;
1264
- previousValue: import("zod").ZodUnknown;
1265
- currentValue: import("zod").ZodUnknown;
1266
- }, import("zod/v4/core").$strip>>;
1267
- fromVersion: import("zod").ZodObject<{
1268
- id: import("zod").ZodString;
1269
- blockId: import("zod").ZodString;
1270
- versionNumber: import("zod").ZodNumber;
1271
- name: import("zod").ZodString;
1272
- description: import("zod").ZodOptional<import("zod").ZodString>;
1273
- content: import("zod").ZodString;
1274
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
1166
+ }>;
1167
+ pathParamSchema?: import("zod").ZodType;
1168
+ queryParamSchema?: import("zod").ZodType;
1169
+ bodySchema?: import("zod").ZodType;
1170
+ responseSchema?: import("zod").ZodType;
1171
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1172
+ maxBodySize?: number;
1173
+ deprecated?: boolean;
1174
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1175
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1176
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1177
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1178
+ promptBlockId: import("zod").ZodString;
1179
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1180
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1181
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1182
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1183
+ description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
1184
+ content: import("zod").ZodOptional<import("zod").ZodString>;
1185
+ rules: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
1275
1186
  operator: import("zod").ZodEnum<{
1276
1187
  AND: "AND";
1277
1188
  OR: "OR";
@@ -1340,42 +1251,214 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1340
1251
  }, import("zod/v4/core").$strip>>;
1341
1252
  }, import("zod/v4/core").$strip>]>>;
1342
1253
  }, import("zod/v4/core").$strip>]>>;
1343
- }, import("zod/v4/core").$strip>>;
1344
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1345
- changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1346
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1347
- createdAt: import("zod").ZodCoercedDate<unknown>;
1348
- }, import("zod/v4/core").$strip>;
1349
- toVersion: import("zod").ZodObject<{
1254
+ }, import("zod/v4/core").$strip>>>;
1255
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
1256
+ changedFields: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>>;
1257
+ changeMessage: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
1350
1258
  id: import("zod").ZodString;
1351
1259
  blockId: import("zod").ZodString;
1352
1260
  versionNumber: import("zod").ZodNumber;
1353
- name: import("zod").ZodString;
1354
- description: import("zod").ZodOptional<import("zod").ZodString>;
1355
- content: import("zod").ZodString;
1356
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
1357
- operator: import("zod").ZodEnum<{
1358
- AND: "AND";
1359
- OR: "OR";
1360
- }>;
1361
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1362
- field: import("zod").ZodString;
1261
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1262
+ }, import("zod/v4/core").$strip>> | undefined;
1263
+ } & {
1264
+ readonly _mastraSchemaRoute: true;
1265
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1266
+ method: "GET";
1267
+ path: "/stored/prompt-blocks/:promptBlockId/versions/compare";
1268
+ responseType: "json";
1269
+ streamFormat?: "sse" | "stream";
1270
+ sseFlushOnConnect?: boolean;
1271
+ handler(params: {
1272
+ promptBlockId: string;
1273
+ } & {
1274
+ from: string;
1275
+ to: string;
1276
+ } & import(".").ServerContext): Promise<{
1277
+ diffs: {
1278
+ field: string;
1279
+ previousValue: unknown;
1280
+ currentValue: unknown;
1281
+ }[];
1282
+ fromVersion: {
1283
+ id: string;
1284
+ blockId: string;
1285
+ versionNumber: number;
1286
+ name: string;
1287
+ content: string;
1288
+ createdAt: Date;
1289
+ description?: string | undefined;
1290
+ rules?: {
1291
+ operator: "AND" | "OR";
1292
+ conditions: ({
1293
+ field: string;
1294
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1295
+ value?: unknown;
1296
+ } | {
1297
+ operator: "AND" | "OR";
1298
+ conditions: ({
1299
+ field: string;
1300
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1301
+ value?: unknown;
1302
+ } | {
1303
+ operator: "AND" | "OR";
1304
+ conditions: {
1305
+ field: string;
1306
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1307
+ value?: unknown;
1308
+ }[];
1309
+ })[];
1310
+ })[];
1311
+ } | undefined;
1312
+ requestContextSchema?: Record<string, unknown> | undefined;
1313
+ changedFields?: string[] | undefined;
1314
+ changeMessage?: string | undefined;
1315
+ };
1316
+ toVersion: {
1317
+ id: string;
1318
+ blockId: string;
1319
+ versionNumber: number;
1320
+ name: string;
1321
+ content: string;
1322
+ createdAt: Date;
1323
+ description?: string | undefined;
1324
+ rules?: {
1325
+ operator: "AND" | "OR";
1326
+ conditions: ({
1327
+ field: string;
1328
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1329
+ value?: unknown;
1330
+ } | {
1331
+ operator: "AND" | "OR";
1332
+ conditions: ({
1333
+ field: string;
1334
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1335
+ value?: unknown;
1336
+ } | {
1337
+ operator: "AND" | "OR";
1338
+ conditions: {
1339
+ field: string;
1340
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1341
+ value?: unknown;
1342
+ }[];
1343
+ })[];
1344
+ })[];
1345
+ } | undefined;
1346
+ requestContextSchema?: Record<string, unknown> | undefined;
1347
+ changedFields?: string[] | undefined;
1348
+ changeMessage?: string | undefined;
1349
+ };
1350
+ }>;
1351
+ pathParamSchema?: import("zod").ZodType;
1352
+ queryParamSchema?: import("zod").ZodType;
1353
+ bodySchema?: import("zod").ZodType;
1354
+ responseSchema?: import("zod").ZodType;
1355
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1356
+ maxBodySize?: number;
1357
+ deprecated?: boolean;
1358
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1359
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1360
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1361
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1362
+ promptBlockId: import("zod").ZodString;
1363
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1364
+ from: import("zod").ZodString;
1365
+ to: import("zod").ZodString;
1366
+ }, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
1367
+ diffs: import("zod").ZodArray<import("zod").ZodObject<{
1368
+ field: import("zod").ZodString;
1369
+ previousValue: import("zod").ZodUnknown;
1370
+ currentValue: import("zod").ZodUnknown;
1371
+ }, import("zod/v4/core").$strip>>;
1372
+ fromVersion: import("zod").ZodObject<{
1373
+ id: import("zod").ZodString;
1374
+ blockId: import("zod").ZodString;
1375
+ versionNumber: import("zod").ZodNumber;
1376
+ name: import("zod").ZodString;
1377
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1378
+ content: import("zod").ZodString;
1379
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1363
1380
  operator: import("zod").ZodEnum<{
1364
- in: "in";
1365
- equals: "equals";
1366
- not_equals: "not_equals";
1367
- contains: "contains";
1368
- not_contains: "not_contains";
1369
- greater_than: "greater_than";
1370
- less_than: "less_than";
1371
- greater_than_or_equal: "greater_than_or_equal";
1372
- less_than_or_equal: "less_than_or_equal";
1373
- not_in: "not_in";
1374
- exists: "exists";
1375
- not_exists: "not_exists";
1381
+ AND: "AND";
1382
+ OR: "OR";
1376
1383
  }>;
1377
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1378
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1384
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1385
+ field: import("zod").ZodString;
1386
+ operator: import("zod").ZodEnum<{
1387
+ in: "in";
1388
+ equals: "equals";
1389
+ not_equals: "not_equals";
1390
+ contains: "contains";
1391
+ not_contains: "not_contains";
1392
+ greater_than: "greater_than";
1393
+ less_than: "less_than";
1394
+ greater_than_or_equal: "greater_than_or_equal";
1395
+ less_than_or_equal: "less_than_or_equal";
1396
+ not_in: "not_in";
1397
+ exists: "exists";
1398
+ not_exists: "not_exists";
1399
+ }>;
1400
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1401
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1402
+ operator: import("zod").ZodEnum<{
1403
+ AND: "AND";
1404
+ OR: "OR";
1405
+ }>;
1406
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1407
+ field: import("zod").ZodString;
1408
+ operator: import("zod").ZodEnum<{
1409
+ in: "in";
1410
+ equals: "equals";
1411
+ not_equals: "not_equals";
1412
+ contains: "contains";
1413
+ not_contains: "not_contains";
1414
+ greater_than: "greater_than";
1415
+ less_than: "less_than";
1416
+ greater_than_or_equal: "greater_than_or_equal";
1417
+ less_than_or_equal: "less_than_or_equal";
1418
+ not_in: "not_in";
1419
+ exists: "exists";
1420
+ not_exists: "not_exists";
1421
+ }>;
1422
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1423
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1424
+ operator: import("zod").ZodEnum<{
1425
+ AND: "AND";
1426
+ OR: "OR";
1427
+ }>;
1428
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
1429
+ field: import("zod").ZodString;
1430
+ operator: import("zod").ZodEnum<{
1431
+ in: "in";
1432
+ equals: "equals";
1433
+ not_equals: "not_equals";
1434
+ contains: "contains";
1435
+ not_contains: "not_contains";
1436
+ greater_than: "greater_than";
1437
+ less_than: "less_than";
1438
+ greater_than_or_equal: "greater_than_or_equal";
1439
+ less_than_or_equal: "less_than_or_equal";
1440
+ not_in: "not_in";
1441
+ exists: "exists";
1442
+ not_exists: "not_exists";
1443
+ }>;
1444
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1445
+ }, import("zod/v4/core").$strip>>;
1446
+ }, import("zod/v4/core").$strip>]>>;
1447
+ }, import("zod/v4/core").$strip>]>>;
1448
+ }, import("zod/v4/core").$strip>>;
1449
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1450
+ changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1451
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1452
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1453
+ }, import("zod/v4/core").$strip>;
1454
+ toVersion: import("zod").ZodObject<{
1455
+ id: import("zod").ZodString;
1456
+ blockId: import("zod").ZodString;
1457
+ versionNumber: import("zod").ZodNumber;
1458
+ name: import("zod").ZodString;
1459
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1460
+ content: import("zod").ZodString;
1461
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1379
1462
  operator: import("zod").ZodEnum<{
1380
1463
  AND: "AND";
1381
1464
  OR: "OR";
@@ -1402,7 +1485,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1402
1485
  AND: "AND";
1403
1486
  OR: "OR";
1404
1487
  }>;
1405
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
1488
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1406
1489
  field: import("zod").ZodString;
1407
1490
  operator: import("zod").ZodEnum<{
1408
1491
  in: "in";
@@ -1419,33 +1502,58 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1419
1502
  not_exists: "not_exists";
1420
1503
  }>;
1421
1504
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1422
- }, import("zod/v4/core").$strip>>;
1505
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1506
+ operator: import("zod").ZodEnum<{
1507
+ AND: "AND";
1508
+ OR: "OR";
1509
+ }>;
1510
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
1511
+ field: import("zod").ZodString;
1512
+ operator: import("zod").ZodEnum<{
1513
+ in: "in";
1514
+ equals: "equals";
1515
+ not_equals: "not_equals";
1516
+ contains: "contains";
1517
+ not_contains: "not_contains";
1518
+ greater_than: "greater_than";
1519
+ less_than: "less_than";
1520
+ greater_than_or_equal: "greater_than_or_equal";
1521
+ less_than_or_equal: "less_than_or_equal";
1522
+ not_in: "not_in";
1523
+ exists: "exists";
1524
+ not_exists: "not_exists";
1525
+ }>;
1526
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1527
+ }, import("zod/v4/core").$strip>>;
1528
+ }, import("zod/v4/core").$strip>]>>;
1423
1529
  }, import("zod/v4/core").$strip>]>>;
1424
- }, import("zod/v4/core").$strip>]>>;
1425
- }, import("zod/v4/core").$strip>>;
1426
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1427
- changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1428
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1429
- createdAt: import("zod").ZodCoercedDate<unknown>;
1430
- }, import("zod/v4/core").$strip>;
1431
- }, import("zod/v4/core").$strip>>, "GET", "/stored/prompt-blocks/:promptBlockId/versions/compare">, import(".").ServerRoute<{
1432
- promptBlockId: string;
1433
- versionId: string;
1434
- }, {
1435
- id: string;
1436
- blockId: string;
1437
- versionNumber: number;
1438
- name: string;
1439
- content: string;
1440
- createdAt: Date;
1441
- description?: string | undefined;
1442
- rules?: {
1443
- operator: "AND" | "OR";
1444
- conditions: ({
1445
- field: string;
1446
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1447
- value?: unknown;
1448
- } | {
1530
+ }, import("zod/v4/core").$strip>>;
1531
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1532
+ changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1533
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1534
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1535
+ }, import("zod/v4/core").$strip>;
1536
+ }, import("zod/v4/core").$strip>> | undefined;
1537
+ } & {
1538
+ readonly _mastraSchemaRoute: true;
1539
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1540
+ method: "GET";
1541
+ path: "/stored/prompt-blocks/:promptBlockId/versions/:versionId";
1542
+ responseType: "json";
1543
+ streamFormat?: "sse" | "stream";
1544
+ sseFlushOnConnect?: boolean;
1545
+ handler(params: {
1546
+ promptBlockId: string;
1547
+ versionId: string;
1548
+ } & import(".").ServerContext): Promise<{
1549
+ id: string;
1550
+ blockId: string;
1551
+ versionNumber: number;
1552
+ name: string;
1553
+ content: string;
1554
+ createdAt: Date;
1555
+ description?: string | undefined;
1556
+ rules?: {
1449
1557
  operator: "AND" | "OR";
1450
1558
  conditions: ({
1451
1559
  field: string;
@@ -1453,50 +1561,45 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1453
1561
  value?: unknown;
1454
1562
  } | {
1455
1563
  operator: "AND" | "OR";
1456
- conditions: {
1564
+ conditions: ({
1457
1565
  field: string;
1458
1566
  operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1459
1567
  value?: unknown;
1460
- }[];
1568
+ } | {
1569
+ operator: "AND" | "OR";
1570
+ conditions: {
1571
+ field: string;
1572
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1573
+ value?: unknown;
1574
+ }[];
1575
+ })[];
1461
1576
  })[];
1462
- })[];
1463
- } | undefined;
1464
- requestContextSchema?: Record<string, unknown> | undefined;
1465
- changedFields?: string[] | undefined;
1466
- changeMessage?: string | undefined;
1467
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1468
- promptBlockId: import("zod").ZodString;
1469
- versionId: import("zod").ZodString;
1470
- }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1471
- id: import("zod").ZodString;
1472
- blockId: import("zod").ZodString;
1473
- versionNumber: import("zod").ZodNumber;
1474
- name: import("zod").ZodString;
1475
- description: import("zod").ZodOptional<import("zod").ZodString>;
1476
- content: import("zod").ZodString;
1477
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
1478
- operator: import("zod").ZodEnum<{
1479
- AND: "AND";
1480
- OR: "OR";
1481
- }>;
1482
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1483
- field: import("zod").ZodString;
1484
- operator: import("zod").ZodEnum<{
1485
- in: "in";
1486
- equals: "equals";
1487
- not_equals: "not_equals";
1488
- contains: "contains";
1489
- not_contains: "not_contains";
1490
- greater_than: "greater_than";
1491
- less_than: "less_than";
1492
- greater_than_or_equal: "greater_than_or_equal";
1493
- less_than_or_equal: "less_than_or_equal";
1494
- not_in: "not_in";
1495
- exists: "exists";
1496
- not_exists: "not_exists";
1497
- }>;
1498
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1499
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1577
+ } | undefined;
1578
+ requestContextSchema?: Record<string, unknown> | undefined;
1579
+ changedFields?: string[] | undefined;
1580
+ changeMessage?: string | undefined;
1581
+ }>;
1582
+ pathParamSchema?: import("zod").ZodType;
1583
+ queryParamSchema?: import("zod").ZodType;
1584
+ bodySchema?: import("zod").ZodType;
1585
+ responseSchema?: import("zod").ZodType;
1586
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1587
+ maxBodySize?: number;
1588
+ deprecated?: boolean;
1589
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1590
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1591
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1592
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1593
+ promptBlockId: import("zod").ZodString;
1594
+ versionId: import("zod").ZodString;
1595
+ }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1596
+ id: import("zod").ZodString;
1597
+ blockId: import("zod").ZodString;
1598
+ versionNumber: import("zod").ZodNumber;
1599
+ name: import("zod").ZodString;
1600
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1601
+ content: import("zod").ZodString;
1602
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1500
1603
  operator: import("zod").ZodEnum<{
1501
1604
  AND: "AND";
1502
1605
  OR: "OR";
@@ -1523,7 +1626,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1523
1626
  AND: "AND";
1524
1627
  OR: "OR";
1525
1628
  }>;
1526
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
1629
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1527
1630
  field: import("zod").ZodString;
1528
1631
  operator: import("zod").ZodEnum<{
1529
1632
  in: "in";
@@ -1540,46 +1643,91 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1540
1643
  not_exists: "not_exists";
1541
1644
  }>;
1542
1645
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1543
- }, import("zod/v4/core").$strip>>;
1646
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1647
+ operator: import("zod").ZodEnum<{
1648
+ AND: "AND";
1649
+ OR: "OR";
1650
+ }>;
1651
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
1652
+ field: import("zod").ZodString;
1653
+ operator: import("zod").ZodEnum<{
1654
+ in: "in";
1655
+ equals: "equals";
1656
+ not_equals: "not_equals";
1657
+ contains: "contains";
1658
+ not_contains: "not_contains";
1659
+ greater_than: "greater_than";
1660
+ less_than: "less_than";
1661
+ greater_than_or_equal: "greater_than_or_equal";
1662
+ less_than_or_equal: "less_than_or_equal";
1663
+ not_in: "not_in";
1664
+ exists: "exists";
1665
+ not_exists: "not_exists";
1666
+ }>;
1667
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1668
+ }, import("zod/v4/core").$strip>>;
1669
+ }, import("zod/v4/core").$strip>]>>;
1544
1670
  }, import("zod/v4/core").$strip>]>>;
1545
- }, import("zod/v4/core").$strip>]>>;
1546
- }, import("zod/v4/core").$strip>>;
1547
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1548
- changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1549
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1550
- createdAt: import("zod").ZodCoercedDate<unknown>;
1551
- }, import("zod/v4/core").$strip>>, "GET", "/stored/prompt-blocks/:promptBlockId/versions/:versionId">, import(".").ServerRoute<{
1552
- promptBlockId: string;
1553
- versionId: string;
1554
- }, {
1555
- success: boolean;
1556
- message: string;
1557
- activeVersionId: string;
1558
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1559
- promptBlockId: import("zod").ZodString;
1560
- versionId: import("zod").ZodString;
1561
- }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1562
- success: import("zod").ZodBoolean;
1563
- message: import("zod").ZodString;
1564
- activeVersionId: import("zod").ZodString;
1565
- }, import("zod/v4/core").$strip>>, "POST", "/stored/prompt-blocks/:promptBlockId/versions/:versionId/activate">, import(".").ServerRoute<{
1566
- promptBlockId: string;
1567
- versionId: string;
1568
- }, {
1569
- id: string;
1570
- blockId: string;
1571
- versionNumber: number;
1572
- name: string;
1573
- content: string;
1574
- createdAt: Date;
1575
- description?: string | undefined;
1576
- rules?: {
1577
- operator: "AND" | "OR";
1578
- conditions: ({
1579
- field: string;
1580
- operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1581
- value?: unknown;
1582
- } | {
1671
+ }, import("zod/v4/core").$strip>>;
1672
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1673
+ changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1674
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1675
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1676
+ }, import("zod/v4/core").$strip>> | undefined;
1677
+ } & {
1678
+ readonly _mastraSchemaRoute: true;
1679
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1680
+ method: "POST";
1681
+ path: "/stored/prompt-blocks/:promptBlockId/versions/:versionId/activate";
1682
+ responseType: "json";
1683
+ streamFormat?: "sse" | "stream";
1684
+ sseFlushOnConnect?: boolean;
1685
+ handler(params: {
1686
+ promptBlockId: string;
1687
+ versionId: string;
1688
+ } & import(".").ServerContext): Promise<{
1689
+ success: boolean;
1690
+ message: string;
1691
+ activeVersionId: string;
1692
+ }>;
1693
+ pathParamSchema?: import("zod").ZodType;
1694
+ queryParamSchema?: import("zod").ZodType;
1695
+ bodySchema?: import("zod").ZodType;
1696
+ responseSchema?: import("zod").ZodType;
1697
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1698
+ maxBodySize?: number;
1699
+ deprecated?: boolean;
1700
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1701
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1702
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1703
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1704
+ promptBlockId: import("zod").ZodString;
1705
+ versionId: import("zod").ZodString;
1706
+ }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1707
+ success: import("zod").ZodBoolean;
1708
+ message: import("zod").ZodString;
1709
+ activeVersionId: import("zod").ZodString;
1710
+ }, import("zod/v4/core").$strip>> | undefined;
1711
+ } & {
1712
+ readonly _mastraSchemaRoute: true;
1713
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1714
+ method: "POST";
1715
+ path: "/stored/prompt-blocks/:promptBlockId/versions/:versionId/restore";
1716
+ responseType: "json";
1717
+ streamFormat?: "sse" | "stream";
1718
+ sseFlushOnConnect?: boolean;
1719
+ handler(params: {
1720
+ promptBlockId: string;
1721
+ versionId: string;
1722
+ } & import(".").ServerContext): Promise<{
1723
+ id: string;
1724
+ blockId: string;
1725
+ versionNumber: number;
1726
+ name: string;
1727
+ content: string;
1728
+ createdAt: Date;
1729
+ description?: string | undefined;
1730
+ rules?: {
1583
1731
  operator: "AND" | "OR";
1584
1732
  conditions: ({
1585
1733
  field: string;
@@ -1587,50 +1735,45 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1587
1735
  value?: unknown;
1588
1736
  } | {
1589
1737
  operator: "AND" | "OR";
1590
- conditions: {
1738
+ conditions: ({
1591
1739
  field: string;
1592
1740
  operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1593
1741
  value?: unknown;
1594
- }[];
1742
+ } | {
1743
+ operator: "AND" | "OR";
1744
+ conditions: {
1745
+ field: string;
1746
+ operator: "in" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "not_in" | "exists" | "not_exists";
1747
+ value?: unknown;
1748
+ }[];
1749
+ })[];
1595
1750
  })[];
1596
- })[];
1597
- } | undefined;
1598
- requestContextSchema?: Record<string, unknown> | undefined;
1599
- changedFields?: string[] | undefined;
1600
- changeMessage?: string | undefined;
1601
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1602
- promptBlockId: import("zod").ZodString;
1603
- versionId: import("zod").ZodString;
1604
- }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1605
- id: import("zod").ZodString;
1606
- blockId: import("zod").ZodString;
1607
- versionNumber: import("zod").ZodNumber;
1608
- name: import("zod").ZodString;
1609
- description: import("zod").ZodOptional<import("zod").ZodString>;
1610
- content: import("zod").ZodString;
1611
- rules: import("zod").ZodOptional<import("zod").ZodObject<{
1612
- operator: import("zod").ZodEnum<{
1613
- AND: "AND";
1614
- OR: "OR";
1615
- }>;
1616
- conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1617
- field: import("zod").ZodString;
1618
- operator: import("zod").ZodEnum<{
1619
- in: "in";
1620
- equals: "equals";
1621
- not_equals: "not_equals";
1622
- contains: "contains";
1623
- not_contains: "not_contains";
1624
- greater_than: "greater_than";
1625
- less_than: "less_than";
1626
- greater_than_or_equal: "greater_than_or_equal";
1627
- less_than_or_equal: "less_than_or_equal";
1628
- not_in: "not_in";
1629
- exists: "exists";
1630
- not_exists: "not_exists";
1631
- }>;
1632
- value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1633
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1751
+ } | undefined;
1752
+ requestContextSchema?: Record<string, unknown> | undefined;
1753
+ changedFields?: string[] | undefined;
1754
+ changeMessage?: string | undefined;
1755
+ }>;
1756
+ pathParamSchema?: import("zod").ZodType;
1757
+ queryParamSchema?: import("zod").ZodType;
1758
+ bodySchema?: import("zod").ZodType;
1759
+ responseSchema?: import("zod").ZodType;
1760
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1761
+ maxBodySize?: number;
1762
+ deprecated?: boolean;
1763
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1764
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1765
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1766
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1767
+ promptBlockId: import("zod").ZodString;
1768
+ versionId: import("zod").ZodString;
1769
+ }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1770
+ id: import("zod").ZodString;
1771
+ blockId: import("zod").ZodString;
1772
+ versionNumber: import("zod").ZodNumber;
1773
+ name: import("zod").ZodString;
1774
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1775
+ content: import("zod").ZodString;
1776
+ rules: import("zod").ZodOptional<import("zod").ZodObject<{
1634
1777
  operator: import("zod").ZodEnum<{
1635
1778
  AND: "AND";
1636
1779
  OR: "OR";
@@ -1657,7 +1800,7 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1657
1800
  AND: "AND";
1658
1801
  OR: "OR";
1659
1802
  }>;
1660
- conditions: import("zod").ZodArray<import("zod").ZodObject<{
1803
+ conditions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1661
1804
  field: import("zod").ZodString;
1662
1805
  operator: import("zod").ZodEnum<{
1663
1806
  in: "in";
@@ -1674,25 +1817,70 @@ export declare const STORED_PROMPT_BLOCKS_ROUTES: readonly [import(".").ServerRo
1674
1817
  not_exists: "not_exists";
1675
1818
  }>;
1676
1819
  value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1677
- }, import("zod/v4/core").$strip>>;
1820
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1821
+ operator: import("zod").ZodEnum<{
1822
+ AND: "AND";
1823
+ OR: "OR";
1824
+ }>;
1825
+ conditions: import("zod").ZodArray<import("zod").ZodObject<{
1826
+ field: import("zod").ZodString;
1827
+ operator: import("zod").ZodEnum<{
1828
+ in: "in";
1829
+ equals: "equals";
1830
+ not_equals: "not_equals";
1831
+ contains: "contains";
1832
+ not_contains: "not_contains";
1833
+ greater_than: "greater_than";
1834
+ less_than: "less_than";
1835
+ greater_than_or_equal: "greater_than_or_equal";
1836
+ less_than_or_equal: "less_than_or_equal";
1837
+ not_in: "not_in";
1838
+ exists: "exists";
1839
+ not_exists: "not_exists";
1840
+ }>;
1841
+ value: import("zod").ZodOptional<import("zod").ZodUnknown>;
1842
+ }, import("zod/v4/core").$strip>>;
1843
+ }, import("zod/v4/core").$strip>]>>;
1678
1844
  }, import("zod/v4/core").$strip>]>>;
1679
- }, import("zod/v4/core").$strip>]>>;
1680
- }, import("zod/v4/core").$strip>>;
1681
- requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1682
- changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1683
- changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1684
- createdAt: import("zod").ZodCoercedDate<unknown>;
1685
- }, import("zod/v4/core").$strip>>, "POST", "/stored/prompt-blocks/:promptBlockId/versions/:versionId/restore">, import(".").ServerRoute<{
1686
- promptBlockId: string;
1687
- versionId: string;
1688
- }, {
1689
- success: boolean;
1690
- message: string;
1691
- }, "json", import(".").RouteSchemas<import("zod").ZodObject<{
1692
- promptBlockId: import("zod").ZodString;
1693
- versionId: import("zod").ZodString;
1694
- }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1695
- success: import("zod").ZodBoolean;
1696
- message: import("zod").ZodString;
1697
- }, import("zod/v4/core").$strip>>, "DELETE", "/stored/prompt-blocks/:promptBlockId/versions/:versionId">];
1845
+ }, import("zod/v4/core").$strip>>;
1846
+ requestContextSchema: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1847
+ changedFields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1848
+ changeMessage: import("zod").ZodOptional<import("zod").ZodString>;
1849
+ createdAt: import("zod").ZodCoercedDate<unknown>;
1850
+ }, import("zod/v4/core").$strip>> | undefined;
1851
+ } & {
1852
+ readonly _mastraSchemaRoute: true;
1853
+ }, Omit<import("@mastra/core/server").ApiRoute, "path" | "method" | "handler" | "createHandler" | "openapi"> & {
1854
+ method: "DELETE";
1855
+ path: "/stored/prompt-blocks/:promptBlockId/versions/:versionId";
1856
+ responseType: "json";
1857
+ streamFormat?: "sse" | "stream";
1858
+ sseFlushOnConnect?: boolean;
1859
+ handler(params: {
1860
+ promptBlockId: string;
1861
+ versionId: string;
1862
+ } & import(".").ServerContext): Promise<{
1863
+ success: boolean;
1864
+ message: string;
1865
+ }>;
1866
+ pathParamSchema?: import("zod").ZodType;
1867
+ queryParamSchema?: import("zod").ZodType;
1868
+ bodySchema?: import("zod").ZodType;
1869
+ responseSchema?: import("zod").ZodType;
1870
+ openapi?: import("../openapi-utils").OpenAPIRoute;
1871
+ maxBodySize?: number;
1872
+ deprecated?: boolean;
1873
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1874
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1875
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1876
+ readonly __schemas?: import(".").RouteSchemas<import("zod").ZodObject<{
1877
+ promptBlockId: import("zod").ZodString;
1878
+ versionId: import("zod").ZodString;
1879
+ }, import("zod/v4/core").$strip>, undefined, undefined, import("zod").ZodObject<{
1880
+ success: import("zod").ZodBoolean;
1881
+ message: import("zod").ZodString;
1882
+ }, import("zod/v4/core").$strip>> | undefined;
1883
+ } & {
1884
+ readonly _mastraSchemaRoute: true;
1885
+ }];
1698
1886
  //# sourceMappingURL=stored-prompt-blocks.d.ts.map