@izara_project/izara-core-generate-service-code 1.0.5 → 1.0.6

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/GenerateTests.js +2 -1
  3. package/src/TemplateData/EndpointPerService/handler/sqs/template.ejs +1 -1
  4. package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +10 -12
  5. package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +2 -4
  6. package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +13 -17
  7. package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +4 -5
  8. package/src/TemplateData/IntTest/generateTests/events/data.js +9 -2
  9. package/src/TemplateData/IntTest/generateTests/events/templateEvents.ejs +2 -2
  10. package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +6 -1
  11. package/src/TemplateData/IntTest/generateTests/tests/data.js +2 -5
  12. package/src/TemplateData/IntTest/libs/libs.js +1 -1
  13. package/src/TemplateData/externalService/lambdaRole/data.js +1 -7
  14. package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +1 -1
  15. package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +3 -3
  16. package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +2 -2
  17. package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +3 -2
  18. package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +2 -2
  19. package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +1 -2
  20. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +1 -1
  21. package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +8 -9
  22. package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +1 -2
  23. package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +2 -3
  24. package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +1 -2
  25. package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +2 -3
  26. package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +2 -3
  27. package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +2 -3
  28. package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +2 -3
  29. package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +2 -3
  30. package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +2 -3
  31. package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +2 -3
  32. package/src/libs/Consts.js +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-core-generate-service-code",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Code for locally generating per service files",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -111,7 +111,8 @@ async function generateCodeWithTemplate(_izContext, savePath, settings) {
111
111
 
112
112
  console.log('upload file to S3');
113
113
 
114
- await uploadLib.uploadTos3(join(saveFilePath, `../src/generateIntegrationTest/${serviceTag}`), //intTest path
114
+ await uploadLib.uploadTos3(
115
+ join(saveFilePath, `../src/generateIntegrationTest/${serviceTag}`), //intTest path
115
116
  { s3Prefix: settings, serviceTag: serviceTag } // settings
116
117
  );
117
118
 
@@ -21,7 +21,7 @@ import { middlewareHandler } from "@izara_project/izara-middleware";
21
21
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
  import { recordHandlerSharedLib } from '@izara_project/izara-core-library-record-handler';
24
- import { validator } from '@izara-core-library-service-schemas';
24
+ import { validator } from '@izara_project/izara-core-library-service-schemas';
25
25
 
26
26
  //(<optionalRequire>)
27
27
  //(</optionalRequire>)
@@ -27,7 +27,7 @@ import snsSharedLib from '@izara_project/izara-core-library-sns';
27
27
  import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-flow';
28
28
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
29
29
  import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
30
- import { consts as coreConsts } from '@izara_project/izara-core-library-core';
30
+ import { consts as coreConsts, NoRetryError } from '@izara_project/izara-core-library-core';
31
31
  import identifierLib from '@izara_project/izara-core-library-identifiers';
32
32
  const { createRandomIdentifier } = identifierLib
33
33
 
@@ -38,21 +38,17 @@ import { sns } from '@izara_project/izara-core-library-external-request';
38
38
 
39
39
  // ──────────────────────── Service Schemas ────────────────────────
40
40
  import { utils, createNodeLib, uploadUseCase, consts, getObjectSchema, identifiersObject, dataDetailsLib } from '@izara_project/izara-core-library-service-schemas';
41
- const { createObjType } = utils
42
- const { createDataDetailsLib } = dataDetailsLib
43
- const { dynamoDbIdentifiersByStorageResource } = identifiersObject
44
- // ──────────────────────── Graph Service Libraries ────────────────────────
45
- import graphSharedLibs from '@izara_project/izara-core-library-graph-service';
46
-
47
- // ──────────────────────── Market Library Service Schemas ────────────────────────
48
- import { consts as generateCodeConsts, utils as generateCodeUtils } from '@izara_project/izara-core-generate-service-code';
49
-
41
+ const { createObjType, firstLetterUpperCase } = utils;
42
+ const { createDataDetailsLib } = dataDetailsLib;
43
+ const { dynamoDbIdentifiersByStorageResource } = identifiersObject;
50
44
  const {
51
45
  TOPIC_NAME_GENERATE_CODE,
52
46
  TOPIC_NAME_GRAPH_HANDLER
53
- } = generateCodeConsts;
47
+ } = consts;
48
+
49
+ // ──────────────────────── Graph Service Libraries ────────────────────────
50
+ import graphSharedLibs from '@izara_project/izara-core-library-graph-service';
54
51
 
55
- const { firstLetterUpperCase } = generateCodeUtils;
56
52
 
57
53
  //(<optionalRequire>)
58
54
  //(</optionalRequire>)
@@ -110,6 +106,8 @@ export default async function createMain(
110
106
  if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
111
107
  errorsFound.push('not have targetId')
112
108
  }
109
+ } else if (objectSchema.generatedBy === "searchResultGenerated") {
110
+ throw new NoRetryError("error searchResultGenerated should not happen here")
113
111
  }
114
112
 
115
113
  //(<beforeQuery>)
@@ -22,12 +22,10 @@ import { consts as coreConsts } from '@izara_project/izara-core-library-core';
22
22
  // ==================== Core Service Schemas ====================
23
23
  import { getObjectSchema, consts, createObjType, dataDetailsLib, identifiersObject } from '@izara_project/izara-core-library-service-schemas'
24
24
  const { createDeleteDataDetail } = dataDetailsLib;
25
- const { dynamoDbIdentifiersByStorageResource } = identifiersObject
26
- // ==================== Market Service Schemas ====================
27
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
25
+ const { dynamoDbIdentifiersByStorageResource } = identifiersObject;
28
26
  const {
29
27
  TOPIC_NAME_GENERATE_CODE,
30
- } = generateCodeConsts;
28
+ } = consts;
31
29
 
32
30
  // ==================== Shared Libraries ====================
33
31
  import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
@@ -1,22 +1,20 @@
1
1
  /*
2
2
  Copyright (C) 2020 Sven Mason <http: //izara.io>
3
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
- */
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.
18
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.
19
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
+ */
20
18
 
21
19
  // ==================== Izara Core Service Schemas ====================
22
20
  import { getObjectSchema, serviceConfig, consts, identifiersObject, utils, dataDetailsLib } from '@izara_project/izara-core-library-service-schemas'
@@ -29,11 +27,9 @@ const {
29
27
  createGetDataDetails
30
28
  } = dataDetailsLib;
31
29
 
32
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code'
33
-
34
30
  const {
35
31
  TOPIC_NAME_GENERATE_CODE,
36
- } = generateCodeConsts;
32
+ } = consts;
37
33
 
38
34
 
39
35
  // ==================== Shared Core Libraries ====================
@@ -18,21 +18,18 @@ along with this program. If not, see
18
18
 
19
19
  // ==================== Shared Core Utilities ====================
20
20
  import { objectHash as hash } from '@izara_project/izara-shared-core';
21
- import { consts as coreConsts } from '@izara_project/izara-core-library-core';
21
+ import { consts as coreConsts, NoRetryError } from '@izara_project/izara-core-library-core';
22
22
 
23
23
  // ==================== Core Service Schemas ====================
24
24
  import { getObjectSchema, consts, utils, identifiersObject, dataDetailsLib } from '@izara_project/izara-core-library-service-schemas';
25
25
  const { createObjType } = utils;
26
26
  const { dynamoDbIdentifiersByStorageResource } = identifiersObject;
27
27
  const { createUpdateDataDetail } = dataDetailsLib;
28
-
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code'
30
-
31
28
  const {
32
29
  PREFIX,
33
30
  TOPIC_NAME_GENERATE_CODE,
34
31
  TOPIC_NAME_GRAPH_HANDLER,
35
- } = generateCodeConsts;
32
+ } = consts;
36
33
 
37
34
 
38
35
  // ==================== Shared Libraries ====================
@@ -118,6 +115,8 @@ export default async function updateMain(
118
115
  if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
119
116
  errorsFound.push('not have targetId')
120
117
  }
118
+ } else if (objectSchema.generatedBy === "searchResultGenerated") {
119
+ throw new NoRetryError("error searchResultGenerated should not happen here")
121
120
  }
122
121
 
123
122
  //(<beforeQuery>)
@@ -41,7 +41,9 @@ async function data(_izContext, allIntTestConfig, srcPath) {
41
41
  for (const intTest of allIntTestConfig) {
42
42
  for (const [testTag, config] of Object.entries(intTest)) {
43
43
  // console.log(testTag, config)
44
- for (const eachStage of config.testStages) {
44
+ for (let stageIdx = 0; stageIdx < config.testStages.length; stageIdx++) {
45
+ let eachStage = config.testStages[stageIdx];
46
+
45
47
  let inputEventTag = eachStage.eventTag;
46
48
  let outputEventTag = `Output_${inputEventTag}`;
47
49
 
@@ -57,6 +59,10 @@ async function data(_izContext, allIntTestConfig, srcPath) {
57
59
  )
58
60
  };
59
61
 
62
+ if (stageIdx === 0) {
63
+ inputConfig.snsSqsTrigger = true
64
+ }
65
+
60
66
  let outputConfig = {
61
67
  forStageMatching: true,
62
68
  ...setEvent(
@@ -106,6 +112,7 @@ async function data(_izContext, allIntTestConfig, srcPath) {
106
112
  });
107
113
  }
108
114
  }
115
+
109
116
  createEventSources.push({
110
117
  templatePath: templatePath,
111
118
  templateData: {
@@ -130,7 +137,7 @@ async function data(_izContext, allIntTestConfig, srcPath) {
130
137
  }
131
138
  }
132
139
  }
133
-
140
+ console.log("createEventSources", JSON.stringify(createEventSources, null, 2))
134
141
  return createEventSources;
135
142
  }
136
143
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "<%- inputEventTag %>": <%- JSON.stringify(inputConfig, null, 2) %>,
3
- "<%- outputEventTag %>": <%- JSON.stringify(outputConfig, null, 2) %> <% eventDynamos.length ? "," : "" -%>
3
+ "<%- outputEventTag %>": <%- JSON.stringify(outputConfig, null, 2) %> <%- eventDynamos.length ? "," : "" -%>
4
4
  <% eventDynamos.forEach((eventDynamo,idx) => { %>
5
5
  "<%- eventDynamo.eventTag %>": <%- JSON.stringify(eventDynamo.event,null,2) %> <% idx < eventDynamos.length - 1 ? ",": "" -%>
6
- <% }) %> <% eventInvokes.length ? "," : "" %>
6
+ <% }) %> <%- eventInvokes.length ? "," : "" -%>
7
7
  <% eventInvokes.forEach((invokeEventComponent,index) => { %>
8
8
  "<%- invokeEventComponent.inputInvokeName %>": <%- JSON.stringify(invokeEventComponent.inputInvoke,null,2) %>,
9
9
  "<%- invokeEventComponent.outputInvokeName %>": <%- JSON.stringify(invokeEventComponent.outputInvoke,null,2) %><%= index < eventInvokes.length - 1 ? ',': "" -%>
@@ -25,12 +25,17 @@ const { bucketPathForUpload } = uploadIntTest;
25
25
 
26
26
  async function data(_izContext, srcPath, settings) {
27
27
  // console.log('settingsInData', settings);
28
+ let intTestPaths = [];
29
+
28
30
  let pathIntTestInBuckets = await bucketPathForUpload(
29
31
  join(srcPath, `../../src/generateIntegrationTest/${settings.serviceTag}`),
30
32
  settings
31
33
  );
32
34
  // console.log({ pathIntTestInBuckets });
33
- let intTestPaths = [];
35
+ if (!pathIntTestInBuckets || pathIntTestInBuckets.length === 0) {
36
+ return []
37
+ }
38
+
34
39
  for (const pathIntTestInBucket of pathIntTestInBuckets) {
35
40
  if (pathIntTestInBucket.key.endsWith(".json")) {
36
41
  let path = pathIntTestInBucket.key.replace(/(events|tests|resources|dynamoDBSeedDataTags|graphSeedDataTags).json$/, '/');
@@ -158,8 +158,7 @@ async function data(_izContext, allIntTestConfig, srcPath) {
158
158
  );
159
159
  if (dynamoEventStage.length > 0) {
160
160
  // baseIntTest.stage[currentStageIdx]["dynamodbOutputEventIdentifiers"] = dynamoEventStage;
161
- stages[currentStageIdx]['dynamodbOutputEventIdentifiers'] =
162
- dynamoEventStage;
161
+ stages[currentStageIdx]['dynamodbOutputEventIdentifiers'] = dynamoEventStage;
163
162
  }
164
163
  }
165
164
 
@@ -174,9 +173,7 @@ async function data(_izContext, allIntTestConfig, srcPath) {
174
173
  if (stage.generatedSeedData.hasOwnProperty(generateSeedType)) {
175
174
  // baseIntTest.stage[currentStageIdx]["generateSeedDatas"] = {
176
175
  stages[currentStageIdx]['generateSeedDatas'] = {
177
- [generateSeedType]: [
178
- ...stage.generatedSeedData[generateSeedType]
179
- ]
176
+ [generateSeedType]: [...stage.generatedSeedData[generateSeedType]]
180
177
  };
181
178
  }
182
179
  }
@@ -107,6 +107,7 @@ function setEvent(input, settings = {}) {
107
107
  }
108
108
 
109
109
  if (isEqual.includes(key)) {
110
+ field.forStageMatching = true;
110
111
  field.isEqual = true;
111
112
  }
112
113
 
@@ -301,7 +302,6 @@ function createEventCaseByHandler(handler, messageAttributes = {}) {
301
302
  [HANDLER.hdrDsq]: { DirectSqs: true },
302
303
  [HANDLER.hdrInv]: {},
303
304
  [HANDLER.hdrSqs]: {
304
- snsSqsTrigger: true,
305
305
  ...(messageAttributes && Object.keys(messageAttributes).length > 0
306
306
  ? { messageAttributes: setEventMessageAttributes(messageAttributes) }
307
307
  : {})
@@ -45,13 +45,7 @@ const {
45
45
 
46
46
  const templatePath = path.join(__dirname, 'template.ejs');
47
47
 
48
- const createExternalLambdaRole = async (
49
- _izContext,
50
- allObjSchemas,
51
- allRelSchemas,
52
- allLocalFlowSchemas,
53
- srcPath
54
- ) => {
48
+ const createExternalLambdaRole = async (_izContext, allObjSchemas, allRelSchemas, allLocalFlowSchemas, srcPath) => {
55
49
  // console.log("allRelationshipSchemas", allRelationshipSchemas);
56
50
  const externalLambdaIamRoleArray = [];
57
51
  // per action external lambda role
@@ -22,7 +22,7 @@ import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
22
22
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
23
23
  import { objectHash as hash } from '@izara_project/izara-shared-core';
24
24
  import { postToConnection } from '../../../libs/source/GenerateCodeLibs.js';
25
- import A from './A_Main.js';
25
+ import <%- functionName %> from './<%- functionName %>_Main.js';
26
26
  import { utils, getObjectSchema } from "@izara_project/izara-core-library-service-schemas";
27
27
  const { createFlowTypeConcat } = utils
28
28
 
@@ -22,8 +22,8 @@ import snsSharedLib from '@izara_project/izara-core-library-sns';
22
22
  import { sns } from '@izara_project/izara-core-library-external-request';
23
23
  import _ from 'lodash';
24
24
  import { objectHash as hash } from '@izara_project/izara-shared-core';
25
- import { consts as generateCodeConsts } from '@izara_project/izara-code-generate-code-service';
26
- const { TOPIC_NAME_GENERATE_CODE, } = generateCodeConsts;
25
+ import { consts } from '@izara_project/izara-core-library-service-schemas';
26
+ const { TOPIC_NAME_GENERATE_CODE } = consts;
27
27
  const PREFIX = {
28
28
  CREATE_OBJECT_ASYNC: "createObjectAsync",
29
29
  CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete"
@@ -41,7 +41,7 @@ const PREFIX = {
41
41
  * @param {*} passBackProperties
42
42
  */
43
43
 
44
- export default async function createObjectComplete (
44
+ export default async function createObjectComplete(
45
45
  _izContext,
46
46
  returnValue,
47
47
  status,
@@ -21,8 +21,8 @@ import snsSharedLib from '@izara_project/izara-core-library-sns';
21
21
 
22
22
  import { sns } from "@izara_project/izara-core-library-external-request";
23
23
 
24
- import { consts as generateCodeConsts } from '@izara_project/izara-code-generate-code-service';
25
- const { TOPIC_NAME_GENERATE_CODE, } = generateCodeConsts;
24
+ import { consts } from '@izara_project/izara-core-library-service-schemas';
25
+ const { TOPIC_NAME_GENERATE_CODE } = consts;
26
26
 
27
27
  //(<optionalRequire>)
28
28
  //(</optionalRequire>)
@@ -20,9 +20,10 @@ import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow
20
20
  import snsSharedLib from '@izara_project/izara-core-library-sns';
21
21
 
22
22
  import { sns } from "@izara_project/izara-core-library-external-request";
23
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code'
24
23
 
25
- const { TOPIC_NAME_GENERATE_CODE, PREFIX } = generateCodeConsts;
24
+ import { consts } from '@izara_project/izara-core-library-service-schemas';
25
+ const { TOPIC_NAME_GENERATE_CODE, PREFIX } = consts;
26
+
26
27
  import { objectHash as hash } from '@izara_project/izara-shared-core';
27
28
 
28
29
  import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-flow';
@@ -24,8 +24,8 @@ import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-f
24
24
  import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
25
25
  import { sns } from "@izara_project/izara-core-library-external-request";
26
26
 
27
- import { consts as generateCodeConsts } from '@izara_project/izara-code-generate-code-service';
28
- const { TOPIC_NAME_GENERATE_CODE, } = generateCodeConsts;
27
+ import { consts } from '@izara_project/izara-core-library-service-schemas';
28
+ const { TOPIC_NAME_GENERATE_CODE } = consts;
29
29
 
30
30
  //(<optionalRequire>)
31
31
  //(</optionalRequire>)
@@ -42,12 +42,11 @@ const { getGraphServiceTagWithCache } = serviceConfig;
42
42
 
43
43
  const { findLinksByObjTypes } = relSchemaLib;
44
44
 
45
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
46
45
  const {
47
46
  PREFIX,
48
47
  TOPIC_NAME_GENERATE_CODE,
49
48
  TOPIC_NAME_GRAPH_HANDLER
50
- } = generateCodeConsts;
49
+ } = consts;
51
50
 
52
51
  import { consts as coreConsts } from '@izara_project/izara-core-library-core';
53
52
 
@@ -99,7 +99,7 @@ export const main = middleware.wrap(async (event, context) => {
99
99
  // call recordHandlerSharedLib.recordHandler with 3 parameters and return promise(resolve)
100
100
  let recordPromise = recordHandlerSharedLib.recordHandler(
101
101
  record, // one record will send to mainFunction
102
- changeRelationshipComplete.changeRelationshipComplete, // mainFunction that need to invoke.
102
+ changeRelationshipComplete, // mainFunction that need to invoke.
103
103
  "ChangeRelationshipComplete", // queue name that need to retry or send to dlq
104
104
  passOnProperties, // all parameters that mainFunction needed.
105
105
  );
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -56,8 +55,8 @@ export default async function changeRelationshipComplete(
56
55
  // start create awaitingStepId
57
56
  const linkTypeId = createLinkTypeId(
58
57
  _izContext,
59
- returnValue.requestParams.fromObject.objType,
60
- returnValue.requestParams.toObject.objType,
58
+ returnValue.requestParams.firstObject.objType,
59
+ returnValue.requestParams.secondObject.objType,
61
60
  returnValue.requestParams.newRelType,
62
61
  returnValue.requestParams.oldRelTypeAndDirection.relationshipDirection
63
62
  );
@@ -67,8 +66,8 @@ export default async function changeRelationshipComplete(
67
66
  linkTypeId,
68
67
  graphServiceTag: graphServiceTag,
69
68
  callingFlowProperties: passBackProperties.passBackProperties.parentPassBackProperties.callingFlowProperties || {},
70
- firstObject: returnValue.requestParams.fromObject,
71
- secondObject: returnValue.requestParams.toObject,
69
+ firstObject: returnValue.requestParams.firstObject,
70
+ secondObject: returnValue.requestParams.secondObject,
72
71
  oldRelTypeAndDirection: returnValue.requestParams.oldRelTypeAndDirection,
73
72
  newRelType: returnValue.requestParams.newRelType,
74
73
  }), // hash id
@@ -98,8 +97,8 @@ export default async function changeRelationshipComplete(
98
97
  _izContext.logger.debug("finished all awaitingStep");
99
98
 
100
99
  let createCompleteMsg = {
101
- firstObject: returnValue.requestParams.fromObject,
102
- secondObject: returnValue.requestParams.toObject,
100
+ firstObject: returnValue.requestParams.firstObject,
101
+ secondObject: returnValue.requestParams.secondObject,
103
102
  relType: returnValue.requestParams.relType,
104
103
  oldRelTypeAndDirection: returnValue.requestParams.oldRelTypeAndDirection,
105
104
  newRelType: returnValue.requestParams.newRelType,
@@ -40,12 +40,11 @@ const {
40
40
  getGraphServiceTagWithCache
41
41
  } = serviceConfig;
42
42
 
43
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
44
43
  const {
45
44
  PREFIX,
46
45
  TOPIC_NAME_GENERATE_CODE,
47
46
  TOPIC_NAME_GRAPH_HANDLER
48
- } = generateCodeConsts;
47
+ } = consts;
49
48
 
50
49
 
51
50
  //(<optionalRequire>)
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -40,12 +40,11 @@ const {
40
40
  getGraphServiceTagWithCache
41
41
  } = serviceConfig;
42
42
 
43
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
44
43
  const {
45
44
  PREFIX,
46
45
  TOPIC_NAME_GENERATE_CODE,
47
46
  TOPIC_NAME_GRAPH_HANDLER
48
- } = generateCodeConsts;
47
+ } = consts;
49
48
 
50
49
  //(<optionalRequire>)
51
50
  //(</optionalRequire>)
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -25,7 +25,7 @@ import snsSharedLib from "@izara_project/izara-core-library-sns";
25
25
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
26
26
  import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
27
27
 
28
- import { sns,lambda } from "@izara_project/izara-core-library-external-request";
28
+ import { sns, lambda } from "@izara_project/izara-core-library-external-request";
29
29
 
30
30
  import { getObjectSchema, utils, serviceConfig, consts, relSchemaLib, identifiersObject } from '@izara_project/izara-core-library-service-schemas'
31
31
  const { findLinksByObjTypes } = relSchemaLib;
@@ -43,12 +43,11 @@ const {
43
43
  getGraphServiceTagWithCache
44
44
  } = serviceConfig;
45
45
 
46
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
47
46
  const {
48
47
  PREFIX,
49
48
  TOPIC_NAME_GENERATE_CODE,
50
49
  TOPIC_NAME_GRAPH_HANDLER
51
- } = generateCodeConsts;
50
+ } = consts;
52
51
 
53
52
  import { consts as coreConsts } from '@izara_project/izara-core-library-core';
54
53
 
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -24,7 +24,7 @@ import snsSharedLib from "@izara_project/izara-core-library-sns";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
  import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
26
26
 
27
- import { sns,lambda } from "@izara_project/izara-core-library-external-request";
27
+ import { sns, lambda } from "@izara_project/izara-core-library-external-request";
28
28
 
29
29
  import { getObjectSchema, utils, serviceConfig, consts, relSchemaLib, identifiersObject } from '@izara_project/izara-core-library-service-schemas'
30
30
  const { findLinksByObjTypes } = relSchemaLib;
@@ -42,12 +42,11 @@ const {
42
42
  getGraphServiceTagWithCache
43
43
  } = serviceConfig;
44
44
 
45
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
46
45
  const {
47
46
  PREFIX,
48
47
  TOPIC_NAME_GENERATE_CODE,
49
48
  TOPIC_NAME_GRAPH_HANDLER
50
- } = generateCodeConsts;
49
+ } = consts;
51
50
 
52
51
  import { consts as coreConsts } from '@izara_project/izara-core-library-core';
53
52
 
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -25,7 +25,7 @@ import snsSharedLib from "@izara_project/izara-core-library-sns";
25
25
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
26
26
  import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
27
27
 
28
- import { sns,lambda } from "@izara_project/izara-core-library-external-request";
28
+ import { sns, lambda } from "@izara_project/izara-core-library-external-request";
29
29
 
30
30
  import { getObjectSchema, utils, serviceConfig, consts, relSchemaLib, identifiersObject } from '@izara_project/izara-core-library-service-schemas'
31
31
  const { findLinksByObjTypes } = relSchemaLib;
@@ -43,12 +43,11 @@ const {
43
43
  getGraphServiceTagWithCache
44
44
  } = serviceConfig;
45
45
 
46
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
47
46
  const {
48
47
  PREFIX,
49
48
  TOPIC_NAME_GENERATE_CODE,
50
49
  TOPIC_NAME_GRAPH_HANDLER
51
- } = generateCodeConsts;
50
+ } = consts;
52
51
 
53
52
  import { consts as coreConsts } from '@izara_project/izara-core-library-core';
54
53
 
@@ -24,14 +24,13 @@ import dynamodbSharedLib from "@izara_project/izara-core-library-dynamodb";
24
24
  import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-flow";
25
25
 
26
26
  import { sns } from "@izara_project/izara-core-library-external-request";
27
- import { utils } from '@izara_project/izara-core-library-service-schemas';
27
+ import { utils, consts } from '@izara_project/izara-core-library-service-schemas';
28
28
  const { createLinkTypeId } = utils;
29
- import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
30
29
 
31
30
  const {
32
31
  TOPIC_NAME_GENERATE_CODE,
33
32
  PREFIX
34
- } = generateCodeConsts;
33
+ } = consts;
35
34
 
36
35
  //(<optionalRequire>)
37
36
  //(</optionalRequire>)
@@ -278,14 +278,6 @@ const SEED_DATA_TAG = {
278
278
  graphSeedDataTags: "graphSeedDataTags"
279
279
  }
280
280
 
281
-
282
- const FLOW_SCHEMA_EVENT_TYPE = {
283
- s3: "s3",
284
- ownTopic: "ownTopic",
285
- extTopic: "extTopic",
286
- eventBridge: "eventBridge",
287
- }
288
-
289
281
  const DEFAULT_LAMBDA_ROLE_PER_ACTION = {
290
282
  [ACTIONS.create]: {
291
283
  dynamoDbPermission: 'PutItem',
@@ -417,7 +409,6 @@ export default {
417
409
  ADD_ON_DATA_STRUCTURE_TYPE,
418
410
  ATTRIBUTE_TAG,
419
411
  PROPERTY_VALUE_TAG,
420
- FLOW_SCHEMA_EVENT_TYPE,
421
412
  GENERATE_SEED_DATA_TYPE,
422
413
  SEED_DATA_TAG,
423
414
  TOPIC_NAME_GENERATE_CODE,