@izara_project/izara-market-library-service-schemas 1.0.29 → 1.0.31

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 (170) hide show
  1. package/package.json +1 -1
  2. package/src/GenerateCodeLibs/src/Consts.js +11 -9
  3. package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +54 -21
  4. package/src/MainLibs/src/Consts.js +43 -20
  5. package/src/reStructure/GenerateCode.js +2 -1
  6. package/src/reStructure/TemplateConfig.js +5 -1
  7. package/src/reStructure/TemplateData/EndpointPerService/generateTemplateData.js +108 -0
  8. package/src/reStructure/TemplateData/EndpointPerService/handler/api/data.js +76 -0
  9. package/src/reStructure/TemplateData/EndpointPerService/handler/api/request.json +7 -0
  10. package/src/reStructure/TemplateData/EndpointPerService/handler/api/template.ejs +73 -0
  11. package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/data.js +81 -0
  12. package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/request.json +7 -0
  13. package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/template.ejs +125 -0
  14. package/src/reStructure/TemplateData/EndpointPerService/handler/inv/data.js +70 -0
  15. package/src/reStructure/TemplateData/EndpointPerService/handler/inv/request.json +7 -0
  16. package/src/reStructure/TemplateData/EndpointPerService/handler/inv/template.ejs +73 -0
  17. package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/data.js +79 -0
  18. package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/request.json +7 -0
  19. package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/template.ejs +126 -0
  20. package/src/reStructure/TemplateData/{flowSchema/components/schema/inProcess/handler → EndpointPerService/mainFunction/create}/data.js +20 -13
  21. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +624 -0
  22. package/src/reStructure/TemplateData/{flowSchema/components/schema/inProcess/mainFunction → EndpointPerService/mainFunction/delete}/data.js +18 -11
  23. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +176 -0
  24. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/data.js +56 -0
  25. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +234 -0
  26. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/data.js +56 -0
  27. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +330 -0
  28. package/src/reStructure/TemplateData/EndpointPerService/yaml/data.js +177 -0
  29. package/src/reStructure/TemplateData/EndpointPerService/yaml/template.ejs +26 -0
  30. package/src/reStructure/TemplateData/externalService/generateTemplateData.js +1 -1
  31. package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +91 -249
  32. package/src/reStructure/TemplateData/externalService/lambdaRole/template.ejs +1 -1
  33. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +10 -8
  34. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/template.ejs +1 -1
  35. package/src/reStructure/TemplateData/findData/findDataYaml/data.js +2 -2
  36. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +8 -7
  37. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +4 -4
  38. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +2 -2
  39. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +5 -31
  40. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +4 -22
  41. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +3 -31
  42. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +1 -1
  43. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +6 -6
  44. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +4 -4
  45. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +4 -4
  46. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +1 -1
  47. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/template.ejs +1 -1
  48. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → createPresignUrl}/functionYaml/data.js +45 -14
  49. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → createPresignUrl}/functionYaml/template.ejs +3 -0
  50. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → createPresignUrl}/handler/data.js +6 -6
  51. package/src/reStructure/TemplateData/flowSchema/{legacy/hookCode-old/handler/templateAsyncHandler.ejs → components/upload/preSignUrl/createPresignUrl/handler/template.ejs} +26 -11
  52. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → createPresignUrl}/mainFunction/data.js +11 -8
  53. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +253 -0
  54. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{reservedLimit → createPresignUrl}/queue/data.js +1 -1
  55. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +14 -42
  56. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +0 -3
  57. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +6 -6
  58. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +40 -45
  59. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +5 -8
  60. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +100 -190
  61. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → reservedLimit}/sqs/data.js +4 -4
  62. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{getSignUrls → reservedLimit}/sqs/template.ejs +2 -2
  63. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +9 -7
  64. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +4 -4
  65. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +4 -4
  66. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/queue/s3Template.ejs +1 -1
  67. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/S3/data.js +5 -2
  68. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +3 -3
  69. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +2 -0
  70. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/data.js +3 -2
  71. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +4 -16
  72. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchema/functionYaml/data.js +115 -0
  73. package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess → flowSchemaOwnTopic/flowSchema}/functionYaml/template.ejs +1 -20
  74. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchema/handler/data.js +70 -0
  75. package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess → flowSchemaOwnTopic/flowSchema}/handler/template.ejs +14 -32
  76. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchema/mainFunction/data.js +64 -0
  77. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchema/mainFunction/template.ejs +104 -0
  78. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchemaComplete/functionYaml/data.js +115 -0
  79. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchemaComplete/functionYaml/template.ejs +20 -0
  80. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchemaComplete/handler/data.js +71 -0
  81. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchemaComplete/handler/template.ejs +85 -0
  82. package/src/reStructure/TemplateData/flowSchema/{components/upload/hook/hookLogic → flowSchemaOwnTopic/flowSchemaComplete/mainFunction}/data.js +30 -10
  83. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowSchemaComplete/mainFunction/template.ejs +105 -0
  84. package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +78 -55
  85. package/src/reStructure/TemplateData/generateRole/createSharedResource.js +21 -1
  86. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +35 -44
  87. package/src/reStructure/TemplateData/perActionComplete/create/sns-out/template.ejs +1 -1
  88. package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +4 -5
  89. package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +5 -4
  90. package/src/reStructure/TemplateData/perActionComplete/generateTemplateData.js +15 -2
  91. package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +7 -4
  92. package/src/reStructure/TemplateData/perActionComplete/update/sns-out/data.js +1 -1
  93. package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +5 -4
  94. package/src/reStructure/TemplateData/processLogical/yaml/data.js +3 -3
  95. package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/data.js +1 -1
  96. package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/data.js +2 -2
  97. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +1 -1
  98. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +1 -1
  99. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +1 -1
  100. package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +3 -3
  101. package/src/reStructure/TemplateData/relationshipPerAction/create/action/sns-in-sqs/snsTemplate.ejs +1 -1
  102. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +2 -2
  103. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +1 -1
  104. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/template.ejs +0 -1
  105. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/sns-out/template.ejs +1 -1
  106. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +1 -1
  107. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +1 -1
  108. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +1 -1
  109. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +3 -3
  110. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/snsTemplate.ejs +1 -1
  111. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +2 -2
  112. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/sns-out/template.ejs +1 -1
  113. package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +1 -1
  114. package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +1 -1
  115. package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +1 -1
  116. package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +4 -4
  117. package/src/reStructure/TemplateData/relationshipPerAction/get/action/sns-in-sqs/snsTemplate.ejs +1 -1
  118. package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +2 -2
  119. package/src/reStructure/TemplateData/relationshipPerAction/get/complete/sns-out/template.ejs +1 -1
  120. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +1 -1
  121. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +1 -1
  122. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +1 -1
  123. package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +4 -4
  124. package/src/reStructure/TemplateData/relationshipPerAction/update/action/sns-in-sqs/snsTemplate.ejs +1 -1
  125. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +2 -2
  126. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/sns-out/template.ejs +1 -1
  127. package/src/reStructure/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +1 -1
  128. package/src/reStructure/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +1 -1
  129. package/src/reStructure/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +1 -1
  130. package/src/reStructure/TemplateData/resourceYaml/generateTemplateData.js +6 -12
  131. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +1 -1
  132. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +22 -49
  133. package/src/reStructure/TemplateData/resourceYaml/sns-in-sqs/snsTemplate.ejs +1 -1
  134. package/src/reStructure/TemplateData/resourceYaml/sns-out/data.js +8 -24
  135. package/src/reStructure/TemplateData/resourceYaml/sns-out/template.ejs +1 -1
  136. package/src/reStructure/TemplateData/testTemplate/template.ejs +0 -5
  137. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/functionYaml/data.js +0 -76
  138. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/sns-sqs/data.js +0 -35
  139. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/data.js +0 -34
  140. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/template.ejs +0 -0
  141. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/data.js +0 -34
  142. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/template.ejs +0 -0
  143. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/data.js +0 -34
  144. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/template.ejs +0 -0
  145. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/data.js +0 -34
  146. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/template.ejs +0 -0
  147. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/data.js +0 -93
  148. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/templateAsyncHandler.ejs +0 -110
  149. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/handler/templateSyncHandler.ejs +0 -49
  150. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/mainFunction/data.js +0 -65
  151. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/mainFunction/template.ejs +0 -7
  152. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/queue/data.js +0 -72
  153. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/queue/snsTemplate.ejs +0 -59
  154. package/src/reStructure/TemplateData/flowSchema/components/upload/hook/queue/sqsTemplate.ejs +0 -43
  155. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/handler/template.ejs +0 -120
  156. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/getSignUrls/mainFunction/template.ejs +0 -163
  157. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/data.js +0 -101
  158. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/template.ejs +0 -43
  159. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/data.js +0 -93
  160. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/templateSyncHandler.ejs +0 -49
  161. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/hookLogic/data.js +0 -64
  162. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/mainFunction/data.js +0 -66
  163. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/mainFunction/template.ejs +0 -30
  164. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/data.js +0 -124
  165. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/snsTemplate.ejs +0 -59
  166. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/sqsTemplate.ejs +0 -43
  167. package/src/reStructure/TemplateData/relationshipPerAction.zip +0 -0
  168. /package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/{reservedLimit → createPresignUrl}/queue/template.ejs +0 -0
  169. /package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess/mainFunction/template.ejs → flowSchemaOwnTopic/sns-in/data.js} +0 -0
  170. /package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess/sns-sqs/template.ejs → flowSchemaOwnTopic/sns-out/data.js} +0 -0
@@ -0,0 +1,115 @@
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 } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
22
+ const { firstLetterUpperCase: upperCase } = require('../../../../../../MainLibs/src/Utils')
23
+ const {
24
+ SOURCE_PATH,
25
+ defaultIamRolePerAction,
26
+ createIamRole,
27
+ RESOURCE_CLASSES,
28
+ SNS_RESOURCE,
29
+ resourceNames,
30
+ DYNAMO_RESOURCE,
31
+ SAVE_FILE_NAME,
32
+ FUNCTION_NAME,
33
+ shortNameHandler,
34
+ externalResourceYaml,
35
+ SOURCE_GENERATE_IAM_ROLE
36
+ } = require('../../../../../../MainLibs/src/Consts');
37
+
38
+ const templatePath = path.join(__dirname, "./template.ejs");
39
+
40
+ /**
41
+ * receive objectSchema
42
+ * create data for WebScoket handler template
43
+ *
44
+ * @param {Object} objectSchema
45
+ * @return {{templatePath, templateData,setting}}
46
+ */
47
+
48
+ function data(_izContext, flowSchema, srcPath) {
49
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
50
+ }
51
+
52
+ function createSourceParams(_izContext, flowSchema, srcPath) {
53
+
54
+ let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopic)
55
+ let handlerType = upperCase("hdrWbs")
56
+ let additionalResourcePermission = defaultIamRolePerAction();
57
+ let route = flowSchema.flowTag
58
+
59
+ additionalResourcePermission.push(
60
+ createIamRole(
61
+ {
62
+ [RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE)
63
+ },
64
+ [
65
+ resourceNames(RESOURCE_CLASSES.dynamoDbTable, "WebSocketTask")
66
+ ]
67
+ ),
68
+ createIamRole(
69
+ {
70
+ "execute-api": [
71
+ "ManageConnections"
72
+ ]
73
+ },
74
+ [
75
+ resourceNames(RESOURCE_CLASSES.webSocket)
76
+ ]
77
+ )
78
+ )
79
+
80
+ for (const flowStep of Object.keys(flowSchema.flowSteps)) {
81
+ if (flowStep.includes("In")) {
82
+ additionalResourcePermission.push(
83
+ createIamRole(
84
+ {
85
+ [RESOURCE_CLASSES.sns]: SNS_RESOURCE.publish
86
+ },
87
+ [
88
+ resourceNames(RESOURCE_CLASSES.sns, flowStep)
89
+ ]
90
+ )
91
+ )
92
+ }
93
+ }
94
+
95
+ return {
96
+ templatePath: templatePath,
97
+ templateData: {
98
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchemaOwnTopic, flowSchema.flowTag),
99
+ functionName,
100
+ handlerType,
101
+ additionalResourcePermission,
102
+ route,
103
+ functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
104
+ roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaOwnTopic
105
+ },
106
+ setting: {
107
+ savePath: path.join(srcPath, SOURCE_PATH.appYaml),
108
+ saveFileName: upperCase(SAVE_FILE_NAME.flowSchema),
109
+ fileExtension: ".yml",
110
+ isAppend: true
111
+ }
112
+ }
113
+ }
114
+
115
+ module.exports = data;
@@ -3,30 +3,11 @@
3
3
  handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
4
4
  name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
5
5
  events:
6
- - websocket:
7
- route: $connect
8
- - websocket:
9
- route: $disconnect
10
- - websocket:
11
- route: $default
12
6
  - websocket:
13
7
  route: <%- route %>
14
8
  # authorizer: ${self:custom.iz_authorizerAppLevel}
15
9
  # identifierResource: 'route.request.header.Auth'
16
- iamRoleStatements:
17
- <%_ additionalResourcePermission.forEach(resourcePermission => { _%>
18
- - Effect: <%- resourcePermission.effect %>
19
- Action:
20
- <%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
21
- <%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
22
- - <%- resourcePerAction %>:<%- permission %>
23
- <%_}) _%>
24
- <%_ }) _%>
25
- Resource:
26
- <%_ resourcePermission.resource.forEach(resource => { _%>
27
- - <%- resource %>
28
- <%_ }) _%>
29
- <%_}) _%>
10
+ role: <%- roleName %>Role
30
11
  #<#<%- functionName %><%- handlerType %>IamRole#>
31
12
  #<#/<%- functionName %><%- handlerType %>IamRole#>
32
13
  <%_ function firstLetterUpperCase(text){
@@ -0,0 +1,70 @@
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
+ const { firstLetterUpperCase: upperCase } = require('../../../../../../MainLibs/src/Utils')
21
+ const {
22
+ SOURCE_PATH,
23
+ defaultIamRolePerAction,
24
+ createIamRole,
25
+ RESOURCE_CLASSES,
26
+ SNS_RESOURCE,
27
+ resourceNames,
28
+ DYNAMO_RESOURCE,
29
+ SAVE_FILE_NAME,
30
+ FUNCTION_NAME,
31
+ shortNameHandler,
32
+ externalResourceYaml,
33
+ SOURCE_GENERATE_IAM_ROLE
34
+ } = require('../../../../../../MainLibs/src/Consts');
35
+ const templatePath = path.join(__dirname, "./template.ejs")
36
+
37
+ /**
38
+ * receive objectSchema
39
+ * create data for WebScoket handler template
40
+ *
41
+ * @param {Object} objectSchema
42
+ * @return {{templatePath, templateData,setting}}
43
+ */
44
+
45
+
46
+ function data(_izContext, flowSchema, srcPath) {
47
+ return [createParamsForCreateSource(_izContext, flowSchema, srcPath)]
48
+ }
49
+
50
+ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
51
+ let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopic)
52
+ let handlerType = "HdrWbs";
53
+ let route = flowSchema.flowTag
54
+
55
+ return {
56
+ templatePath: templatePath,
57
+ templateData: {
58
+ functionName,
59
+ handlerType,
60
+ route
61
+ },
62
+ setting: {
63
+ savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
64
+ saveFileName: `${functionName}_${handlerType}`,
65
+ fileExtension: ".js",
66
+ isAppend: false
67
+ }
68
+ }
69
+ }
70
+ module.exports = data
@@ -21,15 +21,13 @@ const izara = require("@izara_project/izara-middleware");
21
21
  const middleware = izara.middlewareHandler;
22
22
  // const AWS = require('aws-sdk');
23
23
  // const api = new AWS.ApiGatewayManagementApi({ endpoint: process.env.iz_webSocketEndpoint });
24
- const izaraShared = require('@izara_project/izara-shared')
25
- const dynamodbSharedLib = izaraShared.dynamodbSharedLib
26
- const callingFlowSharedLib = izaraShared.callingFlowSharedLib;
24
+ const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb')
25
+ const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow')
27
26
  const hash = require('object-hash')
28
27
  // const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
29
28
  const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
30
29
  const { postToConnection } = require("../../libs/source/ImportDataLib");
31
- const createObject = require('./CreateObjectS3_Main');
32
-
30
+ const { flowSchemaOwnTopic } = require('./<%- `${functionName}_Main` %>');
33
31
  module.exports.main = middleware.wrap(async (event, context, callback) => {
34
32
 
35
33
  event._izContext.logger.debug('Event:', event);
@@ -39,37 +37,16 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
39
37
  if (event.requestContext) {
40
38
  const route = event.requestContext.routeKey;
41
39
  const connectionId = event.requestContext.connectionId;
40
+ let correlationId = event._izContext.correlationIds.get(consts.X_CORRELATION_ID)
42
41
 
43
42
  switch (route) {
44
- case "$connect":
45
- console.log("webSocket Connect");
46
- break
47
- case "$disconnect":
48
- console.log("webSocket Disconnect");
49
- break
50
43
  case '$default':
51
44
  console.log('Received unknown route:', route);
52
45
  break
53
- case 'webSocket':
46
+ case '<%- route %>':
54
47
  console.log("event in route webSocket", event);
55
-
56
48
  let eventParams = JSON.parse(event.body)
57
49
 
58
- let callingFlow = eventParams?.callingFlow ? eventParams.callingFlow : {};
59
-
60
- await createObject.createObject(
61
- event._izContext,
62
- eventParams,
63
- //(<additionalParams>)
64
- event,
65
- //(</additionalParams>)
66
- callingFlowSharedLib.addCallingFlowToPassOnProperties(callingFlow)
67
- )
68
-
69
- let correlationId = event._izContext.correlationIds.get(consts.X_CORRELATION_ID)
70
- event._izContext.logger.debug("correlationId", correlationId)
71
-
72
- // if (returnValueFlowSchema) {
73
50
  await dynamodbSharedLib.putItem(
74
51
  event._izContext,
75
52
  await dynamodbSharedLib.tableName(event._izContext, "WebSocketTask"),
@@ -78,11 +55,16 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
78
55
  connectionId: connectionId,
79
56
  }
80
57
  )
81
- // }
82
58
 
83
- console.log({ message: eventParams })
84
- // await postMessage(returnValueFlowSchema, connectionId)
85
- // await postToConnection({ message: eventParams }, connectionId)
59
+ let callingFlow = eventParams?.callingFlow ? eventParams.callingFlow : {};
60
+ await flowSchemaOwnTopic(
61
+ event._izContext,
62
+ eventParams,
63
+ callingFlowSharedLib.addCallingFlowToPassOnProperties(callingFlow)
64
+ //(<additionalParams>)
65
+ //(</additionalParams>)
66
+ )
67
+
86
68
  break
87
69
  }
88
70
  } else {
@@ -0,0 +1,64 @@
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
+ const { firstLetterUpperCase: upperCase } = require('../../../../../../MainLibs/src/Utils')
21
+ const {
22
+ SOURCE_PATH,
23
+ defaultIamRolePerAction,
24
+ createIamRole,
25
+ RESOURCE_CLASSES,
26
+ SNS_RESOURCE,
27
+ resourceNames,
28
+ DYNAMO_RESOURCE,
29
+ SAVE_FILE_NAME,
30
+ FUNCTION_NAME,
31
+ shortNameHandler,
32
+ externalResourceYaml,
33
+ SOURCE_GENERATE_IAM_ROLE
34
+ } = require('../../../../../../MainLibs/src/Consts');
35
+ const templatePath = path.join(__dirname, "template.ejs");
36
+
37
+ /**
38
+ * receive objectSchema
39
+ * create data for WebScoket handler template
40
+ *
41
+ * @param {Object} objectSchema
42
+ * @return {{templatePath, templateData,setting}}
43
+ */
44
+
45
+
46
+ function data(_izContext, flowSchema, srcPath) {
47
+ return [createParamsForCreateSource(_izContext, flowSchema, srcPath)]
48
+ }
49
+
50
+ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
51
+ let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopic)
52
+ let topicArn = Object.keys(flowSchema.flowSteps)[0];
53
+ return {
54
+ templatePath: templatePath,
55
+ templateData: {},
56
+ setting: {
57
+ savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
58
+ saveFileName: `${functionName}_Main`,
59
+ fileExtension: ".js",
60
+ isAppend: false
61
+ }
62
+ }
63
+ }
64
+ module.exports = data
@@ -0,0 +1,104 @@
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
16
+ <http: //www.gnu.org/licenses />.
17
+ */
18
+
19
+ 'use strict';
20
+
21
+ const hash = require("object-hash");
22
+ const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
23
+
24
+ const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
25
+ const snsSharedLib = require('@izara_project/izara-core-library-sns');
26
+ const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
27
+ const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
28
+ const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
29
+
30
+ const externalRequest = require('@izara_project/izara-core-library-external-request');
31
+ const sns = externalRequest.sns
32
+
33
+ const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
34
+ const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
35
+ const { v4: uuidv4 } = require('uuid')
36
+ const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
37
+ const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
38
+ /**
39
+ *
40
+ *
41
+ * description of function.
42
+ * @param {Object} _izContext
43
+ * @param {CorrelationIds} _izContext.correlationIds - property of _izContext
44
+ * @param {Logger} _izContext.logger - property of _izContext
45
+ * @param {Object} requestParams - request params
46
+ * @param {Object} requestParams.identifiers - identifiers for get data
47
+ * @param {Object} requestParams.additionalRequest - additionalRequest
48
+ *
49
+ *
50
+ * @returns {object} description of return value
51
+ */
52
+
53
+ module.exports.flowSchemaOwnTopic = async (
54
+ _izContext,
55
+ requestParams,
56
+ callingFlowConfig = {},
57
+ //(<additionalParams>)
58
+ //(</additionalParams>)
59
+ ) => {
60
+
61
+ try {
62
+ _izContext.logger.debug("WebSocketInvoke _izContext", _izContext)
63
+ _izContext.logger.debug("WebSocketInvoke requestParams", requestParams)
64
+ _izContext.logger.debug("WebSocketInvoke callingFlowConfig", callingFlowConfig)
65
+
66
+ let flowSchema = await getObjectSchema.getFlowSchemaS3WithCache(_izContext, {
67
+ flowTag: requestParams.flowTag,
68
+ serviceTag: process.env.iz_serviceTag
69
+ // serviceTag: "GenerateCodeTamplateBas002"
70
+ })
71
+
72
+ _izContext.logger.debug("flowSchema", flowSchema)
73
+
74
+
75
+ if (!flowSchema) {
76
+ throw new NoRetryError(`flowTag not found ${requestParams.flowTag}`)
77
+ }
78
+
79
+ let messageObject = {
80
+ requestParams:requestParams
81
+ }
82
+ // create callingFlow
83
+ messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
84
+ messageObject,
85
+ callingFlowSharedLib.addParentCallingFlowConfig(
86
+ callingFlowConfig,
87
+ callingFlowSharedLib.createCallingFlowConfig(
88
+ await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.flowSchemaOwnTopicComplete), {}
89
+ )
90
+ )
91
+ )
92
+
93
+ let sendMessageToCreateEndpoint = {
94
+ Message: JSON.stringify(messageObject),
95
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, )
96
+ }
97
+ _izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
98
+ await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
99
+
100
+ } catch (err) {
101
+ _izContext.logger.error('error WebSocketInvoke: ', err)
102
+ throw (err)
103
+ }
104
+ }
@@ -0,0 +1,115 @@
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
+ const { firstLetterUpperCase: upperCase } = require('../../../../../../MainLibs/src/Utils')
23
+ const {
24
+ SOURCE_PATH,
25
+ defaultIamRolePerAction,
26
+ createIamRole,
27
+ RESOURCE_CLASSES,
28
+ SNS_RESOURCE,
29
+ resourceNames,
30
+ DYNAMO_RESOURCE,
31
+ SAVE_FILE_NAME,
32
+ FUNCTION_NAME,
33
+ shortNameHandler,
34
+ externalResourceYaml,
35
+ SOURCE_GENERATE_IAM_ROLE
36
+ } = require('../../../../../../MainLibs/src/Consts');
37
+
38
+ const templatePath = path.join(__dirname, "./template.ejs");
39
+
40
+ /**
41
+ * receive objectSchema
42
+ * create data for WebScoket handler template
43
+ *
44
+ * @param {Object} objectSchema
45
+ * @return {{templatePath, templateData,setting}}
46
+ */
47
+
48
+ function data(_izContext, flowSchema, srcPath) {
49
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
50
+ }
51
+
52
+ function createSourceParams(_izContext, flowSchema, srcPath) {
53
+
54
+ let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopicComplete)
55
+ let handlerType = upperCase(HANDLER.hdrSqs)
56
+ let additionalResourcePermission = defaultIamRolePerAction();
57
+ let route = flowSchema.flowTag
58
+
59
+ additionalResourcePermission.push(
60
+ createIamRole(
61
+ {
62
+ [RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE)
63
+ },
64
+ [
65
+ resourceNames(RESOURCE_CLASSES.dynamoDbTable, "WebSocketTask")
66
+ ]
67
+ ),
68
+ createIamRole(
69
+ {
70
+ "execute-api": [
71
+ "ManageConnections"
72
+ ]
73
+ },
74
+ [
75
+ resourceNames(RESOURCE_CLASSES.webSocket)
76
+ ]
77
+ )
78
+ )
79
+
80
+ for (const flowStep of Object.keys(flowSchema.flowSteps)) {
81
+ if (flowStep.includes("In")) {
82
+ additionalResourcePermission.push(
83
+ createIamRole(
84
+ {
85
+ [RESOURCE_CLASSES.sns]: SNS_RESOURCE.publish
86
+ },
87
+ [
88
+ resourceNames(RESOURCE_CLASSES.sns, flowStep)
89
+ ]
90
+ )
91
+ )
92
+ }
93
+ }
94
+
95
+ return {
96
+ templatePath: templatePath,
97
+ templateData: {
98
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchemaOwnTopic, flowSchema.flowTag),
99
+ functionName,
100
+ handlerType,
101
+ additionalResourcePermission,
102
+ route,
103
+ functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
104
+ roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaOwnTopic
105
+ },
106
+ setting: {
107
+ savePath: path.join(srcPath, SOURCE_PATH.appYaml),
108
+ saveFileName: upperCase(SAVE_FILE_NAME.flowSchema),
109
+ fileExtension: ".yml",
110
+ isAppend: true
111
+ }
112
+ }
113
+ }
114
+
115
+ module.exports = data;
@@ -0,0 +1,20 @@
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) %>
8
+ batchSize: 10
9
+ filterPatterns: #**** need to update serverless framwork upper v.2.69.1
10
+ - body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
11
+ - body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
12
+ role: <%- roleName %>Role
13
+ #<#<%- functionName %><%- handlerType %>IamRole#>
14
+ #<#/<%- functionName %><%- handlerType %>IamRole#>
15
+ <%_ function firstLetterUpperCase(text){
16
+ return text.charAt(0).toUpperCase() + text.slice(1)
17
+ } _%>
18
+ <%_ function firstLetterLowerCase(str) {
19
+ return str.charAt(0).toLowerCase() + str.slice(1)
20
+ } _%>
@@ -0,0 +1,71 @@
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
+ const { firstLetterUpperCase: upperCase } = require('../../../../../../MainLibs/src/Utils')
21
+ const {
22
+ SOURCE_PATH,
23
+ defaultIamRolePerAction,
24
+ createIamRole,
25
+ RESOURCE_CLASSES,
26
+ SNS_RESOURCE,
27
+ resourceNames,
28
+ DYNAMO_RESOURCE,
29
+ SAVE_FILE_NAME,
30
+ FUNCTION_NAME,
31
+ shortNameHandler,
32
+ externalResourceYaml,
33
+ SOURCE_GENERATE_IAM_ROLE,
34
+ HANDLER
35
+ } = require('../../../../../../MainLibs/src/Consts');
36
+ const templatePath = path.join(__dirname, "./template.ejs")
37
+
38
+ /**
39
+ * receive objectSchema
40
+ * create data for WebScoket handler template
41
+ *
42
+ * @param {Object} objectSchema
43
+ * @return {{templatePath, templateData,setting}}
44
+ */
45
+
46
+
47
+ function data(_izContext, flowSchema, srcPath) {
48
+ return [createParamsForCreateSource(_izContext, flowSchema, srcPath)]
49
+ }
50
+
51
+ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
52
+ let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopicComplete)
53
+ let handlerType = upperCase(HANDLER.hdrSqs);
54
+ let route = flowSchema.flowTag
55
+
56
+ return {
57
+ templatePath: templatePath,
58
+ templateData: {
59
+ functionName,
60
+ handlerType,
61
+ route
62
+ },
63
+ setting: {
64
+ savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
65
+ saveFileName: `${functionName}_${handlerType}`,
66
+ fileExtension: ".js",
67
+ isAppend: false
68
+ }
69
+ }
70
+ }
71
+ module.exports = data