@izara_project/izara-market-library-service-schemas 1.0.75 → 1.0.77
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 +14 -11
- package/src/CheckPermission/CheckPermission.js +16 -14
- package/src/GenerateCodeLibs/index.js +6 -4
- package/src/GenerateCodeLibs/src/Consts.js +7 -3
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +418 -80
- package/src/MainLibs/index.js +7 -4
- package/src/MainLibs/src/Consts.js +12 -11
- package/src/MainLibs/src/GenerateCodeUtils.js +2 -5
- package/src/MainLibs/src/Utils.js +10 -6
- 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/GenerateSchema.js +11 -14
- package/src/reStructure/GenerateTests.js +135 -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 +22 -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 +30 -43
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/data.js +10 -12
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +25 -24
- package/src/reStructure/TemplateData/EndpointPerService/yaml/data.js +17 -10
- package/src/reStructure/TemplateData/IntTest/generateResources/generateResources.js +56 -0
- package/src/reStructure/TemplateData/IntTest/generateResources/resources/data.js +74 -0
- package/src/reStructure/TemplateData/IntTest/generateResources/resources/templateresources.ejs +18 -0
- package/src/reStructure/TemplateData/IntTest/generateResources.js +144 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/events/data.js +100 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/events/templateEvents.ejs +10 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/generateTemplate.js +61 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/tests/data.js +260 -0
- package/src/reStructure/TemplateData/IntTest/generateTests/tests/templateTests.ejs +1 -0
- package/src/reStructure/TemplateData/IntTest/generateUpload/genetateTempleteUpload.js +52 -0
- package/src/reStructure/TemplateData/IntTest/generateUpload/upload/data.js +40 -0
- package/src/reStructure/TemplateData/IntTest/generateUpload/upload/libs/generateTestUploadLibs.js +39 -0
- package/src/reStructure/TemplateData/IntTest/generateUpload.js +145 -0
- package/src/reStructure/TemplateData/IntTest/libs/generateTestsLibs.js +417 -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 +10 -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 +14 -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 +24 -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 +11 -7
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +2 -14
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +24 -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 +18 -18
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +12 -8
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +19 -26
- 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 +17 -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 +18 -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 +19 -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/GenerateCodeLibs/src/TranslateIdsLibs.js +0 -92
|
@@ -17,44 +17,40 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
|
|
|
17
17
|
|
|
18
18
|
'use strict';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} =
|
|
39
|
-
const Logger = require("@izara_project/izara-core-library-logger");
|
|
20
|
+
import lodash from 'lodash';
|
|
21
|
+
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
22
|
+
import { NoRetryError, inMemoryCacheLib } from '@izara_project/izara-core-library-core';
|
|
23
|
+
import { sns, sqs } from '@izara_project/izara-core-library-external-request';
|
|
24
|
+
import { getObjectSchema, validator as validatorSchema, serviceConfig, utils, consts as coreConsts, explodedReqParams, deliminatorTree } from '@izara_project/izara-core-library-service-schemas'
|
|
25
|
+
import Logger from "@izara_project/izara-core-library-logger";
|
|
26
|
+
|
|
27
|
+
import { validateObjType } from '@izara_project/izara-shared-service-schemas';
|
|
28
|
+
import { validator as validateObject } from "@izara_project/izara-core-library-core"
|
|
29
|
+
// core libs
|
|
30
|
+
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
31
|
+
import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-flow'
|
|
32
|
+
import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
|
|
33
|
+
import sqsSharedLib from '@izara_project/izara-core-library-sqs';
|
|
34
|
+
import snsSharedLib from '@izara_project/izara-core-library-sns';
|
|
35
|
+
import graphSharedLibs from '@izara_project/izara-core-library-graph-service';
|
|
36
|
+
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
37
|
+
import consts from './Consts.js'
|
|
38
|
+
const { TOPIC_NAME_GENERATE_CODE, TOPIC_NAME_GRAPH_HANDLER, PREFIX } = consts
|
|
40
39
|
|
|
41
40
|
const nodeLabelRegexPattern = "^[a-zA-Z0-9_-]+(?:\:[a-zA-Z0-9_-]+)?$"
|
|
42
|
-
const { validateObjType } = require('@izara_project/izara-shared-service-schemas').validateObjType;
|
|
43
|
-
// const { validateObject } = require('@izara_project/izara-core-library-core').validator
|
|
44
|
-
const { validateObject } = require("@izara_project/izara-core-library-core").validator
|
|
45
41
|
|
|
46
42
|
const schemaFunctionPerAction = {
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
43
|
+
[coreConsts.ACTIONS.create]: validatorSchema.generateValidatorSchemaForCreate,
|
|
44
|
+
[coreConsts.ACTIONS.update]: validatorSchema.generateValidatorSchemaForUpdate,
|
|
45
|
+
[coreConsts.ACTIONS.get]: validatorSchema.generateValidatorSchemaForIdentifier,
|
|
46
|
+
[coreConsts.ACTIONS.delete]: validatorSchema.generateValidatorSchemaForIdentifier,
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
const explodeDataPerAction = {
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
50
|
+
[coreConsts.ACTIONS.create]: explodedReqParams.explodedDataForCreate,
|
|
51
|
+
[coreConsts.ACTIONS.get]: explodedReqParams.explodedDataForIdentifiers,
|
|
52
|
+
[coreConsts.ACTIONS.update]: explodedReqParams.explodedDataForUpdate,
|
|
53
|
+
[coreConsts.ACTIONS.delete]: explodedReqParams.explodedDataForIdentifiers
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
|
|
@@ -150,7 +146,7 @@ async function validateSchemaPerRecord(
|
|
|
150
146
|
let validateStatus = validateObject(generatedSchema, explodedDataRequestParams);
|
|
151
147
|
record._izContext.logger.debug('validateStatus : ', validateStatus);
|
|
152
148
|
|
|
153
|
-
// if not pass validate will sent
|
|
149
|
+
// if not pass validate will sent message to dlq and throw NoRetryError
|
|
154
150
|
if (!validateStatus.pass) {
|
|
155
151
|
await messageToDlq(record, `Invalid: ${validateStatus.error}`, await sqsSharedLib.sqsQueueUrlDLQ(record._izContext, lambdaFunctionName));
|
|
156
152
|
record._izError = new Error(validateStatus.error)
|
|
@@ -394,7 +390,7 @@ async function createGetDataDetails(_izContext, objectSchema, settings = { bucke
|
|
|
394
390
|
}
|
|
395
391
|
}
|
|
396
392
|
|
|
397
|
-
if (storageData.storageType ===
|
|
393
|
+
if (storageData.storageType === coreConsts.STORAGE_TYPES.graph) {
|
|
398
394
|
|
|
399
395
|
let useStorageTag = storageTag;
|
|
400
396
|
let graphServiceTag = await serviceConfig.getGraphServiceTagWithCache(_izContext, storageData.graphServerTag, settings.bucketName);
|
|
@@ -439,7 +435,7 @@ async function createGetDataDetails(_izContext, objectSchema, settings = { bucke
|
|
|
439
435
|
}
|
|
440
436
|
}
|
|
441
437
|
|
|
442
|
-
} else if (storageData.storageType ===
|
|
438
|
+
} else if (storageData.storageType === coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
443
439
|
let serviceTag = storageData.serviceTag || process.env.iz_serviceTag
|
|
444
440
|
Object.assign(getDynamoDbDataDetails, {
|
|
445
441
|
[storageTag]: {
|
|
@@ -553,14 +549,14 @@ async function generateDynamoDbIdentifiers(_izContext, objectSchema, reqIdentifi
|
|
|
553
549
|
|
|
554
550
|
for (let identifier of objectSchema.identifiers) {
|
|
555
551
|
if (identifier.name) {
|
|
556
|
-
let deliminator = identifier.deliminator ||
|
|
552
|
+
let deliminator = identifier.deliminator || coreConsts.DEFAULT_IDENTIFIER_DELIMINATOR;
|
|
557
553
|
let currentDeliminatorAmount = 0;
|
|
558
554
|
|
|
559
555
|
let concatenateValue = [];
|
|
560
556
|
for (let fieldName of identifier.fieldNames) {
|
|
561
557
|
concatenateValue.push(reqIdentifiers[fieldName]);
|
|
562
558
|
|
|
563
|
-
let deliminatorTreeFieldName = await generateDeliminatorTreePerFieldName(_izContext, fieldName, objectSchema.fieldNames[fieldName], {}, bucketName);
|
|
559
|
+
let deliminatorTreeFieldName = await deliminatorTree.generateDeliminatorTreePerFieldName(_izContext, fieldName, objectSchema.fieldNames[fieldName], {}, bucketName);
|
|
564
560
|
_izContext.logger.debug("deliminatorTreeFieldName: ", deliminatorTreeFieldName);
|
|
565
561
|
|
|
566
562
|
if (deliminatorTreeFieldName[fieldName]?.deliminatorList?.[deliminator]) {
|
|
@@ -625,10 +621,10 @@ async function dynamoDbIdentifiersByStorageResource(_izContext, objectSchema, dy
|
|
|
625
621
|
|
|
626
622
|
if (dynamoStorageResource.groupByPartitionKeyField) {
|
|
627
623
|
|
|
628
|
-
let deliminatorTreeIdentifiers = await generateDeliminatorTreeIdentifier(_izContext, objectSchema, bucketName);
|
|
624
|
+
let deliminatorTreeIdentifiers = await deliminatorTree.generateDeliminatorTreeIdentifier(_izContext, objectSchema, bucketName);
|
|
629
625
|
_izContext.logger.debug("deliminatorTree: ", deliminatorTreeIdentifiers);
|
|
630
626
|
|
|
631
|
-
let compositeKeyDeliminator = objectSchema.compositeKeyDeliminator ||
|
|
627
|
+
let compositeKeyDeliminator = objectSchema.compositeKeyDeliminator || coreConsts.DEFAULT_IDENTIFIER_DELIMINATOR;
|
|
632
628
|
|
|
633
629
|
let currentDeliminatorAmount = 0;
|
|
634
630
|
|
|
@@ -698,7 +694,7 @@ function collectGetData(_izContext, getResults, objectSchema, returnSystemFields
|
|
|
698
694
|
}
|
|
699
695
|
|
|
700
696
|
// this process will add result from graph and dynamo to collectedData object by add identifiers and fieldName from getData
|
|
701
|
-
if (getDataDetail.storageType ===
|
|
697
|
+
if (getDataDetail.storageType === coreConsts.STORAGE_TYPES.graph) {
|
|
702
698
|
if (getData.returnValue.queryResults.refactoredNodes.objInstanceFull && Object.keys(getData.returnValue.queryResults.refactoredNodes.objInstanceFull).length) {
|
|
703
699
|
for (const getDetailFieldName of getDataDetail.fieldNames) {
|
|
704
700
|
if (addedFieldNames.has(getDetailFieldName)) {
|
|
@@ -725,7 +721,7 @@ function collectGetData(_izContext, getResults, objectSchema, returnSystemFields
|
|
|
725
721
|
if (getData.returnValue.queryResults.refactoredNodes.versionDataSystemFields || returnSystemFieldsName == true) {
|
|
726
722
|
Object.assign(collectedData.versionDataSystemFields, getData.returnValue.queryResults.refactoredNodes.versionDataSystemFields)
|
|
727
723
|
}
|
|
728
|
-
} else if (getDataDetail.storageType ===
|
|
724
|
+
} else if (getDataDetail.storageType === coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
729
725
|
for (const getDetailFieldName of getDataDetail.fieldNames) {
|
|
730
726
|
if (addedFieldNames.has(getDetailFieldName)) {
|
|
731
727
|
continue;
|
|
@@ -776,7 +772,7 @@ async function createUpdateDataDetail(_izContext, objectSchema, settings = { buc
|
|
|
776
772
|
}
|
|
777
773
|
}
|
|
778
774
|
}
|
|
779
|
-
if (storageProperties.storageType ===
|
|
775
|
+
if (storageProperties.storageType === coreConsts.STORAGE_TYPES.graph) {
|
|
780
776
|
let graphStorageTagPerGraphServiceTag = {}
|
|
781
777
|
let useStorageTag = storageTag;
|
|
782
778
|
let graphServiceName = await serviceConfig.getGraphServiceTagWithCache(_izContext, storageProperties.graphServerTag, settings.bucketName)
|
|
@@ -797,7 +793,7 @@ async function createUpdateDataDetail(_izContext, objectSchema, settings = { buc
|
|
|
797
793
|
} else {
|
|
798
794
|
getGraphDataDetails[graphServiceName].fieldNames = [...new Set(getGraphDataDetails[useStorageTag].fieldNames.concat(storageFieldNames))]
|
|
799
795
|
}
|
|
800
|
-
} else if (storageProperties.storageType ===
|
|
796
|
+
} else if (storageProperties.storageType === coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
801
797
|
let serviceTag = storageProperties.serviceTag || process.env.iz_serviceTag;
|
|
802
798
|
Object.assign(getDynamoDbDataDetails, {
|
|
803
799
|
[storageTag]: {
|
|
@@ -847,7 +843,7 @@ async function createDataDetailsLib(_izContext, objectSchemas, settings = { buck
|
|
|
847
843
|
if (!storageResources.hasOwnProperty(eachStorageResourceTag)) {
|
|
848
844
|
throw new Error("storageResources is'n exist"); // should be validate in step upload in s3
|
|
849
845
|
} else {
|
|
850
|
-
if (storageResources[eachStorageResourceTag].storageType ==
|
|
846
|
+
if (storageResources[eachStorageResourceTag].storageType == coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
851
847
|
if (createDataDetails.hasOwnProperty(eachStorageResourceTag)) {
|
|
852
848
|
// _izContext.logger.debug("SAME STG DB", eachStorageResourceTag);
|
|
853
849
|
createDataDetails[eachStorageResourceTag].fieldNames.push(keyFieldName);
|
|
@@ -855,7 +851,7 @@ async function createDataDetailsLib(_izContext, objectSchemas, settings = { buck
|
|
|
855
851
|
} else {
|
|
856
852
|
Object.assign(createDataDetails, {
|
|
857
853
|
[eachStorageResourceTag]: {
|
|
858
|
-
storageType:
|
|
854
|
+
storageType: coreConsts.STORAGE_TYPES.dynamoDB,
|
|
859
855
|
tableName: storageResources[eachStorageResourceTag].tableName,
|
|
860
856
|
serviceTag: storageResources[eachStorageResourceTag].serviceTag || process.env.iz_serviceTag,
|
|
861
857
|
fieldNames: [keyFieldName]
|
|
@@ -868,7 +864,7 @@ async function createDataDetailsLib(_izContext, objectSchemas, settings = { buck
|
|
|
868
864
|
});
|
|
869
865
|
}
|
|
870
866
|
}
|
|
871
|
-
} else if (storageResources[eachStorageResourceTag].storageType ==
|
|
867
|
+
} else if (storageResources[eachStorageResourceTag].storageType == coreConsts.STORAGE_TYPES.graph) {
|
|
872
868
|
let checkGraphServerTags = await serviceConfig.getGraphServiceTagWithCache(
|
|
873
869
|
_izContext,
|
|
874
870
|
storageResources[eachStorageResourceTag].graphServerTag,
|
|
@@ -883,17 +879,17 @@ async function createDataDetailsLib(_izContext, objectSchemas, settings = { buck
|
|
|
883
879
|
// _izContext.logger.debug("NEW STG", checkGraphServerTags);
|
|
884
880
|
Object.assign(createDataDetails, {
|
|
885
881
|
[checkGraphServerTags]: {
|
|
886
|
-
storageType:
|
|
882
|
+
storageType: coreConsts.STORAGE_TYPES.graph,
|
|
887
883
|
fieldNames: [keyFieldName]
|
|
888
884
|
}
|
|
889
885
|
});
|
|
890
886
|
};
|
|
891
887
|
};
|
|
892
|
-
} else if (storageResources[eachStorageResourceTag].storageType ===
|
|
888
|
+
} else if (storageResources[eachStorageResourceTag].storageType === coreConsts.STORAGE_TYPES.externalTopic) {
|
|
893
889
|
let topicName = storageResources[eachStorageResourceTag].serviceTag + storageResources[eachStorageResourceTag].stage + storageResources[eachStorageResourceTag].topicName
|
|
894
890
|
Object.assign(createDataDetails, {
|
|
895
891
|
[topicName]: {
|
|
896
|
-
storageType:
|
|
892
|
+
storageType: coreConsts.STORAGE_TYPES.externalTopic,
|
|
897
893
|
fieldNames: [keyFieldName],
|
|
898
894
|
accountId: storageResources[eachStorageResourceTag].accountId,
|
|
899
895
|
region: storageResources[eachStorageResourceTag].region,
|
|
@@ -915,7 +911,7 @@ async function createDeleteDataDetail(_izContext, objectSchema, settings = { buc
|
|
|
915
911
|
let allDeleteDataDetail = {};
|
|
916
912
|
|
|
917
913
|
for (let [storageTag, storageProperties] of Object.entries(objectSchema.storageResources)) {
|
|
918
|
-
if (storageProperties.storageType ===
|
|
914
|
+
if (storageProperties.storageType === coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
919
915
|
let serviceTag = storageProperties.serviceTag || process.env.iz_serviceTag;
|
|
920
916
|
Object.assign(deleteDynamoDataDetail, {
|
|
921
917
|
[storageTag]: {
|
|
@@ -932,7 +928,7 @@ async function createDeleteDataDetail(_izContext, objectSchema, settings = { buc
|
|
|
932
928
|
}
|
|
933
929
|
)
|
|
934
930
|
}
|
|
935
|
-
} else if (storageProperties.storageType ===
|
|
931
|
+
} else if (storageProperties.storageType === coreConsts.STORAGE_TYPES.graph) {
|
|
936
932
|
let dataDetailPerGraphStorage = {};
|
|
937
933
|
let useStorageTag = storageTag
|
|
938
934
|
let graphServiceName = await serviceConfig.getGraphServiceTagWithCache(_izContext, storageProperties.graphServerTag, settings.bucketName);
|
|
@@ -1001,8 +997,8 @@ function createFieldForUpdateDynamoDb(_izContext, objectSchema, dynamoDataDetail
|
|
|
1001
997
|
* @param {Boolean} topLevelParent
|
|
1002
998
|
*/
|
|
1003
999
|
function createBasicRelationshipsProperties(from, to, storageResources, baseDirection, topLevelParent = false) {
|
|
1004
|
-
validateObjType({ objectType: from.objectType, serviceTag: from.serviceTag });
|
|
1005
|
-
validateObjType({ objectType: to.objectType, serviceTag: to.serviceTag });
|
|
1000
|
+
validateObjType.validateObjType({ objectType: from.objectType, serviceTag: from.serviceTag });
|
|
1001
|
+
validateObjType.validateObjType({ objectType: to.objectType, serviceTag: to.serviceTag });
|
|
1006
1002
|
|
|
1007
1003
|
let otherDirection;
|
|
1008
1004
|
if (baseDirection === "to") {
|
|
@@ -1090,7 +1086,347 @@ function createFieldNamesFromRequestParamsByObjectSchema(_izContext, requestPara
|
|
|
1090
1086
|
return createFieldNameParams
|
|
1091
1087
|
}
|
|
1092
1088
|
|
|
1093
|
-
|
|
1089
|
+
async function sharedCreateEndpoint(_izContext, objType, requestParams, callingFlowConfig, settings = { userAgent: false, directInvoke: false, parentObject }) {
|
|
1090
|
+
let objectSchemas = await getObjectSchema.getObjectSchemaCombineFieldNamesWithCache(_izContext, objType)
|
|
1091
|
+
let createDataDetails = await createDataDetailsLib(_izContext, objectSchemas)
|
|
1092
|
+
_izContext.logger.debug("createDataDetails is =", createDataDetails);
|
|
1093
|
+
let listOfObjectForCreates = [];
|
|
1094
|
+
let allAwaitingStepsId = [];
|
|
1095
|
+
|
|
1096
|
+
let objInstanceFull = {
|
|
1097
|
+
identifiers: {},
|
|
1098
|
+
fields: {}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
1102
|
+
if (objectSchemas.identifierFieldNames.includes(fieldName)) {
|
|
1103
|
+
_izContext.logger.debug("identifiers is", fieldName);
|
|
1104
|
+
Object.assign(objInstanceFull.identifiers, {
|
|
1105
|
+
[fieldName]: requestParams.fieldNames[fieldName]
|
|
1106
|
+
});
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
let objInstanceFullForDynamoDb = lodash.cloneDeep(objInstanceFull);
|
|
1111
|
+
let objInstanceFullForGraph = lodash.cloneDeep(objInstanceFull);
|
|
1112
|
+
let objInstanceFullForExternalTopic = lodash.cloneDeep(objInstanceFull);
|
|
1113
|
+
|
|
1114
|
+
for (const [storageTag, createDataDetail] of Object.entries(createDataDetails)) {
|
|
1115
|
+
if (createDataDetail.storageType == coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
1116
|
+
_izContext.logger.debug("::::::DynamoDB::::::", { storageTag, objInstanceFull });
|
|
1117
|
+
|
|
1118
|
+
if (settings.parentObject) {
|
|
1119
|
+
if (createDataDetail.tableName.includes(firstLetterUpperCase(`${parentObject.objectType}Records`))) {
|
|
1120
|
+
Object.assign(
|
|
1121
|
+
objInstanceFullForDynamoDb.fields, {
|
|
1122
|
+
[`${settings.parentObject.objectType}HandlerServiceTag`]: process.env.iz_serviceTag
|
|
1123
|
+
})
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
Object.assign(objInstanceFullForDynamoDb.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
1128
|
+
_izContext.logger.debug("objInstanceFull before create item in dynamoDB", objInstanceFullForDynamoDb)
|
|
1129
|
+
|
|
1130
|
+
let identifiersForCreateData = await dynamoDbIdentifiersByStorageResource(
|
|
1131
|
+
_izContext,
|
|
1132
|
+
objectSchemas,
|
|
1133
|
+
createDataDetail,
|
|
1134
|
+
objInstanceFullForDynamoDb.identifiers
|
|
1135
|
+
)
|
|
1136
|
+
_izContext.logger.debug("identifiersForCreateData", identifiersForCreateData);
|
|
1137
|
+
|
|
1138
|
+
await dynamodbSharedLib.putItem(
|
|
1139
|
+
_izContext,
|
|
1140
|
+
await dynamodbSharedLib.tableName(
|
|
1141
|
+
_izContext,
|
|
1142
|
+
createDataDetail.tableName,
|
|
1143
|
+
createDataDetail.serviceTag
|
|
1144
|
+
),
|
|
1145
|
+
{
|
|
1146
|
+
...identifiersForCreateData,
|
|
1147
|
+
...objInstanceFullForDynamoDb.fields
|
|
1148
|
+
}
|
|
1149
|
+
);
|
|
1150
|
+
|
|
1151
|
+
objInstanceFullForDynamoDb.fields = {} // prevent using fieldNames from other tableName
|
|
1152
|
+
if (allAwaitingStepsId.length == 0) {
|
|
1153
|
+
let messageObject = {
|
|
1154
|
+
objType: objType,
|
|
1155
|
+
objInstanceFull: {
|
|
1156
|
+
identifiers: objInstanceFullForDynamoDb.identifiers,
|
|
1157
|
+
fields: objInstanceFullForDynamoDb.fields
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
if (callingFlowConfig[callingFlowSharedLib.coreConsts.CALLINGFLOW_PROPERTYNAME]) {
|
|
1162
|
+
// send message to SNS OutCreateNodeComplete
|
|
1163
|
+
_izContext.logger.debug("HAVE CallingFlow");
|
|
1164
|
+
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
1165
|
+
|
|
1166
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
1167
|
+
let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
1168
|
+
let messageParams = {
|
|
1169
|
+
Message: JSON.stringify(messageObject),
|
|
1170
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
1171
|
+
TopicArn: outCreateNodeCompleteTopic,
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
_izContext.logger.debug("messageParams OutCreateNode ::::::: ", messageParams);
|
|
1175
|
+
await sns.publishAsync(_izContext, messageParams);
|
|
1176
|
+
}
|
|
1177
|
+
return {
|
|
1178
|
+
objType: objType,
|
|
1179
|
+
objInstanceFull: objInstanceFullForDynamoDb,
|
|
1180
|
+
relationships: requestParams.relationships || [],
|
|
1181
|
+
status: "complete",
|
|
1182
|
+
errorsFound: []
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
} else if (createDataDetail.storageType == coreConsts.STORAGE_TYPES.graph) {
|
|
1187
|
+
_izContext.logger.debug("::::::Graph::::::", { storageTag, objInstanceFull });
|
|
1188
|
+
|
|
1189
|
+
Object.assign(objInstanceFullForGraph.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
1190
|
+
_izContext.logger.debug("objInstanceFull before send to Graph", objInstanceFullForGraph)
|
|
1191
|
+
|
|
1192
|
+
// allStorageTagComplete = false;
|
|
1193
|
+
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId(
|
|
1194
|
+
(hash({
|
|
1195
|
+
objType: objType,
|
|
1196
|
+
graphServerTag: storageTag,
|
|
1197
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
1198
|
+
callingFlowProperties: callingFlowConfig.callingFlowProperties || {}
|
|
1199
|
+
})),
|
|
1200
|
+
PREFIX.CREATE_OBJECT_ASYNC
|
|
1201
|
+
));
|
|
1202
|
+
listOfObjectForCreates.push({
|
|
1203
|
+
[storageTag]: {
|
|
1204
|
+
objInstanceFull: {
|
|
1205
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
1206
|
+
fields: objInstanceFullForGraph.fields
|
|
1207
|
+
},
|
|
1208
|
+
allStorageTagComplete: false
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
_izContext.logger.debug("FIRST", listOfObjectForCreates)
|
|
1213
|
+
|
|
1214
|
+
} else if (createDataDetail.storageType === coreConsts.STORAGE_TYPES.externalTopic) {
|
|
1215
|
+
_izContext.logger.debug("::::::externalTopic::::::", { storageTag, createDataDetail });
|
|
1216
|
+
Object.assign(objInstanceFullForExternalTopic.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
1217
|
+
_izContext.logger.debug("objInstanceFull before send to external topic", objInstanceFullForExternalTopic)
|
|
1218
|
+
|
|
1219
|
+
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId(
|
|
1220
|
+
(hash({
|
|
1221
|
+
objType: objType,
|
|
1222
|
+
graphServerTag: storageTag,
|
|
1223
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
1224
|
+
callingFlowProperties: callingFlowConfig.callingFlowProperties || {}
|
|
1225
|
+
})),
|
|
1226
|
+
PREFIX.CREATE_OBJECT_EXTERNAL_TOPIC
|
|
1227
|
+
));
|
|
1228
|
+
|
|
1229
|
+
let sendToCreateExternalTopic = {
|
|
1230
|
+
Message: JSON.stringify({ objType, objInstanceFull: objInstanceFullForExternalTopic, relationships: requestParams.relationships }),
|
|
1231
|
+
TopicArn: `arn:aws:sns:${createDataDetail.region}:${createDataDetail.accountId}:${createDataDetail.serviceTag}_${createDataDetail.stage}_Create_In`
|
|
1232
|
+
};
|
|
1233
|
+
_izContext.logger.debug("Request params before send to create endpoint:", sendToCreateExternalTopic);
|
|
1234
|
+
|
|
1235
|
+
await sns.publishAsync(_izContext, sendToCreateExternalTopic)
|
|
1236
|
+
return sendToCreateExternalTopic
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
_izContext.logger.debug("[1]listOfObjectForCreates:::", listOfObjectForCreates);
|
|
1240
|
+
|
|
1241
|
+
/// step save awaitingMultipleStep of storageType graph ...........................................................
|
|
1242
|
+
if (!settings.userAgent) {
|
|
1243
|
+
_izContext.logger.debug("not api will create awaitingStep")
|
|
1244
|
+
await asyncFlowSharedLib.createAwaitingMultipleSteps(
|
|
1245
|
+
_izContext,
|
|
1246
|
+
allAwaitingStepsId,
|
|
1247
|
+
asyncFlowSharedLib.createPendingStepId((hash({ objType: objType, identifiers: objInstanceFull.identifiers })), PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
//............................................................................................................
|
|
1251
|
+
|
|
1252
|
+
// process storageType : graph
|
|
1253
|
+
let messageObject = {};
|
|
1254
|
+
for (let objectCreate of listOfObjectForCreates) {
|
|
1255
|
+
|
|
1256
|
+
for (let [graphServiceName, objectForCreate] of Object.entries(objectCreate)) {
|
|
1257
|
+
_izContext.logger.debug("Loop each graph:", {
|
|
1258
|
+
[graphServiceName]: objectForCreate
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
if (objectForCreate.allStorageTagComplete == false) { // needless check because in listOfObjectForCreates push case graph only!
|
|
1262
|
+
messageObject = {
|
|
1263
|
+
objType: objType,
|
|
1264
|
+
objInstanceFull: objectForCreate.objInstanceFull,
|
|
1265
|
+
relationships: requestParams.relationships || []
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
_izContext.logger.debug("SENT MESSAGE EACH GRAPH::::", { graphServiceName, messageObject, callingFlowConfig })
|
|
1270
|
+
|
|
1271
|
+
Object.assign(messageObject, {
|
|
1272
|
+
settings: { updatePropertiesOnMatch: false },
|
|
1273
|
+
originTimestamp: Date.now(),
|
|
1274
|
+
});
|
|
1275
|
+
if (settings.userAgent) {
|
|
1276
|
+
_izContext.logger.debug("have userAgent will invoke GraphHandler")
|
|
1277
|
+
let createNodeResult = await graphSharedLibs.createNodeV2(
|
|
1278
|
+
_izContext,
|
|
1279
|
+
graphServiceName,
|
|
1280
|
+
objType,
|
|
1281
|
+
objInstanceFullForGraph,
|
|
1282
|
+
requestParams.relationships || [],
|
|
1283
|
+
Date.now(),
|
|
1284
|
+
{
|
|
1285
|
+
updatePropertiesOnMatch: false
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
return createNodeResult
|
|
1289
|
+
|
|
1290
|
+
} else if (settings.directInvoke) {
|
|
1291
|
+
_izContext.logger.debug("Direction Invoke case will invoke GraphHandlerInv")
|
|
1292
|
+
let createNodeResult = await graphSharedLibs.createNodeV2(
|
|
1293
|
+
_izContext,
|
|
1294
|
+
graphServiceName,
|
|
1295
|
+
objType,
|
|
1296
|
+
objInstanceFullForGraph,
|
|
1297
|
+
requestParams.relationships,
|
|
1298
|
+
Date.now(),
|
|
1299
|
+
{
|
|
1300
|
+
updatePropertiesOnMatch: false
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
|
|
1304
|
+
return createNodeResult;
|
|
1305
|
+
} else {
|
|
1306
|
+
_izContext.logger.debug("not have userAgent will send Message to GraphHandler")
|
|
1307
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
1308
|
+
messageObject,
|
|
1309
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
1310
|
+
callingFlowConfig, // receive parent callingFlowConfig.
|
|
1311
|
+
callingFlowSharedLib.createCallingFlowConfig( // calling flow own service
|
|
1312
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.createNodeComplete), {}
|
|
1313
|
+
)
|
|
1314
|
+
)
|
|
1315
|
+
);
|
|
1316
|
+
|
|
1317
|
+
let messageToCreateObject = {
|
|
1318
|
+
Message: JSON.stringify(messageObject),
|
|
1319
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName)
|
|
1320
|
+
};
|
|
1321
|
+
_izContext.logger.debug("RequestParams before send to sqs messageToCreateObject ::::::: ", messageToCreateObject);
|
|
1322
|
+
await sns.publishAsync(_izContext, messageToCreateObject);
|
|
1323
|
+
|
|
1324
|
+
return messageObject
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
function createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail) {
|
|
1330
|
+
let fields = {};
|
|
1331
|
+
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
1332
|
+
if ((createDataDetails[storageTag].fieldNames.includes(fieldName)) &&
|
|
1333
|
+
(createDataDetail.fieldNames.includes(fieldName))) {
|
|
1334
|
+
if (!objInstanceFull.identifiers.hasOwnProperty(fieldName)) {
|
|
1335
|
+
if (!fields.hasOwnProperty(fieldName)) {
|
|
1336
|
+
Object.assign(fields, {
|
|
1337
|
+
[fieldName]: requestParams.fieldNames[fieldName]
|
|
1338
|
+
})
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
return fields
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
async function sharedCreateCompleteEndpoint(_izContext, returnValue, status, errorsFound, graphServiceTag, passBackProperties) {
|
|
1348
|
+
let existsNode = null;
|
|
1349
|
+
let createNodeFinished = false;
|
|
1350
|
+
if (Object.keys(returnValue.queryResult.returnCreateNode.existsNode).length) {
|
|
1351
|
+
existsNode = {
|
|
1352
|
+
objType: {
|
|
1353
|
+
objectType: returnValue.requestParams.objType.objectType,
|
|
1354
|
+
serviceTag: returnValue.requestParams.objType.serviceTag
|
|
1355
|
+
},
|
|
1356
|
+
objInstanceFull: returnValue.queryResult.returnCreateNode.existsNode.objInstanceFull
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
let awaitingStepId = await asyncFlowSharedLib.createAwaitingStepId(
|
|
1361
|
+
(hash({
|
|
1362
|
+
objType: returnValue.requestParams.objType,
|
|
1363
|
+
graphServerTag: graphServiceTag,
|
|
1364
|
+
identifiers: returnValue.requestParams.objInstanceFull.identifiers,
|
|
1365
|
+
callingFlowProperties: passBackProperties.passBackProperties.parentPassBackProperties.callingFlowProperties || {}
|
|
1366
|
+
})),
|
|
1367
|
+
PREFIX.CREATE_OBJECT_ASYNC
|
|
1368
|
+
)
|
|
1369
|
+
_izContext.logger.debug("awaitingStepId:", awaitingStepId);
|
|
1370
|
+
|
|
1371
|
+
let recordAwaitingSteps = await dynamodbSharedLib.query(
|
|
1372
|
+
_izContext,
|
|
1373
|
+
await dynamodbSharedLib.tableName(_izContext, "AwaitingMultipleSteps"),
|
|
1374
|
+
{
|
|
1375
|
+
awaitingStepId: awaitingStepId
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
_izContext.logger.debug("record awaitingSteps::", recordAwaitingSteps);
|
|
1379
|
+
|
|
1380
|
+
await Promise.all(
|
|
1381
|
+
recordAwaitingSteps.Items.map(async ({ pendingStepId }) => {
|
|
1382
|
+
if (await asyncFlowSharedLib.checkAllAwaitingStepsFinished(
|
|
1383
|
+
_izContext,
|
|
1384
|
+
pendingStepId,
|
|
1385
|
+
awaitingStepId,
|
|
1386
|
+
errorsFound
|
|
1387
|
+
)) {
|
|
1388
|
+
_izContext.logger.debug("finish all awaitingStep");
|
|
1389
|
+
|
|
1390
|
+
let messageObject = {
|
|
1391
|
+
objType: {
|
|
1392
|
+
objectType: returnValue.requestParams.objType.objectType,
|
|
1393
|
+
serviceTag: returnValue.requestParams.objType.serviceTag
|
|
1394
|
+
},
|
|
1395
|
+
objInstanceFull: returnValue.queryResult.returnCreateNode.objInstanceFull,
|
|
1396
|
+
relationships: returnValue.queryResult.returnCreateNode.relationships,
|
|
1397
|
+
existsNode: existsNode,
|
|
1398
|
+
status: status,
|
|
1399
|
+
errorsFound: errorsFound
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
messageObject = callingFlowSharedLib.addParentPassBackPropertiesToSnsResponseMessageObject(passBackProperties, messageObject)
|
|
1403
|
+
let messageAttributes = callingFlowSharedLib.addParentPassBackCallingFlowToSnsResponseMessageAttributes(passBackProperties, {})
|
|
1404
|
+
|
|
1405
|
+
let sendMessageOutCreateObjectComplete = {
|
|
1406
|
+
Message: JSON.stringify(messageObject),
|
|
1407
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
1408
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
1409
|
+
};
|
|
1410
|
+
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
1411
|
+
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
1412
|
+
createNodeFinished = true
|
|
1413
|
+
} else {
|
|
1414
|
+
createNodeFinished = false
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
1418
|
+
_izContext,
|
|
1419
|
+
awaitingStepId,
|
|
1420
|
+
pendingStepId,
|
|
1421
|
+
errorsFound
|
|
1422
|
+
);
|
|
1423
|
+
|
|
1424
|
+
})
|
|
1425
|
+
)
|
|
1426
|
+
return createNodeFinished
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export default {
|
|
1094
1430
|
sendMsgOutComplete,
|
|
1095
1431
|
messageToDlq,
|
|
1096
1432
|
|
|
@@ -1110,7 +1446,9 @@ module.exports = {
|
|
|
1110
1446
|
|
|
1111
1447
|
createFieldForUpdateDynamoDb,
|
|
1112
1448
|
createBasicRelationshipsProperties,
|
|
1113
|
-
createFieldNamesFromRequestParamsByObjectSchema
|
|
1449
|
+
createFieldNamesFromRequestParamsByObjectSchema,
|
|
1450
|
+
sharedCreateEndpoint,
|
|
1451
|
+
sharedCreateCompleteEndpoint
|
|
1114
1452
|
}
|
|
1115
1453
|
|
|
1116
1454
|
|
|
@@ -1188,7 +1526,7 @@ module.exports = {
|
|
|
1188
1526
|
|
|
1189
1527
|
// // reformat request depend on action
|
|
1190
1528
|
// switch (action) {
|
|
1191
|
-
// case
|
|
1529
|
+
// case coreConsts.ACTIONS.create:
|
|
1192
1530
|
// _izContext.logger.debug("reformatted case create");
|
|
1193
1531
|
|
|
1194
1532
|
// // initial format
|
|
@@ -1235,13 +1573,13 @@ module.exports = {
|
|
|
1235
1573
|
// }
|
|
1236
1574
|
|
|
1237
1575
|
// break;
|
|
1238
|
-
// case
|
|
1576
|
+
// case coreConsts.ACTIONS.update:
|
|
1239
1577
|
// // code block
|
|
1240
1578
|
// break;
|
|
1241
|
-
// case
|
|
1579
|
+
// case coreConsts.ACTIONS.get:
|
|
1242
1580
|
// // code block
|
|
1243
1581
|
// break;
|
|
1244
|
-
// case
|
|
1582
|
+
// case coreConsts.ACTIONS.delete:
|
|
1245
1583
|
// // code block
|
|
1246
1584
|
// break;
|
|
1247
1585
|
// default:
|
|
@@ -1363,7 +1701,7 @@ module.exports = {
|
|
|
1363
1701
|
|
|
1364
1702
|
// let returnValue = {}
|
|
1365
1703
|
|
|
1366
|
-
// for (let storageType of
|
|
1704
|
+
// for (let storageType of coreConsts.STORAGE_TYPE_LIST) {
|
|
1367
1705
|
// if (!returnValue.hasOwnProperty(storageType)) {
|
|
1368
1706
|
// returnValue[storageType] = {}
|
|
1369
1707
|
// }
|
|
@@ -1381,7 +1719,7 @@ module.exports = {
|
|
|
1381
1719
|
// // separate requestParams by storageType
|
|
1382
1720
|
// for (let [storageTag, storageData] of Object.entries(objectSchema.storageResources)) {
|
|
1383
1721
|
|
|
1384
|
-
// if (storageData.storageType ===
|
|
1722
|
+
// if (storageData.storageType === coreConsts.STORAGE_TYPES.dynamoDB) {
|
|
1385
1723
|
|
|
1386
1724
|
// // separate by tableName
|
|
1387
1725
|
// let dynamoRequestParams = await separateRequestByDynamoDb(
|
|
@@ -1395,13 +1733,13 @@ module.exports = {
|
|
|
1395
1733
|
// _izContext.logger.debug("dynamoRequestParams: ", dynamoRequestParams);
|
|
1396
1734
|
|
|
1397
1735
|
// let tableName = storageData.tableName;
|
|
1398
|
-
// if (returnValue[
|
|
1736
|
+
// if (returnValue[coreConsts.STORAGE_TYPES.dynamoDB][tableName]) {
|
|
1399
1737
|
// throw new NoRetryError(`Have duplicate tableName in storageTag:${storageTag}`);
|
|
1400
1738
|
// }
|
|
1401
1739
|
|
|
1402
|
-
// Object.assign(returnValue[
|
|
1740
|
+
// Object.assign(returnValue[coreConsts.STORAGE_TYPES.dynamoDB], { [tableName]: dynamoRequestParams });
|
|
1403
1741
|
|
|
1404
|
-
// } else if (storageData.storageType ===
|
|
1742
|
+
// } else if (storageData.storageType === coreConsts.STORAGE_TYPES.graph) {
|
|
1405
1743
|
|
|
1406
1744
|
// // separate by GraphServiceName
|
|
1407
1745
|
// let graphRequestParams = await separateRequestByGraph(
|
|
@@ -1418,20 +1756,20 @@ module.exports = {
|
|
|
1418
1756
|
// let graphServiceName = await serviceConfig.getGraphServiceNameFromGraphServerTagWithCache(_izContext, storageData.graphServerTag);
|
|
1419
1757
|
|
|
1420
1758
|
|
|
1421
|
-
// if (returnValue[
|
|
1759
|
+
// if (returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName]) {
|
|
1422
1760
|
// // have exists graphServiceName,
|
|
1423
1761
|
// // need to merge properties for multiple graphServerTag to one serviceName
|
|
1424
1762
|
// _izContext.logger.debug('exists serviceName');
|
|
1425
1763
|
// _izContext.logger.debug('graphRequestParams : ', graphRequestParams);
|
|
1426
|
-
// _izContext.logger.debug('returnValue[
|
|
1427
|
-
// returnValue[
|
|
1764
|
+
// _izContext.logger.debug('returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName]: ',
|
|
1765
|
+
// returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName]
|
|
1428
1766
|
// );
|
|
1429
1767
|
|
|
1430
1768
|
// // merge node properties
|
|
1431
1769
|
// for (let graphProperty in graphRequestParams.properties) {
|
|
1432
|
-
// if (!returnValue[
|
|
1770
|
+
// if (!returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].properties.hasOwnProperty(graphProperty)) {
|
|
1433
1771
|
// Object.assign(
|
|
1434
|
-
// returnValue[
|
|
1772
|
+
// returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].properties,
|
|
1435
1773
|
// { [graphProperty]: graphRequestParams.properties[graphProperty] }
|
|
1436
1774
|
// );
|
|
1437
1775
|
// }
|
|
@@ -1440,25 +1778,25 @@ module.exports = {
|
|
|
1440
1778
|
|
|
1441
1779
|
// /*
|
|
1442
1780
|
// if versionedDatas exists in graphRequestParams
|
|
1443
|
-
// - check versionedDatas exists in returnValue[
|
|
1781
|
+
// - check versionedDatas exists in returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName]
|
|
1444
1782
|
// - if exists add versionedData in graphRequestParams to returnValue
|
|
1445
1783
|
// - if not exists create and add versionedDatas
|
|
1446
1784
|
// */
|
|
1447
1785
|
|
|
1448
1786
|
// // merge graph versionedData
|
|
1449
1787
|
// if (graphRequestParams.versionedDatas?.length) {
|
|
1450
|
-
// if (Array.isArray(returnValue[
|
|
1451
|
-
// returnValue[
|
|
1452
|
-
// returnValue[
|
|
1788
|
+
// if (Array.isArray(returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].versionedDatas)) {
|
|
1789
|
+
// returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].versionedDatas =
|
|
1790
|
+
// returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].versionedDatas.concat(graphRequestParams.versionedDatas)
|
|
1453
1791
|
// } else {
|
|
1454
|
-
// returnValue[
|
|
1792
|
+
// returnValue[coreConsts.STORAGE_TYPES.graph][graphServiceName].versionedDatas = graphRequestParams.versionedDatas
|
|
1455
1793
|
// }
|
|
1456
1794
|
// }
|
|
1457
1795
|
|
|
1458
1796
|
|
|
1459
1797
|
// } else {
|
|
1460
1798
|
// // not exists graphServiceName
|
|
1461
|
-
// Object.assign(returnValue[
|
|
1799
|
+
// Object.assign(returnValue[coreConsts.STORAGE_TYPES.graph], { [graphServiceName]: graphRequestParams });
|
|
1462
1800
|
// }
|
|
1463
1801
|
|
|
1464
1802
|
// } else {
|
|
@@ -1655,7 +1993,7 @@ module.exports = {
|
|
|
1655
1993
|
|
|
1656
1994
|
// //----------------------- prepare additional return data per action ------------------------
|
|
1657
1995
|
|
|
1658
|
-
// if (action ===
|
|
1996
|
+
// if (action === coreConsts.ACTIONS.get) {
|
|
1659
1997
|
|
|
1660
1998
|
// if (
|
|
1661
1999
|
// requestParams?.additionalRequest?.versionedDataLabel
|
|
@@ -1684,10 +2022,10 @@ module.exports = {
|
|
|
1684
2022
|
// }
|
|
1685
2023
|
// }
|
|
1686
2024
|
|
|
1687
|
-
// } else if (action ===
|
|
2025
|
+
// } else if (action === coreConsts.ACTIONS.create) {
|
|
1688
2026
|
|
|
1689
2027
|
|
|
1690
|
-
// } else if (action ===
|
|
2028
|
+
// } else if (action === coreConsts.ACTIONS.update) {
|
|
1691
2029
|
// _izContext.logger.debug("filter versionedData update")
|
|
1692
2030
|
// _izContext.logger.debug("additionalReq: ", requestParams.additionalRequest.versionedDatas)
|
|
1693
2031
|
// _izContext.logger.debug("addOnDataStructure: ", objectSchema.addOnDataStructure)
|
|
@@ -1774,7 +2112,7 @@ module.exports = {
|
|
|
1774
2112
|
// }
|
|
1775
2113
|
|
|
1776
2114
|
|
|
1777
|
-
// } else if (action ===
|
|
2115
|
+
// } else if (action === coreConsts.ACTIONS.delete) {
|
|
1778
2116
|
|
|
1779
2117
|
// } else {
|
|
1780
2118
|
// throw new NoRetryError("Function:separateRequestByGraph: invalid action")
|
|
@@ -1858,7 +2196,7 @@ module.exports = {
|
|
|
1858
2196
|
// }
|
|
1859
2197
|
|
|
1860
2198
|
// // maybe not need to validate action get and delete because
|
|
1861
|
-
// if (action ===
|
|
2199
|
+
// if (action === coreConsts.ACTIONS.create) {
|
|
1862
2200
|
// for (let versionedFieldName of versionedObjDataSchema.fieldNames) {
|
|
1863
2201
|
// if (versionedFieldName.requireOnCreate === true || versionedFieldName.optionalOnCreate === true) {
|
|
1864
2202
|
// // add require fieldName to require array in validatorSchema
|
|
@@ -1877,7 +2215,7 @@ module.exports = {
|
|
|
1877
2215
|
|
|
1878
2216
|
// }
|
|
1879
2217
|
// }
|
|
1880
|
-
// } else if (action ===
|
|
2218
|
+
// } else if (action === coreConsts.ACTIONS.update) {
|
|
1881
2219
|
// for (let versionedFieldName of versionedObjDataSchema.fieldNames) {
|
|
1882
2220
|
// if (versionedFieldName.canUpdate === true || versionedFieldName.canUpdate === undefined) {
|
|
1883
2221
|
|