@izara_project/izara-market-library-service-schemas 1.0.48 → 1.0.50
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/index.js +3 -1
- package/package.json +3 -3
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +28 -29
- package/src/GenerateCodeLibs/src/TranslateIdsLibs.js +9 -6
- package/src/MainLibs/src/Consts.js +29 -23
- package/src/MainLibs/src/Utils.js +4 -4
- package/src/reStructure/GenerateCode.js +3 -3
- package/src/reStructure/TemplateData/EndpointPerService/handler/api/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/handler/dsq/template.ejs +2 -2
- package/src/reStructure/TemplateData/EndpointPerService/handler/inv/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/handler/sqs/template.ejs +3 -3
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +24 -8
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +8 -3
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +11 -5
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +7 -2
- package/src/reStructure/TemplateData/EndpointPerService/yaml/data.js +0 -1
- package/src/reStructure/TemplateData/findData/GetByStorage/getByDynamo.ejs +5 -4
- package/src/reStructure/TemplateData/findData/GetByStorage/getByGraph.ejs +12 -32
- package/src/reStructure/TemplateData/findData/findDataYaml/data.js +32 -62
- package/src/reStructure/TemplateData/findData/generateTemplateData.js +2 -2
- package/src/reStructure/TemplateData/findData/handler/template.ejs +1 -2
- package/src/reStructure/TemplateData/findData/mainFunction/data.js +19 -12
- package/src/reStructure/TemplateData/findData/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +0 -15
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/mainFunction/data.js +4 -3
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/mainFunction/template.ejs +9 -42
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +0 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +2 -14
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +2 -1
- package/src/reStructure/TemplateData/flowSchema/flowStep/functionYaml/data.js +14 -17
- package/src/reStructure/TemplateData/flowSchema/flowStep/handler/data.js +15 -18
- package/src/reStructure/TemplateData/flowSchema/flowStep/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowStep/mainFunction/data.js +16 -19
- package/src/reStructure/TemplateData/flowSchema/flowStep/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowStep/sns-in/data.js +21 -19
- package/src/reStructure/TemplateData/flowSchema/flowStep/sns-in/template.ejs +20 -6
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +33 -12
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/functionYaml/data.js +128 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/functionYaml/templateApi.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/functionYaml/templateInv.ejs +13 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/handler/data.js +85 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/handler/templateApi.ejs +80 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/handler/templateInv.ejs +47 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/mainFunction/data.js +74 -0
- package/src/reStructure/TemplateData/flowSchema/lambdaSync/mainFunction/template.ejs +96 -0
- package/src/reStructure/TemplateData/flowSchema/register/complete/handler/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +6 -7
- package/src/reStructure/TemplateData/flowSchema/templateBystatusType/storedCacheTemplate.ejs +4 -5
- package/src/reStructure/TemplateData/flowSchema/templateBystatusType/triggerCacheTemplate.ejs +2 -6
- package/src/reStructure/TemplateData/generateRole/data.js +0 -20
- package/src/reStructure/TemplateData/generateRole/template.ejs +4 -2
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +18 -7
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +10 -10
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +10 -10
- package/src/reStructure/TemplateData/processLogical/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/data.js +2 -2
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/data.js +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +5 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +3 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +6 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +7 -7
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +8 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +8 -7
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +8 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +8 -7
- package/src/reStructure/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +2 -2
package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs
CHANGED
|
@@ -35,7 +35,8 @@ let perRecordsValidatorSchema = {
|
|
|
35
35
|
required: [
|
|
36
36
|
'returnValue',
|
|
37
37
|
'status',
|
|
38
|
-
'errorsFound'
|
|
38
|
+
'errorsFound',
|
|
39
|
+
'graphServiceTag'
|
|
39
40
|
],
|
|
40
41
|
properties: {
|
|
41
42
|
returnValue: {
|
|
@@ -47,6 +48,9 @@ let perRecordsValidatorSchema = {
|
|
|
47
48
|
errorsFound: {
|
|
48
49
|
type: 'array',
|
|
49
50
|
default: []
|
|
51
|
+
},
|
|
52
|
+
graphServiceTag: {
|
|
53
|
+
type: 'string'
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
};
|
package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs
CHANGED
|
@@ -41,6 +41,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
41
41
|
returnValue,
|
|
42
42
|
status,
|
|
43
43
|
errorsFound,
|
|
44
|
+
graphServiceTag,
|
|
44
45
|
passBackProperties = {},
|
|
45
46
|
|
|
46
47
|
) => {
|
|
@@ -49,6 +50,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
49
50
|
returnValue: returnValue,
|
|
50
51
|
status: status,
|
|
51
52
|
errorsFound: errorsFound,
|
|
53
|
+
graphServiceTag: graphServiceTag,
|
|
52
54
|
passBackProperties: passBackProperties,
|
|
53
55
|
});
|
|
54
56
|
|
|
@@ -66,7 +68,7 @@ module.exports.createRelationshipComplete = async (
|
|
|
66
68
|
hash({
|
|
67
69
|
linkTypeId,
|
|
68
70
|
relationshipProperties: returnValue.requestParams.relationshipProperties,
|
|
69
|
-
graphServiceTag:
|
|
71
|
+
graphServiceTag: graphServiceTag
|
|
70
72
|
}), // hash id
|
|
71
73
|
PREFIX.createRel // prefix, use constant further
|
|
72
74
|
)
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs
CHANGED
|
@@ -97,7 +97,7 @@ module.exports.deleteRelationship = async (
|
|
|
97
97
|
async function validateIdentifiersExists(_izContext, objType, identifiersObject) {
|
|
98
98
|
|
|
99
99
|
const objTypeString = `objType:{ serviceTag:${objType.serviceTag}, objectType:${objType.objectType} }`;
|
|
100
|
-
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType);
|
|
100
|
+
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType, process.env.iz_serviceSchemaBucketName);
|
|
101
101
|
|
|
102
102
|
if (!objectSchema) {
|
|
103
103
|
errorsFound.push(`validateIdentifiers, not found schema of ${objTypeString}`);
|
|
@@ -130,7 +130,7 @@ module.exports.deleteRelationship = async (
|
|
|
130
130
|
//(<beforeDeleteRel>)
|
|
131
131
|
//(</beforeDeleteRel>)
|
|
132
132
|
|
|
133
|
-
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType);
|
|
133
|
+
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType, process.env.iz_serviceSchemaBucketName);
|
|
134
134
|
_izContext.logger.debug("relationshipSchema: ", relationshipSchema);
|
|
135
135
|
|
|
136
136
|
let targetStorageResources = [];
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs
CHANGED
|
@@ -34,7 +34,8 @@ let perRecordsValidatorSchema = {
|
|
|
34
34
|
required: [
|
|
35
35
|
'returnValue',
|
|
36
36
|
'status',
|
|
37
|
-
'errorsFound'
|
|
37
|
+
'errorsFound',
|
|
38
|
+
'graphServiceTag'
|
|
38
39
|
],
|
|
39
40
|
properties: {
|
|
40
41
|
returnValue: {
|
|
@@ -46,6 +47,9 @@ let perRecordsValidatorSchema = {
|
|
|
46
47
|
errorsFound: {
|
|
47
48
|
type: 'array',
|
|
48
49
|
default: []
|
|
50
|
+
},
|
|
51
|
+
graphServiceTag: {
|
|
52
|
+
type: 'string',
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
};
|
|
@@ -89,6 +93,7 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
|
89
93
|
passOnProperties.push(record.body.Message.returnValue)
|
|
90
94
|
passOnProperties.push(record.body.Message.status)
|
|
91
95
|
passOnProperties.push(record.body.Message.errorsFound)
|
|
96
|
+
passOnProperties.push(record.body.Message.graphServiceTag)
|
|
92
97
|
passOnProperties.push(callingFlowSharedLib.addPassBackPropertiesToPassOnProperties(record.body.Message)) // is Ok PassBackProperties
|
|
93
98
|
// passOnProperties.push(callingFlowSharedLib.addCallingFlowToPassOnProperties(record.body.Message)) // is Ok callinfFlow
|
|
94
99
|
record._izContext.logger.debug('passOnProperties in handler', passOnProperties);
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs
CHANGED
|
@@ -18,12 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const asyncFlowSharedLib = izaraShared.asyncFlowSharedLib;
|
|
26
|
-
const dynamodbSharedLib = izaraShared.dynamodbSharedLib;
|
|
21
|
+
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
22
|
+
const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
|
|
23
|
+
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
24
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
27
25
|
|
|
28
26
|
const sns = require("@izara_project/izara-core-library-external-request").sns;
|
|
29
27
|
const NoRetryError = require("@izara_project/izara-core-library-core/src/NoRetryError");
|
|
@@ -42,6 +40,7 @@ module.exports.deleteRelationshipComplete = async (
|
|
|
42
40
|
returnValue,
|
|
43
41
|
status,
|
|
44
42
|
errorsFound,
|
|
43
|
+
graphServiceTag,
|
|
45
44
|
passBackProperties = {},
|
|
46
45
|
|
|
47
46
|
) => {
|
|
@@ -50,6 +49,7 @@ module.exports.deleteRelationshipComplete = async (
|
|
|
50
49
|
returnValue: returnValue,
|
|
51
50
|
status: status,
|
|
52
51
|
errorsFound: errorsFound,
|
|
52
|
+
graphServiceTag: graphServiceTag,
|
|
53
53
|
passBackProperties: passBackProperties,
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -67,7 +67,7 @@ module.exports.deleteRelationshipComplete = async (
|
|
|
67
67
|
hash({
|
|
68
68
|
linkTypeId,
|
|
69
69
|
relationshipProperties: returnValue.requestParams.relationshipProperties,
|
|
70
|
-
graphServiceTag:
|
|
70
|
+
graphServiceTag: graphServiceTag
|
|
71
71
|
}), // hash id
|
|
72
72
|
PREFIX.deleteRel // prefix, use constant further
|
|
73
73
|
)
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs
CHANGED
|
@@ -98,7 +98,7 @@ module.exports.getRelationship = async (
|
|
|
98
98
|
async function validateIdentifiersExists(_izContext, objType, identifiersObject) {
|
|
99
99
|
|
|
100
100
|
const objTypeString = `objType:{ serviceTag:${objType.serviceTag}, objectType:${objType.objectType} }`;
|
|
101
|
-
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType);
|
|
101
|
+
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType, process.env.iz_serviceSchemaBucketName);
|
|
102
102
|
|
|
103
103
|
if (!objectSchema) {
|
|
104
104
|
errorsFound.push(`validateIdentifiers, not found schema of ${objTypeString}`);
|
|
@@ -131,7 +131,7 @@ module.exports.getRelationship = async (
|
|
|
131
131
|
//(<beforeGetRel>)
|
|
132
132
|
//(</beforeGetRel>)
|
|
133
133
|
|
|
134
|
-
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType);
|
|
134
|
+
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType, process.env.iz_serviceSchemaBucketName);
|
|
135
135
|
_izContext.logger.debug("relationshipSchema: ", relationshipSchema);
|
|
136
136
|
|
|
137
137
|
const links = await findLinksByObjTypes(_izContext, [firstObject.objType, secondObject.objType], relationshipSchema.links)
|
package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs
CHANGED
|
@@ -22,9 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
22
22
|
|
|
23
23
|
const izara = require("@izara_project/izara-middleware");
|
|
24
24
|
const middleware = izara.middlewareHandler;
|
|
25
|
-
const
|
|
26
|
-
const recordHandlerSharedLib =
|
|
27
|
-
const callingFlowSharedLib = izaraShared.callingFlowSharedLib;
|
|
25
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
26
|
+
const recordHandlerSharedLib = require('@izara_project/izara-core-library-record-handler');
|
|
28
27
|
|
|
29
28
|
const getRelationshipComplete = require('./GetRelationshipComplete_Main');
|
|
30
29
|
const Logger = require('@izara_project/izara-core-library-logger');
|
|
@@ -36,7 +35,8 @@ let perRecordsValidatorSchema = {
|
|
|
36
35
|
required: [
|
|
37
36
|
'returnValue',
|
|
38
37
|
'status',
|
|
39
|
-
'errorsFound'
|
|
38
|
+
'errorsFound',
|
|
39
|
+
'graphServiceTag'
|
|
40
40
|
],
|
|
41
41
|
properties: {
|
|
42
42
|
returnValue: {
|
|
@@ -48,6 +48,9 @@ let perRecordsValidatorSchema = {
|
|
|
48
48
|
errorsFound: {
|
|
49
49
|
type: 'array',
|
|
50
50
|
default: []
|
|
51
|
+
},
|
|
52
|
+
graphServiceTag: {
|
|
53
|
+
type: 'string'
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
};
|
|
@@ -91,6 +94,7 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
|
91
94
|
passOnProperties.push(record.body.Message.returnValue)
|
|
92
95
|
passOnProperties.push(record.body.Message.status)
|
|
93
96
|
passOnProperties.push(record.body.Message.errorsFound)
|
|
97
|
+
passOnProperties.push(record.body.Message.graphServiceTag)
|
|
94
98
|
passOnProperties.push(callingFlowSharedLib.addPassBackPropertiesToPassOnProperties(record.body.Message)) // is Ok PassBackProperties
|
|
95
99
|
// passOnProperties.push(callingFlowSharedLib.addCallingFlowToPassOnProperties(record.body.Message)) // is Ok callinfFlow
|
|
96
100
|
record._izContext.logger.debug('passOnProperties in handler', passOnProperties);
|
package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs
CHANGED
|
@@ -18,12 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const asyncFlowSharedLib =
|
|
26
|
-
const dynamodbSharedLib = izaraShared.dynamodbSharedLib;
|
|
21
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
22
|
+
const lambdaSharedLib = require("@izara_project/izara-core-library-lambda");
|
|
23
|
+
const snsSharedLib = require("@izara_project/izara-core-library-sns");
|
|
24
|
+
const dynamodbSharedLib = require("@izara_project/izara-core-library-dynamodb");
|
|
25
|
+
const asyncFlowSharedLib = require("@izara_project/izara-core-library-asynchronous-flow");
|
|
27
26
|
|
|
28
27
|
const sns = require("@izara_project/izara-core-library-external-request").sns;
|
|
29
28
|
const NoRetryError = require("@izara_project/izara-core-library-core/src/NoRetryError");
|
|
@@ -42,6 +41,7 @@ module.exports.getRelationshipComplete = async (
|
|
|
42
41
|
returnValue,
|
|
43
42
|
status,
|
|
44
43
|
errorsFound,
|
|
44
|
+
graphServiceTag,
|
|
45
45
|
passBackProperties = {},
|
|
46
46
|
|
|
47
47
|
) => {
|
|
@@ -50,6 +50,7 @@ module.exports.getRelationshipComplete = async (
|
|
|
50
50
|
returnValue: returnValue,
|
|
51
51
|
status: status,
|
|
52
52
|
errorsFound: errorsFound,
|
|
53
|
+
graphServiceTag: graphServiceTag,
|
|
53
54
|
passBackProperties: passBackProperties,
|
|
54
55
|
});
|
|
55
56
|
|
|
@@ -67,7 +68,7 @@ module.exports.getRelationshipComplete = async (
|
|
|
67
68
|
hash({
|
|
68
69
|
linkTypeId,
|
|
69
70
|
relationshipProperties: returnValue.relationshipProperties,
|
|
70
|
-
graphServiceTag:
|
|
71
|
+
graphServiceTag: graphServiceTag
|
|
71
72
|
}), // hash id
|
|
72
73
|
PREFIX.getRel // prefix, use constant further
|
|
73
74
|
)
|
package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs
CHANGED
|
@@ -104,7 +104,7 @@ module.exports.updateRelationship = async (
|
|
|
104
104
|
async function validateIdentifiersExists(_izContext, objType, identifiersObject) {
|
|
105
105
|
|
|
106
106
|
const objTypeString = `objType:{ serviceTag:${objType.serviceTag}, objectType:${objType.objectType} }`;
|
|
107
|
-
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType);
|
|
107
|
+
const objectSchema = await getObjSchemaS3WithHierarchy(_izContext, objType, process.env.iz_serviceSchemaBucketName);
|
|
108
108
|
|
|
109
109
|
if (!objectSchema) {
|
|
110
110
|
errorsFound.push(`validateIdentifiers, not found schema of ${objTypeString}`);
|
|
@@ -135,7 +135,7 @@ module.exports.updateRelationship = async (
|
|
|
135
135
|
|
|
136
136
|
//(<beforeGetRelUpdateRel>)
|
|
137
137
|
//(</beforeGetRelUpdateRel>)
|
|
138
|
-
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType);
|
|
138
|
+
const relationshipSchema = await getRelationshipSchemaWithCache(_izContext, relType, process.env.iz_serviceSchemaBucketName);
|
|
139
139
|
_izContext.logger.debug("relationshipSchema: ", relationshipSchema);
|
|
140
140
|
|
|
141
141
|
let targetStorageResources = [];
|
package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs
CHANGED
|
@@ -22,9 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
22
22
|
|
|
23
23
|
const izara = require("@izara_project/izara-middleware");
|
|
24
24
|
const middleware = izara.middlewareHandler;
|
|
25
|
-
const
|
|
26
|
-
const recordHandlerSharedLib =
|
|
27
|
-
const callingFlowSharedLib = izaraShared.callingFlowSharedLib;
|
|
25
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
26
|
+
const recordHandlerSharedLib = require('@izara_project/izara-core-library-record-handler');
|
|
28
27
|
|
|
29
28
|
const updateRelationshipComplete = require('./UpdateRelationshipComplete_Main');
|
|
30
29
|
const Logger = require('@izara_project/izara-core-library-logger');
|
|
@@ -36,7 +35,8 @@ let perRecordsValidatorSchema = {
|
|
|
36
35
|
required: [
|
|
37
36
|
'returnValue',
|
|
38
37
|
'status',
|
|
39
|
-
'errorsFound'
|
|
38
|
+
'errorsFound',
|
|
39
|
+
'graphServiceTag'
|
|
40
40
|
],
|
|
41
41
|
properties: {
|
|
42
42
|
returnValue: {//validate from authorizer
|
|
@@ -48,6 +48,9 @@ let perRecordsValidatorSchema = {
|
|
|
48
48
|
errorsFound: {
|
|
49
49
|
type: 'array',
|
|
50
50
|
default: []
|
|
51
|
+
},
|
|
52
|
+
graphServiceTag: {
|
|
53
|
+
type: 'string'
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
};
|
|
@@ -91,6 +94,7 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
|
91
94
|
passOnProperties.push(record.body.Message.returnValue)
|
|
92
95
|
passOnProperties.push(record.body.Message.status)
|
|
93
96
|
passOnProperties.push(record.body.Message.errorsFound)
|
|
97
|
+
passOnProperties.push(record.body.Message.graphServiceTag)
|
|
94
98
|
passOnProperties.push(callingFlowSharedLib.addPassBackPropertiesToPassOnProperties(record.body.Message)) // is Ok PassBackProperties
|
|
95
99
|
// passOnProperties.push(callingFlowSharedLib.addCallingFlowToPassOnProperties(record.body.Message)) // is Ok callinfFlow
|
|
96
100
|
record._izContext.logger.debug('passOnProperties in handler', passOnProperties);
|
package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs
CHANGED
|
@@ -18,12 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const asyncFlowSharedLib =
|
|
26
|
-
const dynamodbSharedLib = izaraShared.dynamodbSharedLib;
|
|
21
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
22
|
+
const lambdaSharedLib = require("@izara_project/izara-core-library-lambda");
|
|
23
|
+
const snsSharedLib = require("@izara_project/izara-core-library-sns");
|
|
24
|
+
const dynamodbSharedLib = require("@izara_project/izara-core-library-dynamodb");
|
|
25
|
+
const asyncFlowSharedLib = require("@izara_project/izara-core-library-asynchronous-flow");
|
|
27
26
|
|
|
28
27
|
const sns = require("@izara_project/izara-core-library-external-request").sns;
|
|
29
28
|
const NoRetryError = require("@izara_project/izara-core-library-core/src/NoRetryError");
|
|
@@ -42,6 +41,7 @@ module.exports.updateRelationshipComplete = async (
|
|
|
42
41
|
returnValue,
|
|
43
42
|
status,
|
|
44
43
|
errorsFound,
|
|
44
|
+
graphServiceTag,
|
|
45
45
|
passBackProperties = {},
|
|
46
46
|
// callingFlowConfig = {}
|
|
47
47
|
) => {
|
|
@@ -50,6 +50,7 @@ module.exports.updateRelationshipComplete = async (
|
|
|
50
50
|
returnValue: returnValue,
|
|
51
51
|
status: status,
|
|
52
52
|
errorsFound: errorsFound,
|
|
53
|
+
graphServiceTag: graphServiceTag,
|
|
53
54
|
passBackProperties: passBackProperties,
|
|
54
55
|
// callingFlowConfig: callingFlowConfig
|
|
55
56
|
});
|
|
@@ -69,7 +70,7 @@ module.exports.updateRelationshipComplete = async (
|
|
|
69
70
|
linkTypeId,
|
|
70
71
|
relId: returnValue.requestParams.relId,
|
|
71
72
|
relationshipProperties: returnValue.requestParams.updatePropertiesParam,
|
|
72
|
-
graphServiceTag:
|
|
73
|
+
graphServiceTag: graphServiceTag
|
|
73
74
|
}), // hash id
|
|
74
75
|
PREFIX.updateRel // prefix, use constant further
|
|
75
76
|
)
|
package/src/reStructure/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js
CHANGED
|
@@ -33,7 +33,7 @@ const STORAGE_TYPES = {
|
|
|
33
33
|
const { firstLetterUpperCase: upperCase } = require('../../../../MainLibs/src/Utils.js')
|
|
34
34
|
const { SOURCE_PATH, SAVE_FILE_NAME } = require('../../../../MainLibs/index.js').consts
|
|
35
35
|
const templatePath = path.join(__dirname, './template.ejs')
|
|
36
|
-
const {
|
|
36
|
+
const { getLocalConfig } = require('../../../../MainLibs/src/Utils.js')
|
|
37
37
|
// ---------- End Per Lambda Handler IamRole Data ----------
|
|
38
38
|
|
|
39
39
|
|
|
@@ -116,7 +116,7 @@ function dataForMainDynamoDbYamlFromObjectSchema(_izContext, objectSchema, srcPa
|
|
|
116
116
|
// }
|
|
117
117
|
|
|
118
118
|
for (let storageResource of Object.values(objectSchema.storageResources)) {
|
|
119
|
-
// if (storageResource.hasOwnProperty("serviceTag") && storageResource.serviceTag !==
|
|
119
|
+
// if (storageResource.hasOwnProperty("serviceTag") && storageResource.serviceTag !== getLocalConfig(srcPath)) {
|
|
120
120
|
// continue; // if serviceTag of storageResource not own service will skip
|
|
121
121
|
// }
|
|
122
122
|
if (storageResource.storageType === STORAGE_TYPES.dynamoDB) {
|