@izara_project/izara-market-library-service-schemas 1.0.30 → 1.0.32

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 (103) hide show
  1. package/package.json +9 -9
  2. package/src/GenerateCodeLibs/src/Consts.js +29 -13
  3. package/src/MainLibs/src/Consts.js +16 -6
  4. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +3 -6
  5. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +2 -3
  6. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +2 -2
  7. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +3 -3
  8. package/src/reStructure/TemplateData/EndpointPerService/yaml/data.js +10 -8
  9. package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +5 -5
  10. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +22 -0
  11. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +4 -4
  12. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +4 -4
  13. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +2 -2
  14. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +1 -1
  15. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +2 -2
  16. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +1 -1
  17. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +1 -1
  18. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +1 -1
  19. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +4 -4
  20. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +4 -4
  21. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +4 -4
  22. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +1 -1
  23. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +4 -4
  24. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +4 -4
  25. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +1 -1
  26. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +1 -2
  27. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +4 -4
  28. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +4 -4
  29. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +4 -4
  30. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +1 -1
  31. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/template.ejs +18 -18
  32. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +1 -1
  33. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +4 -4
  34. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +4 -4
  35. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +1 -1
  36. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/data.js +1 -1
  37. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +3 -3
  38. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +2 -0
  39. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/data.js +3 -2
  40. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +4 -16
  41. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +73 -0
  42. package/src/reStructure/TemplateData/flowSchema/{legacy/hookCode-old/queue/sqsTemplate.ejs → externalTopic/sns-in-sqs/template.ejs} +21 -11
  43. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +75 -0
  44. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/template.ejs +10 -0
  45. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/data.js +83 -0
  46. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/template.ejs +17 -0
  47. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/data.js +65 -0
  48. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/template copy.ejs +125 -0
  49. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/template.ejs +130 -0
  50. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/data.js +61 -0
  51. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/template.ejs +70 -0
  52. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/data.js +147 -0
  53. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/template.ejs +18 -0
  54. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/data.js +64 -0
  55. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/template.ejs +86 -0
  56. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/data.js +60 -0
  57. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/template.ejs +74 -0
  58. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +107 -0
  59. package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess → flowSchemaOwnTopic/EndpointComponent}/functionYaml/template.ejs +1 -14
  60. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +57 -0
  61. package/src/reStructure/TemplateData/flowSchema/{legacy/hookCode-old/handler/templateAsyncHandler.ejs → flowSchemaOwnTopic/EndpointComponent/handler/template.ejs} +11 -37
  62. package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess → flowSchemaOwnTopic/EndpointComponent}/mainFunction/data.js +20 -13
  63. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +73 -0
  64. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/data.js +117 -0
  65. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/template.ejs +24 -0
  66. package/src/reStructure/TemplateData/flowSchema/{legacy/hookCode-old/mainFunction → flowSchemaOwnTopic/FlowSchemaCompleteComponent/handler}/data.js +15 -24
  67. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/handler/template.ejs +84 -0
  68. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/mainFunction/data.js +52 -0
  69. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/mainFunction/template.ejs +88 -0
  70. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +117 -0
  71. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/template.ejs +24 -0
  72. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +57 -0
  73. package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess → flowSchemaOwnTopic/FlowSchemaComponent}/handler/template.ejs +16 -33
  74. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +66 -0
  75. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +104 -0
  76. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +96 -0
  77. package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +167 -99
  78. package/src/reStructure/TemplateData/generateRole/createSharedResource.js +20 -0
  79. package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +3 -3
  80. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +3 -3
  81. package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +13 -14
  82. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +3 -3
  83. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/functionYaml/data.js +0 -76
  84. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/handler/data.js +0 -46
  85. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/sns-sqs/data.js +0 -35
  86. package/src/reStructure/TemplateData/flowSchema/components/schema/inProcess/sns-sqs/template.ejs +0 -0
  87. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/data.js +0 -34
  88. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/functionYaml/template.ejs +0 -0
  89. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/data.js +0 -34
  90. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/handler/template.ejs +0 -0
  91. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/data.js +0 -34
  92. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/mainFunction/template.ejs +0 -0
  93. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/data.js +0 -34
  94. package/src/reStructure/TemplateData/flowSchema/components/schema/outComplete/sns-sqs/template.ejs +0 -0
  95. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/data.js +0 -101
  96. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/functionYaml/template.ejs +0 -43
  97. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/data.js +0 -93
  98. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/handler/templateSyncHandler.ejs +0 -49
  99. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/hookLogic/data.js +0 -64
  100. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/mainFunction/template.ejs +0 -30
  101. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/data.js +0 -124
  102. package/src/reStructure/TemplateData/flowSchema/legacy/hookCode-old/queue/snsTemplate.ejs +0 -59
  103. /package/src/reStructure/TemplateData/flowSchema/{components/schema/inProcess/mainFunction → flowSchemaOwnTopic/sns-in}/template.ejs +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-market-library-service-schemas",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Schemas for Izara Market project",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,15 +20,15 @@
20
20
  "testEnvironment": "node"
21
21
  },
22
22
  "dependencies": {
23
+ "@izara_project/izara-core-library-calling-flow": "^1.0.3",
23
24
  "@izara_project/izara-core-library-core": "^1.0.18",
24
- "@izara_project/izara-core-library-external-request": "^1.0.17",
25
- "@izara_project/izara-core-library-service-schemas": "^1.0.48",
26
- "@izara_project/izara-shared": "^1.0.125",
27
- "@izara_project/izara-shared-service-schemas": "^1.0.5",
28
- "@izara_project/izara-core-library-sns": "^1.0.3",
29
- "@izara_project/izara-core-library-sqs": "^1.0.3",
30
- "@izara_project/izara-core-library-calling-flow": "^1.0.2",
31
- "@izara_project/izara-core-library-logger": "^1.0.6",
25
+ "@izara_project/izara-core-library-external-request": "^1.0.18",
26
+ "@izara_project/izara-core-library-logger": "^1.0.7",
27
+ "@izara_project/izara-core-library-service-schemas": "^1.0.49",
28
+ "@izara_project/izara-core-library-sns": "^1.0.4",
29
+ "@izara_project/izara-core-library-sqs": "^1.0.4",
30
+ "@izara_project/izara-shared": "^1.0.126",
31
+ "@izara_project/izara-shared-service-schemas": "^1.0.6",
32
32
  "ejs": "^3.1.10",
33
33
  "js-beautify": "^1.15.4",
34
34
  "lodash": "^4.17.21",
@@ -28,19 +28,34 @@ const PREFIX = {
28
28
  getRel: "getRelationshipEndpoint"
29
29
  }
30
30
 
31
+ // const TOPIC_NAME_GRAPH_HANDLER = {
32
+ // inUpdateRel: "InUpdateRelationship",
33
+ // inCreateRel: "InCreateRelationshipV2",
34
+ // outUpdateRel: "OutUpdateRelationship",
35
+ // outCreateRel: "OutCreateRelationship",
36
+ // inDeleteRel: "InDeleteRelationshipV2",
37
+ // outDeleteRel: "OutDeleteRelationshipV2",
38
+ // inUpdateNode: "InUpdateNode",
39
+ // outUpdateNode: "OutUpdateNode",
40
+ // inCreateNode: "InCreateNodeV2",
41
+ // outCreateNode: "OutCreateNodeV2",
42
+ // inDeleteNode: "InDeleteNodeV2",
43
+ // outDeleteNode: "OutDeleteNodeV2",
44
+ // }
45
+
31
46
  const TOPIC_NAME_GRAPH_HANDLER = {
32
- inUpdateRel: "InUpdateRelationship",
33
- inCreateRel: "InCreateRelationshipV2",
34
- outUpdateRel: "OutUpdateRelationship",
35
- outCreateRel: "OutCreateRelationship",
36
- inDeleteRel: "InDeleteRelationshipV2",
37
- outDeleteRel: "OutDeleteRelationshipV2",
38
- inUpdateNode: "InUpdateNode",
39
- outUpdateNode: "OutUpdateNode",
40
- inCreateNode: "InCreateNodeV2",
41
- outCreateNode: "OutCreateNodeV2",
42
- inDeleteNode: "InDeleteNodeV2",
43
- outDeleteNode: "OutDeleteNodeV2",
47
+ inUpdateRel: "UpdateRelationship_In",
48
+ inCreateRel: "CreateRelationship_In",
49
+ outUpdateRel: "UpdateRelationship_Out",
50
+ outCreateRel: "CreateRelationship_Out",
51
+ inDeleteRel: "DeleteRelationship_In",
52
+ outDeleteRel: "DeleteRelationship_Out",
53
+ inUpdateNode: "UpdateNode_In",
54
+ outUpdateNode: "UpdateNode_Out",
55
+ inCreateNode: "CreateNode_In",
56
+ outCreateNode: "CreateNode_Out",
57
+ inDeleteNode: "DeleteNode_In",
58
+ outDeleteNode: "DeleteNode_Out"
44
59
  }
45
60
 
46
61
  const TOPIC_NAME_GENERATE_CODE = {
@@ -61,7 +76,8 @@ const TOPIC_NAME_GENERATE_CODE = {
61
76
  getNodeComplete: "GetNodeComplete",
62
77
  outGetNodeComplete: "GetNodeComplete_Out",
63
78
  reservedLimitComplete: "ReservedLimitComplete",
64
- createPresignUrl: "CreatePresignUrl"
79
+ createPresignUrl: "CreatePresignUrl",
80
+ flowSchemaOwnTopicComplete: "FlowSchemaOwnTopicComplete"
65
81
  }
66
82
 
67
83
  const GRAPH_HANDLER_SERVICE_NAME = {
@@ -111,12 +111,15 @@ const SOURCE_PATH = {
111
111
  translateIdsRequestFile: '../src/generatedCode/TranslateId/source/',
112
112
  processLogical: "../src/generatedCode/ProcessLogical/source/",
113
113
  resourceLocationPerAction: 'src/generatedCode/ObjectTypePerActionEndpoint/source/',
114
- resourceLocationFindData: 'src/generatedCode/FindData/source',
114
+ resourceLocationFindData: 'src/generatedCode/FindData/source/',
115
+ resourceLocationFindData: 'src/generatedCode/FindData/source/',
115
116
  resourceLocationRelationshipPerAction: 'src/generatedCode/RelationshipPerAction/source/',
116
117
  resourceLocationTranslateId: 'src/generatedCode/TranslateId/source/',
117
118
  resourceLocationProcessLogical: "src/generatedCode/ProcessLogical/source/",
118
- webSocket: "../src/generatedCode/FlowSchema/source/",
119
- resourceLocationWebSocket: "src/generatedCode/FlowSchema/source/",
119
+ webSocket: "../src/generatedCode/FlowSchema/UploadS3/",
120
+ resourceLocationWebSocket: "src/generatedCode/FlowSchema/UploadS3/",
121
+ flowSchemaOwnTopic: "../src/generatedCode/FlowSchema/FlowSchemaOwnTopic/",
122
+ resourceLocationFlowSchemaOwnTopic: "src/generatedCode/flowSchemaOwnTopic/",
120
123
  generateCodeLib: "../src/generatedCode/libs/source/",
121
124
  logicalFunctionHook: "../src/generatedCode/WebSocket/source/FlowSchemaHook/HookLogicFunction/source/",
122
125
  resourceLocationLogicalFunctionHook: "src/generatedCode/WebSocket/source/FlowSchemaHook/HookLogicFunction/source",
@@ -187,7 +190,7 @@ function externalResourceName(resourceClass, resourceName, serviceTag) {
187
190
  // [RESOURCE_CLASSES.dynamoDbAcrossService]: "arn:aws:dynamodb:${process.env.iz_region}:${process.env.iz_accountId}:table/*/" + `${resourceName}`,
188
191
  [RESOURCE_CLASSES.dynamoDbAcrossService]: "arn:aws:dynamodb:${process.env.iz_region}:${process.env.iz_accountId}:table/" + `"${serviceTag}"` + `"${resourceName}"`,
189
192
  [RESOURCE_CLASSES.lambda]: "arn:aws:lambda:${process.env.iz_region}:${process.env.iz_accountId}:function:${await lambdaSharedLib.lambdaFunctionName(_izContext, " + `"${resourceName}" ,"${serviceTag}")}`,
190
- [RESOURCE_CLASSES.sns]: "arn:aws:sns:${process.env.iz_region}:${process.env.iz_accountId}:${await snsSharedLib.snsTopicName(_izContext, " + `"${resourceName}", "${serviceTag}")}`
193
+ [RESOURCE_CLASSES.sns]: "arn:aws:sns:${process.env.iz_region}:${process.env.iz_accountId}:${await snsSharedLib.snsTopicNameByFlowSchema(_izContext, " + `"${resourceName}", "${serviceTag}")}`
191
194
 
192
195
  }[resourceClass]
193
196
  };
@@ -250,7 +253,11 @@ const FUNCTION_NAME = {
250
253
  getRel: "getRelationship",
251
254
  getRelComplete: "getRelationshipComplete",
252
255
  reservedLimit: "reservedLimit",
253
- createPresignUrl: "createPresignUrl"
256
+ createPresignUrl: "createPresignUrl",
257
+ flowSchemaOwnTopic: "flowSchemaOwnTopic",
258
+ flowSchemaOwnTopicComplete: "flowSchemaOwnTopicComplete",
259
+ flowSchemaOwnTopicEndpoint: "flowSchemaOwnTopicEndpoint",
260
+ flowSchemaExternalTopic: "externalTopic",
254
261
  };
255
262
 
256
263
  const SHORT_FUNCTION_NAME = {
@@ -366,7 +373,10 @@ const SOURCE_GENERATE_IAM_ROLE = {
366
373
  RelationshipRole: "Relationship",
367
374
  RelationshipCompleteRole: "RelationshipCom",
368
375
  FlowSchemaUploadS3Role: "FlowSchemaUploadS3",
369
- perActionEndpoint: "PerActionEndpoint"
376
+ FlowSchemaOwnTopic: "FlowSchemaOwnTopic",
377
+ FlowSchemaOwnTopic: "FlowSchemaOwnTopic",
378
+ perActionEndpoint: "PerActionEndpoint",
379
+ ExternalTopicRole: "ExternalTopic",
370
380
  };
371
381
 
372
382
  const ADD_ON_DATA_STRUCTURE_TYPE = {
@@ -205,9 +205,6 @@ module.exports.createMain = async (
205
205
  }
206
206
  })
207
207
  );
208
- if (serviceTag.includes(GRAPH_HANDLER_SERVICE_NAME.graphHandler)) {
209
- filteredRequiredOnCreatedLinks.push(requiredLink);
210
- }
211
208
  })
212
209
  )
213
210
  _izContext.logger.debug("filteredRequiredOnCreatedLinks", filteredRequiredOnCreatedLinks);
@@ -530,7 +527,7 @@ module.exports.createMain = async (
530
527
 
531
528
  let messageToCreateObject = {
532
529
  Message: JSON.stringify(messageObject),
533
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName)
530
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inCreateNode, graphServiceName)
534
531
  };
535
532
  _izContext.logger.debug("RequestParams before send to sqs messageToCreateObject ::::::: ", messageToCreateObject);
536
533
  await sns.publishAsync(_izContext, messageToCreateObject);
@@ -567,7 +564,7 @@ module.exports.createMain = async (
567
564
  let sendMessageOutCreateObjectComplete = {
568
565
  Message: JSON.stringify(messageObject),
569
566
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
570
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
567
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
571
568
  };
572
569
  _izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
573
570
  await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
@@ -599,7 +596,7 @@ module.exports.createMain = async (
599
596
  messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
600
597
 
601
598
  let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
602
- let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
599
+ let outCreateNodeCompleteTopic = await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
603
600
  let messageParams = {
604
601
  Message: JSON.stringify(messageObject),
605
602
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
@@ -23,7 +23,6 @@ const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-
23
23
  const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
24
24
 
25
25
  const sns = require('@izara_project/izara-core-library-external-request/src/resources/Sns');
26
- const snsSharedLib = require('@izara_project/izara-shared/src/SnsSharedLib');
27
26
  const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
28
27
  const serviceConfigLib = require('@izara_project/izara-core-library-service-schemas/src/ServiceConfig')
29
28
 
@@ -108,7 +107,7 @@ module.exports.deleteMain = async (
108
107
  let messageParams = {
109
108
  Message: JSON.stringify(deleteNodeCompleteMessage),
110
109
  MessageAttribute: sns.createStringMessageAttributes(_izContext, messageAttributes),
111
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.deleteNodeComplete)
110
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outDeleteNodeComplete)
112
111
  }
113
112
 
114
113
  _izContext.logger.debug("messageParams OutDeleteNodeComplete::", messageParams);
@@ -160,7 +159,7 @@ module.exports.deleteMain = async (
160
159
  let deleteNodeMessageBody = {
161
160
  Message: JSON.stringify(deleteNodeParams),
162
161
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
163
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inDeleteNode, storageTag)
162
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inDeleteNode, storageTag)
164
163
  }
165
164
 
166
165
  _izContext.logger.debug("request message params before send to IndeleteNode::", deleteNodeMessageBody);
@@ -160,7 +160,7 @@ module.exports.getMain = async (
160
160
  messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
161
161
 
162
162
  let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
163
- let outGetNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outGetNodeComplete)
163
+ let outGetNodeCompleteTopic = await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outGetNodeComplete)
164
164
  let messageParams = {
165
165
  Message: JSON.stringify(messageObject),
166
166
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
@@ -168,7 +168,7 @@ module.exports.getMain = async (
168
168
  };
169
169
 
170
170
  _izContext.logger.debug("messageParams OutUpdateNode ::::::: ", messageParams);
171
- await sns.publishAsync(_izContext, messageParams);
171
+ await sns.publishAsync(_izContext, messageParams);
172
172
  }
173
173
 
174
174
 
@@ -176,7 +176,7 @@ module.exports.updateMain = async (
176
176
  let messageParams = {
177
177
  Message: JSON.stringify(updateNodeCompleteMessage),
178
178
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
179
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete),
179
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete),
180
180
  };
181
181
 
182
182
  _izContext.logger.debug("messageParams OutUpdateNodeComplete ::::::: ", messageParams);
@@ -249,7 +249,7 @@ module.exports.updateMain = async (
249
249
  let updateNodeMessageBody = {
250
250
  Message: JSON.stringify(updateNodeParams),
251
251
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
252
- TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateNode, storageTag,)
252
+ TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateNode, storageTag,)
253
253
  }
254
254
 
255
255
  _izContext.logger.debug('requset param before send to topic InUpdateNode:::', updateNodeMessageBody);
@@ -295,7 +295,7 @@ module.exports.updateMain = async (
295
295
  let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
296
296
 
297
297
  _izContext.logger.debug("after create callingFlow", messageObject)
298
- let outUpdateNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete);
298
+ let outUpdateNodeCompleteTopic = await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete);
299
299
  let messageParams = {
300
300
  Message: JSON.stringify(messageObject),
301
301
  MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
@@ -72,16 +72,18 @@ async function createParamForCreateSource(_izContext, allObjSchemas, action, han
72
72
 
73
73
  let storageResourceAllLocalObjectSchemas = await getStorageResourceFromObjectSchemas(_izContext, allObjSchemas)
74
74
 
75
- additionalResourcePermission.push(
76
- createIamRole(
77
- {
78
- [RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE),
79
- },
80
- storageResourceAllLocalObjectSchemas.resourceDynamoTableName.map(tableName =>
81
- resourceNames(RESOURCE_CLASSES.dynamoDbTable, tableName)
75
+ if (storageResourceAllLocalObjectSchemas.resourceDynamoTableName.length) {
76
+ additionalResourcePermission.push(
77
+ createIamRole(
78
+ {
79
+ [RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE),
80
+ },
81
+ storageResourceAllLocalObjectSchemas.resourceDynamoTableName.map(tableName =>
82
+ resourceNames(RESOURCE_CLASSES.dynamoDbTable, tableName)
83
+ )
82
84
  )
83
85
  )
84
- )
86
+ }
85
87
 
86
88
  function httpEvent(lambdaAction) {
87
89
  return {
@@ -115,7 +115,7 @@ async function externalLambdaIamRoleDataPerAction(_izContext, allObjSchemas) {
115
115
  [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
116
116
  },
117
117
  storageResourceAllLocalObjectSchemas.resourceGraphServiceTag.map(graphServiceName =>
118
- externalResourceName(RESOURCE_CLASSES.sns, "InUpdateNode", graphServiceName)
118
+ externalResourceName(RESOURCE_CLASSES.sns, "UpdateNode_In", graphServiceName)
119
119
  )
120
120
  ),
121
121
  createIamRole(
@@ -123,7 +123,7 @@ async function externalLambdaIamRoleDataPerAction(_izContext, allObjSchemas) {
123
123
  [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
124
124
  },
125
125
  storageResourceAllLocalObjectSchemas.resourceGraphServiceTag.map(graphServiceName =>
126
- externalResourceName(RESOURCE_CLASSES.sns, "InCreateNodeV2", graphServiceName)
126
+ externalResourceName(RESOURCE_CLASSES.sns, "CreateNode_In", graphServiceName)
127
127
  )
128
128
  )
129
129
  )
@@ -151,7 +151,7 @@ async function externalLamdaIamRoleRelationships(_izContext, allRelSchemas) {
151
151
  [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
152
152
  },
153
153
  graphServiceNamesFromAllRelSchemas.map(graphServiceName =>
154
- externalResourceName(RESOURCE_CLASSES.sns, "InUpdateRelationship", graphServiceName)
154
+ externalResourceName(RESOURCE_CLASSES.sns, "UpdateRelationship_In", graphServiceName)
155
155
  )
156
156
  ),
157
157
  createIamRole(
@@ -159,7 +159,7 @@ async function externalLamdaIamRoleRelationships(_izContext, allRelSchemas) {
159
159
  [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
160
160
  },
161
161
  graphServiceNamesFromAllRelSchemas.map(graphServiceName =>
162
- externalResourceName(RESOURCE_CLASSES.sns, "InCreateRelationshipV2", graphServiceName)
162
+ externalResourceName(RESOURCE_CLASSES.sns, "CreateRelationship_In", graphServiceName)
163
163
  )
164
164
  ),
165
165
  createIamRole(
@@ -167,7 +167,7 @@ async function externalLamdaIamRoleRelationships(_izContext, allRelSchemas) {
167
167
  [RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
168
168
  },
169
169
  graphServiceNamesFromAllRelSchemas.map(graphServiceName =>
170
- externalResourceName(RESOURCE_CLASSES.sns, "InDeleteRelationshipV2", graphServiceName)
170
+ externalResourceName(RESOURCE_CLASSES.sns, "DeleteRelationship_In", graphServiceName)
171
171
  )
172
172
  ),
173
173
  createIamRole(
@@ -75,6 +75,10 @@ const createExternalSnsSubscriptions = async (_izContext, allObjSchemas, allRelS
75
75
  const snsServiceConfigForConfirmReserved = await snsSubscriptionConfirmReserved(_izContext);
76
76
  snsServiceConfigForConfirmReserved && snsServiceConfigArray.push(snsServiceConfigForConfirmReserved);
77
77
  }
78
+ if (event.includes("extTopic")) {
79
+ const snsServiceConfigForExtTopic = await snsSubscriptionFlowSchemaExternalTopic(_izContext, localFlowSchema);
80
+ snsServiceConfigForExtTopic && snsServiceConfigArray.push(snsServiceConfigForExtTopic);
81
+ }
78
82
  }
79
83
  }
80
84
  }
@@ -176,4 +180,22 @@ function snsSubscriptionConfirmReserved(_izContext) {
176
180
  }
177
181
  }
178
182
 
183
+ function snsSubscriptionFlowSchemaExternalTopic(_izContext, localFlowSchema) {
184
+ const flowSteps = Object.keys(localFlowSchema.flowSteps || {});
185
+ const lastIndex = flowSteps.length - 1;
186
+
187
+ if (lastIndex >= 0) {
188
+ const flowStep = flowSteps[lastIndex];
189
+ const splitFlowStepKey = flowStep.split("_");
190
+
191
+ return {
192
+ serviceNames: [splitFlowStepKey[0]],
193
+ topicName: splitFlowStepKey[2],
194
+ sqsEndpoint: splitFlowStepKey[3]
195
+ };
196
+ }
197
+
198
+ return null;
199
+ }
200
+
179
201
  module.exports = createExternalSnsSubscriptions;
@@ -49,11 +49,11 @@ const {
49
49
  * @return {{ templatePath, templateData, setting } }
50
50
  */
51
51
 
52
- function data(_izContext, srcPath) {
53
- return [createSourceParams(_izContext, srcPath)]
52
+ function data(_izContext, flowSchema, srcPath) {
53
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
54
54
  }
55
55
 
56
- function createSourceParams(_izContext, srcPath) {
56
+ function createSourceParams(_izContext, flowSchema, srcPath) {
57
57
  let functionName = "ConfirmNewReserved";
58
58
  let handlerType = upperCase(HANDLER.hdrSqs);
59
59
  let additionalResourcePermission = defaultIamRolePerAction();
@@ -104,7 +104,7 @@ function createSourceParams(_izContext, srcPath) {
104
104
  functionName,
105
105
  handlerType,
106
106
  functionNameConfig: functionName + upperCase(handlerType),
107
- resourceLocation: SOURCE_PATH.resourceLocationWebSocket,
107
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationWebSocket, flowSchema.flowTag, "source/"),
108
108
  additionalResourcePermission,
109
109
  functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
110
110
  roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role
@@ -30,11 +30,11 @@ const { HANDLER, SOURCE_PATH } = require('../../../../../../../MainLibs/src/Cons
30
30
  * @return {{ templatePath, templateData, setting } }
31
31
  */
32
32
 
33
- function data(_izContext, srcPath) {
34
- return [createSourceParams(_izContext, srcPath)]
33
+ function data(_izContext, flowSchema, srcPath) {
34
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
35
35
  }
36
36
 
37
- function createSourceParams(_izContext, srcPath) {
37
+ function createSourceParams(_izContext, flowSchema, srcPath) {
38
38
  let functionName = "ConfirmNewReserved";
39
39
  let handlerType = upperCase(HANDLER.hdrSqs);
40
40
 
@@ -46,7 +46,7 @@ function createSourceParams(_izContext, srcPath) {
46
46
  },
47
47
  setting: {
48
48
  saveFileName: `${functionName}_${handlerType}`,
49
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
49
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
50
50
  fileExtension: ".js",
51
51
  isAppend: true
52
52
  }
@@ -34,14 +34,14 @@ function data(_izContext, flowSchema, srcPath) {
34
34
  return [createSourceParams(_izContext, flowSchema, srcPath)]
35
35
  }
36
36
 
37
- function createSourceParams(_izContext, srcPath) {
37
+ function createSourceParams(_izContext, flowSchema, srcPath) {
38
38
  let functionName = "ConfirmNewReserved"
39
39
  return {
40
40
  templatePath: templatePath,
41
41
  templateData: {},
42
42
  setting: {
43
43
  saveFileName: `${functionName}_Main`,
44
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
44
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
45
45
  fileExtension: ".js",
46
46
  isAppend: false
47
47
  }
@@ -21,7 +21,7 @@ const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb')
21
21
  const snsSharedLib = require('@izara_project/izara-core-library-sns')
22
22
  const sns = require('@izara_project/izara-core-library-external-request').sns
23
23
  const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
24
- const { getNestObject } = require('../../libs/source/ImportDataLib')
24
+ const { getNestObject } = require('../../libs/source/GenerateCodeLibs')
25
25
  /**
26
26
  * description of function.
27
27
  * @param {Object} _izContext
@@ -53,7 +53,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
53
53
  let functionName = upperCase(FUNCTION_NAME.createObjectS3)
54
54
  let handlerType = upperCase("hdrWbs")
55
55
  let additionalResourcePermission = defaultIamRolePerAction();
56
- let route = "webSocket"
56
+ let route = flowSchema.flowTag;
57
57
 
58
58
  additionalResourcePermission.push(
59
59
  createIamRole(
@@ -96,7 +96,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
96
96
  return {
97
97
  templatePath: templatePath,
98
98
  templateData: {
99
- resourceLocation: SOURCE_PATH.resourceLocationWebSocket,
99
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationWebSocket, flowSchema.flowTag, "source/"),
100
100
  functionName,
101
101
  handlerType,
102
102
  additionalResourcePermission,
@@ -46,7 +46,7 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
46
46
  handlerType
47
47
  },
48
48
  setting: {
49
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
49
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
50
50
  saveFileName: `${functionName}_${handlerType}`,
51
51
  fileExtension: ".js",
52
52
  isAppend: false
@@ -26,7 +26,7 @@ const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-
26
26
  const hash = require('object-hash')
27
27
  // const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
28
28
  const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
29
- const { postToConnection } = require("../../libs/source/ImportDataLib");
29
+ const { postToConnection } = require("../../libs/source/GenerateCodeLibs");
30
30
  const createObject = require('./CreateObjectS3_Main');
31
31
  module.exports.main = middleware.wrap(async (event, context, callback) => {
32
32
 
@@ -44,7 +44,7 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
44
44
  templatePath: templatePath,
45
45
  templateData: {},
46
46
  setting: {
47
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
47
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
48
48
  saveFileName: `${functionName}_Main`,
49
49
  fileExtension: ".js",
50
50
  isAppend: false
@@ -47,11 +47,11 @@ const {
47
47
  * @param {Object} objectSchemas
48
48
  * @return {{ templatePath, templateData, setting } }
49
49
  */
50
- function data(_izContext, srcPath) {
51
- return [createSourceParams(_izContext, srcPath)]
50
+ function data(_izContext, flowSchema, srcPath) {
51
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
52
52
  }
53
53
 
54
- function createSourceParams(_izContext, srcPath) {
54
+ function createSourceParams(_izContext, flowSchema, srcPath) {
55
55
  let functionName = upperCase(FUNCTION_NAME.createObjectS3Complete);
56
56
  let handlerType = upperCase(HANDLER.hdrSqs);
57
57
  let additionalResourcePermission = defaultIamRolePerAction();
@@ -98,7 +98,7 @@ function createSourceParams(_izContext, srcPath) {
98
98
  return {
99
99
  templatePath: templatePath,
100
100
  templateData: {
101
- resourceLocation: SOURCE_PATH.resourceLocationWebSocket,
101
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationWebSocket, flowSchema.flowTag, "source/"),
102
102
  functionName: functionName,
103
103
  handlerType: handlerType,
104
104
  additionalResourcePermission: additionalResourcePermission,
@@ -45,11 +45,11 @@ const {
45
45
  * @param {Object} objectSchemas
46
46
  * @return {{ templatePath, templateData, setting } }
47
47
  */
48
- function data(_izContext, srcPath) {
49
- return [createSourceParams(_izContext, srcPath)]
48
+ function data(_izContext, flowSchema, srcPath) {
49
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
50
50
  }
51
51
 
52
- function createSourceParams(_izContext, srcPath) {
52
+ function createSourceParams(_izContext, flowSchema, srcPath) {
53
53
  let functionName = upperCase(FUNCTION_NAME.createObjectS3Complete)
54
54
  let handlerType = upperCase(HANDLER.hdrSqs)
55
55
  return {
@@ -59,7 +59,7 @@ function createSourceParams(_izContext, srcPath) {
59
59
  handlerType,
60
60
  },
61
61
  setting: {
62
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
62
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
63
63
  saveFileName: `${functionName}_${handlerType}`,
64
64
  fileExtension: ".js",
65
65
  isAppend: false
@@ -32,11 +32,11 @@ const { firstLetterUpperCase: upperCase } = require('../../../../../../../MainLi
32
32
  * @param {Object} objectSchemas
33
33
  * @return {{ templatePath, templateData, setting } }
34
34
  */
35
- function data(_izContext, srcPath) {
36
- return [createSourceParams(_izContext, srcPath)]
35
+ function data(_izContext, flowSchema, srcPath) {
36
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
37
37
  }
38
38
 
39
- function createSourceParams(_izContext, srcPath) {
39
+ function createSourceParams(_izContext, flowSchema, srcPath) {
40
40
  let functionName = upperCase(FUNCTION_NAME.createObjectS3Complete)
41
41
  return {
42
42
  templatePath: templatePath,
@@ -44,7 +44,7 @@ function createSourceParams(_izContext, srcPath) {
44
44
  functionName,
45
45
  },
46
46
  setting: {
47
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
47
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
48
48
  saveFileName: `${functionName}_Main`,
49
49
  fileExtension: ".js",
50
50
  isAppend: false
@@ -21,7 +21,7 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
21
21
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
22
22
  let coreConsts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
23
23
 
24
- const { postToConnection } = require('../../libs/source/ImportDataLib')
24
+ const { postToConnection } = require('../../libs/source/GenerateCodeLibs')
25
25
  module.exports.webSocketTaskComplete = async (
26
26
  _izContext,
27
27
  objType,
@@ -54,11 +54,11 @@ const {
54
54
  * @return {{ templatePath, templateData, setting } }
55
55
  */
56
56
 
57
- function data(_izContext, srcPath) {
58
- return [createSourceParams(_izContext, srcPath)]
57
+ function data(_izContext, flowSchema, srcPath) {
58
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
59
59
  }
60
60
 
61
- function createSourceParams(_izContext, srcPath) {
61
+ function createSourceParams(_izContext, flowSchema, srcPath) {
62
62
  let functionName = upperCase(FUNCTION_NAME.createPresignUrl);
63
63
  let handlerType = upperCase(HANDLER.hdrSqs);
64
64
  let additionalResourcePermission = defaultIamRolePerAction();
@@ -118,7 +118,7 @@ function createSourceParams(_izContext, srcPath) {
118
118
  functionName,
119
119
  handlerType,
120
120
  functionNameConfig: functionName + upperCase(handlerType),
121
- resourceLocation: SOURCE_PATH.resourceLocationWebSocket,
121
+ resourceLocation: path.join(SOURCE_PATH.resourceLocationWebSocket, flowSchema.flowTag, "source/"),
122
122
  additionalResourcePermission,
123
123
  functionNameConfig: upperCase("ReservedLimitComp") + upperCase(shortNameHandler(handlerType)),
124
124
  roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role
@@ -31,11 +31,11 @@ const { HANDLER, SOURCE_PATH, FUNCTION_NAME } = require('../../../../../../../..
31
31
  * @return {{ templatePath, templateData, setting } }
32
32
  */
33
33
 
34
- function data(_izContext, srcPath) {
35
- return [createSourceParams(_izContext, srcPath)]
34
+ function data(_izContext, flowSchema, srcPath) {
35
+ return [createSourceParams(_izContext, flowSchema, srcPath)]
36
36
  }
37
37
 
38
- function createSourceParams(_izContext, srcPath) {
38
+ function createSourceParams(_izContext, flowSchema, srcPath) {
39
39
  let functionName = upperCase(FUNCTION_NAME.createPresignUrl);
40
40
  let handlerType = upperCase(HANDLER.hdrSqs);
41
41
 
@@ -47,7 +47,7 @@ function createSourceParams(_izContext, srcPath) {
47
47
  },
48
48
  setting: {
49
49
  saveFileName: `${functionName}_${handlerType}`,
50
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
50
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
51
51
  fileExtension: ".js",
52
52
  isAppend: true
53
53
  }
@@ -44,7 +44,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
44
44
  },
45
45
  setting: {
46
46
  saveFileName: `${functionName}_Main`,
47
- savePath: path.join(srcPath, SOURCE_PATH.webSocket),
47
+ savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
48
48
  fileExtension: ".js",
49
49
  isAppend: false
50
50
  }