@geekmidas/constructs 7.0.1 → 10.0.0-alpha.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 (385) hide show
  1. package/README.md +71 -44
  2. package/dist/{AWSScheduledFunction-ysaCsdWx.d.mts → AWSScheduledFunction-BvFvBsBN.d.cts} +10 -5
  3. package/dist/{AWSScheduledFunction-ysaCsdWx.d.mts.map → AWSScheduledFunction-BvFvBsBN.d.cts.map} +1 -1
  4. package/dist/{AWSScheduledFunction-CTIa90EH.d.cts → AWSScheduledFunction-CVccZO-L.d.mts} +10 -5
  5. package/dist/{AWSScheduledFunction-CTIa90EH.d.cts.map → AWSScheduledFunction-CVccZO-L.d.mts.map} +1 -1
  6. package/dist/{AWSScheduledFunction-CufMMhGB.mjs → AWSScheduledFunction-Db1lttJH.mjs} +3 -3
  7. package/dist/{AWSScheduledFunction-CufMMhGB.mjs.map → AWSScheduledFunction-Db1lttJH.mjs.map} +1 -1
  8. package/dist/{AWSScheduledFunction-DbkDr8CA.cjs → AWSScheduledFunction-qu4ieRZR.cjs} +9 -9
  9. package/dist/{AWSScheduledFunction-DbkDr8CA.cjs.map → AWSScheduledFunction-qu4ieRZR.cjs.map} +1 -1
  10. package/dist/{Construct-_1wX7p_Y.d.cts → Construct-B-xc0SE9.d.mts} +27 -5
  11. package/dist/Construct-B-xc0SE9.d.mts.map +1 -0
  12. package/dist/{Construct-r0U2zBwW.mjs → Construct-HmWM6YYu.mjs} +4 -3
  13. package/dist/Construct-HmWM6YYu.mjs.map +1 -0
  14. package/dist/{Construct-DCMuYOox.d.mts → Construct-WhCXIOPV.d.cts} +29 -7
  15. package/dist/Construct-WhCXIOPV.d.cts.map +1 -0
  16. package/dist/{Construct-vXMZJgRp.cjs → Construct-roId57cU.cjs} +7 -43
  17. package/dist/Construct-roId57cU.cjs.map +1 -0
  18. package/dist/{lazyAccessors-DmTG8sQH.cjs → Endpoint-BBkV6l0k.cjs} +869 -1079
  19. package/dist/Endpoint-BBkV6l0k.cjs.map +1 -0
  20. package/dist/{lazyAccessors-DfqZR6C4.mjs → Endpoint-BGwpNEX4.mjs} +840 -1003
  21. package/dist/Endpoint-BGwpNEX4.mjs.map +1 -0
  22. package/dist/{Endpoint-CAzNbDEt.d.cts → Endpoint-BnxZqIX-.d.cts} +53 -4
  23. package/dist/Endpoint-BnxZqIX-.d.cts.map +1 -0
  24. package/dist/{Endpoint-CLPSIl6S.d.mts → Endpoint-ROcXU-eH.d.mts} +55 -6
  25. package/dist/Endpoint-ROcXU-eH.d.mts.map +1 -0
  26. package/dist/EndpointFactory-DYoGLaIT.cjs +850 -0
  27. package/dist/EndpointFactory-DYoGLaIT.cjs.map +1 -0
  28. package/dist/EndpointFactory-Di0X9AWp.mjs +808 -0
  29. package/dist/EndpointFactory-Di0X9AWp.mjs.map +1 -0
  30. package/dist/{HonoEndpointAdaptor-DJDT3PMx.mjs → HonoEndpointAdaptor-DFKIIG2o.mjs} +5 -4
  31. package/dist/HonoEndpointAdaptor-DFKIIG2o.mjs.map +1 -0
  32. package/dist/{HonoEndpointAdaptor-CkJENANP.cjs → HonoEndpointAdaptor-wMsCyMgt.cjs} +24 -23
  33. package/dist/HonoEndpointAdaptor-wMsCyMgt.cjs.map +1 -0
  34. package/dist/{Queue-DaxjwmOQ.d.cts → Queue-D6WeziRD.d.cts} +43 -4
  35. package/dist/Queue-D6WeziRD.d.cts.map +1 -0
  36. package/dist/{Queue-HBDf0fqz.d.mts → Queue-DpUeqdC8.d.mts} +43 -4
  37. package/dist/Queue-DpUeqdC8.d.mts.map +1 -0
  38. package/dist/{Subscriber-B69ngPwl.d.cts → Subscriber-4rBJgDKI.d.mts} +9 -4
  39. package/dist/{Subscriber-B69ngPwl.d.cts.map → Subscriber-4rBJgDKI.d.mts.map} +1 -1
  40. package/dist/{Subscriber-D8Xm-86W.d.mts → Subscriber-DVQowdyj.d.cts} +11 -6
  41. package/dist/Subscriber-DVQowdyj.d.cts.map +1 -0
  42. package/dist/{Topic-C5ZMfveW.d.cts → Topic-Ohx9dvWr.d.cts} +33 -2
  43. package/dist/Topic-Ohx9dvWr.d.cts.map +1 -0
  44. package/dist/{Topic-DT10AqHk.d.mts → Topic-cmy2jOUy.d.mts} +33 -2
  45. package/dist/Topic-cmy2jOUy.d.mts.map +1 -0
  46. package/dist/adaptors/aws.cjs +39 -26
  47. package/dist/adaptors/aws.cjs.map +1 -1
  48. package/dist/adaptors/aws.d.cts +24 -16
  49. package/dist/adaptors/aws.d.cts.map +1 -1
  50. package/dist/adaptors/aws.d.mts +25 -17
  51. package/dist/adaptors/aws.d.mts.map +1 -1
  52. package/dist/adaptors/aws.mjs +26 -14
  53. package/dist/adaptors/aws.mjs.map +1 -1
  54. package/dist/adaptors/hono.cjs +9 -6
  55. package/dist/adaptors/hono.d.cts +7 -6
  56. package/dist/adaptors/hono.d.cts.map +1 -1
  57. package/dist/adaptors/hono.d.mts +8 -7
  58. package/dist/adaptors/hono.d.mts.map +1 -1
  59. package/dist/adaptors/hono.mjs +9 -6
  60. package/dist/adaptors/testing.cjs +18 -14
  61. package/dist/adaptors/testing.cjs.map +1 -1
  62. package/dist/adaptors/testing.d.cts +7 -6
  63. package/dist/adaptors/testing.d.cts.map +1 -1
  64. package/dist/adaptors/testing.d.mts +11 -10
  65. package/dist/adaptors/testing.d.mts.map +1 -1
  66. package/dist/adaptors/testing.mjs +10 -7
  67. package/dist/adaptors/testing.mjs.map +1 -1
  68. package/dist/auth.cjs +165 -0
  69. package/dist/auth.cjs.map +1 -0
  70. package/dist/auth.d.cts +108 -0
  71. package/dist/auth.d.cts.map +1 -0
  72. package/dist/auth.d.mts +108 -0
  73. package/dist/auth.d.mts.map +1 -0
  74. package/dist/auth.mjs +164 -0
  75. package/dist/auth.mjs.map +1 -0
  76. package/dist/cache-0ANvRQnD.mjs +51 -0
  77. package/dist/cache-0ANvRQnD.mjs.map +1 -0
  78. package/dist/cache-3WSvAulx.cjs +57 -0
  79. package/dist/cache-3WSvAulx.cjs.map +1 -0
  80. package/dist/cache-CdQ7OLpR.d.cts +47 -0
  81. package/dist/cache-CdQ7OLpR.d.cts.map +1 -0
  82. package/dist/cache-DYoJFcfd.d.mts +47 -0
  83. package/dist/cache-DYoJFcfd.d.mts.map +1 -0
  84. package/dist/cache.cjs +3 -0
  85. package/dist/cache.d.cts +3 -0
  86. package/dist/cache.d.mts +3 -0
  87. package/dist/cache.mjs +3 -0
  88. package/dist/chunk-DWy1uDak.cjs +39 -0
  89. package/dist/clone-DblgEZZa.mjs +39 -0
  90. package/dist/clone-DblgEZZa.mjs.map +1 -0
  91. package/dist/clone-Dy0cR2SZ.cjs +45 -0
  92. package/dist/clone-Dy0cR2SZ.cjs.map +1 -0
  93. package/dist/construct-interface-BfjcOD_E.cjs +117 -0
  94. package/dist/construct-interface-BfjcOD_E.cjs.map +1 -0
  95. package/dist/construct-interface-BqwRNYA2.d.mts +131 -0
  96. package/dist/construct-interface-BqwRNYA2.d.mts.map +1 -0
  97. package/dist/construct-interface-D2nNkHUN.d.cts +131 -0
  98. package/dist/construct-interface-D2nNkHUN.d.cts.map +1 -0
  99. package/dist/construct-interface-Z4CpS8tK.mjs +81 -0
  100. package/dist/construct-interface-Z4CpS8tK.mjs.map +1 -0
  101. package/dist/construct-interface.cjs +8 -0
  102. package/dist/construct-interface.d.cts +2 -0
  103. package/dist/construct-interface.d.mts +2 -0
  104. package/dist/construct-interface.mjs +3 -0
  105. package/dist/credential.cjs +96 -0
  106. package/dist/credential.cjs.map +1 -0
  107. package/dist/credential.d.cts +61 -0
  108. package/dist/credential.d.cts.map +1 -0
  109. package/dist/credential.d.mts +61 -0
  110. package/dist/credential.d.mts.map +1 -0
  111. package/dist/credential.mjs +94 -0
  112. package/dist/credential.mjs.map +1 -0
  113. package/dist/crons/index.cjs +39 -37
  114. package/dist/crons/index.cjs.map +1 -1
  115. package/dist/crons/index.d.cts +21 -8
  116. package/dist/crons/index.d.cts.map +1 -1
  117. package/dist/crons/index.d.mts +29 -13
  118. package/dist/crons/index.d.mts.map +1 -1
  119. package/dist/crons/index.mjs +37 -36
  120. package/dist/crons/index.mjs.map +1 -1
  121. package/dist/database/kysely.cjs +181 -0
  122. package/dist/database/kysely.cjs.map +1 -0
  123. package/dist/database/kysely.d.cts +152 -0
  124. package/dist/database/kysely.d.cts.map +1 -0
  125. package/dist/database/kysely.d.mts +152 -0
  126. package/dist/database/kysely.d.mts.map +1 -0
  127. package/dist/database/kysely.mjs +180 -0
  128. package/dist/database/kysely.mjs.map +1 -0
  129. package/dist/email.cjs +59 -0
  130. package/dist/email.cjs.map +1 -0
  131. package/dist/email.d.cts +50 -0
  132. package/dist/email.d.cts.map +1 -0
  133. package/dist/email.d.mts +50 -0
  134. package/dist/email.d.mts.map +1 -0
  135. package/dist/email.mjs +58 -0
  136. package/dist/email.mjs.map +1 -0
  137. package/dist/endpoints/index.cjs +21 -747
  138. package/dist/endpoints/index.d.cts +7 -343
  139. package/dist/endpoints/index.d.mts +7 -342
  140. package/dist/endpoints/index.mjs +11 -738
  141. package/dist/file-server.cjs +154 -0
  142. package/dist/file-server.cjs.map +1 -0
  143. package/dist/file-server.d.cts +156 -0
  144. package/dist/file-server.d.cts.map +1 -0
  145. package/dist/file-server.d.mts +156 -0
  146. package/dist/file-server.d.mts.map +1 -0
  147. package/dist/file-server.mjs +152 -0
  148. package/dist/file-server.mjs.map +1 -0
  149. package/dist/functions/index.cjs +4 -2
  150. package/dist/functions/index.d.cts +3 -2
  151. package/dist/functions/index.d.mts +3 -2
  152. package/dist/functions/index.mjs +4 -2
  153. package/dist/{functions-B-qt91O7.mjs → functions-CvT_q7Y4.mjs} +55 -51
  154. package/dist/functions-CvT_q7Y4.mjs.map +1 -0
  155. package/dist/{functions-C8i1kCMM.cjs → functions-DukjG8ov.cjs} +62 -57
  156. package/dist/functions-DukjG8ov.cjs.map +1 -0
  157. package/dist/index-7OcOWe75.d.cts +419 -0
  158. package/dist/index-7OcOWe75.d.cts.map +1 -0
  159. package/dist/index-Bt-F7u8L.d.mts +419 -0
  160. package/dist/index-Bt-F7u8L.d.mts.map +1 -0
  161. package/dist/{index-DP6fqv0I.d.mts → index-CPeqtKgq.d.mts} +48 -19
  162. package/dist/index-CPeqtKgq.d.mts.map +1 -0
  163. package/dist/{index-BGeTScmi.d.cts → index-Dadljnh_.d.cts} +36 -9
  164. package/dist/index-Dadljnh_.d.cts.map +1 -0
  165. package/dist/index.cjs +1 -1
  166. package/dist/index.d.cts +3 -3
  167. package/dist/index.d.mts +3 -3
  168. package/dist/index.mjs +1 -1
  169. package/dist/lazyAccessors-DM6HcXQk.mjs +175 -0
  170. package/dist/lazyAccessors-DM6HcXQk.mjs.map +1 -0
  171. package/dist/lazyAccessors-DrJj8NpA.cjs +223 -0
  172. package/dist/lazyAccessors-DrJj8NpA.cjs.map +1 -0
  173. package/dist/object-storage.cjs +48 -0
  174. package/dist/object-storage.cjs.map +1 -0
  175. package/dist/object-storage.d.cts +36 -0
  176. package/dist/object-storage.d.cts.map +1 -0
  177. package/dist/object-storage.d.mts +36 -0
  178. package/dist/object-storage.d.mts.map +1 -0
  179. package/dist/object-storage.mjs +47 -0
  180. package/dist/object-storage.mjs.map +1 -0
  181. package/dist/{processAudits-CKjjivyz.cjs → processAudits-Bc8rz6Ev.cjs} +3 -3
  182. package/dist/{processAudits-CKjjivyz.cjs.map → processAudits-Bc8rz6Ev.cjs.map} +1 -1
  183. package/dist/{processAudits-ySnizdMG.mjs → processAudits-D89tICM4.mjs} +1 -1
  184. package/dist/{processAudits-ySnizdMG.mjs.map → processAudits-D89tICM4.mjs.map} +1 -1
  185. package/dist/{publisher-BrFOF847.mjs → publisher-CGEo8UKD.mjs} +1 -1
  186. package/dist/{publisher-BrFOF847.mjs.map → publisher-CGEo8UKD.mjs.map} +1 -1
  187. package/dist/{publisher-lFQleddL.cjs → publisher-CqGsXB2X.cjs} +1 -1
  188. package/dist/{publisher-lFQleddL.cjs.map → publisher-CqGsXB2X.cjs.map} +1 -1
  189. package/dist/queue/index.cjs +92 -30
  190. package/dist/queue/index.cjs.map +1 -1
  191. package/dist/queue/index.d.cts +19 -4
  192. package/dist/queue/index.d.cts.map +1 -1
  193. package/dist/queue/index.d.mts +22 -6
  194. package/dist/queue/index.d.mts.map +1 -1
  195. package/dist/queue/index.mjs +90 -29
  196. package/dist/queue/index.mjs.map +1 -1
  197. package/dist/rest-api.cjs +187 -0
  198. package/dist/rest-api.cjs.map +1 -0
  199. package/dist/rest-api.d.cts +221 -0
  200. package/dist/rest-api.d.cts.map +1 -0
  201. package/dist/rest-api.d.mts +221 -0
  202. package/dist/rest-api.d.mts.map +1 -0
  203. package/dist/rest-api.mjs +186 -0
  204. package/dist/rest-api.mjs.map +1 -0
  205. package/dist/site.cjs +48 -0
  206. package/dist/site.cjs.map +1 -0
  207. package/dist/site.d.cts +101 -0
  208. package/dist/site.d.cts.map +1 -0
  209. package/dist/site.d.mts +101 -0
  210. package/dist/site.d.mts.map +1 -0
  211. package/dist/site.mjs +47 -0
  212. package/dist/site.mjs.map +1 -0
  213. package/dist/subscribers/index.cjs +35 -27
  214. package/dist/subscribers/index.cjs.map +1 -1
  215. package/dist/subscribers/index.d.cts +20 -5
  216. package/dist/subscribers/index.d.cts.map +1 -1
  217. package/dist/subscribers/index.d.mts +23 -7
  218. package/dist/subscribers/index.d.mts.map +1 -1
  219. package/dist/subscribers/index.mjs +34 -27
  220. package/dist/subscribers/index.mjs.map +1 -1
  221. package/dist/surfaceEnv-BFXEms2f.cjs +39 -0
  222. package/dist/surfaceEnv-BFXEms2f.cjs.map +1 -0
  223. package/dist/surfaceEnv-C3Ktahea.mjs +27 -0
  224. package/dist/surfaceEnv-C3Ktahea.mjs.map +1 -0
  225. package/dist/{telemetry-3vdxGn4q.d.mts → telemetry-C3L0iS28.d.cts} +2 -2
  226. package/dist/{telemetry-3vdxGn4q.d.mts.map → telemetry-C3L0iS28.d.cts.map} +1 -1
  227. package/dist/{telemetry-Dqx-D3F7.d.cts → telemetry-D7bVFLGi.d.mts} +2 -2
  228. package/dist/{telemetry-Dqx-D3F7.d.cts.map → telemetry-D7bVFLGi.d.mts.map} +1 -1
  229. package/dist/topic/index.cjs +56 -13
  230. package/dist/topic/index.cjs.map +1 -1
  231. package/dist/topic/index.d.cts +2 -2
  232. package/dist/topic/index.d.cts.map +1 -1
  233. package/dist/topic/index.d.mts +2 -2
  234. package/dist/topic/index.d.mts.map +1 -1
  235. package/dist/topic/index.mjs +54 -12
  236. package/dist/topic/index.mjs.map +1 -1
  237. package/dist/{types-BDNGr7pv.d.mts → types-BlAkSuGI.d.cts} +1 -1
  238. package/dist/{types-BDNGr7pv.d.mts.map → types-BlAkSuGI.d.cts.map} +1 -1
  239. package/dist/{types-BdAaYDvd.d.cts → types-aKksMEWL.d.mts} +1 -1
  240. package/dist/{types-BdAaYDvd.d.cts.map → types-aKksMEWL.d.mts.map} +1 -1
  241. package/dist/types.d.cts +1 -1
  242. package/dist/types.d.mts +1 -1
  243. package/package.json +155 -23
  244. package/CHANGELOG.md +0 -366
  245. package/dist/Construct-DCMuYOox.d.mts.map +0 -1
  246. package/dist/Construct-_1wX7p_Y.d.cts.map +0 -1
  247. package/dist/Construct-r0U2zBwW.mjs.map +0 -1
  248. package/dist/Construct-vXMZJgRp.cjs.map +0 -1
  249. package/dist/Endpoint-CAzNbDEt.d.cts.map +0 -1
  250. package/dist/Endpoint-CLPSIl6S.d.mts.map +0 -1
  251. package/dist/HonoEndpointAdaptor-CkJENANP.cjs.map +0 -1
  252. package/dist/HonoEndpointAdaptor-DJDT3PMx.mjs.map +0 -1
  253. package/dist/Queue-DaxjwmOQ.d.cts.map +0 -1
  254. package/dist/Queue-HBDf0fqz.d.mts.map +0 -1
  255. package/dist/Subscriber-D8Xm-86W.d.mts.map +0 -1
  256. package/dist/Topic-C5ZMfveW.d.cts.map +0 -1
  257. package/dist/Topic-DT10AqHk.d.mts.map +0 -1
  258. package/dist/endpoints/index.cjs.map +0 -1
  259. package/dist/endpoints/index.d.cts.map +0 -1
  260. package/dist/endpoints/index.d.mts.map +0 -1
  261. package/dist/endpoints/index.mjs.map +0 -1
  262. package/dist/functions-B-qt91O7.mjs.map +0 -1
  263. package/dist/functions-C8i1kCMM.cjs.map +0 -1
  264. package/dist/index-BGeTScmi.d.cts.map +0 -1
  265. package/dist/index-DP6fqv0I.d.mts.map +0 -1
  266. package/dist/lazyAccessors-DfqZR6C4.mjs.map +0 -1
  267. package/dist/lazyAccessors-DmTG8sQH.cjs.map +0 -1
  268. package/src/Construct.ts +0 -204
  269. package/src/__benchmarks__/build-time-optimization.bench.ts +0 -274
  270. package/src/__benchmarks__/endpoint.bench.ts +0 -494
  271. package/src/__benchmarks__/fixtures.ts +0 -241
  272. package/src/__benchmarks__/hono-adaptor.bench.ts +0 -533
  273. package/src/__benchmarks__/hono-server.bench.ts +0 -249
  274. package/src/__benchmarks__/response-builder.bench.ts +0 -428
  275. package/src/__benchmarks__/strategies/strategy-a-lazy-services.ts +0 -319
  276. package/src/__benchmarks__/strategies/strategy-c-middleware.ts +0 -530
  277. package/src/__benchmarks__/strategies/strategy-d-opt-in-events.ts +0 -567
  278. package/src/__tests__/Construct.environment.spec.ts +0 -704
  279. package/src/__tests__/publisher.setting.spec.ts +0 -508
  280. package/src/__tests__/publisher.spec.ts +0 -452
  281. package/src/adaptors/aws.ts +0 -6
  282. package/src/adaptors/hono.ts +0 -1
  283. package/src/adaptors/testing.ts +0 -11
  284. package/src/crons/AWSScheduledFunction.ts +0 -73
  285. package/src/crons/Cron.ts +0 -149
  286. package/src/crons/CronBuilder.ts +0 -271
  287. package/src/crons/__tests__/AWSScheduledFunction.spec.ts +0 -152
  288. package/src/crons/__tests__/Cron.spec.ts +0 -464
  289. package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +0 -227
  290. package/src/crons/index.ts +0 -12
  291. package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +0 -677
  292. package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +0 -105
  293. package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +0 -97
  294. package/src/endpoints/Authorizer.ts +0 -152
  295. package/src/endpoints/Endpoint.ts +0 -1287
  296. package/src/endpoints/EndpointBuilder.ts +0 -758
  297. package/src/endpoints/EndpointFactory.ts +0 -1148
  298. package/src/endpoints/HonoEndpointAdaptor.ts +0 -677
  299. package/src/endpoints/MswEndpointAdaptor.ts +0 -226
  300. package/src/endpoints/TestEndpointAdaptor.ts +0 -422
  301. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.audits.spec.ts +0 -499
  302. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +0 -560
  303. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +0 -1304
  304. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +0 -626
  305. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +0 -732
  306. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.factory-publisher.spec.ts +0 -296
  307. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +0 -951
  308. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.responseType.spec.ts +0 -111
  309. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.rls.spec.ts +0 -307
  310. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +0 -629
  311. package/src/endpoints/__tests__/Authorizer.spec.ts +0 -286
  312. package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +0 -207
  313. package/src/endpoints/__tests__/Endpoint.headers.spec.ts +0 -187
  314. package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +0 -175
  315. package/src/endpoints/__tests__/Endpoint.spec.ts +0 -857
  316. package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +0 -448
  317. package/src/endpoints/__tests__/EndpointBuilder.responseType.spec.ts +0 -47
  318. package/src/endpoints/__tests__/EndpointBuilder.spec.ts +0 -523
  319. package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +0 -492
  320. package/src/endpoints/__tests__/EndpointFactory.database-auditor.spec.ts +0 -509
  321. package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +0 -190
  322. package/src/endpoints/__tests__/EndpointFactory.spec.ts +0 -479
  323. package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +0 -155
  324. package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +0 -703
  325. package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +0 -632
  326. package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +0 -577
  327. package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +0 -1067
  328. package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +0 -317
  329. package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +0 -289
  330. package/src/endpoints/__tests__/HonoEndpointAdaptor.responseType.spec.ts +0 -128
  331. package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +0 -1207
  332. package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +0 -211
  333. package/src/endpoints/__tests__/ResponseBuilder.spec.ts +0 -235
  334. package/src/endpoints/__tests__/TestEndpointAdaptor.audits.spec.ts +0 -602
  335. package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +0 -1044
  336. package/src/endpoints/__tests__/__snapshots__/HonoEndpointAdaptor.spec.ts.snap +0 -54
  337. package/src/endpoints/__tests__/endpoint-types.test.ts +0 -88
  338. package/src/endpoints/__tests__/helpers.spec.ts +0 -37
  339. package/src/endpoints/__tests__/lazyAccessors.spec.ts +0 -330
  340. package/src/endpoints/__tests__/processAudits.spec.ts +0 -631
  341. package/src/endpoints/audit.ts +0 -87
  342. package/src/endpoints/helpers.ts +0 -98
  343. package/src/endpoints/index.ts +0 -42
  344. package/src/endpoints/lazyAccessors.ts +0 -241
  345. package/src/endpoints/parseHonoQuery.ts +0 -16
  346. package/src/endpoints/parseQueryParams.ts +0 -32
  347. package/src/endpoints/processAudits.ts +0 -371
  348. package/src/endpoints/rls.ts +0 -67
  349. package/src/functions/AWSLambdaFunction.ts +0 -348
  350. package/src/functions/BaseFunctionBuilder.ts +0 -201
  351. package/src/functions/Function.ts +0 -238
  352. package/src/functions/FunctionBuilder.ts +0 -391
  353. package/src/functions/FunctionExecutionWrapper.ts +0 -216
  354. package/src/functions/TestFunctionAdaptor.ts +0 -217
  355. package/src/functions/__tests__/AWSLambdaFunctionAdaptor.spec.ts +0 -513
  356. package/src/functions/__tests__/Function.audits.spec.ts +0 -393
  357. package/src/functions/__tests__/Function.spec.ts +0 -477
  358. package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +0 -207
  359. package/src/functions/__tests__/TestFunctionAdaptor.spec.ts +0 -480
  360. package/src/functions/index.ts +0 -12
  361. package/src/index.ts +0 -23
  362. package/src/publisher.ts +0 -93
  363. package/src/queue/AWSLambdaQueueAdaptor.ts +0 -162
  364. package/src/queue/Queue.ts +0 -128
  365. package/src/queue/QueueBuilder.ts +0 -115
  366. package/src/queue/TestQueueAdaptor.ts +0 -63
  367. package/src/queue/__tests__/QueueBuilder.spec.ts +0 -137
  368. package/src/queue/index.ts +0 -12
  369. package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +0 -342
  370. package/src/subscribers/Subscriber.ts +0 -117
  371. package/src/subscribers/SubscriberBuilder.ts +0 -186
  372. package/src/subscribers/TestSubscriberAdaptor.ts +0 -133
  373. package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +0 -1018
  374. package/src/subscribers/__tests__/Subscriber.spec.ts +0 -430
  375. package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +0 -652
  376. package/src/subscribers/index.ts +0 -6
  377. package/src/telemetry.ts +0 -103
  378. package/src/topic/Topic.ts +0 -103
  379. package/src/topic/TopicBuilder.ts +0 -51
  380. package/src/topic/__tests__/TopicBuilder.spec.ts +0 -82
  381. package/src/topic/index.ts +0 -11
  382. package/src/types.ts +0 -13
  383. package/test.ts +0 -91
  384. package/tsconfig.json +0 -9
  385. package/tsdown.config.ts +0 -34
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Endpoint-BBkV6l0k.cjs","names":["INFINITY","MAX_SAFE_INTEGER","funcTag","genTag","symbolTag","freeGlobal","freeSelf","root","objectProto","hasOwnProperty","objectToString","Symbol","toKey","isArray","isFunction","isObject","isObjectLike","isSymbol","pick","Map","string","set","Function","endpoints: Endpoint<any, any, any, any, any, any>[]","options?: OpenApiSchemaOptions","input: unknown","key: K","body: unknown","status: number","headers: Record<string, string>","key?: string","cookieHeader: string | undefined","name?: string","name: string","value: string","options?: CookieOptions","ctx: EndpointContext<TInput, TServices, TLogger, TSession>","ctx: EndpointContext<\n\t\t\tTInput,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tTSession,\n\t\t\tTAuditAction,\n\t\t\tTDatabase,\n\t\t\tTAuditStorage\n\t\t>","response: ResponseBuilder","obj: any","ConstructType","response: T | ResponseWithMetadata<T>","componentCollector?: ComponentCollector","operation: OpenAPIV3_1.OperationObject","pathParameters: OpenAPIV3_1.ParameterObject[]","queryParameters: OpenAPIV3_1.ParameterObject[]","routeObject: any","key: string","options?: Pick<CookieOptions, 'domain' | 'path'>","code: SuccessStatus","data: T"],"sources":["../../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js","../../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js","../src/endpoints/Endpoint.ts"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function(value, key) {\n return key in object;\n });\n}\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = baseRest(function(object, props) {\n return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));\n});\n\nmodule.exports = pick;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","import type { AuditableAction, Auditor, AuditStorage } from '@geekmidas/audit';\nimport type { EnvironmentParser } from '@geekmidas/envkit';\nimport type {\n\tEventPublisher,\n\tExtractPublisherMessage,\n\tMappedEvent,\n} from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport type { RateLimitConfig } from '@geekmidas/rate-limit';\nimport type {\n\tInferComposableStandardSchema,\n\tInferStandardSchema,\n\tInferStandardSchemaInput,\n} from '@geekmidas/schema';\nimport {\n\tconvertSchemaWithComponents,\n\tconvertStandardSchemaToJsonSchema,\n} from '@geekmidas/schema/conversion';\nimport {\n\tbuildOpenApiSchema,\n\ttype ComponentCollector,\n\ttype OpenApiSchemaOptions,\n} from '@geekmidas/schema/openapi';\nimport type { Service, ServiceRecord } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport pick from 'lodash.pick';\nimport set from 'lodash.set';\nimport type { OpenAPIV3_1 } from 'openapi-types';\nimport { ConstructType } from '../Construct';\nimport { Function, type FunctionHandler } from '../functions';\nimport type { HttpMethod, LowerHttpMethod, RemoveUndefined } from '../types';\nimport type { Authorizer } from './Authorizer';\nimport type { ActorExtractor, MappedAudit } from './audit';\nimport type { RlsConfig } from './rls';\n\n/**\n * Represents an HTTP endpoint that can handle requests with type-safe input/output validation,\n * dependency injection, session management, and authorization.\n *\n * @template TRoute - The route path string with parameter placeholders (e.g., '/users/:id')\n * @template TMethod - The HTTP method (GET, POST, PUT, DELETE, PATCH)\n * @template TInput - The input schema definition for body, query, and path parameters\n * @template OutSchema - The output schema for response validation\n * @template TServices - Array of service dependencies to inject\n * @template TLogger - The logger instance type\n * @template TSession - The session data type\n *\n * @extends Function - Base function construct for handler execution\n *\n * @example\n * ```typescript\n * const endpoint = new Endpoint({\n * route: '/users/:id',\n * method: 'GET',\n * input: { params: userIdSchema },\n * output: userSchema,\n * fn: async ({ params }) => getUserById(params.id)\n * });\n * ```\n */\nexport class Endpoint<\n\tTRoute extends string,\n\tTMethod extends HttpMethod,\n\tTInput extends EndpointSchemas = {},\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTAuditStorage extends AuditStorage | undefined = undefined,\n\tTAuditStorageServiceName extends string = string,\n\tTAuditAction extends AuditableAction<string, unknown> = AuditableAction<\n\t\tstring,\n\t\tunknown\n\t>,\n\tTDatabase = undefined,\n\tTDatabaseServiceName extends string = string,\n> extends Function<\n\tTInput,\n\tTServices,\n\tTLogger,\n\tOutSchema,\n\tTEventPublisher,\n\tTEventPublisherServiceName,\n\tTAuditStorage,\n\tTAuditStorageServiceName,\n\tTDatabase,\n\tTDatabaseServiceName,\n\tTAuditAction,\n\tFunctionHandler<\n\t\tTInput,\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTDatabase,\n\t\tTAuditStorage,\n\t\tTAuditAction\n\t>\n> {\n\toperationId?: string;\n\t/** The route path pattern with parameter placeholders */\n\troute: TRoute;\n\t/** The HTTP method for this endpoint */\n\tmethod: TMethod;\n\t/**\n\t * The surface that serves it, when it was built from one.\n\t *\n\t * Carries the env parser the adaptors need, so a generated handler needs no\n\t * import written for it — and the surface's id, so the build attributes the\n\t * route to the API that serves it rather than inferring it by exclusion.\n\t */\n\tsurface: EndpointSurface;\n\t/** Optional description for OpenAPI documentation */\n\tdescription?: string;\n\t/** Optional tags for OpenAPI documentation */\n\ttags?: string[];\n\t/** The HTTP success status code to return (default: 200) */\n\tpublic readonly status: SuccessStatus;\n\t/**\n\t * Response content type for this endpoint. Defaults to `'application/json'`.\n\t * Non-JSON types cause adaptors to emit the body as-is with the declared\n\t * Content-Type header instead of JSON-serializing.\n\t */\n\tpublic readonly responseType: string;\n\t/** Default headers to apply to all responses */\n\tpublic readonly defaultHeaders: Record<string, string> = {};\n\t/** Function to extract session data from the request context */\n\tpublic getSession: SessionFn<TServices, TLogger, TSession, TDatabase> = () =>\n\t\t({}) as TSession;\n\t/** Function to determine if the request is authorized */\n\tpublic authorize: AuthorizeFn<\n\t\tTServices,\n\t\tTLogger,\n\t\tTSession,\n\t\tTInput,\n\t\tTDatabase\n\t> = () => true;\n\t/** Optional rate limiting configuration */\n\tpublic rateLimit?: RateLimitConfig;\n\t/** Optional authorizer for this endpoint */\n\tpublic authorizer?: Authorizer;\n\t/** Optional actor extractor for audit records */\n\tpublic actorExtractor?: ActorExtractor<TServices, TSession, TLogger>;\n\t/** Declarative audit definitions */\n\tpublic audits: MappedAudit<TAuditAction, OutSchema>[] = [];\n\t/** Database service for this endpoint */\n\tpublic declare databaseService?: Service<TDatabaseServiceName, TDatabase>;\n\t/** RLS configuration for this endpoint */\n\tpublic rlsConfig?: RlsConfig<TServices, TSession, TLogger>;\n\t/** Whether to bypass RLS for this endpoint */\n\tpublic rlsBypass?: boolean;\n\t/** The endpoint handler function */\n\tprivate endpointFn!: EndpointHandler<\n\t\tTInput,\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTSession,\n\t\tTDatabase,\n\t\tTAuditStorage,\n\t\tTAuditAction\n\t>;\n\n\t/**\n\t * Builds a complete OpenAPI 3.1 schema from an array of endpoints.\n\t *\n\t * @param endpoints - Array of endpoint instances to document\n\t * @param options - Optional configuration for OpenAPI generation\n\t * @returns OpenAPI 3.1 specification object\n\t *\n\t * @example\n\t * ```typescript\n\t * const schema = await Endpoint.buildOpenApiSchema([\n\t * getUserEndpoint,\n\t * createUserEndpoint\n\t * ], {\n\t * title: 'User API',\n\t * version: '1.0.0'\n\t * });\n\t * ```\n\t */\n\tstatic async buildOpenApiSchema(\n\t\tendpoints: Endpoint<any, any, any, any, any, any>[],\n\t\toptions?: OpenApiSchemaOptions,\n\t) {\n\t\treturn buildOpenApiSchema(endpoints, options);\n\t}\n\n\t/**\n\t * Gets the full path including HTTP method and route.\n\t * @returns Formatted string like 'GET /users/{id}'\n\t */\n\tget fullPath() {\n\t\treturn `${this.method} ${this._path}` as const;\n\t}\n\n\t/**\n\t * Parses and validates input data for a specific input type (body, query, params).\n\t *\n\t * @param input - The raw input data to validate\n\t * @param key - The input type key ('body', 'query', or 'params')\n\t * @returns The validated input data for the specified key\n\t * @throws {UnprocessableEntityError} When validation fails\n\t */\n\tasync parseInput<K extends keyof TInput>(\n\t\tinput: unknown,\n\t\tkey: K,\n\t): Promise<InferComposableStandardSchema<TInput[K]>> {\n\t\tconst schema = this.input?.[key];\n\t\treturn Endpoint.parseSchema(schema as StandardSchemaV1, input) as Promise<\n\t\t\tInferComposableStandardSchema<TInput[K]>\n\t\t>;\n\t}\n\n\t/**\n\t * Parses and validates the request body against the body schema.\n\t *\n\t * @param body - The raw request body to validate\n\t * @returns The validated body data\n\t * @throws {UnprocessableEntityError} When body validation fails\n\t */\n\tasync parseBody(body: unknown): Promise<InferStandardSchema<TInput['body']>> {\n\t\treturn this.parseInput(body, 'body') as Promise<\n\t\t\tInferStandardSchema<TInput['body']>\n\t\t>;\n\t}\n\n\tstatic isSuccessStatus(status: number): boolean {\n\t\treturn status >= 200 && status < 300;\n\t}\n\n\t/**\n\t * Creates a case-insensitive header lookup function from a headers object.\n\t *\n\t * @param headers - Object containing header key-value pairs\n\t * @returns Function to retrieve header values by case-insensitive key, or all headers\n\t *\n\t * @example\n\t * ```typescript\n\t * const headerFn = Endpoint.createHeaders({ 'Content-Type': 'application/json' });\n\t * headerFn('content-type'); // Returns 'application/json'\n\t * headerFn(); // Returns { 'content-type': 'application/json' }\n\t * ```\n\t */\n\tstatic createHeaders(headers: Record<string, string>): HeaderFn {\n\t\tconst headerMap = new Map<string, string>();\n\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\tconst key = k.toLowerCase();\n\t\t\theaderMap.set(key, v);\n\t\t}\n\n\t\tfunction get(): Record<string, string>;\n\t\tfunction get(key: string): string | undefined;\n\t\tfunction get(key?: string): string | undefined | Record<string, string> {\n\t\t\tif (key === undefined) {\n\t\t\t\t// Return all headers as plain object\n\t\t\t\treturn Object.fromEntries(headerMap.entries());\n\t\t\t}\n\t\t\treturn headerMap.get(key.toLowerCase());\n\t\t}\n\n\t\treturn get;\n\t}\n\n\t/**\n\t * Parses cookie string and creates a cookie lookup function.\n\t *\n\t * @param cookieHeader - The Cookie header value\n\t * @returns Function to retrieve cookie values by name, or all cookies\n\t *\n\t * @example\n\t * ```typescript\n\t * const cookieFn = Endpoint.createCookies('session=abc123; theme=dark');\n\t * cookieFn('session'); // Returns 'abc123'\n\t * cookieFn(); // Returns { session: 'abc123', theme: 'dark' }\n\t * ```\n\t */\n\tstatic createCookies(cookieHeader: string | undefined): CookieFn {\n\t\tconst cookieMap = new Map<string, string>();\n\n\t\tif (cookieHeader) {\n\t\t\t// Parse cookie string: \"name1=value1; name2=value2\"\n\t\t\tconst cookies = cookieHeader.split(';');\n\t\t\tfor (const cookie of cookies) {\n\t\t\t\tconst [name, ...valueParts] = cookie.trim().split('=');\n\t\t\t\tif (name) {\n\t\t\t\t\tconst value = valueParts.join('='); // Handle values with = in them\n\t\t\t\t\tcookieMap.set(name, decodeURIComponent(value));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction get(): Record<string, string>;\n\t\tfunction get(name: string): string | undefined;\n\t\tfunction get(name?: string): string | undefined | Record<string, string> {\n\t\t\tif (name === undefined) {\n\t\t\t\t// Return all cookies as plain object\n\t\t\t\treturn Object.fromEntries(cookieMap.entries());\n\t\t\t}\n\t\t\treturn cookieMap.get(name);\n\t\t}\n\n\t\treturn get;\n\t}\n\n\t/**\n\t * Formats a cookie as a Set-Cookie header string.\n\t *\n\t * @param name - Cookie name\n\t * @param value - Cookie value\n\t * @param options - Cookie options (httpOnly, secure, sameSite, etc.)\n\t * @returns Formatted Set-Cookie header string\n\t *\n\t * @example\n\t * ```typescript\n\t * const header = Endpoint.formatCookieHeader('session', 'abc123', {\n\t * httpOnly: true,\n\t * secure: true,\n\t * sameSite: 'strict',\n\t * maxAge: 3600\n\t * });\n\t * // Returns: \"session=abc123; Max-Age=3600; HttpOnly; Secure; SameSite=Strict\"\n\t * ```\n\t */\n\tstatic formatCookieHeader(\n\t\tname: string,\n\t\tvalue: string,\n\t\toptions?: CookieOptions,\n\t): string {\n\t\tlet cookie = `${name}=${value}`;\n\n\t\tif (options) {\n\t\t\tif (options.domain) cookie += `; Domain=${options.domain}`;\n\t\t\tif (options.path) cookie += `; Path=${options.path}`;\n\t\t\tif (options.expires)\n\t\t\t\tcookie += `; Expires=${options.expires.toUTCString()}`;\n\t\t\tif (options.maxAge !== undefined) cookie += `; Max-Age=${options.maxAge}`;\n\t\t\tif (options.httpOnly) cookie += '; HttpOnly';\n\t\t\tif (options.secure) cookie += '; Secure';\n\t\t\tif (options.sameSite) {\n\t\t\t\tcookie += `; SameSite=${options.sameSite.charAt(0).toUpperCase() + options.sameSite.slice(1)}`;\n\t\t\t}\n\t\t}\n\n\t\treturn cookie;\n\t}\n\n\t/**\n\t * Extracts and refines input data from the endpoint context.\n\t *\n\t * @param ctx - The endpoint execution context\n\t * @returns Object containing only the input data (body, query, params)\n\t * @internal\n\t */\n\trefineInput(\n\t\tctx: EndpointContext<TInput, TServices, TLogger, TSession>,\n\t): InferComposableStandardSchema<TInput> {\n\t\tconst input = pick(ctx, [\n\t\t\t'body',\n\t\t\t'query',\n\t\t\t'params',\n\t\t]) as InferComposableStandardSchema<TInput>;\n\n\t\treturn input;\n\t}\n\n\thandler = (\n\t\tctx: EndpointContext<\n\t\t\tTInput,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tTSession,\n\t\t\tTAuditAction,\n\t\t\tTDatabase,\n\t\t\tTAuditStorage\n\t\t>,\n\t\tresponse: ResponseBuilder,\n\t): OutSchema extends StandardSchemaV1\n\t\t? // Handler produces the output schema's INPUT type (the schema\n\t\t\t// may coerce it on the way out — see EndpointHandler).\n\t\t\t\t| InferStandardSchemaInput<OutSchema>\n\t\t\t\t| ResponseWithMetadata<InferStandardSchemaInput<OutSchema>>\n\t\t\t\t| Promise<InferStandardSchemaInput<OutSchema>>\n\t\t\t\t| Promise<ResponseWithMetadata<InferStandardSchemaInput<OutSchema>>>\n\t\t:\n\t\t\t\t| any\n\t\t\t\t| ResponseWithMetadata<any>\n\t\t\t\t| Promise<any>\n\t\t\t\t| Promise<ResponseWithMetadata<any>> => {\n\t\t// Apply default headers to response builder\n\t\tfor (const [key, value] of Object.entries(this.defaultHeaders)) {\n\t\t\tresponse.header(key, value);\n\t\t}\n\n\t\t// Build context object, conditionally including auditor and db\n\t\tconst handlerCtx = {\n\t\t\t...this.refineInput(ctx),\n\t\t\tservices: ctx.services,\n\t\t\tlogger: ctx.logger,\n\t\t\theader: ctx.header,\n\t\t\tcookie: ctx.cookie,\n\t\t\tsession: ctx.session,\n\t\t\t// These are conditionally present based on configuration\n\t\t\t...('auditor' in ctx && { auditor: ctx.auditor }),\n\t\t\t...('db' in ctx && { db: ctx.db }),\n\t\t} as EndpointContext<\n\t\t\tTInput,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tTSession,\n\t\t\tTAuditAction,\n\t\t\tTDatabase,\n\t\t\tTAuditStorage\n\t\t>;\n\n\t\treturn this.endpointFn(handlerCtx, response);\n\t};\n\n\t/**\n\t * Type guard to check if an object is an Endpoint instance.\n\t *\n\t * @param obj - The object to check\n\t * @returns True if the object is an Endpoint\n\t */\n\tstatic isEndpoint(obj: any): obj is Endpoint<any, any, any, any> {\n\t\treturn Boolean(\n\t\t\tobj &&\n\t\t\t\t(obj as Function).__IS_FUNCTION__ === true &&\n\t\t\t\tobj.type === ConstructType.Endpoint,\n\t\t);\n\t}\n\n\t/**\n\t * Helper to check if response has metadata\n\t */\n\tstatic hasMetadata<T>(\n\t\tresponse: T | ResponseWithMetadata<T>,\n\t): response is ResponseWithMetadata<T> {\n\t\treturn (\n\t\t\tresponse !== null &&\n\t\t\ttypeof response === 'object' &&\n\t\t\t'data' in response &&\n\t\t\t'metadata' in response\n\t\t);\n\t}\n\n\t/**\n\t * Converts Express-style route params to OpenAPI format.\n\t * @returns Route with ':param' converted to '{param}'\n\t * @internal\n\t */\n\tget _path() {\n\t\treturn this.route.replace(/:(\\w+)/g, '{$1}') as ConvertRouteParams<TRoute>;\n\t}\n\n\t/**\n\t * Generates OpenAPI 3.1 schema for this endpoint.\n\t *\n\t * @returns OpenAPI route definition with operation details\n\t */\n\tasync toOpenApi3Route(\n\t\tcomponentCollector?: ComponentCollector,\n\t): Promise<EndpointOpenApiSchema<TRoute, TMethod>> {\n\t\tconst operation: OpenAPIV3_1.OperationObject = {\n\t\t\toperationId: this.operationId,\n\t\t\t...(this.description && { description: this.description }),\n\t\t\t...(this.tags && this.tags.length > 0 && { tags: this.tags }),\n\t\t\tresponses: {\n\t\t\t\t'200': {\n\t\t\t\t\tdescription: 'Successful response',\n\t\t\t\t} as OpenAPIV3_1.ResponseObject,\n\t\t\t},\n\t\t};\n\n\t\t// Add response schema\n\t\tif (this.outputSchema) {\n\t\t\tconst responseSchema = await convertSchemaWithComponents(\n\t\t\t\tthis.outputSchema,\n\t\t\t\tcomponentCollector,\n\t\t\t);\n\t\t\tif (responseSchema) {\n\t\t\t\tset(\n\t\t\t\t\toperation,\n\t\t\t\t\t['responses', '200', 'content', this.responseType, 'schema'],\n\t\t\t\t\tresponseSchema,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Separate path and query parameters\n\t\tconst pathParameters: OpenAPIV3_1.ParameterObject[] = [];\n\t\tconst queryParameters: OpenAPIV3_1.ParameterObject[] = [];\n\n\t\t// Since the EndpointBuilder doesn't have body/search/params methods yet,\n\t\t// and the input is a composite type, we need to check if input exists\n\t\t// and has the expected shape\n\t\tif (this.input && typeof this.input === 'object') {\n\t\t\t// Add request body for methods that support it\n\t\t\tif (\n\t\t\t\t['POST', 'PUT', 'PATCH'].includes(this.method) &&\n\t\t\t\t'body' in this.input &&\n\t\t\t\tthis.input.body\n\t\t\t) {\n\t\t\t\tconst bodySchema = await convertSchemaWithComponents(\n\t\t\t\t\tthis.input.body as StandardSchemaV1,\n\t\t\t\t\tcomponentCollector,\n\t\t\t\t);\n\t\t\t\tif (bodySchema) {\n\t\t\t\t\tset(operation, ['requestBody'], {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\t\tschema: bodySchema,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add path parameters\n\t\t\tif ('params' in this.input && this.input.params) {\n\t\t\t\tconst paramsSchema = await convertStandardSchemaToJsonSchema(\n\t\t\t\t\tthis.input.params as StandardSchemaV1,\n\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\tparamsSchema &&\n\t\t\t\t\tparamsSchema.type === 'object' &&\n\t\t\t\t\tparamsSchema.properties\n\t\t\t\t) {\n\t\t\t\t\tfor (const [name, schema] of Object.entries(\n\t\t\t\t\t\tparamsSchema.properties,\n\t\t\t\t\t)) {\n\t\t\t\t\t\tpathParameters.push({\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tin: 'path',\n\t\t\t\t\t\t\trequired: paramsSchema.required?.includes(name) ?? true,\n\t\t\t\t\t\t\tschema: schema as any,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add query parameters\n\t\t\tif ('query' in this.input && this.input.query) {\n\t\t\t\tconst querySchema = await convertStandardSchemaToJsonSchema(\n\t\t\t\t\tthis.input.query,\n\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\tquerySchema &&\n\t\t\t\t\tquerySchema.type === 'object' &&\n\t\t\t\t\tquerySchema.properties\n\t\t\t\t) {\n\t\t\t\t\tfor (const [name, schema] of Object.entries(querySchema.properties)) {\n\t\t\t\t\t\tqueryParameters.push({\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tin: 'query',\n\t\t\t\t\t\t\trequired: querySchema.required?.includes(name) ?? false,\n\t\t\t\t\t\t\tschema: schema as any,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Only add query parameters to the operation\n\t\tif (queryParameters.length > 0) {\n\t\t\toperation.parameters = queryParameters;\n\t\t}\n\n\t\t// Build the route object with path parameters at the route level\n\t\tconst routeObject: any = {};\n\t\tif (pathParameters.length > 0) {\n\t\t\trouteObject.parameters = pathParameters;\n\t\t}\n\t\trouteObject[this.method.toLowerCase()] = operation;\n\n\t\treturn {\n\t\t\t[this._path]: routeObject,\n\t\t} as EndpointOpenApiSchema<TRoute, TMethod>;\n\t}\n\n\t/**\n\t * Creates a new Endpoint instance.\n\t *\n\t * @param options - Configuration options for the endpoint\n\t * @param options.fn - The handler function to execute\n\t * @param options.method - HTTP method\n\t * @param options.route - Route path with parameter placeholders\n\t * @param options.description - Optional description for documentation\n\t * @param options.input - Input schemas for validation\n\t * @param options.logger - Logger instance\n\t * @param options.output - Output schema for response validation\n\t * @param options.services - Service dependencies\n\t * @param options.timeout - Execution timeout in milliseconds\n\t * @param options.getSession - Session extraction function\n\t * @param options.authorize - Authorization check function\n\t * @param options.status - Success HTTP status code (default: 200)\n\t * @param options.authorizer - Optional authorizer configuration\n\t */\n\tconstructor({\n\t\tfn,\n\t\tmethod,\n\t\troute,\n\t\tdescription,\n\t\ttags,\n\t\tinput,\n\t\tlogger,\n\t\toutput: outputSchema,\n\t\tservices,\n\t\tconstructs,\n\t\ttimeout,\n\t\tmemorySize,\n\t\tgetSession,\n\t\tauthorize,\n\t\trateLimit,\n\t\tstatus = SuccessStatus.OK,\n\t\tpublisherService,\n\t\tevents,\n\t\tauthorizer,\n\t\tsurface,\n\t\tauditorStorageService,\n\t\tactorExtractor,\n\t\taudits,\n\t\tdatabaseService,\n\t\trlsConfig,\n\t\trlsBypass,\n\t\tresponseType,\n\t}: EndpointOptions<\n\t\tTRoute,\n\t\tTMethod,\n\t\tTInput,\n\t\tOutSchema,\n\t\tTServices,\n\t\tTLogger,\n\t\tTSession,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTAuditStorage,\n\t\tTAuditStorageServiceName,\n\t\tTAuditAction,\n\t\tTDatabase,\n\t\tTDatabaseServiceName\n\t>) {\n\t\tsuper(\n\t\t\tfn as unknown as FunctionHandler<TInput, TServices, TLogger, OutSchema>,\n\t\t\ttimeout,\n\t\t\tConstructType.Endpoint,\n\t\t\tinput,\n\t\t\toutputSchema,\n\t\t\tservices,\n\t\t\tlogger,\n\t\t\tpublisherService,\n\t\t\tevents,\n\t\t\tmemorySize,\n\t\t\tauditorStorageService,\n\t\t\tundefined, // databaseService — assigned below, after the RLS wiring\n\t\t\tconstructs,\n\t\t);\n\n\t\tthis.route = route;\n\t\tthis.method = method;\n\t\tthis.description = description;\n\t\tthis.tags = tags;\n\t\tthis.status = status;\n\t\tthis.responseType = responseType ?? 'application/json';\n\t\tthis.endpointFn = fn;\n\n\t\tif (getSession) {\n\t\t\tthis.getSession = getSession;\n\t\t}\n\n\t\tif (authorize) {\n\t\t\tthis.authorize = authorize;\n\t\t}\n\n\t\tif (rateLimit) {\n\t\t\tthis.rateLimit = rateLimit;\n\t\t}\n\n\t\tif (authorizer) {\n\t\t\tthis.authorizer = authorizer;\n\t\t}\n\n\t\tthis.surface = surface;\n\n\t\tif (actorExtractor) {\n\t\t\tthis.actorExtractor = actorExtractor;\n\t\t}\n\n\t\tif (audits) {\n\t\t\tthis.audits = audits;\n\t\t}\n\n\t\tif (databaseService) {\n\t\t\tthis.databaseService = databaseService;\n\t\t}\n\n\t\tif (rlsConfig) {\n\t\t\tthis.rlsConfig = rlsConfig;\n\t\t}\n\n\t\tif (rlsBypass) {\n\t\t\tthis.rlsBypass = rlsBypass;\n\t\t}\n\t}\n}\n\n/**\n * Defines the input schema structure for an endpoint.\n *\n * @template TBody - Schema for request body validation\n * @template TSearch - Schema for query string validation\n * @template TParams - Schema for URL path parameters validation\n *\n * @example\n * ```typescript\n * type UserInput = EndpointInput<\n * typeof createUserBodySchema,\n * typeof userQuerySchema,\n * typeof userParamsSchema\n * >;\n * ```\n */\nexport type EndpointInput<\n\tTBody extends StandardSchemaV1 | undefined = undefined,\n\tTSearch extends StandardSchemaV1 | undefined = undefined,\n\tTParams extends StandardSchemaV1 | undefined = undefined,\n> = RemoveUndefined<{\n\tbody: TBody;\n\tsearch: TSearch;\n\tparams: TParams;\n}>;\n\n/**\n * The surface an endpoint was built from.\n *\n * An endpoint created with `api.get('/users')` knows which API serves it, and\n * through that, the two things every handler needs and no handler should have\n * to name: the process's logger and its environment parser.\n *\n * This is what makes the generated code smaller than the thing it replaced. A\n * handler used to be wired by an import the build wrote for it —\n * `import { envParser } from '../../config/env'` — which meant the parser had\n * to be named in config as a module path, because a generator can print a\n * specifier and cannot print an object. Built from the surface, the endpoint\n * already carries it, so there is nothing to name and nothing to print.\n *\n * `id` is the surface's construct id, which is how the build attributes a route\n * to the API that serves it rather than guessing by exclusion.\n */\nexport interface EndpointSurface {\n\t/** The surface's construct id — `Api`, `Auth`. */\n\tid: string;\n\t/**\n\t * The environment parser every handler on this surface runs with.\n\t *\n\t * A value the surface holds, never a place to do work: constructs are\n\t * imported by discovery before any URL exists, so a parser that reads a\n\t * file or throws on a missing variable would do it at build time.\n\t */\n\tenvParser: EnvironmentParser<{}>;\n}\n\n/**\n * Configuration options for creating an Endpoint instance.\n *\n * @template TRoute - The route path string\n * @template TMethod - The HTTP method\n * @template TInput - Input schema definitions\n * @template TOutput - Output schema definition\n * @template TServices - Service dependencies array\n * @template TLogger - Logger type\n * @template TSession - Session data type\n */\nexport interface EndpointOptions<\n\tTRoute extends string,\n\tTMethod extends HttpMethod,\n\tTInput extends EndpointSchemas = {},\n\tTOutput extends StandardSchemaV1 | undefined = undefined,\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTAuditStorage extends AuditStorage | undefined = undefined,\n\tTAuditStorageServiceName extends string = string,\n\tTAuditAction extends AuditableAction<string, unknown> = AuditableAction<\n\t\tstring,\n\t\tunknown\n\t>,\n\tTDatabase = undefined,\n\tTDatabaseServiceName extends string = string,\n> {\n\t/** The route path with parameter placeholders */\n\troute: TRoute;\n\t/** The HTTP method for this endpoint */\n\tmethod: TMethod;\n\t/** The handler function that implements the endpoint logic */\n\tfn: EndpointHandler<\n\t\tTInput,\n\t\tTServices,\n\t\tTLogger,\n\t\tTOutput,\n\t\tTSession,\n\t\tTDatabase,\n\t\tTAuditStorage,\n\t\tTAuditAction\n\t>;\n\t/** Optional authorization check function */\n\tauthorize:\n\t\t| AuthorizeFn<TServices, TLogger, TSession, TInput, TDatabase>\n\t\t| undefined;\n\t/** Optional description for documentation */\n\tdescription: string | undefined;\n\t/** Optional tags for OpenAPI documentation */\n\ttags?: string[];\n\t/** Optional execution timeout in milliseconds */\n\ttimeout: number | undefined;\n\t/** Optional memory size in MB for serverless deployments */\n\tmemorySize: number | undefined;\n\t/** Input validation schemas */\n\tinput: TInput | undefined;\n\t/** Output validation schema */\n\toutput: TOutput | undefined;\n\t/** Service dependencies to inject */\n\tservices: TServices;\n\t/**\n\t * The ids of the constructs `.dependsOn()` named.\n\t *\n\t * The same edges as `services`, kept in the form the manifest records rather\n\t * than the form the handler runs with.\n\t */\n\tconstructs?: string[];\n\t/** Logger instance */\n\tlogger: TLogger;\n\t/** Optional session extraction function */\n\tgetSession: SessionFn<TServices, TLogger, TSession, TDatabase> | undefined;\n\t/** Optional rate limiting configuration */\n\trateLimit?: RateLimitConfig;\n\t/** Success HTTP status code */\n\tstatus: SuccessStatus | undefined;\n\t/**\n\t * Event publisher service for publishing events from this endpoint\n\t */\n\tpublisherService?: Service<TEventPublisherServiceName, TEventPublisher>;\n\n\tevents?: MappedEvent<TEventPublisher, OutSchema>[];\n\t/** Optional authorizer configuration */\n\tauthorizer?: Authorizer;\n\t/** The surface this endpoint was built from. Every endpoint has one. */\n\tsurface: EndpointSurface;\n\t/**\n\t * Auditor storage service for persisting audit records from this endpoint\n\t */\n\tauditorStorageService?: Service<TAuditStorageServiceName, TAuditStorage>;\n\t/** Optional actor extractor function for audit records */\n\tactorExtractor?: ActorExtractor<TServices, TSession, TLogger>;\n\t/** Declarative audit definitions */\n\taudits?: MappedAudit<TAuditAction, OutSchema>[];\n\t/** Database service for this endpoint */\n\tdatabaseService?: Service<TDatabaseServiceName, TDatabase>;\n\t/** RLS configuration for this endpoint */\n\trlsConfig?: RlsConfig<TServices, TSession, TLogger>;\n\t/** Whether to bypass RLS for this endpoint */\n\trlsBypass?: boolean;\n\t/**\n\t * Response content type (e.g. `'application/json'`, `'text/html'`).\n\t * Defaults to `'application/json'` when omitted.\n\t */\n\tresponseType?: string;\n}\n\n/**\n * Defines the possible input schema types for an endpoint.\n * Each property represents a different part of the HTTP request.\n */\nexport type EndpointSchemas = Partial<{\n\t/** Schema for URL path parameters (e.g., /users/:id) */\n\tparams: StandardSchemaV1;\n\t/** Schema for query string parameters */\n\tquery: StandardSchemaV1;\n\t/** Schema for request body (POST, PUT, PATCH) */\n\tbody: StandardSchemaV1;\n}>;\n\nexport type AuthorizeContext<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tTInput extends EndpointSchemas | undefined = undefined,\n\tTDatabase = undefined,\n> = {\n\tservices: ServiceRecord<TServices>;\n\tlogger: TLogger;\n\theader: HeaderFn;\n\tcookie: CookieFn;\n\tsession: TSession;\n} & InferComposableStandardSchema<TInput> &\n\tSessionDatabaseContext<TDatabase>;\n/**\n * Function type for endpoint authorization checks.\n *\n * @template TServices - Available service dependencies\n * @template TLogger - Logger type\n * @template TSession - Session data type\n *\n * @param ctx - Context containing services, logger, headers, and session\n * @returns Boolean indicating if the request is authorized\n *\n * @example\n * ```typescript\n * const authorize: AuthorizeFn = ({ session }) => {\n * return session.userId !== undefined;\n * };\n * ```\n */\nexport type AuthorizeFn<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tTInput extends EndpointSchemas | undefined = undefined,\n\tTDatabase = undefined,\n> = (\n\tctx: AuthorizeContext<TServices, TLogger, TSession, TInput, TDatabase>,\n) => Promise<boolean> | boolean;\n\n/**\n * Base session context without database\n */\ntype BaseSessionContext<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n> = {\n\tservices: ServiceRecord<TServices>;\n\tlogger: TLogger;\n\theader: HeaderFn;\n\tcookie: CookieFn;\n};\n\n/**\n * Conditional database context for session - only present when database service is configured\n */\ntype SessionDatabaseContext<TDatabase = undefined> = TDatabase extends undefined\n\t? {}\n\t: {\n\t\t\t/**\n\t\t\t * Database instance for session extraction.\n\t\t\t * Available when a database service is configured via `.database()`.\n\t\t\t * Useful for looking up user data from the database based on auth tokens.\n\t\t\t */\n\t\t\tdb: TDatabase;\n\t\t};\n\nexport type SessionContext<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTDatabase = undefined,\n> = BaseSessionContext<TServices, TLogger> & SessionDatabaseContext<TDatabase>;\n/**\n * Function type for extracting session data from a request.\n *\n * @template TServices - Available service dependencies\n * @template TLogger - Logger type\n * @template TSession - Session data type to extract\n * @template TDatabase - Database type (when database service is configured)\n *\n * @param ctx - Context containing services, logger, headers, and optionally database\n * @returns The extracted session data\n *\n * @example\n * ```typescript\n * // Without database\n * const getSession: SessionFn<Services, Logger, UserSession> = async ({ header, services }) => {\n * const token = header('authorization');\n * return await services.auth.verifyToken(token);\n * };\n *\n * // With database\n * const getSession: SessionFn<Services, Logger, UserSession, Database> = async ({ header, db }) => {\n * const token = header('authorization');\n * const user = await db.selectFrom('users').where('token', '=', token).executeTakeFirst();\n * return { userId: user?.id };\n * };\n * ```\n */\nexport type SessionFn<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tTDatabase = undefined,\n> = (\n\tctx: SessionContext<TServices, TLogger, TDatabase>,\n) => Promise<TSession> | TSession;\n\n/**\n * Utility type that converts Express-style route parameters to OpenAPI format.\n * Transforms ':param' syntax to '{param}' syntax.\n *\n * @template T - The route string to convert\n *\n * @example\n * ```typescript\n * type Route1 = ConvertRouteParams<'/users/:id'>; // '/users/{id}'\n * type Route2 = ConvertRouteParams<'/users/:userId/posts/:postId'>; // '/users/{userId}/posts/{postId}'\n * ```\n */\nexport type ConvertRouteParams<T extends string> =\n\tT extends `${infer Start}:${infer Param}/${infer Rest}`\n\t\t? `${Start}{${Param}}/${ConvertRouteParams<Rest>}`\n\t\t: T extends `${infer Start}:${infer Param}`\n\t\t\t? `${Start}{${Param}}`\n\t\t\t: T;\n\n/**\n * Type representing the OpenAPI schema structure for an endpoint.\n *\n * @template TRoute - The route path\n * @template TMethod - The HTTP method\n *\n * @example\n * ```typescript\n * type Schema = EndpointOpenApiSchema<'/users/:id', 'GET'>;\n * // Results in: { '/users/{id}': { get: OperationObject, parameters?: ParameterObject[] } }\n * ```\n */\nexport type EndpointOpenApiSchema<\n\tTRoute extends string,\n\tTMethod extends HttpMethod,\n> = {\n\t[key in ConvertRouteParams<TRoute>]: {\n\t\t[key in LowerHttpMethod<TMethod>]: OpenAPIV3_1.OperationObject<{}>;\n\t} & {\n\t\tparameters?: OpenAPIV3_1.ParameterObject[];\n\t};\n};\n\nexport type SingleHeaderFn = (key: string) => string | undefined;\nexport type MultiHeaderFn = () => EndpointHeaders;\n/**\n * Type representing HTTP headers as a Map.\n */\nexport type EndpointHeaders = Map<string, string>;\n\n/**\n * Function type for retrieving HTTP header values.\n * Supports two calling patterns:\n * - `header(key)` - Get a single header value (case-insensitive)\n * - `header()` - Get all headers as a plain object\n *\n * @example\n * ```typescript\n * // Get single header\n * const contentType = header('content-type');\n *\n * // Get all headers\n * const allHeaders = header();\n * // { 'content-type': 'application/json', 'host': 'example.com', ... }\n * ```\n */\nexport interface HeaderFn {\n\t(): Record<string, string>;\n\t(key: string): string | undefined;\n}\n\n/**\n * Function type for retrieving cookie values.\n * Supports two calling patterns:\n * - `cookie(name)` - Get a single cookie value\n * - `cookie()` - Get all cookies as a plain object\n *\n * @example\n * ```typescript\n * // Get single cookie\n * const sessionId = cookie('session');\n *\n * // Get all cookies\n * const allCookies = cookie();\n * // { session: 'abc123', theme: 'dark', ... }\n * ```\n */\nexport interface CookieFn {\n\t(): Record<string, string>;\n\t(name: string): string | undefined;\n}\n\n/**\n * Cookie options matching standard Set-Cookie attributes\n */\nexport interface CookieOptions {\n\tdomain?: string;\n\tpath?: string;\n\texpires?: Date;\n\tmaxAge?: number;\n\thttpOnly?: boolean;\n\tsecure?: boolean;\n\tsameSite?: 'strict' | 'lax' | 'none';\n}\n\n/**\n * Response metadata that handlers can set\n */\nexport interface ResponseMetadata {\n\theaders?: Record<string, string>;\n\tcookies?: Map<string, { value: string; options?: CookieOptions }>;\n\tstatus?: SuccessStatus;\n}\n\n/**\n * Return type for handlers that want to set response metadata\n */\nexport interface ResponseWithMetadata<T> {\n\tdata: T;\n\tmetadata: ResponseMetadata;\n}\n\n/**\n * Response builder for fluent API in handlers\n */\nexport class ResponseBuilder {\n\tprivate metadata: ResponseMetadata = {\n\t\theaders: {},\n\t\tcookies: new Map(),\n\t};\n\n\theader(key: string, value: string): this {\n\t\tthis.metadata.headers![key] = value;\n\t\treturn this;\n\t}\n\n\tcookie(name: string, value: string, options?: CookieOptions): this {\n\t\tthis.metadata.cookies?.set(name, { value, options });\n\t\treturn this;\n\t}\n\n\tdeleteCookie(\n\t\tname: string,\n\t\toptions?: Pick<CookieOptions, 'domain' | 'path'>,\n\t): this {\n\t\tthis.metadata.cookies?.set(name, {\n\t\t\tvalue: '',\n\t\t\toptions: { ...options, maxAge: 0, expires: new Date(0) },\n\t\t});\n\t\treturn this;\n\t}\n\n\tstatus(code: SuccessStatus): this {\n\t\tthis.metadata.status = code;\n\t\treturn this;\n\t}\n\n\tsend<T>(data: T): ResponseWithMetadata<T> {\n\t\treturn { data, metadata: this.metadata };\n\t}\n\n\tgetMetadata(): ResponseMetadata {\n\t\treturn this.metadata;\n\t}\n}\n\n/**\n * Base context properties that are always available\n */\ntype BaseEndpointContext<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n> = {\n\t/** Injected service instances */\n\tservices: ServiceRecord<TServices>;\n\t/** Logger instance for this request */\n\tlogger: TLogger;\n\t/** Function to retrieve request headers */\n\theader: HeaderFn;\n\t/** Function to retrieve request cookies */\n\tcookie: CookieFn;\n\t/** Session data extracted by getSession */\n\tsession: TSession;\n};\n\n/**\n * Conditional auditor context - only present when audit storage is configured\n */\ntype AuditorContext<\n\tTAuditAction extends AuditableAction<string, unknown> = AuditableAction<\n\t\tstring,\n\t\tunknown\n\t>,\n\tTAuditStorage = undefined,\n> = TAuditStorage extends undefined\n\t? {}\n\t: {\n\t\t\t/**\n\t\t\t * Auditor instance for recording audit events.\n\t\t\t * Only present when audit storage is configured on the endpoint.\n\t\t\t * When a transactional database is used for audit storage,\n\t\t\t * the auditor is pre-configured with the transaction context.\n\t\t\t */\n\t\t\tauditor: Auditor<TAuditAction>;\n\t\t};\n\n/**\n * Conditional database context - only present when database service is configured\n */\ntype DatabaseContext<TDatabase = undefined> = TDatabase extends undefined\n\t? {}\n\t: {\n\t\t\t/**\n\t\t\t * Database instance for this request.\n\t\t\t * When audit storage is configured and uses the same database,\n\t\t\t * this will be the transaction for ACID compliance.\n\t\t\t * Otherwise, it's the raw database connection.\n\t\t\t */\n\t\t\tdb: TDatabase;\n\t\t};\n\n/**\n * The execution context provided to endpoint handlers.\n * Contains all parsed input data, services, logger, headers, cookies, and session.\n *\n * @template Input - The input schemas (body, query, params)\n * @template TServices - Available service dependencies\n * @template TLogger - Logger type\n * @template TSession - Session data type\n * @template TAuditAction - Audit action types (when auditor is configured)\n * @template TDatabase - Database type (when database service is configured)\n * @template TAuditStorage - Audit storage type (determines if auditor is present)\n */\nexport type EndpointContext<\n\tInput extends EndpointSchemas | undefined = undefined,\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tTSession = unknown,\n\tTAuditAction extends AuditableAction<string, unknown> = AuditableAction<\n\t\tstring,\n\t\tunknown\n\t>,\n\tTDatabase = undefined,\n\tTAuditStorage = undefined,\n> = BaseEndpointContext<TServices, TLogger, TSession> &\n\tInferComposableStandardSchema<Input> &\n\tAuditorContext<TAuditAction, TAuditStorage> &\n\tDatabaseContext<TDatabase>;\n\n/**\n * Handler function type for endpoint implementations.\n *\n * @template TInput - Input schemas for validation\n * @template TServices - Available service dependencies\n * @template TLogger - Logger type\n * @template OutSchema - Output schema for response validation\n * @template TSession - Session data type\n *\n * @param ctx - The endpoint execution context\n * @param response - Response builder for setting cookies, headers, and status\n * @returns The response data (validated if OutSchema is provided) or ResponseWithMetadata\n *\n * @example\n * ```typescript\n * // Simple response\n * const handler: EndpointHandler<Input, [UserService], Logger, UserSchema> =\n * async ({ params, services }) => {\n * return await services.users.findById(params.id);\n * };\n *\n * // With response builder\n * const handler: EndpointHandler<Input, [UserService], Logger, UserSchema> =\n * async ({ params, services }, response) => {\n * const user = await services.users.findById(params.id);\n * return response.header('X-User-Id', user.id).send(user);\n * };\n * ```\n */\nexport type EndpointHandler<\n\tTInput extends EndpointSchemas | undefined = undefined,\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTSession = unknown,\n\tTDatabase = undefined,\n\tTAuditStorage = undefined,\n\tTAuditAction extends AuditableAction<string, unknown> = AuditableAction<\n\t\tstring,\n\t\tunknown\n\t>,\n> = (\n\tctx: EndpointContext<\n\t\tTInput,\n\t\tTServices,\n\t\tTLogger,\n\t\tTSession,\n\t\tTAuditAction,\n\t\tTDatabase,\n\t\tTAuditStorage\n\t>,\n\tresponse: ResponseBuilder,\n) => OutSchema extends StandardSchemaV1\n\t? // The handler must produce the schema's INPUT type — the output\n\t\t// schema is allowed to coerce it (e.g. a `Date` → ISO `string`),\n\t\t// so the handler may return the looser input while consumers\n\t\t// (EndpointOutput / the generated client) still see the parsed\n\t\t// output type.\n\t\t\t| InferStandardSchemaInput<OutSchema>\n\t\t\t| ResponseWithMetadata<InferStandardSchemaInput<OutSchema>>\n\t\t\t| Promise<InferStandardSchemaInput<OutSchema>>\n\t\t\t| Promise<ResponseWithMetadata<InferStandardSchemaInput<OutSchema>>>\n\t:\n\t\t\t| unknown\n\t\t\t| ResponseWithMetadata<unknown>\n\t\t\t| Promise<unknown>\n\t\t\t| Promise<ResponseWithMetadata<unknown>>;\n\n/**\n * HTTP success status codes that can be returned by endpoints.\n */\nexport enum SuccessStatus {\n\t/** Standard response for successful HTTP requests */\n\tOK = 200,\n\t/** Request has been fulfilled and resulted in a new resource being created */\n\tCreated = 201,\n\t/** Request has been accepted for processing, but processing is not complete */\n\tAccepted = 202,\n\t/** Server successfully processed the request but is not returning any content */\n\tNoContent = 204,\n\t/** Server successfully processed the request and is not returning any content, client should reset the document view */\n\tResetContent = 205,\n\t/** Server is delivering only part of the resource due to a range header */\n\tPartialContent = 206,\n}\n\nexport type EndpointOutput<T> =\n\tT extends Endpoint<any, any, any, infer OutSchema, any, any, any, any>\n\t\t? InferStandardSchema<OutSchema>\n\t\t: never;\n\nexport type EndpointEvent<T> =\n\tT extends Endpoint<any, any, any, any, any, any, any, infer TEventPublisher>\n\t\t? ExtractPublisherMessage<TEventPublisher>\n\t\t: never;\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;;;CAUA,IAAIA,aAAW,UACXC,qBAAmB;;CAGvB,IAAI,UAAU,sBACVC,YAAU,qBACVC,WAAS,8BACTC,cAAY;;CAGhB,IAAIC,sBAAoB,UAAU,YAAY,UAAU,OAAO,WAAW,UAAU;;CAGpF,IAAIC,oBAAkB,QAAQ,YAAY,QAAQ,KAAK,WAAW,UAAU;;CAG5E,IAAIC,SAAOF,gBAAcC,cAAY,SAAS,cAAc,EAAE;;;;;;;;;;;CAY9D,SAAS,MAAM,MAAM,SAAS,MAAM;AAClC,UAAQ,KAAK,QAAb;GACE,KAAK,EAAG,QAAO,KAAK,KAAK,QAAQ;GACjC,KAAK,EAAG,QAAO,KAAK,KAAK,SAAS,KAAK,GAAG;GAC1C,KAAK,EAAG,QAAO,KAAK,KAAK,SAAS,KAAK,IAAI,KAAK,GAAG;GACnD,KAAK,EAAG,QAAO,KAAK,KAAK,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG;EAC7D;AACD,SAAO,KAAK,MAAM,SAAS,KAAK;CACjC;;;;;;;;;;CAWD,SAAS,SAAS,OAAO,UAAU;EACjC,IAAI,QAAQ,IACR,SAAS,QAAQ,MAAM,SAAS,GAChC,SAAS,MAAM,OAAO;AAE1B,SAAO,EAAE,QAAQ,OACf,QAAO,SAAS,SAAS,MAAM,QA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