sdk-aws-lambda 0.5.0 → 0.7.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 (183) hide show
  1. package/dist/domain.objects/ApiGatewayRequestEventOnwire.d.ts +18 -0
  2. package/dist/domain.objects/ApiGatewayRequestEventOnwire.js +3 -0
  3. package/dist/domain.objects/ApiGatewayRequestEventOnwire.js.map +1 -0
  4. package/dist/domain.objects/ApiGatewayResponse.d.ts +17 -10
  5. package/dist/domain.objects/{ApiGatewayResponsePayload.d.ts → ApiGatewayResponseOnwire.d.ts} +8 -4
  6. package/dist/domain.objects/{ApiGatewayRequestPayload.js → ApiGatewayResponseOnwire.js} +1 -1
  7. package/dist/domain.objects/ApiGatewayResponseOnwire.js.map +1 -0
  8. package/dist/domain.operations/genLambdaEndpoint/InvokeInputSuperset.d.ts +125 -0
  9. package/dist/domain.operations/genLambdaEndpoint/{genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.js → InvokeInputSuperset.js} +1 -1
  10. package/dist/domain.operations/genLambdaEndpoint/InvokeInputSuperset.js.map +1 -0
  11. package/dist/domain.operations/genLambdaEndpoint/TranslateLog.d.ts +0 -17
  12. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.d.ts +27 -0
  13. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.d.ts +100 -0
  14. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.js +3 -0
  15. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.js.map +1 -0
  16. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.d.ts +34 -0
  17. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.js +141 -0
  18. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.js.map +1 -0
  19. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.d.ts +22 -0
  20. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.js +27 -0
  21. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.js.map +1 -0
  22. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{asApiGatewayResponsePayloadJson.d.ts → asApiGatewayResponseOnwireJson.d.ts} +11 -11
  23. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{asApiGatewayResponsePayloadJson.js → asApiGatewayResponseOnwireJson.js} +12 -12
  24. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwireJson.js.map +1 -0
  25. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.d.ts +39 -13
  26. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.js +37 -11
  27. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.js.map +1 -1
  28. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.d.ts +35 -0
  29. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.js +44 -0
  30. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.js.map +1 -0
  31. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.d.ts +95 -39
  32. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js +88 -62
  33. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js.map +1 -1
  34. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getAllWirePayloadKeysFound.d.ts → getAllResponseOnwireKeysFound.d.ts} +2 -2
  35. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllResponseOnwireKeysFound.js +43 -0
  36. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllResponseOnwireKeysFound.js.map +1 -0
  37. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV1ApiGatewayEvent.d.ts → getIsV1ApiGatewayRequestEvent.d.ts} +1 -1
  38. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV1ApiGatewayEvent.js → getIsV1ApiGatewayRequestEvent.js} +4 -4
  39. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV1ApiGatewayRequestEvent.js.map +1 -0
  40. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV2ApiGatewayEvent.d.ts → getIsV2ApiGatewayRequestEvent.d.ts} +1 -1
  41. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV2ApiGatewayEvent.js → getIsV2ApiGatewayRequestEvent.js} +4 -4
  42. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV2ApiGatewayRequestEvent.js.map +1 -0
  43. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.d.ts +8 -5
  44. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.js +11 -8
  45. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.js.map +1 -1
  46. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/{genApiGatewayEventNormalizationMiddleware.d.ts → genApiGatewayRequestEventNormalizationMiddleware.d.ts} +3 -3
  47. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/{genApiGatewayEventNormalizationMiddleware.js → genApiGatewayRequestEventNormalizationMiddleware.js} +8 -8
  48. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayRequestEventNormalizationMiddleware.js.map +1 -0
  49. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genContentTypeCoherenceMiddleware.d.ts +4 -4
  50. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genContentTypeCoherenceMiddleware.js +5 -5
  51. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.d.ts +36 -0
  52. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.js +113 -0
  53. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.js.map +1 -0
  54. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.d.ts +125 -0
  55. package/dist/domain.operations/genLambdaEndpoint/{genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.js → genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js} +32 -16
  56. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js.map +1 -0
  57. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.d.ts +18 -0
  58. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.js +29 -0
  59. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.js.map +1 -0
  60. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.d.ts +23 -0
  61. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.js +38 -0
  62. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.js.map +1 -0
  63. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.d.ts +123 -0
  64. package/dist/{domain.objects/ApiGatewayResponsePayload.js → domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.js} +1 -1
  65. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.js.map +1 -0
  66. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.d.ts +23 -0
  67. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js +33 -0
  68. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js.map +1 -0
  69. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.d.ts +30 -0
  70. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js +38 -0
  71. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js.map +1 -0
  72. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.d.ts +30 -0
  73. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js +86 -0
  74. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js.map +1 -0
  75. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.d.ts +26 -0
  76. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.js +32 -0
  77. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.js.map +1 -0
  78. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.d.ts +82 -0
  79. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js +108 -0
  80. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js.map +1 -0
  81. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.d.ts +121 -0
  82. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js +97 -0
  83. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js.map +1 -0
  84. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.d.ts +52 -0
  85. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js +68 -0
  86. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js.map +1 -0
  87. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.d.ts +21 -0
  88. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.js +36 -0
  89. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.js.map +1 -0
  90. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.d.ts +46 -0
  91. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js +79 -0
  92. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js.map +1 -0
  93. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.js +31 -0
  94. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.js.map +1 -0
  95. package/dist/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.d.ts +8 -4
  96. package/dist/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.js.map +1 -1
  97. package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.d.ts +1 -1
  98. package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.js +19 -1
  99. package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.js.map +1 -1
  100. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.d.ts +10 -4
  101. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.d.ts +0 -4
  102. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.js +224 -3
  103. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.js.map +1 -1
  104. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.d.ts +12 -0
  105. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.js +23 -0
  106. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.js.map +1 -0
  107. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.js +17 -6
  108. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.js.map +1 -1
  109. package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.d.ts +16 -18
  110. package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.js +16 -18
  111. package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.js.map +1 -1
  112. package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.d.ts +5 -0
  113. package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js +5 -0
  114. package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js.map +1 -1
  115. package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.d.ts +22 -14
  116. package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.js +23 -15
  117. package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.js.map +1 -1
  118. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.d.ts +19 -0
  119. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.js +26 -0
  120. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.js.map +1 -0
  121. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.d.ts +17 -0
  122. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.js +40 -1
  123. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.js.map +1 -1
  124. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.d.ts +15 -0
  125. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.js +97 -9
  126. package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.js.map +1 -1
  127. package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.d.ts +20 -0
  128. package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.js +31 -2
  129. package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.js.map +1 -1
  130. package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.d.ts +78 -0
  131. package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.js +103 -0
  132. package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.js.map +1 -0
  133. package/dist/domain.operations/genServiceSdk/gen.file/banner.d.ts +2 -3
  134. package/dist/domain.operations/genServiceSdk/gen.file/banner.js +2 -3
  135. package/dist/domain.operations/genServiceSdk/gen.file/banner.js.map +1 -1
  136. package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.d.ts +7 -2
  137. package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.js +7 -2
  138. package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.js.map +1 -1
  139. package/dist/domain.operations/genServiceSdk/gen.mechanism/getTypescriptFromJsonSchema.js +24 -19
  140. package/dist/domain.operations/genServiceSdk/gen.mechanism/getTypescriptFromJsonSchema.js.map +1 -1
  141. package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.d.ts +10 -3
  142. package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.js +10 -3
  143. package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.js.map +1 -1
  144. package/dist/domain.operations/genServiceSdk/gen.resource/assertAllDomainObjectRefsBind.js +9 -23
  145. package/dist/domain.operations/genServiceSdk/gen.resource/assertAllDomainObjectRefsBind.js.map +1 -1
  146. package/dist/domain.operations/genServiceSdk/gen.resource/getAllDomainObjectsFromContracts.js +11 -18
  147. package/dist/domain.operations/genServiceSdk/gen.resource/getAllDomainObjectsFromContracts.js.map +1 -1
  148. package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.d.ts +59 -0
  149. package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.js +87 -0
  150. package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.js.map +1 -0
  151. package/dist/index.d.ts +63 -18
  152. package/dist/index.js +45 -14
  153. package/dist/index.js.map +1 -1
  154. package/package.json +6 -6
  155. package/readme.md +212 -60
  156. package/dist/domain.objects/ApiGatewayRequestPayload.d.ts +0 -12
  157. package/dist/domain.objects/ApiGatewayRequestPayload.js.map +0 -1
  158. package/dist/domain.objects/ApiGatewayResponsePayload.js.map +0 -1
  159. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.d.ts +0 -36
  160. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.js.map +0 -1
  161. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.d.ts +0 -19
  162. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.js +0 -24
  163. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.js.map +0 -1
  164. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayloadJson.js.map +0 -1
  165. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.d.ts +0 -27
  166. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.js +0 -118
  167. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.js.map +0 -1
  168. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllWirePayloadKeysFound.js +0 -34
  169. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllWirePayloadKeysFound.js.map +0 -1
  170. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV1ApiGatewayEvent.js.map +0 -1
  171. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV2ApiGatewayEvent.js.map +0 -1
  172. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayEventNormalizationMiddleware.js.map +0 -1
  173. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.d.ts +0 -27
  174. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.js +0 -54
  175. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.js.map +0 -1
  176. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.d.ts +0 -64
  177. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.js.map +0 -1
  178. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.d.ts +0 -20
  179. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.js +0 -31
  180. package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.js.map +0 -1
  181. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.d.ts +0 -5
  182. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.js +0 -16
  183. package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.js.map +0 -1
@@ -1,12 +0,0 @@
1
- import type { APIGatewayProxyEvent, APIGatewayProxyEventV2 } from 'aws-lambda';
2
- /**
3
- * .what = the wire payload an api-gateway trigger delivers, either version
4
- * .why = api gateway ships two incompatible request shapes (rest/v1, http/v2), and a
5
- * handler must be able to name the shape as it LANDS, before any translate runs
6
- *
7
- * .note = this is the `inputBefore` point: the untouched bytes-as-parsed, before the
8
- * input translator. its peer at the other end of the pipeline is
9
- * `ApiGatewayResponsePayload` — request/response, each qualified by `Payload`
10
- * to mark it as the wire form
11
- */
12
- export type ApiGatewayRequestPayload = APIGatewayProxyEvent | APIGatewayProxyEventV2;
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiGatewayRequestPayload.js","sourceRoot":"","sources":["../../src/domain.objects/ApiGatewayRequestPayload.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiGatewayResponsePayload.js","sourceRoot":"","sources":["../../src/domain.objects/ApiGatewayResponsePayload.ts"],"names":[],"mappings":""}
@@ -1,36 +0,0 @@
1
- import type { ApiGatewayRequestPayload } from '../../../domain.objects/ApiGatewayRequestPayload';
2
- /**
3
- * .what = an api-gateway request with v1/v2 differences reconciled
4
- * .why = v1 puts the method at `httpMethod` and v2 at `requestContext.http.method`. a
5
- * handler that reads either directly is version-locked, so the sdk reconciles them
6
- * once and hands over one shape
7
- *
8
- * .note = `Unified` carries weight, never decoration: this is NOT the wire shape. the wire
9
- * shape is `ApiGatewayRequestPayload`, the raw v1|v2 union. this is a step the
10
- * default input translator takes on the way to `inputAfter`
11
- */
12
- export interface UnifiedApiGatewayEvent {
13
- httpMethod: string;
14
- path: string;
15
- headers: Record<string, string | undefined>;
16
- queryStringParameters: Record<string, string | undefined> | null;
17
- pathParameters: Record<string, string | undefined> | null;
18
- body: unknown;
19
- rawBody: string | null;
20
- isBase64Encoded: boolean;
21
- requestContext: {
22
- requestId: string;
23
- stage: string;
24
- domainName?: string;
25
- accountId?: string;
26
- };
27
- /**
28
- * .what = the ejection route — the wire payload, before this shape reconciled it
29
- * .why = `_` marks it as an escape hatch rather than a paved path. every field above is
30
- * version-agnostic; reach in here and you are version-locked again, so a reader who
31
- * sees `_` knows they have left the supported surface
32
- */
33
- _: {
34
- raw: ApiGatewayRequestPayload;
35
- };
36
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnifiedApiGatewayEvent.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.ts"],"names":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- import type { ApiGatewayResponse } from '../../../domain.objects/ApiGatewayResponse';
2
- import type { ApiGatewayResponsePayload } from '../../../domain.objects/ApiGatewayResponsePayload';
3
- /**
4
- * .what = the default output translator: what `invoke` returns becomes the wire payload
5
- *
6
- * .note = `status` defaults HERE, ahead of every middleware — middy's `normalizeHttpResponse`
7
- * applies `statusCode ??= 500`, so a later default would put a server-fault on the wire
8
- * for a handler that meant 200
9
- *
10
- * .note = `body` is OMITTED, never `''` — the serializer would encode `''` into `'""'`. it is
11
- * left as the DOMAIN value for the serializer to encode one step later, which is what
12
- * lets a handler's own `Content-Type` carry bytes through untouched
13
- *
14
- * ⚠️ the omission holds at the WIRE, not mid-chain: the serializer re-adds `body` as an
15
- * own key with value `undefined`. benign, and visible in the unit snapshots
16
- */
17
- export declare const asApiGatewayResponsePayload: <TBody>(input: {
18
- response: ApiGatewayResponse<TBody>;
19
- }) => ApiGatewayResponsePayload<TBody>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asApiGatewayResponsePayload = void 0;
4
- /**
5
- * .what = the default output translator: what `invoke` returns becomes the wire payload
6
- *
7
- * .note = `status` defaults HERE, ahead of every middleware — middy's `normalizeHttpResponse`
8
- * applies `statusCode ??= 500`, so a later default would put a server-fault on the wire
9
- * for a handler that meant 200
10
- *
11
- * .note = `body` is OMITTED, never `''` — the serializer would encode `''` into `'""'`. it is
12
- * left as the DOMAIN value for the serializer to encode one step later, which is what
13
- * lets a handler's own `Content-Type` carry bytes through untouched
14
- *
15
- * ⚠️ the omission holds at the WIRE, not mid-chain: the serializer re-adds `body` as an
16
- * own key with value `undefined`. benign, and visible in the unit snapshots
17
- */
18
- const asApiGatewayResponsePayload = (input) => ({
19
- statusCode: input.response.status ?? 200,
20
- ...(input.response.headers ? { headers: input.response.headers } : {}),
21
- ...('body' in input.response ? { body: input.response.body } : {}),
22
- });
23
- exports.asApiGatewayResponsePayload = asApiGatewayResponsePayload;
24
- //# sourceMappingURL=asApiGatewayResponsePayload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asApiGatewayResponsePayload.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;GAaG;AACI,MAAM,2BAA2B,GAAG,CAAQ,KAElD,EAAoC,EAAE,CAAC,CAAC;IACvC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,IAAI,GAAG;IACxC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,GAAG,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;CACnE,CAAC,CAAC;AANU,QAAA,2BAA2B,+BAMrC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"asApiGatewayResponsePayloadJson.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayloadJson.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,+BAA+B,GAAG,CAAC,KAG/C,EAA6B,EAAE,CAAC,CAAC;IAChC,UAAU,EAAE,KAAK,CAAC,MAAM;IACxB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;IAChC,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;CAChD,CAAC,CAAC;AAPU,QAAA,+BAA+B,mCAOzC"}
@@ -1,27 +0,0 @@
1
- import type { ApiGatewayRequestPayload } from '../../../domain.objects/ApiGatewayRequestPayload';
2
- import type { UnifiedApiGatewayEvent } from './UnifiedApiGatewayEvent';
3
- /**
4
- * .what = what `deserialize` means when a caller declares none — ONE declaration, read by both
5
- * this transformer and `forApiGateway`'s config (rule.forbid.parallel-codepaths)
6
- * .why body = json is the common case, and a caller who wants the raw string opts out by value:
7
- * `deserialize: { body: false }`
8
- */
9
- export declare const DESERIALIZE_DEFAULT: {
10
- body: boolean;
11
- };
12
- /**
13
- * .what = reconciles either api-gateway payload version into one shape
14
- * .why = the chain must read one shape whichever version the trigger delivered, so this runs
15
- * first and every step after it reads `UnifiedApiGatewayEvent`
16
- *
17
- * .note = a named transformer rather than middleware-local logic, so ONE implementation serves
18
- * both entry points — `genApiGatewayEventNormalizationMiddleware` delegates here
19
- * (rule.forbid.parallel-codepaths)
20
- */
21
- export declare const asUnifiedApiGatewayEvent: (input: {
22
- payload: ApiGatewayRequestPayload;
23
- }, options?: {
24
- deserialize: {
25
- body: boolean;
26
- };
27
- }) => UnifiedApiGatewayEvent;
@@ -1,118 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asUnifiedApiGatewayEvent = exports.DESERIALIZE_DEFAULT = void 0;
4
- const helpful_errors_1 = require("helpful-errors");
5
- const getIsV1ApiGatewayEvent_1 = require("./getIsV1ApiGatewayEvent");
6
- const getIsV2ApiGatewayEvent_1 = require("./getIsV2ApiGatewayEvent");
7
- /**
8
- * .what = parses a json body string into an object, base64-decoded first when flagged
9
- * .why = api gateway hands the body over as a string; most handlers want the object
10
- *
11
- * .note = a body that is not json is returned as the decoded string rather than refused —
12
- * a form-encoded twilio webhook is a legitimate caller, and its own schema (or
13
- * `z.any()`) is where that shape gets judged
14
- */
15
- const asParsedApiGatewayBody = (input) => {
16
- if (!input.body)
17
- return null;
18
- const decoded = input.isBase64Encoded
19
- ? Buffer.from(input.body, 'base64').toString('utf-8')
20
- : input.body;
21
- try {
22
- return JSON.parse(decoded);
23
- }
24
- catch (error) {
25
- /**
26
- * .what = allowlists the ONE error a non-json body can raise, and rethrows every other
27
- * .why = a bare `catch` would swallow a TypeError from a real defect, and the swallowed
28
- * value would reach the handler as plain text (rule.forbid.failhide). `SyntaxError`
29
- * is the only class `JSON.parse` throws for malformed input, per ecma-262 §25.5.1,
30
- * so the allowlist is exhaustive rather than a guess
31
- */
32
- if (!(error instanceof SyntaxError))
33
- throw error;
34
- return decoded;
35
- }
36
- };
37
- /**
38
- * .what = reconciles either payload version into the unified shape, given the TWO values the
39
- * versions disagree about
40
- * .why = v1 and v2 differ in exactly two places — the method and path, top-level on v1 and
41
- * under `requestContext.http` on v2. every OTHER field sits at the same path on both, so
42
- * one function serves both and the unified shape gains a new field in ONE place
43
- *
44
- * .note = the two disputed values are handed in as plain strings rather than read through a
45
- * per-version extractor, which would restore the duplication in a less legible form
46
- */
47
- const asUnifiedEvent = (input) => ({
48
- httpMethod: input.httpMethod,
49
- path: input.path,
50
- /**
51
- * .as = v1 declares `headers` REQUIRED and v2 declares it optional, so the union's member is
52
- * `… | undefined`, which the unified shape does not carry
53
- * .removal = drops once `UnifiedApiGatewayEvent.headers` is itself optional. left because
54
- * every consumer reads `event.headers[x]`, and `@middy/http-cors` reads this slot too
55
- * (rule.require.read-the-slot-a-dependency-reads) — so the change is not local
56
- */
57
- headers: input.payload.headers,
58
- queryStringParameters: input.payload.queryStringParameters ?? null,
59
- pathParameters: input.payload.pathParameters ?? null,
60
- body: input.deserialize.body
61
- ? asParsedApiGatewayBody({
62
- body: input.payload.body,
63
- isBase64Encoded: input.payload.isBase64Encoded,
64
- })
65
- : input.payload.body,
66
- rawBody: input.payload.body ?? null,
67
- isBase64Encoded: input.payload.isBase64Encoded,
68
- requestContext: {
69
- requestId: input.payload.requestContext.requestId,
70
- stage: input.payload.requestContext.stage,
71
- domainName: input.payload.requestContext.domainName,
72
- accountId: input.payload.requestContext.accountId,
73
- },
74
- _: { raw: input.payload },
75
- });
76
- /**
77
- * .what = what `deserialize` means when a caller declares none — ONE declaration, read by both
78
- * this transformer and `forApiGateway`'s config (rule.forbid.parallel-codepaths)
79
- * .why body = json is the common case, and a caller who wants the raw string opts out by value:
80
- * `deserialize: { body: false }`
81
- */
82
- exports.DESERIALIZE_DEFAULT = { body: true };
83
- /**
84
- * .what = reconciles either api-gateway payload version into one shape
85
- * .why = the chain must read one shape whichever version the trigger delivered, so this runs
86
- * first and every step after it reads `UnifiedApiGatewayEvent`
87
- *
88
- * .note = a named transformer rather than middleware-local logic, so ONE implementation serves
89
- * both entry points — `genApiGatewayEventNormalizationMiddleware` delegates here
90
- * (rule.forbid.parallel-codepaths)
91
- */
92
- const asUnifiedApiGatewayEvent = (input, options) => {
93
- const deserialize = options?.deserialize ?? exports.DESERIALIZE_DEFAULT;
94
- // v2 http-api: the method and path live under `requestContext.http`
95
- if ((0, getIsV2ApiGatewayEvent_1.getIsV2ApiGatewayEvent)(input.payload)) {
96
- const payload = input.payload;
97
- return asUnifiedEvent({
98
- payload,
99
- httpMethod: payload.requestContext.http.method,
100
- path: payload.requestContext.http.path,
101
- deserialize,
102
- });
103
- }
104
- // v1 rest-api: the method and path live at the top level
105
- if ((0, getIsV1ApiGatewayEvent_1.getIsV1ApiGatewayEvent)(input.payload)) {
106
- const payload = input.payload;
107
- return asUnifiedEvent({
108
- payload,
109
- httpMethod: payload.httpMethod,
110
- path: payload.path,
111
- deserialize,
112
- });
113
- }
114
- // fail loud rather than hand a handler a shape neither branch produced
115
- return helpful_errors_1.MalfunctionError.throw('payload is neither v1 nor v2 api gateway event shaped', { payload: input.payload });
116
- };
117
- exports.asUnifiedApiGatewayEvent = asUnifiedApiGatewayEvent;
118
- //# sourceMappingURL=asUnifiedApiGatewayEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asUnifiedApiGatewayEvent.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLamb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;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;IAED,uEAAuE;IACvE,OAAO,iCAAgB,CAAC,KAAK,CAC3B,uDAAuD,EACvD,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAC3B,CAAC;AACJ,CAAC,CAAC;AAnCW,QAAA,wBAAwB,4BAmCnC"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAllWirePayloadKeysFound = void 0;
4
- /**
5
- * .what = the wire keys a mid-migration consumer writes from habit, every one of which the
6
- * encode would drop without a word
7
- *
8
- * .note = `statusCode` is the severe one — the one field whose name changed (`status`), so
9
- * `status ?? 200` replaces a caller's 404 with a 200 AND double-encodes the body they
10
- * already stringified. the rest are deferred keys (F7), quieter but equally silent
11
- *
12
- * .note = a `Record<K, true>` rather than a `string[]`, so the compiler holds it EXHAUSTIVE: a
13
- * list proves each entry is real and says not one word about one being ABSENT, which is
14
- * the drift that matters. clamp proven to bite — drop a key and tsc raises TS2741
15
- */
16
- const IS_KEY_OF_WIRE_PAYLOAD_UNREAD = {
17
- statusCode: true,
18
- multiValueHeaders: true,
19
- isBase64Encoded: true,
20
- cookies: true,
21
- };
22
- /**
23
- * .what = the same list, as keys
24
- * .why = one source of truth, so the exhaustive map and the iterated list cannot drift apart
25
- */
26
- const KEYS_OF_WIRE_PAYLOAD = Object.keys(IS_KEY_OF_WIRE_PAYLOAD_UNREAD);
27
- /**
28
- * .what = lists which aws wire-payload keys a handler's response carries
29
- * .why = one detector, so the public type-check and the handler-side guard cannot drift. the
30
- * check needs a boolean; the guard needs the key NAMES to tell the author the fix
31
- */
32
- const getAllWirePayloadKeysFound = (input) => KEYS_OF_WIRE_PAYLOAD.filter((key) => key in input.response);
33
- exports.getAllWirePayloadKeysFound = getAllWirePayloadKeysFound;
34
- //# sourceMappingURL=getAllWirePayloadKeysFound.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAllWirePayloadKeysFound.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllWirePayloadKeysFound.ts"],"names":[],"mappings":";;;AAgBA;;;;;;;;;;;GAWG;AACH,MAAM,6BAA6B,GAAyC;IAC1E,UAAU,EAAE,IAAI;IAChB,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,IAAI;IACrB,OAAO,EAAE,IAAI;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,oBAAoB,GAAa,MAAM,CAAC,IAAI,CAChD,6BAA6B,CAC9B,CAAC;AAEF;;;;GAIG;AACI,MAAM,0BAA0B,GAAG,CAAC,KAE1C,EAAY,EAAE,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;AAF/D,QAAA,0BAA0B,8BAEqC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIsV1ApiGatewayEvent.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV1ApiGatewayEvent.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACI,MAAM,sBAAsB,GAAG,CACpC,KAAc,EACiB,EAAE;IACjC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAE7C,iEAAiE;IACjE,OAAO,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC;AAC5C,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIsV2ApiGatewayEvent.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV2ApiGatewayEvent.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACI,MAAM,sBAAsB,GAAG,CACpC,KAAc,EACmB,EAAE;IACnC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAE7C,4CAA4C;IAC5C,OAAO,GAAG,CAAC,OAAO,KAAK,KAAK,CAAC;AAC/B,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"genApiGatewayEventNormalizationMiddleware.js","sourceRoot":"","sources":["../../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayEventNormalizationMiddleware.ts"],"names":[],"mappings":";;;AAGA,0EAAuE;AAEvE;;;;;;;;GAQG;AACI,MAAM,yCAAyC,GAAG,CAAC,KAEzD,EAEC,EAAE;IACF,MAAM,MAAM,GAAiC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7D;;;;;;;;;WASG;QACH,OAAO,CAAC,KAAK,GAAG,IAAA,mDAAwB,EACtC,EAAE,OAAO,EAAE,OAAO,CAAC,KAAiC,EAAE,EACtD,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,CACR,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AAvBW,QAAA,yCAAyC,6CAuBpD"}
@@ -1,27 +0,0 @@
1
- import type middy from '@middy/core';
2
- import type { ZodSchema } from 'zod';
3
- /**
4
- * .what = validates event.body against zod schema for API Gateway
5
- * .why = API Gateway events have body as separate property, validate just the body
6
- *
7
- * .note = this family validates `event.body` rather than the whole event because
8
- * `request.event` must stay http-shaped through the chain: `@middy/http-cors` reads
9
- * `request.event.headers` and derives the http method from `request.event` in its
10
- * `after` hook (`@middy/http-cors/index.js:38,83,106`). so the body cannot take the
11
- * event's place, and this cannot yet collapse into `genZodEventValidationMiddleware`
12
- *
13
- * .note = the constraint is SHARPER than "http-shaped", and the precise form is what any
14
- * future input translate must honor. cors picks its method extractor by
15
- * `request.event.version ?? '1.0'` (`index.js:38,106`), and `UnifiedApiGatewayEvent`
16
- * declares no `version` — so cors always falls to its **v1** extractor,
17
- * `(event) => event.httpMethod`. that works only because the unified shape happens to
18
- * expose `httpMethod` and `headers` at its top level under v1's own names. so the real
19
- * requirement is: whatever occupies `request.event` when cors's `after` runs must keep
20
- * `httpMethod` and `headers` readable at the top level, with v1 names. an arbitrary
21
- * `TInput` cannot promise that, which is why the input translate has no home here yet
22
- */
23
- export declare const genZodBodyValidationMiddleware: <TInput>(input: {
24
- schema: ZodSchema<TInput>;
25
- }) => {
26
- before: middy.MiddlewareFn<any, any>;
27
- };
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.genZodBodyValidationMiddleware = void 0;
4
- const getValidationError_1 = require("../../middleware/getValidationError");
5
- /**
6
- * .what = validates event.body against zod schema for API Gateway
7
- * .why = API Gateway events have body as separate property, validate just the body
8
- *
9
- * .note = this family validates `event.body` rather than the whole event because
10
- * `request.event` must stay http-shaped through the chain: `@middy/http-cors` reads
11
- * `request.event.headers` and derives the http method from `request.event` in its
12
- * `after` hook (`@middy/http-cors/index.js:38,83,106`). so the body cannot take the
13
- * event's place, and this cannot yet collapse into `genZodEventValidationMiddleware`
14
- *
15
- * .note = the constraint is SHARPER than "http-shaped", and the precise form is what any
16
- * future input translate must honor. cors picks its method extractor by
17
- * `request.event.version ?? '1.0'` (`index.js:38,106`), and `UnifiedApiGatewayEvent`
18
- * declares no `version` — so cors always falls to its **v1** extractor,
19
- * `(event) => event.httpMethod`. that works only because the unified shape happens to
20
- * expose `httpMethod` and `headers` at its top level under v1's own names. so the real
21
- * requirement is: whatever occupies `request.event` when cors's `after` runs must keep
22
- * `httpMethod` and `headers` readable at the top level, with v1 names. an arbitrary
23
- * `TInput` cannot promise that, which is why the input translate has no home here yet
24
- */
25
- const genZodBodyValidationMiddleware = (input) => {
26
- const before = async (request) => {
27
- const event = request.event;
28
- const result = input.schema.safeParse(event.body);
29
- if (!result.success) {
30
- throw (0, getValidationError_1.getValidationError)({ error: result.error });
31
- }
32
- // replace body with parsed (transformed) result
33
- /**
34
- * .note = DELIBERATE MUTATION — `request` is middy's only channel to hand a value onward,
35
- * and `event` is an ALIAS of `request.event`, so this writes through to the chain
36
- *
37
- * ⚠️ .note = this site escaped the first sweep of this class, because that grep anchored on
38
- * `request.` and an alias hides the receiver. a mutation through a local alias is
39
- * the same mutation — so the pattern must match the ALIAS too
40
- * (`^\s*(event|response|payload)\.\w+\s*=`), which finds exactly this one
41
- *
42
- * .as = `UnifiedApiGatewayEvent.body` is the PRE-validation shape (a string, or a parsed
43
- * json value), while `result.data` is `TInput` — the POST-validation domain shape.
44
- * the two are unrelated by declaration, which is exactly right: this assignment IS
45
- * the step that changes which of them lives in the slot
46
- * .removal = drops once the input-side translator lands and the chain carries `inputAfter`
47
- * in its own slot rather than back in the event's `body` — the 🚧 F31 fulcrum
48
- */
49
- event.body = result.data;
50
- };
51
- return { before };
52
- };
53
- exports.genZodBodyValidationMiddleware = genZodBodyValidationMiddleware;
54
- //# sourceMappingURL=genZodBodyValidationMiddleware.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"genZodBodyValidationMiddleware.js","sourceRoot":"","sources":["../../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.ts"],"names":[],"mappings":";;;AAGA,4EAAyE;AAGzE;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,8BAA8B,GAAG,CAAS,KAEtD,EAEC,EAAE;IACF,MAAM,MAAM,GAAiC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,KAA+B,CAAC;QACtD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAA,uCAAkB,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,gDAAgD;QAChD;;;;;;;;;;;;;;;WAeG;QACH,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,IAAoC,CAAC;IAC3D,CAAC,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AAhCW,QAAA,8BAA8B,kCAgCzC"}
@@ -1,64 +0,0 @@
1
- import middy from '@middy/core';
2
- import type { Context } from 'aws-lambda';
3
- import type { ContextLogTrail } from 'sdk-logs';
4
- import type { ZodSchema } from 'zod';
5
- import type { ContextAwsLambdaServer } from '../../../domain.objects/ContextAwsLambdaServer';
6
- import type { WrappedPayload } from '../../lambdaEndpointWire/frame/getIsWrappedPayload';
7
- import type { TranslateLog } from '../TranslateLog';
8
- /**
9
- * .what = wrapped payload format: event nested under `event` key with trail
10
- * .why = re-exported from its canonical owner (`lambdaEndpointWire/frame`) so the
11
- * public barrel surfaces the ONE declaration, never a structural twin.
12
- * F16 lifted this shape to the common ancestor of the three contexts that
13
- * touch the frame — askLambdaEndpoint emits it over the wire,
14
- * runLambdaEndpoint/serde emits it in-process, getUnwrappedEventWithExid
15
- * reads it. a second local declaration here would be the exact duplication
16
- * that lift removed (`rule.prefer.most-common-denominator`).
17
- */
18
- export type { WrappedPayload };
19
- /**
20
- * .what = flat payload format: trail mixed into input
21
- * .why = direct invocation or legacy callers may send this format
22
- */
23
- export type FlatPayload<TInput> = TInput & {
24
- trail?: {
25
- exid?: string;
26
- } | null;
27
- };
28
- /**
29
- * .what = union of all valid lambda handler input formats
30
- * .why = handler accepts both wrapped and flat formats at runtime
31
- */
32
- export type LambdaHandlerInput<TInput> = FlatPayload<TInput> | WrappedPayload<TInput>;
33
- /**
34
- * .what = endpoint operation signature type
35
- * .why = named type for invoke function (replaces HandlerLogic from simple-lambda-handlers)
36
- */
37
- export type EndpointOperation<TInput, TOutput> = (input: {
38
- event: TInput;
39
- }, context: ContextLogTrail) => Promise<TOutput>;
40
- /**
41
- * .what = sdk contract type for genLambdaEndpoint input
42
- * .why = exported for consumer type inference
43
- */
44
- export type GenLambdaEndpointInput<TInput, TOutput> = {
45
- schema: {
46
- input: ZodSchema<TInput>;
47
- output: ZodSchema<TOutput>;
48
- };
49
- invoke: EndpointOperation<TInput, TOutput>;
50
- logTranslate?: TranslateLog;
51
- };
52
- /**
53
- * .what = sdk contract type for genLambdaEndpoint context
54
- * .why = exported for consumer type inference; the shared handler-side context
55
- * ({ env?: EnvConfig; log? }) reused by genLambdaEndpoint + forApiGateway
56
- */
57
- export type GenLambdaEndpointContext = ContextAwsLambdaServer;
58
- /**
59
- * .what = generates a lambda handler with validation and trail context
60
- * .why = standardizes handler creation with schema validation and observability. the chain:
61
- * constraint error (a caller fault becomes a response object, never a throw), internal
62
- * service error (logs loudly), io logger, trail, input + output validation
63
- */
64
- export declare const genLambdaEndpoint: <TInput, TOutput>(input: GenLambdaEndpointInput<TInput, TOutput>, context?: ContextAwsLambdaServer) => middy.MiddyfiedHandler<LambdaHandlerInput<TInput>, TOutput, Error, Context>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"genLambdaEndpoint.forAskEndpoint.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAgC;AAOhC,4DAAyD;AACzD,6FAA0F;AAC1F,uGAAoG;AACpG,yFAAsF;AACtF,+EAA4E;AAC5E,yEAAsE;AACtE,yEAAsE;AAEtE,kGAA+F;AAyD/F;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG;AAC/B,8FAA8F;AAC9F,yEAAyE;AACzE,KAA8C,EAC9C,OAAgC,E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AAO,IAAA,cAAK,EACV,KAGqB,CACtB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACrB,CAAC,CAAC;AA/DW,QAAA,iBAAiB,qBA+D5B"}
@@ -1,20 +0,0 @@
1
- import type middy from '@middy/core';
2
- import type { ZodSchema } from 'zod';
3
- /**
4
- * .what = validates the entire event against a zod schema
5
- * .why = the ask-endpoint family reaches this step with the caller's value AT `request.event`,
6
- * so the whole event is what the schema describes
7
- *
8
- * .note = its api-gateway peer, `genZodBodyValidationMiddleware`, validates `event.body`
9
- * instead, because that chain must keep `request.event` http-shaped. the two collapse
10
- * into one validator at the common ancestor the moment `inputAfter` has ONE home
11
- * across both chains — see the 🚧 note in
12
- * `.behavior/v2026_08_03.feat-apigateway-wire-response/5.1.execution.from_vision.yield.md`.
13
- * this stays at the leaf until then, because a lift with one consumer is speculative
14
- * (rule.prefer.most-common-denominator)
15
- */
16
- export declare const genZodEventValidationMiddleware: <TInput>(input: {
17
- schema: ZodSchema<TInput>;
18
- }) => {
19
- before: middy.MiddlewareFn<any, any>;
20
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.genZodEventValidationMiddleware = void 0;
4
- const getValidationError_1 = require("../../middleware/getValidationError");
5
- /**
6
- * .what = validates the entire event against a zod schema
7
- * .why = the ask-endpoint family reaches this step with the caller's value AT `request.event`,
8
- * so the whole event is what the schema describes
9
- *
10
- * .note = its api-gateway peer, `genZodBodyValidationMiddleware`, validates `event.body`
11
- * instead, because that chain must keep `request.event` http-shaped. the two collapse
12
- * into one validator at the common ancestor the moment `inputAfter` has ONE home
13
- * across both chains — see the 🚧 note in
14
- * `.behavior/v2026_08_03.feat-apigateway-wire-response/5.1.execution.from_vision.yield.md`.
15
- * this stays at the leaf until then, because a lift with one consumer is speculative
16
- * (rule.prefer.most-common-denominator)
17
- */
18
- const genZodEventValidationMiddleware = (input) => {
19
- const before = async (request) => {
20
- const result = input.schema.safeParse(request.event);
21
- if (!result.success) {
22
- throw (0, getValidationError_1.getValidationError)({ error: result.error });
23
- }
24
- // replace event with parsed (transformed) result
25
- // .note = DELIBERATE MUTATION — `request` is middy's only channel to hand a value onward
26
- request.event = result.data;
27
- };
28
- return { before };
29
- };
30
- exports.genZodEventValidationMiddleware = genZodEventValidationMiddleware;
31
- //# sourceMappingURL=genZodEventValidationMiddleware.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"genZodEventValidationMiddleware.js","sourceRoot":"","sources":["../../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.ts"],"names":[],"mappings":";;;AAGA,4EAAyE;AAEzE;;;;;;;;;;;;GAYG;AACI,MAAM,+BAA+B,GAAG,CAAS,KAEvD,EAEC,EAAE;IACF,MAAM,MAAM,GAAiC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAA,uCAAkB,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,iDAAiD;QACjD,yFAAyF;QACzF,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AAhBW,QAAA,+BAA+B,mCAgB1C"}
@@ -1,5 +0,0 @@
1
- /**
2
- * .what = detect if payload requests schema introspection
3
- * .why = enables middleware to intercept introspection requests before handler
4
- */
5
- export declare const isIntrospectionPayload: (payload: unknown) => boolean;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIntrospectionPayload = void 0;
4
- /**
5
- * .what = detect if payload requests schema introspection
6
- * .why = enables middleware to intercept introspection requests before handler
7
- */
8
- const isIntrospectionPayload = (payload) => {
9
- if (typeof payload !== 'object' || payload === null)
10
- return false;
11
- if (!('introspect' in payload))
12
- return false;
13
- return payload.introspect === 'schema';
14
- };
15
- exports.isIntrospectionPayload = isIntrospectionPayload;
16
- //# sourceMappingURL=genIntrospectionMiddleware.isIntrospectionPayload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"genIntrospectionMiddleware.isIntrospectionPayload.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,sBAAsB,GAAG,CAAC,OAAgB,EAAW,EAAE;IAClE,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAClE,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,OAAQ,OAAmC,CAAC,UAAU,KAAK,QAAQ,CAAC;AACtE,CAAC,CAAC;AAJW,QAAA,sBAAsB,0BAIjC"}