@geekmidas/constructs 0.0.7 → 0.0.9

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 (284) hide show
  1. package/dist/{AWSLambdaFunction-qA5LqPsv.cjs → AWSLambdaFunction-CMLZ3GaC.cjs} +3 -3
  2. package/dist/{AWSLambdaFunction-qA5LqPsv.cjs.map → AWSLambdaFunction-CMLZ3GaC.cjs.map} +1 -1
  3. package/dist/{AWSLambdaFunction-CANc3Qo2.d.mts → AWSLambdaFunction-D5V3YVqv.d.cts} +5 -5
  4. package/dist/{AWSLambdaFunction-CwagvPG3.d.cts → AWSLambdaFunction-_J0MjixY.d.mts} +5 -5
  5. package/dist/{AWSLambdaFunction-DWIZYsCy.mjs → AWSLambdaFunction-egVcP17n.mjs} +3 -3
  6. package/dist/{AWSLambdaFunction-DWIZYsCy.mjs.map → AWSLambdaFunction-egVcP17n.mjs.map} +1 -1
  7. package/dist/{AWSLambdaSubscriberAdaptor-QKVxR6qh.d.cts → AWSLambdaSubscriberAdaptor-DjG1ME3P.d.mts} +4 -4
  8. package/dist/{AWSLambdaSubscriberAdaptor-C6JYIZxn.d.mts → AWSLambdaSubscriberAdaptor-J_pSz6pu.d.cts} +4 -4
  9. package/dist/{AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.d.cts → AmazonApiGatewayEndpointAdaptor-BnNd8tCz.d.cts} +2 -2
  10. package/dist/{AmazonApiGatewayEndpointAdaptor-BrB3RfbI.d.mts → AmazonApiGatewayEndpointAdaptor-C-17dUai.d.mts} +2 -2
  11. package/dist/{AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs → AmazonApiGatewayEndpointAdaptor-CQLjGSJe.mjs} +2 -2
  12. package/dist/{AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs.map → AmazonApiGatewayEndpointAdaptor-CQLjGSJe.mjs.map} +1 -1
  13. package/dist/{AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs → AmazonApiGatewayEndpointAdaptor-DPaV_5wG.cjs} +2 -2
  14. package/dist/{AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs.map → AmazonApiGatewayEndpointAdaptor-DPaV_5wG.cjs.map} +1 -1
  15. package/dist/{AmazonApiGatewayV1EndpointAdaptor-Bd-o8ese.d.cts → AmazonApiGatewayV1EndpointAdaptor-BC-a2tt3.d.cts} +3 -3
  16. package/dist/{AmazonApiGatewayV1EndpointAdaptor-BtNXt0-4.d.mts → AmazonApiGatewayV1EndpointAdaptor-Cjud-a6p.d.mts} +3 -3
  17. package/dist/{AmazonApiGatewayV1EndpointAdaptor-24g3dLn5.mjs → AmazonApiGatewayV1EndpointAdaptor-DEBcyZe0.mjs} +2 -2
  18. package/dist/{AmazonApiGatewayV1EndpointAdaptor-24g3dLn5.mjs.map → AmazonApiGatewayV1EndpointAdaptor-DEBcyZe0.mjs.map} +1 -1
  19. package/dist/{AmazonApiGatewayV1EndpointAdaptor-D4eZ-fx5.cjs → AmazonApiGatewayV1EndpointAdaptor-DkFcSRwT.cjs} +2 -2
  20. package/dist/{AmazonApiGatewayV1EndpointAdaptor-D4eZ-fx5.cjs.map → AmazonApiGatewayV1EndpointAdaptor-DkFcSRwT.cjs.map} +1 -1
  21. package/dist/{AmazonApiGatewayV2EndpointAdaptor-Cc40RThv.mjs → AmazonApiGatewayV2EndpointAdaptor-BB7t7LE2.mjs} +2 -2
  22. package/dist/{AmazonApiGatewayV2EndpointAdaptor-Cc40RThv.mjs.map → AmazonApiGatewayV2EndpointAdaptor-BB7t7LE2.mjs.map} +1 -1
  23. package/dist/{AmazonApiGatewayV2EndpointAdaptor-J6tACl-N.cjs → AmazonApiGatewayV2EndpointAdaptor-BQ21ry6s.cjs} +2 -2
  24. package/dist/{AmazonApiGatewayV2EndpointAdaptor-J6tACl-N.cjs.map → AmazonApiGatewayV2EndpointAdaptor-BQ21ry6s.cjs.map} +1 -1
  25. package/dist/{AmazonApiGatewayV2EndpointAdaptor-DAJdtgek.d.mts → AmazonApiGatewayV2EndpointAdaptor-C31Xcwmc.d.mts} +3 -3
  26. package/dist/{AmazonApiGatewayV2EndpointAdaptor-DX-Uci5w.d.cts → AmazonApiGatewayV2EndpointAdaptor-zNFUPxSY.d.cts} +3 -3
  27. package/dist/Authorizer-Bbk9ziuG.d.mts +29 -0
  28. package/dist/Authorizer-iXsSB600.d.cts +29 -0
  29. package/dist/{BaseFunctionBuilder-DtO4Nwxm.cjs → BaseFunctionBuilder-B-kdtkzI.cjs} +2 -2
  30. package/dist/{BaseFunctionBuilder-DtO4Nwxm.cjs.map → BaseFunctionBuilder-B-kdtkzI.cjs.map} +1 -1
  31. package/dist/{BaseFunctionBuilder-5QCHkchp.d.cts → BaseFunctionBuilder-C4ZJPkIZ.d.cts} +2 -2
  32. package/dist/{BaseFunctionBuilder-Dda7AiID.d.mts → BaseFunctionBuilder-CxBX0arJ.d.mts} +2 -2
  33. package/dist/{BaseFunctionBuilder-BPE9JBbT.mjs → BaseFunctionBuilder-DOhEn5Ce.mjs} +2 -2
  34. package/dist/{BaseFunctionBuilder-BPE9JBbT.mjs.map → BaseFunctionBuilder-DOhEn5Ce.mjs.map} +1 -1
  35. package/dist/{Construct-BbKCIPQm.mjs → Construct-B-O9OBS1.mjs} +4 -2
  36. package/dist/Construct-B-O9OBS1.mjs.map +1 -0
  37. package/dist/{Construct-BSEs6uwW.cjs → Construct-BtfN2fcm.cjs} +4 -2
  38. package/dist/Construct-BtfN2fcm.cjs.map +1 -0
  39. package/dist/{Construct-Bm-PSO2V.d.cts → Construct-ci5u8Xnu.d.cts} +4 -2
  40. package/dist/{Construct-DdyYENBD.d.mts → Construct-zhmcmIdY.d.mts} +4 -2
  41. package/dist/Construct.cjs +1 -1
  42. package/dist/Construct.d.cts +1 -1
  43. package/dist/Construct.d.mts +1 -1
  44. package/dist/Construct.mjs +1 -1
  45. package/dist/{Cron-BxMXmn4t.d.cts → Cron-ByNYsQDH.d.mts} +4 -4
  46. package/dist/{Cron-D6hnZLk7.mjs → Cron-D8DPUXBd.mjs} +5 -5
  47. package/dist/Cron-D8DPUXBd.mjs.map +1 -0
  48. package/dist/{Cron-NDBlJhb3.d.mts → Cron-DkPL-Fms.d.cts} +4 -4
  49. package/dist/{Cron-CmZ6esMM.cjs → Cron-sOrsPuQj.cjs} +5 -5
  50. package/dist/Cron-sOrsPuQj.cjs.map +1 -0
  51. package/dist/{CronBuilder-C6K5AbIO.d.cts → CronBuilder-BknVTWLE.d.mts} +6 -5
  52. package/dist/{CronBuilder-s5x8V8hH.d.mts → CronBuilder-BqTTozUi.d.cts} +6 -5
  53. package/dist/{CronBuilder-Dfv5JguE.mjs → CronBuilder-ChyrDobL.mjs} +10 -5
  54. package/dist/CronBuilder-ChyrDobL.mjs.map +1 -0
  55. package/dist/{CronBuilder-Di7QK8Rt.cjs → CronBuilder-Kvz1GiUp.cjs} +10 -5
  56. package/dist/CronBuilder-Kvz1GiUp.cjs.map +1 -0
  57. package/dist/{Endpoint-COGAflGh.cjs → Endpoint-Bghj0fiL.cjs} +21 -12
  58. package/dist/Endpoint-Bghj0fiL.cjs.map +1 -0
  59. package/dist/{Endpoint-C7jPJzAH.d.mts → Endpoint-C16whGI-.d.mts} +45 -13
  60. package/dist/{Endpoint-DLLZvqoh.mjs → Endpoint-DCJz2VQ_.mjs} +21 -12
  61. package/dist/Endpoint-DCJz2VQ_.mjs.map +1 -0
  62. package/dist/{Endpoint-XUMNAXYy.d.cts → Endpoint-zHPjZ35J.d.cts} +45 -13
  63. package/dist/{EndpointBuilder-t6fVEKBH.d.cts → EndpointBuilder-B5l7zQU1.d.cts} +18 -12
  64. package/dist/{EndpointBuilder-oXO_ka1-.mjs → EndpointBuilder-B6xIAruu.mjs} +28 -5
  65. package/dist/EndpointBuilder-B6xIAruu.mjs.map +1 -0
  66. package/dist/{EndpointBuilder-CFtWQhcv.d.mts → EndpointBuilder-BzqR0xvt.d.mts} +18 -12
  67. package/dist/{EndpointBuilder-FJktpPOu.cjs → EndpointBuilder-i7-4ieP_.cjs} +28 -5
  68. package/dist/EndpointBuilder-i7-4ieP_.cjs.map +1 -0
  69. package/dist/{EndpointFactory-Kk1tpifs.cjs → EndpointFactory-CYTBPu_G.cjs} +41 -10
  70. package/dist/EndpointFactory-CYTBPu_G.cjs.map +1 -0
  71. package/dist/{EndpointFactory-eG8bDhOh.mjs → EndpointFactory-CYuT-nt-.mjs} +41 -10
  72. package/dist/EndpointFactory-CYuT-nt-.mjs.map +1 -0
  73. package/dist/{EndpointFactory-DBRGrXAy.d.mts → EndpointFactory-KkyIOE62.d.cts} +29 -21
  74. package/dist/{EndpointFactory-DInjHvFR.d.cts → EndpointFactory-VnSAdwdv.d.mts} +29 -21
  75. package/dist/{Function-CbO2NZx-.cjs → Function-BCEAZFyL.cjs} +4 -5
  76. package/dist/Function-BCEAZFyL.cjs.map +1 -0
  77. package/dist/{Function-BP58p9Mp.d.cts → Function-BbLYIKLL.d.cts} +3 -4
  78. package/dist/{Function-C5mW-38v.mjs → Function-CmfMIDoS.mjs} +4 -5
  79. package/dist/Function-CmfMIDoS.mjs.map +1 -0
  80. package/dist/{Function-C98H68DW.d.mts → Function-DFRZZCC-.d.mts} +3 -4
  81. package/dist/{FunctionBuilder-DuOeWCAl.cjs → FunctionBuilder-BqivB_cc.cjs} +11 -5
  82. package/dist/FunctionBuilder-BqivB_cc.cjs.map +1 -0
  83. package/dist/{FunctionBuilder-BS1KgxA_.d.cts → FunctionBuilder-DdGjpiFT.d.cts} +6 -4
  84. package/dist/{FunctionBuilder-DBwR7jg7.d.mts → FunctionBuilder-DuktGyZc.d.mts} +6 -4
  85. package/dist/{FunctionBuilder-CosgPmMl.mjs → FunctionBuilder-QvqvEyFa.mjs} +11 -5
  86. package/dist/FunctionBuilder-QvqvEyFa.mjs.map +1 -0
  87. package/dist/{FunctionExecutionWrapper-B0V7V8YS.d.mts → FunctionExecutionWrapper-CAHR74yI.d.mts} +2 -2
  88. package/dist/{FunctionExecutionWrapper-Bx-Dl-2a.d.cts → FunctionExecutionWrapper-CRYi047B.d.cts} +2 -2
  89. package/dist/{FunctionExecutionWrapper-XGrSAAPD.mjs → FunctionExecutionWrapper-JsZIHhcl.mjs} +2 -2
  90. package/dist/{FunctionExecutionWrapper-XGrSAAPD.mjs.map → FunctionExecutionWrapper-JsZIHhcl.mjs.map} +1 -1
  91. package/dist/{FunctionExecutionWrapper-CElXEjPe.cjs → FunctionExecutionWrapper-TJxf9p4v.cjs} +2 -2
  92. package/dist/{FunctionExecutionWrapper-CElXEjPe.cjs.map → FunctionExecutionWrapper-TJxf9p4v.cjs.map} +1 -1
  93. package/dist/{HonoEndpointAdaptor-BlT1rWHV.mjs → HonoEndpointAdaptor-8eYrSFRn.mjs} +33 -16
  94. package/dist/HonoEndpointAdaptor-8eYrSFRn.mjs.map +1 -0
  95. package/dist/{HonoEndpointAdaptor-BrbM9vxd.d.cts → HonoEndpointAdaptor-DAsZoX2a.d.mts} +9 -8
  96. package/dist/{HonoEndpointAdaptor-CxcYKdzT.d.mts → HonoEndpointAdaptor-lYw6EN1Q.d.cts} +7 -6
  97. package/dist/{HonoEndpointAdaptor-Ds433Q8w.cjs → HonoEndpointAdaptor-vWSpXdNp.cjs} +20 -3
  98. package/dist/HonoEndpointAdaptor-vWSpXdNp.cjs.map +1 -0
  99. package/dist/{Subscriber-CSt7EOlT.cjs → Subscriber-BdiqU7da.cjs} +2 -2
  100. package/dist/{Subscriber-CSt7EOlT.cjs.map → Subscriber-BdiqU7da.cjs.map} +1 -1
  101. package/dist/{Subscriber-BoFm12i_.d.cts → Subscriber-Cy28j8MS.d.cts} +2 -2
  102. package/dist/{Subscriber-DkCDcTUL.mjs → Subscriber-bJSqvjdK.mjs} +2 -2
  103. package/dist/{Subscriber-DkCDcTUL.mjs.map → Subscriber-bJSqvjdK.mjs.map} +1 -1
  104. package/dist/{Subscriber-BxH6n8zQ.d.mts → Subscriber-g3IWM1_d.d.mts} +2 -2
  105. package/dist/{SubscriberBuilder-BpSDPzBz.d.mts → SubscriberBuilder-BzK8kc2a.d.cts} +3 -3
  106. package/dist/{SubscriberBuilder-Bn9Hyi28.mjs → SubscriberBuilder-CyCyjT6L.mjs} +2 -2
  107. package/dist/{SubscriberBuilder-Bn9Hyi28.mjs.map → SubscriberBuilder-CyCyjT6L.mjs.map} +1 -1
  108. package/dist/{SubscriberBuilder-RsiOmnwq.cjs → SubscriberBuilder-JTJcIZYy.cjs} +2 -2
  109. package/dist/{SubscriberBuilder-RsiOmnwq.cjs.map → SubscriberBuilder-JTJcIZYy.cjs.map} +1 -1
  110. package/dist/{SubscriberBuilder-DgljKtYu.d.cts → SubscriberBuilder-YjQ7qIpQ.d.mts} +3 -3
  111. package/dist/{TestEndpointAdaptor-Ct4I-gDo.mjs → TestEndpointAdaptor-BevV2LLd.mjs} +2 -2
  112. package/dist/{TestEndpointAdaptor-Ct4I-gDo.mjs.map → TestEndpointAdaptor-BevV2LLd.mjs.map} +1 -1
  113. package/dist/{TestEndpointAdaptor-vboVyJ0w.d.mts → TestEndpointAdaptor-DGWuai69.d.mts} +2 -2
  114. package/dist/{TestEndpointAdaptor-FJUob2W_.cjs → TestEndpointAdaptor-DupnzEnS.cjs} +2 -2
  115. package/dist/{TestEndpointAdaptor-FJUob2W_.cjs.map → TestEndpointAdaptor-DupnzEnS.cjs.map} +1 -1
  116. package/dist/{TestEndpointAdaptor-wwEaVHAt.d.cts → TestEndpointAdaptor-uXliWYjS.d.cts} +2 -2
  117. package/dist/adaptors/aws.cjs +11 -11
  118. package/dist/adaptors/aws.d.cts +14 -13
  119. package/dist/adaptors/aws.d.mts +14 -13
  120. package/dist/adaptors/aws.mjs +11 -11
  121. package/dist/adaptors/hono.cjs +8 -8
  122. package/dist/adaptors/hono.d.cts +8 -7
  123. package/dist/adaptors/hono.d.mts +8 -7
  124. package/dist/adaptors/hono.mjs +8 -8
  125. package/dist/adaptors/testing.cjs +7 -7
  126. package/dist/adaptors/testing.d.cts +8 -7
  127. package/dist/adaptors/testing.d.mts +8 -7
  128. package/dist/adaptors/testing.mjs +7 -7
  129. package/dist/crons/Cron.cjs +6 -6
  130. package/dist/crons/Cron.d.cts +6 -6
  131. package/dist/crons/Cron.d.mts +6 -6
  132. package/dist/crons/Cron.mjs +6 -6
  133. package/dist/crons/CronBuilder.cjs +7 -7
  134. package/dist/crons/CronBuilder.d.cts +7 -7
  135. package/dist/crons/CronBuilder.d.mts +7 -7
  136. package/dist/crons/CronBuilder.mjs +7 -7
  137. package/dist/crons/index.cjs +7 -7
  138. package/dist/crons/index.d.cts +11 -11
  139. package/dist/crons/index.d.mts +11 -11
  140. package/dist/crons/index.mjs +7 -7
  141. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +7 -7
  142. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +8 -7
  143. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +8 -7
  144. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +7 -7
  145. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +8 -8
  146. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +9 -8
  147. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +9 -8
  148. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +8 -8
  149. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +8 -8
  150. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +9 -8
  151. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +9 -8
  152. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +8 -8
  153. package/dist/endpoints/Authorizer.cjs +15 -0
  154. package/dist/endpoints/Authorizer.cjs.map +1 -0
  155. package/dist/endpoints/Authorizer.d.cts +2 -0
  156. package/dist/endpoints/Authorizer.d.mts +2 -0
  157. package/dist/endpoints/Authorizer.mjs +14 -0
  158. package/dist/endpoints/Authorizer.mjs.map +1 -0
  159. package/dist/endpoints/Endpoint.cjs +6 -6
  160. package/dist/endpoints/Endpoint.d.cts +7 -6
  161. package/dist/endpoints/Endpoint.d.mts +7 -6
  162. package/dist/endpoints/Endpoint.mjs +6 -6
  163. package/dist/endpoints/EndpointBuilder.cjs +7 -7
  164. package/dist/endpoints/EndpointBuilder.d.cts +8 -7
  165. package/dist/endpoints/EndpointBuilder.d.mts +8 -7
  166. package/dist/endpoints/EndpointBuilder.mjs +7 -7
  167. package/dist/endpoints/EndpointFactory.cjs +8 -8
  168. package/dist/endpoints/EndpointFactory.d.cts +9 -8
  169. package/dist/endpoints/EndpointFactory.d.mts +9 -8
  170. package/dist/endpoints/EndpointFactory.mjs +8 -8
  171. package/dist/endpoints/HonoEndpointAdaptor.cjs +8 -8
  172. package/dist/endpoints/HonoEndpointAdaptor.d.cts +8 -7
  173. package/dist/endpoints/HonoEndpointAdaptor.d.mts +8 -7
  174. package/dist/endpoints/HonoEndpointAdaptor.mjs +8 -8
  175. package/dist/endpoints/TestEndpointAdaptor.cjs +7 -7
  176. package/dist/endpoints/TestEndpointAdaptor.d.cts +8 -7
  177. package/dist/endpoints/TestEndpointAdaptor.d.mts +8 -7
  178. package/dist/endpoints/TestEndpointAdaptor.mjs +7 -7
  179. package/dist/endpoints/helpers.cjs +7 -7
  180. package/dist/endpoints/helpers.d.cts +7 -6
  181. package/dist/endpoints/helpers.d.mts +7 -6
  182. package/dist/endpoints/helpers.mjs +7 -7
  183. package/dist/endpoints/index.cjs +8 -8
  184. package/dist/endpoints/index.d.cts +11 -10
  185. package/dist/endpoints/index.d.mts +11 -10
  186. package/dist/endpoints/index.mjs +8 -8
  187. package/dist/functions/AWSLambdaFunction.cjs +6 -6
  188. package/dist/functions/AWSLambdaFunction.d.cts +4 -4
  189. package/dist/functions/AWSLambdaFunction.d.mts +4 -4
  190. package/dist/functions/AWSLambdaFunction.mjs +6 -6
  191. package/dist/functions/BaseFunctionBuilder.cjs +2 -2
  192. package/dist/functions/BaseFunctionBuilder.d.cts +2 -2
  193. package/dist/functions/BaseFunctionBuilder.d.mts +2 -2
  194. package/dist/functions/BaseFunctionBuilder.mjs +2 -2
  195. package/dist/functions/Function.cjs +2 -2
  196. package/dist/functions/Function.d.cts +2 -2
  197. package/dist/functions/Function.d.mts +2 -2
  198. package/dist/functions/Function.mjs +2 -2
  199. package/dist/functions/FunctionBuilder.cjs +4 -4
  200. package/dist/functions/FunctionBuilder.d.cts +4 -4
  201. package/dist/functions/FunctionBuilder.d.mts +4 -4
  202. package/dist/functions/FunctionBuilder.mjs +4 -4
  203. package/dist/functions/FunctionExecutionWrapper.cjs +5 -5
  204. package/dist/functions/FunctionExecutionWrapper.d.cts +3 -3
  205. package/dist/functions/FunctionExecutionWrapper.d.mts +3 -3
  206. package/dist/functions/FunctionExecutionWrapper.mjs +5 -5
  207. package/dist/functions/TestFunctionAdaptor.cjs +4 -4
  208. package/dist/functions/TestFunctionAdaptor.d.cts +2 -2
  209. package/dist/functions/TestFunctionAdaptor.d.mts +2 -2
  210. package/dist/functions/TestFunctionAdaptor.mjs +4 -4
  211. package/dist/functions/index.cjs +5 -5
  212. package/dist/functions/index.d.cts +5 -5
  213. package/dist/functions/index.d.mts +5 -5
  214. package/dist/functions/index.mjs +5 -5
  215. package/dist/{functions-DVDb5wEA.cjs → functions-B9mEg9D9.cjs} +2 -2
  216. package/dist/{functions-DVDb5wEA.cjs.map → functions-B9mEg9D9.cjs.map} +1 -1
  217. package/dist/functions-DcQZSOHg.mjs +8 -0
  218. package/dist/{functions-mM-jcphA.mjs.map → functions-DcQZSOHg.mjs.map} +1 -1
  219. package/dist/{helpers-go4jiRvV.cjs → helpers-BJrzAmhb.cjs} +2 -2
  220. package/dist/{helpers-go4jiRvV.cjs.map → helpers-BJrzAmhb.cjs.map} +1 -1
  221. package/dist/{helpers-CM0U-4Vk.mjs → helpers-D_UKinz8.mjs} +2 -2
  222. package/dist/{helpers-CM0U-4Vk.mjs.map → helpers-D_UKinz8.mjs.map} +1 -1
  223. package/dist/index-DQt3pQtF.d.mts +9 -0
  224. package/dist/index-Dq-LQIwK.d.cts +9 -0
  225. package/dist/index.cjs +1 -1
  226. package/dist/index.d.cts +1 -1
  227. package/dist/index.d.mts +1 -1
  228. package/dist/index.mjs +1 -1
  229. package/dist/publisher.d.cts +1 -1
  230. package/dist/publisher.d.mts +1 -1
  231. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.cts +3 -3
  232. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.mts +3 -3
  233. package/dist/subscribers/Subscriber.cjs +2 -2
  234. package/dist/subscribers/Subscriber.d.cts +2 -2
  235. package/dist/subscribers/Subscriber.d.mts +2 -2
  236. package/dist/subscribers/Subscriber.mjs +2 -2
  237. package/dist/subscribers/SubscriberBuilder.cjs +3 -3
  238. package/dist/subscribers/SubscriberBuilder.d.cts +3 -3
  239. package/dist/subscribers/SubscriberBuilder.d.mts +3 -3
  240. package/dist/subscribers/SubscriberBuilder.mjs +3 -3
  241. package/dist/subscribers/index.cjs +3 -3
  242. package/dist/subscribers/index.d.cts +3 -3
  243. package/dist/subscribers/index.d.mts +5 -5
  244. package/dist/subscribers/index.mjs +3 -3
  245. package/package.json +5 -5
  246. package/src/Construct.ts +2 -0
  247. package/src/crons/Cron.ts +2 -0
  248. package/src/crons/CronBuilder.ts +8 -0
  249. package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +227 -0
  250. package/src/endpoints/Authorizer.ts +34 -0
  251. package/src/endpoints/Endpoint.ts +67 -14
  252. package/src/endpoints/EndpointBuilder.ts +79 -12
  253. package/src/endpoints/EndpointFactory.ts +106 -27
  254. package/src/endpoints/HonoEndpointAdaptor.ts +29 -0
  255. package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +85 -0
  256. package/src/endpoints/__tests__/Endpoint.headers.spec.ts +187 -0
  257. package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +176 -0
  258. package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +259 -0
  259. package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +190 -0
  260. package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +155 -0
  261. package/src/functions/Function.ts +12 -2
  262. package/src/functions/FunctionBuilder.ts +9 -0
  263. package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +160 -0
  264. package/dist/Construct-BSEs6uwW.cjs.map +0 -1
  265. package/dist/Construct-BbKCIPQm.mjs.map +0 -1
  266. package/dist/Cron-CmZ6esMM.cjs.map +0 -1
  267. package/dist/Cron-D6hnZLk7.mjs.map +0 -1
  268. package/dist/CronBuilder-Dfv5JguE.mjs.map +0 -1
  269. package/dist/CronBuilder-Di7QK8Rt.cjs.map +0 -1
  270. package/dist/Endpoint-COGAflGh.cjs.map +0 -1
  271. package/dist/Endpoint-DLLZvqoh.mjs.map +0 -1
  272. package/dist/EndpointBuilder-FJktpPOu.cjs.map +0 -1
  273. package/dist/EndpointBuilder-oXO_ka1-.mjs.map +0 -1
  274. package/dist/EndpointFactory-Kk1tpifs.cjs.map +0 -1
  275. package/dist/EndpointFactory-eG8bDhOh.mjs.map +0 -1
  276. package/dist/Function-C5mW-38v.mjs.map +0 -1
  277. package/dist/Function-CbO2NZx-.cjs.map +0 -1
  278. package/dist/FunctionBuilder-CosgPmMl.mjs.map +0 -1
  279. package/dist/FunctionBuilder-DuOeWCAl.cjs.map +0 -1
  280. package/dist/HonoEndpointAdaptor-BlT1rWHV.mjs.map +0 -1
  281. package/dist/HonoEndpointAdaptor-Ds433Q8w.cjs.map +0 -1
  282. package/dist/functions-mM-jcphA.mjs +0 -8
  283. package/dist/index-BGr5gFrX.d.cts +0 -9
  284. package/dist/index-YM4W9XUq.d.mts +0 -9
@@ -1,10 +1,10 @@
1
- import "../Construct-DdyYENBD.mjs";
2
- import { Subscriber } from "../Subscriber-BxH6n8zQ.mjs";
3
- import { SubscriberBuilder } from "../SubscriberBuilder-BpSDPzBz.mjs";
4
- import * as _geekmidas_logger5 from "@geekmidas/logger";
1
+ import "../Construct-zhmcmIdY.mjs";
2
+ import { Subscriber } from "../Subscriber-g3IWM1_d.mjs";
3
+ import { SubscriberBuilder } from "../SubscriberBuilder-YjQ7qIpQ.mjs";
4
+ import * as _geekmidas_logger4 from "@geekmidas/logger";
5
5
 
6
6
  //#region src/subscribers/index.d.ts
7
- declare const s: SubscriberBuilder<[], _geekmidas_logger5.Logger, undefined, undefined, string, []>;
7
+ declare const s: SubscriberBuilder<[], _geekmidas_logger4.Logger, undefined, undefined, string, []>;
8
8
  //#endregion
9
9
  export { Subscriber, SubscriberBuilder, s };
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1,6 +1,6 @@
1
- import "../Construct-BbKCIPQm.mjs";
2
- import { Subscriber } from "../Subscriber-DkCDcTUL.mjs";
3
- import { SubscriberBuilder } from "../SubscriberBuilder-Bn9Hyi28.mjs";
1
+ import "../Construct-B-O9OBS1.mjs";
2
+ import { Subscriber } from "../Subscriber-bJSqvjdK.mjs";
3
+ import { SubscriberBuilder } from "../SubscriberBuilder-CyCyjT6L.mjs";
4
4
 
5
5
  //#region src/subscribers/index.ts
6
6
  const s = new SubscriberBuilder();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/constructs",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -66,13 +66,13 @@
66
66
  "lodash.compact": "~3.0.1",
67
67
  "openapi-types": "~12.1.3",
68
68
  "fast-glob": "~3.3.3",
69
- "@geekmidas/logger": "0.0.1",
70
- "@geekmidas/events": "0.0.2",
71
69
  "@geekmidas/schema": "0.0.2",
72
70
  "@geekmidas/services": "0.0.1",
71
+ "@geekmidas/logger": "0.0.1",
72
+ "@geekmidas/events": "0.0.2",
73
+ "@geekmidas/rate-limit": "0.1.0",
73
74
  "@geekmidas/cache": "0.0.7",
74
- "@geekmidas/errors": "0.0.1",
75
- "@geekmidas/rate-limit": "0.1.0"
75
+ "@geekmidas/errors": "0.0.1"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@types/lodash.pick": "~4.4.9",
package/src/Construct.ts CHANGED
@@ -20,6 +20,8 @@ export abstract class Construct<
20
20
 
21
21
  public readonly publisherService?: Service<TServiceName, T>,
22
22
  public outputSchema?: OutSchema,
23
+ public readonly timeout?: number,
24
+ public readonly memorySize?: number,
23
25
  ) {}
24
26
 
25
27
  /**
package/src/crons/Cron.ts CHANGED
@@ -42,6 +42,7 @@ export class Cron<
42
42
  logger?: TLogger,
43
43
  publisherService?: Service<TEventPublisherServiceName, TEventPublisher>,
44
44
  events: any[] = [],
45
+ memorySize?: number,
45
46
  ) {
46
47
  super(
47
48
  fn,
@@ -53,6 +54,7 @@ export class Cron<
53
54
  logger,
54
55
  publisherService,
55
56
  events,
57
+ memorySize,
56
58
  );
57
59
  }
58
60
 
@@ -28,10 +28,16 @@ export class CronBuilder<
28
28
  TEventPublisherServiceName
29
29
  > {
30
30
  private _schedule?: ScheduleExpression;
31
+
31
32
  constructor() {
32
33
  super(ConstructType.Cron);
33
34
  }
34
35
 
36
+ memorySize(memorySize: number): this {
37
+ this._memorySize = memorySize;
38
+ return this;
39
+ }
40
+
35
41
  schedule(
36
42
  _expression: ScheduleExpression,
37
43
  ): CronBuilder<
@@ -175,6 +181,7 @@ export class CronBuilder<
175
181
  this._logger,
176
182
  this._publisher,
177
183
  this._events,
184
+ this._memorySize,
178
185
  );
179
186
 
180
187
  // Reset builder state after creating the cron to prevent pollution
@@ -186,6 +193,7 @@ export class CronBuilder<
186
193
  this.inputSchema = undefined;
187
194
  this.outputSchema = undefined;
188
195
  this._timeout = undefined;
196
+ this._memorySize = undefined;
189
197
 
190
198
  return cron;
191
199
  }
@@ -0,0 +1,227 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { ConsoleLogger } from '@geekmidas/logger/console';
3
+ import { CronBuilder } from '../CronBuilder';
4
+ import type { Service } from '@geekmidas/services';
5
+
6
+ const ServiceA = {
7
+ serviceName: 'a' as const,
8
+ async register() {
9
+ return { test: () => 'a' };
10
+ },
11
+ } satisfies Service<'a', any>;
12
+
13
+ const ServiceB = {
14
+ serviceName: 'b' as const,
15
+ async register() {
16
+ return { test: () => 'b' };
17
+ },
18
+ } satisfies Service<'b', any>;
19
+
20
+ describe('CronBuilder - State Isolation', () => {
21
+ describe('singleton instance state reset', () => {
22
+ it('should reset services after handle() is called', () => {
23
+ const c = new CronBuilder();
24
+
25
+ // First cron with ServiceA and ServiceB
26
+ const cron1 = c
27
+ .schedule('rate(5 minutes)')
28
+ .services([ServiceA, ServiceB])
29
+ .handle(async () => ({}));
30
+
31
+ // Second cron should not have any services from first
32
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
33
+
34
+ expect(cron1.services.map((s) => s.serviceName)).toEqual(['a', 'b']);
35
+ expect(cron2.services.map((s) => s.serviceName)).toEqual([]);
36
+ });
37
+
38
+ it('should reset logger after handle() is called', () => {
39
+ const c = new CronBuilder();
40
+ const customLogger = new ConsoleLogger({ app: 'custom' });
41
+
42
+ // First cron with custom logger
43
+ const cron1 = c
44
+ .schedule('rate(5 minutes)')
45
+ .logger(customLogger)
46
+ .handle(async () => ({}));
47
+
48
+ // Second cron should have default logger (not the custom one)
49
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
50
+
51
+ expect(cron1.logger).toBe(customLogger);
52
+ expect(cron2.logger).not.toBe(customLogger);
53
+ expect(cron2.logger).toBeInstanceOf(ConsoleLogger);
54
+ });
55
+
56
+ it('should reset schedule after handle() is called', () => {
57
+ const c = new CronBuilder();
58
+
59
+ // First cron with schedule
60
+ const cron1 = c.schedule('rate(5 minutes)').handle(async () => ({}));
61
+
62
+ // Second cron should not have schedule from first
63
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
64
+
65
+ expect(cron1.schedule).toBe('rate(5 minutes)');
66
+ expect(cron2.schedule).toBe('rate(10 minutes)');
67
+
68
+ // Check internal state is reset
69
+ expect((c as any)._schedule).toBeUndefined();
70
+ });
71
+
72
+ it('should reset events after handle() is called', () => {
73
+ const c = new CronBuilder();
74
+
75
+ // Create first cron (events array should be empty initially)
76
+ const cron1 = c.schedule('rate(5 minutes)').handle(async () => ({}));
77
+
78
+ // Verify state was reset
79
+ expect((c as any)._events).toEqual([]);
80
+ expect((c as any)._services).toEqual([]);
81
+ expect((c as any)._schedule).toBeUndefined();
82
+ });
83
+
84
+ it('should reset input/output schemas after handle() is called', () => {
85
+ const c = new CronBuilder();
86
+ const inputSchema: any = { '~standard': { validate: () => ({}) } };
87
+ const outputSchema: any = { '~standard': { validate: () => ({}) } };
88
+
89
+ // First cron with schemas
90
+ const cron1 = c
91
+ .schedule('rate(5 minutes)')
92
+ .input(inputSchema)
93
+ .output(outputSchema)
94
+ .handle(async () => ({}));
95
+
96
+ // Second cron should not have schemas
97
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
98
+
99
+ expect(cron1.input).toBe(inputSchema);
100
+ expect(cron1.outputSchema).toBe(outputSchema);
101
+ expect(cron2.input).toBeUndefined();
102
+ expect(cron2.outputSchema).toBeUndefined();
103
+ });
104
+
105
+ it('should reset timeout after handle() is called', () => {
106
+ const c = new CronBuilder();
107
+
108
+ // First cron with custom timeout
109
+ const cron1 = c
110
+ .schedule('rate(5 minutes)')
111
+ .timeout(5000)
112
+ .handle(async () => ({}));
113
+
114
+ // Second cron should have default timeout (30000)
115
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
116
+
117
+ expect(cron1.timeout).toBe(5000);
118
+ expect(cron2.timeout).toBe(30000); // Default timeout
119
+ });
120
+ });
121
+
122
+ describe('method chaining before handle()', () => {
123
+ it('should accumulate services when chaining', () => {
124
+ const c = new CronBuilder();
125
+
126
+ const cron = c
127
+ .schedule('rate(5 minutes)')
128
+ .services([ServiceA])
129
+ .services([ServiceB])
130
+ .handle(async () => ({}));
131
+
132
+ expect(cron.services.map((s) => s.serviceName)).toEqual(['a', 'b']);
133
+ });
134
+
135
+ it('should not share references between different builder chains', () => {
136
+ const c = new CronBuilder();
137
+
138
+ // Start two separate chains
139
+ const builder1 = c.schedule('rate(5 minutes)').services([ServiceA]);
140
+ const builder2 = c.schedule('rate(10 minutes)').services([ServiceB]);
141
+
142
+ // They should be the same instance (singleton)
143
+ expect(builder1).toBe(builder2);
144
+ expect(builder1).toBe(c);
145
+
146
+ // But after handle, state is reset
147
+ const cron1 = builder1.handle(async () => ({}));
148
+
149
+ // Now builder2 should have reset state
150
+ expect((builder2 as any)._services).toEqual([]);
151
+
152
+ // Add services again
153
+ const cron2 = builder2
154
+ .schedule('rate(15 minutes)')
155
+ .services([ServiceB])
156
+ .handle(async () => ({}));
157
+
158
+ expect(cron1.services.map((s) => s.serviceName)).toEqual(['a', 'b']);
159
+ expect(cron2.services.map((s) => s.serviceName)).toEqual(['b']);
160
+ });
161
+ });
162
+
163
+ describe('sequential cron creation', () => {
164
+ it('should create independent crons sequentially', () => {
165
+ const c = new CronBuilder();
166
+
167
+ const cron1 = c
168
+ .schedule('rate(5 minutes)')
169
+ .services([ServiceA, ServiceB])
170
+ .handle(async () => ({ result: 1 }));
171
+
172
+ const cron2 = c
173
+ .schedule('rate(10 minutes)')
174
+ .services([ServiceA])
175
+ .handle(async () => ({ result: 2 }));
176
+
177
+ const cron3 = c
178
+ .schedule('rate(15 minutes)')
179
+ .handle(async () => ({ result: 3 }));
180
+
181
+ expect(cron1.services.map((s) => s.serviceName)).toEqual(['a', 'b']);
182
+ expect(cron1.schedule).toBe('rate(5 minutes)');
183
+
184
+ expect(cron2.services.map((s) => s.serviceName)).toEqual(['a']);
185
+ expect(cron2.schedule).toBe('rate(10 minutes)');
186
+
187
+ expect(cron3.services.map((s) => s.serviceName)).toEqual([]);
188
+ expect(cron3.schedule).toBe('rate(15 minutes)');
189
+ });
190
+ });
191
+
192
+ describe('publisher isolation', () => {
193
+ it('should reset publisher after handle() is called', () => {
194
+ const c = new CronBuilder();
195
+ const mockPublisher: any = {
196
+ serviceName: 'publisher',
197
+ async register() {
198
+ return { publish: () => {} };
199
+ },
200
+ };
201
+
202
+ const cron1 = c
203
+ .schedule('rate(5 minutes)')
204
+ .publisher(mockPublisher)
205
+ .handle(async () => ({}));
206
+
207
+ const cron2 = c.schedule('rate(10 minutes)').handle(async () => ({}));
208
+
209
+ expect((cron1 as any).publisherService).toBe(mockPublisher);
210
+ expect((cron2 as any).publisherService).toBeUndefined();
211
+ });
212
+ });
213
+
214
+ describe('cron expression types', () => {
215
+ it('should handle different schedule expression formats', () => {
216
+ const c = new CronBuilder();
217
+
218
+ const cron1 = c.schedule('rate(5 minutes)').handle(async () => ({}));
219
+ const cron2 = c.schedule('cron(0 12 * * ? *)').handle(async () => ({}));
220
+ const cron3 = c.schedule('rate(1 hour)').handle(async () => ({}));
221
+
222
+ expect(cron1.schedule).toBe('rate(5 minutes)');
223
+ expect(cron2.schedule).toBe('cron(0 12 * * ? *)');
224
+ expect(cron3.schedule).toBe('rate(1 hour)');
225
+ });
226
+ });
227
+ });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Represents an authorizer configuration for endpoints
3
+ */
4
+ export interface Authorizer {
5
+ /**
6
+ * Unique identifier for the authorizer
7
+ */
8
+ name: string;
9
+ /**
10
+ * Type of authorizer (e.g., 'iam', 'jwt', 'custom')
11
+ */
12
+ type?: string;
13
+ /**
14
+ * Description of what this authorizer does
15
+ */
16
+ description?: string;
17
+ /**
18
+ * Additional metadata specific to the authorizer type
19
+ */
20
+ metadata?: Record<string, any>;
21
+ }
22
+
23
+ /**
24
+ * Helper to create an authorizer configuration
25
+ */
26
+ export function createAuthorizer(
27
+ name: string,
28
+ options?: Omit<Authorizer, 'name'>,
29
+ ): Authorizer {
30
+ return {
31
+ name,
32
+ ...options,
33
+ };
34
+ }
@@ -5,6 +5,7 @@ import set from 'lodash.set';
5
5
  import type { OpenAPIV3_1 } from 'openapi-types';
6
6
 
7
7
  import type { Service, ServiceRecord } from '@geekmidas/services';
8
+ import type { Authorizer } from './Authorizer';
8
9
  import { ConstructType } from '../Construct';
9
10
  import { Function, type FunctionHandler } from '../functions';
10
11
 
@@ -93,6 +94,8 @@ export class Endpoint<
93
94
  public authorize: AuthorizeFn<TServices, TLogger, TSession> = () => true;
94
95
  /** Optional rate limiting configuration */
95
96
  public rateLimit?: RateLimitConfig;
97
+ /** Optional authorizer for this endpoint */
98
+ public authorizer?: Authorizer;
96
99
  /** The endpoint handler function */
97
100
  private endpointFn!: EndpointHandler<
98
101
  TInput,
@@ -174,12 +177,13 @@ export class Endpoint<
174
177
  * Creates a case-insensitive header lookup function from a headers object.
175
178
  *
176
179
  * @param headers - Object containing header key-value pairs
177
- * @returns Function to retrieve header values by case-insensitive key
180
+ * @returns Function to retrieve header values by case-insensitive key, or all headers
178
181
  *
179
182
  * @example
180
183
  * ```typescript
181
184
  * const headerFn = Endpoint.createHeaders({ 'Content-Type': 'application/json' });
182
185
  * headerFn('content-type'); // Returns 'application/json'
186
+ * headerFn(); // Returns { 'content-type': 'application/json' }
183
187
  * ```
184
188
  */
185
189
  static createHeaders(headers: Record<string, string>): HeaderFn {
@@ -189,22 +193,30 @@ export class Endpoint<
189
193
  headerMap.set(key, v);
190
194
  }
191
195
 
192
- return function get(key: string): string | undefined {
196
+ function get(): Record<string, string>;
197
+ function get(key: string): string | undefined;
198
+ function get(key?: string): string | undefined | Record<string, string> {
199
+ if (key === undefined) {
200
+ // Return all headers as plain object
201
+ return Object.fromEntries(headerMap.entries());
202
+ }
193
203
  return headerMap.get(key.toLowerCase());
194
- };
204
+ }
205
+
206
+ return get;
195
207
  }
196
208
 
197
209
  /**
198
210
  * Parses cookie string and creates a cookie lookup function.
199
211
  *
200
212
  * @param cookieHeader - The Cookie header value
201
- * @returns Function to retrieve cookie values by name
213
+ * @returns Function to retrieve cookie values by name, or all cookies
202
214
  *
203
215
  * @example
204
216
  * ```typescript
205
217
  * const cookieFn = Endpoint.createCookies('session=abc123; theme=dark');
206
218
  * cookieFn('session'); // Returns 'abc123'
207
- * cookieFn('theme'); // Returns 'dark'
219
+ * cookieFn(); // Returns { session: 'abc123', theme: 'dark' }
208
220
  * ```
209
221
  */
210
222
  static createCookies(cookieHeader: string | undefined): CookieFn {
@@ -222,9 +234,17 @@ export class Endpoint<
222
234
  }
223
235
  }
224
236
 
225
- return function get(name: string): string | undefined {
237
+ function get(): Record<string, string>;
238
+ function get(name: string): string | undefined;
239
+ function get(name?: string): string | undefined | Record<string, string> {
240
+ if (name === undefined) {
241
+ // Return all cookies as plain object
242
+ return Object.fromEntries(cookieMap.entries());
243
+ }
226
244
  return cookieMap.get(name);
227
- };
245
+ }
246
+
247
+ return get;
228
248
  }
229
249
 
230
250
  /**
@@ -499,6 +519,7 @@ export class Endpoint<
499
519
  * @param options.getSession - Session extraction function
500
520
  * @param options.authorize - Authorization check function
501
521
  * @param options.status - Success HTTP status code (default: 200)
522
+ * @param options.authorizer - Optional authorizer configuration
502
523
  */
503
524
  constructor({
504
525
  fn,
@@ -511,12 +532,14 @@ export class Endpoint<
511
532
  output: outputSchema,
512
533
  services,
513
534
  timeout,
535
+ memorySize,
514
536
  getSession,
515
537
  authorize,
516
538
  rateLimit,
517
539
  status = SuccessStatus.OK,
518
540
  publisherService,
519
541
  events,
542
+ authorizer,
520
543
  }: EndpointOptions<
521
544
  TRoute,
522
545
  TMethod,
@@ -539,6 +562,7 @@ export class Endpoint<
539
562
  logger,
540
563
  publisherService,
541
564
  events,
565
+ memorySize,
542
566
  );
543
567
 
544
568
  this.route = route;
@@ -559,6 +583,10 @@ export class Endpoint<
559
583
  if (rateLimit) {
560
584
  this.rateLimit = rateLimit;
561
585
  }
586
+
587
+ if (authorizer) {
588
+ this.authorizer = authorizer;
589
+ }
562
590
  }
563
591
  }
564
592
 
@@ -625,6 +653,8 @@ export interface EndpointOptions<
625
653
  tags?: string[];
626
654
  /** Optional execution timeout in milliseconds */
627
655
  timeout: number | undefined;
656
+ /** Optional memory size in MB for serverless deployments */
657
+ memorySize: number | undefined;
628
658
  /** Input validation schemas */
629
659
  input: TInput | undefined;
630
660
  /** Output validation schema */
@@ -645,6 +675,8 @@ export interface EndpointOptions<
645
675
  publisherService?: Service<TEventPublisherServiceName, TEventPublisher>;
646
676
 
647
677
  events?: MappedEvent<TEventPublisher, OutSchema>[];
678
+ /** Optional authorizer configuration */
679
+ authorizer?: Authorizer;
648
680
  }
649
681
 
650
682
  /**
@@ -780,24 +812,45 @@ export type EndpointHeaders = Map<string, string>;
780
812
 
781
813
  /**
782
814
  * Function type for retrieving HTTP header values.
815
+ * Supports two calling patterns:
816
+ * - `header(key)` - Get a single header value (case-insensitive)
817
+ * - `header()` - Get all headers as a plain object
783
818
  *
784
- * @param key - The header name (case-insensitive)
785
- * @returns The header value or undefined if not found
819
+ * @example
820
+ * ```typescript
821
+ * // Get single header
822
+ * const contentType = header('content-type');
823
+ *
824
+ * // Get all headers
825
+ * const allHeaders = header();
826
+ * // { 'content-type': 'application/json', 'host': 'example.com', ... }
827
+ * ```
786
828
  */
787
- export type HeaderFn = SingleHeaderFn;
829
+ export interface HeaderFn {
830
+ (): Record<string, string>;
831
+ (key: string): string | undefined;
832
+ }
788
833
 
789
834
  /**
790
835
  * Function type for retrieving cookie values.
791
- *
792
- * @param name - The cookie name
793
- * @returns The cookie value or undefined if not found
836
+ * Supports two calling patterns:
837
+ * - `cookie(name)` - Get a single cookie value
838
+ * - `cookie()` - Get all cookies as a plain object
794
839
  *
795
840
  * @example
796
841
  * ```typescript
842
+ * // Get single cookie
797
843
  * const sessionId = cookie('session');
844
+ *
845
+ * // Get all cookies
846
+ * const allCookies = cookie();
847
+ * // { session: 'abc123', theme: 'dark', ... }
798
848
  * ```
799
849
  */
800
- export type CookieFn = (name: string) => string | undefined;
850
+ export interface CookieFn {
851
+ (): Record<string, string>;
852
+ (name: string): string | undefined;
853
+ }
801
854
 
802
855
  /**
803
856
  * Cookie options matching standard Set-Cookie attributes