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
@@ -0,0 +1,121 @@
1
+ import middy from '@middy/core';
2
+ import type { Context, SQSEvent } 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 FrozenDeep } from '../setEventFrozen';
7
+ import type { TranslateLog } from '../TranslateLog';
8
+ import type { SqsEventDecoded, SqsHeadersDeclared, SqsHeadersMerged } from './SqsEventDecoded';
9
+ /**
10
+ * .what = sdk contract type for `genLambdaEndpoint.forSqs.perRecord`
11
+ * .why = exported for consumer type inference
12
+ *
13
+ * .why `THeaders` is bound = the validator spreads the validated headers back over the wire bag,
14
+ * so a `THeaders` that is not a record spreads as one: `{ ...'abc' }` yields
15
+ * `{ 0: 'a', 1: 'b', 2: 'c' }`. unbound, that compiles clean and throws naught at run time
16
+ * (`rule.require.illegal-states-unrepresentable`)
17
+ */
18
+ export type ForSqsPerRecordInput<THeaders extends SqsHeadersDeclared, TPayload> = {
19
+ schema: {
20
+ /**
21
+ * .what = describes the pair `invoke` receives for one message — `{ headers?, payload }`
22
+ * .why = a message with the wrong shape is refused before the handler runs, and the refusal
23
+ * fails the invoke, so sqs redrives it and eventually dead-letters it rather than
24
+ * delete it
25
+ *
26
+ * .note = `payload` is required and `headers` is optional. an absent `headers` key constrains
27
+ * naught, so header enforcement is opt-in (`rule.require.explicit-optout`)
28
+ * .note = there is no `schema.output`. an sqs handler answers no one — `perRecord` returns no
29
+ * value, and sqs reads the invocation's success or failure and naught else
30
+ */
31
+ input: ZodSchema<{
32
+ headers?: THeaders;
33
+ payload: TPayload;
34
+ }>;
35
+ };
36
+ invoke: (input: {
37
+ /**
38
+ * .what = the message body, parsed and validated against `schema.input.payload`
39
+ * .note = this is `event.records[0].payload` — one object, two access paths
40
+ * .note = frozen, because it is a slot of the envelope rather than a value beside it
41
+ */
42
+ payload: FrozenDeep<TPayload>;
43
+ /**
44
+ * .what = the sender's message attributes, one name per value, keys verbatim
45
+ * .note = sqs attribute names are case-sensitive, so the api-gateway lowercase fold does
46
+ * not travel here — see `asSqsHeadersOnwire`
47
+ * .note = this is `event.records[0].headers` — one object, two access paths
48
+ * .note = frozen, for the same reason its peer is
49
+ */
50
+ headers: FrozenDeep<SqsHeadersMerged<THeaders>>;
51
+ /**
52
+ * .what = the whole object that arrived — the batch, with every record decoded
53
+ * .why = `event` names what arrived, in every family. an sqs invoke arrives as a batch even
54
+ * where this variant serves exactly one message of it (`domain.terms/event.md`)
55
+ *
56
+ * .note = `event.records` has exactly one element here, and the batch-size refusal below is
57
+ * what makes that true
58
+ * .note = frozen, though this variant reads no value after `invoke`. its twin does, and the
59
+ * envelope both hand over is one shape — a guarantee that holds on one variant and
60
+ * not its peer is a trap for an author who moves between them
61
+ * (`rule.forbid.parallel-codepaths`)
62
+ */
63
+ event: FrozenDeep<SqsEventDecoded<{
64
+ headers: SqsHeadersMerged<THeaders>;
65
+ payload: TPayload;
66
+ }>>;
67
+ },
68
+ /**
69
+ * .what = the ambient bag, which carries the observability lineage
70
+ * .why `trail` rides here and never in `input` = it is ambient runtime rather than part of
71
+ * the request, so an `input.trail` slot is forbidden in every family
72
+ * (`rule.require.env-access-in-context`, `domain.terms/trail.md`). read it at
73
+ * `context.log.trail`:
74
+ *
75
+ * invoke: async ({ payload, headers, event }, { log }) => log.trail.exid
76
+ *
77
+ * .note = this family mints its own `exid`. no producer propagates a correlation id into a
78
+ * queue, so `trail.exid` is a fresh uuid rather than the caller's; a
79
+ * `messageAttribute`-sourced trail is unbuilt work
80
+ */
81
+ context: ContextLogTrail) => Promise<void>;
82
+ logTranslate?: TranslateLog;
83
+ deserialize?: {
84
+ /**
85
+ * .what = whether to parse the json body into `payload`
86
+ * .note = set `false` for a raw string body — a caller who must verify a signature over the
87
+ * exact bytes reads the string (`rule.require.explicit-optout`)
88
+ * .note = `false` hands `payload` to your schema as a string, so it must be set with the
89
+ * schema's payload half. a mis-pair is a total outage rather than one bad message:
90
+ * the config is per handler, so every message meets the same mismatch and the queue
91
+ * drains to its dead-letter, while the sender's `SendMessage` reports success.
92
+ * clamped by `[case15]`
93
+ *
94
+ * deserialize.payload | the schema's payload half
95
+ * --------------------|--------------------------
96
+ * absent / true | z.object({ … })
97
+ * false | z.string()
98
+ */
99
+ payload: boolean;
100
+ };
101
+ };
102
+ /**
103
+ * .what = generates an sqs lambda handler that serves one message per invoke
104
+ * .why = a handler written against one message is the common case, and it is the shape every
105
+ * other family already hands over. this variant restores cardinality 1 so `payload` and
106
+ * `headers` mean what they mean everywhere else (`domain.terms/event.md`)
107
+ *
108
+ * .why it refuses a batch of more than one = `batchSize` is trigger config, set on the event
109
+ * source and invisible at gen time. under `batchSize: 10` a silent `records[0]` would
110
+ * process one message and drop nine — and sqs, on a successful invoke, deletes all ten.
111
+ * so the mismatch fails loud instead, with the fix named
112
+ * (`rule.forbid.failhide`, `rule.require.errors-name-the-fix`)
113
+ *
114
+ * .why a MalfunctionError and not a ConstraintError = the deployer misconfigured the trigger,
115
+ * never the producer who sent the message
116
+ *
117
+ * .note = a leaf of the `genLambdaEndpoint` family, never exported bare from `src/index.ts` — a
118
+ * consumer reaches it as `genLambdaEndpoint.forSqs.perRecord`
119
+ * (`rule.forbid.unqualified-variant-exports`)
120
+ */
121
+ export declare const perRecord: <THeaders extends SqsHeadersDeclared, TPayload>(config: ForSqsPerRecordInput<THeaders, TPayload>, context?: ContextAwsLambdaServer) => middy.MiddyfiedHandler<SQSEvent, void, Error, Context>;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.perRecord = void 0;
7
+ const core_1 = __importDefault(require("@middy/core"));
8
+ const helpful_errors_1 = require("helpful-errors");
9
+ const asContextLogTrail_1 = require("../asContextLogTrail");
10
+ const setEventFrozen_1 = require("../setEventFrozen");
11
+ const asSqsEventDecoded_1 = require("./asSqsEventDecoded");
12
+ const asSqsRecordDecoded_1 = require("./asSqsRecordDecoded");
13
+ const genSqsEndpointMiddlewares_1 = require("./genSqsEndpointMiddlewares");
14
+ const setSqsRecordValidated_1 = require("./setSqsRecordValidated");
15
+ /**
16
+ * .what = generates an sqs lambda handler that serves one message per invoke
17
+ * .why = a handler written against one message is the common case, and it is the shape every
18
+ * other family already hands over. this variant restores cardinality 1 so `payload` and
19
+ * `headers` mean what they mean everywhere else (`domain.terms/event.md`)
20
+ *
21
+ * .why it refuses a batch of more than one = `batchSize` is trigger config, set on the event
22
+ * source and invisible at gen time. under `batchSize: 10` a silent `records[0]` would
23
+ * process one message and drop nine — and sqs, on a successful invoke, deletes all ten.
24
+ * so the mismatch fails loud instead, with the fix named
25
+ * (`rule.forbid.failhide`, `rule.require.errors-name-the-fix`)
26
+ *
27
+ * .why a MalfunctionError and not a ConstraintError = the deployer misconfigured the trigger,
28
+ * never the producer who sent the message
29
+ *
30
+ * .note = a leaf of the `genLambdaEndpoint` family, never exported bare from `src/index.ts` — a
31
+ * consumer reaches it as `genLambdaEndpoint.forSqs.perRecord`
32
+ * (`rule.forbid.unqualified-variant-exports`)
33
+ */
34
+ const perRecord = (config, context) => {
35
+ // the env context this family declares for symmetry; no step of its chain reads one yet
36
+ void context;
37
+ const deserialize = config.deserialize ?? asSqsRecordDecoded_1.DESERIALIZE_DEFAULT;
38
+ /**
39
+ * .what = the handler's own step: decode, refuse a batch, validate, invoke
40
+ * .why = by here the chain has produced the trail log, so this reads as narrative
41
+ */
42
+ const logic = async (event, lambdaContext) => {
43
+ // read the trail log `genTrailMiddleware` wrote; the cast lives in the shared reader
44
+ const { log } = (0, asContextLogTrail_1.asContextLogTrail)({ context: lambdaContext });
45
+ const decoded = (0, asSqsEventDecoded_1.asSqsEventDecoded)({ wire: event }, { deserialize });
46
+ /**
47
+ * .what = the cardinality refusal this variant exists for
48
+ * .why = see the batch-size note above. the message names the fix because the author who
49
+ * meets it cannot see the trigger config from the code they read
50
+ */
51
+ if (decoded.records.length !== 1)
52
+ helpful_errors_1.MalfunctionError.throw('forSqs.perRecord received a batch of other than one message', {
53
+ count: decoded.records.length,
54
+ fix: 'set the event source `batchSize` to 1, or reach for `genLambdaEndpoint.forSqs.perBatch`',
55
+ ids: decoded.records.map((record) => record.id),
56
+ });
57
+ /**
58
+ * .what = validates the one record, and writes the parsed values back into it
59
+ * .note = its return is that same object, narrowed. the read happens off `eventFrozen` below
60
+ * instead, which narrows the whole envelope and the record with it
61
+ */
62
+ (0, setSqsRecordValidated_1.setSqsRecordValidated)({
63
+ record: decoded.records[0],
64
+ schema: config.schema.input,
65
+ });
66
+ /**
67
+ * .what = seals the envelope before the handler's turn
68
+ * .why = the envelope it hands over is the same shape `perBatch` hands over, and a guarantee
69
+ * that holds on one variant and not its peer is a trap for an author who moves between
70
+ * them (`rule.forbid.parallel-codepaths`)
71
+ * .where = after the validator, which writes the parsed values back into the record
72
+ *
73
+ * .as = the validated values were written into the record, so the envelope now carries them
74
+ * too — a fact typescript cannot track from a mutation
75
+ * .removal = drops when the decode is parameterized on the schema's own output types
76
+ */
77
+ const eventFrozen = (0, setEventFrozen_1.setEventFrozen)({
78
+ event: decoded,
79
+ });
80
+ const recordFrozen = eventFrozen.records[0];
81
+ /**
82
+ * .what = hands over the pair, the envelope, and the lineage. the two lifted fields are
83
+ * projections of the record's slots
84
+ * .note = read off `eventFrozen` rather than `decoded` — the same reference, since the freeze
85
+ * is in place, and the narrowed type is what carries the readonly guarantee to the
86
+ * handler. a read off `decoded` hands over the pre-freeze type and drops it
87
+ */
88
+ await config.invoke({
89
+ payload: recordFrozen.payload,
90
+ headers: recordFrozen.headers,
91
+ event: eventFrozen,
92
+ }, { log });
93
+ };
94
+ return (0, core_1.default)(logic).use((0, genSqsEndpointMiddlewares_1.genSqsEndpointMiddlewares)({ logTranslate: config.logTranslate }));
95
+ };
96
+ exports.perRecord = perRecord;
97
+ //# sourceMappingURL=genLambdaEndpoint.forSqs.perRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genLambdaEndpoint.forSqs.perRecord.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAgC;AAEhC,mDAAkD;AAKlD,4DAAyD;AACzD,sDAAoE;AAEpE,2DAAwD;AACxD,6DAA2D;AAC3D,2EAAwE;AAMxE,mEAAgE;AAyGhE;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,SAAS,GAAG,CACvB,MAAgD,EAChD,OAAgC,EACwB,EAAE;IAC1D,wFAAwF;IACxF,KAAK,OAAO,CAAC;IAEb,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,wCAAmB,CAAC;IAE9D;;;OAGG;IACH,MAAM,KAAK,GAAG,KAAK,EACjB,KAAe,EACf,aAAsB,EACP,EAAE;QACjB,qFAAqF;QACrF,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,qCAAiB,EAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;QAE9D,MAAM,OAAO,GAAG,IAAA,qCAAiB,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QAEpE;;;;WAIG;QACH,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YAC9B,iCAAgB,CAAC,KAAK,CACpB,6DAA6D,EAC7D;gBACE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;gBAC7B,GAAG,EAAE,yFAAyF;gBAC9F,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;aAChD,CACF,CAAC;QAEJ;;;;WAIG;QACH,IAAA,6CAAqB,EAAC;YACpB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAE;YAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;SAC5B,CAAC,CAAC;QAEH;;;;;;;;;;WAUG;QACH,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC;YACjC,KAAK,EAAE,OAGL;SACH,CAAC,CAAC;QACH,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC;QAE7C;;;;;;WAMG;QACH,MAAM,MAAM,CAAC,MAAM,CACjB;YACE,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,KAAK,EAAE,WAAW;SACnB,EACD,EAAE,GAAG,EAAE,CACR,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,IAAA,cAAK,EAAC,KAAK,CAAC,CAAC,GAAG,CACrB,IAAA,qDAAyB,EAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CACjE,CAAC;AACJ,CAAC,CAAC;AAtFW,QAAA,SAAS,aAsFpB"}
@@ -0,0 +1,52 @@
1
+ import type middy from '@middy/core';
2
+ import type { TranslateLog } from '../TranslateLog';
3
+ /**
4
+ * .what = the observability chain both `forSqs` variants run
5
+ * .why = the two variants differ in one respect — how they hand records to `invoke`, and what
6
+ * they do with a failure. every guarantee around that is identical, so it lands once. a
7
+ * second array would take the next guarantee into one variant and not the other
8
+ * (`rule.forbid.parallel-codepaths`)
9
+ *
10
+ * .why no constraint-error middleware, where both peer families register one = that middleware
11
+ * turns a caller fault into a successful invocation, which is correct where an http caller
12
+ * waits on a response. in sqs a successful invocation means delete the message, so to
13
+ * swallow a validation failure into a success would silently discard a message no handler
14
+ * ever processed (`rule.forbid.failhide`). a poison pill must fail instead: `perRecord`
15
+ * lets the throw escape so sqs redrives and then dead-letters it, and `perBatch` reports
16
+ * that one id as a batch item failure so sqs redrives only it
17
+ *
18
+ * .why no introspection middleware = introspection exists so `genServiceSdk` can generate a typed
19
+ * caller, and an sqs handler has no caller sdk — a producer sends to a queue, and never
20
+ * invokes this lambda. it also forces a `schema.output`, which this family does not have
21
+ * (`rule.prefer.wet-over-dry`)
22
+ *
23
+ * .the order carries the load. middy runs `before` hooks in forward array order and
24
+ * `after`/`onError` in reverse, since it `unshift`s them:
25
+ *
26
+ * index | hook | run order
27
+ * ------|----------------------|------------------------------------------
28
+ * 0 | onError | LAST — logs the fault loudly, then rethrows
29
+ * 1 | before | FIRST — produces `context.log`
30
+ * 2 | before/after/onError | reads `context.log`
31
+ *
32
+ * so trail (1) sits below the io logger (2) and `handler.input` logs. the api-gateway
33
+ * family carries the inverse order and its `handler.input` never fires — a live, recorded
34
+ * defect this family declines to inherit (`rule.require.sweep-the-defect-class`,
35
+ * `.dream/v2026_09_22.fix.logtranslate-input-is-dead-for-the-apigateway-family.md`)
36
+ *
37
+ * .note = both log halves are clamped, one per variant. `perRecord`'s `[case11]` observes the
38
+ * `before` branch through `logTranslate.input`; `perBatch`'s `[case12]` observes the
39
+ * `after` branch through `logTranslate.output`, with the `batchItemFailures` wire shape
40
+ * intact. the second half carries weight only on `perBatch` — `perRecord` returns
41
+ * `Promise<void>`, so a redaction would have naught to strip
42
+ * .note = the io logger's `request.response` branch is dead here by construction rather than by
43
+ * order: no middleware in this chain sets a response, since a server fault rethrows. its
44
+ * `errorMessage` branch is the live one, and the correct one for a family with no caller
45
+ */
46
+ export declare const genSqsEndpointMiddlewares: (input: {
47
+ logTranslate?: TranslateLog;
48
+ }) => {
49
+ before?: middy.MiddlewareFn<any, any>;
50
+ after?: middy.MiddlewareFn<any, any>;
51
+ onError?: middy.MiddlewareFn<any, any>;
52
+ }[];
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.genSqsEndpointMiddlewares = void 0;
4
+ const genInternalServiceErrorMiddleware_1 = require("../middleware/genInternalServiceErrorMiddleware");
5
+ const genIoLoggerMiddleware_1 = require("../middleware/genIoLoggerMiddleware");
6
+ const genTrailMiddleware_1 = require("../middleware/genTrailMiddleware");
7
+ /**
8
+ * .what = the observability chain both `forSqs` variants run
9
+ * .why = the two variants differ in one respect — how they hand records to `invoke`, and what
10
+ * they do with a failure. every guarantee around that is identical, so it lands once. a
11
+ * second array would take the next guarantee into one variant and not the other
12
+ * (`rule.forbid.parallel-codepaths`)
13
+ *
14
+ * .why no constraint-error middleware, where both peer families register one = that middleware
15
+ * turns a caller fault into a successful invocation, which is correct where an http caller
16
+ * waits on a response. in sqs a successful invocation means delete the message, so to
17
+ * swallow a validation failure into a success would silently discard a message no handler
18
+ * ever processed (`rule.forbid.failhide`). a poison pill must fail instead: `perRecord`
19
+ * lets the throw escape so sqs redrives and then dead-letters it, and `perBatch` reports
20
+ * that one id as a batch item failure so sqs redrives only it
21
+ *
22
+ * .why no introspection middleware = introspection exists so `genServiceSdk` can generate a typed
23
+ * caller, and an sqs handler has no caller sdk — a producer sends to a queue, and never
24
+ * invokes this lambda. it also forces a `schema.output`, which this family does not have
25
+ * (`rule.prefer.wet-over-dry`)
26
+ *
27
+ * .the order carries the load. middy runs `before` hooks in forward array order and
28
+ * `after`/`onError` in reverse, since it `unshift`s them:
29
+ *
30
+ * index | hook | run order
31
+ * ------|----------------------|------------------------------------------
32
+ * 0 | onError | LAST — logs the fault loudly, then rethrows
33
+ * 1 | before | FIRST — produces `context.log`
34
+ * 2 | before/after/onError | reads `context.log`
35
+ *
36
+ * so trail (1) sits below the io logger (2) and `handler.input` logs. the api-gateway
37
+ * family carries the inverse order and its `handler.input` never fires — a live, recorded
38
+ * defect this family declines to inherit (`rule.require.sweep-the-defect-class`,
39
+ * `.dream/v2026_09_22.fix.logtranslate-input-is-dead-for-the-apigateway-family.md`)
40
+ *
41
+ * .note = both log halves are clamped, one per variant. `perRecord`'s `[case11]` observes the
42
+ * `before` branch through `logTranslate.input`; `perBatch`'s `[case12]` observes the
43
+ * `after` branch through `logTranslate.output`, with the `batchItemFailures` wire shape
44
+ * intact. the second half carries weight only on `perBatch` — `perRecord` returns
45
+ * `Promise<void>`, so a redaction would have naught to strip
46
+ * .note = the io logger's `request.response` branch is dead here by construction rather than by
47
+ * order: no middleware in this chain sets a response, since a server fault rethrows. its
48
+ * `errorMessage` branch is the live one, and the correct one for a family with no caller
49
+ */
50
+ const genSqsEndpointMiddlewares = (input) => [
51
+ /**
52
+ * .what = logs a server fault loudly, then declines to answer
53
+ * .why = `asOutputAfter: false` rethrows, so the invocation fails, cloudwatch records it, and
54
+ * sqs redrives the batch. that is the right contract when no caller waits on a response
55
+ * — and in sqs it is the only contract that keeps the message
56
+ *
57
+ * .note = clamped on both arms, since the blast radius differs per variant. `perRecord`'s
58
+ * `[case10]`: the throw escapes, so the one message redrives. `perBatch`'s `[case7]`:
59
+ * the throw escapes, so the whole batch redrives, the records the handler already
60
+ * finished among them — the honest answer, since any returned value would delete each
61
+ * message it does not name (`rule.forbid.failhide`)
62
+ */
63
+ (0, genInternalServiceErrorMiddleware_1.genInternalServiceErrorMiddleware)({ asOutputAfter: false }),
64
+ (0, genTrailMiddleware_1.genTrailMiddleware)(),
65
+ (0, genIoLoggerMiddleware_1.genIoLoggerMiddleware)({ logTranslate: input.logTranslate }),
66
+ ];
67
+ exports.genSqsEndpointMiddlewares = genSqsEndpointMiddlewares;
68
+ //# sourceMappingURL=genSqsEndpointMiddlewares.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genSqsEndpointMiddlewares.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.ts"],"names":[],"mappings":";;;AAEA,uGAAoG;AACpG,+EAA4E;AAC5E,yEAAsE;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,yBAAyB,GAAG,CAAC,KAEzC,EAIG,EAAE,CAAC;IACL;;;;;;;;;;;OAWG;IACH,IAAA,qEAAiC,EAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IAC3D,IAAA,uCAAkB,GAAE;IACpB,IAAA,6CAAqB,EAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;CAC5D,CAAC;AAtBW,QAAA,yBAAyB,6BAsBpC"}
@@ -0,0 +1,21 @@
1
+ import type { SQSEvent } from 'aws-lambda';
2
+ /**
3
+ * .what = type guard for the shape sqs hands a lambda
4
+ * .why = the reconcile refuses a value neither variant produced, rather than hand a handler a
5
+ * half-decoded envelope. the guard is what lets it refuse loudly
6
+ * (`rule.require.failfast`)
7
+ *
8
+ * .why it reads `eventSource` and not merely `Records` = `{ Records: [] }` is also the shape s3,
9
+ * sns, dynamodb-streams, and kinesis deliver, so a `Records`-only check accepts four other
10
+ * triggers and decodes each one wrong. aws stamps every sqs record
11
+ * `eventSource: 'aws:sqs'`, which is the one field that tells them apart
12
+ *
13
+ * .why an empty `Records` array reads as sqs = it is a legitimate sqs shape — a fixture, a
14
+ * replay, an empty drain — and refusal would be a guess about a value the guard cannot
15
+ * see. the batch-size rule belongs to `perRecord`, which states it as its own constraint
16
+ *
17
+ * .note = only the first record is inspected. a mixed-source batch cannot arrive — one trigger
18
+ * binds one lambda to one queue — so a per-record scan would cost a walk to prove a
19
+ * property aws already guarantees (`rule.avoid.constraints-the-state-already-proves`)
20
+ */
21
+ export declare const getIsSqsEvent: (event: unknown) => event is SQSEvent;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIsSqsEvent = void 0;
4
+ /**
5
+ * .what = type guard for the shape sqs hands a lambda
6
+ * .why = the reconcile refuses a value neither variant produced, rather than hand a handler a
7
+ * half-decoded envelope. the guard is what lets it refuse loudly
8
+ * (`rule.require.failfast`)
9
+ *
10
+ * .why it reads `eventSource` and not merely `Records` = `{ Records: [] }` is also the shape s3,
11
+ * sns, dynamodb-streams, and kinesis deliver, so a `Records`-only check accepts four other
12
+ * triggers and decodes each one wrong. aws stamps every sqs record
13
+ * `eventSource: 'aws:sqs'`, which is the one field that tells them apart
14
+ *
15
+ * .why an empty `Records` array reads as sqs = it is a legitimate sqs shape — a fixture, a
16
+ * replay, an empty drain — and refusal would be a guess about a value the guard cannot
17
+ * see. the batch-size rule belongs to `perRecord`, which states it as its own constraint
18
+ *
19
+ * .note = only the first record is inspected. a mixed-source batch cannot arrive — one trigger
20
+ * binds one lambda to one queue — so a per-record scan would cost a walk to prove a
21
+ * property aws already guarantees (`rule.avoid.constraints-the-state-already-proves`)
22
+ */
23
+ const getIsSqsEvent = (event) => {
24
+ if (!event || typeof event !== 'object')
25
+ return false;
26
+ const records = event.Records;
27
+ if (!Array.isArray(records))
28
+ return false;
29
+ // an empty batch is a legitimate sqs shape; there is no record left to identify it by
30
+ if (records.length === 0)
31
+ return true;
32
+ const first = records[0];
33
+ return first?.eventSource === 'aws:sqs';
34
+ };
35
+ exports.getIsSqsEvent = getIsSqsEvent;
36
+ //# sourceMappingURL=getIsSqsEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getIsSqsEvent.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,aAAa,GAAG,CAAC,KAAc,EAAqB,EAAE;IACjE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEtD,MAAM,OAAO,GAAI,KAA+B,CAAC,OAAO,CAAC;IACzD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAE1C,sFAAsF;IACtF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAA0C,CAAC;IAClE,OAAO,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC;AAC1C,CAAC,CAAC;AAXW,QAAA,aAAa,iBAWxB"}
@@ -0,0 +1,46 @@
1
+ import type { ZodSchema } from 'zod';
2
+ import type { SqsHeadersDeclared, SqsHeadersMerged, SqsRecordDecoded } from './SqsEventDecoded';
3
+ /**
4
+ * .what = validates one decoded record against `schema.input`, then writes the validated values
5
+ * back into it
6
+ * .why = `payload` and `headers` are projections of the record's own slots, so a handler's bag
7
+ * and `record.payload` / `record.headers` are one object each. that holds only while this
8
+ * step replaces the record's values rather than parse beside them — a side bag would leave
9
+ * the record stale, silently (`domain.terms/headers.md`)
10
+ *
11
+ * .why one transformer for both variants = they differ in what they do with a failure, never in
12
+ * what counts as one. `perRecord` lets the throw escape, so the invoke fails and sqs
13
+ * redrives the message; `perBatch` catches it and reports that id as a batch item failure.
14
+ * a second implementation would let the two definitions of valid drift
15
+ * (`rule.forbid.parallel-codepaths`)
16
+ *
17
+ * .why it throws rather than returns a result = the validation error carries the zod issue
18
+ * summary, and a `{ ok, error }` return would make every caller restate the throw.
19
+ * `perBatch`, the one caller that must not propagate it, catches it at its own record
20
+ * boundary — which is where the disposition belongs
21
+ *
22
+ * .defect = LIVE, NOT FIXED — `getValidationError`'s strict-headers hint names api gateway, and
23
+ * one of its four clauses is false here: "api gateway injects keys you did not declare".
24
+ * sqs injects none, so `.strict()` on an sqs header schema is a legitimate choice the hint
25
+ * advises against
26
+ *
27
+ * .proof it is live = `perRecord`'s `[case14]` asserts the api-gateway text, so the clamp
28
+ * is green while the defect is present. its green is never a statement that the message is
29
+ * right (`rule.require.deferred-defect-records-lead-with-status`)
30
+ *
31
+ * .repair, unapplied = `getValidationError` takes the fact it needs from the family. left
32
+ * because it reaches a shared file with 3 production and 6 test call sites across two peer
33
+ * families — not clean to ride along (`rule.always.fix-forward-under-scouts-honor`).
34
+ * `[case14]`'s second assertion is inverted by that repair rather than deleted: an sqs
35
+ * author still owes a hint, and it must name sqs
36
+ */
37
+ export declare const setSqsRecordValidated: <THeaders extends SqsHeadersDeclared, TPayload>(input: {
38
+ record: SqsRecordDecoded;
39
+ schema: ZodSchema<{
40
+ headers?: THeaders;
41
+ payload: TPayload;
42
+ }>;
43
+ }) => SqsRecordDecoded<{
44
+ headers: SqsHeadersMerged<THeaders>;
45
+ payload: TPayload;
46
+ }>;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setSqsRecordValidated = void 0;
4
+ const getValidatedInput_1 = require("../middleware/getValidatedInput");
5
+ /**
6
+ * .what = validates one decoded record against `schema.input`, then writes the validated values
7
+ * back into it
8
+ * .why = `payload` and `headers` are projections of the record's own slots, so a handler's bag
9
+ * and `record.payload` / `record.headers` are one object each. that holds only while this
10
+ * step replaces the record's values rather than parse beside them — a side bag would leave
11
+ * the record stale, silently (`domain.terms/headers.md`)
12
+ *
13
+ * .why one transformer for both variants = they differ in what they do with a failure, never in
14
+ * what counts as one. `perRecord` lets the throw escape, so the invoke fails and sqs
15
+ * redrives the message; `perBatch` catches it and reports that id as a batch item failure.
16
+ * a second implementation would let the two definitions of valid drift
17
+ * (`rule.forbid.parallel-codepaths`)
18
+ *
19
+ * .why it throws rather than returns a result = the validation error carries the zod issue
20
+ * summary, and a `{ ok, error }` return would make every caller restate the throw.
21
+ * `perBatch`, the one caller that must not propagate it, catches it at its own record
22
+ * boundary — which is where the disposition belongs
23
+ *
24
+ * .defect = LIVE, NOT FIXED — `getValidationError`'s strict-headers hint names api gateway, and
25
+ * one of its four clauses is false here: "api gateway injects keys you did not declare".
26
+ * sqs injects none, so `.strict()` on an sqs header schema is a legitimate choice the hint
27
+ * advises against
28
+ *
29
+ * .proof it is live = `perRecord`'s `[case14]` asserts the api-gateway text, so the clamp
30
+ * is green while the defect is present. its green is never a statement that the message is
31
+ * right (`rule.require.deferred-defect-records-lead-with-status`)
32
+ *
33
+ * .repair, unapplied = `getValidationError` takes the fact it needs from the family. left
34
+ * because it reaches a shared file with 3 production and 6 test call sites across two peer
35
+ * families — not clean to ride along (`rule.always.fix-forward-under-scouts-honor`).
36
+ * `[case14]`'s second assertion is inverted by that repair rather than deleted: an sqs
37
+ * author still owes a hint, and it must name sqs
38
+ */
39
+ const setSqsRecordValidated = (input) => {
40
+ const inputAfter = (0, getValidatedInput_1.getValidatedInput)({
41
+ schema: input.schema,
42
+ value: { headers: input.record.headers, payload: input.record.payload },
43
+ });
44
+ /**
45
+ * .note = deliberate mutation — the record is the object the handler reads through both its own
46
+ * slot and the envelope's, so the validated value must land in it
47
+ */
48
+ /**
49
+ * .what = headers merge. the author's schema governs the keys it declares; every other
50
+ * attribute the sender set survives untouched
51
+ * .why = zod strips unknown keys, so a schema like `headers: z.object({ orderId })` yields a bag
52
+ * with only `orderId` — and a replace would silently delete every other attribute the
53
+ * producer set, with no error anywhere (`rule.forbid.failhide`)
54
+ *
55
+ * .note = the api-gateway twin merges for a different reason: there the merge is owed to vendors
56
+ * (`@middy/http-cors` reads `origin` out of that slot), where sqs has no such reader and
57
+ * the merge is owed to the sender (`rule.require.read-the-slot-a-dependency-reads`)
58
+ * .note = the merge also absorbs the absent key: an author who declares no `headers` gets
59
+ * `result.data.headers === undefined`, and a spread of `undefined` is a no-op. so one
60
+ * rule serves both cases, and no branch is owed
61
+ */
62
+ input.record.headers = { ...input.record.headers, ...inputAfter.headers };
63
+ /**
64
+ * .what = payload replaces. the validated value takes the slot outright
65
+ * .why = the body is wholly the handler's — no middleware and no vendor reads it — so the
66
+ * schema's output is the only value that belongs here (`domain.terms/payload.md`)
67
+ */
68
+ input.record.payload = inputAfter.payload;
69
+ /**
70
+ * .as = the record's slots now hold the validated values, which the parameterized shape
71
+ * states and `SqsRecordDecoded`'s default does not. the write-backs above are the
72
+ * proof, and typescript cannot track a mutation into a type parameter
73
+ * .removal = drops if this returns a fresh object rather than mutates — which it cannot,
74
+ * since the projection rests on the mutation (see the note above)
75
+ */
76
+ return input.record;
77
+ };
78
+ exports.setSqsRecordValidated = setSqsRecordValidated;
79
+ //# sourceMappingURL=setSqsRecordValidated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setSqsRecordValidated.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.ts"],"names":[],"mappings":";;;AAEA,uEAAoE;AAOpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACI,MAAM,qBAAqB,GAAG,CAGnC,KAGD,EAGE,EAAE;IACH,MAAM,UAAU,GAAG,IAAA,qCAAiB,EAAC;QACnC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;KACxE,CAAC,CAAC;IAEH;;;OAGG;IAEH;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;IAE1E;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IAE1C;;;;;;OAMG;IACH,OAAO,KAAK,CAAC,MAGX,CAAC;AACL,CAAC,CAAC;AAtDW,QAAA,qBAAqB,yBAsDhC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.genLambdaEndpoint = void 0;
4
+ const genLambdaEndpoint_forApiGateway_1 = require("./genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway");
5
+ const genLambdaEndpoint_forAsk_1 = require("./genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk");
6
+ const genLambdaEndpoint_forSqs_1 = require("./genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs");
7
+ /**
8
+ * .what = the `genLambdaEndpoint` family — every variant, reachable under one name
9
+ * .why = a family's name must belong to the family, never to one of its variants
10
+ * (`rule.forbid.unqualified-variant-exports`). a variant that takes the family name
11
+ * leaves its peers with none to qualify, so the next peer ships bare and preposition-led
12
+ *
13
+ * genLambdaEndpoint.forAsk({ … }) // a direct invoke
14
+ * genLambdaEndpoint.forApiGateway({ … }) // http, via api gateway
15
+ * genLambdaEndpoint.forSqs.perRecord({ … }) // one queue message per invoke
16
+ * genLambdaEndpoint.forSqs.perBatch({ … }) // the whole batch per invoke
17
+ *
18
+ * .note = a plain object, with no callable default: one call form per variant, so a caller
19
+ * always names the trigger it serves
20
+ *
21
+ * .note = `forSqs` is a sub-family rather than a variant, because the sqs trigger forces a
22
+ * cardinality choice no other trigger does — an invoke carries N messages. so the
23
+ * trigger names an object and the cardinality names its leaves
24
+ * (`genLambdaEndpoint.forSqs.ts`)
25
+ */
26
+ exports.genLambdaEndpoint = {
27
+ forAsk: genLambdaEndpoint_forAsk_1.forAsk,
28
+ forApiGateway: genLambdaEndpoint_forApiGateway_1.forApiGateway,
29
+ forSqs: genLambdaEndpoint_forSqs_1.forSqs,
30
+ };
31
+ //# sourceMappingURL=genLambdaEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genLambdaEndpoint.js","sourceRoot":"","sources":["../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.ts"],"names":[],"mappings":";;;AAAA,uHAAkG;AAClG,kGAA6E;AAC7E,kGAA6E;AAE7E;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAN,iCAAM;IACN,aAAa,EAAb,+CAAa;IACb,MAAM,EAAN,iCAAM;CACP,CAAC"}
@@ -20,10 +20,14 @@ import { type LambdaEndpointErrorResponseBodyAncient, type LambdaEndpointErrorRe
20
20
  export declare const genConstraintErrorMiddleware: (opts: {
21
21
  /**
22
22
  * .what = renders the error body as this family's `outputAfter`
23
- * .why = the two families owe DIFFERENT shapes for the same fault: api-gateway owes a wire
24
- * payload with a 400 and a stringified body, while an ask-endpoint response IS its
25
- * payload. only the family knows which, so the family supplies it — never a flag read
26
- * here (rule.forbid.parallel-codepaths)
23
+ * .why = the two families owe DIFFERENT shapes for the same fault: api-gateway owes an
24
+ * `ApiGatewayResponseOnwire` — a 400 with the body stringified inside it — while an
25
+ * ask-endpoint response goes to the wire as it stands. only the family knows which,
26
+ * so the family supplies it — never a flag read here (rule.forbid.parallel-codepaths)
27
+ *
28
+ * .why not the word `payload` here = this seam serves BOTH families, and the word splits at
29
+ * exactly this line: for api-gateway it names the request BODY (rfc 9110), so it can
30
+ * NOT also name the response envelope that carries one. `domain.terms/payload.md`
27
31
  */
28
32
  asOutputAfter: (body: LambdaEndpointErrorResponseBodyContemp | LambdaEndpointErrorResponseBodyAncient) => unknown;
29
33
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"genConstraintErrorMiddleware.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.ts"],"names":[],"mappings":";;;AAEA,yDAAsD;AACtD,iEAKgC;AAChC,iEAA8D;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,4BAA4B,GAAG,CAAC,IAa5C,EAEC,EAAE;IACF,MAAM,OAAO,GAAiC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,qEAAqE;QACrE,uEAAuE;QACvE,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAE/B,gEAAgE;QAChE,MAAM,EAAE,eAAe,GAAG,KAAK,EAAE,GAAG,IAAA,mCAAgB,EAAC;YACnD,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC,CAAC;QAEH,iEAAiE;QACjE,MAAM,IAAI,GAEmC,eAAe;YAC1D,CAAC,CAAC,IAAA,kDAA2B,EAAC,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;YACvE,CAAC,CAAC,IAAA,kDAA2B,EAAC,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAEzE;;;;;;WAMG;QACH,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC;AA/CW,QAAA,4BAA4B,gCA+CvC"}
1
+ {"version":3,"file":"genConstraintErrorMiddleware.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.ts"],"names":[],"mappings":";;;AAEA,yDAAsD;AACtD,iEAKgC;AAChC,iEAA8D;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,4BAA4B,GAAG,CAAC,IAiB5C,EAEC,EAAE;IACF,MAAM,OAAO,GAAiC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,qEAAqE;QACrE,uEAAuE;QACvE,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAE/B,gEAAgE;QAChE,MAAM,EAAE,eAAe,GAAG,KAAK,EAAE,GAAG,IAAA,mCAAgB,EAAC;YACnD,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC,CAAC;QAEH,iEAAiE;QACjE,MAAM,IAAI,GAEmC,eAAe;YAC1D,CAAC,CAAC,IAAA,kDAA2B,EAAC,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;YACvE,CAAC,CAAC,IAAA,kDAA2B,EAAC,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAEzE;;;;;;WAMG;QACH,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC;AAnDW,QAAA,4BAA4B,gCAmDvC"}
@@ -20,7 +20,7 @@ export declare const genInternalServiceErrorMiddleware: (opts: {
20
20
  * a response and a hung request is worse than a 500
21
21
  * false -> DISARMED; rethrow, so the invocation FAILS, cloudwatch records the error, and
22
22
  * the caller may retry — which is the right contract for a server fault when no
23
- * http client waits on it
23
+ * http caller waits on it
24
24
  *
25
25
  * .note = the off-state is `false`, never absent. an absent field would disable a guarantee by
26
26
  * omission, so a caller who forgot it would be indistinguishable from one who chose it