@izara_project/izara-core-generate-service-code 1.0.4 → 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.
- package/package.json +1 -1
- package/src/GenerateTests.js +2 -1
- package/src/TemplateData/EndpointPerService/handler/sqs/template.ejs +1 -1
- package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +10 -12
- package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +2 -4
- package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +13 -17
- package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +19 -19
- package/src/TemplateData/IntTest/generateTests/events/data.js +9 -2
- package/src/TemplateData/IntTest/generateTests/events/templateEvents.ejs +2 -2
- package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +6 -1
- package/src/TemplateData/IntTest/generateTests/tests/data.js +2 -5
- package/src/TemplateData/IntTest/libs/libs.js +1 -1
- package/src/TemplateData/externalService/lambdaRole/data.js +1 -7
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/data.js +1 -1
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +0 -1
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/DsqHandlerTemplate.ejs +15 -1
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +1 -1
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +10 -1
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +1 -5
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +1 -6
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +15 -1
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +1 -2
- package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +3 -3
- package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +2 -2
- package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +3 -2
- package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +2 -2
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +1 -2
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +1 -1
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +8 -9
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +1 -2
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +1 -2
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +2 -3
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +2 -3
- package/src/libs/Consts.js +0 -9
package/package.json
CHANGED
package/src/GenerateTests.js
CHANGED
|
@@ -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(
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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>)
|
|
@@ -269,26 +268,27 @@ export default async function updateMain(
|
|
|
269
268
|
if (Object.keys(updateNodeParams.objInstanceFull.fields).length === 0) {
|
|
270
269
|
return
|
|
271
270
|
} else {
|
|
271
|
+
|
|
272
272
|
//(<beforeUpdateNode>)
|
|
273
273
|
//(</beforeUpdateNode>)
|
|
274
274
|
|
|
275
|
-
awaitingStepIds.push(
|
|
275
|
+
awaitingStepIds.push( // createAwaitingStepId if updateGraph
|
|
276
276
|
{
|
|
277
|
-
awaitingStepId:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
identifiers:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
277
|
+
awaitingStepId: asyncFlowSharedLib.createAwaitingStepId(
|
|
278
|
+
hash({
|
|
279
|
+
objectType: objType.objectType,
|
|
280
|
+
serviceTag: objType.serviceTag,
|
|
281
|
+
identifiers: identifiers,
|
|
282
|
+
fields: fields,
|
|
283
|
+
// correlationIds: _izContext.correlationIds.get("id")
|
|
284
|
+
}),
|
|
285
|
+
PREFIX.updateNode
|
|
285
286
|
),
|
|
286
|
-
//(<
|
|
287
|
+
//(<additionalAttributes>)
|
|
287
288
|
additionalAttributes: {}
|
|
288
|
-
//(</
|
|
289
|
-
}
|
|
290
|
-
)
|
|
291
|
-
|
|
289
|
+
//(</additionalAttributes>)
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
292
|
_izContext.logger.debug("awaitingStepIds", awaitingStepIds)
|
|
293
293
|
|
|
294
294
|
if (awaitingStepIds.length) {
|
|
@@ -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 (
|
|
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) %>
|
|
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
|
-
<% }) %>
|
|
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
|
-
|
|
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
|
|
@@ -98,7 +98,7 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
98
98
|
tableName,
|
|
99
99
|
flowSchemaComplete,
|
|
100
100
|
triggerType,
|
|
101
|
-
queueName: `${createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig('iz_serviceTag'), flowTag: flowSchema.flowTag })}_Main`
|
|
101
|
+
queueName: `${createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig('iz_serviceTag'), flowTag: upperCase(flowSchema.flowTag) })}_Main`
|
|
102
102
|
},
|
|
103
103
|
setting: {
|
|
104
104
|
savePath: path.join(
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js
CHANGED
|
@@ -63,7 +63,6 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
63
63
|
let functionName = 'Process' + upperCase(flowSchema.flowTag);
|
|
64
64
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
65
65
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
66
|
-
let route = upperCase(flowSchema.flowTag);
|
|
67
66
|
let queueName = upperCase(flowSchema.flowTag) + handlerType;
|
|
68
67
|
let objectSchema;
|
|
69
68
|
|
|
@@ -28,7 +28,21 @@ let perRecordsValidatorSchema = {
|
|
|
28
28
|
//(<validatorSchema>)
|
|
29
29
|
//(</validatorSchema>)
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
33
|
+
{
|
|
34
|
+
type: "object",
|
|
35
|
+
required: ['body', 'messageAttributes'],
|
|
36
|
+
properties: {
|
|
37
|
+
body: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
},
|
|
40
|
+
messageAttributes: {
|
|
41
|
+
type: 'object'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
));
|
|
32
46
|
|
|
33
47
|
export const main = middleware.wrap(async (event, context) => {
|
|
34
48
|
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs
CHANGED
|
@@ -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
|
|
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,7 +22,7 @@ const __dirname = path.dirname(__filename);
|
|
|
22
22
|
import consts from '../../../../libs/Consts.js';
|
|
23
23
|
import utils from '../../../../libs/Utils.js';
|
|
24
24
|
|
|
25
|
-
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
|
+
const { SOURCE_PATH, SAVE_FILE_NAME, HANDLER } = consts;
|
|
26
26
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
27
|
|
|
28
28
|
const snsTemplatePath = path.join(
|
|
@@ -64,6 +64,15 @@ function createDataForDefaultSnsInSqs(_izContext, flowSchema, srcPath) {
|
|
|
64
64
|
|
|
65
65
|
let defaultDsqQueueDataList = [];
|
|
66
66
|
|
|
67
|
+
if (flowSchema.statusType === 'triggerCache') {
|
|
68
|
+
defaultDsqQueueDataList.push(
|
|
69
|
+
{
|
|
70
|
+
queueName: upperCase(flowSchema.flowTag) + upperCase(HANDLER.hdrDsq)
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
// if (flowSchema.outputTopic) {
|
|
68
77
|
// if (flowSteps.includes("Out")) {
|
|
69
78
|
// if (flowSchema.outputTopic) {
|
package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js
CHANGED
|
@@ -41,11 +41,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
41
41
|
let functionName =
|
|
42
42
|
'CheckTriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
43
43
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
44
|
-
let queueName =
|
|
45
|
-
'CheckTriggerCache' +
|
|
46
|
-
upperCase(flowSchema.flowTag) +
|
|
47
|
-
'Complete' +
|
|
48
|
-
handlerType;
|
|
44
|
+
let queueName = 'CheckTriggerCache' + upperCase(flowSchema.flowTag) + 'Complete' + handlerType;
|
|
49
45
|
|
|
50
46
|
return {
|
|
51
47
|
templatePath: templatePath,
|
package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js
CHANGED
|
@@ -58,12 +58,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
58
58
|
queueName
|
|
59
59
|
},
|
|
60
60
|
setting: {
|
|
61
|
-
savePath: path.join(
|
|
62
|
-
srcPath,
|
|
63
|
-
SOURCE_PATH.flowSchema,
|
|
64
|
-
upperCase(flowSchema.flowTag),
|
|
65
|
-
'source/'
|
|
66
|
-
),
|
|
61
|
+
savePath: path.join(srcPath, SOURCE_PATH.flowSchema, upperCase(flowSchema.flowTag), 'source/'),
|
|
67
62
|
saveFileName: `${upperCase(functionName)}_${upperCase(handlerType)}`,
|
|
68
63
|
fileExtension: '.js',
|
|
69
64
|
isAppend: true
|
package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs
CHANGED
|
@@ -29,7 +29,21 @@ let perRecordsValidatorSchema = {
|
|
|
29
29
|
//(<validatorSchema>)
|
|
30
30
|
//(</validatorSchema>)
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
34
|
+
{
|
|
35
|
+
type: "object",
|
|
36
|
+
required: ['body', 'messageAttributes'],
|
|
37
|
+
properties: {
|
|
38
|
+
body: {
|
|
39
|
+
type: 'object',
|
|
40
|
+
},
|
|
41
|
+
messageAttributes: {
|
|
42
|
+
type: 'object'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
));
|
|
33
47
|
|
|
34
48
|
export const main = middleware.wrap(async (event, context) => {
|
|
35
49
|
|
package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js
CHANGED
|
@@ -44,8 +44,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
44
44
|
let functionName =
|
|
45
45
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
46
46
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
47
|
-
let queueName =
|
|
48
|
-
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete' + handlerType;
|
|
47
|
+
let queueName = 'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete' + handlerType;
|
|
49
48
|
|
|
50
49
|
return {
|
|
51
50
|
templatePath: templatePath,
|
|
@@ -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
|
|
26
|
-
const { TOPIC_NAME_GENERATE_CODE
|
|
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
|
|
25
|
-
const { TOPIC_NAME_GENERATE_CODE
|
|
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
|
-
|
|
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
|
|
28
|
-
const { TOPIC_NAME_GENERATE_CODE
|
|
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>)
|
package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs
CHANGED
|
@@ -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
|
-
} =
|
|
49
|
+
} = consts;
|
|
51
50
|
|
|
52
51
|
import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
53
52
|
|
package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs
CHANGED
|
@@ -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
|
|
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
|
);
|
package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs
CHANGED
|
@@ -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
|
-
} =
|
|
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.
|
|
60
|
-
returnValue.requestParams.
|
|
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.
|
|
71
|
-
secondObject: returnValue.requestParams.
|
|
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.
|
|
102
|
-
secondObject: returnValue.requestParams.
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
33
|
+
} = consts;
|
|
35
34
|
|
|
36
35
|
//(<optionalRequire>)
|
|
37
36
|
//(</optionalRequire>)
|
package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs
CHANGED
|
@@ -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
|
-
} =
|
|
49
|
+
} = consts;
|
|
51
50
|
|
|
52
51
|
import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
53
52
|
|
package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs
CHANGED
|
@@ -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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
33
|
+
} = consts;
|
|
35
34
|
|
|
36
35
|
//(<optionalRequire>)
|
|
37
36
|
//(</optionalRequire>)
|
package/src/libs/Consts.js
CHANGED
|
@@ -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,
|