@izara_project/izara-core-generate-service-code 1.0.1 → 1.0.2
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 +41 -0
- package/package.json +10 -10
- package/src/GenerateCode.js +184 -0
- package/src/GenerateResources.js +121 -0
- package/src/GenerateSchema.js +164 -0
- package/src/GenerateTests.js +138 -0
- package/src/IntTestConfig.js +23 -0
- package/src/SchemaConfig.js +23 -0
- package/src/SourceManager/CreateSource.js +226 -0
- package/src/TemplateConfig.js +55 -0
- package/src/TemplateData/Auth/generateAuthYml/data.js +47 -0
- package/src/TemplateData/Auth/generateAuthYml/template.ejs +16 -0
- package/src/TemplateData/Auth/generateTemplateData.js +48 -0
- package/src/TemplateData/EndpointPerService/generateTemplateData.js +127 -0
- package/src/TemplateData/EndpointPerService/handler/api/data.js +72 -0
- package/src/TemplateData/EndpointPerService/handler/api/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/api/template.ejs +73 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/data.js +76 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/template.ejs +129 -0
- package/src/TemplateData/EndpointPerService/handler/inv/data.js +78 -0
- package/src/TemplateData/EndpointPerService/handler/inv/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/inv/template.ejs +73 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/data.js +76 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/template.ejs +131 -0
- package/src/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +358 -0
- package/src/TemplateData/EndpointPerService/mainFunction/create/data.js +51 -0
- package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +627 -0
- package/src/TemplateData/EndpointPerService/mainFunction/delete/data.js +51 -0
- package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +163 -0
- package/src/TemplateData/EndpointPerService/mainFunction/get/data.js +52 -0
- package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +273 -0
- package/src/TemplateData/EndpointPerService/mainFunction/update/data.js +52 -0
- package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +446 -0
- package/src/TemplateData/EndpointPerService/yaml/data.js +311 -0
- package/src/TemplateData/EndpointPerService/yaml/template.ejs +35 -0
- package/src/TemplateData/IntTest/generateResources/generateResources.js +112 -0
- package/src/TemplateData/IntTest/generateResources/templateResources.ejs +33 -0
- package/src/TemplateData/IntTest/generateTests/events/data.js +135 -0
- package/src/TemplateData/IntTest/generateTests/events/templateEvents.ejs +11 -0
- package/src/TemplateData/IntTest/generateTests/generateTemplate.js +67 -0
- package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +56 -0
- package/src/TemplateData/IntTest/generateTests/pathIntTest/template.ejs +5 -0
- package/src/TemplateData/IntTest/generateTests/tests/data.js +211 -0
- package/src/TemplateData/IntTest/generateTests/tests/templateTests.ejs +3 -0
- package/src/TemplateData/IntTest/libs/libs.js +416 -0
- package/src/TemplateData/IntTest/upload/uploadIntTest.js +95 -0
- package/src/TemplateData/externalService/functionNameConfig/data.js +178 -0
- package/src/TemplateData/externalService/functionNameConfig/template.ejs +14 -0
- package/src/TemplateData/externalService/functionNameConfig/templateIntTesting.ejs +31 -0
- package/src/TemplateData/externalService/functionNameConfig/templateYaml.ejs +10 -0
- package/src/TemplateData/externalService/generateTemplateData.js +79 -0
- package/src/TemplateData/externalService/lambdaRole/data.js +448 -0
- package/src/TemplateData/externalService/lambdaRole/request.json +18 -0
- package/src/TemplateData/externalService/lambdaRole/template.ejs +59 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/data.js +271 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/request.json +12 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/template.ejs +35 -0
- package/src/TemplateData/findData/GetByStorage/getByDynamo.ejs +54 -0
- package/src/TemplateData/findData/GetByStorage/getByGraph.ejs +81 -0
- package/src/TemplateData/findData/findDataYaml/data.js +187 -0
- package/src/TemplateData/findData/findDataYaml/template.ejs +14 -0
- package/src/TemplateData/findData/generateTemplateData.js +69 -0
- package/src/TemplateData/findData/handler/data.js +51 -0
- package/src/TemplateData/findData/handler/template.ejs +136 -0
- package/src/TemplateData/findData/mainFunction/data.js +316 -0
- package/src/TemplateData/findData/mainFunction/template.ejs +149 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +129 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +68 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +84 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +71 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +118 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +73 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/queue/template.ejs +49 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +128 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +123 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +58 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +129 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +62 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/template.ejs +45 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +116 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/handler/data.js +67 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +83 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +67 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +131 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +118 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/template.ejs +99 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +63 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +81 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +69 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/template.ejs +49 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +138 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/template.ejs +18 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/template.ejs +123 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +262 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/template.ejs +45 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +144 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +14 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +121 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +61 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +172 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +68 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/template.ejs +53 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +139 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/template.ejs +25 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +52 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/template.ejs +50 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +182 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +51 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +68 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/data.js +77 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/dsqTemplatePath.ejs +32 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/s3Template.ejs +59 -0
- package/src/TemplateData/flowSchema/components/upload/relate/S3/data.js +60 -0
- package/src/TemplateData/flowSchema/components/upload/relate/S3/template.ejs +13 -0
- package/src/TemplateData/flowSchema/components/upload/relate/libs/data.js +53 -0
- package/src/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +97 -0
- package/src/TemplateData/flowSchema/components/upload/relate/sns-out/data.js +66 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +91 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/handler/data.js +58 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +72 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +69 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +69 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ttlDynamoTemplate.ejs +32 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/userUploadRecords.js +61 -0
- package/src/TemplateData/flowSchema/dynamoDb/data.js +116 -0
- package/src/TemplateData/flowSchema/eventBridge/functionYaml/data.js +167 -0
- package/src/TemplateData/flowSchema/eventBridge/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/data.js +69 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/request.json +7 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/template.ejs +60 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/data.js +67 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/request.json +5 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/template.ejs +59 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +111 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +93 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/handler/template.ejs +81 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +68 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/data.js +156 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +101 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +77 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-out/data.js +72 -0
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/data.js +120 -0
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +92 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +111 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +70 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +81 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +70 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +61 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +145 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +68 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +87 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +111 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/template.ejs +18 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +108 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +65 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +106 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +100 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/sqsTemplate.ejs +43 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +74 -0
- package/src/TemplateData/flowSchema/flowStep/functionYaml/data.js +152 -0
- package/src/TemplateData/flowSchema/flowStep/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/flowStep/handler/data.js +102 -0
- package/src/TemplateData/flowSchema/flowStep/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/flowStep/mainFunction/data.js +100 -0
- package/src/TemplateData/flowSchema/flowStep/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/flowStep/sns-in/data.js +98 -0
- package/src/TemplateData/flowSchema/flowStep/sns-in/template.ejs +59 -0
- package/src/TemplateData/flowSchema/generateTemplateData.js +808 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/data.js +85 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/template.ejs +28 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/handler/data.js +67 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/handler/template.ejs +86 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/data.js +74 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/template.ejs +13 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/data.js +64 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/template.ejs +52 -0
- package/src/TemplateData/flowSchema/register/complete/functionYaml/data.js +113 -0
- package/src/TemplateData/flowSchema/register/complete/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/register/complete/handler/data.js +58 -0
- package/src/TemplateData/flowSchema/register/complete/handler/template.ejs +85 -0
- package/src/TemplateData/flowSchema/register/complete/mainFunction/data.js +62 -0
- package/src/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +176 -0
- package/src/TemplateData/flowSchema/register/dynamoDB/register.js +73 -0
- package/src/TemplateData/flowSchema/register/sns-in/data.js +58 -0
- package/src/TemplateData/flowSchema/register/sns-in/template.ejs +45 -0
- package/src/TemplateData/flowSchema/register/subscriptionOutAll/data.js +82 -0
- package/src/TemplateData/flowSchema/register/subscriptionOutAll/template.ejs +13 -0
- package/src/TemplateData/flowSchema/register/wbs/functionYaml/data.js +107 -0
- package/src/TemplateData/flowSchema/register/wbs/functionYaml/template.ejs +19 -0
- package/src/TemplateData/flowSchema/register/wbs/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/register/wbs/handler/template.ejs +83 -0
- package/src/TemplateData/flowSchema/register/wbs/mainFunction/data.js +56 -0
- package/src/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +165 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/data.js +143 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/Handler/data.js +73 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/Handler/template.ejs +86 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/data.js +62 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/template.ejs +80 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/sns/data.js +63 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/sns/template.ejs +59 -0
- package/src/TemplateData/flowSchema/templateByStatusType/statusFieldTemplate.ejs +30 -0
- package/src/TemplateData/flowSchema/templateByStatusType/storedCacheTemplate.ejs +26 -0
- package/src/TemplateData/flowSchema/templateByStatusType/triggerCacheTemplate.ejs +44 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +135 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +70 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +72 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/template.ejs +85 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +139 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +73 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +69 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +131 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +69 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +88 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +69 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/template.ejs +74 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +90 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/template.ejs +49 -0
- package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +137 -0
- package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/webSocketComplete/handler/data.js +61 -0
- package/src/TemplateData/flowSchema/webSocketComplete/handler/template.ejs +85 -0
- package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/data.js +55 -0
- package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/template.ejs +134 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/data.js +100 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/template.ejs +43 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/templateSub.ejs +7 -0
- package/src/TemplateData/generateRole/createSharedResource.js +469 -0
- package/src/TemplateData/generateRole/data.js +92 -0
- package/src/TemplateData/generateRole/sharedResourceTemplate.ejs +32 -0
- package/src/TemplateData/generateRole/template.ejs +33 -0
- package/src/TemplateData/perActionComplete/create/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/create/handler/template.ejs +126 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +196 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +187 -0
- package/src/TemplateData/perActionComplete/create/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/create/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/create/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/create/sns-out/template.ejs +10 -0
- package/src/TemplateData/perActionComplete/create/yaml/data.js +106 -0
- package/src/TemplateData/perActionComplete/create/yaml/template.ejs +21 -0
- package/src/TemplateData/perActionComplete/delete/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/delete/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/delete/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +88 -0
- package/src/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/delete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/delete/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/delete/yaml/data.js +104 -0
- package/src/TemplateData/perActionComplete/delete/yaml/template.ejs +20 -0
- package/src/TemplateData/perActionComplete/generateTemplateData.js +162 -0
- package/src/TemplateData/perActionComplete/get/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/get/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/get/mainFunction/data.js +54 -0
- package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +131 -0
- package/src/TemplateData/perActionComplete/get/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/get/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/get/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/get/yaml/data.js +106 -0
- package/src/TemplateData/perActionComplete/get/yaml/template.ejs +21 -0
- package/src/TemplateData/perActionComplete/update/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/update/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/update/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +133 -0
- package/src/TemplateData/perActionComplete/update/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/update/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/update/sns-out/data.js +66 -0
- package/src/TemplateData/perActionComplete/update/yaml/data.js +107 -0
- package/src/TemplateData/perActionComplete/update/yaml/template.ejs +20 -0
- package/src/TemplateData/perActionEndpoint/generateTemplateData.js +112 -0
- package/src/TemplateData/perActionEndpoint/handler/api/data.js +109 -0
- package/src/TemplateData/perActionEndpoint/handler/api/request.json +7 -0
- package/src/TemplateData/perActionEndpoint/handler/api/template.ejs +36 -0
- package/src/TemplateData/perActionEndpoint/handler/dsq/data.js +118 -0
- package/src/TemplateData/perActionEndpoint/handler/dsq/request.json +7 -0
- package/src/TemplateData/perActionEndpoint/handler/dsq/template.ejs +55 -0
- package/src/TemplateData/perActionEndpoint/handler/inv/data.js +112 -0
- package/src/TemplateData/perActionEndpoint/handler/inv/request.json +7 -0
- package/src/TemplateData/perActionEndpoint/handler/inv/template.ejs +37 -0
- package/src/TemplateData/perActionEndpoint/handler/sqs/data.js +116 -0
- package/src/TemplateData/perActionEndpoint/handler/sqs/request.json +7 -0
- package/src/TemplateData/perActionEndpoint/handler/sqs/template.ejs +57 -0
- package/src/TemplateData/perActionEndpoint/handler/webSocket/data.js +94 -0
- package/src/TemplateData/perActionEndpoint/handler/webSocket/template.ejs +61 -0
- package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/data.js +54 -0
- package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/template.ejs +55 -0
- package/src/TemplateData/perActionEndpoint/libs/data.js +60 -0
- package/src/TemplateData/perActionEndpoint/libs/template.ejs +46 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/create/data.js +91 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/create/request.json +0 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +339 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/delete/data.js +91 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +99 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/get/data.js +92 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/get/request.json +5 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/get/template.ejs +116 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/get/testParam.json +5 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/update/data.js +85 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/update/request.json +0 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +166 -0
- package/src/TemplateData/perActionEndpoint/yaml/api/data.js +229 -0
- package/src/TemplateData/perActionEndpoint/yaml/api/request.json +14 -0
- package/src/TemplateData/perActionEndpoint/yaml/api/template.ejs +20 -0
- package/src/TemplateData/perActionEndpoint/yaml/dsq/data.js +234 -0
- package/src/TemplateData/perActionEndpoint/yaml/dsq/request.json +19 -0
- package/src/TemplateData/perActionEndpoint/yaml/dsq/template.ejs +17 -0
- package/src/TemplateData/perActionEndpoint/yaml/inv/data.js +207 -0
- package/src/TemplateData/perActionEndpoint/yaml/inv/example req.js +15 -0
- package/src/TemplateData/perActionEndpoint/yaml/inv/request.json +14 -0
- package/src/TemplateData/perActionEndpoint/yaml/inv/template.ejs +13 -0
- package/src/TemplateData/perActionEndpoint/yaml/sqs/data.js +237 -0
- package/src/TemplateData/perActionEndpoint/yaml/sqs/request.json +19 -0
- package/src/TemplateData/perActionEndpoint/yaml/sqs/template.ejs +17 -0
- package/src/TemplateData/perActionEndpoint/yaml/wbs/data.js +204 -0
- package/src/TemplateData/perActionEndpoint/yaml/wbs/request.json +19 -0
- package/src/TemplateData/perActionEndpoint/yaml/wbs/template.ejs +29 -0
- package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/data.js +58 -0
- package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/template.ejs +10 -0
- package/src/TemplateData/processLogical/generateTemplateData.js +60 -0
- package/src/TemplateData/processLogical/handler/data.js +50 -0
- package/src/TemplateData/processLogical/handler/template.ejs +127 -0
- package/src/TemplateData/processLogical/mainFunction/data.js +49 -0
- package/src/TemplateData/processLogical/mainFunction/template.ejs +424 -0
- package/src/TemplateData/processLogical/yaml/data.js +172 -0
- package/src/TemplateData/processLogical/yaml/template.ejs +12 -0
- package/src/TemplateData/processLogicalPagination/DsqYaml/data.js +50 -0
- package/src/TemplateData/processLogicalPagination/DsqYaml/template.ejs +32 -0
- package/src/TemplateData/processLogicalPagination/generateTemplateData.js +68 -0
- package/src/TemplateData/processLogicalPagination/handler/dsq/data.js +49 -0
- package/src/TemplateData/processLogicalPagination/handler/dsq/template.ejs +160 -0
- package/src/TemplateData/processLogicalPagination/handler/sqs/data.js +48 -0
- package/src/TemplateData/processLogicalPagination/handler/sqs/template.ejs +143 -0
- package/src/TemplateData/processLogicalPagination/mainFunction/data.js +48 -0
- package/src/TemplateData/processLogicalPagination/mainFunction/template.ejs +210 -0
- package/src/TemplateData/processLogicalPagination/yaml/dsq/data.js +162 -0
- package/src/TemplateData/processLogicalPagination/yaml/dsq/template.ejs +12 -0
- package/src/TemplateData/processLogicalPagination/yaml/sqs/data.js +171 -0
- package/src/TemplateData/processLogicalPagination/yaml/sqs/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/data.js +146 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +161 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/data.js +146 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/data.js +146 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/data.js +147 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/template.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/template.ejs +202 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/template.ejs +144 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/template.ejs +77 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +153 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +197 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +141 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/data.js +59 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +377 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/data.js +73 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +116 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +150 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +175 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +201 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +176 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +175 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +177 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/template.ejs +57 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/data.js +71 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/template.ejs +184 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/template.ejs +75 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +137 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +179 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +123 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +57 -0
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +443 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +74 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +117 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +151 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +178 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +201 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +176 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +178 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +176 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/template.ejs +139 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/template.ejs +182 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/template.ejs +124 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/template.ejs +162 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +139 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +182 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +124 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +162 -0
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +61 -0
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +365 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +74 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +115 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +143 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/generateTemplateData.js +547 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +168 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +202 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +177 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +167 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +166 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/template.ejs +138 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/template.ejs +185 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/template.ejs +127 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/template.ejs +165 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +137 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +178 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +122 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/data.js +58 -0
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +317 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/data.js +74 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +116 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/data.js +61 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +127 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/data.js +56 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +143 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/data.js +65 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +168 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +71 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +198 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +143 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +182 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +57 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +379 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +73 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +115 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +58 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +155 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +167 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +191 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +196 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +186 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +187 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/template.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/dsqTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/data.js +78 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/request.json +7 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/template.ejs +142 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/data.js +73 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/data.js +79 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/request.json +7 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/template.ejs +188 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/data.js +80 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/request.json +5 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/template.ejs +147 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/data.js +79 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/request.json +7 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/template.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +138 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +180 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +124 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/request.json +1 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +384 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +83 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-out/data.js +68 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-out/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +117 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +128 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/request.json +1 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +145 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/resourceYaml/CreateSourceData.js +79 -0
- package/src/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +145 -0
- package/src/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +111 -0
- package/src/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +165 -0
- package/src/TemplateData/resourceYaml/dynamodb/template.ejs +29 -0
- package/src/TemplateData/resourceYaml/filterGenerateResource/data.js +124 -0
- package/src/TemplateData/resourceYaml/generateTemplateData.js +146 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +91 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/request.json +4 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +84 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/resourceYaml/sns-out/data.js +78 -0
- package/src/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +64 -0
- package/src/TemplateData/resourceYaml/sns-out/request.json +3 -0
- package/src/TemplateData/resourceYaml/sns-out/template.ejs +10 -0
- package/src/libs/Consts.js +432 -0
- package/src/libs/GenerateCodeLibs.js +32 -0
- package/src/libs/Libs.js +357 -0
- package/src/libs/Utils.js +140 -0
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2021 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
<<<<<<< HEAD
|
|
19
|
+
|
|
20
|
+
=======
|
|
21
|
+
<<<<<<< HEAD
|
|
22
|
+
>>>>>>> 50cbec7 (Refactor JavaScript files for improved readability and consistency)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
=======
|
|
26
|
+
>>>>>>> 92addbe (Refactor JavaScript files for improved readability and consistency)
|
|
27
|
+
// ──────────────────────── Core Node Modules ────────────────────────
|
|
28
|
+
import lodash from "lodash";
|
|
29
|
+
|
|
30
|
+
// ──────────────────────── Shared Core Libraries ────────────────────────
|
|
31
|
+
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
32
|
+
|
|
33
|
+
// ──────────────────────── Izara Core Libraries ────────────────────────
|
|
34
|
+
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
35
|
+
import snsSharedLib from '@izara_project/izara-core-library-sns';
|
|
36
|
+
import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-flow';
|
|
37
|
+
import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
|
|
38
|
+
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
39
|
+
import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
40
|
+
import identifierLib from '@izara_project/izara-core-library-identifiers';
|
|
41
|
+
const { createRandomIdentifier } = identifierLib
|
|
42
|
+
|
|
43
|
+
// ──────────────────────── Middleware / External ────────────────────────
|
|
44
|
+
import { consts as middlewareConsts } from '@izara_project/izara-middleware';
|
|
45
|
+
import { sns } from '@izara_project/izara-core-library-external-request';
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// ──────────────────────── Service Schemas ────────────────────────
|
|
49
|
+
import { utils } from '@izara_project/izara-core-library-service-schemas';
|
|
50
|
+
const { createObjType } = utils
|
|
51
|
+
import { createNodeLib, uploadUseCase, consts, getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
52
|
+
|
|
53
|
+
// ──────────────────────── Graph Service Libraries ────────────────────────
|
|
54
|
+
import graphSharedLibs from '@izara_project/izara-core-library-graph-service';
|
|
55
|
+
|
|
56
|
+
// ──────────────────────── Market Library Service Schemas ────────────────────────
|
|
57
|
+
import { constsGenerateCodeLibs, generateCodeLibs, mainLibUtils } from '@izara_project/izara-market-library-service-schemas';
|
|
58
|
+
|
|
59
|
+
const {
|
|
60
|
+
TOPIC_NAME_GENERATE_CODE,
|
|
61
|
+
TOPIC_NAME_GRAPH_HANDLER
|
|
62
|
+
} = constsGenerateCodeLibs;
|
|
63
|
+
|
|
64
|
+
const { dynamoDbIdentifiersByStorageResource, createDataDetailsLib } = generateCodeLibs
|
|
65
|
+
|
|
66
|
+
const { firstLetterUpperCase } = mainLibUtils;
|
|
67
|
+
|
|
68
|
+
//(<optionalRequire>)
|
|
69
|
+
//(</optionalRequire>)
|
|
70
|
+
|
|
71
|
+
//-----------------------------------------------------------------------------------------------------------
|
|
72
|
+
const PREFIX = {
|
|
73
|
+
ONE: "one",
|
|
74
|
+
MANY: "many",
|
|
75
|
+
CREATE_OBJECT_ASYNC: "createObjectAsync",
|
|
76
|
+
CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete",
|
|
77
|
+
CREATE_OBJECT_EXTERNAL_TOPIC: "createObjectExternalTopic"
|
|
78
|
+
}
|
|
79
|
+
//-----------------------------------------------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @param {*} _izContext
|
|
84
|
+
* @param {Object} requestParams = {fieldNames,relationships = []}
|
|
85
|
+
* @param {*} callingFlowConfig
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
export default async function createMain(
|
|
89
|
+
_izContext,
|
|
90
|
+
requestParams,
|
|
91
|
+
//(<additionalParams>)
|
|
92
|
+
//(</additionalParams>)
|
|
93
|
+
callingFlowConfig = {}
|
|
94
|
+
) {
|
|
95
|
+
try {
|
|
96
|
+
_izContext.logger.debug("function CreateMain:", {
|
|
97
|
+
requestParams,
|
|
98
|
+
callingFlowConfig
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
let errorsFound = [];
|
|
102
|
+
|
|
103
|
+
const objType = createObjType(requestParams.objectType);
|
|
104
|
+
|
|
105
|
+
let objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
106
|
+
_izContext,
|
|
107
|
+
objType,
|
|
108
|
+
);
|
|
109
|
+
_izContext.logger.debug("objectSchema", objectSchema);
|
|
110
|
+
|
|
111
|
+
let userId;
|
|
112
|
+
let targetId;
|
|
113
|
+
if (objectSchema.generatedBy === "userGenerated") {
|
|
114
|
+
userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
115
|
+
targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID)
|
|
116
|
+
|
|
117
|
+
if (!userId) {
|
|
118
|
+
errorsFound.push("Not have userId")
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
122
|
+
errorsFound.push('not have targetId')
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//(<beforeQuery>)
|
|
127
|
+
//(</beforeQuery>)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
let objectSchemas = uploadUseCase.generateObjectSchemaForCombineFieldNames(
|
|
131
|
+
_izContext,
|
|
132
|
+
objectSchema
|
|
133
|
+
);
|
|
134
|
+
_izContext.logger.debug("objectSchemas", objectSchemas);
|
|
135
|
+
|
|
136
|
+
let parentObject
|
|
137
|
+
if (objectSchemas.hasOwnProperty("extendObjType")) {
|
|
138
|
+
parentObject = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, objectSchema.extendObjType)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
let userAgent = false;
|
|
142
|
+
let directInvoke = false;
|
|
143
|
+
if (_izContext.correlationIds.get(middlewareConsts.USER_AGENT)) {
|
|
144
|
+
userAgent = true;
|
|
145
|
+
} else if (requestParams.hasOwnProperty("__context__") && requestParams.izEventSource.eventSourceTag === "DirectInvoke") {
|
|
146
|
+
directInvoke = true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let createDataDetails = await createDataDetailsLib(
|
|
150
|
+
_izContext,
|
|
151
|
+
objectSchemas,
|
|
152
|
+
);
|
|
153
|
+
_izContext.logger.debug("createDataDetails is =", createDataDetails);
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
if ((requestParams.hasOwnProperty("relationships")) && (requestParams.relationships.length > 0)) {
|
|
157
|
+
//(<beforeValidateRelationships>)
|
|
158
|
+
//(</beforeValidateRelationships>)
|
|
159
|
+
}
|
|
160
|
+
errorsFound.push(
|
|
161
|
+
...await createNodeLib.validateRequiredOnCreateLinks(
|
|
162
|
+
_izContext,
|
|
163
|
+
objType,
|
|
164
|
+
requestParams.relationships,
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
_izContext.logger.debug("errorsFound", errorsFound)
|
|
168
|
+
|
|
169
|
+
// end validate
|
|
170
|
+
let objInstanceFull = {
|
|
171
|
+
identifiers: {},
|
|
172
|
+
fields: {}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
//(<optionalObjInstanceFull>)
|
|
176
|
+
//(</optionalObjInstanceFull>)
|
|
177
|
+
|
|
178
|
+
let listOfRequiredOnCreate = [];
|
|
179
|
+
let listOfOptionalOnCreate = [];
|
|
180
|
+
|
|
181
|
+
let allAwaitingStepsId = [];
|
|
182
|
+
|
|
183
|
+
// validate single identifiers
|
|
184
|
+
if (objectSchemas.identifiers.length === 1 && !objectSchemas.identifiers[0].hasOwnProperty("fieldNames")) {
|
|
185
|
+
|
|
186
|
+
const identifier = objectSchemas.identifiers[0];
|
|
187
|
+
_izContext.logger.debug(":::::case single identifier:::::", identifier);
|
|
188
|
+
|
|
189
|
+
if (objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("randomOnCreate") && (objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == true)) {
|
|
190
|
+
Object.assign(
|
|
191
|
+
requestParams.fieldNames, {
|
|
192
|
+
[identifier.fieldName]: await createRandomIdentifier(
|
|
193
|
+
_izContext,
|
|
194
|
+
objType
|
|
195
|
+
)
|
|
196
|
+
});
|
|
197
|
+
_izContext.logger.debug("Assign requestParams", requestParams)
|
|
198
|
+
} else if (objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("hashOnCreate")) {
|
|
199
|
+
let hashFieldName = {}
|
|
200
|
+
if (objectSchemas.fieldNames[identifier.fieldName].hashOnCreate.length &&
|
|
201
|
+
objectSchemas.fieldNames[identifier.fieldName].hashOnCreate.length > 0) {
|
|
202
|
+
for (const fieldName of objectSchemas.fieldNames[identifier.fieldName].hashOnCreate) {
|
|
203
|
+
Object.assign(hashFieldName, {
|
|
204
|
+
[fieldName]: requestParams.fieldNames[fieldName]
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
Object.assign(
|
|
209
|
+
requestParams.fieldNames, {
|
|
210
|
+
[identifier.fieldName]: hash(hashFieldName)
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
} else {
|
|
215
|
+
errorsFound.push("[invalid] no data to hash for create")
|
|
216
|
+
}
|
|
217
|
+
} else if (objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("optionalOnCreate")) {
|
|
218
|
+
if ((objectSchemas.fieldNames[identifier.fieldName].optionalOnCreate == true)) {
|
|
219
|
+
//(<createOptionalOnCreateIdentifiers>)
|
|
220
|
+
let optionalOnCreateIdentifiers
|
|
221
|
+
//(</createOptionalOnCreateIdentifiers>)
|
|
222
|
+
Object.assign(
|
|
223
|
+
requestParams.fieldNames, {
|
|
224
|
+
[identifier.fieldName]: hash(optionalOnCreateIdentifiers)
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
} else if (objectSchemas.fieldNames[identifier.fieldName].hasOwnProperty("randomOnCreate") && objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == false ||
|
|
229
|
+
objectSchemas.fieldNames[identifier.fieldName].randomOnCreate == null) {
|
|
230
|
+
|
|
231
|
+
if ((objectSchemas.fieldNames[identifier.fieldName].requiredOnCreate == true) &&
|
|
232
|
+
(objectSchemas.fieldNames[identifier.fieldName].canUpdate == false)) {
|
|
233
|
+
// check Fns have receive
|
|
234
|
+
|
|
235
|
+
if (requestParams.fieldNames.hasOwnProperty([identifier.fieldName])) {
|
|
236
|
+
_izContext.logger.debug("identifier is exist:", {
|
|
237
|
+
[identifier.fieldName]: requestParams.fieldNames[identifier.fieldName]
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
} else {
|
|
241
|
+
errorsFound.push("[invalid]requestParams not have data fieldNames of requiredOnCreate");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
} else {
|
|
245
|
+
if ((objectSchemas.fieldNames[identifier.fieldName].requiredOnCreate === false) &&
|
|
246
|
+
(objectSchemas.fieldNames[identifier.fieldName].optionalOnCreate === false) &&
|
|
247
|
+
(objectSchemas.fieldNames[identifier.fieldName].canUpdate === false) &&
|
|
248
|
+
objectSchemas.fieldNames[identifier.fieldName].hashOnCreate === false) {
|
|
249
|
+
errorsFound.push("[invalid]case single identifier invalid objectSchemas");
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
_izContext.logger.debug("requestParams is:", requestParams);
|
|
255
|
+
|
|
256
|
+
// check settingObjSchemas
|
|
257
|
+
for (const [keyFieldNames, valueFieldNames] of Object.entries(objectSchemas.fieldNames)) {
|
|
258
|
+
|
|
259
|
+
if (valueFieldNames.hasOwnProperty("randomOnCreate") && valueFieldNames.randomOnCreate === true) {
|
|
260
|
+
listOfRequiredOnCreate.push(keyFieldNames)
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
if (valueFieldNames.hasOwnProperty("requiredOnCreate") && valueFieldNames.requiredOnCreate === true) {
|
|
264
|
+
listOfRequiredOnCreate.push(keyFieldNames)
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
if (valueFieldNames.hasOwnProperty("hashOnCreate") && valueFieldNames.hashOnCreate.length) {
|
|
268
|
+
listOfRequiredOnCreate.push(keyFieldNames)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (valueFieldNames.hasOwnProperty("optionalOnCreate") && valueFieldNames.optionalOnCreate === true) {
|
|
272
|
+
if ((valueFieldNames.requiredOnCreate === false) && valueFieldNames.optionalOnCreate === true) {
|
|
273
|
+
listOfOptionalOnCreate.push(keyFieldNames)
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
}; // end iteration of fieldNames
|
|
278
|
+
|
|
279
|
+
_izContext.logger.debug("listOfRequiredOnCreate", listOfRequiredOnCreate);
|
|
280
|
+
_izContext.logger.debug("listOfOptionalOnCreate", listOfOptionalOnCreate);
|
|
281
|
+
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
282
|
+
|
|
283
|
+
if (!listOfRequiredOnCreate.includes(fieldName)) {
|
|
284
|
+
if (!listOfOptionalOnCreate.includes(fieldName)) {
|
|
285
|
+
errorsFound.push("[invalid] over fieldNames create object");
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
if (listOfOptionalOnCreate.length > 0 && listOfRequiredOnCreate.includes(fieldName)) {
|
|
290
|
+
//(<optionalParams>)
|
|
291
|
+
//(</optionalParams>)
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
if (objectSchemas.identifierFieldNames.includes(fieldName)) {
|
|
295
|
+
_izContext.logger.debug("identifiers is", fieldName);
|
|
296
|
+
Object.assign(objInstanceFull.identifiers, {
|
|
297
|
+
[fieldName]: requestParams.fieldNames[fieldName]
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
if (errorsFound.length > 0) {
|
|
302
|
+
_izContext.logger.debug("HaveError::", errorsFound);
|
|
303
|
+
break
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
}; // end loop
|
|
307
|
+
|
|
308
|
+
let listOfObjectForCreates = [];
|
|
309
|
+
|
|
310
|
+
let objInstanceFullForDynamoDb = lodash.cloneDeep(objInstanceFull);
|
|
311
|
+
let objInstanceFullForGraph = lodash.cloneDeep(objInstanceFull);
|
|
312
|
+
let objInstanceFullForExternalTopic = lodash.cloneDeep(objInstanceFull);
|
|
313
|
+
|
|
314
|
+
if (errorsFound.length == 0) {
|
|
315
|
+
//(<validateBeforeCreate>)
|
|
316
|
+
//(</validateBeforeCreate>)
|
|
317
|
+
for (let [storageTag, createDataDetail] of Object.entries(createDataDetails)) {
|
|
318
|
+
//(<beforeCreate>)
|
|
319
|
+
//(</beforeCreate>)
|
|
320
|
+
if (createDataDetail.storageType == consts.STORAGE_TYPES.dynamoDB) {
|
|
321
|
+
//(<beforeCreateRecordDynamo>)
|
|
322
|
+
//(</beforeCreateRecordDynamo>)
|
|
323
|
+
_izContext.logger.debug("::::::DynamoDB::::::", { storageTag, objInstanceFull });
|
|
324
|
+
|
|
325
|
+
if (parentObject) {
|
|
326
|
+
if (createDataDetail.tableName.includes(firstLetterUpperCase(`${parentObject.objectType}Records`))) {
|
|
327
|
+
Object.assign(
|
|
328
|
+
objInstanceFullForDynamoDb.fields, {
|
|
329
|
+
[`${parentObject.objectType}HandlerServiceTag`]: process.env.iz_serviceTag
|
|
330
|
+
})
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
Object.assign(objInstanceFullForDynamoDb.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
335
|
+
_izContext.logger.debug("objInstanceFull before create item in dynamoDB", objInstanceFullForDynamoDb)
|
|
336
|
+
|
|
337
|
+
let identifiersForCreateData = await dynamoDbIdentifiersByStorageResource(
|
|
338
|
+
_izContext,
|
|
339
|
+
objectSchema,
|
|
340
|
+
createDataDetails,
|
|
341
|
+
objInstanceFullForDynamoDb.identifiers
|
|
342
|
+
)
|
|
343
|
+
_izContext.logger.debug("identifiersForCreateData", identifiersForCreateData);
|
|
344
|
+
|
|
345
|
+
await dynamodbSharedLib.putItem(
|
|
346
|
+
_izContext,
|
|
347
|
+
await dynamodbSharedLib.tableName(
|
|
348
|
+
_izContext,
|
|
349
|
+
createDataDetail.tableName,
|
|
350
|
+
createDataDetail.serviceTag
|
|
351
|
+
),
|
|
352
|
+
{
|
|
353
|
+
...identifiersForCreateData,
|
|
354
|
+
...objInstanceFullForDynamoDb.fields
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
objInstanceFullForDynamoDb.fields = {} // prevent using fieldNames from other tableName
|
|
359
|
+
|
|
360
|
+
//(<afterCreateRecordDynamo>)
|
|
361
|
+
//(</afterCreateRecordDynamo>)
|
|
362
|
+
} else if (createDataDetail.storageType == consts.STORAGE_TYPES.graph) {
|
|
363
|
+
//(<beforeCreateNode>)
|
|
364
|
+
//(</beforeCreateNode>)
|
|
365
|
+
_izContext.logger.debug("::::::Graph::::::", { storageTag, objInstanceFull });
|
|
366
|
+
|
|
367
|
+
Object.assign(objInstanceFullForGraph.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
368
|
+
_izContext.logger.debug("objInstanceFull before send to Graph", objInstanceFullForGraph)
|
|
369
|
+
|
|
370
|
+
// allStorageTagComplete = false;
|
|
371
|
+
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId(
|
|
372
|
+
(hash({
|
|
373
|
+
objType: objType,
|
|
374
|
+
graphServerTag: storageTag,
|
|
375
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
376
|
+
callingFlowProperties: callingFlowConfig.callingFlowProperties || {}
|
|
377
|
+
})),
|
|
378
|
+
PREFIX.CREATE_OBJECT_ASYNC
|
|
379
|
+
),
|
|
380
|
+
//(<additionalAttributeCreateObjectAsync>)
|
|
381
|
+
//(</additionalAttributeCreateObjectAsync>)
|
|
382
|
+
);
|
|
383
|
+
listOfObjectForCreates.push({
|
|
384
|
+
[storageTag]: {
|
|
385
|
+
objInstanceFull: {
|
|
386
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
387
|
+
fields: objInstanceFullForGraph.fields
|
|
388
|
+
},
|
|
389
|
+
allStorageTagComplete: false
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
_izContext.logger.debug("FIRST", listOfObjectForCreates)
|
|
394
|
+
|
|
395
|
+
} else if (createDataDetail.storageType === consts.STORAGE_TYPES.externalTopic) {
|
|
396
|
+
_izContext.logger.debug("::::::externalTopic::::::", { storageTag, createDataDetail });
|
|
397
|
+
//(<beforeSendMessageToExternalTopic>)
|
|
398
|
+
//(</beforeSendMessageToExternalTopic>)
|
|
399
|
+
Object.assign(objInstanceFullForExternalTopic.fields, createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail))
|
|
400
|
+
_izContext.logger.debug("objInstanceFull before send to external topic", objInstanceFullForExternalTopic)
|
|
401
|
+
|
|
402
|
+
allAwaitingStepsId.push(await asyncFlowSharedLib.createAwaitingStepId(
|
|
403
|
+
(hash({
|
|
404
|
+
objType: objType,
|
|
405
|
+
graphServerTag: storageTag,
|
|
406
|
+
identifiers: objInstanceFullForGraph.identifiers,
|
|
407
|
+
callingFlowProperties: callingFlowConfig.callingFlowProperties || {}
|
|
408
|
+
})),
|
|
409
|
+
PREFIX.CREATE_OBJECT_EXTERNAL_TOPIC
|
|
410
|
+
),
|
|
411
|
+
//(<additionalAttributeCreateExternalObjectAsync>)
|
|
412
|
+
//(</additionalAttributeCreateExternalObjectAsync>)
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
let sendToCreateExternalTopic = {
|
|
416
|
+
Message: JSON.stringify(objInstanceFullForExternalTopic),
|
|
417
|
+
TopicArn: `arn:aws:sns:${createDataDetail.region}:${createDataDetail.accountId}:${createDataDetail.serviceTag}_${createDataDetail.stage}_Create_In`
|
|
418
|
+
};
|
|
419
|
+
_izContext.logger.debug("Request params before send to create endpoint:", sendToCreateExternalTopic);
|
|
420
|
+
|
|
421
|
+
await sns.publishAsync(_izContext, sendToCreateExternalTopic)
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
_izContext.logger.debug("[1]listOfObjectForCreates:::", listOfObjectForCreates);
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
function createObjInstanceFullFieldsByStorageTag(_izContext, storageTag, createDataDetail) {
|
|
428
|
+
let fields = {};
|
|
429
|
+
for (let fieldName of Object.keys(requestParams.fieldNames)) {
|
|
430
|
+
if ((createDataDetails[storageTag].fieldNames.includes(fieldName)) &&
|
|
431
|
+
(createDataDetail.fieldNames.includes(fieldName))) {
|
|
432
|
+
if (!objInstanceFull.identifiers.hasOwnProperty(fieldName)) {
|
|
433
|
+
if (!fields.hasOwnProperty(fieldName)) {
|
|
434
|
+
Object.assign(fields, {
|
|
435
|
+
[fieldName]: requestParams.fieldNames[fieldName]
|
|
436
|
+
})
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return fields
|
|
442
|
+
}
|
|
443
|
+
/// step save awaitingMultipleStep of storageType graph ...........................................................
|
|
444
|
+
if (!userAgent) {
|
|
445
|
+
_izContext.logger.debug("not api will create awaitingStep")
|
|
446
|
+
await asyncFlowSharedLib.createAwaitingMultipleStepsWithAdditionalAttributes(
|
|
447
|
+
_izContext,
|
|
448
|
+
allAwaitingStepsId,
|
|
449
|
+
asyncFlowSharedLib.createPendingStepId((hash({ objType: objType, identifiers: objInstanceFull.identifiers })), PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
//............................................................................................................
|
|
453
|
+
|
|
454
|
+
// process storageType : graph
|
|
455
|
+
let messageObject = {};
|
|
456
|
+
for (let objectCreate of listOfObjectForCreates) {
|
|
457
|
+
|
|
458
|
+
for (let [graphServiceName, objectForCreate] of Object.entries(objectCreate)) {
|
|
459
|
+
_izContext.logger.debug("Loop each graph:", {
|
|
460
|
+
[graphServiceName]: objectForCreate
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
if (objectForCreate.allStorageTagComplete == false) { // needless check because in listOfObjectForCreates push case graph only!
|
|
464
|
+
//(<beforeSendMessageToGraph>)
|
|
465
|
+
//(</beforeSendMessageToGraph>)
|
|
466
|
+
messageObject = {
|
|
467
|
+
objType: objType,
|
|
468
|
+
objInstanceFull: objectForCreate.objInstanceFull,
|
|
469
|
+
relationships: requestParams.relationships || []
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
if (errorsFound.length > 0) {
|
|
474
|
+
break;
|
|
475
|
+
} else {
|
|
476
|
+
_izContext.logger.debug("SENT MESSAGE EACH GRAPH::::", { graphServiceName, messageObject, callingFlowConfig })
|
|
477
|
+
|
|
478
|
+
Object.assign(messageObject, {
|
|
479
|
+
settings: { updatePropertiesOnMatch: false },
|
|
480
|
+
originTimestamp: Date.now(),
|
|
481
|
+
});
|
|
482
|
+
if (userAgent) {
|
|
483
|
+
_izContext.logger.debug("have userAgent will invoke GraphHandler")
|
|
484
|
+
let createNodeResult = await graphSharedLibs.createNodeV2(
|
|
485
|
+
_izContext,
|
|
486
|
+
graphServiceName,
|
|
487
|
+
objType,
|
|
488
|
+
objInstanceFullForGraph,
|
|
489
|
+
requestParams.relationships || [],
|
|
490
|
+
Date.now(),
|
|
491
|
+
{
|
|
492
|
+
updatePropertiesOnMatch: false
|
|
493
|
+
}
|
|
494
|
+
)
|
|
495
|
+
return createNodeResult
|
|
496
|
+
|
|
497
|
+
} else if (directInvoke) {
|
|
498
|
+
_izContext.logger.debug("Direction Invoke case will invoke GraphHandlerInv")
|
|
499
|
+
let createNodeResult = await graphSharedLibs.createNodeV2(
|
|
500
|
+
_izContext,
|
|
501
|
+
graphServiceName,
|
|
502
|
+
objType,
|
|
503
|
+
objInstanceFullForGraph,
|
|
504
|
+
requestParams.relationships,
|
|
505
|
+
Date.now(),
|
|
506
|
+
{
|
|
507
|
+
updatePropertiesOnMatch: false
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
|
|
511
|
+
return createNodeResult;
|
|
512
|
+
} else {
|
|
513
|
+
_izContext.logger.debug("not have userAgent will send Message to GraphHandler")
|
|
514
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
515
|
+
messageObject,
|
|
516
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
517
|
+
callingFlowConfig, // receive parent callingFlowConfig.
|
|
518
|
+
callingFlowSharedLib.createCallingFlowConfig( // calling flow own service
|
|
519
|
+
//(<callingFlowProperties>)
|
|
520
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.createNodeComplete), {}
|
|
521
|
+
//(</callingFlowProperties>)
|
|
522
|
+
)
|
|
523
|
+
)
|
|
524
|
+
);
|
|
525
|
+
|
|
526
|
+
let messageToCreateObject = {
|
|
527
|
+
Message: JSON.stringify(messageObject),
|
|
528
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName)
|
|
529
|
+
};
|
|
530
|
+
_izContext.logger.debug("RequestParams before send to sqs messageToCreateObject ::::::: ", messageToCreateObject);
|
|
531
|
+
await sns.publishAsync(_izContext, messageToCreateObject);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
//(<afterSendMessageToGraph>)
|
|
535
|
+
//(</afterSendMessageToGraph>)
|
|
536
|
+
return {
|
|
537
|
+
objType: objType,
|
|
538
|
+
objInstanceFull: objInstanceFullForGraph,
|
|
539
|
+
relationships: requestParams.relationships || [],
|
|
540
|
+
status: "complete",
|
|
541
|
+
errorsFound: errorsFound
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
}; // end loop of objectCreate.
|
|
545
|
+
if (errorsFound.length > 0) {
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
}; // end loop listOfObjectForCreates
|
|
549
|
+
|
|
550
|
+
if (errorsFound.length > 0) {
|
|
551
|
+
_izContext.logger.debug("Case have errorFound:::", errorsFound);
|
|
552
|
+
|
|
553
|
+
// remove awaitingMultipleStep. [[[[[[[open when not test local.]]]]]]]
|
|
554
|
+
await asyncFlowSharedLib.clearAllAwaitingSteps(
|
|
555
|
+
_izContext,
|
|
556
|
+
asyncFlowSharedLib.createPendingStepId((hash({
|
|
557
|
+
objType: objType,
|
|
558
|
+
identifiers: objInstanceFull.identifiers
|
|
559
|
+
})), PREFIX.CREATE_OBJECT_ASYNC_COMPLETE)); // pendingStepId
|
|
560
|
+
|
|
561
|
+
// send message to OutCreateObjectComplete.
|
|
562
|
+
//..
|
|
563
|
+
messageObject = {
|
|
564
|
+
objType: objType,
|
|
565
|
+
identifiers: null, // or {}
|
|
566
|
+
errorsFound: errorsFound
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
// pass back property.
|
|
570
|
+
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
571
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
572
|
+
|
|
573
|
+
let sendMessageOutCreateObjectComplete = {
|
|
574
|
+
Message: JSON.stringify(messageObject),
|
|
575
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
576
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
577
|
+
};
|
|
578
|
+
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
579
|
+
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
580
|
+
|
|
581
|
+
return {
|
|
582
|
+
objType: objType,
|
|
583
|
+
objInstanceFull: objInstanceFull,
|
|
584
|
+
relationships: requestParams.relationships || [],
|
|
585
|
+
status: "error",
|
|
586
|
+
errorsFound: errorsFound
|
|
587
|
+
}
|
|
588
|
+
} else {
|
|
589
|
+
|
|
590
|
+
if (allAwaitingStepsId.length == 0 && listOfObjectForCreates.length == 0) {
|
|
591
|
+
let messageObject = {
|
|
592
|
+
objType: objType,
|
|
593
|
+
objInstanceFull: {
|
|
594
|
+
identifiers: objInstanceFullForDynamoDb.identifiers,
|
|
595
|
+
fields: objInstanceFullForDynamoDb.fields
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOW_PROPERTYNAME]) {
|
|
600
|
+
// send message to SNS OutCreateNodeComplete
|
|
601
|
+
_izContext.logger.debug("HAVE CallingFlow");
|
|
602
|
+
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
603
|
+
|
|
604
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
605
|
+
let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
606
|
+
let messageParams = {
|
|
607
|
+
Message: JSON.stringify(messageObject),
|
|
608
|
+
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
609
|
+
TopicArn: outCreateNodeCompleteTopic,
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
_izContext.logger.debug("messageParams OutCreateNode ::::::: ", messageParams);
|
|
613
|
+
await sns.publishAsync(_izContext, messageParams);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return {
|
|
617
|
+
objType: objType,
|
|
618
|
+
objInstanceFull: objInstanceFullForDynamoDb,
|
|
619
|
+
relationships: requestParams.relationships || [],
|
|
620
|
+
status: "complete",
|
|
621
|
+
errorsFound: errorsFound
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
} catch (err) {
|
|
625
|
+
throw (err)
|
|
626
|
+
}
|
|
627
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
import consts from '../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../libs/Utils.js';
|
|
25
|
+
const { ACTIONS, SOURCE_PATH } = consts;
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
27
|
+
utils;
|
|
28
|
+
|
|
29
|
+
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
|
+
|
|
31
|
+
function data(_izContext, srcPath) {
|
|
32
|
+
return [createSource(_izContext, srcPath)];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function createSource(_izContext, srcPath) {
|
|
36
|
+
let functionName = upperCase(ACTIONS.delete);
|
|
37
|
+
return {
|
|
38
|
+
templatePath: templatePath,
|
|
39
|
+
templateData: {
|
|
40
|
+
functionName
|
|
41
|
+
},
|
|
42
|
+
setting: {
|
|
43
|
+
savePath: path.join(srcPath, SOURCE_PATH.endpointPerService),
|
|
44
|
+
saveFileName: `${upperCase(functionName)}_Main`,
|
|
45
|
+
fileExtension: '.js',
|
|
46
|
+
isAppend: false
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default data;
|