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.
- package/dist/domain.objects/ApiGatewayRequestEventOnwire.d.ts +18 -0
- package/dist/domain.objects/ApiGatewayRequestEventOnwire.js +3 -0
- package/dist/domain.objects/ApiGatewayRequestEventOnwire.js.map +1 -0
- package/dist/domain.objects/ApiGatewayResponse.d.ts +17 -10
- package/dist/domain.objects/{ApiGatewayResponsePayload.d.ts → ApiGatewayResponseOnwire.d.ts} +8 -4
- package/dist/domain.objects/{ApiGatewayRequestPayload.js → ApiGatewayResponseOnwire.js} +1 -1
- package/dist/domain.objects/ApiGatewayResponseOnwire.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/InvokeInputSuperset.d.ts +125 -0
- package/dist/domain.operations/genLambdaEndpoint/{genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.js → InvokeInputSuperset.js} +1 -1
- package/dist/domain.operations/genLambdaEndpoint/InvokeInputSuperset.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/TranslateLog.d.ts +0 -17
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.d.ts +27 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.d.ts +100 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.js +3 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/ApiGatewayRequestEventUnified.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.d.ts +34 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.js +141 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayRequestEventUnified.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.d.ts +22 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.js +27 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwire.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{asApiGatewayResponsePayloadJson.d.ts → asApiGatewayResponseOnwireJson.d.ts} +11 -11
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{asApiGatewayResponsePayloadJson.js → asApiGatewayResponseOnwireJson.js} +12 -12
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseOnwireJson.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.d.ts +39 -13
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.js +37 -11
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponseSchema.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.d.ts +35 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.js +44 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asHeaderKeysLowercased.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.d.ts +95 -39
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js +88 -62
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getAllWirePayloadKeysFound.d.ts → getAllResponseOnwireKeysFound.d.ts} +2 -2
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllResponseOnwireKeysFound.js +43 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllResponseOnwireKeysFound.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV1ApiGatewayEvent.d.ts → getIsV1ApiGatewayRequestEvent.d.ts} +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV1ApiGatewayEvent.js → getIsV1ApiGatewayRequestEvent.js} +4 -4
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV1ApiGatewayRequestEvent.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV2ApiGatewayEvent.d.ts → getIsV2ApiGatewayRequestEvent.d.ts} +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/{getIsV2ApiGatewayEvent.js → getIsV2ApiGatewayRequestEvent.js} +4 -4
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV2ApiGatewayRequestEvent.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.d.ts +8 -5
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.js +11 -8
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/isApiGatewayResponse.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/{genApiGatewayEventNormalizationMiddleware.d.ts → genApiGatewayRequestEventNormalizationMiddleware.d.ts} +3 -3
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/{genApiGatewayEventNormalizationMiddleware.js → genApiGatewayRequestEventNormalizationMiddleware.js} +8 -8
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayRequestEventNormalizationMiddleware.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genContentTypeCoherenceMiddleware.d.ts +4 -4
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genContentTypeCoherenceMiddleware.js +5 -5
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.d.ts +36 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.js +113 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodInputValidationMiddleware.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.d.ts +125 -0
- package/dist/domain.operations/genLambdaEndpoint/{genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.js → genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js} +32 -16
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.d.ts +18 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.js +29 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genAskEventOnwireCaptureMiddleware.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.d.ts +23 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.js +38 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/middleware/genZodEventValidationMiddleware.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.d.ts +123 -0
- package/dist/{domain.objects/ApiGatewayResponsePayload.js → domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.js} +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.d.ts +23 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js +33 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.d.ts +30 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js +38 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.d.ts +30 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js +86 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.d.ts +26 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.js +32 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.d.ts +82 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js +108 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.d.ts +121 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js +97 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.d.ts +52 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js +68 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.d.ts +21 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.js +36 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getIsSqsEvent.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.d.ts +46 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js +79 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.js +31 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.d.ts +8 -4
- package/dist/domain.operations/genLambdaEndpoint/middleware/genConstraintErrorMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.d.ts +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.js +19 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genInternalServiceErrorMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.d.ts +10 -4
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.d.ts +0 -4
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.js +224 -3
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.getJsonSchemaFromZod.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.d.ts +12 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.js +23 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionInput.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.js +17 -6
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.d.ts +16 -18
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.js +16 -18
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIoLoggerMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.d.ts +5 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js +5 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.d.ts +22 -14
- package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.js +23 -15
- package/dist/domain.operations/genLambdaEndpoint/middleware/genZodOutputValidationMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.d.ts +19 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.js +26 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedInput.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.d.ts +17 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.js +40 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidatedOutput.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.d.ts +15 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.js +97 -9
- package/dist/domain.operations/genLambdaEndpoint/middleware/getValidationError.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.d.ts +20 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.js +31 -2
- package/dist/domain.operations/genLambdaEndpoint/middleware/getZodIssuesSummary.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.d.ts +78 -0
- package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.js +103 -0
- package/dist/domain.operations/genLambdaEndpoint/setEventFrozen.js.map +1 -0
- package/dist/domain.operations/genServiceSdk/gen.file/banner.d.ts +2 -3
- package/dist/domain.operations/genServiceSdk/gen.file/banner.js +2 -3
- package/dist/domain.operations/genServiceSdk/gen.file/banner.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.d.ts +7 -2
- package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.js +7 -2
- package/dist/domain.operations/genServiceSdk/gen.mechanism/asMechanismFnSource.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/gen.mechanism/getTypescriptFromJsonSchema.js +24 -19
- package/dist/domain.operations/genServiceSdk/gen.mechanism/getTypescriptFromJsonSchema.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.d.ts +10 -3
- package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.js +10 -3
- package/dist/domain.operations/genServiceSdk/gen.resource/asDomainObjectPragma.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/gen.resource/assertAllDomainObjectRefsBind.js +9 -23
- package/dist/domain.operations/genServiceSdk/gen.resource/assertAllDomainObjectRefsBind.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/gen.resource/getAllDomainObjectsFromContracts.js +11 -18
- package/dist/domain.operations/genServiceSdk/gen.resource/getAllDomainObjectsFromContracts.js.map +1 -1
- package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.d.ts +59 -0
- package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.js +87 -0
- package/dist/domain.operations/genServiceSdk/getAllJsonSchemaNodes.js.map +1 -0
- package/dist/index.d.ts +63 -18
- package/dist/index.js +45 -14
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/readme.md +212 -60
- package/dist/domain.objects/ApiGatewayRequestPayload.d.ts +0 -12
- package/dist/domain.objects/ApiGatewayRequestPayload.js.map +0 -1
- package/dist/domain.objects/ApiGatewayResponsePayload.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.d.ts +0 -36
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/UnifiedApiGatewayEvent.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.d.ts +0 -19
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.js +0 -24
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayload.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asApiGatewayResponsePayloadJson.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.d.ts +0 -27
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.js +0 -118
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asUnifiedApiGatewayEvent.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllWirePayloadKeysFound.js +0 -34
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getAllWirePayloadKeysFound.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV1ApiGatewayEvent.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/getIsV2ApiGatewayEvent.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayEventNormalizationMiddleware.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.d.ts +0 -27
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.js +0 -54
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genZodBodyValidationMiddleware.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.d.ts +0 -64
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/genLambdaEndpoint.forAskEndpoint.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.d.ts +0 -20
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.js +0 -31
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAskEndpoint/middleware/genZodEventValidationMiddleware.js.map +0 -1
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.d.ts +0 -5
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.js +0 -16
- package/dist/domain.operations/genLambdaEndpoint/middleware/genIntrospectionMiddleware.isIntrospectionPayload.js.map +0 -1
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqsEventDecoded.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/SqsEventDecoded.ts"],"names":[],"mappings":""}
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SQSEvent } from 'aws-lambda';
|
|
2
|
+
import type { SqsEventDecoded } from './SqsEventDecoded';
|
|
3
|
+
/**
|
|
4
|
+
* .what = decodes an sqs invoke into the shape both `forSqs` variants read
|
|
5
|
+
* .why = the chain must read one shape, so this runs first and every step after it reads
|
|
6
|
+
* `SqsEventDecoded`
|
|
7
|
+
*
|
|
8
|
+
* .why the input is `wire` and not `payload` = it holds the whole message, and `payload` names
|
|
9
|
+
* the message body and naught else (`domain.terms/payload.md`)
|
|
10
|
+
*
|
|
11
|
+
* .note = an empty batch decodes to `{ records: [] }` rather than throws. it is a legitimate sqs
|
|
12
|
+
* shape, and each variant states what it does with it: `perRecord` refuses it, since it
|
|
13
|
+
* has no record to serve, and `perBatch` returns no failures
|
|
14
|
+
* .note = a named transformer rather than middleware-local logic, so one implementation serves
|
|
15
|
+
* both variants' entry points (`rule.forbid.parallel-codepaths`)
|
|
16
|
+
*/
|
|
17
|
+
export declare const asSqsEventDecoded: (input: {
|
|
18
|
+
wire: SQSEvent;
|
|
19
|
+
}, options?: {
|
|
20
|
+
deserialize: {
|
|
21
|
+
payload: boolean;
|
|
22
|
+
};
|
|
23
|
+
}) => SqsEventDecoded;
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asSqsEventDecoded = void 0;
|
|
4
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
5
|
+
const asSqsRecordDecoded_1 = require("./asSqsRecordDecoded");
|
|
6
|
+
const getIsSqsEvent_1 = require("./getIsSqsEvent");
|
|
7
|
+
/**
|
|
8
|
+
* .what = decodes an sqs invoke into the shape both `forSqs` variants read
|
|
9
|
+
* .why = the chain must read one shape, so this runs first and every step after it reads
|
|
10
|
+
* `SqsEventDecoded`
|
|
11
|
+
*
|
|
12
|
+
* .why the input is `wire` and not `payload` = it holds the whole message, and `payload` names
|
|
13
|
+
* the message body and naught else (`domain.terms/payload.md`)
|
|
14
|
+
*
|
|
15
|
+
* .note = an empty batch decodes to `{ records: [] }` rather than throws. it is a legitimate sqs
|
|
16
|
+
* shape, and each variant states what it does with it: `perRecord` refuses it, since it
|
|
17
|
+
* has no record to serve, and `perBatch` returns no failures
|
|
18
|
+
* .note = a named transformer rather than middleware-local logic, so one implementation serves
|
|
19
|
+
* both variants' entry points (`rule.forbid.parallel-codepaths`)
|
|
20
|
+
*/
|
|
21
|
+
const asSqsEventDecoded = (input, options) => {
|
|
22
|
+
// fail loud rather than hand a handler a shape this transformer did not produce
|
|
23
|
+
if (!(0, getIsSqsEvent_1.getIsSqsEvent)(input.wire))
|
|
24
|
+
return helpful_errors_1.MalfunctionError.throw('wire is not an sqs event shape', {
|
|
25
|
+
wire: input.wire,
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
records: input.wire.Records.map((record) => (0, asSqsRecordDecoded_1.asSqsRecordDecoded)({ wire: record }, options)),
|
|
29
|
+
_: { raw: input.wire },
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.asSqsEventDecoded = asSqsEventDecoded;
|
|
33
|
+
//# sourceMappingURL=asSqsEventDecoded.js.map
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asSqsEventDecoded.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsEventDecoded.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAElD,6DAA0D;AAC1D,mDAAgD;AAGhD;;;;;;;;;;;;;GAaG;AACI,MAAM,iBAAiB,GAAG,CAC/B,KAAyB,EACzB,OAA+C,EAC9B,EAAE;IACnB,gFAAgF;IAChF,IAAI,CAAC,IAAA,6BAAa,EAAC,KAAK,CAAC,IAAI,CAAC;QAC5B,OAAO,iCAAgB,CAAC,KAAK,CAAC,gCAAgC,EAAE;YAC9D,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC,CAAC;IAEL,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACzC,IAAA,uCAAkB,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAC9C;QACD,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE;KACvB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,iBAAiB,qBAgB5B"}
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SQSMessageAttributes } from 'aws-lambda';
|
|
2
|
+
import type { SqsHeadersOnwire } from './SqsEventDecoded';
|
|
3
|
+
/**
|
|
4
|
+
* .what = flattens sqs's per-value message-attribute wrapper into one name per value
|
|
5
|
+
* .why = `headers` means "one name, one value" in every family this sdk serves, so an
|
|
6
|
+
* api-gateway handler and an sqs handler index the bag the same way. aws wraps each value
|
|
7
|
+
* in `{ stringValue?, binaryValue?, dataType }`, which is a codec detail rather than a
|
|
8
|
+
* second dimension of the bag (`domain.terms/headers.md`)
|
|
9
|
+
*
|
|
10
|
+
* .why `stringValue ?? binaryValue` and not `stringValue` alone = a `Binary` attribute carries
|
|
11
|
+
* its value at `binaryValue`, as aws's base64 string. to read only `stringValue` would
|
|
12
|
+
* make every binary attribute read as absent — a value the sender set, silently gone
|
|
13
|
+
* (`rule.forbid.failhide`)
|
|
14
|
+
*
|
|
15
|
+
* .why the keys are not lowercased, where the api-gateway twin folds them = rfc 9110 §5.1 makes
|
|
16
|
+
* http field names case-insensitive; sqs attribute names are case-sensitive, so `OrderId`
|
|
17
|
+
* and `orderId` are two distinct attributes a sender may set together, and a fold would
|
|
18
|
+
* merge them and drop one (`rule.forbid.defended-exceptions` — an axis of the protocol)
|
|
19
|
+
*
|
|
20
|
+
* .note = the base64 is handed over undecoded. this bag's value type is `string | undefined`, and
|
|
21
|
+
* a decoded binary is bytes; to decode here would widen every header value to
|
|
22
|
+
* `string | Buffer` or lose the bytes to a lossy utf-8 round-trip. the caller decodes what
|
|
23
|
+
* they know is binary, and `dataType` says which — at `_.raw.messageAttributes`
|
|
24
|
+
* .note = it also absorbs the absent bag. `SQSRecord.messageAttributes` is declared required, yet
|
|
25
|
+
* a hand-built fixture or a future vendor shape may omit it, and a transformer that
|
|
26
|
+
* returns a bag either way deletes the guard from its caller
|
|
27
|
+
*/
|
|
28
|
+
export declare const asSqsHeadersOnwire: (input: {
|
|
29
|
+
messageAttributes: SQSMessageAttributes | undefined;
|
|
30
|
+
}) => SqsHeadersOnwire;
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asSqsHeadersOnwire = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* .what = flattens sqs's per-value message-attribute wrapper into one name per value
|
|
6
|
+
* .why = `headers` means "one name, one value" in every family this sdk serves, so an
|
|
7
|
+
* api-gateway handler and an sqs handler index the bag the same way. aws wraps each value
|
|
8
|
+
* in `{ stringValue?, binaryValue?, dataType }`, which is a codec detail rather than a
|
|
9
|
+
* second dimension of the bag (`domain.terms/headers.md`)
|
|
10
|
+
*
|
|
11
|
+
* .why `stringValue ?? binaryValue` and not `stringValue` alone = a `Binary` attribute carries
|
|
12
|
+
* its value at `binaryValue`, as aws's base64 string. to read only `stringValue` would
|
|
13
|
+
* make every binary attribute read as absent — a value the sender set, silently gone
|
|
14
|
+
* (`rule.forbid.failhide`)
|
|
15
|
+
*
|
|
16
|
+
* .why the keys are not lowercased, where the api-gateway twin folds them = rfc 9110 §5.1 makes
|
|
17
|
+
* http field names case-insensitive; sqs attribute names are case-sensitive, so `OrderId`
|
|
18
|
+
* and `orderId` are two distinct attributes a sender may set together, and a fold would
|
|
19
|
+
* merge them and drop one (`rule.forbid.defended-exceptions` — an axis of the protocol)
|
|
20
|
+
*
|
|
21
|
+
* .note = the base64 is handed over undecoded. this bag's value type is `string | undefined`, and
|
|
22
|
+
* a decoded binary is bytes; to decode here would widen every header value to
|
|
23
|
+
* `string | Buffer` or lose the bytes to a lossy utf-8 round-trip. the caller decodes what
|
|
24
|
+
* they know is binary, and `dataType` says which — at `_.raw.messageAttributes`
|
|
25
|
+
* .note = it also absorbs the absent bag. `SQSRecord.messageAttributes` is declared required, yet
|
|
26
|
+
* a hand-built fixture or a future vendor shape may omit it, and a transformer that
|
|
27
|
+
* returns a bag either way deletes the guard from its caller
|
|
28
|
+
*/
|
|
29
|
+
const asSqsHeadersOnwire = (input) => {
|
|
30
|
+
if (!input.messageAttributes)
|
|
31
|
+
return {};
|
|
32
|
+
return Object.fromEntries(Object.entries(input.messageAttributes).map(([name, attribute]) => [
|
|
33
|
+
name,
|
|
34
|
+
attribute.stringValue ?? attribute.binaryValue,
|
|
35
|
+
]));
|
|
36
|
+
};
|
|
37
|
+
exports.asSqsHeadersOnwire = asSqsHeadersOnwire;
|
|
38
|
+
//# sourceMappingURL=asSqsHeadersOnwire.js.map
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asSqsHeadersOnwire.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsHeadersOnwire.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACI,MAAM,kBAAkB,GAAG,CAAC,KAElC,EAAoB,EAAE;IACrB,IAAI,CAAC,KAAK,CAAC,iBAAiB;QAAE,OAAO,EAAE,CAAC;IAExC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC;QACjE,IAAI;QACJ,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,WAAW;KAC/C,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B"}
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SQSRecord } from 'aws-lambda';
|
|
2
|
+
import type { SqsRecordDecoded } from './SqsEventDecoded';
|
|
3
|
+
/**
|
|
4
|
+
* .what = what `deserialize` means when a caller declares none — one declaration, read by this
|
|
5
|
+
* transformer and by both `forSqs` variants' config
|
|
6
|
+
* (`rule.forbid.parallel-codepaths`)
|
|
7
|
+
* .why payload = json is the common case, and a caller who wants the raw string opts out by
|
|
8
|
+
* value: `deserialize: { payload: false }`
|
|
9
|
+
*
|
|
10
|
+
* .why a second declaration, where the api-gateway family already exports one = to import that
|
|
11
|
+
* one would bind this family's default to a peer family's. the two agree today and
|
|
12
|
+
* neither owes the other that agreement forever — a shared constant would make a
|
|
13
|
+
* divergence a break rather than an edit (`rule.prefer.wet-over-dry`)
|
|
14
|
+
*/
|
|
15
|
+
export declare const DESERIALIZE_DEFAULT: {
|
|
16
|
+
payload: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* .what = decodes one sqs message into the shape a handler reads
|
|
20
|
+
* .why = the two variants differ in how they hand over records, never in how a record is decoded,
|
|
21
|
+
* so one transformer serves both and a new slot lands in one place
|
|
22
|
+
* (`rule.forbid.parallel-codepaths`)
|
|
23
|
+
*/
|
|
24
|
+
export declare const asSqsRecordDecoded: (input: {
|
|
25
|
+
wire: SQSRecord;
|
|
26
|
+
}, options?: {
|
|
27
|
+
deserialize: {
|
|
28
|
+
payload: boolean;
|
|
29
|
+
};
|
|
30
|
+
}) => SqsRecordDecoded;
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asSqsRecordDecoded = exports.DESERIALIZE_DEFAULT = void 0;
|
|
4
|
+
const asSqsHeadersOnwire_1 = require("./asSqsHeadersOnwire");
|
|
5
|
+
/**
|
|
6
|
+
* .what = parses a json message body into an object
|
|
7
|
+
* .why = sqs hands the body over as a string; most handlers want the object
|
|
8
|
+
*
|
|
9
|
+
* .note = a body that is not json is returned as the string rather than refused — a plain-text
|
|
10
|
+
* or csv producer is a legitimate sender, and its own schema (or `z.any()`) is where
|
|
11
|
+
* that shape gets judged. the same call the api-gateway twin makes, for the same reason
|
|
12
|
+
*
|
|
13
|
+
* .why no base64 arm, where the api-gateway twin has one = sqs carries no `isBase64Encoded` flag
|
|
14
|
+
* and its body is always a utf-8 string; binary rides in a message attribute, with its own
|
|
15
|
+
* `dataType`. the arm is absent because the wire fact it reads is absent
|
|
16
|
+
* (`rule.forbid.defended-exceptions`)
|
|
17
|
+
*
|
|
18
|
+
* .why this is not shared with the api-gateway twin's parser = two usages, and the signatures
|
|
19
|
+
* differ by the base64 flag above. that is below the rule of three, and an abstraction
|
|
20
|
+
* that takes an always-false flag from one of its two callers is a worse shape than the
|
|
21
|
+
* duplicate (`rule.prefer.wet-over-dry`). a third transport earns the lift
|
|
22
|
+
*/
|
|
23
|
+
const asParsedSqsBody = (input) => {
|
|
24
|
+
if (!input.body)
|
|
25
|
+
return null;
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(input.body);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
/**
|
|
31
|
+
* .what = allowlists the ONE error a non-json body can raise, and rethrows every other
|
|
32
|
+
* .why = a bare `catch` would swallow a TypeError from a real defect, and the swallowed
|
|
33
|
+
* value would reach the handler as plain text (`rule.forbid.failhide`).
|
|
34
|
+
* `SyntaxError` is the only class `JSON.parse` throws for malformed input, per
|
|
35
|
+
* ecma-262 §25.5.1, so the allowlist is exhaustive rather than a guess
|
|
36
|
+
*/
|
|
37
|
+
if (!(error instanceof SyntaxError))
|
|
38
|
+
throw error;
|
|
39
|
+
return input.body;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* .what = what `deserialize` means when a caller declares none — one declaration, read by this
|
|
44
|
+
* transformer and by both `forSqs` variants' config
|
|
45
|
+
* (`rule.forbid.parallel-codepaths`)
|
|
46
|
+
* .why payload = json is the common case, and a caller who wants the raw string opts out by
|
|
47
|
+
* value: `deserialize: { payload: false }`
|
|
48
|
+
*
|
|
49
|
+
* .why a second declaration, where the api-gateway family already exports one = to import that
|
|
50
|
+
* one would bind this family's default to a peer family's. the two agree today and
|
|
51
|
+
* neither owes the other that agreement forever — a shared constant would make a
|
|
52
|
+
* divergence a break rather than an edit (`rule.prefer.wet-over-dry`)
|
|
53
|
+
*/
|
|
54
|
+
exports.DESERIALIZE_DEFAULT = { payload: true };
|
|
55
|
+
/**
|
|
56
|
+
* .what = decodes one sqs message into the shape a handler reads
|
|
57
|
+
* .why = the two variants differ in how they hand over records, never in how a record is decoded,
|
|
58
|
+
* so one transformer serves both and a new slot lands in one place
|
|
59
|
+
* (`rule.forbid.parallel-codepaths`)
|
|
60
|
+
*/
|
|
61
|
+
const asSqsRecordDecoded = (input, options) => {
|
|
62
|
+
const deserialize = options?.deserialize ?? exports.DESERIALIZE_DEFAULT;
|
|
63
|
+
return {
|
|
64
|
+
id: input.wire.messageId,
|
|
65
|
+
/**
|
|
66
|
+
* .what = the attributes the sender set, one name per value, keys VERBATIM
|
|
67
|
+
* .note = sqs attribute names are case-sensitive, so the api-gateway case-fold does not
|
|
68
|
+
* travel here — see `asSqsHeadersOnwire`
|
|
69
|
+
*/
|
|
70
|
+
headers: (0, asSqsHeadersOnwire_1.asSqsHeadersOnwire)({
|
|
71
|
+
messageAttributes: input.wire.messageAttributes,
|
|
72
|
+
}),
|
|
73
|
+
/**
|
|
74
|
+
* .what = the body, parsed. VALIDATED later, in place — the input validator replaces this
|
|
75
|
+
* slot with the schema's output before `logic` runs
|
|
76
|
+
* .why = so `payload` is the validated value at the only moment a handler can read it,
|
|
77
|
+
* which is what lets its type state the caller's shape over `unknown`
|
|
78
|
+
*/
|
|
79
|
+
payload: deserialize.payload
|
|
80
|
+
? asParsedSqsBody({ body: input.wire.body })
|
|
81
|
+
: input.wire.body,
|
|
82
|
+
_: { raw: input.wire },
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
exports.asSqsRecordDecoded = asSqsRecordDecoded;
|
|
86
|
+
//# sourceMappingURL=asSqsRecordDecoded.js.map
|
package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asSqsRecordDecoded.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordDecoded.ts"],"names":[],"mappings":";;;AAEA,6DAA0D;AAG1D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,eAAe,GAAG,CAAC,KAExB,EAAW,EAAE;IACZ,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAE7B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf;;;;;;WAMG;QACH,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;YAAE,MAAM,KAAK,CAAC;QAEjD,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,mBAAmB,GAAyB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAE3E;;;;;GAKG;AACI,MAAM,kBAAkB,GAAG,CAChC,KAA0B,EAC1B,OAA+C,EAC7B,EAAE;IACpB,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,2BAAmB,CAAC;IAEhE,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS;QAExB;;;;WAIG;QACH,OAAO,EAAE,IAAA,uCAAkB,EAAC;YAC1B,iBAAiB,EAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB;SAChD,CAAC;QAEF;;;;;WAKG;QACH,OAAO,EAAE,WAAW,CAAC,OAAO;YAC1B,CAAC,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5C,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;QAEnB,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE;KACvB,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,kBAAkB,sBA8B7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = the `forSqs` sub-family — both cardinality variants, under one name
|
|
3
|
+
*
|
|
4
|
+
* genLambdaEndpoint.forSqs.perRecord({ … }) // one message per invoke
|
|
5
|
+
* genLambdaEndpoint.forSqs.perBatch({ … }) // the whole batch per invoke
|
|
6
|
+
*
|
|
7
|
+
* .why two variants and not one widened contract = they make different guarantees, which is the
|
|
8
|
+
* one case `rule.require.widen-before-parallel` names as a real peer:
|
|
9
|
+
*
|
|
10
|
+
* | variant | guarantee |
|
|
11
|
+
* |---|---|
|
|
12
|
+
* | `perRecord` | cardinality 1 — refuses a batch of more than one, loudly, so no message is silently dropped |
|
|
13
|
+
* | `perBatch` | partial failure — reports failed ids, so one poison pill does not redrive nine healthy messages |
|
|
14
|
+
*
|
|
15
|
+
* neither can be expressed as the other plus a flag: `perRecord`'s refusal is what makes
|
|
16
|
+
* its `payload` mean one message, and `perBatch`'s failure report is what makes a bulk
|
|
17
|
+
* handler safe (`domain.terms/event.md`)
|
|
18
|
+
*
|
|
19
|
+
* .note = neither variant is exported bare from `src/index.ts`, and neither is this object. a
|
|
20
|
+
* caller reaches them through `genLambdaEndpoint.forSqs.`, so autocomplete on the family
|
|
21
|
+
* enumerates the whole set
|
|
22
|
+
*/
|
|
23
|
+
export declare const forSqs: {
|
|
24
|
+
perRecord: <THeaders extends import("./SqsEventDecoded").SqsHeadersDeclared, TPayload>(config: import("./genLambdaEndpoint.forSqs.perRecord").ForSqsPerRecordInput<THeaders, TPayload>, context?: import("../../..").ContextAwsLambdaServer | undefined) => import("@middy/core").MiddyfiedHandler<import("aws-lambda").SQSEvent, void, Error, import("aws-lambda").Context>;
|
|
25
|
+
perBatch: <THeaders_1 extends import("./SqsEventDecoded").SqsHeadersDeclared, TPayload_1>(config: import("./genLambdaEndpoint.forSqs.perBatch").ForSqsPerBatchInput<THeaders_1, TPayload_1>, context?: import("../../..").ContextAwsLambdaServer | undefined) => import("@middy/core").MiddyfiedHandler<import("aws-lambda").SQSEvent, import("aws-lambda").SQSBatchResponse, Error, import("aws-lambda").Context>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forSqs = void 0;
|
|
4
|
+
const genLambdaEndpoint_forSqs_perBatch_1 = require("./genLambdaEndpoint.forSqs.perBatch");
|
|
5
|
+
const genLambdaEndpoint_forSqs_perRecord_1 = require("./genLambdaEndpoint.forSqs.perRecord");
|
|
6
|
+
/**
|
|
7
|
+
* .what = the `forSqs` sub-family — both cardinality variants, under one name
|
|
8
|
+
*
|
|
9
|
+
* genLambdaEndpoint.forSqs.perRecord({ … }) // one message per invoke
|
|
10
|
+
* genLambdaEndpoint.forSqs.perBatch({ … }) // the whole batch per invoke
|
|
11
|
+
*
|
|
12
|
+
* .why two variants and not one widened contract = they make different guarantees, which is the
|
|
13
|
+
* one case `rule.require.widen-before-parallel` names as a real peer:
|
|
14
|
+
*
|
|
15
|
+
* | variant | guarantee |
|
|
16
|
+
* |---|---|
|
|
17
|
+
* | `perRecord` | cardinality 1 — refuses a batch of more than one, loudly, so no message is silently dropped |
|
|
18
|
+
* | `perBatch` | partial failure — reports failed ids, so one poison pill does not redrive nine healthy messages |
|
|
19
|
+
*
|
|
20
|
+
* neither can be expressed as the other plus a flag: `perRecord`'s refusal is what makes
|
|
21
|
+
* its `payload` mean one message, and `perBatch`'s failure report is what makes a bulk
|
|
22
|
+
* handler safe (`domain.terms/event.md`)
|
|
23
|
+
*
|
|
24
|
+
* .note = neither variant is exported bare from `src/index.ts`, and neither is this object. a
|
|
25
|
+
* caller reaches them through `genLambdaEndpoint.forSqs.`, so autocomplete on the family
|
|
26
|
+
* enumerates the whole set
|
|
27
|
+
*/
|
|
28
|
+
exports.forSqs = {
|
|
29
|
+
perRecord: genLambdaEndpoint_forSqs_perRecord_1.perRecord,
|
|
30
|
+
perBatch: genLambdaEndpoint_forSqs_perBatch_1.perBatch,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=genLambdaEndpoint.forSqs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genLambdaEndpoint.forSqs.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.ts"],"names":[],"mappings":";;;AAAA,2FAA+D;AAC/D,6FAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACU,QAAA,MAAM,GAAG;IACpB,SAAS,EAAT,8CAAS;IACT,QAAQ,EAAR,4CAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import middy from '@middy/core';
|
|
2
|
+
import type { Context, SQSBatchResponse, 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, SqsRecordDecoded } from './SqsEventDecoded';
|
|
9
|
+
/**
|
|
10
|
+
* .what = the one fact sqs needs to delete a message: its `id`
|
|
11
|
+
* .why = a record carries its `id`, so `return { successes: recordsThatSucceeded }` needs no
|
|
12
|
+
* re-shape. `id`, never aws's wire name `itemIdentifier` (`domain.terms/.readme.md`)
|
|
13
|
+
*/
|
|
14
|
+
export interface SqsRecordSuccessRef {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* .what = sdk contract type for `genLambdaEndpoint.forSqs.perBatch`
|
|
19
|
+
* .why = exported for consumer type inference
|
|
20
|
+
*/
|
|
21
|
+
export type ForSqsPerBatchInput<THeaders extends SqsHeadersDeclared, TPayload> = {
|
|
22
|
+
schema: {
|
|
23
|
+
/**
|
|
24
|
+
* .what = the pair one message carries — `{ headers?, payload }`, applied per record
|
|
25
|
+
* .note = a record this refuses never reaches `invoke`, and is retried
|
|
26
|
+
*/
|
|
27
|
+
input: ZodSchema<{
|
|
28
|
+
headers?: THeaders;
|
|
29
|
+
payload: TPayload;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
invoke: (input: {
|
|
33
|
+
/**
|
|
34
|
+
* .what = the messages that passed validation — a filter over `event.records`, never a
|
|
35
|
+
* copy (`domain.terms/records.md`)
|
|
36
|
+
*/
|
|
37
|
+
records: FrozenDeep<SqsRecordDecoded<{
|
|
38
|
+
headers: SqsHeadersMerged<THeaders>;
|
|
39
|
+
payload: TPayload;
|
|
40
|
+
}>[]>;
|
|
41
|
+
/**
|
|
42
|
+
* .what = the whole object that arrived — every record, valid or not
|
|
43
|
+
* (`domain.terms/event.md`)
|
|
44
|
+
*/
|
|
45
|
+
event: FrozenDeep<SqsEventDecoded<{
|
|
46
|
+
headers: SqsHeadersMerged<THeaders>;
|
|
47
|
+
payload: TPayload;
|
|
48
|
+
}>>;
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* .what = the ambient bag; the lineage rides `context.log.trail`, one per invoke
|
|
52
|
+
* (`domain.terms/trail.md`)
|
|
53
|
+
*/
|
|
54
|
+
context: ContextLogTrail) => Promise<{
|
|
55
|
+
/**
|
|
56
|
+
* .what = the records this handler processed, so sqs may delete them
|
|
57
|
+
* .why = fail safe. a record not named here is retried, so a forgotten record redrives rather
|
|
58
|
+
* than vanishes (`rule.forbid.failhide`)
|
|
59
|
+
*/
|
|
60
|
+
successes: readonly FrozenDeep<SqsRecordSuccessRef>[];
|
|
61
|
+
}>;
|
|
62
|
+
logTranslate?: TranslateLog;
|
|
63
|
+
deserialize?: {
|
|
64
|
+
/**
|
|
65
|
+
* .what = whether to parse each json body into its `payload`
|
|
66
|
+
* .note = `false` hands `payload` to your schema as a string, so pair it with `z.string()`
|
|
67
|
+
* (`rule.require.explicit-optout`)
|
|
68
|
+
*/
|
|
69
|
+
payload: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* .what = generates an sqs lambda handler that serves a whole batch per invoke
|
|
74
|
+
* .why = a handler that acts on many messages at once cannot be expressed one record at a time,
|
|
75
|
+
* and a partial-batch response lets one poison message fail alone
|
|
76
|
+
*
|
|
77
|
+
* .note = fail safe by construction: every record not reported as a success is retried, and an
|
|
78
|
+
* answer the sdk cannot read throws, which retries the whole batch
|
|
79
|
+
* .note = deploy precondition: the event source must declare
|
|
80
|
+
* `functionResponseTypes: ['ReportBatchItemFailures']`, or sqs deletes every message
|
|
81
|
+
*/
|
|
82
|
+
export declare const perBatch: <THeaders extends SqsHeadersDeclared, TPayload>(config: ForSqsPerBatchInput<THeaders, TPayload>, context?: ContextAwsLambdaServer) => middy.MiddyfiedHandler<SQSEvent, SQSBatchResponse, Error, Context>;
|
|
@@ -0,0 +1,108 @@
|
|
|
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.perBatch = 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 a whole batch per invoke
|
|
17
|
+
* .why = a handler that acts on many messages at once cannot be expressed one record at a time,
|
|
18
|
+
* and a partial-batch response lets one poison message fail alone
|
|
19
|
+
*
|
|
20
|
+
* .note = fail safe by construction: every record not reported as a success is retried, and an
|
|
21
|
+
* answer the sdk cannot read throws, which retries the whole batch
|
|
22
|
+
* .note = deploy precondition: the event source must declare
|
|
23
|
+
* `functionResponseTypes: ['ReportBatchItemFailures']`, or sqs deletes every message
|
|
24
|
+
*/
|
|
25
|
+
const perBatch = (config, context) => {
|
|
26
|
+
// the env context this family declares for symmetry; no step of its chain reads one yet
|
|
27
|
+
void context;
|
|
28
|
+
const deserialize = config.deserialize ?? asSqsRecordDecoded_1.DESERIALIZE_DEFAULT;
|
|
29
|
+
/**
|
|
30
|
+
* .what = decode, validate each, invoke, report every record not claimed as a success
|
|
31
|
+
* .why = the chain has produced the trail log by here, so this reads as narrative
|
|
32
|
+
*/
|
|
33
|
+
const logic = async (event, lambdaContext) => {
|
|
34
|
+
// read the trail log `genTrailMiddleware` wrote
|
|
35
|
+
const { log } = (0, asContextLogTrail_1.asContextLogTrail)({ context: lambdaContext });
|
|
36
|
+
const decoded = (0, asSqsEventDecoded_1.asSqsEventDecoded)({ wire: event }, { deserialize });
|
|
37
|
+
// validate each record; a refusal is logged and left out, so it is retried alone
|
|
38
|
+
const recordsValidated = [];
|
|
39
|
+
for (const record of decoded.records) {
|
|
40
|
+
try {
|
|
41
|
+
recordsValidated.push((0, setSqsRecordValidated_1.setSqsRecordValidated)({ record, schema: config.schema.input }));
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (!(error instanceof Error))
|
|
45
|
+
throw error;
|
|
46
|
+
log.warn('sqs.record.invalid', {
|
|
47
|
+
id: record.id,
|
|
48
|
+
errorMessage: error.message,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// the only ids a handler may claim; read before its turn, so no write it makes can widen them
|
|
53
|
+
const idsClaimable = new Set(recordsValidated.map((record) => record.id));
|
|
54
|
+
/**
|
|
55
|
+
* .what = seals the envelope before the handler's turn (`rule.require.frozen-invoke-inputs`)
|
|
56
|
+
* .where = after validation, since the validator writes parsed values back into each record
|
|
57
|
+
* .as = the envelope now carries the validated values, a fact typescript cannot track from a
|
|
58
|
+
* mutation. drops when the decode is parameterized on the schema's output types
|
|
59
|
+
*/
|
|
60
|
+
const frozen = (0, setEventFrozen_1.setEventFrozen)({
|
|
61
|
+
event: {
|
|
62
|
+
records: recordsValidated,
|
|
63
|
+
event: decoded,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
const answer = await config.invoke({ records: frozen.records, event: frozen.event }, { log });
|
|
67
|
+
// refuse an answer with no `successes` array; the throw retries the whole batch
|
|
68
|
+
if (!Array.isArray(answer?.successes))
|
|
69
|
+
helpful_errors_1.MalfunctionError.throw('forSqs.perBatch handler answered without a `successes` array', {
|
|
70
|
+
got: answer === undefined ? 'undefined' : typeof answer,
|
|
71
|
+
keys: answer ? Object.keys(answer) : [],
|
|
72
|
+
fix: 'return `{ successes: recordsThatSucceeded }` — the records themselves. none succeeded? `{ successes: [] }`',
|
|
73
|
+
});
|
|
74
|
+
// refuse an entry with no string `id`; the throw retries the whole batch
|
|
75
|
+
const refsMalformed = answer.successes
|
|
76
|
+
.map((success, index) => ({ index, success }))
|
|
77
|
+
.filter(({ success }) => typeof success?.id !== 'string');
|
|
78
|
+
if (refsMalformed.length)
|
|
79
|
+
helpful_errors_1.MalfunctionError.throw('forSqs.perBatch handler answered with a success that carries no `id`', {
|
|
80
|
+
indexes: refsMalformed.map(({ index }) => index),
|
|
81
|
+
got: refsMalformed.map(({ success }) => success === null ? 'null' : typeof success),
|
|
82
|
+
fix: 'return the records themselves — `return { successes: recordsThatSucceeded }` — rather than bare id strings',
|
|
83
|
+
});
|
|
84
|
+
// refuse a claim on a record the handler was not handed; the throw retries the whole batch
|
|
85
|
+
const idsUnclaimable = answer.successes
|
|
86
|
+
.map((success) => success.id)
|
|
87
|
+
.filter((id) => !idsClaimable.has(id));
|
|
88
|
+
if (idsUnclaimable.length)
|
|
89
|
+
helpful_errors_1.MalfunctionError.throw('forSqs.perBatch handler claimed a success for a record it was not handed', {
|
|
90
|
+
idsUnclaimable,
|
|
91
|
+
idsClaimable: [...idsClaimable],
|
|
92
|
+
fix: 'return the records themselves — `return { successes: recordsThatSucceeded }` — drawn from `records`, never from `event.records` or a hand-written id',
|
|
93
|
+
});
|
|
94
|
+
// every record not claimed as a success is retried; deduped, since sqs reads each id once
|
|
95
|
+
const idsSucceeded = new Set(answer.successes.map((success) => success.id));
|
|
96
|
+
const idsFailed = [
|
|
97
|
+
...new Set(decoded.records
|
|
98
|
+
.map((record) => record.id)
|
|
99
|
+
.filter((id) => !idsSucceeded.has(id))),
|
|
100
|
+
];
|
|
101
|
+
return {
|
|
102
|
+
batchItemFailures: idsFailed.map((id) => ({ itemIdentifier: id })),
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
return (0, core_1.default)(logic).use((0, genSqsEndpointMiddlewares_1.genSqsEndpointMiddlewares)({ logTranslate: config.logTranslate }));
|
|
106
|
+
};
|
|
107
|
+
exports.perBatch = perBatch;
|
|
108
|
+
//# sourceMappingURL=genLambdaEndpoint.forSqs.perBatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genLambdaEndpoint.forSqs.perBatch.js","sourceRoot":"","sources":["../../../../src/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.ts"],"names":[],"mappings":"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"}
|