@izara_project/izara-market-library-service-schemas 1.0.76 → 1.0.78
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/index.js +25 -12
- package/package.json +15 -12
- package/src/CheckPermission/CheckPermission.js +6 -12
- package/src/GenerateCodeLibs/index.js +6 -4
- package/src/GenerateCodeLibs/src/Consts.js +1 -1
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +84 -101
- package/src/MainLibs/index.js +7 -4
- package/src/MainLibs/src/Consts.js +26 -12
- package/src/MainLibs/src/GenerateCodeUtils.js +2 -5
- package/src/MainLibs/src/Utils.js +14 -9
- package/src/SourceManager/index.js +5 -3
- package/src/SourceManager/src/CreateSource.js +5 -6
- package/src/SourceManager/src/Utils.js +8 -4
- package/src/TemplateManager/src/FindData/FindDataYaml/data.js +1 -1
- package/src/TemplateManager/src/FindData/Handler/data.js +1 -1
- package/src/TemplateManager/src/FindData/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/sns-in-sqs/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/sqs-in-sns/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/sqs-in-sns/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/sqs-in-sns/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrWbs/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/webSocketConnect/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrApi/template.ejs +36 -76
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrDsq/template.ejs +55 -127
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrInv/template.ejs +36 -80
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrSqs/template.ejs +57 -130
- package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocket/template.ejs +60 -141
- package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocketConnect/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Create/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Create/template.ejs +334 -626
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Delete/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Delete/template.ejs +97 -191
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Get/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Get/template.ejs +113 -264
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Update/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Update/template.ejs +163 -350
- package/src/TemplateManager/src/PerActionEndpoint/libs/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogical/Handler/data.js +3 -3
- package/src/TemplateManager/src/ProcessLogical/ProcessLogicalYaml/data.js +3 -3
- package/src/TemplateManager/src/ProcessLogical/mainFunction/data.js +2 -2
- package/src/TemplateManager/src/ProcessLogicalPagination/DsqYaml/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogicalPagination/Handler/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogicalPagination/Handler/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/ProcessLogicalPagination/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrApi/template.ejs +57 -138
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrSqs/template.ejs +75 -163
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/handler/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/sns-in-sqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/sns-out/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrApi/template.ejs +56 -138
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrSqs/template.ejs +74 -162
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/handler/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/sns-in-sqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/sns-out/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/handler/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/sns-in-sqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/sns-out/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrApi/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrApi/template.ejs +57 -140
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrSqs/template.ejs +72 -163
- package/src/TemplateManager/src/ResourceYaml/dynamodb/defaultDynamoDbTable.js +1 -1
- package/src/TemplateManager/src/ResourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +1 -1
- package/src/TemplateManager/src/ResourceYaml/sns-out/data.js +1 -1
- package/src/TemplateManager/src/ResourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +1 -1
- package/src/TemplateManager/src/attributeTree/objectSchema/data.js +1 -1
- package/src/TemplateManager/src/attributeTree/relationshipSchema/data.js +1 -1
- package/src/TemplateManager/src/attributeTreeSchema/relationshipSchema/data.js +1 -1
- package/src/TemplateManager/src/externalService/LambdaRole/data.js +2 -2
- package/src/TemplateManager/src/externalService/SnsTopicSubscriotions/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/DefaultWebSocketResource/webSocketConnect/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/DefaultWebSocketResource/webSocketConnect/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/sns-sqs/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/queue/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/sqs/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/functionYaml/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/queue/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrS3/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerDsq/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerS3/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/mainFunction/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/S3/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/libs/data.js +1 -1
- package/src/reStructure/GenerateCode.js +19 -20
- package/src/reStructure/GenerateResources.js +127 -0
- package/src/reStructure/GenerateSchema.js +11 -14
- package/src/reStructure/GenerateTests.js +134 -0
- package/src/reStructure/IntTestConfig.js +27 -0
- package/src/reStructure/SchemaConfig.js +1 -1
- package/src/reStructure/TemplateConfig.js +2 -1
- package/src/reStructure/TemplateData/Auth/generateAuthYml/data.js +9 -14
- package/src/reStructure/TemplateData/Auth/generateTemplateData.js +3 -7
- package/src/reStructure/TemplateData/EndpointPerService/generateTemplateData.js +25 -16
- package/src/reStructure/TemplateData/EndpointPerService/handler/api/data.js +9 -11
- package/src/reStructure/TemplateData/EndpointPerService/handler/api/template.ejs +4 -4
- package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/data.js +9 -13
- package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/template.ejs +8 -8
- package/src/reStructure/TemplateData/EndpointPerService/handler/inv/data.js +9 -7
- package/src/reStructure/TemplateData/EndpointPerService/handler/inv/template.ejs +4 -4
- package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/data.js +9 -11
- package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/template.ejs +8 -8
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +353 -696
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/data.js +15 -13
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +23 -29
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/data.js +9 -7
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +25 -48
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/data.js +10 -12
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +18 -33
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/data.js +10 -12
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +15 -17
- package/src/reStructure/TemplateData/EndpointPerService/yaml/data.js +17 -10
- package/src/reStructure/TemplateData/IntTest/generateResources/generateResources.js +91 -0
- package/src/reStructure/TemplateData/IntTest/generateResources/templateResources.ejs +18 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/bashScript/data.js +45 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/bashScript/template.ejs +0 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/events/data.js +103 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/events/templateEvents.ejs +11 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/generateTemplate.js +59 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/tests/data.js +168 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/tests/templateTests.ejs +3 -0
- package/src/reStructure/TemplateData/IntTest/libs/libs.js +415 -0
- package/src/reStructure/TemplateData/IntTest/upload/uploadIntTest.js +60 -0
- package/src/reStructure/TemplateData/externalService/functionNameConfig/data.js +9 -5
- package/src/reStructure/TemplateData/externalService/functionNameConfig/templateIntTesting.ejs +1 -1
- package/src/reStructure/TemplateData/externalService/generateTemplateData.js +8 -7
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +14 -19
- package/src/reStructure/TemplateData/externalService/lambdaRole/template.ejs +5 -7
- package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +26 -17
- package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/template.ejs +1 -1
- package/src/reStructure/TemplateData/findData/findDataYaml/data.js +15 -9
- package/src/reStructure/TemplateData/findData/generateTemplateData.js +7 -10
- package/src/reStructure/TemplateData/findData/handler/data.js +9 -15
- package/src/reStructure/TemplateData/findData/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/findData/mainFunction/data.js +21 -29
- package/src/reStructure/TemplateData/findData/mainFunction/template.ejs +6 -9
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +10 -6
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +5 -6
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +7 -20
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +14 -17
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +10 -8
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +14 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +10 -4
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +7 -8
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +11 -6
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +16 -13
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +15 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +18 -21
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +14 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +24 -28
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +9 -8
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +10 -15
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/template.ejs +6 -9
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +5 -25
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +12 -9
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +9 -11
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +13 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +26 -29
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +15 -15
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +8 -9
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +14 -15
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +11 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +10 -16
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/template.ejs +6 -10
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +181 -390
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +9 -16
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +2 -17
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/queue/data.js +11 -4
- package/src/reStructure/TemplateData/flowSchema/components/upload/relate/S3/data.js +10 -4
- package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/data.js +9 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +5 -7
- package/src/reStructure/TemplateData/flowSchema/components/upload/relate/sns-out/data.js +10 -18
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/data.js +11 -5
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +4 -6
- package/src/reStructure/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +11 -3
- package/src/reStructure/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +11 -3
- package/src/reStructure/TemplateData/flowSchema/components/websocket/dynamoDb/userUploadRecords.js +11 -3
- package/src/reStructure/TemplateData/flowSchema/dynamoDb/data.js +11 -4
- package/src/reStructure/TemplateData/flowSchema/eventBridge/functionYaml/data.js +10 -10
- package/src/reStructure/TemplateData/flowSchema/eventBridge/handler/inv/data.js +11 -20
- package/src/reStructure/TemplateData/flowSchema/eventBridge/handler/inv/template.ejs +11 -14
- package/src/reStructure/TemplateData/flowSchema/eventBridge/mainFunction/data.js +11 -20
- package/src/reStructure/TemplateData/flowSchema/eventBridge/mainFunction/template.ejs +4 -33
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +11 -12
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +11 -15
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/handler/template.ejs +6 -10
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +11 -5
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +2 -25
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/functionYaml/data.js +13 -10
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/handler/data.js +9 -21
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +15 -19
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +13 -16
- package/src/reStructure/TemplateData/flowSchema/flowSchemaMainFunction/data.js +13 -7
- package/src/reStructure/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +17 -19
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +11 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +13 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +6 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +2 -25
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +15 -12
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +10 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +9 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +13 -16
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +10 -15
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +15 -19
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +8 -14
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +8 -13
- package/src/reStructure/TemplateData/flowSchema/flowStep/functionYaml/data.js +11 -11
- package/src/reStructure/TemplateData/flowSchema/flowStep/handler/data.js +10 -6
- package/src/reStructure/TemplateData/flowSchema/flowStep/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/flowSchema/flowStep/mainFunction/data.js +10 -17
- package/src/reStructure/TemplateData/flowSchema/flowStep/mainFunction/template.ejs +2 -14
- package/src/reStructure/TemplateData/flowSchema/flowStep/sns-in/data.js +10 -5
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +115 -107
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Api/functionYaml/data.js +14 -20
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Api/handler/data.js +14 -6
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Api/handler/template.ejs +7 -5
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/data.js +10 -18
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Inv/handler/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/Inv/handler/template.ejs +5 -6
- package/src/reStructure/TemplateData/flowSchema/register/complete/functionYaml/data.js +8 -9
- package/src/reStructure/TemplateData/flowSchema/register/complete/handler/data.js +13 -5
- package/src/reStructure/TemplateData/flowSchema/register/complete/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/flowSchema/register/complete/mainFunction/data.js +12 -5
- package/src/reStructure/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +18 -26
- package/src/reStructure/TemplateData/flowSchema/register/dynamoDB/register.js +8 -3
- package/src/reStructure/TemplateData/flowSchema/register/sns-in/data.js +8 -14
- package/src/reStructure/TemplateData/flowSchema/register/subscriptionOutAll/data.js +8 -14
- package/src/reStructure/TemplateData/flowSchema/register/wbs/functionYaml/data.js +10 -10
- package/src/reStructure/TemplateData/flowSchema/register/wbs/handler/data.js +9 -5
- package/src/reStructure/TemplateData/flowSchema/register/wbs/handler/template.ejs +9 -12
- package/src/reStructure/TemplateData/flowSchema/register/wbs/mainFunction/data.js +9 -5
- package/src/reStructure/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +16 -24
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/data.js +25 -8
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/Handler/data.js +15 -8
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/Handler/template.ejs +11 -10
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/MainFunction/data.js +11 -6
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/MainFunction/template.ejs +53 -60
- package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/sns/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/templateByStatusType/statusFieldTemplate.ejs +15 -14
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +26 -8
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +13 -9
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +12 -6
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/template.ejs +3 -15
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +25 -8
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +13 -9
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +12 -7
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +2 -14
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +25 -8
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +9 -9
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +14 -6
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/template.ejs +2 -15
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +15 -5
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +10 -10
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/handler/data.js +13 -5
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/handler/template.ejs +6 -9
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/mainFunction/data.js +10 -5
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/mainFunction/template.ejs +13 -25
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/sqs/data.js +13 -14
- package/src/reStructure/TemplateData/generateRole/createSharedResource.js +1 -3
- package/src/reStructure/TemplateData/generateRole/data.js +9 -7
- package/src/reStructure/TemplateData/perActionComplete/create/handler/data.js +13 -13
- package/src/reStructure/TemplateData/perActionComplete/create/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/data.js +9 -14
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +11 -10
- package/src/reStructure/TemplateData/perActionComplete/create/sns-in-sqs/data.js +11 -9
- package/src/reStructure/TemplateData/perActionComplete/create/sns-out/data.js +9 -10
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +14 -37
- package/src/reStructure/TemplateData/perActionComplete/delete/handler/data.js +13 -9
- package/src/reStructure/TemplateData/perActionComplete/delete/handler/template.ejs +7 -11
- package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/data.js +12 -11
- package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +9 -16
- package/src/reStructure/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +14 -6
- package/src/reStructure/TemplateData/perActionComplete/delete/sns-out/data.js +13 -9
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +15 -36
- package/src/reStructure/TemplateData/perActionComplete/generateTemplateData.js +34 -18
- package/src/reStructure/TemplateData/perActionComplete/get/handler/data.js +16 -6
- package/src/reStructure/TemplateData/perActionComplete/get/handler/template.ejs +6 -9
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/data.js +16 -9
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +11 -15
- package/src/reStructure/TemplateData/perActionComplete/get/sns-in-sqs/data.js +17 -5
- package/src/reStructure/TemplateData/perActionComplete/get/sns-out/data.js +10 -10
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +14 -16
- package/src/reStructure/TemplateData/perActionComplete/update/handler/data.js +13 -9
- package/src/reStructure/TemplateData/perActionComplete/update/handler/template.ejs +7 -10
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/data.js +12 -9
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +13 -18
- package/src/reStructure/TemplateData/perActionComplete/update/sns-in-sqs/data.js +12 -7
- package/src/reStructure/TemplateData/perActionComplete/update/sns-out/data.js +10 -13
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +14 -39
- package/src/reStructure/TemplateData/perActionEndpoint/handler/api/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/handler/api/template.ejs +36 -76
- package/src/reStructure/TemplateData/perActionEndpoint/handler/dsq/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/handler/dsq/template.ejs +55 -127
- package/src/reStructure/TemplateData/perActionEndpoint/handler/inv/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/handler/inv/template.ejs +36 -78
- package/src/reStructure/TemplateData/perActionEndpoint/handler/sqs/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/handler/sqs/template.ejs +57 -130
- package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocket/template.ejs +60 -140
- package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocketConnect/data.js +1 -1
- package/src/reStructure/TemplateData/perActionEndpoint/libs/data.js +2 -2
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +335 -624
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +97 -191
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/template.ejs +115 -263
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +164 -348
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/api/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/dsq/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/inv/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/sqs/data.js +3 -3
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/wbs/data.js +1 -1
- package/src/reStructure/TemplateData/perActionEndpoint/yaml/webSocketConnect/data.js +1 -1
- package/src/reStructure/TemplateData/processLogical/generateTemplateData.js +7 -9
- package/src/reStructure/TemplateData/processLogical/handler/data.js +11 -5
- package/src/reStructure/TemplateData/processLogical/handler/template.ejs +7 -9
- package/src/reStructure/TemplateData/processLogical/mainFunction/data.js +12 -4
- package/src/reStructure/TemplateData/processLogical/mainFunction/template.ejs +11 -16
- package/src/reStructure/TemplateData/processLogical/yaml/data.js +16 -12
- package/src/reStructure/TemplateData/processLogicalPagination/DsqYaml/data.js +8 -4
- package/src/reStructure/TemplateData/processLogicalPagination/generateTemplateData.js +9 -14
- package/src/reStructure/TemplateData/processLogicalPagination/handler/dsq/data.js +10 -5
- package/src/reStructure/TemplateData/processLogicalPagination/handler/dsq/template.ejs +6 -9
- package/src/reStructure/TemplateData/processLogicalPagination/handler/sqs/data.js +9 -5
- package/src/reStructure/TemplateData/processLogicalPagination/handler/sqs/template.ejs +6 -9
- package/src/reStructure/TemplateData/processLogicalPagination/mainFunction/data.js +9 -5
- package/src/reStructure/TemplateData/processLogicalPagination/mainFunction/template.ejs +7 -10
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/data.js +14 -8
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/data.js +17 -10
- package/src/reStructure/TemplateData/propertyValueSchema/generateTemplateData.js +7 -8
- package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/data.js +9 -10
- package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/templateObjectPropertyValueSchema.ejs +1 -4
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/data.js +16 -11
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/tempRelationship.ejs +1 -1
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/templateRelationshipPropertyValueSchema.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +19 -18
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/template.ejs +59 -155
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +17 -11
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/template.ejs +77 -181
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +19 -21
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +18 -23
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +18 -21
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +22 -21
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/data.js +12 -6
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +16 -25
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/data.js +12 -7
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +11 -8
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/data.js +13 -7
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +6 -9
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/data.js +12 -7
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +12 -16
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/data.js +13 -16
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/data.js +13 -16
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +16 -13
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/api/template.ejs +57 -138
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/data.js +17 -12
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/sqs/template.ejs +75 -163
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +17 -17
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +15 -20
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +15 -18
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +19 -19
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +12 -8
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +22 -28
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +11 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +11 -8
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +7 -10
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +14 -17
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +9 -15
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +9 -16
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +16 -12
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +8 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/api/template.ejs +11 -10
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/data.js +13 -11
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/dsq/template.ejs +9 -11
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/inv/template.ejs +12 -14
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/sqs/template.ejs +9 -6
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +21 -18
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +9 -11
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +15 -17
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +17 -18
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +17 -20
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +8 -7
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +10 -8
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +9 -11
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +9 -6
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +15 -14
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +9 -14
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +9 -16
- package/src/reStructure/TemplateData/relationshipPerAction/generateTemplateData.js +131 -129
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +17 -12
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/data.js +13 -11
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +20 -19
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +10 -15
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +10 -13
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +17 -16
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +18 -23
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/sns-in-sqs/data.js +8 -7
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +11 -9
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/data.js +9 -6
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +7 -11
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/data.js +9 -6
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +14 -15
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/data.js +9 -15
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/sns-out/data.js +9 -14
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +19 -18
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +13 -12
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +16 -18
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +16 -21
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +16 -19
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +20 -20
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +9 -8
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +19 -26
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +8 -8
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +11 -9
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +9 -7
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +7 -10
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +9 -6
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +12 -16
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +9 -15
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +9 -15
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +15 -13
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +8 -5
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/api/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/data.js +13 -10
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/dsq/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/inv/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/sqs/data.js +7 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +18 -18
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +10 -15
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +11 -14
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +68 -69
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +9 -11
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +20 -27
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +8 -16
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-out/data.js +7 -14
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +11 -8
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +9 -8
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +7 -10
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +9 -9
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +16 -17
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +9 -15
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +9 -16
- package/src/reStructure/TemplateData/resourceYaml/CreateSourceData.js +4 -5
- package/src/reStructure/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +8 -14
- package/src/reStructure/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +8 -8
- package/src/reStructure/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +9 -15
- package/src/reStructure/TemplateData/resourceYaml/filterGenerateResource/data.js +6 -15
- package/src/reStructure/TemplateData/resourceYaml/generateTemplateData.js +15 -14
- package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +8 -13
- package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +10 -13
- package/src/reStructure/TemplateData/resourceYaml/sns-out/data.js +10 -7
- package/src/reStructure/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +8 -16
- package/src/reStructure/libs/GenerateCodeLibs.js +3 -5
- package/src/reStructure/libs/ValidateAddOnDataStructure.js +5 -5
- package/src.zip +0 -0
- package/src/GenerateCodeLibs/src/TranslateIdsLibs.js +0 -92
|
@@ -1,628 +1,339 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
GNU Affero General Public License for more details.
|
|
13
|
-
|
|
14
|
-
You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
'use strict';
|
|
1
|
+
/* Copyright (C) 2021 Sven Mason <http://izara.io> This program is free
|
|
2
|
+
software: you can redistribute it and/or modify it under the terms of the GNU
|
|
3
|
+
Affero General Public License as published by the Free Software Foundation,
|
|
4
|
+
either version 3 of the License, or (at your option) any later version. This
|
|
5
|
+
program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
6
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
7
|
+
PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
8
|
+
You should have received a copy of the GNU Affero General Public License along
|
|
9
|
+
with this program. If not, see <http://www.gnu.org/licenses/>. */ 'use strict';
|
|
19
10
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
20
|
-
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const sns =
|
|
27
|
-
const lambda = externalRequest.lambda
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const serviceConfigLib =
|
|
31
|
-
|
|
32
|
-
const uploadUseCase =
|
|
33
|
-
|
|
34
|
-
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
35
|
-
|
|
36
|
-
const path =
|
|
37
|
-
const schemasPath = path.join(__dirname, '../schemas');
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const {
|
|
48
|
-
getGraphServiceTagWithCache,
|
|
49
|
-
getServiceNameWithCache
|
|
50
|
-
} = require('@izara_project/izara-core-library-service-schemas/src/ServiceConfig');
|
|
51
|
-
|
|
11
|
+
const snsSharedLib = require('@izara_project/izara-core-library-sns'); const
|
|
12
|
+
asyncFlowSharedLib =
|
|
13
|
+
require('@izara_project/izara-core-library-asynchronous-flow'); const
|
|
14
|
+
callingFlowSharedLib =
|
|
15
|
+
require('@izara_project/izara-core-library-calling-flow'); const lambdaSharedLib
|
|
16
|
+
= require('@izara_project/izara-core-library-lambda'); const externalRequest =
|
|
17
|
+
require('@izara_project/izara-core-library-external-request'); const sns =
|
|
18
|
+
externalRequest.sns; const lambda = externalRequest.lambda const getObjectSchema
|
|
19
|
+
=
|
|
20
|
+
require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
21
|
+
const serviceConfigLib =
|
|
22
|
+
require('@izara_project/izara-core-library-service-schemas/src/ServiceConfig')
|
|
23
|
+
const uploadUseCase =
|
|
24
|
+
require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
|
|
25
|
+
const hash = require('@izara_project/izara-shared-core').objectHash; const
|
|
26
|
+
NoRetryError =
|
|
27
|
+
require('@izara_project/izara-core-library-core/src/NoRetryError'); const path =
|
|
28
|
+
require('path') const schemasPath = path.join(__dirname, '../schemas'); const
|
|
29
|
+
consts =
|
|
30
|
+
require('@izara_project/izara-core-library-service-schemas/src/Consts'); const
|
|
31
|
+
coreConsts = require("@izara_project/izara-core-library-core/src/Consts"); const
|
|
32
|
+
{ generateDynamoDbIdentifiers, dynamoDbIdentifiersByStorageResource,
|
|
33
|
+
collectGetData } =
|
|
34
|
+
require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js');
|
|
35
|
+
const { getGraphServiceTagWithCache, getServiceNameWithCache } =
|
|
36
|
+
require('@izara_project/izara-core-library-service-schemas/src/ServiceConfig');
|
|
52
37
|
//-----------------------------------------------------------------------------------------------------------
|
|
53
|
-
const PREFIX = {
|
|
54
|
-
|
|
55
|
-
MANY: "many",
|
|
56
|
-
CREATE_OBJECT_ASYNC: "createObjectAsync",
|
|
57
|
-
CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete"
|
|
58
|
-
}
|
|
38
|
+
const PREFIX = { ONE: "one", MANY: "many", CREATE_OBJECT_ASYNC:
|
|
39
|
+
"createObjectAsync", CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete" }
|
|
59
40
|
//-----------------------------------------------------------------------------------------------------------
|
|
60
|
-
const { TOPIC_NAME_GENERATE_CODE, TOPIC_NAME_GRAPH_HANDLER,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
41
|
+
const { TOPIC_NAME_GENERATE_CODE, TOPIC_NAME_GRAPH_HANDLER,
|
|
42
|
+
GRAPH_HANDLER_SERVICE_NAME } =
|
|
43
|
+
require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
44
|
+
const { createDataDetailsLib } =
|
|
45
|
+
require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js')
|
|
46
|
+
const { createLinkTypeId } =
|
|
47
|
+
require('@izara_project/izara-core-library-service-schemas/src/Utils'); const {
|
|
48
|
+
findLinksByObjTypes } =
|
|
49
|
+
require("@izara_project/izara-core-library-service-schemas/src/libs/RelSchemaLib")
|
|
50
|
+
const lodash = require("lodash") /** - all storageType( DB and Graph) use
|
|
51
|
+
objInstance({identifiers,fields}) - storageType[DB] async - storageType[Graph]
|
|
52
|
+
sync (should be have lambda complete) -- before DB and Graph have boolend check
|
|
53
|
+
(allStorageTagComplete = true) if storageType == graph set allStorageTagComplete
|
|
54
|
+
= false, and save awaitingMultiplastep
|
|
55
|
+
prefix(serviceTag_CreateObject{identifierId}) >>> in lambdaComplete resive
|
|
56
|
+
message from GrapHandler 1.1 check have returnValue.errorsFould.length > 0 --
|
|
57
|
+
Delete all awitingMultiplestep and senf message to callingFlow have errorFound.
|
|
58
|
+
1.2 check awaitingmultipleStepall finish -- Delete awaitingStep in come if have
|
|
59
|
+
other multiplestep(not finish)== not send message. --- if check
|
|
60
|
+
awaitingmultipleStepall finish not have record ===> sendmessage to callingFlow.
|
|
61
|
+
*/
|
|
81
62
|
//=========================================================================================
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
listOfRequiredOnCreate.push(keyFieldNames)
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
if (valueFieldNames.hasOwnProperty("hashOnCreate") && valueFieldNames.hashOnCreate.length) {
|
|
363
|
-
listOfRequiredOnCreate.push(keyFieldNames)
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
if (valueFieldNames.hasOwnProperty("optionalOnCreate") && valueFieldNames.optionalOnCreate === true) {
|
|
367
|
-
if ((valueFieldNames.requiredOnCreate === false) && valueFieldNames.optionalOnCreate === true) {
|
|
368
|
-
listOfOptionalOnCreate.push(keyFieldNames)
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
}; // end iteration of fieldNames
|
|
373
|
-
|
|
374
|
-
_izContext.logger.debug("listOfRequriedOnCreate", listOfRequiredOnCreate);
|
|
375
|
-
_izContext.logger.debug("listOfOptionalOnCreate", listOfOptionalOnCreate);
|
|
376
|
-
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
377
|
-
|
|
378
|
-
if (!listOfRequiredOnCreate.includes(fieldName)) {
|
|
379
|
-
if (!listOfOptionalOnCreate.includes(fieldName)) {
|
|
380
|
-
errorsFound.push("[invalid] over fieldNames create object");
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
if (listOfOptionalOnCreate.length > 0 && listOfRequiredOnCreate.includes(fieldName)) {
|
|
385
|
-
//(<optionalParams>)
|
|
386
|
-
//(</optionalParams>)
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
if (objectSchemas.identifierFieldNames.includes(fieldName)) {
|
|
390
|
-
_izContext.logger.debug("identifiers is", fieldName);
|
|
391
|
-
Object.assign(objInstanceFull.identifiers, {
|
|
392
|
-
[fieldName]: requestParams.fieldNames[fieldName]
|
|
393
|
-
});
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
if (errorsFound.length > 0) {
|
|
397
|
-
_izContext.logger.debug("HaveError::", errorsFound);
|
|
398
|
-
break
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
}; // end loop
|
|
402
|
-
|
|
403
|
-
let listOfObjectForCreates = [];
|
|
404
|
-
|
|
405
|
-
let objInstanceFullForDynamoDb = lodash.cloneDeep(objInstanceFull)
|
|
406
|
-
let objInstanceFullForGraph = lodash.cloneDeep(objInstanceFull)
|
|
407
|
-
|
|
408
|
-
if (errorsFound.length == 0) {
|
|
409
|
-
|
|
410
|
-
for (let [storageTag, createDataDetail] of Object.entries(createDataDetails)) {
|
|
411
|
-
|
|
412
|
-
if (createDataDetail.storageType == consts.STORAGE_TYPES.dynamoDB) {
|
|
413
|
-
_izContext.logger.debug("::::::DynamoDB::::::", { storageTag, objInstanceFull });
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
Object.assign(objInstanceFullForDynamoDb.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
417
|
-
_izContext.logger.debug("objInstanceFull before create item in dynamoDB", objInstanceFullForDynamoDb)
|
|
418
|
-
|
|
419
|
-
let identifiersForCreateData = await dynamoDbIdentifiersByStorageResource(
|
|
420
|
-
_izContext,
|
|
421
|
-
objectSchema,
|
|
422
|
-
createDataDetails,
|
|
423
|
-
objInstanceFullForDynamoDb.identifiers
|
|
424
|
-
)
|
|
425
|
-
_izContext.logger.debug("identifiersForCreateData", identifiersForCreateData);
|
|
426
|
-
|
|
427
|
-
await dynamodbSharedLib.putItem(
|
|
428
|
-
_izContext,
|
|
429
|
-
await dynamodbSharedLib.tableName(
|
|
430
|
-
_izContext,
|
|
431
|
-
createDataDetail.tableName
|
|
432
|
-
),
|
|
433
|
-
{
|
|
434
|
-
...identifiersForCreateData,
|
|
435
|
-
...objInstanceFullForDynamoDb.fields
|
|
436
|
-
}
|
|
437
|
-
);
|
|
438
|
-
} else if (createDataDetail.storageType == consts.STORAGE_TYPES.graph) {
|
|
439
|
-
_izContext.logger.debug("::::::Graph::::::", { storageTag, objInstanceFull });
|
|
440
|
-
|
|
441
|
-
Object.assign(objInstanceFullForGraph.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
442
|
-
_izContext.logger.debug("objInstanceFull before send to Graph", objInstanceFullForGraph)
|
|
443
|
-
|
|
444
|
-
// allStorageTagComplete = false;
|
|
445
|
-
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId(
|
|
446
|
-
(hash({
|
|
447
|
-
objType: MAIN_OBJTYPE,
|
|
448
|
-
graphServerTag: storageTag,
|
|
449
|
-
identifiers: objInstanceFullForGraph.identifiers
|
|
450
|
-
})),
|
|
451
|
-
PREFIX.CREATE_OBJECT_ASYNC
|
|
452
|
-
));
|
|
453
|
-
listOfObjectForCreates.push({
|
|
454
|
-
[storageTag]: {
|
|
455
|
-
objInstanceFull: {
|
|
456
|
-
identifiers: objInstanceFullForGraph.identifiers,
|
|
457
|
-
fields: objInstanceFullForGraph.fields
|
|
458
|
-
},
|
|
459
|
-
allStorageTagComplete: false
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
_izContext.logger.debug("FIRST", listOfObjectForCreates)
|
|
464
|
-
|
|
465
|
-
};
|
|
466
|
-
_izContext.logger.debug("[1]listOfObjectForCreates:::", listOfObjectForCreates);
|
|
467
|
-
};
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
function createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail) {
|
|
471
|
-
_izContext.logger.debug("createObjInstanceFullFieldsByStorageTag : ", { storageTag, createDataDetail })
|
|
472
|
-
let fields = {};
|
|
473
|
-
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
474
|
-
if ((createDataDetails[storageTag].fieldNames.includes(fieldName)) &&
|
|
475
|
-
(createDataDetail.fieldNames.includes(fieldName))) {
|
|
476
|
-
if (!objInstanceFull.identifiers.hasOwnProperty(fieldName)) {
|
|
477
|
-
if (!fields.hasOwnProperty(fieldName)) {
|
|
478
|
-
Object.assign(fields, {
|
|
479
|
-
[fieldName]: requestParams.fieldNames[fieldName]
|
|
480
|
-
})
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
_izContext.logger.debug({ fields })
|
|
486
|
-
return fields
|
|
487
|
-
}
|
|
488
|
-
/// step save awiatingMultipleStep of storageType graph ...........................................................
|
|
489
|
-
|
|
490
|
-
await asyncFlowSharedLib.createAwaitingMultipleSteps(
|
|
491
|
-
_izContext,
|
|
492
|
-
allAwaitingStepsId,
|
|
493
|
-
asyncFlowSharedLib.createPendingStepId((hash({ objType: MAIN_OBJTYPE, identifiers: objInstanceFull.identifiers })), PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)
|
|
494
|
-
);
|
|
495
|
-
//............................................................................................................
|
|
496
|
-
|
|
497
|
-
// process storageType : graph
|
|
498
|
-
let messageObject = {};
|
|
499
|
-
for (let objectCreate of listOfObjectForCreates) {
|
|
500
|
-
|
|
501
|
-
for (let [graphServiceName, objecForCreate] of Object.entries(objectCreate)) {
|
|
502
|
-
_izContext.logger.debug("Loop each graph:", {
|
|
503
|
-
[graphServiceName]: objecForCreate
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
if (objecForCreate.allStorageTagComplete == false) { // needless check because in listOfObjectForCreates push case graph only!
|
|
507
|
-
|
|
508
|
-
messageObject = {
|
|
509
|
-
objType: MAIN_OBJTYPE,
|
|
510
|
-
objInstanceFull: objecForCreate.objInstanceFull,
|
|
511
|
-
relationships: requestParams.relationships || []
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
if (errorsFound.length > 0) {
|
|
516
|
-
break;
|
|
517
|
-
} else {
|
|
518
|
-
_izContext.logger.debug("SENT MESSAGE EACH GRAPH::::", { graphServiceName, messageObject, callingFlowConfig })
|
|
519
|
-
|
|
520
|
-
Object.assign(messageObject, {
|
|
521
|
-
settings: { updatePropertiesOnMatch: false },
|
|
522
|
-
originTimestamp: Date.now()
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
526
|
-
messageObject,
|
|
527
|
-
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
528
|
-
callingFlowConfig, // resive parent callingFlowConfig.
|
|
529
|
-
callingFlowSharedLib.createCallingFlowConfig( // callinfflow own service
|
|
530
|
-
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.createNodeComplete), {}
|
|
531
|
-
)
|
|
532
|
-
)
|
|
533
|
-
);
|
|
534
|
-
|
|
535
|
-
let messageToCreateObject = {
|
|
536
|
-
Message: JSON.stringify(messageObject),
|
|
537
|
-
TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName)
|
|
538
|
-
};
|
|
539
|
-
_izContext.logger.debug("RequestParams before send to sqs messageToCreateObject ::::::: ", messageToCreateObject);
|
|
540
|
-
await sns.publishAsync(_izContext, messageToCreateObject);
|
|
541
|
-
};
|
|
542
|
-
}; // end loop of objectCreate.
|
|
543
|
-
if (errorsFound.length > 0) {
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
}; // end loop listOfObjectForCreates
|
|
547
|
-
|
|
548
|
-
if (errorsFound.length > 0) {
|
|
549
|
-
_izContext.logger.debug("Case have errorFound:::", errorsFound);
|
|
550
|
-
|
|
551
|
-
// remove awaitngMultiplestep. [[[[[[[open when not test lolcal.]]]]]]]
|
|
552
|
-
await asyncFlowSharedLib.clearAllAwaitingSteps(
|
|
553
|
-
_izContext,
|
|
554
|
-
asyncFlowSharedLib.createPendingStepId((hash({
|
|
555
|
-
objType: MAIN_OBJTYPE,
|
|
556
|
-
identifiers: objInstanceFull.identifiers
|
|
557
|
-
})), PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)); // pendingStepId
|
|
558
|
-
|
|
559
|
-
// send message to OutCreateObjectComplete.
|
|
560
|
-
//..
|
|
561
|
-
messageObject = {
|
|
562
|
-
objType: MAIN_OBJTYPE,
|
|
563
|
-
identifiers: null, // or {}
|
|
564
|
-
errorsFound: errorsFound
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
// pass back property.
|
|
568
|
-
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
569
|
-
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
570
|
-
|
|
571
|
-
let sendMessageOutCreateObjectComplete = {
|
|
572
|
-
Message: JSON.stringify(messageObject),
|
|
573
|
-
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
574
|
-
TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
575
|
-
};
|
|
576
|
-
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
577
|
-
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
578
|
-
|
|
579
|
-
return {
|
|
580
|
-
objType: MAIN_OBJTYPE,
|
|
581
|
-
fieldNames: requestParams.fieldNames,
|
|
582
|
-
relationship: requestParams.relationships,
|
|
583
|
-
status: "error",
|
|
584
|
-
errorsFound: errorsFound
|
|
585
|
-
}
|
|
586
|
-
} else {
|
|
587
|
-
|
|
588
|
-
if (allAwaitingStepsId.length == 0 && listOfObjectForCreates.length == 0) {
|
|
589
|
-
let messageObject = {
|
|
590
|
-
objType: {
|
|
591
|
-
objectType: OBJECT_TYPE,
|
|
592
|
-
serviceTag: SERVICE_TAG
|
|
593
|
-
},
|
|
594
|
-
objInstanceFull: {
|
|
595
|
-
identifiers: objInstanceFullForDynamoDb.identifiers,
|
|
596
|
-
fields: objInstanceFullForDynamoDb.fields
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) {
|
|
601
|
-
// send message to SNS OutCreateNodeComplete
|
|
602
|
-
_izContext.logger.debug("HAVE CallingFlow");
|
|
603
|
-
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
604
|
-
|
|
605
|
-
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
606
|
-
let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
607
|
-
let messageParams = {
|
|
608
|
-
Message: JSON.stringify(messageObject),
|
|
609
|
-
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
610
|
-
TopicArn: outCreateNodeCompleteTopic,
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
_izContext.logger.debug("messageParams OutCreateNode ::::::: ", messageParams);
|
|
614
|
-
await sns.publishAsync(_izContext, messageParams);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return {
|
|
618
|
-
objType: MAIN_OBJTYPE,
|
|
619
|
-
fieldNames: requestParams.fieldNames,
|
|
620
|
-
relationship: requestParams.relationships,
|
|
621
|
-
status: "complete",
|
|
622
|
-
errorsFound: errorsFound
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
} catch (err) {
|
|
626
|
-
throw (err)
|
|
627
|
-
}
|
|
628
|
-
}
|
|
63
|
+
/** * * @param {*} _izContext * @param {Object} requestParams =
|
|
64
|
+
{fieldNames,relationships = []} * @param {*} callingFlowConfig */
|
|
65
|
+
module.exports.<%- functionName %>Main = async ( _izContext, requestParams,
|
|
66
|
+
callingFlowConfig ) => { try { _izContext.logger.debug("function <%-
|
|
67
|
+
functionName %>:", { requestParams, callingFlowConfig }); let errorsFound = [];
|
|
68
|
+
const userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID); const
|
|
69
|
+
targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID) if (!userId) {
|
|
70
|
+
errorsFound.push("Not have userId") } const OBJECT_TYPE = "<%- objectType %>";
|
|
71
|
+
const SERVICE_TAG = process.env.iz_serviceTag; //(<beforeQuery
|
|
72
|
+
>) //(</beforeQuery
|
|
73
|
+
>) const MAIN_OBJTYPE = { objectType: OBJECT_TYPE, serviceTag: SERVICE_TAG } let
|
|
74
|
+
objectSchema = await getObjectSchema.getObjSchemaS3WithCache( _izContext,
|
|
75
|
+
MAIN_OBJTYPE ); _izContext.logger.debug("objectSchema", objectSchema); let
|
|
76
|
+
objectSchemas = uploadUseCase.generateObjectSchemaForCombineFieldNames(
|
|
77
|
+
_izContext, objectSchema ); _izContext.logger.debug("objectSchemas",
|
|
78
|
+
objectSchemas); if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
79
|
+
errorsFound.push('not have targetId') } let createDataDetails = await
|
|
80
|
+
createDataDetailsLib(_izContext, objectSchemas);
|
|
81
|
+
_izContext.logger.debug("createDataDetails is =", createDataDetails); let
|
|
82
|
+
checkCorrectLinks = []; //validate linkType if
|
|
83
|
+
((requestParams.hasOwnProperty("relationships")) &&
|
|
84
|
+
(requestParams.relationships.length > 0)) { for (let relationshipProperties of
|
|
85
|
+
requestParams.relationships) { _izContext.logger.debug("relationshipProperties",
|
|
86
|
+
relationshipProperties); _izContext.logger.debug("relType",
|
|
87
|
+
relationshipProperties.relType); let getObjectRelationship = await
|
|
88
|
+
getObjectSchema.getRelationshipSchemaWithCache( _izContext,
|
|
89
|
+
relationshipProperties.relType )
|
|
90
|
+
_izContext.logger.debug("getObjectRelationship", getObjectRelationship) for
|
|
91
|
+
(const relationshipLink of Object.values(getObjectRelationship.links)) { if
|
|
92
|
+
(relationshipLink.from.linkType === "many" && relationshipLink.to.linkType ===
|
|
93
|
+
"many") { if (relationshipLink.from.requiredOnCreate === true ||
|
|
94
|
+
relationshipLink.to.requiredOnCreate === true) { errorsFound.push("error many to
|
|
95
|
+
many linkType can't have requireOnCreate === true") } } } const links = await
|
|
96
|
+
findLinksByObjTypes(_izContext, [MAIN_OBJTYPE,
|
|
97
|
+
relationshipProperties.targetObjType], getObjectRelationship.links);
|
|
98
|
+
_izContext.logger.debug("links", links) if (!links.length) {
|
|
99
|
+
errorsFound.push(`not found link between ${JSON.stringify({ mainObjType:
|
|
100
|
+
MAIN_OBJTYPE })} and ${JSON.stringify({ toObjType:
|
|
101
|
+
relationshipProperties.targetObjType })} `) } for (let link of links) { const {
|
|
102
|
+
serviceTag: fromServiceTag, objectType: fromObjectType } = MAIN_OBJTYPE; const {
|
|
103
|
+
serviceTag: toServiceTag, objectType: toObjectType } =
|
|
104
|
+
relationshipProperties.targetObjType const { serviceTag: firstServiceTag,
|
|
105
|
+
objectType: firstObjectType } = link.from.objType; const { serviceTag:
|
|
106
|
+
secondServiceTag, objectType: secondObjectType } = link.to.objType const
|
|
107
|
+
matchesFromTo = fromServiceTag === firstServiceTag && fromObjectType ===
|
|
108
|
+
firstObjectType && toServiceTag === secondServiceTag && toObjectType ===
|
|
109
|
+
secondObjectType; const matchesToFrom = fromServiceTag === secondServiceTag &&
|
|
110
|
+
fromObjectType === secondObjectType && toServiceTag === firstServiceTag &&
|
|
111
|
+
toObjectType === firstObjectType if
|
|
112
|
+
((relationshipProperties.relationshipDirection === "from" && matchesFromTo) ||
|
|
113
|
+
(relationshipProperties.relationshipDirection === "to" && matchesToFrom)) {
|
|
114
|
+
checkCorrectLinks.push(true) } else { checkCorrectLinks.push(false) } } } } for
|
|
115
|
+
(const [index, checkCorrectLink] of checkCorrectLinks.entries()) { if
|
|
116
|
+
(checkCorrectLink === false) { errorsFound.push(`relationship direction
|
|
117
|
+
${JSON.stringify(requestParams.relationships[index])} is invalid`) } }
|
|
118
|
+
_izContext.logger.debug("finish validate Relationships from RequestParams") let
|
|
119
|
+
requiredOnCreateLinks = {}; let createLinkTypeIds = []; // validate
|
|
120
|
+
relationships link let objectRelationshipSchema = await
|
|
121
|
+
getObjectSchema.getRequiredOnCreateLinksWithCache(_izContext, MAIN_OBJTYPE);
|
|
122
|
+
_izContext.logger.debug("objectRelationshipSchema", objectRelationshipSchema);
|
|
123
|
+
// validate requiredOnCreateLinks let filteredRequiredOnCreatedLinks = []; await
|
|
124
|
+
Promise.all( objectRelationshipSchema.map(async (requiredLink) => { const
|
|
125
|
+
serviceTag = await Promise.all( requiredLink.storageResourceTags.map(async
|
|
126
|
+
(storageTag) => { let storageResource =
|
|
127
|
+
requiredLink.storageResources[storageTag]; if (storageResource.storageType ===
|
|
128
|
+
consts.STORAGE_TYPES.graph) { return await
|
|
129
|
+
getGraphServiceTagWithCache(_izContext, storageResource.graphServerTag); } }) );
|
|
130
|
+
if (serviceTag.includes(GRAPH_HANDLER_SERVICE_NAME.graphHandler)) {
|
|
131
|
+
filteredRequiredOnCreatedLinks.push(requiredLink); } }) )
|
|
132
|
+
_izContext.logger.debug("filteredRequiredOnCreatedLinks",
|
|
133
|
+
filteredRequiredOnCreatedLinks); if (filteredRequiredOnCreatedLinks.length) { if
|
|
134
|
+
(!requestParams.relationships || !requestParams.relationships.length) { // in
|
|
135
|
+
case not send relationship to create with for (const requireLink of
|
|
136
|
+
filteredRequiredOnCreatedLinks) { errorsFound.push(`missing required
|
|
137
|
+
relationship of relType ${JSON.stringify(requireLink.relType)} when create`) } }
|
|
138
|
+
for (const requireLink of filteredRequiredOnCreatedLinks) { const
|
|
139
|
+
requiredOnCreateLinkTypeId = createLinkTypeId( _izContext, MAIN_OBJTYPE,
|
|
140
|
+
requireLink.other.objType, requireLink.relType, requireLink.base.direction );
|
|
141
|
+
Object.assign(requiredOnCreateLinks, { [requiredOnCreateLinkTypeId]: requireLink
|
|
142
|
+
}) } if (requestParams.hasOwnProperty("relationships") &&
|
|
143
|
+
requestParams.relationships.length) { for (const createRelationship of
|
|
144
|
+
requestParams.relationships) { const onCreateLinkTypeId = createLinkTypeId(
|
|
145
|
+
_izContext, MAIN_OBJTYPE, createRelationship.targetObjType,
|
|
146
|
+
createRelationship.relType, createRelationship.relationshipDirection ); if
|
|
147
|
+
(!requiredOnCreateLinks.hasOwnProperty(onCreateLinkTypeId)) {
|
|
148
|
+
errorsFound.push(`relType:${JSON.stringify(createRelationship.relType)} not
|
|
149
|
+
allow to create when use create action`) continue; } else {
|
|
150
|
+
createLinkTypeIds.push(onCreateLinkTypeId); } } } } // validate missing relType
|
|
151
|
+
when create that should create const remainRequiredOnCreateLinkTypeIds =
|
|
152
|
+
Object.keys(requiredOnCreateLinks) .filter(requiredInCreateLinkTypeId =>
|
|
153
|
+
!createLinkTypeIds.includes(requiredInCreateLinkTypeId)) if
|
|
154
|
+
(remainRequiredOnCreateLinkTypeIds.length) { for (const
|
|
155
|
+
remainRequiredOnCreateLinkTypeId of remainRequiredOnCreateLinkTypeIds) { const
|
|
156
|
+
missingLink = { relType:
|
|
157
|
+
requiredOnCreateLinks[remainRequiredOnCreateLinkTypeId].relType, base:
|
|
158
|
+
requiredOnCreateLinks[remainRequiredOnCreateLinkTypeId].base.objType, other:
|
|
159
|
+
requiredOnCreateLinks[remainRequiredOnCreateLinkTypeId].other.objType };
|
|
160
|
+
errorsFound.push(`Missing Link:: ${JSON.stringify(missingLink)} when create`) }
|
|
161
|
+
} _izContext.logger.debug("createLinkTypeIds", createLinkTypeIds);
|
|
162
|
+
_izContext.logger.debug("requiredOnCreateLinks", requiredOnCreateLinks); // end
|
|
163
|
+
validate let objInstanceFull = { identifiers: {}, fields: {} }; let
|
|
164
|
+
listOfRequiredOnCreate = []; let listOfOptionalOnCreate = []; let
|
|
165
|
+
allAwaitingStepsId = []; // validate single identifiers if
|
|
166
|
+
(objectSchemas.identifiers.length === 1 &&
|
|
167
|
+
!objectSchemas.identifiers[0].hasOwnProperty("fieldNames")) { const identifier =
|
|
168
|
+
objectSchemas.identifiers[0]; _izContext.logger.debug(":::::case single
|
|
169
|
+
identifer:::::", identifier); if
|
|
170
|
+
(objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("randomOnCreate"))
|
|
171
|
+
{ if ((objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == true)) {
|
|
172
|
+
Object.assign(requestParams.fieldNames, { [identifier.fieldName]: hash({
|
|
173
|
+
fieldNames: identifier, // uniqueRequestId: _izContext.uniqueRequestId,
|
|
174
|
+
callingFlowConfig: callingFlowConfig }) }); _izContext.logger.debug("Assign
|
|
175
|
+
requestParams", requestParams) } else if
|
|
176
|
+
((objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == false) ||
|
|
177
|
+
(objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == null)) { if
|
|
178
|
+
((objectSchemas.fieldNames[identifier.fieldName].requiredOnCreate == true) &&
|
|
179
|
+
(objectSchemas.fieldNames[identifier.fieldName].canUpdate == false)) { // check
|
|
180
|
+
Fns have resive if
|
|
181
|
+
(requestParams.fieldNames.hasOwnProperty([identifier.fieldName])) {
|
|
182
|
+
_izContext.logger.debug("identifier is exist:", { [identifier.fieldName]:
|
|
183
|
+
requestParams.fieldNames[identifier.fieldName] }); } else {
|
|
184
|
+
errorsFound.push("[invalid]requestParams not have data fieldNames of
|
|
185
|
+
requriedOnCreate"); } } }; } else if
|
|
186
|
+
(objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("hashOnCreate"))
|
|
187
|
+
{ if (objectSchemas.fieldNames[identifier.fieldName].hashOnCreate.length &&
|
|
188
|
+
objectSchemas.fieldNames[identifier.fieldName].hashOnCreate.length > 0) { for
|
|
189
|
+
(const fieldName of objectSchemas.fieldNames[identifier.fieldName].hashOnCreate)
|
|
190
|
+
{ Object.assign( requestParams.fieldNames, { [identifier.fieldName]: hash({
|
|
191
|
+
[fieldName]: requestParams.fieldNames[fieldName] }) } ) } } else {
|
|
192
|
+
errorsFound.push("[invalid] no data to hash for create") } } else { if
|
|
193
|
+
((objectSchemas.fieldNames[identifier.fieldName].requiredOnCreate === false) &&
|
|
194
|
+
(objectSchemas.fieldNames[identifier.fieldName].optionalOnCreate === false) &&
|
|
195
|
+
(objectSchemas.fieldNames[identifier.fieldName].canUpdate === false) &&
|
|
196
|
+
objectSchemas.fieldNames[identifier.fieldName].hashOnCreate === false) {
|
|
197
|
+
errorsFound.push("[invalid]case single identifier invalid objectSchemass"); };
|
|
198
|
+
}; } _izContext.logger.debug("requestParams is:", requestParams); // check
|
|
199
|
+
settingObjSchemas for (let [keyFieldNames, valueFieldNames] of
|
|
200
|
+
Object.entries(objectSchemas.fieldNames)) { if
|
|
201
|
+
(valueFieldNames.hasOwnProperty("randomOnCreate") &&
|
|
202
|
+
valueFieldNames.randomOnCreate === true) {
|
|
203
|
+
listOfRequiredOnCreate.push(keyFieldNames) }; if
|
|
204
|
+
(valueFieldNames.hasOwnProperty("requiredOnCreate") &&
|
|
205
|
+
valueFieldNames.requiredOnCreate === true) {
|
|
206
|
+
listOfRequiredOnCreate.push(keyFieldNames) }; if
|
|
207
|
+
(valueFieldNames.hasOwnProperty("hashOnCreate") &&
|
|
208
|
+
valueFieldNames.hashOnCreate.length) {
|
|
209
|
+
listOfRequiredOnCreate.push(keyFieldNames) } if
|
|
210
|
+
(valueFieldNames.hasOwnProperty("optionalOnCreate") &&
|
|
211
|
+
valueFieldNames.optionalOnCreate === true) { if
|
|
212
|
+
((valueFieldNames.requiredOnCreate === false) &&
|
|
213
|
+
valueFieldNames.optionalOnCreate === true) {
|
|
214
|
+
listOfOptionalOnCreate.push(keyFieldNames) }; }; }; // end iteration of
|
|
215
|
+
fieldNames _izContext.logger.debug("listOfRequriedOnCreate",
|
|
216
|
+
listOfRequiredOnCreate); _izContext.logger.debug("listOfOptionalOnCreate",
|
|
217
|
+
listOfOptionalOnCreate); for (let fieldName of
|
|
218
|
+
Object.keys(requestParams.fieldNames)) { if
|
|
219
|
+
(!listOfRequiredOnCreate.includes(fieldName)) { if
|
|
220
|
+
(!listOfOptionalOnCreate.includes(fieldName)) { errorsFound.push("[invalid] over
|
|
221
|
+
fieldNames create object"); } }; if (listOfOptionalOnCreate.length > 0 &&
|
|
222
|
+
listOfRequiredOnCreate.includes(fieldName)) { //(<optionalParams
|
|
223
|
+
>) //(</optionalParams
|
|
224
|
+
>) }; if (objectSchemas.identifierFieldNames.includes(fieldName)) {
|
|
225
|
+
_izContext.logger.debug("identifiers is", fieldName);
|
|
226
|
+
Object.assign(objInstanceFull.identifiers, { [fieldName]:
|
|
227
|
+
requestParams.fieldNames[fieldName] }); }; if (errorsFound.length > 0) {
|
|
228
|
+
_izContext.logger.debug("HaveError::", errorsFound); break }; }; // end loop let
|
|
229
|
+
listOfObjectForCreates = []; let objInstanceFullForDynamoDb =
|
|
230
|
+
lodash.cloneDeep(objInstanceFull) let objInstanceFullForGraph =
|
|
231
|
+
lodash.cloneDeep(objInstanceFull) if (errorsFound.length == 0) { for (let
|
|
232
|
+
[storageTag, createDataDetail] of Object.entries(createDataDetails)) { if
|
|
233
|
+
(createDataDetail.storageType == consts.STORAGE_TYPES.dynamoDB) {
|
|
234
|
+
_izContext.logger.debug("::::::DynamoDB::::::", { storageTag, objInstanceFull
|
|
235
|
+
}); Object.assign(objInstanceFullForDynamoDb.fields,
|
|
236
|
+
createObjInstanceFullFieldsByStorageTag(_izContext, storageTag,
|
|
237
|
+
createDataDetail)) _izContext.logger.debug("objInstanceFull before create item
|
|
238
|
+
in dynamoDB", objInstanceFullForDynamoDb) let identifiersForCreateData = await
|
|
239
|
+
dynamoDbIdentifiersByStorageResource( _izContext, objectSchema,
|
|
240
|
+
createDataDetails, objInstanceFullForDynamoDb.identifiers )
|
|
241
|
+
_izContext.logger.debug("identifiersForCreateData", identifiersForCreateData);
|
|
242
|
+
await dynamodbSharedLib.putItem( _izContext, await dynamodbSharedLib.tableName(
|
|
243
|
+
_izContext, createDataDetail.tableName ), { ...identifiersForCreateData,
|
|
244
|
+
...objInstanceFullForDynamoDb.fields } ); } else if
|
|
245
|
+
(createDataDetail.storageType == consts.STORAGE_TYPES.graph) {
|
|
246
|
+
_izContext.logger.debug("::::::Graph::::::", { storageTag, objInstanceFull });
|
|
247
|
+
Object.assign(objInstanceFullForGraph.fields,
|
|
248
|
+
createObjInstanceFullFieldsByStorageTag(_izContext, storageTag,
|
|
249
|
+
createDataDetail)) _izContext.logger.debug("objInstanceFull before send to
|
|
250
|
+
Graph", objInstanceFullForGraph) // allStorageTagComplete = false;
|
|
251
|
+
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId( (hash({
|
|
252
|
+
objType: MAIN_OBJTYPE, graphServerTag: storageTag, identifiers:
|
|
253
|
+
objInstanceFullForGraph.identifiers })), PREFIX.CREATE_OBJECT_ASYNC ));
|
|
254
|
+
listOfObjectForCreates.push({ [storageTag]: { objInstanceFull: { identifiers:
|
|
255
|
+
objInstanceFullForGraph.identifiers, fields: objInstanceFullForGraph.fields },
|
|
256
|
+
allStorageTagComplete: false } }); _izContext.logger.debug("FIRST",
|
|
257
|
+
listOfObjectForCreates) };
|
|
258
|
+
_izContext.logger.debug("[1]listOfObjectForCreates:::", listOfObjectForCreates);
|
|
259
|
+
}; }; function createObjInstanceFullFieldsByStorageTag(_izContext, storageTag,
|
|
260
|
+
createDataDetail) {
|
|
261
|
+
_izContext.logger.debug("createObjInstanceFullFieldsByStorageTag : ", {
|
|
262
|
+
storageTag, createDataDetail }) let fields = {}; for (let fieldName of
|
|
263
|
+
Object.keys(requestParams.fieldNames)) { if
|
|
264
|
+
((createDataDetails[storageTag].fieldNames.includes(fieldName)) &&
|
|
265
|
+
(createDataDetail.fieldNames.includes(fieldName))) { if
|
|
266
|
+
(!objInstanceFull.identifiers.hasOwnProperty(fieldName)) { if
|
|
267
|
+
(!fields.hasOwnProperty(fieldName)) { Object.assign(fields, { [fieldName]:
|
|
268
|
+
requestParams.fieldNames[fieldName] }) } } } } _izContext.logger.debug({ fields
|
|
269
|
+
}) return fields } /// step save awiatingMultipleStep of storageType graph
|
|
270
|
+
........................................................... await
|
|
271
|
+
asyncFlowSharedLib.createAwaitingMultipleSteps( _izContext, allAwaitingStepsId,
|
|
272
|
+
asyncFlowSharedLib.createPendingStepId((hash({ objType: MAIN_OBJTYPE,
|
|
273
|
+
identifiers: objInstanceFull.identifiers })),
|
|
274
|
+
PREFIX.CREATE_OBJECT_ASYNC_COMPLETE) );
|
|
275
|
+
//............................................................................................................
|
|
276
|
+
// process storageType : graph let messageObject = {}; for (let objectCreate of
|
|
277
|
+
listOfObjectForCreates) { for (let [graphServiceName, objecForCreate] of
|
|
278
|
+
Object.entries(objectCreate)) { _izContext.logger.debug("Loop each graph:", {
|
|
279
|
+
[graphServiceName]: objecForCreate }); if (objecForCreate.allStorageTagComplete
|
|
280
|
+
== false) { // needless check because in listOfObjectForCreates push case graph
|
|
281
|
+
only! messageObject = { objType: MAIN_OBJTYPE, objInstanceFull:
|
|
282
|
+
objecForCreate.objInstanceFull, relationships: requestParams.relationships || []
|
|
283
|
+
}; }; if (errorsFound.length > 0) { break; } else {
|
|
284
|
+
_izContext.logger.debug("SENT MESSAGE EACH GRAPH::::", { graphServiceName,
|
|
285
|
+
messageObject, callingFlowConfig }) Object.assign(messageObject, { settings: {
|
|
286
|
+
updatePropertiesOnMatch: false }, originTimestamp: Date.now() }); messageObject
|
|
287
|
+
= callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject( messageObject,
|
|
288
|
+
callingFlowSharedLib.addParentCallingFlowConfig( callingFlowConfig, // resive
|
|
289
|
+
parent callingFlowConfig. callingFlowSharedLib.createCallingFlowConfig( //
|
|
290
|
+
callinfflow own service await lambdaSharedLib.lambdaFunctionName(_izContext,
|
|
291
|
+
TOPIC_NAME_GENERATE_CODE.createNodeComplete), {} ) ) ); let
|
|
292
|
+
messageToCreateObject = { Message: JSON.stringify(messageObject), TopicArn:
|
|
293
|
+
await snsSharedLib.snsTopicArn(_izContext,
|
|
294
|
+
TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName) };
|
|
295
|
+
_izContext.logger.debug("RequestParams before send to sqs messageToCreateObject
|
|
296
|
+
::::::: ", messageToCreateObject); await sns.publishAsync(_izContext,
|
|
297
|
+
messageToCreateObject); }; }; // end loop of objectCreate. if
|
|
298
|
+
(errorsFound.length > 0) { break; } }; // end loop listOfObjectForCreates if
|
|
299
|
+
(errorsFound.length > 0) { _izContext.logger.debug("Case have errorFound:::",
|
|
300
|
+
errorsFound); // remove awaitngMultiplestep. [[[[[[[open when not test
|
|
301
|
+
lolcal.]]]]]]] await asyncFlowSharedLib.clearAllAwaitingSteps( _izContext,
|
|
302
|
+
asyncFlowSharedLib.createPendingStepId((hash({ objType: MAIN_OBJTYPE,
|
|
303
|
+
identifiers: objInstanceFull.identifiers })),
|
|
304
|
+
PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)); // pendingStepId // send message to
|
|
305
|
+
OutCreateObjectComplete. //.. messageObject = { objType: MAIN_OBJTYPE,
|
|
306
|
+
identifiers: null, // or {} errorsFound: errorsFound }; // pass back property.
|
|
307
|
+
messageObject =
|
|
308
|
+
callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig,
|
|
309
|
+
messageObject); let messageAttributes =
|
|
310
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig,
|
|
311
|
+
{}); let sendMessageOutCreateObjectComplete = { Message:
|
|
312
|
+
JSON.stringify(messageObject), MessageAttributes:
|
|
313
|
+
sns.createStringMessageAttributes(_izContext, messageAttributes), TopicArn:
|
|
314
|
+
await snsSharedLib.snsTopicArn(_izContext,
|
|
315
|
+
TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete) }; _izContext.logger.debug("Send
|
|
316
|
+
message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
317
|
+
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete); return {
|
|
318
|
+
objType: MAIN_OBJTYPE, fieldNames: requestParams.fieldNames, relationship:
|
|
319
|
+
requestParams.relationships, status: "error", errorsFound: errorsFound } } else
|
|
320
|
+
{ if (allAwaitingStepsId.length == 0 && listOfObjectForCreates.length == 0) {
|
|
321
|
+
let messageObject = { objType: { objectType: OBJECT_TYPE, serviceTag:
|
|
322
|
+
SERVICE_TAG }, objInstanceFull: { identifiers:
|
|
323
|
+
objInstanceFullForDynamoDb.identifiers, fields:
|
|
324
|
+
objInstanceFullForDynamoDb.fields } } if
|
|
325
|
+
(callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) { //
|
|
326
|
+
send message to SNS OutCreateNodeComplete _izContext.logger.debug("HAVE
|
|
327
|
+
CallingFlow"); messageObject =
|
|
328
|
+
callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig,
|
|
329
|
+
messageObject); let messageAttributes =
|
|
330
|
+
callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig,
|
|
331
|
+
{}); let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext,
|
|
332
|
+
TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete) let messageParams = { Message:
|
|
333
|
+
JSON.stringify(messageObject), MessageAttributes:
|
|
334
|
+
sns.createStringMessageAttributes(_izContext, messageAttributes), TopicArn:
|
|
335
|
+
outCreateNodeCompleteTopic, }; _izContext.logger.debug("messageParams
|
|
336
|
+
OutCreateNode ::::::: ", messageParams); await sns.publishAsync(_izContext,
|
|
337
|
+
messageParams); } } return { objType: MAIN_OBJTYPE, fieldNames:
|
|
338
|
+
requestParams.fieldNames, relationship: requestParams.relationships, status:
|
|
339
|
+
"complete", errorsFound: errorsFound } } } catch (err) { throw (err) } }
|