@izara_project/izara-market-library-service-schemas 1.0.35 → 1.0.37

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 (139) hide show
  1. package/package.json +8 -7
  2. package/src/GenerateCodeLibs/src/Consts.js +2 -2
  3. package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +3 -2
  4. package/src/MainLibs/src/Consts.js +8 -8
  5. package/src/MainLibs/src/GenerateCodeUtils.js +3 -1
  6. package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/generateTemplateData.js +35 -20
  7. package/src/TemplateManager/src/attributeTreeSchema/referenceRelationshipSchema/data.js +84 -0
  8. package/src/TemplateManager/src/attributeTreeSchema/referenceRelationshipSchema/tempReferenceRelationshipSchema.ejs +9 -0
  9. package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/relationshipSchema/data.js +1 -1
  10. package/src/TemplateManager/src/flowSchema/DefaultWebSocketResource/webSocketConnect/handler/template.ejs +1 -1
  11. package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/handler/template.ejs +1 -1
  12. package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/handler/template.ejs +1 -1
  13. package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/mainFunction/template.ejs +1 -1
  14. package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/mainFunction/template.ejs +1 -1
  15. package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/mainFunction/template.ejs +1 -1
  16. package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/mainFunction/template.ejs +1 -1
  17. package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/libs/template.ejs +1 -1
  18. package/src/reStructure/SchemaConfig.js +1 -4
  19. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +701 -0
  20. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +35 -163
  21. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +3 -1
  22. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +3 -4
  23. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +3 -1
  24. package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +45 -19
  25. package/src/reStructure/TemplateData/externalService/lambdaRole/template.ejs +5 -2
  26. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +24 -14
  27. package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/template.ejs +4 -1
  28. package/src/reStructure/TemplateData/findData/GetByStorage/getByGraph.ejs +4 -3
  29. package/src/reStructure/TemplateData/findData/handler/template.ejs +2 -1
  30. package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +4 -10
  31. package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +69 -34
  32. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +1 -1
  33. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +3 -2
  34. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +3 -12
  35. package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +2 -2
  36. package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +18 -2
  37. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +10 -7
  38. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +2 -2
  39. package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +1 -1
  40. package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +2 -2
  41. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/data.js +12 -4
  42. package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +14 -9
  43. package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +1 -1
  44. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/functionYaml/data.js +16 -40
  45. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/functionYaml/template.ejs +9 -9
  46. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/handler/data.js +1 -1
  47. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/data.js +3 -3
  48. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/template.ejs +78 -27
  49. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/dynamoDB/register.js +82 -0
  50. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/sns-in/data.js +1 -1
  51. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/sns-in/template.ejs +34 -1
  52. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/storedCacheTemplate.ejs +9 -32
  53. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/subscriptionOutAll/data.js +30 -20
  54. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/subscriptionOutAll/template.ejs +6 -6
  55. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/functionYaml/data.js +32 -32
  56. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/functionYaml/template.ejs +5 -5
  57. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/handler/template.ejs +8 -9
  58. package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/mainFunction/template.ejs +116 -26
  59. package/src/reStructure/TemplateData/flowSchema/dynamoDb/data.js +83 -44
  60. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +4 -5
  61. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/template.ejs +1 -7
  62. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +6 -4
  63. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/template.ejs +2 -4
  64. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/data.js +31 -3
  65. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/template.ejs +4 -4
  66. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/data.js +7 -8
  67. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/template.ejs +13 -13
  68. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/data.js +4 -4
  69. package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/template.ejs +43 -39
  70. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/data.js +5 -7
  71. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/template.ejs +2 -2
  72. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/data.js +2 -9
  73. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/template.ejs +46 -48
  74. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/data.js +5 -4
  75. package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/template.ejs +3 -11
  76. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +17 -3
  77. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +2 -2
  78. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +6 -2
  79. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +49 -84
  80. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +60 -10
  81. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +1 -1
  82. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +7 -3
  83. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +1 -1
  84. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/data.js +22 -7
  85. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +27 -34
  86. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/data.js +21 -5
  87. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/template.ejs +1 -3
  88. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/handler/data.js +2 -2
  89. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/handler/template.ejs +5 -5
  90. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/mainFunction/data.js +5 -3
  91. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/mainFunction/template.ejs +10 -6
  92. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +6 -3
  93. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/template.ejs +0 -2
  94. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +2 -2
  95. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +4 -4
  96. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +8 -3
  97. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +21 -14
  98. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +23 -8
  99. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +11 -6
  100. package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +50 -45
  101. package/src/reStructure/TemplateData/generateRole/createSharedResource.js +3 -2
  102. package/src/reStructure/TemplateData/generateRole/sharedResourceTemplate.ejs +2 -28
  103. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +1 -1
  104. package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +10 -9
  105. package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +6 -2
  106. package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +3 -2
  107. package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +3 -2
  108. package/src/reStructure/TemplateData/perActionEndpoint/libs/template.ejs +1 -1
  109. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +1 -1
  110. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +1 -1
  111. package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +1 -1
  112. package/src/reStructure/TemplateData/processLogical/mainFunction/template.ejs +1 -0
  113. package/src/reStructure/TemplateData/{propertyNodeSchema → propertyValueSchema}/generateTemplateData.js +4 -4
  114. package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/data.js +131 -0
  115. package/src/reStructure/TemplateData/{propertyNodeSchema/relationshipPropertyNodeSchema → propertyValueSchema/relationshipPropertyValueSchema}/data.js +32 -55
  116. package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/tempRelationship.ejs +13 -0
  117. package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/templateRelationshipPropertyValueSchema.ejs +7 -0
  118. package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +3 -2
  119. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +3 -2
  120. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +3 -2
  121. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +5 -5
  122. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +6 -5
  123. package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +3 -3
  124. package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +4 -4
  125. package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +5 -4
  126. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +3 -2
  127. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +3 -2
  128. package/src/reStructure/TemplateData/resourceYaml/dynamodb/template.ejs +1 -3
  129. package/src/reStructure/TemplateData/resourceYaml/filterGenerateResource/data.js +61 -0
  130. package/src/reStructure/TemplateData/resourceYaml/generateTemplateData.js +13 -4
  131. package/src/reStructure/TemplateData/propertyNodeSchema/objectPropertyNodeSchema/data.js +0 -151
  132. package/src/reStructure/TemplateData/propertyNodeSchema/relationshipPropertyNodeSchema/templateRelationshipPropertyNodeSchema.ejs +0 -7
  133. package/src/reStructure/TemplateData/testTemplate/data.js +0 -27
  134. package/src/reStructure/TemplateData/testTemplate/template.ejs +0 -0
  135. /package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/mainAttributeTree/attributeLinkTemplate.ejs +0 -0
  136. /package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/mainAttributeTree/data.js +0 -0
  137. /package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/mainAttributeTree/request.json +0 -0
  138. /package/src/{reStructure/TemplateData → TemplateManager/src}/attributeTreeSchema/relationshipSchema/template.ejs +0 -0
  139. /package/src/reStructure/TemplateData/{propertyNodeSchema/objectPropertyNodeSchema/templateObjectPropertyNodeSchema.ejs → propertyValueSchema/objectPropertyValueSchema/templateObjectPropertyValueSchema.ejs} +0 -0
@@ -49,16 +49,21 @@ function data(_izContext, flowSchema, srcPath) {
49
49
  }
50
50
 
51
51
  function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
52
- let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopic)
53
- let topicArn = Object.keys(flowSchema.flowSteps)[0];
52
+ let functionName = upperCase(flowSchema.flowTag)
53
+ // let topicArn = Object.keys(flowSchema.flowSteps)[0];
54
+ let flowStep = Object.keys(flowSchema.flowSteps)
55
+ let flowStepsIn = flowStep[0];
56
+ let splitFlowStepsIn = flowStepsIn.split("_");
57
+ let topicArn = `${splitFlowStepsIn[2]}_${splitFlowStepsIn[3]}`
54
58
  return {
55
59
  templatePath: templatePath,
56
60
  templateData: {
57
61
  topicArn,
58
62
  flowTag: flowSchema.flowTag,
63
+ functionName
59
64
  },
60
65
  setting: {
61
- savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
66
+ savePath: path.join(srcPath, SOURCE_PATH.flowSchema, flowSchema.flowTag, "source/"),
62
67
  saveFileName: `${functionName}_Main`,
63
68
  fileExtension: ".js",
64
69
  isAppend: false
@@ -18,7 +18,7 @@ along with this program. If not, see
18
18
 
19
19
  'use strict';
20
20
 
21
- const hash = require("object-hash");
21
+ const hash = require('@izara_project/izara-shared-core').objectHash;
22
22
  const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
23
23
 
24
24
  const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
@@ -26,7 +26,7 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
26
26
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
27
27
  const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
28
28
  const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
29
-
29
+ const storedCacheSharedLib = require('@izara_project/izara-core-library-stored-cache')
30
30
  const externalRequest = require('@izara_project/izara-core-library-external-request');
31
31
  const sns = externalRequest.sns
32
32
 
@@ -34,7 +34,9 @@ const utils = require('@izara_project/izara-market-library-service-schemas/src/M
34
34
  const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
35
35
  const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
36
36
  const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
37
-
37
+ const { postToConnection } = require('../../../libs/source/GenerateCodeLibs')
38
+ //(<optionalRequire>)
39
+ //(</optionalRequire>)
38
40
  /**
39
41
  *
40
42
  *
@@ -50,7 +52,7 @@ const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-librar
50
52
  * @returns {object} description of return value
51
53
  */
52
54
 
53
- module.exports.flowSchemaOwnTopic = async (
55
+ module.exports.<%- functionName %> = async (
54
56
  _izContext,
55
57
  requestParams,
56
58
  callingFlowConfig = {},
@@ -59,9 +61,9 @@ module.exports.flowSchemaOwnTopic = async (
59
61
  ) => {
60
62
 
61
63
  try {
62
- _izContext.logger.debug("WebSocketInvoke _izContext", _izContext)
63
- _izContext.logger.debug("WebSocketInvoke requestParams", requestParams)
64
- _izContext.logger.debug("WebSocketInvoke callingFlowConfig", callingFlowConfig)
64
+ _izContext.logger.debug("<%- functionName %> _izContext", _izContext)
65
+ _izContext.logger.debug("<%- functionName %> requestParams", requestParams)
66
+ _izContext.logger.debug("<%- functionName %> callingFlowConfig", callingFlowConfig)
65
67
 
66
68
  let flowSchema = await getObjectSchema.getFlowSchemaS3WithCache(_izContext, {
67
69
  flowTag: requestParams.action,
@@ -70,14 +72,19 @@ module.exports.flowSchemaOwnTopic = async (
70
72
 
71
73
  _izContext.logger.debug("flowSchema", flowSchema)
72
74
 
75
+ let connectionId = _izContext.correlationIds.get(coreConsts.CONNECTION_ID);
73
76
 
74
77
  if (!flowSchema) {
75
- throw new NoRetryError(`flowTag not found ${requestParams.action}`)
78
+ await postToConnection({
79
+ message: {
80
+ error: `flowTag not found ${requestParams.action}`
81
+ }
82
+ },connectionId)
83
+ throw new NoRetryError(`flowTag not found ${requestParams.action}`);
76
84
  }
77
85
 
78
- let messageObject = {
79
- requestParams:requestParams
80
- }
86
+ let messageObject = requestParams
87
+
81
88
  // create callingFlow
82
89
  messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
83
90
  messageObject,
@@ -89,12 +96,12 @@ module.exports.flowSchemaOwnTopic = async (
89
96
  )
90
97
  )
91
98
 
92
- let sendMessageToCreateEndpoint = {
99
+ let sendMessageToEndpoint = {
93
100
  Message: JSON.stringify(messageObject),
94
101
  TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, "<%- topicArn %>")
95
102
  }
96
- _izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
97
- await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
103
+ _izContext.logger.debug("sendMessageToEndpoint", sendMessageToEndpoint);
104
+ await sns.publishAsync(_izContext, sendMessageToEndpoint);
98
105
 
99
106
  } catch (err) {
100
107
  _izContext.logger.error('error WebSocketInvoke: ', err)
@@ -58,9 +58,24 @@ function createDataForDefaultSnsInSqs(_izContext, flowSchema, srcPath) {
58
58
 
59
59
  // GCTpBasTestInPersonCreate => GCTpBas_Test_PersonCreate_In
60
60
  let flowSteps = Object.keys(flowSchema.flowSteps)
61
+ let flowStepsIn = flowSteps[0];
62
+ let splitFlowStepsIn = flowStepsIn.split("_");
63
+ let topicIn = splitFlowStepsIn[2]
64
+
65
+ let splitFlowStepsOut;
66
+ let topicOut;
67
+ if (flowSchema.outputTopic) {
68
+ let flowStepOut = flowSteps[1];
69
+ splitFlowStepsOut = flowStepOut.split("_")
70
+ topicOut = splitFlowStepsOut[2]
71
+ } else {
72
+ splitFlowStepsOut = null
73
+ topicOut = null
74
+ }
75
+
61
76
  const generatedSnsTopicInForFlowSchema = [
62
77
  {
63
- queueName: upperCase(flowSteps[0].split("_")[0]),
78
+ queueName: upperCase(topicIn),
64
79
  },
65
80
  ];
66
81
 
@@ -75,12 +90,9 @@ function createDataForDefaultSnsInSqs(_izContext, flowSchema, srcPath) {
75
90
 
76
91
  let defaultDsqQueueDataList = [
77
92
  {
78
- queueName: upperCase(FUNCTION_NAME.flowSchemaOwnTopicEndpointComplete) + upperCase(HANDLER.hdrSqs),
79
- subscribeTo: upperCase(flowSteps[1].split("_")[0])
80
- },
81
- // {
82
- // queueName: upperCase(FUNCTION_NAME.flowSchemaOwnTopicComplete) + upperCase(HANDLER.hdrSqs)
83
- // }
93
+ queueName: `${upperCase(flowSchema.flowTag)}Complete` + upperCase(HANDLER.hdrSqs),
94
+ subscribeTo: topicOut
95
+ }
84
96
  ]
85
97
  for (let defaultDsqQueueData of defaultDsqQueueDataList) {
86
98
  resultsForCreateDefaultSnsInSqs.push({
@@ -89,7 +101,10 @@ function createDataForDefaultSnsInSqs(_izContext, flowSchema, srcPath) {
89
101
  setting: setting
90
102
  })
91
103
  }
92
- console.log()
104
+ // console.log({
105
+ // resultsForCreateDefaultSnsInSqs: JSON.stringify(resultsForCreateDefaultSnsInSqs, null, 2
106
+ // )
107
+ // })
93
108
  return resultsForCreateDefaultSnsInSqs;
94
109
  }
95
110
 
@@ -47,13 +47,18 @@ const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME, HANDLER } = require('../../.
47
47
  function createDataForSnsOut(_izContext, flowSchema, srcPath) {
48
48
  let resultsForCreateDefaultSnsInSqs = [];
49
49
 
50
- // GCTpBasTestInPersonCreate => GCTpBas_Test_PersonCreate_In
51
50
  let flowSteps = Object.keys(flowSchema.flowSteps)
52
- const generatedSnsTopicOutForFlowSchema = [
53
- {
54
- queueName: upperCase(flowSteps[1].split("_")[0])
55
- }
56
- ];
51
+ let generatedSnsTopicOutForFlowSchema = []
52
+ if (flowSchema.outputTopic) {
53
+ let flowStepsOut = flowSteps[1];
54
+ let splitFlowStepsOut = flowStepsOut.split("_");
55
+ let topicOut = splitFlowStepsOut[2]
56
+ generatedSnsTopicOutForFlowSchema.push(
57
+ {
58
+ queueName: upperCase(topicOut)
59
+ }
60
+ )
61
+ }
57
62
 
58
63
 
59
64
  for (let defaultSnsOutData of generatedSnsTopicOutForFlowSchema) {
@@ -107,7 +107,7 @@ const createFlowSchemaEventBridgeFunctionYaml = require('./eventBridge/functionY
107
107
  const createFlowSchemaEventBridgeHandler = require('./eventBridge/handler/inv/data');
108
108
  const createFlowSchemaEventBridgeMainFunction = require('./eventBridge/mainFunction/data');
109
109
 
110
- const createFlowSchemaDynamoDb = require('./dynamoDb/data');
110
+ const createAwaitingMultipleStepDynamoDbData = require('./dynamoDb/data');
111
111
  // create record status Field Complete
112
112
  const createCreateObjectCompleteFuntionYaml = require('./CreateRecordComplete/functionYaml/data');
113
113
  const createCreateObjectCompleteHandler = require('./CreateRecordComplete/handler/data');
@@ -122,6 +122,7 @@ const createFlowSchemaRegisterMainCompleteFuncYaml = require('./createRecordBySt
122
122
  const createFlowSchemaRegisterMainWbsFuncYaml = require('./createRecordByStatusType/wbs/functionYaml/data');
123
123
  const createFlowSchemaRegisterSubscribeOutAll = require('./createRecordByStatusType/subscriptionOutAll/data');
124
124
  const createFlowSchemaRegisterSnsInSqs = require('./createRecordByStatusType/sns-in/data');
125
+ const createFlowSchemaRegisterDynamoDb = require('./createRecordByStatusType/dynamoDB/register');
125
126
 
126
127
  /**
127
128
  * Generates code with templates for different actions
@@ -130,11 +131,13 @@ const createFlowSchemaRegisterSnsInSqs = require('./createRecordByStatusType/sns
130
131
  * @returns {Array} Array of generated code parameters
131
132
  */
132
133
  async function generateCodeWithTemplate(_izContext, objSchemaPath) {
133
- console.log("objSchemaPath", objSchemaPath);
134
+ console.log("objSchemaPath in flowSchema generateTemplateAndData", objSchemaPath);
134
135
  try {
135
136
  const saveFilePath = join(objSchemaPath, '../');
137
+ console.log("saveFilePath in flowSchema generateTemplateAndData", saveFilePath)
136
138
  let createSourceParams = [];
137
139
  const allLocalFlowSchemas = await getAllLocalFlowSchemas(_izContext, objSchemaPath);
140
+ const allLocalObjectSchemas = await getAllLocalObjectSchemasWithHierarchy(_izContext, objSchemaPath);
138
141
 
139
142
  // default webSocket setting
140
143
  const webSocketTaskTable = createWebSocketDynamoDb(_izContext, saveFilePath);
@@ -143,10 +146,8 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
143
146
 
144
147
  const webSocketResource = [...webSocketTaskTable, ...webSocketConnectYaml, ...webSocketConnectHandler]
145
148
  if (allLocalFlowSchemas.records.length) {
146
- const webSocketGenerateCodeLibs = createWebSocketGenerateCodeLibs(_izContext, saveFilePath)
147
149
  createSourceParams.push(
148
150
  ...webSocketResource,
149
- ...webSocketGenerateCodeLibs
150
151
  )
151
152
  }
152
153
 
@@ -155,10 +156,9 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
155
156
 
156
157
  for (const flowSchema of allLocalFlowSchemas.records) {
157
158
  console.log("flowSchema in Generate TemplateData", flowSchema);
159
+ const webSocketGenerateCodeLibs = createWebSocketGenerateCodeLibs(_izContext, flowSchema, saveFilePath)
160
+ createSourceParams.push(...webSocketGenerateCodeLibs)
158
161
 
159
- if (flowSchema.statusType === "none" || flowSchema.handlerObj === "multi") {
160
- continue;
161
- }
162
162
  for (const event of flowSchema.event) {
163
163
  if (event.includes("s3")) {
164
164
  const reservedDataTable = createReservedDataMainTable(_izContext, saveFilePath);
@@ -275,7 +275,6 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
275
275
  ...externalTopicSnsOut
276
276
  ];
277
277
 
278
- console.log("event externalTopic generated")
279
278
  createSourceParams.push(...externalTopic)
280
279
 
281
280
  } else if (event.includes("ownTopic")) {
@@ -283,7 +282,7 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
283
282
  // flowSchema OwnTopic components
284
283
  const flowSchemaOwnTopicFunctionYaml = createFlowSchemaOwnTopicFunctionYaml(_izContext, flowSchema, saveFilePath);
285
284
  const flowSchemaOwnTopicHandler = createFlowSchemaOwnTopicHandler(_izContext, flowSchema, saveFilePath);
286
- const flowSchemaOwnTopicMainFunction = createFlowSchemaOwnTopicMainFunction(_izContext, flowSchema, saveFilePath);
285
+ const flowSchemaOwnTopicMainFunction = await createFlowSchemaOwnTopicMainFunction(_izContext, flowSchema, saveFilePath);
287
286
  const flowSchemaOwnTopicComponent = [...flowSchemaOwnTopicFunctionYaml, ...flowSchemaOwnTopicHandler, ...flowSchemaOwnTopicMainFunction]
288
287
  // flowSchema OwnTopic Complete component
289
288
  const flowSchemaOwnTopicCompleteFunctionYaml = createFlowSchemaOwnTopicCompleteFunctionYaml(_izContext, flowSchema, saveFilePath);
@@ -291,22 +290,23 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
291
290
  const flowSchemaOwnTopicCompleteMainFunction = createFlowSchemaOwnTopicCompleteMainFunction(_izContext, flowSchema, saveFilePath);
292
291
  const flowSchemaOwnTopicCompleteComponent = [...flowSchemaOwnTopicCompleteFunctionYaml, ...flowSchemaOwnTopicCompleteHandler, ...flowSchemaOwnTopicCompleteMainFunction]
293
292
  // flowSchemaOwnTopic Endpoint
294
- const flowSchemaOwnTopicEndpointFuntionYaml = createFlowSchemaOwnTopicEndpointFuntionYaml(_izContext, flowSchema, saveFilePath);
293
+ const flowSchemaOwnTopicEndpointFuntionYaml = await createFlowSchemaOwnTopicEndpointFuntionYaml(_izContext, flowSchema, saveFilePath);
295
294
  const flowSchemaOwnTopicEndpointHandler = createFlowSchemaOwnTopicEndpointHandler(_izContext, flowSchema, saveFilePath);
296
- const flowSchemaOwnTopicEndpointMainFunction = createFlowSchemaOwnTopicEndpointMainFunction(_izContext, flowSchema, saveFilePath);
295
+ const flowSchemaOwnTopicEndpointMainFunction = await createFlowSchemaOwnTopicEndpointMainFunction(_izContext, flowSchema, saveFilePath);
297
296
  const flowSchemaOwnTopicEndpointComponent = [...flowSchemaOwnTopicEndpointFuntionYaml, ...flowSchemaOwnTopicEndpointHandler, ...flowSchemaOwnTopicEndpointMainFunction]
298
297
 
299
298
  // flowSchemaOwnTopic EndpointComplete
300
- const flowSchemaOwnTopicEndpointCompleteFuntionYaml = createFlowSchemaOwnTopicEndpointCompleteFuntionYaml(_izContext, flowSchema, saveFilePath);
301
- const flowSchemaOwnTopicEndpointCompleteHandler = createFlowSchemaOwnTopicEndpointCompleteHandler(_izContext, flowSchema, saveFilePath);
302
- const flowSchemaOwnTopicEndpointCompleteMainFunction = createFlowSchemaOwnTopicEndpointCompleteMainFunction(_izContext, flowSchema, saveFilePath);
303
- const flowSchemaOwnTopicEndpointCompleteComponent = [...flowSchemaOwnTopicEndpointCompleteFuntionYaml, ...flowSchemaOwnTopicEndpointCompleteHandler, ...flowSchemaOwnTopicEndpointCompleteMainFunction];
299
+ // const flowSchemaOwnTopicEndpointCompleteFuntionYaml = createFlowSchemaOwnTopicEndpointCompleteFuntionYaml(_izContext, flowSchema, saveFilePath);
300
+ // const flowSchemaOwnTopicEndpointCompleteHandler = createFlowSchemaOwnTopicEndpointCompleteHandler(_izContext, flowSchema, saveFilePath);
301
+ // const flowSchemaOwnTopicEndpointCompleteMainFunction = createFlowSchemaOwnTopicEndpointCompleteMainFunction(_izContext, flowSchema, saveFilePath);
302
+ // const flowSchemaOwnTopicEndpointCompleteComponent = [...flowSchemaOwnTopicEndpointCompleteFuntionYaml, ...flowSchemaOwnTopicEndpointCompleteHandler, ...flowSchemaOwnTopicEndpointCompleteMainFunction];
304
303
 
305
304
  const flowSchemaOwnTopicQueue = createFlowSchemaOwnTopicQueue(_izContext, flowSchema, saveFilePath);
306
305
  const flowSchemaOwnTopicSnsOut = createFlowSchemaOwnTopicSnsOut(_izContext, flowSchema, saveFilePath);
307
306
  // Group the resources
308
307
  const ownTopicResources = [
309
- ...flowSchemaOwnTopicComponent, ...flowSchemaOwnTopicCompleteComponent, ...flowSchemaOwnTopicEndpointComponent, ...flowSchemaOwnTopicQueue, ...flowSchemaOwnTopicSnsOut, ...flowSchemaOwnTopicEndpointCompleteComponent
308
+ ...flowSchemaOwnTopicComponent, ...flowSchemaOwnTopicCompleteComponent, ...flowSchemaOwnTopicEndpointComponent, ...flowSchemaOwnTopicQueue, ...flowSchemaOwnTopicSnsOut,
309
+ // ...flowSchemaOwnTopicEndpointCompleteComponent
310
310
  ];
311
311
 
312
312
  console.log("event ownTopic generated")
@@ -328,15 +328,16 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
328
328
  console.log("event eventBridge generated")
329
329
  createSourceParams.push(...eventBridgeResources);
330
330
  }
331
+ }
332
+
333
+ if (flowSchema.statusType === "storedCache") {
334
+ const flowSchemaDynamoDb = createAwaitingMultipleStepDynamoDbData(_izContext, flowSchema, allLocalObjectSchemas, saveFilePath)
335
+ console.log("generated code storedCache flowSchema")
336
+ createSourceParams.push(...flowSchemaDynamoDb);
337
+ } else if (flowSchema.statusType === "statusField") {
338
+ // wait
331
339
 
332
- if (flowSchema.statusType === "storedCache") {
333
- const flowSchemaDynamoDb = createFlowSchemaDynamoDb(_izContext, flowSchema, saveFilePath)
334
- console.log("generated code storedCache flowSchema")
335
- createSourceParams.push(...flowSchemaDynamoDb);
336
- } else if (flowSchema.statusType === "statusField") {
337
- // wait
338
340
 
339
-
340
341
  // if (flowSchema.statusType === "statusField") {
341
342
  // const createRecordCompleteFunctionYaml = createCreateObjectCompleteFuntionYaml(_izContext, flowSchema, saveFilePath);
342
343
  // const createRecordCompleteHandler = createCreateObjectCompleteHandler(_izContext, flowSchema, saveFilePath);
@@ -353,29 +354,33 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
353
354
  // createSourceParams.push(...recordCompleteResources);
354
355
  // }
355
356
  }
356
- }
357
357
  }
358
- console.log("flowSchema Register");
359
- const flowSchemaRegisterHandlerComplete = createFlowSchemaRegisterHandlerComplete(_izContext, saveFilePath);
360
- const flowSchemaRegisterMainComplete = createFlowSchemaRegisterMainCompleteFunc(_izContext, saveFilePath);
361
- const flowSchemaRegisterHandlerWbs = createFlowSchemaRegisterHandlerWbsFunc(_izContext, saveFilePath);
362
- const flowSchemaRegisterMainWbs = createFlowSchemaRegisterMainWbsFunc(_izContext, saveFilePath);
363
- const flowSchemaRegisterFunctionYamlComplete = createFlowSchemaRegisterMainCompleteFuncYaml(_izContext, saveFilePath);
364
- const flowSchemaRegisterFunctionYamlWbs = createFlowSchemaRegisterMainWbsFuncYaml(_izContext, saveFilePath);
365
- const flowSchemaRegisterSubscribeOutAll = createFlowSchemaRegisterSubscribeOutAll(_izContext, allLocalFlowSchemas, saveFilePath);
366
- const flowSchemaRegisterSnsInSqs = createFlowSchemaRegisterSnsInSqs(_izContext, saveFilePath);
367
-
368
- const flowSchemaRegisters = [
369
- ...flowSchemaRegisterHandlerComplete,
370
- ...flowSchemaRegisterMainComplete,
371
- ...flowSchemaRegisterHandlerWbs,
372
- ...flowSchemaRegisterMainWbs,
373
- ...flowSchemaRegisterFunctionYamlComplete,
374
- ...flowSchemaRegisterFunctionYamlWbs,
375
- ...flowSchemaRegisterSnsInSqs,
376
- ...flowSchemaRegisterSubscribeOutAll,
377
- ];
378
- createSourceParams.push(...flowSchemaRegisters);
358
+ if (allLocalFlowSchemas.records.length) {
359
+ console.log("flowSchema Register");
360
+ const flowSchemaRegisterHandlerComplete = createFlowSchemaRegisterHandlerComplete(_izContext, saveFilePath);
361
+ const flowSchemaRegisterMainComplete = await createFlowSchemaRegisterMainCompleteFunc(_izContext, allLocalFlowSchemas, saveFilePath);
362
+ const flowSchemaRegisterHandlerWbs = createFlowSchemaRegisterHandlerWbsFunc(_izContext, saveFilePath);
363
+ const flowSchemaRegisterMainWbs = createFlowSchemaRegisterMainWbsFunc(_izContext, saveFilePath);
364
+ const flowSchemaRegisterFunctionYamlComplete = createFlowSchemaRegisterMainCompleteFuncYaml(_izContext, saveFilePath);
365
+ const flowSchemaRegisterFunctionYamlWbs = await createFlowSchemaRegisterMainWbsFuncYaml(_izContext, allLocalFlowSchemas, saveFilePath);
366
+ const flowSchemaRegisterSubscribeOutAll = createFlowSchemaRegisterSubscribeOutAll(_izContext, allLocalFlowSchemas, saveFilePath);
367
+ const flowSchemaRegisterSnsInSqs = createFlowSchemaRegisterSnsInSqs(_izContext, saveFilePath);
368
+
369
+ const flowSchemaRegisterDynamoDb = createFlowSchemaRegisterDynamoDb(_izContext, saveFilePath);
370
+
371
+ const flowSchemaRegisters = [
372
+ ...flowSchemaRegisterHandlerComplete,
373
+ ...flowSchemaRegisterMainComplete,
374
+ ...flowSchemaRegisterHandlerWbs,
375
+ ...flowSchemaRegisterMainWbs,
376
+ ...flowSchemaRegisterFunctionYamlComplete,
377
+ ...flowSchemaRegisterFunctionYamlWbs,
378
+ ...flowSchemaRegisterSnsInSqs,
379
+ ...flowSchemaRegisterSubscribeOutAll,
380
+ ...flowSchemaRegisterDynamoDb
381
+ ];
382
+ createSourceParams.push(...flowSchemaRegisters);
383
+ }
379
384
 
380
385
  return createSourceParams;
381
386
  } catch (error) {
@@ -239,7 +239,7 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
239
239
  templateData.additionalResourcePermission,
240
240
  groupedByObjectType["WebsocketConnect"].resources
241
241
  )
242
- } else if (templateData.roleName.includes(SOURCE_GENERATE_IAM_ROLE.EventBridge)) {
242
+ } else if (templateData?.roleName?.includes(SOURCE_GENERATE_IAM_ROLE.EventBridge)) {
243
243
  groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.EventBridge].handlerType.push(templateData);
244
244
  processResourcePermissions(
245
245
  templateData.additionalResourcePermission,
@@ -251,7 +251,7 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
251
251
  templateData.additionalResourcePermission,
252
252
  groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.CreateRecordComplete].resources
253
253
  )
254
- } else if (templateData.roleName.includes(SOURCE_GENERATE_IAM_ROLE.RegisterRole)) {
254
+ } else if (templateData?.roleName?.includes(SOURCE_GENERATE_IAM_ROLE.RegisterRole)) {
255
255
  groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.RegisterRole].handlerType.push(templateData);
256
256
  processResourcePermissions(
257
257
  templateData.additionalResourcePermission,
@@ -264,6 +264,7 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
264
264
  }
265
265
  return item;
266
266
  });
267
+
267
268
  // Process "Other" items that might belong to existing object types
268
269
  groupedByObjectType.Other = groupedByObjectType.Other.filter(item => {
269
270
  const templateData = item.templateData;
@@ -1,32 +1,4 @@
1
1
  #IAM Role for Upload Schema functionality
2
- UploadSchemaRole:
3
- Type: AWS::IAM::Role
4
- Properties:
5
- RoleName: ${self:custom.iz_resourcePrefix}UploadSchemaRole
6
- AssumeRolePolicyDocument:
7
- Version: "2012-10-17"
8
- Statement:
9
- - Effect: Allow
10
- Principal:
11
- Service: "lambda.amazonaws.com"
12
- Action: sts:AssumeRole
13
- # this is the managed policy for lambda basic execution ex. logging to cloudwatch
14
- ManagedPolicyArns:
15
- - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
16
- - arn:aws:iam::${self:custom.iz_accountId}:policy/UploadSchemaSharedPolicy
17
- Policies:
18
- - PolicyName: ${self:custom.iz_resourcePrefix}UploadSchemaPolicy
19
- PolicyDocument:
20
- Version: "2012-10-17"
21
- Statement:
22
- - Effect: Allow
23
- Action:
24
- - s3:PutObject
25
- - s3:GetObject
26
- - s3:ListBucket
27
- Resource:
28
- - arn:aws:s3:::object-schema/*
29
- - arn:aws:s3:::object-schema/perServiceSchemas/${self:custom.iz_serviceTag}/*
30
2
  <% if (roles && roles.length > 0) { -%>
31
3
  <% roles.forEach(function(role) { %>
32
4
  <%= role.roleName %>Role:
@@ -54,5 +26,7 @@
54
26
  Resource:<% statement.Resource.forEach(function(resource) { %>
55
27
  - <%= resource -%><% }); %><% } else { %>
56
28
  Resource: <%= statement.Resource %><% } %><% }); %>
29
+ #<#<%- role.roleName %>AdditionalRole#>
30
+ #<#/<%- role.roleName %>AdditionalRole#>
57
31
  <% }); %>
58
32
  <% } %>
@@ -21,7 +21,7 @@ const snsSharedLib = require('@izara_project/izara-shared/src/SnsSharedLib');
21
21
  const sns = require('@izara_project/izara-core-library-external-request/src/resources/Sns');
22
22
  const callingFlowSharedLib = require('@izara_project/izara-shared/src/CallingFlowSharedLib');
23
23
  const _ = require('lodash');
24
- const hash = require("object-hash")
24
+ const hash = require('@izara_project/izara-shared-core').objectHash;
25
25
 
26
26
 
27
27
  const PREFIX = {
@@ -21,12 +21,14 @@ 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/src/resources/Sns');
23
23
  const _ = require('lodash');
24
- const hash = require("object-hash")
24
+ const hash = require('@izara_project/izara-shared-core').objectHash;
25
25
  const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
26
26
  const PREFIX = {
27
27
  CREATE_OBJECT_ASYNC: "createObjectAsync",
28
28
  CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete"
29
29
  }
30
+ //(<optionalRequire>)
31
+ //(</optionalRequire>)
30
32
 
31
33
  /**
32
34
  *
@@ -36,14 +38,8 @@ const PREFIX = {
36
38
  * @param {*} errorsFounds
37
39
  * @param {*} graphServiceTag
38
40
  * @param {*} passBackProperties
39
- returnValue = {
40
- queryResult: returnCreateNode,
41
- objType,
42
- objInstance,
43
- relationships,
44
- settings
45
- }
46
- */
41
+ */
42
+
47
43
  module.exports.createObjectComplete = async (
48
44
  _izContext,
49
45
  returnValue,
@@ -145,9 +141,14 @@ module.exports.createObjectComplete = async (
145
141
  };
146
142
  _izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
147
143
  await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
144
+
145
+ //(<afterSendMessage>)
146
+ //(</afterSendMessage>)
148
147
  }
149
148
  })
150
149
  )
150
+ //(<beforeReturn>)
151
+ //(</beforeReturn>)
151
152
  return {
152
153
  returnValue: returnValue,
153
154
  status: status,
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
18
  'use strict';
19
- const hash = require("object-hash");
19
+ const hash = require('@izara_project/izara-shared-core').objectHash;
20
20
 
21
21
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
22
22
  const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
@@ -27,7 +27,8 @@ const sns = require("@izara_project/izara-core-library-external-request").sns;
27
27
  const NoRetryError = require("@izara_project/izara-core-library-core/src/NoRetryError");
28
28
 
29
29
  const { explodedObjectTypeId, explodedRelationshipTypeId, createLinkTypeId } = require('@izara_project/izara-core-library-service-schemas/src/Utils');
30
-
30
+ //(<optionalRequire>)
31
+ //(</optionalRequire>)
31
32
  const {
32
33
  TOPIC_NAME_GENERATE_CODE,
33
34
  TOPIC_NAME_GRAPH_HANDLER,
@@ -77,6 +78,9 @@ module.exports.deleteNodeComplete = async (
77
78
  _izContext.logger.debug("Send Message to DeleteNodeComplete::", sendMessageToOutUpdateNodeComplete);
78
79
  await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
79
80
 
81
+ //(<beforeReturn>)
82
+ //(</beforeReturn>)
83
+
80
84
  return {
81
85
  objType: returnValue.objType,
82
86
  objInstanceFull: returnValue.objInstanceFull,
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
18
  'use strict';
19
- const hash = require("object-hash");
19
+ const hash = require('@izara_project/izara-shared-core').objectHash;
20
20
 
21
21
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
22
22
  const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
@@ -33,7 +33,8 @@ const {
33
33
  TOPIC_NAME_GRAPH_HANDLER,
34
34
  PREFIX
35
35
  } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
36
-
36
+ //(<optionalRequire>)
37
+ //(</optionalRequire>)
37
38
  module.exports.updateNodeComplete = async (
38
39
  _izContext,
39
40
  returnValue,
@@ -16,8 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
18
  'use strict';
19
- const hash = require("object-hash");
20
-
19
+ const hash = require('@izara_project/izara-shared-core').objectHash;
21
20
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
22
21
  const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
23
22
  const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
@@ -33,6 +32,8 @@ const {
33
32
  TOPIC_NAME_GRAPH_HANDLER,
34
33
  PREFIX
35
34
  } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
35
+ //(<optionalRequire>)
36
+ //(</optionalRequire>)
36
37
 
37
38
  module.exports.updateNodeComplete = async (
38
39
  _izContext,
@@ -21,7 +21,7 @@ const externalRequest = require('@izara_project/izara-core-library-external-requ
21
21
  const lambda = externalRequest.lambda;
22
22
 
23
23
  const inMemoryCacheLib = require('@izara_project/izara-shared/src/InMemoryCacheLib');
24
- const hash = require('object-hash')
24
+ const hash = require('@izara_project/izara-shared-core').objectHash;
25
25
 
26
26
  async function checkPermission(_izContext, functionName, payload) {
27
27
  return await lambda.invokeSync(_izContext, functionName, payload)
@@ -31,7 +31,7 @@ const serviceConfigLib = require('@izara_project/izara-core-library-service-sche
31
31
 
32
32
  const uploadUseCase = require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
33
33
 
34
- const hash = require("object-hash")
34
+ const hash = require('@izara_project/izara-shared-core').objectHash;
35
35
  const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
36
36
  const path = require('path')
37
37
  const schemasPath = path.join(__dirname, '../schemas');
@@ -29,7 +29,7 @@ const serviceConfigLib = require('@izara_project/izara-core-library-service-sche
29
29
 
30
30
  const uploadUseCase = require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
31
31
 
32
- const hash = require("object-hash")
32
+ const hash = require('@izara_project/izara-shared-core').objectHash;
33
33
  const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
34
34
  const path = require('path')
35
35
  const schemasPath = path.join(__dirname, '../schemas');
@@ -18,7 +18,7 @@ along with this program. If not, see
18
18
 
19
19
  'use strict';
20
20
 
21
- const hash = require("object-hash");
21
+ const hash = require('@izara_project/izara-shared-core').objectHash;
22
22
  const {
23
23
  getObjSchemaS3WithHierarchy,
24
24
  } = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
@@ -22,6 +22,7 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
22
22
  const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
23
23
  const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
24
24
  const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
25
+ const logicalResultsSharedLib = require('@izara_project/izara-core-library-logical-result');
25
26
 
26
27
  const serviceSchemas = require('@izara_project/izara-core-library-service-schemas');
27
28
  const getObjectSchemas = serviceSchemas.getObjectSchema;