@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.
Files changed (673) hide show
  1. package/index.js +41 -0
  2. package/package.json +10 -10
  3. package/src/GenerateCode.js +184 -0
  4. package/src/GenerateResources.js +121 -0
  5. package/src/GenerateSchema.js +164 -0
  6. package/src/GenerateTests.js +138 -0
  7. package/src/IntTestConfig.js +23 -0
  8. package/src/SchemaConfig.js +23 -0
  9. package/src/SourceManager/CreateSource.js +226 -0
  10. package/src/TemplateConfig.js +55 -0
  11. package/src/TemplateData/Auth/generateAuthYml/data.js +47 -0
  12. package/src/TemplateData/Auth/generateAuthYml/template.ejs +16 -0
  13. package/src/TemplateData/Auth/generateTemplateData.js +48 -0
  14. package/src/TemplateData/EndpointPerService/generateTemplateData.js +127 -0
  15. package/src/TemplateData/EndpointPerService/handler/api/data.js +72 -0
  16. package/src/TemplateData/EndpointPerService/handler/api/request.json +7 -0
  17. package/src/TemplateData/EndpointPerService/handler/api/template.ejs +73 -0
  18. package/src/TemplateData/EndpointPerService/handler/dsq/data.js +76 -0
  19. package/src/TemplateData/EndpointPerService/handler/dsq/request.json +7 -0
  20. package/src/TemplateData/EndpointPerService/handler/dsq/template.ejs +129 -0
  21. package/src/TemplateData/EndpointPerService/handler/inv/data.js +78 -0
  22. package/src/TemplateData/EndpointPerService/handler/inv/request.json +7 -0
  23. package/src/TemplateData/EndpointPerService/handler/inv/template.ejs +73 -0
  24. package/src/TemplateData/EndpointPerService/handler/sqs/data.js +76 -0
  25. package/src/TemplateData/EndpointPerService/handler/sqs/request.json +7 -0
  26. package/src/TemplateData/EndpointPerService/handler/sqs/template.ejs +131 -0
  27. package/src/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +358 -0
  28. package/src/TemplateData/EndpointPerService/mainFunction/create/data.js +51 -0
  29. package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +627 -0
  30. package/src/TemplateData/EndpointPerService/mainFunction/delete/data.js +51 -0
  31. package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +163 -0
  32. package/src/TemplateData/EndpointPerService/mainFunction/get/data.js +52 -0
  33. package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +273 -0
  34. package/src/TemplateData/EndpointPerService/mainFunction/update/data.js +52 -0
  35. package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +446 -0
  36. package/src/TemplateData/EndpointPerService/yaml/data.js +311 -0
  37. package/src/TemplateData/EndpointPerService/yaml/template.ejs +35 -0
  38. package/src/TemplateData/IntTest/generateResources/generateResources.js +112 -0
  39. package/src/TemplateData/IntTest/generateResources/templateResources.ejs +33 -0
  40. package/src/TemplateData/IntTest/generateTests/events/data.js +135 -0
  41. package/src/TemplateData/IntTest/generateTests/events/templateEvents.ejs +11 -0
  42. package/src/TemplateData/IntTest/generateTests/generateTemplate.js +67 -0
  43. package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +56 -0
  44. package/src/TemplateData/IntTest/generateTests/pathIntTest/template.ejs +5 -0
  45. package/src/TemplateData/IntTest/generateTests/tests/data.js +211 -0
  46. package/src/TemplateData/IntTest/generateTests/tests/templateTests.ejs +3 -0
  47. package/src/TemplateData/IntTest/libs/libs.js +416 -0
  48. package/src/TemplateData/IntTest/upload/uploadIntTest.js +95 -0
  49. package/src/TemplateData/externalService/functionNameConfig/data.js +178 -0
  50. package/src/TemplateData/externalService/functionNameConfig/template.ejs +14 -0
  51. package/src/TemplateData/externalService/functionNameConfig/templateIntTesting.ejs +31 -0
  52. package/src/TemplateData/externalService/functionNameConfig/templateYaml.ejs +10 -0
  53. package/src/TemplateData/externalService/generateTemplateData.js +79 -0
  54. package/src/TemplateData/externalService/lambdaRole/data.js +448 -0
  55. package/src/TemplateData/externalService/lambdaRole/request.json +18 -0
  56. package/src/TemplateData/externalService/lambdaRole/template.ejs +59 -0
  57. package/src/TemplateData/externalService/snsTopicSubscriptions/data.js +271 -0
  58. package/src/TemplateData/externalService/snsTopicSubscriptions/request.json +12 -0
  59. package/src/TemplateData/externalService/snsTopicSubscriptions/template.ejs +35 -0
  60. package/src/TemplateData/findData/GetByStorage/getByDynamo.ejs +54 -0
  61. package/src/TemplateData/findData/GetByStorage/getByGraph.ejs +81 -0
  62. package/src/TemplateData/findData/findDataYaml/data.js +187 -0
  63. package/src/TemplateData/findData/findDataYaml/template.ejs +14 -0
  64. package/src/TemplateData/findData/generateTemplateData.js +69 -0
  65. package/src/TemplateData/findData/handler/data.js +51 -0
  66. package/src/TemplateData/findData/handler/template.ejs +136 -0
  67. package/src/TemplateData/findData/mainFunction/data.js +316 -0
  68. package/src/TemplateData/findData/mainFunction/template.ejs +149 -0
  69. package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +129 -0
  70. package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +20 -0
  71. package/src/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +68 -0
  72. package/src/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +84 -0
  73. package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +71 -0
  74. package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +118 -0
  75. package/src/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +73 -0
  76. package/src/TemplateData/flowSchema/CreateRecordComplete/queue/template.ejs +49 -0
  77. package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +128 -0
  78. package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +17 -0
  79. package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +66 -0
  80. package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +123 -0
  81. package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +58 -0
  82. package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +129 -0
  83. package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +62 -0
  84. package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/template.ejs +45 -0
  85. package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +116 -0
  86. package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/template.ejs +20 -0
  87. package/src/TemplateData/flowSchema/components/upload/createObject/handler/data.js +67 -0
  88. package/src/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +83 -0
  89. package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +67 -0
  90. package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +131 -0
  91. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +118 -0
  92. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +17 -0
  93. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +65 -0
  94. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/template.ejs +99 -0
  95. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +63 -0
  96. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +81 -0
  97. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +69 -0
  98. package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/template.ejs +49 -0
  99. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +138 -0
  100. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/template.ejs +18 -0
  101. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +66 -0
  102. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/template.ejs +123 -0
  103. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +66 -0
  104. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +262 -0
  105. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/data.js +66 -0
  106. package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/template.ejs +45 -0
  107. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +144 -0
  108. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +14 -0
  109. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +66 -0
  110. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +121 -0
  111. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +61 -0
  112. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +172 -0
  113. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +68 -0
  114. package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/template.ejs +53 -0
  115. package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +139 -0
  116. package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/template.ejs +25 -0
  117. package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +52 -0
  118. package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/template.ejs +50 -0
  119. package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +182 -0
  120. package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +51 -0
  121. package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +68 -0
  122. package/src/TemplateData/flowSchema/components/upload/processFile/queue/data.js +77 -0
  123. package/src/TemplateData/flowSchema/components/upload/processFile/queue/dsqTemplatePath.ejs +32 -0
  124. package/src/TemplateData/flowSchema/components/upload/processFile/queue/s3Template.ejs +59 -0
  125. package/src/TemplateData/flowSchema/components/upload/relate/S3/data.js +60 -0
  126. package/src/TemplateData/flowSchema/components/upload/relate/S3/template.ejs +13 -0
  127. package/src/TemplateData/flowSchema/components/upload/relate/libs/data.js +53 -0
  128. package/src/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +97 -0
  129. package/src/TemplateData/flowSchema/components/upload/relate/sns-out/data.js +66 -0
  130. package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +91 -0
  131. package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +17 -0
  132. package/src/TemplateData/flowSchema/components/websocket/connect/handler/data.js +58 -0
  133. package/src/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +72 -0
  134. package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +69 -0
  135. package/src/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +69 -0
  136. package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ttlDynamoTemplate.ejs +32 -0
  137. package/src/TemplateData/flowSchema/components/websocket/dynamoDb/userUploadRecords.js +61 -0
  138. package/src/TemplateData/flowSchema/dynamoDb/data.js +116 -0
  139. package/src/TemplateData/flowSchema/eventBridge/functionYaml/data.js +167 -0
  140. package/src/TemplateData/flowSchema/eventBridge/functionYaml/template.ejs +21 -0
  141. package/src/TemplateData/flowSchema/eventBridge/handler/inv/data.js +69 -0
  142. package/src/TemplateData/flowSchema/eventBridge/handler/inv/request.json +7 -0
  143. package/src/TemplateData/flowSchema/eventBridge/handler/inv/template.ejs +60 -0
  144. package/src/TemplateData/flowSchema/eventBridge/mainFunction/data.js +67 -0
  145. package/src/TemplateData/flowSchema/eventBridge/mainFunction/request.json +5 -0
  146. package/src/TemplateData/flowSchema/eventBridge/mainFunction/template.ejs +59 -0
  147. package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +111 -0
  148. package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/template.ejs +20 -0
  149. package/src/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +93 -0
  150. package/src/TemplateData/flowSchema/externalTopic/Complete/handler/template.ejs +81 -0
  151. package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +68 -0
  152. package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +58 -0
  153. package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/data.js +156 -0
  154. package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/template.ejs +20 -0
  155. package/src/TemplateData/flowSchema/externalTopic/Process/handler/data.js +65 -0
  156. package/src/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +101 -0
  157. package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +77 -0
  158. package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/template.ejs +47 -0
  159. package/src/TemplateData/flowSchema/externalTopic/sns-out/data.js +72 -0
  160. package/src/TemplateData/flowSchema/flowSchemaMainFunction/data.js +120 -0
  161. package/src/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +92 -0
  162. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +111 -0
  163. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +21 -0
  164. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +70 -0
  165. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +81 -0
  166. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +70 -0
  167. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +61 -0
  168. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +145 -0
  169. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +21 -0
  170. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +68 -0
  171. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +87 -0
  172. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +111 -0
  173. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/template.ejs +18 -0
  174. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +65 -0
  175. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +108 -0
  176. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +65 -0
  177. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +106 -0
  178. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +100 -0
  179. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/sqsTemplate.ejs +43 -0
  180. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +74 -0
  181. package/src/TemplateData/flowSchema/flowStep/functionYaml/data.js +152 -0
  182. package/src/TemplateData/flowSchema/flowStep/functionYaml/template.ejs +20 -0
  183. package/src/TemplateData/flowSchema/flowStep/handler/data.js +102 -0
  184. package/src/TemplateData/flowSchema/flowStep/handler/template.ejs +89 -0
  185. package/src/TemplateData/flowSchema/flowStep/mainFunction/data.js +100 -0
  186. package/src/TemplateData/flowSchema/flowStep/mainFunction/template.ejs +58 -0
  187. package/src/TemplateData/flowSchema/flowStep/sns-in/data.js +98 -0
  188. package/src/TemplateData/flowSchema/flowStep/sns-in/template.ejs +59 -0
  189. package/src/TemplateData/flowSchema/generateTemplateData.js +808 -0
  190. package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/data.js +85 -0
  191. package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/template.ejs +28 -0
  192. package/src/TemplateData/flowSchema/lambdaSync/Api/handler/data.js +67 -0
  193. package/src/TemplateData/flowSchema/lambdaSync/Api/handler/template.ejs +86 -0
  194. package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/data.js +74 -0
  195. package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/template.ejs +13 -0
  196. package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/data.js +64 -0
  197. package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/template.ejs +52 -0
  198. package/src/TemplateData/flowSchema/register/complete/functionYaml/data.js +113 -0
  199. package/src/TemplateData/flowSchema/register/complete/functionYaml/template.ejs +22 -0
  200. package/src/TemplateData/flowSchema/register/complete/handler/data.js +58 -0
  201. package/src/TemplateData/flowSchema/register/complete/handler/template.ejs +85 -0
  202. package/src/TemplateData/flowSchema/register/complete/mainFunction/data.js +62 -0
  203. package/src/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +176 -0
  204. package/src/TemplateData/flowSchema/register/dynamoDB/register.js +73 -0
  205. package/src/TemplateData/flowSchema/register/sns-in/data.js +58 -0
  206. package/src/TemplateData/flowSchema/register/sns-in/template.ejs +45 -0
  207. package/src/TemplateData/flowSchema/register/subscriptionOutAll/data.js +82 -0
  208. package/src/TemplateData/flowSchema/register/subscriptionOutAll/template.ejs +13 -0
  209. package/src/TemplateData/flowSchema/register/wbs/functionYaml/data.js +107 -0
  210. package/src/TemplateData/flowSchema/register/wbs/functionYaml/template.ejs +19 -0
  211. package/src/TemplateData/flowSchema/register/wbs/handler/data.js +65 -0
  212. package/src/TemplateData/flowSchema/register/wbs/handler/template.ejs +83 -0
  213. package/src/TemplateData/flowSchema/register/wbs/mainFunction/data.js +56 -0
  214. package/src/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +165 -0
  215. package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/data.js +143 -0
  216. package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/template.ejs +22 -0
  217. package/src/TemplateData/flowSchema/statusFieldComponent/Handler/data.js +73 -0
  218. package/src/TemplateData/flowSchema/statusFieldComponent/Handler/template.ejs +86 -0
  219. package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/data.js +62 -0
  220. package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/template.ejs +80 -0
  221. package/src/TemplateData/flowSchema/statusFieldComponent/sns/data.js +63 -0
  222. package/src/TemplateData/flowSchema/statusFieldComponent/sns/template.ejs +59 -0
  223. package/src/TemplateData/flowSchema/templateByStatusType/statusFieldTemplate.ejs +30 -0
  224. package/src/TemplateData/flowSchema/templateByStatusType/storedCacheTemplate.ejs +26 -0
  225. package/src/TemplateData/flowSchema/templateByStatusType/triggerCacheTemplate.ejs +44 -0
  226. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +135 -0
  227. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/template.ejs +22 -0
  228. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +70 -0
  229. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +89 -0
  230. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +72 -0
  231. package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/template.ejs +85 -0
  232. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +139 -0
  233. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/template.ejs +22 -0
  234. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +73 -0
  235. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +89 -0
  236. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +69 -0
  237. package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +58 -0
  238. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +131 -0
  239. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/template.ejs +21 -0
  240. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +69 -0
  241. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +88 -0
  242. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +69 -0
  243. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/template.ejs +74 -0
  244. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +90 -0
  245. package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/template.ejs +49 -0
  246. package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +137 -0
  247. package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/template.ejs +21 -0
  248. package/src/TemplateData/flowSchema/webSocketComplete/handler/data.js +61 -0
  249. package/src/TemplateData/flowSchema/webSocketComplete/handler/template.ejs +85 -0
  250. package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/data.js +55 -0
  251. package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/template.ejs +134 -0
  252. package/src/TemplateData/flowSchema/webSocketComplete/sqs/data.js +100 -0
  253. package/src/TemplateData/flowSchema/webSocketComplete/sqs/template.ejs +43 -0
  254. package/src/TemplateData/flowSchema/webSocketComplete/sqs/templateSub.ejs +7 -0
  255. package/src/TemplateData/generateRole/createSharedResource.js +469 -0
  256. package/src/TemplateData/generateRole/data.js +92 -0
  257. package/src/TemplateData/generateRole/sharedResourceTemplate.ejs +32 -0
  258. package/src/TemplateData/generateRole/template.ejs +33 -0
  259. package/src/TemplateData/perActionComplete/create/handler/data.js +61 -0
  260. package/src/TemplateData/perActionComplete/create/handler/template.ejs +126 -0
  261. package/src/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +196 -0
  262. package/src/TemplateData/perActionComplete/create/mainFunction/data.js +53 -0
  263. package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +187 -0
  264. package/src/TemplateData/perActionComplete/create/sns-in-sqs/data.js +62 -0
  265. package/src/TemplateData/perActionComplete/create/sns-in-sqs/template.ejs +47 -0
  266. package/src/TemplateData/perActionComplete/create/sns-out/data.js +67 -0
  267. package/src/TemplateData/perActionComplete/create/sns-out/template.ejs +10 -0
  268. package/src/TemplateData/perActionComplete/create/yaml/data.js +106 -0
  269. package/src/TemplateData/perActionComplete/create/yaml/template.ejs +21 -0
  270. package/src/TemplateData/perActionComplete/delete/handler/data.js +61 -0
  271. package/src/TemplateData/perActionComplete/delete/handler/template.ejs +125 -0
  272. package/src/TemplateData/perActionComplete/delete/mainFunction/data.js +53 -0
  273. package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +88 -0
  274. package/src/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +62 -0
  275. package/src/TemplateData/perActionComplete/delete/sns-in-sqs/template.ejs +47 -0
  276. package/src/TemplateData/perActionComplete/delete/sns-out/data.js +67 -0
  277. package/src/TemplateData/perActionComplete/delete/yaml/data.js +104 -0
  278. package/src/TemplateData/perActionComplete/delete/yaml/template.ejs +20 -0
  279. package/src/TemplateData/perActionComplete/generateTemplateData.js +162 -0
  280. package/src/TemplateData/perActionComplete/get/handler/data.js +61 -0
  281. package/src/TemplateData/perActionComplete/get/handler/template.ejs +125 -0
  282. package/src/TemplateData/perActionComplete/get/mainFunction/data.js +54 -0
  283. package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +131 -0
  284. package/src/TemplateData/perActionComplete/get/sns-in-sqs/data.js +62 -0
  285. package/src/TemplateData/perActionComplete/get/sns-in-sqs/template.ejs +47 -0
  286. package/src/TemplateData/perActionComplete/get/sns-out/data.js +67 -0
  287. package/src/TemplateData/perActionComplete/get/yaml/data.js +106 -0
  288. package/src/TemplateData/perActionComplete/get/yaml/template.ejs +21 -0
  289. package/src/TemplateData/perActionComplete/update/handler/data.js +61 -0
  290. package/src/TemplateData/perActionComplete/update/handler/template.ejs +125 -0
  291. package/src/TemplateData/perActionComplete/update/mainFunction/data.js +53 -0
  292. package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +133 -0
  293. package/src/TemplateData/perActionComplete/update/sns-in-sqs/data.js +62 -0
  294. package/src/TemplateData/perActionComplete/update/sns-in-sqs/template.ejs +47 -0
  295. package/src/TemplateData/perActionComplete/update/sns-out/data.js +66 -0
  296. package/src/TemplateData/perActionComplete/update/yaml/data.js +107 -0
  297. package/src/TemplateData/perActionComplete/update/yaml/template.ejs +20 -0
  298. package/src/TemplateData/perActionEndpoint/generateTemplateData.js +112 -0
  299. package/src/TemplateData/perActionEndpoint/handler/api/data.js +109 -0
  300. package/src/TemplateData/perActionEndpoint/handler/api/request.json +7 -0
  301. package/src/TemplateData/perActionEndpoint/handler/api/template.ejs +36 -0
  302. package/src/TemplateData/perActionEndpoint/handler/dsq/data.js +118 -0
  303. package/src/TemplateData/perActionEndpoint/handler/dsq/request.json +7 -0
  304. package/src/TemplateData/perActionEndpoint/handler/dsq/template.ejs +55 -0
  305. package/src/TemplateData/perActionEndpoint/handler/inv/data.js +112 -0
  306. package/src/TemplateData/perActionEndpoint/handler/inv/request.json +7 -0
  307. package/src/TemplateData/perActionEndpoint/handler/inv/template.ejs +37 -0
  308. package/src/TemplateData/perActionEndpoint/handler/sqs/data.js +116 -0
  309. package/src/TemplateData/perActionEndpoint/handler/sqs/request.json +7 -0
  310. package/src/TemplateData/perActionEndpoint/handler/sqs/template.ejs +57 -0
  311. package/src/TemplateData/perActionEndpoint/handler/webSocket/data.js +94 -0
  312. package/src/TemplateData/perActionEndpoint/handler/webSocket/template.ejs +61 -0
  313. package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/data.js +54 -0
  314. package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/template.ejs +55 -0
  315. package/src/TemplateData/perActionEndpoint/libs/data.js +60 -0
  316. package/src/TemplateData/perActionEndpoint/libs/template.ejs +46 -0
  317. package/src/TemplateData/perActionEndpoint/mainFunction/create/data.js +91 -0
  318. package/src/TemplateData/perActionEndpoint/mainFunction/create/request.json +0 -0
  319. package/src/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +339 -0
  320. package/src/TemplateData/perActionEndpoint/mainFunction/delete/data.js +91 -0
  321. package/src/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +99 -0
  322. package/src/TemplateData/perActionEndpoint/mainFunction/get/data.js +92 -0
  323. package/src/TemplateData/perActionEndpoint/mainFunction/get/request.json +5 -0
  324. package/src/TemplateData/perActionEndpoint/mainFunction/get/template.ejs +116 -0
  325. package/src/TemplateData/perActionEndpoint/mainFunction/get/testParam.json +5 -0
  326. package/src/TemplateData/perActionEndpoint/mainFunction/update/data.js +85 -0
  327. package/src/TemplateData/perActionEndpoint/mainFunction/update/request.json +0 -0
  328. package/src/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +166 -0
  329. package/src/TemplateData/perActionEndpoint/yaml/api/data.js +229 -0
  330. package/src/TemplateData/perActionEndpoint/yaml/api/request.json +14 -0
  331. package/src/TemplateData/perActionEndpoint/yaml/api/template.ejs +20 -0
  332. package/src/TemplateData/perActionEndpoint/yaml/dsq/data.js +234 -0
  333. package/src/TemplateData/perActionEndpoint/yaml/dsq/request.json +19 -0
  334. package/src/TemplateData/perActionEndpoint/yaml/dsq/template.ejs +17 -0
  335. package/src/TemplateData/perActionEndpoint/yaml/inv/data.js +207 -0
  336. package/src/TemplateData/perActionEndpoint/yaml/inv/example req.js +15 -0
  337. package/src/TemplateData/perActionEndpoint/yaml/inv/request.json +14 -0
  338. package/src/TemplateData/perActionEndpoint/yaml/inv/template.ejs +13 -0
  339. package/src/TemplateData/perActionEndpoint/yaml/sqs/data.js +237 -0
  340. package/src/TemplateData/perActionEndpoint/yaml/sqs/request.json +19 -0
  341. package/src/TemplateData/perActionEndpoint/yaml/sqs/template.ejs +17 -0
  342. package/src/TemplateData/perActionEndpoint/yaml/wbs/data.js +204 -0
  343. package/src/TemplateData/perActionEndpoint/yaml/wbs/request.json +19 -0
  344. package/src/TemplateData/perActionEndpoint/yaml/wbs/template.ejs +29 -0
  345. package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/data.js +58 -0
  346. package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/template.ejs +10 -0
  347. package/src/TemplateData/processLogical/generateTemplateData.js +60 -0
  348. package/src/TemplateData/processLogical/handler/data.js +50 -0
  349. package/src/TemplateData/processLogical/handler/template.ejs +127 -0
  350. package/src/TemplateData/processLogical/mainFunction/data.js +49 -0
  351. package/src/TemplateData/processLogical/mainFunction/template.ejs +424 -0
  352. package/src/TemplateData/processLogical/yaml/data.js +172 -0
  353. package/src/TemplateData/processLogical/yaml/template.ejs +12 -0
  354. package/src/TemplateData/processLogicalPagination/DsqYaml/data.js +50 -0
  355. package/src/TemplateData/processLogicalPagination/DsqYaml/template.ejs +32 -0
  356. package/src/TemplateData/processLogicalPagination/generateTemplateData.js +68 -0
  357. package/src/TemplateData/processLogicalPagination/handler/dsq/data.js +49 -0
  358. package/src/TemplateData/processLogicalPagination/handler/dsq/template.ejs +160 -0
  359. package/src/TemplateData/processLogicalPagination/handler/sqs/data.js +48 -0
  360. package/src/TemplateData/processLogicalPagination/handler/sqs/template.ejs +143 -0
  361. package/src/TemplateData/processLogicalPagination/mainFunction/data.js +48 -0
  362. package/src/TemplateData/processLogicalPagination/mainFunction/template.ejs +210 -0
  363. package/src/TemplateData/processLogicalPagination/yaml/dsq/data.js +162 -0
  364. package/src/TemplateData/processLogicalPagination/yaml/dsq/template.ejs +12 -0
  365. package/src/TemplateData/processLogicalPagination/yaml/sqs/data.js +171 -0
  366. package/src/TemplateData/processLogicalPagination/yaml/sqs/template.ejs +13 -0
  367. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/data.js +146 -0
  368. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/template.ejs +20 -0
  369. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +161 -0
  370. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/data.js +146 -0
  371. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/template.ejs +17 -0
  372. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/data.js +146 -0
  373. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/template.ejs +13 -0
  374. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/data.js +147 -0
  375. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/template.ejs +17 -0
  376. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/template.ejs +9 -0
  377. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
  378. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
  379. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  380. package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
  381. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/data.js +62 -0
  382. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/template.ejs +59 -0
  383. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +72 -0
  384. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/data.js +63 -0
  385. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/template.ejs +202 -0
  386. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/data.js +64 -0
  387. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/template.ejs +144 -0
  388. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/data.js +64 -0
  389. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/template.ejs +77 -0
  390. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/template.ejs +9 -0
  391. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +153 -0
  392. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +197 -0
  393. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +141 -0
  394. package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
  395. package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/data.js +59 -0
  396. package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +377 -0
  397. package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/data.js +73 -0
  398. package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
  399. package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  400. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +116 -0
  401. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/template.ejs +20 -0
  402. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/data.js +60 -0
  403. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +126 -0
  404. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/data.js +55 -0
  405. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +150 -0
  406. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/data.js +63 -0
  407. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/template.ejs +46 -0
  408. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/data.js +63 -0
  409. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/template.ejs +10 -0
  410. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +175 -0
  411. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/template.ejs +20 -0
  412. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +201 -0
  413. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +176 -0
  414. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/template.ejs +17 -0
  415. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +175 -0
  416. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/template.ejs +13 -0
  417. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +177 -0
  418. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/template.ejs +17 -0
  419. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/template.ejs +9 -0
  420. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
  421. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
  422. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  423. package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
  424. package/src/TemplateData/relationshipPerAction/create/action/handler/api/data.js +62 -0
  425. package/src/TemplateData/relationshipPerAction/create/action/handler/api/request.json +0 -0
  426. package/src/TemplateData/relationshipPerAction/create/action/handler/api/template.ejs +57 -0
  427. package/src/TemplateData/relationshipPerAction/create/action/handler/data.js +71 -0
  428. package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/data.js +63 -0
  429. package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/request.json +0 -0
  430. package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/template.ejs +184 -0
  431. package/src/TemplateData/relationshipPerAction/create/action/handler/inv/data.js +64 -0
  432. package/src/TemplateData/relationshipPerAction/create/action/handler/inv/request.json +0 -0
  433. package/src/TemplateData/relationshipPerAction/create/action/handler/inv/template.ejs +126 -0
  434. package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/data.js +64 -0
  435. package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/request.json +0 -0
  436. package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/template.ejs +75 -0
  437. package/src/TemplateData/relationshipPerAction/create/action/handler/template.ejs +9 -0
  438. package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +137 -0
  439. package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +179 -0
  440. package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +123 -0
  441. package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
  442. package/src/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +57 -0
  443. package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +443 -0
  444. package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +74 -0
  445. package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/snsTemplate.ejs +59 -0
  446. package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  447. package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +117 -0
  448. package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/request.json +0 -0
  449. package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +20 -0
  450. package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +60 -0
  451. package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/request.json +0 -0
  452. package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +126 -0
  453. package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +55 -0
  454. package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/request.json +0 -0
  455. package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +151 -0
  456. package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +62 -0
  457. package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/request.json +0 -0
  458. package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/template.ejs +46 -0
  459. package/src/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +63 -0
  460. package/src/TemplateData/relationshipPerAction/create/complete/sns-out/request.json +0 -0
  461. package/src/TemplateData/relationshipPerAction/create/complete/sns-out/template.ejs +10 -0
  462. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +178 -0
  463. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/template.ejs +20 -0
  464. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +201 -0
  465. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +176 -0
  466. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/template.ejs +17 -0
  467. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +178 -0
  468. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/template.ejs +13 -0
  469. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +176 -0
  470. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/template.ejs +17 -0
  471. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/template.ejs +9 -0
  472. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
  473. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
  474. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  475. package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
  476. package/src/TemplateData/relationshipPerAction/delete/action/handler/api/data.js +62 -0
  477. package/src/TemplateData/relationshipPerAction/delete/action/handler/api/request.json +0 -0
  478. package/src/TemplateData/relationshipPerAction/delete/action/handler/api/template.ejs +139 -0
  479. package/src/TemplateData/relationshipPerAction/delete/action/handler/data.js +72 -0
  480. package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/data.js +63 -0
  481. package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/request.json +0 -0
  482. package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/template.ejs +182 -0
  483. package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/data.js +64 -0
  484. package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/request.json +0 -0
  485. package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/template.ejs +124 -0
  486. package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/data.js +64 -0
  487. package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/request.json +0 -0
  488. package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/template.ejs +162 -0
  489. package/src/TemplateData/relationshipPerAction/delete/action/handler/template.ejs +9 -0
  490. package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +139 -0
  491. package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +182 -0
  492. package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +124 -0
  493. package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +162 -0
  494. package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +61 -0
  495. package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +365 -0
  496. package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +74 -0
  497. package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/snsTemplate.ejs +59 -0
  498. package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  499. package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +115 -0
  500. package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/request.json +0 -0
  501. package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +20 -0
  502. package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +60 -0
  503. package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/request.json +0 -0
  504. package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +126 -0
  505. package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +55 -0
  506. package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/request.json +0 -0
  507. package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +143 -0
  508. package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +64 -0
  509. package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/request.json +0 -0
  510. package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/template.ejs +47 -0
  511. package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +64 -0
  512. package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/request.json +0 -0
  513. package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/template.ejs +10 -0
  514. package/src/TemplateData/relationshipPerAction/generateTemplateData.js +547 -0
  515. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +168 -0
  516. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/template.ejs +20 -0
  517. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +202 -0
  518. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +177 -0
  519. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/template.ejs +17 -0
  520. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +167 -0
  521. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/template.ejs +13 -0
  522. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +166 -0
  523. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/template.ejs +17 -0
  524. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/template.ejs +9 -0
  525. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
  526. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
  527. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  528. package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
  529. package/src/TemplateData/relationshipPerAction/get/action/handler/api/data.js +62 -0
  530. package/src/TemplateData/relationshipPerAction/get/action/handler/api/request.json +0 -0
  531. package/src/TemplateData/relationshipPerAction/get/action/handler/api/template.ejs +138 -0
  532. package/src/TemplateData/relationshipPerAction/get/action/handler/data.js +72 -0
  533. package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/data.js +63 -0
  534. package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/request.json +0 -0
  535. package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/template.ejs +185 -0
  536. package/src/TemplateData/relationshipPerAction/get/action/handler/inv/data.js +64 -0
  537. package/src/TemplateData/relationshipPerAction/get/action/handler/inv/request.json +0 -0
  538. package/src/TemplateData/relationshipPerAction/get/action/handler/inv/template.ejs +127 -0
  539. package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/data.js +64 -0
  540. package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/request.json +0 -0
  541. package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/template.ejs +165 -0
  542. package/src/TemplateData/relationshipPerAction/get/action/handler/template.ejs +9 -0
  543. package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +137 -0
  544. package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +178 -0
  545. package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +122 -0
  546. package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
  547. package/src/TemplateData/relationshipPerAction/get/action/mainFunction/data.js +58 -0
  548. package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +317 -0
  549. package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/data.js +74 -0
  550. package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/snsTemplate.ejs +59 -0
  551. package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  552. package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +116 -0
  553. package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/request.json +0 -0
  554. package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +20 -0
  555. package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/data.js +61 -0
  556. package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/request.json +0 -0
  557. package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +127 -0
  558. package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/data.js +56 -0
  559. package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/request.json +0 -0
  560. package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +143 -0
  561. package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/data.js +64 -0
  562. package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/request.json +0 -0
  563. package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/template.ejs +47 -0
  564. package/src/TemplateData/relationshipPerAction/get/complete/sns-out/data.js +65 -0
  565. package/src/TemplateData/relationshipPerAction/get/complete/sns-out/request.json +0 -0
  566. package/src/TemplateData/relationshipPerAction/get/complete/sns-out/template.ejs +10 -0
  567. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +168 -0
  568. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/template.ejs +9 -0
  569. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
  570. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
  571. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  572. package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
  573. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +71 -0
  574. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/template.ejs +9 -0
  575. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +155 -0
  576. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +198 -0
  577. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +143 -0
  578. package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +182 -0
  579. package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +57 -0
  580. package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +379 -0
  581. package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +73 -0
  582. package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
  583. package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  584. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +115 -0
  585. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/template.ejs +20 -0
  586. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +60 -0
  587. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +126 -0
  588. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +58 -0
  589. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +155 -0
  590. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +64 -0
  591. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/template.ejs +46 -0
  592. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +64 -0
  593. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/template.ejs +10 -0
  594. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +167 -0
  595. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/request.json +0 -0
  596. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/template.ejs +20 -0
  597. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +191 -0
  598. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +196 -0
  599. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/request.json +0 -0
  600. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/template.ejs +17 -0
  601. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +186 -0
  602. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/request.json +0 -0
  603. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/template.ejs +13 -0
  604. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +187 -0
  605. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/request.json +0 -0
  606. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/template.ejs +17 -0
  607. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/template.ejs +9 -0
  608. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
  609. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/dsqTemplate.ejs +18 -0
  610. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
  611. package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
  612. package/src/TemplateData/relationshipPerAction/update/action/handler/api/data.js +78 -0
  613. package/src/TemplateData/relationshipPerAction/update/action/handler/api/request.json +7 -0
  614. package/src/TemplateData/relationshipPerAction/update/action/handler/api/template.ejs +142 -0
  615. package/src/TemplateData/relationshipPerAction/update/action/handler/data.js +73 -0
  616. package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/data.js +79 -0
  617. package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/request.json +7 -0
  618. package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/template.ejs +188 -0
  619. package/src/TemplateData/relationshipPerAction/update/action/handler/inv/data.js +80 -0
  620. package/src/TemplateData/relationshipPerAction/update/action/handler/inv/request.json +5 -0
  621. package/src/TemplateData/relationshipPerAction/update/action/handler/inv/template.ejs +147 -0
  622. package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/data.js +79 -0
  623. package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/request.json +7 -0
  624. package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/template.ejs +163 -0
  625. package/src/TemplateData/relationshipPerAction/update/action/handler/template.ejs +9 -0
  626. package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +138 -0
  627. package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +180 -0
  628. package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +124 -0
  629. package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
  630. package/src/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +60 -0
  631. package/src/TemplateData/relationshipPerAction/update/action/mainFunction/request.json +1 -0
  632. package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +384 -0
  633. package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +83 -0
  634. package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/request.json +3 -0
  635. package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/snsTemplate.ejs +59 -0
  636. package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  637. package/src/TemplateData/relationshipPerAction/update/action/sns-out/data.js +68 -0
  638. package/src/TemplateData/relationshipPerAction/update/action/sns-out/request.json +3 -0
  639. package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +117 -0
  640. package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/request.json +3 -0
  641. package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +21 -0
  642. package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +60 -0
  643. package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/request.json +0 -0
  644. package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +128 -0
  645. package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +55 -0
  646. package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/request.json +1 -0
  647. package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +145 -0
  648. package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +63 -0
  649. package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/request.json +3 -0
  650. package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/template.ejs +46 -0
  651. package/src/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +62 -0
  652. package/src/TemplateData/relationshipPerAction/update/complete/sns-out/request.json +3 -0
  653. package/src/TemplateData/relationshipPerAction/update/complete/sns-out/template.ejs +10 -0
  654. package/src/TemplateData/resourceYaml/CreateSourceData.js +79 -0
  655. package/src/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +145 -0
  656. package/src/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +111 -0
  657. package/src/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +165 -0
  658. package/src/TemplateData/resourceYaml/dynamodb/template.ejs +29 -0
  659. package/src/TemplateData/resourceYaml/filterGenerateResource/data.js +124 -0
  660. package/src/TemplateData/resourceYaml/generateTemplateData.js +146 -0
  661. package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +91 -0
  662. package/src/TemplateData/resourceYaml/sns-in-sqs/request.json +4 -0
  663. package/src/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +84 -0
  664. package/src/TemplateData/resourceYaml/sns-in-sqs/snsTemplate.ejs +59 -0
  665. package/src/TemplateData/resourceYaml/sns-in-sqs/sqsTemplate.ejs +43 -0
  666. package/src/TemplateData/resourceYaml/sns-out/data.js +78 -0
  667. package/src/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +64 -0
  668. package/src/TemplateData/resourceYaml/sns-out/request.json +3 -0
  669. package/src/TemplateData/resourceYaml/sns-out/template.ejs +10 -0
  670. package/src/libs/Consts.js +432 -0
  671. package/src/libs/GenerateCodeLibs.js +32 -0
  672. package/src/libs/Libs.js +357 -0
  673. package/src/libs/Utils.js +140 -0
@@ -0,0 +1,36 @@
1
+ /* Copyright (C) 2020 Sven Mason <http://izara.io> This program is free
2
+ software: you can redistribute it and/or modify it under the terms of the GNU
3
+ Affero General Public License as published by the Free Software Foundation,
4
+ either version 3 of the License, or (at your option) any later version. This
5
+ program is distributed in the hope that it will be useful, but WITHOUT ANY
6
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
7
+ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
8
+ You should have received a copy of the GNU Affero General Public License along
9
+ with this program. If not, see <http://www.gnu.org/licenses/>. */
10
+ const izara = require("@izara_project/izara-middleware"); const middleware =
11
+ izara.middlewareHandler; const callingFlowSharedLib =
12
+ require('@izara_project/izara-core-library-calling-flow'); const {
13
+ validateSchemaMiddleware } =
14
+ require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js');
15
+ <%_ if (isCreateMainFunction == true) { _%> // user generate main function <%_ }
16
+ else { %> const <%- functionName %> =require('./<%-
17
+ firstLetterUpperCase(objectType) %><%- firstLetterUpperCase(action) %>_Main')
18
+ <%_ } _%> //(<globalVariable> //</globalVariable>) //validate event params in
19
+ middleware before into main function validateSchemaMiddleware( middleware, "<%-
20
+ (objectType) %>", "<%- action %>" //(<validateSchemaSetting>
21
+ //</validateSchemaSetting
22
+ >) ) // if need to validate authorizer or additional params , add code to hook
23
+ tag below //(<afterValidateWith>) //(</afterValidateWith>) module.exports.main =
24
+ middleware.wrap(async (event, context, callback) => {
25
+ event._izContext.logger.debug('Event:', event); try { // invoke LambdaFunction
26
+ let lambdaFunctionResponse = await <%- functionName %>.<%- functionName %>Main(
27
+ event._izContext, //
28
+ correlationId/logger/integrationTestDetail/uniqueRequestId/userId event, ); //
29
+ return error to client if (lambdaFunctionResponse instanceof Error) { return
30
+ (izara.response.failure(lambdaFunctionResponse)); } // return success to client
31
+ return (izara.response.success(lambdaFunctionResponse)); } catch (err) {
32
+ event._izContext.logger.error('Error, <%- functionName %>Main: ', err); return
33
+ (izara.response.failure(err)); } }); <%_ function firstLetterUpperCase(text){
34
+ return text.charAt(0).toUpperCase() + text.slice(1) } _%> <%_ function
35
+ firstLetterLowerCase(str) { return str.charAt(0).toLowerCase() + str.slice(1) }
36
+ _%>
@@ -0,0 +1,118 @@
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
+ const path = require('path');
19
+
20
+ const {
21
+ ACTIONS,
22
+ HANDLER
23
+ } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
24
+
25
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase, firstLetterUpperCase, checkOverWriteGenerateMainFunction } = require("../#utils");
26
+ // const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = require("../#const");
27
+ const {
28
+ firstLetterLowerCase: lowerCase,
29
+ firstLetterUpperCase: upperCase,
30
+ firstLetterUpperCase,
31
+ checkOverWriteGenerateMainFunction
32
+ } = require('../../../../../MainLibs/src/Consts.js').utils;
33
+ const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } =
34
+ require('../../../../../MainLibs/src/Consts.js').consts;
35
+
36
+ const templatePath = path.join(__dirname, 'template.ejs');
37
+
38
+ /**
39
+ * receive objectSchema
40
+ * create data for hdrInv template
41
+ *
42
+ * @param {Object} objectSchema
43
+ * @return {{ templatePath, templateData, setting } }
44
+ */
45
+ function data(_izContext, objectSchema, srcPath) {
46
+ let createSourceArray = [];
47
+
48
+ for (const action of Object.values(ACTIONS)) {
49
+ if (objectSchema.overWriteHandlers?.[action]) {
50
+ // if have overWriteHander of action check hdrInv inside
51
+ if (objectSchema.overWriteHandlers[action].includes(HANDLER.hdrDsq)) {
52
+ const createSourceParamHandlerGet =
53
+ createParamForCreateSourceHandlerGet(
54
+ objectSchema,
55
+ action,
56
+ HANDLER.hdrDsq,
57
+ srcPath
58
+ );
59
+ createSourceParamHandlerGet &&
60
+ createSourceArray.push(createSourceParamHandlerGet);
61
+ }
62
+ } else {
63
+ // if not have overWriteHander of action will use default handler
64
+ const defaultHandler = DEFAULT_HANDLER_PER_ACTION[action];
65
+ if (defaultHandler.includes(HANDLER.hdrDsq)) {
66
+ const createSourceParamHandlerGet =
67
+ createParamForCreateSourceHandlerGet(
68
+ objectSchema,
69
+ action,
70
+ HANDLER.hdrdsq,
71
+ srcPath
72
+ );
73
+ createSourceParamHandlerGet &&
74
+ createSourceArray.push(createSourceParamHandlerGet);
75
+ }
76
+ }
77
+ }
78
+ return createSourceArray;
79
+ }
80
+
81
+ function createParamForCreateSourceHandlerGet(
82
+ objectSchema,
83
+ action,
84
+ handler,
85
+ srcPath
86
+ ) {
87
+ // let objectType = objectSchema.objectType;
88
+ let objectType = objectSchema.objectType;
89
+ let groupBy = objectSchema?.shortNameObjectType
90
+ ? objectSchema.shortNameObjectType
91
+ : objectSchema.objectType;
92
+ let functionName = objectType + upperCase(action);
93
+ let queueName =
94
+ objectType + firstLetterUpperCase(action) + upperCase(handler);
95
+ return {
96
+ templatePath: templatePath,
97
+ templateData: {
98
+ functionName: functionName,
99
+ objectType: objectType,
100
+ roleName: groupBy,
101
+ queueName,
102
+ action,
103
+ isCreateMainFunction: checkOverWriteGenerateMainFunction(
104
+ objectSchema,
105
+ action
106
+ ),
107
+ handler
108
+ },
109
+ setting: {
110
+ savePath: path.join(srcPath, SOURCE_PATH.lambdaPerAction),
111
+ saveFileName: `${upperCase(objectType)}${upperCase(action)}_${upperCase(handler)}`,
112
+ fileExtension: '.js',
113
+ isAppend: false
114
+ }
115
+ };
116
+ }
117
+
118
+ module.exports = data;
@@ -0,0 +1,7 @@
1
+ {
2
+ "objectType": "objectType",
3
+ "action": "get",
4
+ "mainFunction": "xxx",
5
+ "mainFunctionFile": "directoryOfMainFunction",
6
+ "isCreateMainByDev": "boolean"
7
+ }
@@ -0,0 +1,55 @@
1
+ /* Copyright (C) 2020 Sven Mason <http://izara.io> This program is free
2
+ software: you can redistribute it and/or modify it under the terms of the GNU
3
+ Affero General Public License as published by the Free Software Foundation,
4
+ either version 3 of the License, or (at your option) any later version. This
5
+ program is distributed in the hope that it will be useful, but WITHOUT ANY
6
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
7
+ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
8
+ You should have received a copy of the GNU Affero General Public License along
9
+ with this program. If not, see <http://www.gnu.org/licenses/>. */
10
+ const izara = require("@izara_project/izara-middleware"); const middleware =
11
+ izara.middlewareHandler; const callingFlowSharedLib =
12
+ require('@izara_project/izara-core-library-calling-flow'); const Logger =
13
+ require('@izara_project/izara-core-library-logger'); const
14
+ {validateSchemaPerRecord} =
15
+ require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js')
16
+ const recordHandlerSharedLib =
17
+ require('@izara_project/izara-core-library-record-handler'); <%_ if
18
+ (isCreateMainFunction == true) { _%> // user generate main function <%_ } else {
19
+ %> const <%- functionName %> =require('./<%- firstLetterUpperCase(objectType)
20
+ %><%- firstLetterUpperCase(action) %>_Main') <%_ } _%> //(<globalVariable>
21
+ //</globalVariable
22
+ >) //validate event params in middleware before into main function
23
+ middleware.setValidatorSchema( recordHandlerSharedLib.baseValidatorSchema(),
24
+ //(<middlewareSettings>) //(</middlewareSettings>) ) /* const
25
+ perRecordsValidatorSchema = { type: "object", required: [], properties: {}, } */
26
+ //(<globalValidatorSchema>) //(</globalValidatorSchema>) // if need to validate
27
+ authorizer or additional params , add code to hook tag below module.exports.main
28
+ = middleware.wrap(async (event,context, callback) => { try { let recordPromises
29
+ = []; await Promise.all(event.Records.map(async record => {
30
+ record._izContext.logger.debug('record RecieveMsgOutHdrSqs', record); let
31
+ passOnProperties = []; const OBJTYPE = { objectType: "<%- objectType %>",
32
+ serviceTag: process.env.iz_serviceTag } await validateSchemaPerRecord( record,
33
+ "<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handler) %>",
34
+ OBJTYPE, "<%- action %>" //(<validateSchemaSetting>) //(</validateSchemaSetting
35
+ >) ) //for validate additional params /* await
36
+ recordHandlerSharedLib.validateRecord( record, "<%-
37
+ firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handler) %>",
38
+ perRecordsValidatorSchema ); */ //(<afterGenerateValidatorSchema
39
+ >) //(</afterGenerateValidatorSchema
40
+ >) //(<additionalParams>) //(</additionalParams>)
41
+ passOnProperties.push(record.body.Message);
42
+ passOnProperties.push(callingFlowSharedLib.addCallingFlowToPassOnProperties(record.body.Message));
43
+ record._izContext.logger.debug('passOnProperties in handler', passOnProperties);
44
+ let recordPromise = recordHandlerSharedLib.recordHandler( record, <%-
45
+ functionName %>.<%- functionName %>Main, // mainFunction '<%-
46
+ firstLetterUpperCase(queueName) %>', // queueName passOnProperties );
47
+ record._izContext.logger.debug('after record Promise in handler');
48
+ recordPromises.push(recordPromise); })) Logger.debug('before
49
+ Promise.all(recordPromise) in handler'); try { await
50
+ Promise.all(recordPromises); return event.Records } catch {
51
+ Logger.debug('Promise.all(recordPromises) in handler threw error (at least one
52
+ record did no resolve)'); } Logger.debug('after Promise.all(recordPromises) in
53
+ handler'); } catch (err) { Logger.debug('unhandled error <%- functionName %><%-
54
+ handler %>') throw err } } ) <%_ function firstLetterUpperCase(text){ return
55
+ text.charAt(0).toUpperCase() + text.slice(1) } _%>
@@ -0,0 +1,112 @@
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
+ const path = require('path');
19
+
20
+ const {
21
+ ACTIONS,
22
+ HANDLER
23
+ } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
24
+
25
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase, checkOverWriteGenerateMainFunction } = require("../#utils");
26
+ // const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH, FUNCTION_NAME } = require("../../../#const");
27
+ const {
28
+ firstLetterLowerCase: lowerCase,
29
+ firstLetterUpperCase: upperCase,
30
+ checkOverWriteGenerateMainFunction
31
+ } = require('../../../../../MainLibs/src/Consts.js').utils;
32
+ const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH, FUNCTION_NAME } =
33
+ require('../../../../../MainLibs/src/Consts.js').consts;
34
+
35
+ const templatePath = path.join(__dirname, 'template.ejs');
36
+ /**
37
+ * receive objectSchema
38
+ * create data for hdrInv template
39
+ *
40
+ * @param {Object} objectSchema
41
+ * @return {{ templatePath, templateData, setting } }
42
+ */
43
+ function data(_izContext, objectSchema, srcPath) {
44
+ let createSourceArray = [];
45
+
46
+ for (const action of Object.values(ACTIONS)) {
47
+ if (objectSchema.overWriteHandlers?.[action]) {
48
+ // if have overWriteHander of action check hdrInv inside
49
+ if (objectSchema.overWriteHandlers[action].includes(HANDLER.hdrInv)) {
50
+ // create template data
51
+ const createHandlerGet = createParamForCreateHandlerGet(
52
+ objectSchema,
53
+ action,
54
+ HANDLER.hdrInv,
55
+ srcPath
56
+ );
57
+ createHandlerGet && createSourceArray.push(createHandlerGet);
58
+ }
59
+ } else {
60
+ // if not have overWriteHander of action will use default handler
61
+ const defaultHandler = DEFAULT_HANDLER_PER_ACTION[action];
62
+
63
+ if (defaultHandler.includes(HANDLER.hdrInv)) {
64
+ // create template data and object for create source
65
+ const createHandlerGet = createParamForCreateHandlerGet(
66
+ objectSchema,
67
+ action,
68
+ HANDLER.hdrInv,
69
+ srcPath
70
+ );
71
+ createHandlerGet && createSourceArray.push(createHandlerGet);
72
+ }
73
+ }
74
+ }
75
+ // console.log("createSourceArrayInHdrInv", createSourceArray)
76
+ return createSourceArray;
77
+ }
78
+
79
+ function createParamForCreateHandlerGet(
80
+ objectSchema,
81
+ action,
82
+ handler,
83
+ srcPath
84
+ ) {
85
+ // let objectType = objectSchema.objectType;
86
+ let objectType = objectSchema.objectType;
87
+ let groupBy = objectSchema?.shortNameObjectType
88
+ ? objectSchema.shortNameObjectType
89
+ : objectSchema.objectType;
90
+ let functionName = objectType + upperCase(action);
91
+ return {
92
+ templatePath: templatePath,
93
+ templateData: {
94
+ functionName: functionName,
95
+ objectType: objectType,
96
+ roleName: groupBy,
97
+ action: action,
98
+ isCreateMainFunction: checkOverWriteGenerateMainFunction(
99
+ objectSchema,
100
+ action
101
+ )
102
+ },
103
+ setting: {
104
+ savePath: path.join(srcPath, SOURCE_PATH.lambdaPerAction),
105
+ saveFileName: `${upperCase(objectType)}${upperCase(action)}_${upperCase(handler)}`,
106
+ fileExtension: '.js',
107
+ isAppend: false
108
+ }
109
+ };
110
+ }
111
+
112
+ module.exports = data;
@@ -0,0 +1,7 @@
1
+ {
2
+ "objectType": "objectType",
3
+ "action": "get",
4
+ "mainFunction": "xxx",
5
+ "mainFunctionFile": "directoryOfMainFunction",
6
+ "isCreateMainByDev": "boolean"
7
+ }
@@ -0,0 +1,37 @@
1
+ /* Copyright (C) 2020 Sven Mason <http://izara.io> This program is free
2
+ software: you can redistribute it and/or modify it under the terms of the GNU
3
+ Affero General Public License as published by the Free Software Foundation,
4
+ either version 3 of the License, or (at your option) any later version. This
5
+ program is distributed in the hope that it will be useful, but WITHOUT ANY
6
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
7
+ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
8
+ You should have received a copy of the GNU Affero General Public License along
9
+ with this program. If not, see <http://www.gnu.org/licenses/>. */
10
+ const middleware =
11
+ require("@izara_project/izara-middleware/src/MiddlewareCore/MiddlewareHandler");
12
+ const callingFlowSharedLib =
13
+ require('@izara_project/izara-core-library-calling-flow'); const {
14
+ validateSchemaMiddleware } =
15
+ require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js');
16
+ <%_ if (isCreateMainFunction == true) { _%> // user generate main function <%_ }
17
+ else { %> const <%- functionName %> =require('./<%-
18
+ firstLetterUpperCase(objectType) %><%- firstLetterUpperCase(action) %>_Main')
19
+ <%_ } _%> //(<globalVariable> //</globalVariable>) //validate event params in
20
+ middleware before into function validateSchemaMiddleware( middleware, "<%-
21
+ (objectType) %>", // objectType "<%- action %>", // action
22
+ //(<validateSchemaSetting>) //(</validateSchemaSetting>) ) // if need to
23
+ validate authorizer or additional params, add code to hook tag below
24
+ //(<afterValidateWithGenereatedSchema>) //(</afterValidateWithGenereatedSchema>)
25
+ module.exports.main = middleware.wrap(async (event, context, callback) => {
26
+ event._izContext.logger.debug('Event:', event);
27
+ event._izContext.logger.debug('context:', context); try { //(<beforeInvoke
28
+ >) //(</beforeInvoke
29
+ >) // invoke LambdaFunction return await <%- functionName %>.<%- functionName
30
+ %>Main( event._izContext, //
31
+ correlationId/logger/integrationTestDetail/uniqueRequestId event,
32
+ callingFlowSharedLib.addCallingFlowToPassOnProperties(event) ); } catch (err) {
33
+ event._izContext.logger.error('Error, <%- firstLetterUpperCase(objectType) %>:
34
+ ', err); throw (err); } }); <%_ function firstLetterUpperCase(text){ return
35
+ text.charAt(0).toUpperCase() + text.slice(1) } _%> <%_ function
36
+ firstLetterLowerCase(str) { return str.charAt(0).toLowerCase() + str.slice(1) }
37
+ _%>
@@ -0,0 +1,116 @@
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
+ const path = require('path');
19
+
20
+ const {
21
+ ACTIONS,
22
+ HANDLER
23
+ } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
24
+
25
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase, firstLetterUpperCase, checkOverWriteGenerateMainFunction } = require("../#utils");
26
+ // const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = require("../#const");
27
+ const {
28
+ firstLetterLowerCase: lowerCase,
29
+ firstLetterUpperCase: upperCase,
30
+ firstLetterUpperCase,
31
+ checkOverWriteGenerateMainFunction
32
+ } = require('../../../../../MainLibs/src/Consts.js').utils;
33
+ const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } =
34
+ require('../../../../../MainLibs/src/Consts.js').consts;
35
+
36
+ const templatePath = path.join(__dirname, 'template.ejs');
37
+
38
+ /**
39
+ * receive objectSchema
40
+ * create data for hdrInv template
41
+ *
42
+ * @param {Object} objectSchema
43
+ * @return {{ templatePath, templateData, setting } }
44
+ */
45
+ function data(_izContext, objectSchema, srcPath) {
46
+ let createSourceArray = [];
47
+
48
+ for (const action of Object.values(ACTIONS)) {
49
+ if (objectSchema.overWriteHandlers?.[action]) {
50
+ // if have overWriteHander of action check hdrInv inside
51
+ if (objectSchema.overWriteHandlers[action].includes(HANDLER.hdrSqs)) {
52
+ // create template data
53
+ const createSourceParam = createParamForCreateSourceGetHandler(
54
+ objectSchema,
55
+ action,
56
+ HANDLER.hdrSqs,
57
+ srcPath
58
+ );
59
+ createSourceParam && createSourceArray.push(createSourceParam);
60
+ }
61
+ } else {
62
+ // if not have overWriteHander of action will use default handler
63
+ const defaultHandler = DEFAULT_HANDLER_PER_ACTION[action];
64
+ if (defaultHandler.includes(HANDLER.hdrSqs)) {
65
+ // create template data and object for create source
66
+ const createSourceParam = createParamForCreateSourceGetHandler(
67
+ objectSchema,
68
+ action,
69
+ HANDLER.hdrSqs,
70
+ srcPath
71
+ );
72
+ createSourceParam && createSourceArray.push(createSourceParam);
73
+ }
74
+ }
75
+ }
76
+ // console.log("createSourceArray in sqsData :", createSourceArray)
77
+ return createSourceArray;
78
+ }
79
+
80
+ function createParamForCreateSourceGetHandler(
81
+ objectSchema,
82
+ action,
83
+ handler,
84
+ srcPath
85
+ ) {
86
+ // let objectType = objectSchema.objectType;
87
+ let objectType = objectSchema.objectType;
88
+ let groupBy = objectSchema?.shortNameObjectType
89
+ ? objectSchema.shortNameObjectType
90
+ : objectSchema.objectType;
91
+ let functionName = objectType + firstLetterUpperCase(action);
92
+ let queueName = functionName + upperCase(handler);
93
+ return {
94
+ templatePath: templatePath,
95
+ templateData: {
96
+ functionName: functionName,
97
+ objectType: objectType,
98
+ roleName: groupBy,
99
+ queueName,
100
+ action,
101
+ isCreateMainFunction: checkOverWriteGenerateMainFunction(
102
+ objectSchema,
103
+ action
104
+ ),
105
+ handler
106
+ },
107
+ setting: {
108
+ savePath: path.join(srcPath, SOURCE_PATH.lambdaPerAction),
109
+ saveFileName: `${upperCase(objectType)}${upperCase(action)}_${upperCase(handler)}`,
110
+ fileExtension: '.js',
111
+ isAppend: false
112
+ }
113
+ };
114
+ }
115
+
116
+ module.exports = data;
@@ -0,0 +1,7 @@
1
+ {
2
+ "objectType": "objectType",
3
+ "action": "get",
4
+ "mainFunction": "xxx",
5
+ "mainFunctionFile": "directoryOfMainFunction",
6
+ "isCreateMainByDev": "boolean"
7
+ }
@@ -0,0 +1,57 @@
1
+ /* Copyright (C) 2020 Sven Mason <http://izara.io> This program is free
2
+ software: you can redistribute it and/or modify it under the terms of the GNU
3
+ Affero General Public License as published by the Free Software Foundation,
4
+ either version 3 of the License, or (at your option) any later version. This
5
+ program is distributed in the hope that it will be useful, but WITHOUT ANY
6
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
7
+ PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
8
+ You should have received a copy of the GNU Affero General Public License along
9
+ with this program. If not, see <http://www.gnu.org/licenses/>. */
10
+ const izara = require("@izara_project/izara-middleware"); const middleware =
11
+ izara.middlewareHandler; const callingFlowSharedLib =
12
+ require('@izara_project/izara-core-library-calling-flow'); const Logger =
13
+ require('@izara_project/izara-core-library-logger'); const
14
+ {validateSchemaPerRecord} =
15
+ require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs/index.js')
16
+ const recordHandlerSharedLib =
17
+ require('@izara_project/izara-core-library-record-handler'); <%_ if
18
+ (isCreateMainFunction == true) { _%> // user generate main function <%_ } else {
19
+ %> const <%- functionName %> =require('./<%- firstLetterUpperCase(objectType)
20
+ %><%- firstLetterUpperCase(action) %>_Main') <%_ } _%> //(<globalVariable>
21
+ //</globalVariable
22
+ >) //validate event params in middleware before into main function
23
+ middleware.setValidatorSchema( recordHandlerSharedLib.baseValidatorSchema(),
24
+ //(<middlewareSettings>) //(</middlewareSettings>) ) /* const
25
+ perRecordsValidatorSchema = { type: "object", required: [], properties: {}, } */
26
+ //(<globalValidatorSchema>) //(</globalValidatorSchema>) // if need to validate
27
+ authorizer or additional params , add code to hook tag below module.exports.main
28
+ = middleware.wrap(async (event,context, callback) => { try { let recordPromises
29
+ = []; await Promise.all(event.Records.map(async record => {
30
+ record._izContext.logger.debug('record RecieveMsgOutHdrSqs', record); let
31
+ passOnProperties = []; const OBJTYPE = { objectType: "<%- objectType %>",
32
+ serviceTag: process.env.iz_serviceTag } await validateSchemaPerRecord( record,
33
+ "<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handler) %>",
34
+ OBJTYPE, "<%- action %>" //(<validateSchemaSetting>) //(</validateSchemaSetting
35
+ >) ) //for validate additional params /* await
36
+ recordHandlerSharedLib.validateRecord( record, "<%-
37
+ firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handler) %>",
38
+ perRecordsValidatorSchema ); */ //(<afterGenerateValidatorSchema
39
+ >) //(</afterGenerateValidatorSchema
40
+ >) //(<additionalParams>) //(</additionalParams>)
41
+ passOnProperties.push(record.body.Message);
42
+ passOnProperties.push(callingFlowSharedLib.addCallingFlowToPassOnProperties(record.body.Message));
43
+ record._izContext.logger.debug('passOnProperties in handler', passOnProperties);
44
+ let recordPromise = recordHandlerSharedLib.recordHandler( record, <%-
45
+ functionName %>.<%- functionName %>Main, // mainFunction '<%-
46
+ firstLetterUpperCase(queueName) %>', // queueName passOnProperties );
47
+ record._izContext.logger.debug('after record Promise in handler');
48
+ recordPromises.push(recordPromise); })) Logger.debug('before
49
+ Promise.all(recordPromise) in handler'); try { await
50
+ Promise.all(recordPromises); return event.Records } catch {
51
+ Logger.debug('Promise.all(recordPromises) in handler threw error (at least one
52
+ record did no resolve)'); } Logger.debug('after Promise.all(recordPromises) in
53
+ handler'); } catch (err) { Logger.debug('unhandled error <%- functionName %><%-
54
+ handler %>') throw err } } ) <%_ function firstLetterUpperCase(text){ return
55
+ text.charAt(0).toUpperCase() + text.slice(1) } _%> <%_ function
56
+ firstLetterLowerCase(str) { return str.charAt(0).toLowerCase() + str.slice(1) }
57
+ _%>
@@ -0,0 +1,94 @@
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
+ const path = require('path');
19
+
20
+ const {
21
+ ACTIONS,
22
+ HANDLER
23
+ } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
24
+
25
+ const {
26
+ firstLetterLowerCase: lowerCase,
27
+ firstLetterUpperCase: upperCase,
28
+ firstLetterUpperCase,
29
+ checkOverWriteGenerateMainFunction
30
+ } = require('../#utils');
31
+ const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = require('../#const');
32
+
33
+ const templatePath = path.join(__dirname, 'template.ejs');
34
+
35
+ /**
36
+ * receive objectSchema
37
+ * create data for WebScoket handler template
38
+ *
39
+ * @param {Object} objectSchema
40
+ * @return {{templatePath, templateData,setting}}
41
+ */
42
+
43
+ function data(_izContext, objectSchema, srcPath) {
44
+ let createSourceArray = [];
45
+ for (const action of Object.values(ACTIONS)) {
46
+ if (objectSchema.overWriteHandlers?.[action]) {
47
+ if (objectSchema.overWriteHandlers[action].includes(HANDLER.hdrWbs)) {
48
+ const createSourceParams = createParamsForCreateSource(
49
+ objectSchema,
50
+ action,
51
+ HANDLER.hdrWbs,
52
+ srcPath
53
+ );
54
+ createSourceParams && createSourceArray.push(createSourceParams);
55
+ }
56
+ } else {
57
+ if (DEFAULT_HANDLER_PER_ACTION[action].includes(HANDLER.hdrWbs)) {
58
+ const createSourceParams = createParamsForCreateSource(
59
+ objectSchema,
60
+ action,
61
+ HANDLER.hdrWbs,
62
+ srcPath
63
+ );
64
+ createSourceParams && createSourceArray.push(createSourceParams);
65
+ }
66
+ }
67
+ }
68
+ return createSourceArray;
69
+ }
70
+
71
+ function createParamsForCreateSource(objectSchema, action, handler, srcPath) {
72
+ let objectType = objectSchema.objectType;
73
+ let functionName = objectType + upperCase(action);
74
+
75
+ return {
76
+ templatePath: templatePath,
77
+ templateData: {
78
+ functionName,
79
+ objectType,
80
+ action,
81
+ isCreateMainFunction: checkOverWriteGenerateMainFunction(
82
+ objectSchema,
83
+ action
84
+ )
85
+ },
86
+ setting: {
87
+ savePath: path.join(srcPath, SOURCE_PATH.lambdaPerAction),
88
+ saveFileName: `${upperCase(objectType)}${upperCase(action)}_${upperCase(handler)}`,
89
+ fileExtension: '.js',
90
+ isAppend: false
91
+ }
92
+ };
93
+ }
94
+ module.exports = data;