@geekmidas/constructs 0.0.11 → 0.0.12

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 (323) hide show
  1. package/dist/{AWSLambdaFunction-DcI_77u8.cjs → AWSLambdaFunction-DMxScuaw.cjs} +3 -3
  2. package/dist/{AWSLambdaFunction-DcI_77u8.cjs.map → AWSLambdaFunction-DMxScuaw.cjs.map} +1 -1
  3. package/dist/{AWSLambdaFunction-xyCenuD7.d.cts → AWSLambdaFunction-DSB2oaFG.d.mts} +5 -5
  4. package/dist/{AWSLambdaFunction-BTSGYZSx.mjs → AWSLambdaFunction-cL8A169J.mjs} +3 -3
  5. package/dist/{AWSLambdaFunction-BTSGYZSx.mjs.map → AWSLambdaFunction-cL8A169J.mjs.map} +1 -1
  6. package/dist/{AWSLambdaFunction-Bel0NFTl.d.mts → AWSLambdaFunction-t6q2o8EL.d.cts} +5 -5
  7. package/dist/{AWSLambdaSubscriberAdaptor-mLOpS63x.d.mts → AWSLambdaSubscriberAdaptor-Cknp_nn1.d.cts} +4 -4
  8. package/dist/{AWSLambdaSubscriberAdaptor-G8y3YkWj.mjs → AWSLambdaSubscriberAdaptor-CyFh7MN8.mjs} +1 -1
  9. package/dist/{AWSLambdaSubscriberAdaptor-G8y3YkWj.mjs.map → AWSLambdaSubscriberAdaptor-CyFh7MN8.mjs.map} +1 -1
  10. package/dist/{AWSLambdaSubscriberAdaptor-DX5NFdWf.d.cts → AWSLambdaSubscriberAdaptor-DpHzp-AM.d.mts} +4 -4
  11. package/dist/{AWSLambdaSubscriberAdaptor-CmPZ10JF.cjs → AWSLambdaSubscriberAdaptor-Dum5bkw3.cjs} +1 -1
  12. package/dist/{AWSLambdaSubscriberAdaptor-CmPZ10JF.cjs.map → AWSLambdaSubscriberAdaptor-Dum5bkw3.cjs.map} +1 -1
  13. package/dist/{AmazonApiGatewayEndpointAdaptor-vi0D3dWg.mjs → AmazonApiGatewayEndpointAdaptor-CIEhW1TQ.mjs} +47 -16
  14. package/dist/AmazonApiGatewayEndpointAdaptor-CIEhW1TQ.mjs.map +1 -0
  15. package/dist/{AmazonApiGatewayEndpointAdaptor-BwtDtS-i.d.cts → AmazonApiGatewayEndpointAdaptor-CwItKPz2.d.cts} +6 -5
  16. package/dist/{AmazonApiGatewayEndpointAdaptor-BTqB3c1_.cjs → AmazonApiGatewayEndpointAdaptor-H8YvtfQm.cjs} +47 -16
  17. package/dist/AmazonApiGatewayEndpointAdaptor-H8YvtfQm.cjs.map +1 -0
  18. package/dist/{AmazonApiGatewayEndpointAdaptor-CATWBIJo.d.mts → AmazonApiGatewayEndpointAdaptor-eDQgPNLH.d.mts} +7 -6
  19. package/dist/{AmazonApiGatewayV1EndpointAdaptor-nwrtG5L9.cjs → AmazonApiGatewayV1EndpointAdaptor-0n71d3gq.cjs} +3 -3
  20. package/dist/{AmazonApiGatewayV1EndpointAdaptor-nwrtG5L9.cjs.map → AmazonApiGatewayV1EndpointAdaptor-0n71d3gq.cjs.map} +1 -1
  21. package/dist/{AmazonApiGatewayV1EndpointAdaptor-D2_u_zR6.mjs → AmazonApiGatewayV1EndpointAdaptor-B36zXLJ7.mjs} +3 -3
  22. package/dist/{AmazonApiGatewayV1EndpointAdaptor-D2_u_zR6.mjs.map → AmazonApiGatewayV1EndpointAdaptor-B36zXLJ7.mjs.map} +1 -1
  23. package/dist/{AmazonApiGatewayV1EndpointAdaptor-2Rd0LLz4.d.mts → AmazonApiGatewayV1EndpointAdaptor-CnGVpA38.d.mts} +4 -4
  24. package/dist/{AmazonApiGatewayV1EndpointAdaptor-B1AVk2MM.d.cts → AmazonApiGatewayV1EndpointAdaptor-DaCvUL6y.d.cts} +3 -3
  25. package/dist/{AmazonApiGatewayV2EndpointAdaptor-cBDfwdBx.d.mts → AmazonApiGatewayV2EndpointAdaptor-BELz2ijs.d.mts} +4 -4
  26. package/dist/{AmazonApiGatewayV2EndpointAdaptor-DoWAJ9oN.mjs → AmazonApiGatewayV2EndpointAdaptor-CE3wZEb8.mjs} +3 -3
  27. package/dist/{AmazonApiGatewayV2EndpointAdaptor-DoWAJ9oN.mjs.map → AmazonApiGatewayV2EndpointAdaptor-CE3wZEb8.mjs.map} +1 -1
  28. package/dist/{AmazonApiGatewayV2EndpointAdaptor-DmY_QfjO.d.cts → AmazonApiGatewayV2EndpointAdaptor-DA1PH0nc.d.cts} +3 -3
  29. package/dist/{AmazonApiGatewayV2EndpointAdaptor-FSIdXYV6.cjs → AmazonApiGatewayV2EndpointAdaptor-DtU3Cb8F.cjs} +3 -3
  30. package/dist/{AmazonApiGatewayV2EndpointAdaptor-FSIdXYV6.cjs.map → AmazonApiGatewayV2EndpointAdaptor-DtU3Cb8F.cjs.map} +1 -1
  31. package/dist/{Authorizer-Bbk9ziuG.d.mts → Authorizer-BRCVPz_O.d.mts} +1 -1
  32. package/dist/{Authorizer-iXsSB600.d.cts → Authorizer-DG54w1m2.d.cts} +1 -1
  33. package/dist/{BaseFunctionBuilder-bTDKP7bd.cjs → BaseFunctionBuilder-B8rT07QR.cjs} +7 -2
  34. package/dist/BaseFunctionBuilder-B8rT07QR.cjs.map +1 -0
  35. package/dist/{BaseFunctionBuilder-DSqF1r3a.mjs → BaseFunctionBuilder-CT7p10K1.mjs} +7 -2
  36. package/dist/BaseFunctionBuilder-CT7p10K1.mjs.map +1 -0
  37. package/dist/{BaseFunctionBuilder-DOcm1heZ.d.mts → BaseFunctionBuilder-Cf0op65o.d.cts} +8 -5
  38. package/dist/{BaseFunctionBuilder-hWNVKXQB.d.cts → BaseFunctionBuilder-DilipY1y.d.mts} +8 -5
  39. package/dist/{Construct-XCGKof_O.cjs → Construct-BYSPikVm.cjs} +8 -3
  40. package/dist/Construct-BYSPikVm.cjs.map +1 -0
  41. package/dist/{Construct-rZQg2yus.mjs → Construct-LWeB1rSQ.mjs} +8 -3
  42. package/dist/Construct-LWeB1rSQ.mjs.map +1 -0
  43. package/dist/{Construct-iDmbkZ3o.d.mts → Construct-ZPqE0vhn.d.mts} +5 -3
  44. package/dist/{Construct-zc8BkRSp.d.cts → Construct-dI_rgdSp.d.cts} +5 -3
  45. package/dist/Construct.cjs +1 -1
  46. package/dist/Construct.d.cts +1 -1
  47. package/dist/Construct.d.mts +1 -1
  48. package/dist/Construct.mjs +1 -1
  49. package/dist/{Cron-D5HGEt6g.d.mts → Cron-6lOgKqSA.d.cts} +3 -3
  50. package/dist/{Cron-DbJNPTbP.d.cts → Cron-BH_07atD.d.mts} +3 -3
  51. package/dist/{Cron-CYIhd0VE.cjs → Cron-Bnd-2pgE.cjs} +3 -3
  52. package/dist/{Cron-CYIhd0VE.cjs.map → Cron-Bnd-2pgE.cjs.map} +1 -1
  53. package/dist/{Cron-BnO1uXhh.mjs → Cron-DNRjf2cp.mjs} +3 -3
  54. package/dist/{Cron-BnO1uXhh.mjs.map → Cron-DNRjf2cp.mjs.map} +1 -1
  55. package/dist/{CronBuilder-D-546XtP.d.cts → CronBuilder-5oK2AL2n.d.cts} +4 -4
  56. package/dist/{CronBuilder-vRiZb1_N.d.mts → CronBuilder-D2b4zY4l.d.mts} +4 -4
  57. package/dist/{CronBuilder-BxKwHCdJ.mjs → CronBuilder-DdR2TuQa.mjs} +5 -5
  58. package/dist/{CronBuilder-BxKwHCdJ.mjs.map → CronBuilder-DdR2TuQa.mjs.map} +1 -1
  59. package/dist/{CronBuilder-D_3AiPFO.cjs → CronBuilder-dtw4ZyH6.cjs} +5 -5
  60. package/dist/{CronBuilder-D_3AiPFO.cjs.map → CronBuilder-dtw4ZyH6.cjs.map} +1 -1
  61. package/dist/{Endpoint-ChzcIFdV.mjs → Endpoint-B69TqESg.mjs} +15 -8
  62. package/dist/Endpoint-B69TqESg.mjs.map +1 -0
  63. package/dist/{Endpoint-BdIGWw1H.cjs → Endpoint-B9PryZES.cjs} +15 -8
  64. package/dist/Endpoint-B9PryZES.cjs.map +1 -0
  65. package/dist/{Endpoint-BpTSQn7W.d.cts → Endpoint-Cs-MsYlY.d.cts} +80 -12
  66. package/dist/{Endpoint-DqZkc6ft.d.mts → Endpoint-DuZlyjd4.d.mts} +80 -12
  67. package/dist/EndpointBuilder-BrB-K1jO.d.mts +86 -0
  68. package/dist/EndpointBuilder-C-PHInEW.d.cts +86 -0
  69. package/dist/{EndpointBuilder-yo40Qkf_.mjs → EndpointBuilder-DnVL-EU_.mjs} +47 -5
  70. package/dist/EndpointBuilder-DnVL-EU_.mjs.map +1 -0
  71. package/dist/{EndpointBuilder-dmMiNRm9.cjs → EndpointBuilder-DofwCnWJ.cjs} +47 -5
  72. package/dist/EndpointBuilder-DofwCnWJ.cjs.map +1 -0
  73. package/dist/{EndpointFactory-JPhk0Qom.d.cts → EndpointFactory-6zNpVSYp.d.mts} +12 -11
  74. package/dist/{EndpointFactory-CNbcr8u_.cjs → EndpointFactory-Ba9mx9MU.cjs} +3 -3
  75. package/dist/{EndpointFactory-CNbcr8u_.cjs.map → EndpointFactory-Ba9mx9MU.cjs.map} +1 -1
  76. package/dist/{EndpointFactory-D_mmO7Gu.d.mts → EndpointFactory-e5WYVR6t.d.cts} +12 -11
  77. package/dist/{EndpointFactory-LD3upVQK.mjs → EndpointFactory-pPaIGFHV.mjs} +3 -3
  78. package/dist/{EndpointFactory-LD3upVQK.mjs.map → EndpointFactory-pPaIGFHV.mjs.map} +1 -1
  79. package/dist/{Function-C-5_23Wi.d.mts → Function-6EWabl_X.d.cts} +6 -5
  80. package/dist/{Function-DDaSfL_E.cjs → Function-CO-s2pB8.cjs} +6 -6
  81. package/dist/Function-CO-s2pB8.cjs.map +1 -0
  82. package/dist/{Function-Cl9fiR3a.mjs → Function-COnc-tWM.mjs} +6 -6
  83. package/dist/Function-COnc-tWM.mjs.map +1 -0
  84. package/dist/{Function-CW-WcZTu.d.cts → Function-G3JPHMaY.d.mts} +6 -5
  85. package/dist/{FunctionBuilder-fU1H7tFN.d.cts → FunctionBuilder-B3fpp3hA.d.cts} +13 -11
  86. package/dist/{FunctionBuilder-udObIGV0.d.mts → FunctionBuilder-ByaB_LQ4.d.mts} +13 -11
  87. package/dist/{FunctionBuilder-vW12WFOw.mjs → FunctionBuilder-CMhLQ4dt.mjs} +11 -6
  88. package/dist/FunctionBuilder-CMhLQ4dt.mjs.map +1 -0
  89. package/dist/{FunctionBuilder-LQuBiqRc.cjs → FunctionBuilder-_hMwZUof.cjs} +11 -6
  90. package/dist/FunctionBuilder-_hMwZUof.cjs.map +1 -0
  91. package/dist/{FunctionExecutionWrapper-DYBy9OP3.d.mts → FunctionExecutionWrapper-Ci-ookJG.d.cts} +4 -4
  92. package/dist/{FunctionExecutionWrapper-Dwr2ZKzC.d.cts → FunctionExecutionWrapper-DHFMLrOl.d.mts} +4 -4
  93. package/dist/{FunctionExecutionWrapper-Dtyhid1Q.mjs → FunctionExecutionWrapper-i9v5L3Av.mjs} +2 -2
  94. package/dist/{FunctionExecutionWrapper-Dtyhid1Q.mjs.map → FunctionExecutionWrapper-i9v5L3Av.mjs.map} +1 -1
  95. package/dist/{FunctionExecutionWrapper-BBIoHUt6.cjs → FunctionExecutionWrapper-sxJNTpuc.cjs} +2 -2
  96. package/dist/{FunctionExecutionWrapper-BBIoHUt6.cjs.map → FunctionExecutionWrapper-sxJNTpuc.cjs.map} +1 -1
  97. package/dist/{HonoEndpointAdaptor-W-disJnm.d.mts → HonoEndpointAdaptor-BElil8O5.d.mts} +7 -6
  98. package/dist/{HonoEndpointAdaptor-Bc61IS6Q.cjs → HonoEndpointAdaptor-Cw2if5cG.cjs} +51 -20
  99. package/dist/HonoEndpointAdaptor-Cw2if5cG.cjs.map +1 -0
  100. package/dist/{HonoEndpointAdaptor-NR3h5gml.mjs → HonoEndpointAdaptor-DAfnTFVS.mjs} +51 -20
  101. package/dist/HonoEndpointAdaptor-DAfnTFVS.mjs.map +1 -0
  102. package/dist/{HonoEndpointAdaptor-BVQtyvna.d.cts → HonoEndpointAdaptor-DSHl8ZCY.d.cts} +8 -7
  103. package/dist/{Subscriber-BVq3ST4C.d.cts → Subscriber-BhzqUzs-.d.cts} +2 -2
  104. package/dist/{Subscriber-BKftCzwT.mjs → Subscriber-CGb8LjZa.mjs} +2 -2
  105. package/dist/{Subscriber-BKftCzwT.mjs.map → Subscriber-CGb8LjZa.mjs.map} +1 -1
  106. package/dist/{Subscriber-C2OPATI8.cjs → Subscriber-D-FPWts6.cjs} +2 -2
  107. package/dist/{Subscriber-C2OPATI8.cjs.map → Subscriber-D-FPWts6.cjs.map} +1 -1
  108. package/dist/{Subscriber-BuHaqWo4.d.mts → Subscriber-s6yfjeOc.d.mts} +2 -2
  109. package/dist/{SubscriberBuilder-2asHtGbl.d.mts → SubscriberBuilder-BCVkp-ga.d.cts} +3 -3
  110. package/dist/{SubscriberBuilder-yDfpHPZE.mjs → SubscriberBuilder-BcAspHv9.mjs} +2 -2
  111. package/dist/{SubscriberBuilder-yDfpHPZE.mjs.map → SubscriberBuilder-BcAspHv9.mjs.map} +1 -1
  112. package/dist/{SubscriberBuilder-yikoQ8ND.cjs → SubscriberBuilder-BfE2cL1q.cjs} +2 -2
  113. package/dist/{SubscriberBuilder-yikoQ8ND.cjs.map → SubscriberBuilder-BfE2cL1q.cjs.map} +1 -1
  114. package/dist/{SubscriberBuilder-CHIRyNjy.d.cts → SubscriberBuilder-aCua5_wA.d.mts} +3 -3
  115. package/dist/{TestEndpointAdaptor-DA1D6l-U.cjs → TestEndpointAdaptor-Bn1WRFph.cjs} +47 -18
  116. package/dist/TestEndpointAdaptor-Bn1WRFph.cjs.map +1 -0
  117. package/dist/{TestEndpointAdaptor-B10J-cI-.d.mts → TestEndpointAdaptor-DnlAA_rm.d.mts} +7 -6
  118. package/dist/{TestEndpointAdaptor-DpmNXp7G.mjs → TestEndpointAdaptor-DubQOJk_.mjs} +47 -18
  119. package/dist/TestEndpointAdaptor-DubQOJk_.mjs.map +1 -0
  120. package/dist/{TestEndpointAdaptor-BrE5Rs4U.d.cts → TestEndpointAdaptor-o-xtSyQ3.d.cts} +6 -5
  121. package/dist/adaptors/aws.cjs +14 -13
  122. package/dist/adaptors/aws.d.cts +14 -14
  123. package/dist/adaptors/aws.d.mts +15 -15
  124. package/dist/adaptors/aws.mjs +14 -13
  125. package/dist/adaptors/hono.cjs +10 -9
  126. package/dist/adaptors/hono.d.cts +8 -8
  127. package/dist/adaptors/hono.d.mts +9 -9
  128. package/dist/adaptors/hono.mjs +10 -9
  129. package/dist/adaptors/testing.cjs +8 -7
  130. package/dist/adaptors/testing.d.cts +8 -8
  131. package/dist/adaptors/testing.d.mts +9 -9
  132. package/dist/adaptors/testing.mjs +8 -7
  133. package/dist/crons/Cron.cjs +6 -6
  134. package/dist/crons/Cron.d.cts +6 -6
  135. package/dist/crons/Cron.d.mts +6 -6
  136. package/dist/crons/Cron.mjs +6 -6
  137. package/dist/crons/CronBuilder.cjs +7 -7
  138. package/dist/crons/CronBuilder.d.cts +7 -7
  139. package/dist/crons/CronBuilder.d.mts +7 -7
  140. package/dist/crons/CronBuilder.mjs +7 -7
  141. package/dist/crons/index.cjs +7 -7
  142. package/dist/crons/index.d.cts +11 -11
  143. package/dist/crons/index.d.mts +11 -11
  144. package/dist/crons/index.mjs +7 -7
  145. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +8 -7
  146. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +8 -8
  147. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +9 -9
  148. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +8 -7
  149. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +10 -9
  150. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +9 -9
  151. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +10 -10
  152. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +10 -9
  153. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +10 -9
  154. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +9 -9
  155. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +10 -10
  156. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +10 -9
  157. package/dist/endpoints/Authorizer.d.cts +1 -1
  158. package/dist/endpoints/Authorizer.d.mts +1 -1
  159. package/dist/endpoints/Endpoint.cjs +6 -6
  160. package/dist/endpoints/Endpoint.d.cts +7 -7
  161. package/dist/endpoints/Endpoint.d.mts +8 -8
  162. package/dist/endpoints/Endpoint.mjs +6 -6
  163. package/dist/endpoints/EndpointBuilder.cjs +7 -7
  164. package/dist/endpoints/EndpointBuilder.d.cts +8 -8
  165. package/dist/endpoints/EndpointBuilder.d.mts +9 -9
  166. package/dist/endpoints/EndpointBuilder.mjs +7 -7
  167. package/dist/endpoints/EndpointFactory.cjs +8 -8
  168. package/dist/endpoints/EndpointFactory.d.cts +9 -9
  169. package/dist/endpoints/EndpointFactory.d.mts +10 -10
  170. package/dist/endpoints/EndpointFactory.mjs +8 -8
  171. package/dist/endpoints/HonoEndpointAdaptor.cjs +10 -9
  172. package/dist/endpoints/HonoEndpointAdaptor.d.cts +8 -8
  173. package/dist/endpoints/HonoEndpointAdaptor.d.mts +9 -9
  174. package/dist/endpoints/HonoEndpointAdaptor.mjs +10 -9
  175. package/dist/endpoints/TestEndpointAdaptor.cjs +8 -7
  176. package/dist/endpoints/TestEndpointAdaptor.d.cts +8 -8
  177. package/dist/endpoints/TestEndpointAdaptor.d.mts +9 -9
  178. package/dist/endpoints/TestEndpointAdaptor.mjs +8 -7
  179. package/dist/endpoints/audit.cjs +0 -0
  180. package/dist/endpoints/audit.d.cts +9 -0
  181. package/dist/endpoints/audit.d.mts +9 -0
  182. package/dist/endpoints/audit.mjs +0 -0
  183. package/dist/endpoints/helpers.cjs +7 -7
  184. package/dist/endpoints/helpers.d.cts +7 -7
  185. package/dist/endpoints/helpers.d.mts +8 -8
  186. package/dist/endpoints/helpers.mjs +7 -7
  187. package/dist/endpoints/index.cjs +8 -8
  188. package/dist/endpoints/index.cjs.map +1 -1
  189. package/dist/endpoints/index.d.cts +12 -12
  190. package/dist/endpoints/index.d.mts +13 -13
  191. package/dist/endpoints/index.mjs +8 -8
  192. package/dist/endpoints/index.mjs.map +1 -1
  193. package/dist/endpoints/parseHonoQuery.cjs +1 -1
  194. package/dist/endpoints/parseHonoQuery.mjs +1 -1
  195. package/dist/endpoints/parseQueryParams.cjs +1 -1
  196. package/dist/endpoints/parseQueryParams.mjs +1 -1
  197. package/dist/endpoints/processAudits.cjs +5 -0
  198. package/dist/endpoints/processAudits.d.cts +74 -0
  199. package/dist/endpoints/processAudits.d.mts +74 -0
  200. package/dist/endpoints/processAudits.mjs +3 -0
  201. package/dist/functions/AWSLambdaFunction.cjs +6 -6
  202. package/dist/functions/AWSLambdaFunction.d.cts +4 -4
  203. package/dist/functions/AWSLambdaFunction.d.mts +4 -4
  204. package/dist/functions/AWSLambdaFunction.mjs +6 -6
  205. package/dist/functions/BaseFunctionBuilder.cjs +2 -2
  206. package/dist/functions/BaseFunctionBuilder.d.cts +2 -2
  207. package/dist/functions/BaseFunctionBuilder.d.mts +2 -2
  208. package/dist/functions/BaseFunctionBuilder.mjs +2 -2
  209. package/dist/functions/Function.cjs +2 -2
  210. package/dist/functions/Function.d.cts +2 -2
  211. package/dist/functions/Function.d.mts +2 -2
  212. package/dist/functions/Function.mjs +2 -2
  213. package/dist/functions/FunctionBuilder.cjs +4 -4
  214. package/dist/functions/FunctionBuilder.d.cts +4 -4
  215. package/dist/functions/FunctionBuilder.d.mts +4 -4
  216. package/dist/functions/FunctionBuilder.mjs +4 -4
  217. package/dist/functions/FunctionExecutionWrapper.cjs +5 -5
  218. package/dist/functions/FunctionExecutionWrapper.d.cts +3 -3
  219. package/dist/functions/FunctionExecutionWrapper.d.mts +3 -3
  220. package/dist/functions/FunctionExecutionWrapper.mjs +5 -5
  221. package/dist/functions/TestFunctionAdaptor.cjs +4 -4
  222. package/dist/functions/TestFunctionAdaptor.d.cts +2 -2
  223. package/dist/functions/TestFunctionAdaptor.d.mts +2 -2
  224. package/dist/functions/TestFunctionAdaptor.mjs +4 -4
  225. package/dist/functions/index.cjs +5 -5
  226. package/dist/functions/index.d.cts +5 -5
  227. package/dist/functions/index.d.mts +5 -5
  228. package/dist/functions/index.mjs +5 -5
  229. package/dist/functions-BYqZAob8.mjs +8 -0
  230. package/dist/{functions-HCoZ4YKF.mjs.map → functions-BYqZAob8.mjs.map} +1 -1
  231. package/dist/{functions-yg097ymU.cjs → functions-D03lqK-r.cjs} +2 -2
  232. package/dist/{functions-yg097ymU.cjs.map → functions-D03lqK-r.cjs.map} +1 -1
  233. package/dist/{helpers-Cq6wjo7s.cjs → helpers-BApRyhly.cjs} +2 -2
  234. package/dist/{helpers-Cq6wjo7s.cjs.map → helpers-BApRyhly.cjs.map} +1 -1
  235. package/dist/{helpers-CHsIWAEx.mjs → helpers-BPDogwac.mjs} +2 -2
  236. package/dist/{helpers-CHsIWAEx.mjs.map → helpers-BPDogwac.mjs.map} +1 -1
  237. package/dist/{index-RtxMVjUZ.d.mts → index-CUg_hSq-.d.cts} +3 -3
  238. package/dist/index-D-a7e2gv.d.mts +9 -0
  239. package/dist/index.cjs +1 -1
  240. package/dist/index.d.cts +1 -1
  241. package/dist/index.d.mts +2 -2
  242. package/dist/index.mjs +1 -1
  243. package/dist/{parseHonoQuery-DopC24vB.cjs → parseHonoQuery-CT8Cvin-.cjs} +1 -1
  244. package/dist/{parseHonoQuery-DopC24vB.cjs.map → parseHonoQuery-CT8Cvin-.cjs.map} +1 -1
  245. package/dist/{parseHonoQuery-znDKBhdE.mjs → parseHonoQuery-CwFKw2ua.mjs} +1 -1
  246. package/dist/{parseHonoQuery-znDKBhdE.mjs.map → parseHonoQuery-CwFKw2ua.mjs.map} +1 -1
  247. package/dist/{parseQueryParams-BJaRh3OB.mjs → parseQueryParams-CHINupbZ.mjs} +1 -1
  248. package/dist/{parseQueryParams-BJaRh3OB.mjs.map → parseQueryParams-CHINupbZ.mjs.map} +1 -1
  249. package/dist/{parseQueryParams-BzPop4I1.cjs → parseQueryParams-CwvXXwkW.cjs} +1 -1
  250. package/dist/{parseQueryParams-BzPop4I1.cjs.map → parseQueryParams-CwvXXwkW.cjs.map} +1 -1
  251. package/dist/processAudits-BFokHhCO.cjs +174 -0
  252. package/dist/processAudits-BFokHhCO.cjs.map +1 -0
  253. package/dist/processAudits-DfcB-X-4.mjs +156 -0
  254. package/dist/processAudits-DfcB-X-4.mjs.map +1 -0
  255. package/dist/publisher.d.cts +1 -1
  256. package/dist/publisher.d.mts +1 -1
  257. package/dist/subscribers/AWSLambdaSubscriberAdaptor.cjs +1 -1
  258. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.cts +3 -3
  259. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.mts +3 -3
  260. package/dist/subscribers/AWSLambdaSubscriberAdaptor.mjs +1 -1
  261. package/dist/subscribers/Subscriber.cjs +2 -2
  262. package/dist/subscribers/Subscriber.d.cts +2 -2
  263. package/dist/subscribers/Subscriber.d.mts +2 -2
  264. package/dist/subscribers/Subscriber.mjs +2 -2
  265. package/dist/subscribers/SubscriberBuilder.cjs +3 -3
  266. package/dist/subscribers/SubscriberBuilder.d.cts +3 -3
  267. package/dist/subscribers/SubscriberBuilder.d.mts +3 -3
  268. package/dist/subscribers/SubscriberBuilder.mjs +3 -3
  269. package/dist/subscribers/index.cjs +3 -3
  270. package/dist/subscribers/index.d.cts +5 -5
  271. package/dist/subscribers/index.d.mts +5 -5
  272. package/dist/subscribers/index.mjs +3 -3
  273. package/dist/{types-CVq20-fE.d.mts → types-DKf0juBf.d.mts} +1 -1
  274. package/dist/types.d.mts +1 -1
  275. package/package.json +14 -10
  276. package/src/Construct.ts +8 -0
  277. package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +88 -19
  278. package/src/endpoints/Endpoint.ts +66 -13
  279. package/src/endpoints/EndpointBuilder.ts +183 -19
  280. package/src/endpoints/HonoEndpointAdaptor.ts +114 -33
  281. package/src/endpoints/TestEndpointAdaptor.ts +96 -21
  282. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +8 -0
  283. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +29 -0
  284. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +626 -0
  285. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +9 -0
  286. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +718 -0
  287. package/src/endpoints/__tests__/Endpoint.spec.ts +19 -0
  288. package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +424 -0
  289. package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +685 -0
  290. package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +632 -0
  291. package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +8 -0
  292. package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +678 -0
  293. package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +4 -0
  294. package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +25 -0
  295. package/src/endpoints/audit.ts +87 -0
  296. package/src/endpoints/index.ts +1 -0
  297. package/src/endpoints/processAudits.ts +339 -0
  298. package/src/functions/BaseFunctionBuilder.ts +50 -7
  299. package/src/functions/Function.ts +13 -9
  300. package/src/functions/FunctionBuilder.ts +78 -14
  301. package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +43 -2
  302. package/dist/AmazonApiGatewayEndpointAdaptor-BTqB3c1_.cjs.map +0 -1
  303. package/dist/AmazonApiGatewayEndpointAdaptor-vi0D3dWg.mjs.map +0 -1
  304. package/dist/BaseFunctionBuilder-DSqF1r3a.mjs.map +0 -1
  305. package/dist/BaseFunctionBuilder-bTDKP7bd.cjs.map +0 -1
  306. package/dist/Construct-XCGKof_O.cjs.map +0 -1
  307. package/dist/Construct-rZQg2yus.mjs.map +0 -1
  308. package/dist/Endpoint-BdIGWw1H.cjs.map +0 -1
  309. package/dist/Endpoint-ChzcIFdV.mjs.map +0 -1
  310. package/dist/EndpointBuilder-Cx6pUcCn.d.mts +0 -55
  311. package/dist/EndpointBuilder-Xka8ULR1.d.cts +0 -55
  312. package/dist/EndpointBuilder-dmMiNRm9.cjs.map +0 -1
  313. package/dist/EndpointBuilder-yo40Qkf_.mjs.map +0 -1
  314. package/dist/Function-Cl9fiR3a.mjs.map +0 -1
  315. package/dist/Function-DDaSfL_E.cjs.map +0 -1
  316. package/dist/FunctionBuilder-LQuBiqRc.cjs.map +0 -1
  317. package/dist/FunctionBuilder-vW12WFOw.mjs.map +0 -1
  318. package/dist/HonoEndpointAdaptor-Bc61IS6Q.cjs.map +0 -1
  319. package/dist/HonoEndpointAdaptor-NR3h5gml.mjs.map +0 -1
  320. package/dist/TestEndpointAdaptor-DA1D6l-U.cjs.map +0 -1
  321. package/dist/TestEndpointAdaptor-DpmNXp7G.mjs.map +0 -1
  322. package/dist/functions-HCoZ4YKF.mjs +0 -8
  323. package/dist/index-fiIGH95t.d.cts +0 -9
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-CVq20-fE.mjs";
1
+ import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-DKf0juBf.mjs";
2
2
  export { HttpMethod, LowerHttpMethod, RemoveUndefined };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/constructs",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,27 +59,31 @@
59
59
  "access": "public"
60
60
  },
61
61
  "dependencies": {
62
+ "fast-glob": "~3.3.3",
63
+ "lodash.compact": "~3.0.1",
64
+ "lodash.get": "~4.4.2",
62
65
  "lodash.pick": "~4.4.0",
63
66
  "lodash.set": "~4.3.2",
64
- "lodash.get": "~4.4.2",
65
67
  "lodash.uniqby": "~4.7.0",
66
- "lodash.compact": "~3.0.1",
67
68
  "openapi-types": "~12.1.3",
68
- "fast-glob": "~3.3.3",
69
+ "@geekmidas/cache": "0.0.7",
70
+ "@geekmidas/audit": "0.0.1",
71
+ "@geekmidas/logger": "0.0.1",
72
+ "@geekmidas/rate-limit": "0.1.0",
69
73
  "@geekmidas/schema": "0.0.2",
70
74
  "@geekmidas/services": "0.0.1",
71
- "@geekmidas/errors": "0.0.1",
72
- "@geekmidas/logger": "0.0.1",
73
- "@geekmidas/cache": "0.0.7",
74
75
  "@geekmidas/events": "0.0.2",
75
- "@geekmidas/rate-limit": "0.1.0"
76
+ "@geekmidas/errors": "0.0.1"
76
77
  },
77
78
  "devDependencies": {
79
+ "@types/lodash.compact": "~3.0.9",
80
+ "@types/lodash.get": "~4.4.9",
78
81
  "@types/lodash.pick": "~4.4.9",
79
82
  "@types/lodash.set": "~4.3.9",
80
- "@types/lodash.get": "~4.4.9",
81
83
  "@types/lodash.uniqby": "~4.7.9",
82
- "@types/lodash.compact": "~3.0.9",
84
+ "@types/pg": "~8.15.6",
85
+ "kysely": "~0.28.8",
86
+ "pg": "~8.16.3",
83
87
  "zod": "~4.1.12",
84
88
  "@geekmidas/testkit": "0.0.17"
85
89
  },
package/src/Construct.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { AuditStorage } from '@geekmidas/audit';
1
2
  import { SnifferEnvironmentParser } from '@geekmidas/envkit/sniffer';
2
3
  import type { EventPublisher, MappedEvent } from '@geekmidas/events';
3
4
  import type { Logger } from '@geekmidas/logger';
@@ -15,6 +16,8 @@ export abstract class Construct<
15
16
  T extends EventPublisher<any> | undefined = undefined,
16
17
  OutSchema extends StandardSchemaV1 | undefined = undefined,
17
18
  TServices extends Service[] = [],
19
+ TAuditStorageServiceName extends string = string,
20
+ TAuditStorage extends AuditStorage | undefined = undefined,
18
21
  > {
19
22
  constructor(
20
23
  public readonly type: ConstructType,
@@ -26,6 +29,10 @@ export abstract class Construct<
26
29
  public outputSchema?: OutSchema,
27
30
  public readonly timeout?: number,
28
31
  public readonly memorySize?: number,
32
+ public readonly auditorStorageService?: Service<
33
+ TAuditStorageServiceName,
34
+ TAuditStorage
35
+ >,
29
36
  ) {}
30
37
 
31
38
  /**
@@ -53,6 +60,7 @@ export abstract class Construct<
53
60
  const services: Service[] = compact([
54
61
  ...this.services,
55
62
  this.publisherService,
63
+ this.auditorStorageService,
56
64
  ]);
57
65
 
58
66
  try {
@@ -1,3 +1,4 @@
1
+ import type { AuditableAction, Auditor, AuditStorage } from '@geekmidas/audit';
1
2
  import type { Logger } from '@geekmidas/logger';
2
3
  import type { StandardSchemaV1 } from '@standard-schema/spec';
3
4
  import type { HttpMethod } from '../types';
@@ -29,6 +30,12 @@ import type {
29
30
  InferStandardSchema,
30
31
  } from '@geekmidas/schema';
31
32
  import { publishConstructEvents } from '../publisher';
33
+ import {
34
+ type AuditExecutionContext,
35
+ createAuditContext,
36
+ executeWithAuditTransaction,
37
+ } from './processAudits';
38
+ import type { MappedAudit } from './audit';
32
39
 
33
40
  // Helper function to publish events
34
41
 
@@ -46,6 +53,12 @@ export abstract class AmazonApiGatewayEndpoint<
46
53
  TSession = unknown,
47
54
  TEventPublisher extends EventPublisher<any> | undefined = undefined,
48
55
  TEventPublisherServiceName extends string = string,
56
+ TAuditStorage extends AuditStorage | undefined = undefined,
57
+ TAuditStorageServiceName extends string = string,
58
+ TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
59
+ string,
60
+ unknown
61
+ >,
49
62
  > {
50
63
  constructor(
51
64
  protected envParser: EnvironmentParser<{}>,
@@ -58,7 +71,10 @@ export abstract class AmazonApiGatewayEndpoint<
58
71
  TLogger,
59
72
  TSession,
60
73
  TEventPublisher,
61
- TEventPublisherServiceName
74
+ TEventPublisherServiceName,
75
+ TAuditStorage,
76
+ TAuditStorageServiceName,
77
+ TAuditAction
62
78
  >,
63
79
  ) {}
64
80
 
@@ -199,12 +215,15 @@ export abstract class AmazonApiGatewayEndpoint<
199
215
  const statusCode = req.response?.statusCode ?? this.endpoint.status;
200
216
 
201
217
  // Only publish events on successful responses (2xx status codes)
218
+ // Note: Audits are processed inside the handler's transaction
202
219
  if (Endpoint.isSuccessStatus(statusCode)) {
203
220
  const logger = event.logger as TLogger;
204
221
  const serviceDiscovery = ServiceDiscovery.getInstance<
205
222
  ServiceRecord<TServices>,
206
223
  TLogger
207
224
  >(logger, this.envParser);
225
+
226
+ // Publish events
208
227
  await publishConstructEvents(
209
228
  this.endpoint,
210
229
  response,
@@ -220,33 +239,83 @@ export abstract class AmazonApiGatewayEndpoint<
220
239
  event: Event<TEvent, TInput, TServices, TLogger, TSession>,
221
240
  ) {
222
241
  const input = this.endpoint.refineInput(event);
223
-
224
- const responseBuilder = new ResponseBuilder();
225
- const response = await this.endpoint.handler(
242
+ const logger = event.logger as TLogger;
243
+ const serviceDiscovery = ServiceDiscovery.getInstance<
244
+ ServiceRecord<TServices>,
245
+ TLogger
246
+ >(logger, this.envParser);
247
+
248
+ // Create audit context if audit storage is configured
249
+ const auditContext = await createAuditContext(
250
+ this.endpoint,
251
+ serviceDiscovery,
252
+ logger,
226
253
  {
254
+ session: event.session,
227
255
  header: event.header,
228
256
  cookie: event.cookie,
229
- logger: event.logger,
230
- services: event.services,
231
- session: event.session,
232
- ...input,
257
+ services: event.services as Record<string, unknown>,
233
258
  },
234
- responseBuilder,
235
259
  );
236
260
 
237
- // Check if response has metadata
238
- let data = response;
239
- let metadata = responseBuilder.getMetadata();
240
-
241
- if (Endpoint.hasMetadata(response)) {
242
- data = response.data;
243
- metadata = response.metadata;
261
+ // Warn if declarative audits are configured but no audit storage
262
+ const audits = this.endpoint.audits as MappedAudit<TAuditAction, TOutSchema>[];
263
+ if (!auditContext && audits?.length) {
264
+ logger.warn('No auditor storage service available');
244
265
  }
245
266
 
246
- const output = this.endpoint.outputSchema
247
- ? await this.endpoint.parseOutput(data)
248
- : undefined;
267
+ // Execute handler with automatic audit transaction support
268
+ const result = await executeWithAuditTransaction(
269
+ auditContext,
270
+ async (auditor) => {
271
+ const responseBuilder = new ResponseBuilder();
272
+ const response = await this.endpoint.handler(
273
+ {
274
+ header: event.header,
275
+ cookie: event.cookie,
276
+ logger: event.logger,
277
+ services: event.services,
278
+ session: event.session,
279
+ auditor,
280
+ ...input,
281
+ } as any,
282
+ responseBuilder,
283
+ );
284
+
285
+ // Check if response has metadata
286
+ let data = response;
287
+ let metadata = responseBuilder.getMetadata();
288
+
289
+ if (Endpoint.hasMetadata(response)) {
290
+ data = response.data;
291
+ metadata = response.metadata;
292
+ }
293
+
294
+ const output = this.endpoint.outputSchema
295
+ ? await this.endpoint.parseOutput(data)
296
+ : undefined;
297
+
298
+ return { output, metadata, responseBuilder };
299
+ },
300
+ // Process declarative audits after handler (inside transaction)
301
+ async (result, auditor) => {
302
+ if (!audits?.length) return;
303
+
304
+ for (const audit of audits) {
305
+ if (audit.when && !audit.when(result.output as any)) {
306
+ continue;
307
+ }
308
+ const payload = audit.payload(result.output as any);
309
+ const entityId = audit.entityId?.(result.output as any);
310
+ auditor.audit(audit.type as any, payload as any, {
311
+ table: audit.table,
312
+ entityId,
313
+ });
314
+ }
315
+ },
316
+ );
249
317
 
318
+ const { output, metadata } = result;
250
319
  const body = output !== undefined ? JSON.stringify(output) : undefined;
251
320
 
252
321
  // Store response for middleware access
@@ -1,19 +1,10 @@
1
- import type { Logger } from '@geekmidas/logger';
2
- import type { StandardSchemaV1 } from '@standard-schema/spec';
3
- import pick from 'lodash.pick';
4
- import set from 'lodash.set';
5
- import type { OpenAPIV3_1 } from 'openapi-types';
6
-
7
- import type { Service, ServiceRecord } from '@geekmidas/services';
8
- import type { Authorizer } from './Authorizer';
9
- import { ConstructType } from '../Construct';
10
- import { Function, type FunctionHandler } from '../functions';
11
-
1
+ import type { AuditableAction, Auditor, AuditStorage } from '@geekmidas/audit';
12
2
  import type {
13
3
  EventPublisher,
14
4
  ExtractPublisherMessage,
15
5
  MappedEvent,
16
6
  } from '@geekmidas/events';
7
+ import type { Logger } from '@geekmidas/logger';
17
8
  import type { RateLimitConfig } from '@geekmidas/rate-limit';
18
9
  import type {
19
10
  InferComposableStandardSchema,
@@ -28,7 +19,16 @@ import {
28
19
  type OpenApiSchemaOptions,
29
20
  buildOpenApiSchema,
30
21
  } from '@geekmidas/schema/openapi';
22
+ import type { Service, ServiceRecord } from '@geekmidas/services';
23
+ import type { StandardSchemaV1 } from '@standard-schema/spec';
24
+ import pick from 'lodash.pick';
25
+ import set from 'lodash.set';
26
+ import type { OpenAPIV3_1 } from 'openapi-types';
27
+ import { ConstructType } from '../Construct';
28
+ import { Function, type FunctionHandler } from '../functions';
31
29
  import type { HttpMethod, LowerHttpMethod, RemoveUndefined } from '../types';
30
+ import type { ActorExtractor, MappedAudit } from './audit';
31
+ import type { Authorizer } from './Authorizer';
32
32
 
33
33
  /**
34
34
  * Represents an HTTP endpoint that can handle requests with type-safe input/output validation,
@@ -65,6 +65,12 @@ export class Endpoint<
65
65
  TSession = unknown,
66
66
  TEventPublisher extends EventPublisher<any> | undefined = undefined,
67
67
  TEventPublisherServiceName extends string = string,
68
+ TAuditStorage extends AuditStorage | undefined = undefined,
69
+ TAuditStorageServiceName extends string = string,
70
+ TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
71
+ string,
72
+ unknown
73
+ >,
68
74
  > extends Function<
69
75
  TInput,
70
76
  TServices,
@@ -72,7 +78,9 @@ export class Endpoint<
72
78
  OutSchema,
73
79
  FunctionHandler<TInput, TServices, TLogger, OutSchema>,
74
80
  TEventPublisher,
75
- TEventPublisherServiceName
81
+ TEventPublisherServiceName,
82
+ TAuditStorage,
83
+ TAuditStorageServiceName
76
84
  > {
77
85
  operationId?: string;
78
86
  /** The route path pattern with parameter placeholders */
@@ -96,6 +104,10 @@ export class Endpoint<
96
104
  public rateLimit?: RateLimitConfig;
97
105
  /** Optional authorizer for this endpoint */
98
106
  public authorizer?: Authorizer;
107
+ /** Optional actor extractor for audit records */
108
+ public actorExtractor?: ActorExtractor<TServices, TSession, TLogger>;
109
+ /** Declarative audit definitions */
110
+ public audits: MappedAudit<TAuditAction, OutSchema>[] = [];
99
111
  /** The endpoint handler function */
100
112
  private endpointFn!: EndpointHandler<
101
113
  TInput,
@@ -335,6 +347,7 @@ export class Endpoint<
335
347
  header: ctx.header,
336
348
  cookie: ctx.cookie,
337
349
  session: ctx.session,
350
+ auditor: ctx.auditor,
338
351
  } as EndpointContext<TInput, TServices, TLogger, TSession>,
339
352
  response,
340
353
  );
@@ -540,6 +553,9 @@ export class Endpoint<
540
553
  publisherService,
541
554
  events,
542
555
  authorizer,
556
+ auditorStorageService,
557
+ actorExtractor,
558
+ audits,
543
559
  }: EndpointOptions<
544
560
  TRoute,
545
561
  TMethod,
@@ -550,7 +566,10 @@ export class Endpoint<
550
566
  TSession,
551
567
  OutSchema,
552
568
  TEventPublisher,
553
- TEventPublisherServiceName
569
+ TEventPublisherServiceName,
570
+ TAuditStorage,
571
+ TAuditStorageServiceName,
572
+ TAuditAction
554
573
  >) {
555
574
  super(
556
575
  fn as unknown as FunctionHandler<TInput, TServices, TLogger, OutSchema>,
@@ -563,6 +582,7 @@ export class Endpoint<
563
582
  publisherService,
564
583
  events,
565
584
  memorySize,
585
+ auditorStorageService,
566
586
  );
567
587
 
568
588
  this.route = route;
@@ -587,6 +607,14 @@ export class Endpoint<
587
607
  if (authorizer) {
588
608
  this.authorizer = authorizer;
589
609
  }
610
+
611
+ if (actorExtractor) {
612
+ this.actorExtractor = actorExtractor;
613
+ }
614
+
615
+ if (audits) {
616
+ this.audits = audits;
617
+ }
590
618
  }
591
619
  }
592
620
 
@@ -638,6 +666,12 @@ export interface EndpointOptions<
638
666
  OutSchema extends StandardSchemaV1 | undefined = undefined,
639
667
  TEventPublisher extends EventPublisher<any> | undefined = undefined,
640
668
  TEventPublisherServiceName extends string = string,
669
+ TAuditStorage extends AuditStorage | undefined = undefined,
670
+ TAuditStorageServiceName extends string = string,
671
+ TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
672
+ string,
673
+ unknown
674
+ >,
641
675
  > {
642
676
  /** The route path with parameter placeholders */
643
677
  route: TRoute;
@@ -677,6 +711,14 @@ export interface EndpointOptions<
677
711
  events?: MappedEvent<TEventPublisher, OutSchema>[];
678
712
  /** Optional authorizer configuration */
679
713
  authorizer?: Authorizer;
714
+ /**
715
+ * Auditor storage service for persisting audit records from this endpoint
716
+ */
717
+ auditorStorageService?: Service<TAuditStorageServiceName, TAuditStorage>;
718
+ /** Optional actor extractor function for audit records */
719
+ actorExtractor?: ActorExtractor<TServices, TSession, TLogger>;
720
+ /** Declarative audit definitions */
721
+ audits?: MappedAudit<TAuditAction, OutSchema>[];
680
722
  }
681
723
 
682
724
  /**
@@ -940,6 +982,10 @@ export type EndpointContext<
940
982
  TServices extends Service[] = [],
941
983
  TLogger extends Logger = Logger,
942
984
  TSession = unknown,
985
+ TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
986
+ string,
987
+ unknown
988
+ >,
943
989
  > = {
944
990
  /** Injected service instances */
945
991
  services: ServiceRecord<TServices>;
@@ -951,6 +997,13 @@ export type EndpointContext<
951
997
  cookie: CookieFn;
952
998
  /** Session data extracted by getSession */
953
999
  session: TSession;
1000
+ /**
1001
+ * Auditor instance for recording audit events.
1002
+ * Only present when audit storage is configured on the endpoint.
1003
+ * When a transactional database is used for audit storage,
1004
+ * the auditor is pre-configured with the transaction context.
1005
+ */
1006
+ auditor?: Auditor<TAuditAction>;
954
1007
  } & InferComposableStandardSchema<Input>;
955
1008
 
956
1009
  /**