@izara_project/izara-market-library-service-schemas 1.0.22 → 1.0.24

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 (408) hide show
  1. package/index.js +2 -2
  2. package/package.json +6 -6
  3. package/src/GenerateCodeLibs/index.js +1 -0
  4. package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +65 -22
  5. package/src/MainLibs/index.js +2 -1
  6. package/src/MainLibs/src/Consts.js +485 -0
  7. package/src/MainLibs/src/GenerateCodeUtils.js +59 -0
  8. package/src/SourceManager/src/CreateSource.js +11 -1
  9. package/src/TemplateManager/src/FindData/mainFunction/data.js +3 -2
  10. package/src/TemplateManager/src/GenerateCode.js +1 -0
  11. package/src/TemplateManager/src/GenerateSchema.js +20 -5
  12. package/src/TemplateManager/src/ProcessLogical/Handler/data.js +2 -2
  13. package/src/TemplateManager/src/ProcessLogical/ProcessLogicalYaml/data.js +2 -2
  14. package/src/TemplateManager/src/ProcessLogical/mainFunction/data.js +1 -1
  15. package/src/TemplateManager/src/attributeTree/objectSchema/data.js +23 -20
  16. package/src/TemplateManager/src/attributeTree/objectSchema/template.ejs +6 -5
  17. package/src/TemplateManager/src/attributeTree/relationshipSchema/data.js +169 -55
  18. package/src/TemplateManager/src/attributeTree/relationshipSchema/template.ejs +5 -38
  19. package/src/TemplateManager/src/externalService/FunctionNameConfig/data.js +2 -3
  20. package/src/TemplateManager/src/externalService/SnsTopicSubscriotions/data.js +1 -1
  21. package/src/reStructure/GenerateCode.js +151 -0
  22. package/src/reStructure/TemplateConfig.js +31 -0
  23. package/src/reStructure/TemplateData/externalService/functionNameConfig/data.js +162 -0
  24. package/src/reStructure/TemplateData/externalService/functionNameConfig/template.ejs +14 -0
  25. package/src/reStructure/TemplateData/externalService/functionNameConfig/templateIntTesting.ejs +31 -0
  26. package/src/reStructure/TemplateData/externalService/functionNameConfig/templateYaml.ejs +10 -0
  27. package/src/reStructure/TemplateData/externalService/generateTemplateData.js +59 -0
  28. package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +435 -0
  29. package/src/reStructure/TemplateData/externalService/lambdaRole/request.json +18 -0
  30. package/src/reStructure/TemplateData/externalService/lambdaRole/template.ejs +57 -0
  31. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +177 -0
  32. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/request.json +12 -0
  33. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/template.ejs +28 -0
  34. package/src/reStructure/TemplateData/findData/GetByStorage/getByDynamo.ejs +53 -0
  35. package/src/reStructure/TemplateData/findData/GetByStorage/getByGraph.ejs +100 -0
  36. package/src/reStructure/TemplateData/findData/findDataYaml/data.js +195 -0
  37. package/src/reStructure/TemplateData/findData/findDataYaml/template.ejs +14 -0
  38. package/src/reStructure/TemplateData/findData/generateTemplateData.js +65 -0
  39. package/src/reStructure/TemplateData/findData/handler/data.js +63 -0
  40. package/src/reStructure/TemplateData/findData/handler/template.ejs +140 -0
  41. package/src/reStructure/TemplateData/findData/mainFunction/data.js +297 -0
  42. package/src/reStructure/TemplateData/findData/mainFunction/template.ejs +151 -0
  43. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/functionYaml/data.js +76 -0
  44. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/functionYaml/template.ejs +37 -0
  45. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/handler/data.js +46 -0
  46. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/handler/template.ejs +103 -0
  47. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/mainFunction/data.js +45 -0
  48. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/sns-sqs/data.js +35 -0
  49. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/data.js +34 -0
  50. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/template.ejs +0 -0
  51. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/data.js +34 -0
  52. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/template.ejs +0 -0
  53. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/data.js +34 -0
  54. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/template.ejs +0 -0
  55. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/data.js +34 -0
  56. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/template.ejs +0 -0
  57. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +118 -0
  58. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +30 -0
  59. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +56 -0
  60. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +126 -0
  61. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +51 -0
  62. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +121 -0
  63. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +64 -0
  64. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/queue/template.ejs +45 -0
  65. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +140 -0
  66. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/functionYaml/template.ejs +37 -0
  67. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +74 -0
  68. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +120 -0
  69. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +54 -0
  70. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +133 -0
  71. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +115 -0
  72. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +30 -0
  73. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +70 -0
  74. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/template.ejs +103 -0
  75. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +55 -0
  76. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +86 -0
  77. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +72 -0
  78. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/template.ejs +49 -0
  79. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/data.js +93 -0
  80. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/templateAsyncHandler.ejs +110 -0
  81. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/templateSyncHandler.ejs +49 -0
  82. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/hookLogic/data.js +43 -0
  83. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/mainFunction/data.js +65 -0
  84. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/mainFunction/template.ejs +7 -0
  85. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/queue/data.js +72 -0
  86. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/queue/snsTemplate.ejs +59 -0
  87. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/functionYaml/data.js +102 -0
  88. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/functionYaml/template.ejs +27 -0
  89. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/handler/data.js +57 -0
  90. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/handler/template.ejs +120 -0
  91. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/mainFunction/data.js +51 -0
  92. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/mainFunction/template.ejs +164 -0
  93. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/sqs/data.js +65 -0
  94. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/sqs/template.ejs +53 -0
  95. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +131 -0
  96. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +30 -0
  97. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +57 -0
  98. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +126 -0
  99. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +54 -0
  100. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +254 -0
  101. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/queue/data.js +64 -0
  102. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/queue/template.ejs +45 -0
  103. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrDsq/data.js +87 -0
  104. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml → reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml}/HdrDsq/template.ejs +4 -4
  105. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +127 -0
  106. package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/functionYaml → reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3}/template.ejs +11 -3
  107. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerDsq/data.js +45 -0
  108. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerDsq/template.ejs +151 -0
  109. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +58 -0
  110. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/template.ejs +68 -0
  111. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +58 -0
  112. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +392 -0
  113. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/queue/data.js +77 -0
  114. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/queue/dsqTemplatePath.ejs +32 -0
  115. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/queue/s3Template.ejs +59 -0
  116. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/S3/data.js +51 -0
  117. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/S3/template.ejs +13 -0
  118. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/data.js +42 -0
  119. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +137 -0
  120. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +73 -0
  121. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +29 -0
  122. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/data.js +54 -0
  123. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +68 -0
  124. package/src/reStructure/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +62 -0
  125. package/src/reStructure/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +62 -0
  126. package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +210 -0
  127. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/data.js +101 -0
  128. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/template.ejs +43 -0
  129. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/data.js +93 -0
  130. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/templateAsyncHandler.ejs +110 -0
  131. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/templateSyncHandler.ejs +49 -0
  132. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/hookLogic/data.js +64 -0
  133. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/mainFunction/data.js +66 -0
  134. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/mainFunction/template.ejs +30 -0
  135. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/data.js +124 -0
  136. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/snsTemplate.ejs +59 -0
  137. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/sqsTemplate.ejs +43 -0
  138. package/src/reStructure/TemplateData/generateRole/createSharedResource.js +276 -0
  139. package/src/reStructure/TemplateData/generateRole/sharedResourceTemplate.ejs +58 -0
  140. package/src/reStructure/TemplateData/perActionComplete/create/handler/data.js +69 -0
  141. package/src/reStructure/TemplateData/perActionComplete/create/handler/template.ejs +130 -0
  142. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +172 -0
  143. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/data.js +65 -0
  144. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +170 -0
  145. package/src/reStructure/TemplateData/perActionComplete/create/sns-in-sqs/data.js +69 -0
  146. package/src/reStructure/TemplateData/perActionComplete/create/sns-in-sqs/template.ejs +47 -0
  147. package/src/reStructure/TemplateData/perActionComplete/create/sns-out/data.js +73 -0
  148. package/src/reStructure/TemplateData/perActionComplete/create/sns-out/template.ejs +10 -0
  149. package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +130 -0
  150. package/src/reStructure/TemplateData/perActionComplete/create/yaml/template.ejs +20 -0
  151. package/src/reStructure/TemplateData/perActionComplete/delete/handler/data.js +66 -0
  152. package/src/reStructure/TemplateData/perActionComplete/delete/handler/template.ejs +129 -0
  153. package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/data.js +59 -0
  154. package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +93 -0
  155. package/src/reStructure/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +62 -0
  156. package/src/reStructure/TemplateData/perActionComplete/delete/sns-in-sqs/template.ejs +47 -0
  157. package/src/reStructure/TemplateData/perActionComplete/delete/sns-out/data.js +69 -0
  158. package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +124 -0
  159. package/src/reStructure/TemplateData/perActionComplete/delete/yaml/template.ejs +20 -0
  160. package/src/reStructure/TemplateData/perActionComplete/generateTemplateData.js +126 -0
  161. package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/handler/dataHdrDsq.js → reStructure/TemplateData/perActionComplete/get/handler/data.js} +20 -14
  162. package/src/reStructure/TemplateData/perActionComplete/get/handler/template.ejs +129 -0
  163. package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/data.js +52 -0
  164. package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +130 -0
  165. package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/sqs-sns → reStructure/TemplateData/perActionComplete/get/sns-in-sqs}/data.js +12 -12
  166. package/src/reStructure/TemplateData/perActionComplete/get/sns-in-sqs/template.ejs +47 -0
  167. package/src/reStructure/TemplateData/perActionComplete/get/sns-out/data.js +71 -0
  168. package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +105 -0
  169. package/src/reStructure/TemplateData/perActionComplete/get/yaml/template.ejs +20 -0
  170. package/src/reStructure/TemplateData/perActionComplete/update/handler/data.js +65 -0
  171. package/src/reStructure/TemplateData/perActionComplete/update/handler/template.ejs +129 -0
  172. package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/data.js +58 -0
  173. package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +130 -0
  174. package/src/reStructure/TemplateData/perActionComplete/update/sns-in-sqs/data.js +66 -0
  175. package/src/reStructure/TemplateData/perActionComplete/update/sns-in-sqs/template.ejs +47 -0
  176. package/src/reStructure/TemplateData/perActionComplete/update/sns-out/data.js +73 -0
  177. package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +132 -0
  178. package/src/reStructure/TemplateData/perActionComplete/update/yaml/template.ejs +20 -0
  179. package/src/reStructure/TemplateData/perActionEndpoint/generateTemplateData.js +101 -0
  180. package/src/reStructure/TemplateData/perActionEndpoint/handler/api/data.js +93 -0
  181. package/src/reStructure/TemplateData/perActionEndpoint/handler/api/request.json +7 -0
  182. package/src/reStructure/TemplateData/perActionEndpoint/handler/api/template.ejs +76 -0
  183. package/src/reStructure/TemplateData/perActionEndpoint/handler/dsq/data.js +95 -0
  184. package/src/reStructure/TemplateData/perActionEndpoint/handler/dsq/request.json +7 -0
  185. package/src/reStructure/TemplateData/perActionEndpoint/handler/dsq/template.ejs +127 -0
  186. package/src/reStructure/TemplateData/perActionEndpoint/handler/inv/data.js +88 -0
  187. package/src/reStructure/TemplateData/perActionEndpoint/handler/inv/request.json +7 -0
  188. package/src/reStructure/TemplateData/perActionEndpoint/handler/inv/template.ejs +81 -0
  189. package/src/reStructure/TemplateData/perActionEndpoint/handler/sqs/data.js +94 -0
  190. package/src/reStructure/TemplateData/perActionEndpoint/handler/sqs/request.json +7 -0
  191. package/src/reStructure/TemplateData/perActionEndpoint/handler/sqs/template.ejs +130 -0
  192. package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocket/data.js +75 -0
  193. package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocket/template.ejs +141 -0
  194. package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocketConnect/data.js +55 -0
  195. package/src/reStructure/TemplateData/perActionEndpoint/handler/webSocketConnect/template.ejs +55 -0
  196. package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/mainFunction → reStructure/TemplateData/perActionEndpoint/libs}/data.js +25 -13
  197. package/src/reStructure/TemplateData/perActionEndpoint/libs/template.ejs +46 -0
  198. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/data.js +74 -0
  199. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/request.json +0 -0
  200. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +629 -0
  201. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/data.js +74 -0
  202. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +192 -0
  203. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/data.js +76 -0
  204. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/request.json +5 -0
  205. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/template.ejs +265 -0
  206. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/get/testParam.json +5 -0
  207. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/data.js +70 -0
  208. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/request.json +0 -0
  209. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +351 -0
  210. package/src/reStructure/TemplateData/perActionEndpoint/yaml/api/data.js +198 -0
  211. package/src/reStructure/TemplateData/perActionEndpoint/yaml/api/request.json +14 -0
  212. package/src/reStructure/TemplateData/perActionEndpoint/yaml/api/template.ejs +20 -0
  213. package/src/reStructure/TemplateData/perActionEndpoint/yaml/dsq/data.js +207 -0
  214. package/src/reStructure/TemplateData/perActionEndpoint/yaml/dsq/request.json +19 -0
  215. package/src/reStructure/TemplateData/perActionEndpoint/yaml/dsq/template.ejs +17 -0
  216. package/src/reStructure/TemplateData/perActionEndpoint/yaml/inv/data.js +189 -0
  217. package/src/reStructure/TemplateData/perActionEndpoint/yaml/inv/example req.js +15 -0
  218. package/src/reStructure/TemplateData/perActionEndpoint/yaml/inv/request.json +14 -0
  219. package/src/reStructure/TemplateData/perActionEndpoint/yaml/inv/template.ejs +13 -0
  220. package/src/reStructure/TemplateData/perActionEndpoint/yaml/sqs/data.js +208 -0
  221. package/src/reStructure/TemplateData/perActionEndpoint/yaml/sqs/request.json +19 -0
  222. package/src/reStructure/TemplateData/perActionEndpoint/yaml/sqs/template.ejs +17 -0
  223. package/src/reStructure/TemplateData/perActionEndpoint/yaml/wbs/data.js +170 -0
  224. package/src/reStructure/TemplateData/perActionEndpoint/yaml/wbs/request.json +19 -0
  225. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml/HdrSqs → reStructure/TemplateData/perActionEndpoint/yaml/wbs}/template.ejs +2 -3
  226. package/src/reStructure/TemplateData/perActionEndpoint/yaml/webSocketConnect/data.js +59 -0
  227. package/src/reStructure/TemplateData/perActionEndpoint/yaml/webSocketConnect/template.ejs +10 -0
  228. package/src/reStructure/TemplateData/processLogical/generateTemplateData.js +57 -0
  229. package/src/reStructure/TemplateData/processLogical/handler/data.js +50 -0
  230. package/src/reStructure/TemplateData/processLogical/handler/template.ejs +129 -0
  231. package/src/reStructure/TemplateData/processLogical/mainFunction/data.js +47 -0
  232. package/src/reStructure/TemplateData/processLogical/mainFunction/template.ejs +429 -0
  233. package/src/reStructure/TemplateData/processLogical/yaml/data.js +160 -0
  234. package/src/reStructure/TemplateData/processLogical/yaml/template.ejs +12 -0
  235. package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/sns-out → reStructure/TemplateData/processLogicalPagination/DsqYaml}/data.js +16 -13
  236. package/src/reStructure/TemplateData/processLogicalPagination/DsqYaml/template.ejs +32 -0
  237. package/src/reStructure/TemplateData/processLogicalPagination/generateTemplateData.js +64 -0
  238. package/src/reStructure/TemplateData/processLogicalPagination/handler/dsq/data.js +48 -0
  239. package/src/reStructure/TemplateData/processLogicalPagination/handler/dsq/template.ejs +163 -0
  240. package/src/reStructure/TemplateData/processLogicalPagination/handler/sqs/data.js +48 -0
  241. package/src/reStructure/TemplateData/processLogicalPagination/handler/sqs/template.ejs +146 -0
  242. package/src/reStructure/TemplateData/processLogicalPagination/mainFunction/data.js +48 -0
  243. package/src/reStructure/TemplateData/processLogicalPagination/mainFunction/template.ejs +212 -0
  244. package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/data.js +154 -0
  245. package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/template.ejs +12 -0
  246. package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/data.js +157 -0
  247. package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/template.ejs +12 -0
  248. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +98 -0
  249. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/template.ejs +20 -0
  250. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +111 -0
  251. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/template.ejs +17 -0
  252. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +97 -0
  253. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/template.ejs +13 -0
  254. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +110 -0
  255. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/template.ejs +17 -0
  256. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/api/data.js +57 -0
  257. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/api/request.json +0 -0
  258. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/api/template.ejs +138 -0
  259. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/handler/HdrDsq → reStructure/TemplateData/relationshipPerAction/create/action/handler/dsq}/data.js +18 -20
  260. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/dsq/request.json +0 -0
  261. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/dsq/template.ejs +184 -0
  262. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/inv/data.js +59 -0
  263. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/inv/request.json +0 -0
  264. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/inv/template.ejs +126 -0
  265. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/handler/HdrSqs → reStructure/TemplateData/relationshipPerAction/create/action/handler/sqs}/data.js +16 -16
  266. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/sqs/request.json +0 -0
  267. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/sqs/template.ejs +163 -0
  268. package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +59 -0
  269. package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +380 -0
  270. package/src/reStructure/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +77 -0
  271. package/src/reStructure/TemplateData/relationshipPerAction/create/action/sns-in-sqs/snsTemplate.ejs +59 -0
  272. package/src/reStructure/TemplateData/relationshipPerAction/create/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  273. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml/HdrSqs → reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml}/data.js +48 -29
  274. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/request.json +0 -0
  275. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +20 -0
  276. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +60 -0
  277. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/request.json +0 -0
  278. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +125 -0
  279. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +55 -0
  280. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/request.json +0 -0
  281. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +141 -0
  282. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +71 -0
  283. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/request.json +0 -0
  284. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/template.ejs +47 -0
  285. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +71 -0
  286. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-out/request.json +0 -0
  287. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-out/template.ejs +10 -0
  288. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +98 -0
  289. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/template.ejs +20 -0
  290. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +111 -0
  291. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/template.ejs +17 -0
  292. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +97 -0
  293. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/template.ejs +13 -0
  294. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +111 -0
  295. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/template.ejs +17 -0
  296. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/api/data.js +57 -0
  297. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/api/request.json +0 -0
  298. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/api/template.ejs +138 -0
  299. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/dsq/data.js +58 -0
  300. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/dsq/request.json +0 -0
  301. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/dsq/template.ejs +184 -0
  302. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/inv/data.js +59 -0
  303. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/inv/request.json +0 -0
  304. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/inv/template.ejs +126 -0
  305. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/sqs/data.js +59 -0
  306. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/sqs/request.json +0 -0
  307. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/sqs/template.ejs +162 -0
  308. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +59 -0
  309. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +337 -0
  310. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +77 -0
  311. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/snsTemplate.ejs +59 -0
  312. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  313. package/src/{TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml/HdrDsq → reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml}/data.js +49 -30
  314. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/request.json +0 -0
  315. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +20 -0
  316. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +60 -0
  317. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/request.json +0 -0
  318. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +125 -0
  319. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +55 -0
  320. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/request.json +0 -0
  321. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +140 -0
  322. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +70 -0
  323. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/request.json +0 -0
  324. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/template.ejs +47 -0
  325. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +72 -0
  326. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-out/request.json +0 -0
  327. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-out/template.ejs +10 -0
  328. package/src/reStructure/TemplateData/relationshipPerAction/generateTemplateData.js +238 -0
  329. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +120 -0
  330. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/request.json +0 -0
  331. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/template.ejs +20 -0
  332. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +131 -0
  333. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/request.json +0 -0
  334. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/template.ejs +17 -0
  335. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +124 -0
  336. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/request.json +0 -0
  337. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/template.ejs +13 -0
  338. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +135 -0
  339. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/request.json +0 -0
  340. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/template.ejs +17 -0
  341. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/api/data.js +77 -0
  342. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/api/request.json +7 -0
  343. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/api/template.ejs +140 -0
  344. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/dsq/data.js +75 -0
  345. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/dsq/request.json +7 -0
  346. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/dsq/template.ejs +184 -0
  347. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/inv/data.js +77 -0
  348. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/inv/request.json +5 -0
  349. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/inv/template.ejs +145 -0
  350. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/sqs/data.js +74 -0
  351. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/sqs/request.json +7 -0
  352. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/sqs/template.ejs +163 -0
  353. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +72 -0
  354. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/request.json +1 -0
  355. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +340 -0
  356. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +92 -0
  357. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/request.json +3 -0
  358. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/snsTemplate.ejs +59 -0
  359. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/sqsTemplate.ejs +43 -0
  360. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-out/data.js +70 -0
  361. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-out/request.json +3 -0
  362. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +110 -0
  363. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/request.json +3 -0
  364. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +20 -0
  365. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +61 -0
  366. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/request.json +0 -0
  367. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +127 -0
  368. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +63 -0
  369. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/request.json +1 -0
  370. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +143 -0
  371. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +71 -0
  372. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/request.json +3 -0
  373. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/template.ejs +46 -0
  374. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +70 -0
  375. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-out/request.json +3 -0
  376. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-out/template.ejs +10 -0
  377. package/src/reStructure/TemplateData/resourceYaml/CreateSourceData.js +73 -0
  378. package/src/reStructure/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +146 -0
  379. package/src/reStructure/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +178 -0
  380. package/src/reStructure/TemplateData/resourceYaml/dynamodb/request.json +7 -0
  381. package/src/reStructure/TemplateData/resourceYaml/dynamodb/template.ejs +31 -0
  382. package/src/reStructure/TemplateData/resourceYaml/generateTemplateData.js +99 -0
  383. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +96 -0
  384. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/request.json +4 -0
  385. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +108 -0
  386. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/snsTemplate.ejs +59 -0
  387. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/sqsTemplate.ejs +43 -0
  388. package/src/reStructure/TemplateData/resourceYaml/sns-out/data.js +88 -0
  389. package/src/reStructure/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +75 -0
  390. package/src/reStructure/TemplateData/resourceYaml/sns-out/request.json +3 -0
  391. package/src/reStructure/TemplateData/resourceYaml/sns-out/template.ejs +10 -0
  392. package/src/reStructure/test.bash +192 -0
  393. package/src/TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/functionYaml/data.js +0 -94
  394. package/src/TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/handler/template.ejs +0 -192
  395. package/src/TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/mainFunction/template.ejs +0 -299
  396. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/handler/HdrDsq/template.ejs +0 -155
  397. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/handler/HdrSqs/template.ejs +0 -163
  398. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/mainFunction/data.js +0 -61
  399. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/mainFunction/template.ejs +0 -145
  400. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/resourceYaml/dynamoDb/data.js +0 -120
  401. package/src/TemplateManager/src/TranslateIdReq/TranslateIds/resourceYaml/sns-sqs/data.js +0 -75
  402. package/src/TemplateManager/src/reStructureExample/GenerateCodeTest.js +0 -31
  403. package/src/TemplateManager/src/reStructureExample/TemplateConfig.js +0 -11
  404. package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/generateCodeShared.js +0 -1
  405. package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/generatePerAction.js +0 -5
  406. /package/src/{TemplateManager/src/reStructureExample/TemplateData/perAction → reStructure/TemplateData/flowSchema/components/schema/inProcess/mainFunction}/template.ejs +0 -0
  407. /package/src/{TemplateManager/src/reStructureExample/TemplateData/perAction/data.js → reStructure/TemplateData/flowSchema/components/schema/inProcess/sns-sqs/template.ejs} +0 -0
  408. /package/src/{TemplateManager/src/TranslateIdReq/ProcessingTranslateIds/sqs-sns/template.ejs → reStructure/TemplateData/flowSchema/components/upload/hook/queue/sqsTemplate.ejs} +0 -0
@@ -0,0 +1,124 @@
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
+ 'use strict';
19
+ const path = require('path');
20
+
21
+ const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
22
+
23
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../#utils");
24
+ // const {
25
+ // DEFAULT_HANDLER_PER_ACTION,
26
+ // createIamRole,
27
+ // resourceNames,
28
+ // RESOURCE_CLASSES,
29
+ // DEFAULT_LAMBDA_ROLE_PER_ACTION,
30
+ // SQS_RESOURCE,
31
+ // SOURCE_PATH,
32
+ // SAVE_FILE_NAME,
33
+ // FUNCTION_NAME,
34
+ // SNS_RESOURCE,
35
+ // DYNAMO_RESOURCE,
36
+ // defaultIamRolePerAction,
37
+ // awaitingMultipleStepsRole,
38
+ // shortNameHandler,
39
+ // SHORT_FUNCTION_NAME,
40
+ // SOURCE_GENERATE_IAM_ROLE
41
+ // } = require("../../../#const");
42
+ const {
43
+ firstLetterLowerCase: lowerCase,
44
+ firstLetterUpperCase: upperCase,
45
+ } = require("../../../../../../../MainLibs/index.js").utils;
46
+ const {
47
+ DEFAULT_HANDLER_PER_ACTION,
48
+ createIamRole,
49
+ resourceNames,
50
+ RESOURCE_CLASSES,
51
+ DEFAULT_LAMBDA_ROLE_PER_ACTION,
52
+ SQS_RESOURCE,
53
+ SOURCE_PATH,
54
+ SAVE_FILE_NAME,
55
+ FUNCTION_NAME,
56
+ SNS_RESOURCE,
57
+ DYNAMO_RESOURCE,
58
+ defaultIamRolePerAction,
59
+ awaitingMultipleStepsRole,
60
+ shortNameHandler,
61
+ SHORT_FUNCTION_NAME,
62
+ SOURCE_GENERATE_IAM_ROLE
63
+ } = require("../../../../../../../MainLibs/index.js").consts;
64
+
65
+ const templatePath = path.join(__dirname, './template.ejs')
66
+
67
+ /**
68
+ * receive objectSchema
69
+ * create data for updateRelationshipSchema
70
+ *
71
+ * @param {Object} objectSchema
72
+ * @return {{ templatePath, templateData, setting } }
73
+ */
74
+
75
+ function data(_izContext, srcPath) {
76
+ let createSourceArray = [];
77
+
78
+ const createSourceParam = createParamForCreateSource(srcPath);
79
+ createSourceArray.push(createSourceParam);
80
+ return createSourceArray
81
+ }
82
+
83
+
84
+ function createParamForCreateSource(srcPath) {
85
+
86
+ let handlerType = HANDLER.hdrInv
87
+ let functionName = FUNCTION_NAME.updateRel
88
+ let additionalResourcePermission = defaultIamRolePerAction();
89
+
90
+ additionalResourcePermission.push(awaitingMultipleStepsRole())
91
+ additionalResourcePermission.push(
92
+ createIamRole(
93
+ {
94
+ [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
95
+ },
96
+ [
97
+ resourceNames(RESOURCE_CLASSES.sns, "Out" + upperCase(FUNCTION_NAME.updateRelComplete))
98
+ ]
99
+ )
100
+ )
101
+ return {
102
+ templatePath: templatePath,
103
+ templateData: {
104
+ functionName,
105
+ handlerType,
106
+ additionalResourcePermission,
107
+ resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
108
+ functionNameConfig: upperCase(SHORT_FUNCTION_NAME.updateRel) + upperCase(shortNameHandler(handlerType)),
109
+ roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
110
+
111
+ },
112
+ setting: {
113
+ savePath: path.join(srcPath, SOURCE_PATH.appYaml),
114
+ saveFileName: SAVE_FILE_NAME.functionRelationshipYaml,
115
+ fileExtension: '.yml',
116
+ isAppend: true
117
+ }
118
+
119
+ }
120
+ }
121
+
122
+
123
+
124
+ module.exports = data;
@@ -0,0 +1,13 @@
1
+ <%_ const join = require('path').join; _%>
2
+ <%- firstLetterUpperCase(functionNameConfig) %>:
3
+ handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
4
+ name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
5
+ role: <%- roleName %>Role
6
+ #<#<%- functionName %><%- handlerType %>IamRole#>
7
+ #<#/<%- functionName %><%- handlerType %>IamRole#>
8
+ <%_ function firstLetterUpperCase(text){
9
+ return text.charAt(0).toUpperCase() + text.slice(1)
10
+ } _%>
11
+ <%_ function firstLetterLowerCase(str) {
12
+ return str.charAt(0).toLowerCase() + str.slice(1)
13
+ } _%>
@@ -0,0 +1,135 @@
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
+ 'use strict';
19
+ const path = require('path');
20
+
21
+ const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
22
+
23
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../#utils");
24
+ // const {
25
+ // DEFAULT_HANDLER_PER_ACTION,
26
+ // DEFAULT_LAMBDA_ROLE_PER_ACTION,
27
+ // DYNAMO_RESOURCE,
28
+ // FUNCTION_NAME,
29
+ // RESOURCE_CLASSES,
30
+ // SAVE_FILE_NAME,
31
+ // SHORT_FUNCTION_NAME,
32
+ // SNS_RESOURCE,
33
+ // SOURCE_PATH,
34
+ // SQS_RESOURCE,
35
+ // awaitingMultipleStepsRole,
36
+ // createIamRole,
37
+ // defaultIamRolePerAction,
38
+ // resourceNames,
39
+ // shortNameHandler,
40
+ // SOURCE_GENERATE_IAM_ROLE
41
+ // } = require("../../../#const");
42
+ const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/index.js").utils;
43
+ const {
44
+ DEFAULT_HANDLER_PER_ACTION,
45
+ DEFAULT_LAMBDA_ROLE_PER_ACTION,
46
+ DYNAMO_RESOURCE,
47
+ FUNCTION_NAME,
48
+ RESOURCE_CLASSES,
49
+ SAVE_FILE_NAME,
50
+ SHORT_FUNCTION_NAME,
51
+ SNS_RESOURCE,
52
+ SOURCE_PATH,
53
+ SQS_RESOURCE,
54
+ awaitingMultipleStepsRole,
55
+ createIamRole,
56
+ defaultIamRolePerAction,
57
+ resourceNames,
58
+ shortNameHandler,
59
+ SOURCE_GENERATE_IAM_ROLE
60
+ } = require("../../../../../../../MainLibs/index.js").consts;
61
+
62
+
63
+ const templatePath = path.join(__dirname, './template.ejs')
64
+
65
+ /**
66
+ * receive objectSchema
67
+ * create data for updateRelationshipSchema
68
+ *
69
+ * @param {Object} objectSchema
70
+ * @return {{ templatePath, templateData, setting } }
71
+ */
72
+
73
+ function data(_izContext, srcPath) {
74
+ let createSourceArray = [];
75
+ const createSourceParam = createParamForCreateSource(srcPath);
76
+ createSourceArray.push(createSourceParam);
77
+ // console.log("createSourceArrayInUpdaterelationShipSchemahdrSqs", createSourceArray)
78
+ return createSourceArray
79
+ }
80
+
81
+
82
+
83
+ function createParamForCreateSource(srcPath) {
84
+
85
+ let handlerType = HANDLER.hdrSqs
86
+ let functionName = FUNCTION_NAME.updateRel
87
+ let additionalResourcePermission = defaultIamRolePerAction();
88
+
89
+ additionalResourcePermission.push(
90
+ createIamRole(
91
+ {
92
+ [RESOURCE_CLASSES.sqs]: [
93
+ SQS_RESOURCE.deleteMessage,
94
+ SQS_RESOURCE.getQueueAttributes,
95
+ SQS_RESOURCE.receiveMessage,
96
+ SQS_RESOURCE.sendMessage,
97
+ SQS_RESOURCE.getQueueUrl,
98
+ SQS_RESOURCE.deleteMessageBatch
99
+ ],
100
+ [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
101
+ },
102
+ [
103
+ resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(HANDLER.hdrSqs)),
104
+ resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(HANDLER.hdrSqs) + "DLQ"),
105
+ resourceNames(RESOURCE_CLASSES.sns, "In" + upperCase(functionName) + upperCase(HANDLER.hdrSqs)),
106
+ resourceNames(RESOURCE_CLASSES.sns, "Out" + upperCase(functionName) + upperCase(HANDLER.hdrSqs)),
107
+ resourceNames(RESOURCE_CLASSES.sns, "Out" + upperCase(FUNCTION_NAME.updateRelComplete))
108
+ ]
109
+ ),
110
+ )
111
+ additionalResourcePermission.push(awaitingMultipleStepsRole())
112
+
113
+ return {
114
+ templatePath: templatePath,
115
+ templateData: {
116
+ functionName,
117
+ handlerType,
118
+ additionalResourcePermission,
119
+ resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
120
+ functionNameConfig: upperCase(SHORT_FUNCTION_NAME.updateRel) + upperCase(shortNameHandler(handlerType)),
121
+ roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
122
+ },
123
+ setting: {
124
+ savePath: path.join(srcPath, SOURCE_PATH.appYaml),
125
+ saveFileName: SAVE_FILE_NAME.functionRelationshipYaml,
126
+ fileExtension: '.yml',
127
+ isAppend: true
128
+ }
129
+
130
+ }
131
+ }
132
+
133
+
134
+
135
+ module.exports = data;
@@ -0,0 +1,17 @@
1
+ <%_ const join = require('path').join; _%>
2
+ <%- firstLetterUpperCase(functionNameConfig) %>:
3
+ handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
4
+ name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
5
+ events:
6
+ - sqs:
7
+ arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
8
+ batchSize: 10
9
+ role: <%- roleName %>Role
10
+ #<#<%- functionName %><%- handlerType %>IamRole#>
11
+ #<#/<%- functionName %><%- handlerType %>IamRole#>
12
+ <%_ function firstLetterUpperCase(text){
13
+ return text.charAt(0).toUpperCase() + text.slice(1)
14
+ } _%>
15
+ <%_ function firstLetterLowerCase(str) {
16
+ return str.charAt(0).toLowerCase() + str.slice(1)
17
+ } _%>
@@ -0,0 +1,77 @@
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
+ 'use strict';
19
+ const path = require('path');
20
+
21
+ const { ACTIONS, HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
22
+
23
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../#utils");
24
+ // const { DEFAULT_HANDLER_PER_ACTION, createIamRole, resourceNames, RESOURCE_CLASSES, DEFAULT_LAMBDA_ROLE_PER_ACTION, SQS_RESOURCE, SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME, SNS_RESOURCE, DYNAMO_RESOURCE, defaultIamRolePerAction, awaitingMultipleStepsRole } = require("../../../#const");
25
+ const {
26
+ firstLetterLowerCase: lowerCase,
27
+ firstLetterUpperCase: upperCase,
28
+ } = require("../../../../../../../MainLibs/index.js").utils;
29
+ const {
30
+ DEFAULT_HANDLER_PER_ACTION,
31
+ createIamRole,
32
+ resourceNames,
33
+ RESOURCE_CLASSES,
34
+ DEFAULT_LAMBDA_ROLE_PER_ACTION,
35
+ SQS_RESOURCE,
36
+ SOURCE_PATH,
37
+ SAVE_FILE_NAME,
38
+ FUNCTION_NAME,
39
+ SNS_RESOURCE,
40
+ DYNAMO_RESOURCE,
41
+ defaultIamRolePerAction,
42
+ awaitingMultipleStepsRole
43
+ } = require("../../../../../../../MainLibs/index.js").consts;
44
+
45
+ const templatePath = path.join(__dirname, "./template.ejs")
46
+
47
+ /**
48
+ * receive objectSchema
49
+ * create data for hdrInv template
50
+ *
51
+ * @return {{ templatePath, templateData, setting } }
52
+ */
53
+ function data(_izContext, srcPath) {
54
+ const createSourceParams = createParamForCreateSource(srcPath)
55
+ return [createSourceParams];
56
+ }
57
+
58
+
59
+ function createParamForCreateSource(srcPath) {
60
+ const functionName = FUNCTION_NAME.updateRel;
61
+ const handler = HANDLER.hdrApi
62
+ return {
63
+ templatePath: templatePath,
64
+ templateData: {
65
+ functionName,
66
+ },
67
+ setting: {
68
+ savePath: path.join(srcPath, SOURCE_PATH.relationshipPerAction),
69
+ saveFileName: `${upperCase(functionName)}_${upperCase(handler)}`,
70
+ fileExtension: '.js',
71
+ isAppend: false
72
+ }
73
+ }
74
+ }
75
+
76
+
77
+ 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,140 @@
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
+ 'use strict';
19
+ const izara = require("@izara_project/izara-middleware");
20
+ const middleware = izara.middlewareHandler;
21
+ const callingFlowSharedLib = require('@izara_project/izara-shared/src/CallingFlowSharedLib')
22
+ const {
23
+ validateSchemaMiddleware
24
+ } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs');
25
+
26
+ const <%- functionName %> = require('./<%- firstLetterUpperCase(functionName) %>_Main');
27
+ // validate event params in middleware before into function
28
+ let validatorSchema = {
29
+ type: "object",
30
+ required: ["firstObject","secondObject", "relType", "relationshipProperties","relationshipDirection","relId"],
31
+ properties: {
32
+ firstObject: {
33
+ type: "object",
34
+ required: ["objType","identifiers"],
35
+ properties: {
36
+ objType: {
37
+ type: "object",
38
+ required: ["serviceTag","objectType"],
39
+ properties: {
40
+ serviceTag: izara.validatorSchema.stringNotEmpty(),
41
+ objectType: izara.validatorSchema.stringNotEmpty(),
42
+ }
43
+ },
44
+ identifiers: {
45
+ type: "object",
46
+ minProperties: 1
47
+ }
48
+ }
49
+ },
50
+ secondObject: {
51
+ type: "object",
52
+ required: ["objType","identifiers"],
53
+ properties: {
54
+ objType: {
55
+ type: "object",
56
+ required: ["serviceTag","objectType"],
57
+ properties: {
58
+ serviceTag: izara.validatorSchema.stringNotEmpty(),
59
+ objectType: izara.validatorSchema.stringNotEmpty(),
60
+ }
61
+ },
62
+ identifiers: {
63
+ type: "object",
64
+ minProperties: 1
65
+ }
66
+ }
67
+ },
68
+ relType: {
69
+ type: "object",
70
+ required: ["relationshipTag", "serviceTag"],
71
+ properties: {
72
+ relationshipTag: izara.validatorSchema.stringNotEmpty(),
73
+ serviceTag: {
74
+ type: 'string',
75
+ pattern: "^[a-zA-Z0-9_-]+$",
76
+ enum: [process.env.iz_serviceTag]
77
+ }
78
+ }
79
+ },
80
+ relId: izara.validatorSchema.stringNotEmpty(),
81
+ relationshipProperties: {
82
+ type: "object",
83
+ minProperties: 1
84
+ },
85
+ relationshipDirection: {
86
+ type: "string",
87
+ enum: ['from','to']
88
+ }
89
+ }
90
+ };
91
+
92
+
93
+ //(<globalVarible>
94
+ //</globalVarible>)
95
+
96
+ // validate event params in middleware before into main function
97
+ validatorSchema = callingFlowSharedLib.addOptionalCallingFlowToValidatorSchema(validatorSchema);
98
+ middleware.setValidatorSchema(validatorSchema)
99
+ // if need to validate authorizer or additional params , add code to hook tag below
100
+
101
+ //(<afterValidateWith>)
102
+ //(</afterValidateWith>)
103
+
104
+
105
+ module.exports.main = middleware.wrap(async (event, context, callback) => {
106
+ event._izContext.logger.debug('Event:', event);
107
+ try {
108
+ // invoke LambdaFunction
109
+ let lambdaFunctionResponse = await <%- functionName %>.<%- functionName %>(
110
+ event._izContext, // correlationId/logger/integrationTestDetail/uniqueRequestId/userId
111
+ {
112
+ firstObject: event.firstObject,
113
+ secondObject: event.secondObject,
114
+ relType: event.relType,
115
+ relationshipDirection: event.relationshipDirection,
116
+ relationshipProperties: event.relationshipProperties,
117
+ relId: event.relId
118
+ },
119
+ callingFlowSharedLib.addCallingFlowToPassOnProperties(event)
120
+ );
121
+
122
+ // return error to client
123
+ if (lambdaFunctionResponse instanceof Error) {
124
+ return (izara.response.failure(lambdaFunctionResponse));
125
+ }
126
+
127
+ // return success to client
128
+ return (izara.response.success(lambdaFunctionResponse));
129
+
130
+ } catch (err) {
131
+ event._izContext.logger.error('Error, <%- functionName %>HdrApi: ', err);
132
+ return (izara.response.failure(err));
133
+ }
134
+ });
135
+ <%_ function firstLetterUpperCase(text) {
136
+ return text.charAt(0).toUpperCase() + text.slice(1)
137
+ } _%>
138
+ <%_ function firstLetterLowerCase(str) {
139
+ return str.charAt(0).toLowerCase() + str.slice(1)
140
+ } _%>
@@ -0,0 +1,75 @@
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
+ 'use strict';
19
+ const path = require('path');
20
+
21
+ const { ACTIONS, HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
22
+
23
+ // const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../#utils");
24
+ // const { DEFAULT_HANDLER_PER_ACTION, createIamRole, resourceNames, RESOURCE_CLASSES, DEFAULT_LAMBDA_ROLE_PER_ACTION, SQS_RESOURCE, SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME, SNS_RESOURCE, DYNAMO_RESOURCE, defaultIamRolePerAction, awaitingMultipleStepsRole } = require("../../../#const");
25
+ const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/index.js").utils;
26
+ const {
27
+ DEFAULT_HANDLER_PER_ACTION,
28
+ createIamRole,
29
+ resourceNames,
30
+ RESOURCE_CLASSES,
31
+ DEFAULT_LAMBDA_ROLE_PER_ACTION,
32
+ SQS_RESOURCE,
33
+ SOURCE_PATH,
34
+ SAVE_FILE_NAME,
35
+ FUNCTION_NAME,
36
+ SNS_RESOURCE,
37
+ DYNAMO_RESOURCE,
38
+ defaultIamRolePerAction,
39
+ awaitingMultipleStepsRole
40
+ } = require("../../../../../../../MainLibs/index.js").consts;
41
+
42
+
43
+ const templatePath = path.join(__dirname, "./template.ejs")
44
+
45
+ /**
46
+ * receive objectSchema
47
+ * create data for hdrInv template
48
+ *
49
+ * @return {{ templatePath, templateData, setting } }
50
+ */
51
+ function data(_izContext, srcPath) {
52
+ const createSourceParams = createParamForCreateSource(srcPath)
53
+ return [createSourceParams];
54
+ }
55
+
56
+
57
+ function createParamForCreateSource(srcPath) {
58
+ const functionName = FUNCTION_NAME.updateRel;
59
+ const handler = HANDLER.hdrDsq
60
+ return {
61
+ templatePath: templatePath,
62
+ templateData: {
63
+ functionName,
64
+ queueName: upperCase(functionName) + upperCase(HANDLER.hdrDsq),
65
+ },
66
+ setting: {
67
+ savePath: path.join(srcPath, SOURCE_PATH.relationshipPerAction),
68
+ saveFileName: `${upperCase(functionName)}_${upperCase(handler)}`,
69
+ fileExtension: '.js',
70
+ isAppend: false
71
+ }
72
+ }
73
+ }
74
+
75
+ module.exports = data;
@@ -0,0 +1,7 @@
1
+ {
2
+ "objectType": "objectType",
3
+ "action": "get",
4
+ "mainFunction": "xxx",
5
+ "mainFunctionFile": "directoryOfMainFunction",
6
+ "isCreateMainByDev": "boolean"
7
+ }