@izara_project/izara-market-library-service-schemas 1.0.40 → 1.0.41
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/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +9 -8
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +1 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +9 -4
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +11 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +90 -49
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/handler/data.js +2 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/mainFunction/data.js +5 -4
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +6 -6
- package/src/reStructure/TemplateData/flowSchema/register/complete/functionYaml/data.js +2 -1
- package/src/reStructure/TemplateData/flowSchema/register/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +22 -17
- package/src/reStructure/TemplateData/flowSchema/register/wbs/handler/template.ejs +4 -1
- package/src/reStructure/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +23 -21
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/functionYaml/template.ejs +1 -2
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +1 -0
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +0 -1
package/package.json
CHANGED
package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -38,7 +38,6 @@ const {
|
|
|
38
38
|
const { TOPIC_NAME_GENERATE_CODE } = require('../../../../../../GenerateCodeLibs/src/Consts');
|
|
39
39
|
|
|
40
40
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
41
|
-
const hookTemplate = path.join(__dirname, "./hookTemplate.ejs");
|
|
42
41
|
/**
|
|
43
42
|
* receive objectSchema
|
|
44
43
|
* create data for WebScoket handler template
|
|
@@ -48,17 +47,19 @@ const hookTemplate = path.join(__dirname, "./hookTemplate.ejs");
|
|
|
48
47
|
*/
|
|
49
48
|
|
|
50
49
|
function data(_izContext, flowSchema, srcPath) {
|
|
51
|
-
|
|
50
|
+
let flowSteps = Object.keys(flowSchema.flowSteps)
|
|
51
|
+
if (flowSteps.includes("Out") && flowSchema.outputTopic === false) {
|
|
52
|
+
return []
|
|
53
|
+
} else {
|
|
54
|
+
return [createSourceParams(_izContext, flowSchema, srcPath)]
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
55
|
-
let functionName = upperCase(
|
|
59
|
+
let functionName = upperCase(flowSchema.flowTag) + "Complete"
|
|
56
60
|
let handlerType = upperCase(HANDLER.hdrSqs)
|
|
57
61
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
58
|
-
let
|
|
59
|
-
let flowStepsOut = flowSteps[1];
|
|
60
|
-
let splitFlowStepsOut = flowStepsOut.split("_");
|
|
61
|
-
let topicOut = `${splitFlowStepsOut[3]}_${splitFlowStepsOut[4]}`
|
|
62
|
+
let topicOut = flowSchema.flowTag + "Complete_Out"
|
|
62
63
|
let queueName = functionName + handlerType
|
|
63
64
|
additionalResourcePermission.push(
|
|
64
65
|
createIamRole(
|
|
@@ -83,7 +84,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
83
84
|
return {
|
|
84
85
|
templatePath: templatePath,
|
|
85
86
|
templateData: {
|
|
86
|
-
resourceLocation: path.join(SOURCE_PATH.
|
|
87
|
+
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchema, flowSchema.flowTag, "source/"),
|
|
87
88
|
functionName,
|
|
88
89
|
handlerType,
|
|
89
90
|
additionalResourcePermission,
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
4
|
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
5
|
events:
|
|
6
|
-
- sqs:
|
|
6
|
+
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js
CHANGED
|
@@ -32,11 +32,16 @@ const templatePath = path.join(__dirname, "template.ejs")
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
function data(_izContext, flowSchema, srcPath) {
|
|
35
|
-
|
|
35
|
+
let flowSteps = Object.keys(flowSchema.flowSteps)
|
|
36
|
+
if (flowSteps.includes("Out") && flowSchema.outputTopic === false) {
|
|
37
|
+
return []
|
|
38
|
+
} else {
|
|
39
|
+
return [createSourceParams(_izContext, flowSchema, srcPath)]
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
function
|
|
39
|
-
let functionName = upperCase(
|
|
43
|
+
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
44
|
+
let functionName = upperCase(flowSchema.flowTag) + "Complete"
|
|
40
45
|
let handlerType = upperCase(HANDLER.hdrSqs)
|
|
41
46
|
let queueName = upperCase(functionName) + upperCase(handlerType)
|
|
42
47
|
return {
|
|
@@ -47,7 +52,7 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
47
52
|
queueName
|
|
48
53
|
},
|
|
49
54
|
setting: {
|
|
50
|
-
savePath: path.join(srcPath, SOURCE_PATH.
|
|
55
|
+
savePath: path.join(srcPath, SOURCE_PATH.flowSchema, flowSchema.flowTag, "source/"),
|
|
51
56
|
saveFileName: `${functionName}_${handlerType}`,
|
|
52
57
|
fileExtension: ".js",
|
|
53
58
|
isAppend: false
|
|
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const path = require('path');
|
|
20
20
|
|
|
21
|
-
const { SOURCE_PATH, FUNCTION_NAME } = require('../../../../../../MainLibs/src/Consts');
|
|
21
|
+
const { SOURCE_PATH, FUNCTION_NAME, HANDLER } = require('../../../../../../MainLibs/src/Consts');
|
|
22
22
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../MainLibs/src/Utils")
|
|
23
23
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
24
24
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema')
|
|
@@ -34,24 +34,25 @@ const getObjectSchema = require('@izara_project/izara-core-library-service-schem
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
function data(_izContext, flowSchema, srcPath) {
|
|
37
|
-
|
|
37
|
+
let flowSteps = Object.keys(flowSchema.flowSteps)
|
|
38
|
+
if (flowSteps.includes("Out") && flowSchema.outputTopic === false) {
|
|
39
|
+
return []
|
|
40
|
+
} else {
|
|
41
|
+
return [createParamsForCreateSource(_izContext, flowSchema, srcPath)]
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
41
|
-
let functionName = upperCase(
|
|
42
|
-
|
|
43
|
-
let flowSteps = Object.keys(flowSchema.flowSteps)
|
|
44
|
-
let flowStepsOut = flowSteps[1];
|
|
45
|
-
let splitFlowStepsOut = flowStepsOut.split("_");
|
|
46
|
-
let topicOut = `${splitFlowStepsOut[3]}+_${splitFlowStepsOut[4]}`
|
|
46
|
+
let functionName = upperCase(flowSchema.flowTag) + "Complete" + upperCase(HANDLER.hdrSqs)
|
|
47
|
+
let topicOut = flowSchema.flowTag + "Complete_Out"
|
|
47
48
|
return {
|
|
48
49
|
templatePath: templatePath,
|
|
49
50
|
templateData: {
|
|
51
|
+
functionName,
|
|
50
52
|
topicOut,
|
|
51
|
-
|
|
52
53
|
},
|
|
53
54
|
setting: {
|
|
54
|
-
savePath: path.join(srcPath, SOURCE_PATH.
|
|
55
|
+
savePath: path.join(srcPath, SOURCE_PATH.flowSchema, flowSchema.flowTag, "source/"),
|
|
55
56
|
saveFileName: `${functionName}_Main`,
|
|
56
57
|
fileExtension: ".js",
|
|
57
58
|
isAppend: false
|
|
@@ -1,50 +1,91 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http: //izara.io>
|
|
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
|
+
*/
|
|
18
|
+
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
|
+
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
23
|
+
|
|
12
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
13
|
-
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
14
|
-
|
|
15
|
-
require('@izara_project/izara-core-library-asynchronous-flow');
|
|
16
|
-
callingFlowSharedLib =
|
|
17
|
-
require('@izara_project/izara-core-library-
|
|
18
|
-
= require('@izara_project/izara-core-library-
|
|
19
|
-
require('@izara_project/izara-core-library-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
require(
|
|
25
|
-
|
|
26
|
-
require(
|
|
27
|
-
|
|
28
|
-
require(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_izContext
|
|
40
|
-
_izContext.logger
|
|
41
|
-
requestParams
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
25
|
+
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
26
|
+
const sqsSharedLib = require('@izara_project/izara-core-library-sqs');
|
|
27
|
+
const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
|
|
28
|
+
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
29
|
+
const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
|
|
30
|
+
const storedCacheSharedLib = require('@izara_project/izara-core-library-stored-cache')
|
|
31
|
+
const triggeredCacheSharedLib = require('@izara_project/izara-core-library-trigger-cache')
|
|
32
|
+
const externalRequest = require('@izara_project/izara-core-library-external-request');
|
|
33
|
+
const sns = externalRequest.sns
|
|
34
|
+
const sqs = externalRequest.sqs
|
|
35
|
+
const lambda = externalRequest.lambda
|
|
36
|
+
const { postToConnection } = require("../../../libs/source/GenerateCodeLibs");
|
|
37
|
+
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
|
|
38
|
+
const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
|
|
39
|
+
const { v4: uuidv4 } = require('uuid')
|
|
40
|
+
const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
41
|
+
const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
42
|
+
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
43
|
+
const { createFieldNamesFromRequestParamsByObjectSchema } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs.js')
|
|
44
|
+
//(<optionalRequire>)
|
|
45
|
+
//(</optionalRequire>)
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
* description of function.
|
|
50
|
+
* @param {Object} _izContext
|
|
51
|
+
* @param {CorrelationIds} _izContext.correlationIds - property of _izContext
|
|
52
|
+
* @param {Logger} _izContext.logger - property of _izContext
|
|
53
|
+
* @param {Object} requestParams - request params
|
|
54
|
+
* @param {Object} requestParams.identifiers - identifiers for get data
|
|
55
|
+
* @param {Object} requestParams.additionalRequest - additionalRequest
|
|
56
|
+
*
|
|
57
|
+
*
|
|
58
|
+
* @returns {object} description of return value
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
module.exports.<%- functionName %> = async (
|
|
62
|
+
_izContext,
|
|
63
|
+
requestParams,
|
|
64
|
+
callingFlowConfig = {},
|
|
65
|
+
//(<additionalParams>)
|
|
66
|
+
//(</additionalParams>)
|
|
67
|
+
) => {
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
_izContext.logger.debug("<%- functionName %> _izContext", _izContext)
|
|
71
|
+
_izContext.logger.debug("<%- functionName %> requestParams", requestParams)
|
|
72
|
+
_izContext.logger.debug("<%- functionName %> callingFlowConfig", callingFlowConfig)
|
|
73
|
+
|
|
74
|
+
_izContext.correlationIds.get(consts.X_CORRELATION_ID)
|
|
75
|
+
_izContext.correlationIds.get(consts.CONNECTION_ID);
|
|
76
|
+
|
|
77
|
+
const flowSchema = await getObjectSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
78
|
+
flowTag: requestParams.action,
|
|
79
|
+
serviceTag: process.env.iz_serviceTag
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
//(<endpointReturn>)
|
|
85
|
+
//(</endpointReturn>)
|
|
86
|
+
}
|
|
87
|
+
} catch (err) {
|
|
88
|
+
_izContext.logger.error('error WebSocketInvoke: ', err)
|
|
89
|
+
throw (err)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/functionYaml/data.js
CHANGED
|
@@ -94,7 +94,7 @@ function createSourceParams(_izContext, flowTag, flowStep, srcPath) {
|
|
|
94
94
|
return {
|
|
95
95
|
templatePath: templatePath,
|
|
96
96
|
templateData: {
|
|
97
|
-
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchema, upperCase(
|
|
97
|
+
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchema, upperCase(flowStep), "source/"),
|
|
98
98
|
functionName,
|
|
99
99
|
handlerType,
|
|
100
100
|
additionalResourcePermission,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -70,8 +70,8 @@ function createParamsForCreateSource(_izContext, flowTag, flowStep, srcPath) {
|
|
|
70
70
|
queueName
|
|
71
71
|
},
|
|
72
72
|
setting: {
|
|
73
|
-
savePath: path.join(srcPath, SOURCE_PATH.flowSchema,
|
|
74
|
-
saveFileName: `${flowStep}_${handlerType}`,
|
|
73
|
+
savePath: path.join(srcPath, SOURCE_PATH.flowSchema, upperCase(flowStep), "source/"),
|
|
74
|
+
saveFileName: `${upperCase(flowStep)}_${handlerType}`,
|
|
75
75
|
fileExtension: ".js",
|
|
76
76
|
isAppend: false
|
|
77
77
|
}
|
package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/flowStep/mainFunction/data.js
CHANGED
|
@@ -30,7 +30,8 @@ const {
|
|
|
30
30
|
FUNCTION_NAME,
|
|
31
31
|
shortNameHandler,
|
|
32
32
|
externalResourceYaml,
|
|
33
|
-
SOURCE_GENERATE_IAM_ROLE
|
|
33
|
+
SOURCE_GENERATE_IAM_ROLE,
|
|
34
|
+
HANDLER
|
|
34
35
|
} = require('../../../../../../MainLibs/src/Consts');
|
|
35
36
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
36
37
|
|
|
@@ -73,7 +74,7 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
73
74
|
function createParamsForCreateSource(_izContext, flowTag, flowStep, srcPath) {
|
|
74
75
|
let functionName = upperCase(flowTag)
|
|
75
76
|
let topicArn = `${upperCase(flowStep)}_In`
|
|
76
|
-
|
|
77
|
+
let handlerType = upperCase(HANDLER.hdrSqs)
|
|
77
78
|
return {
|
|
78
79
|
templatePath: templatePath,
|
|
79
80
|
templateData: {
|
|
@@ -81,8 +82,8 @@ function createParamsForCreateSource(_izContext, flowTag, flowStep, srcPath) {
|
|
|
81
82
|
functionName
|
|
82
83
|
},
|
|
83
84
|
setting: {
|
|
84
|
-
savePath: path.join(srcPath, SOURCE_PATH.flowSchema,
|
|
85
|
-
saveFileName: `${upperCase(flowStep)}
|
|
85
|
+
savePath: path.join(srcPath, SOURCE_PATH.flowSchema, upperCase(flowStep), "source/"),
|
|
86
|
+
saveFileName: `${upperCase(flowStep)}_${handlerType}`,
|
|
86
87
|
fileExtension: ".js",
|
|
87
88
|
isAppend: false
|
|
88
89
|
}
|
|
@@ -293,10 +293,10 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
293
293
|
const flowSchemaOwnTopicEndpointComponent = [...flowSchemaOwnTopicEndpointFuntionYaml, ...flowSchemaOwnTopicEndpointHandler, ...flowSchemaOwnTopicEndpointMainFunction]
|
|
294
294
|
|
|
295
295
|
// flowSchemaOwnTopic EndpointComplete
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
const flowSchemaOwnTopicEndpointCompleteFuntionYaml = createFlowSchemaOwnTopicEndpointCompleteFuntionYaml(_izContext, flowSchema, saveFilePath);
|
|
297
|
+
const flowSchemaOwnTopicEndpointCompleteHandler = createFlowSchemaOwnTopicEndpointCompleteHandler(_izContext, flowSchema, saveFilePath);
|
|
298
|
+
const flowSchemaOwnTopicEndpointCompleteMainFunction = createFlowSchemaOwnTopicEndpointCompleteMainFunction(_izContext, flowSchema, saveFilePath);
|
|
299
|
+
const flowSchemaOwnTopicEndpointCompleteComponent = [...flowSchemaOwnTopicEndpointCompleteFuntionYaml, ...flowSchemaOwnTopicEndpointCompleteHandler, ...flowSchemaOwnTopicEndpointCompleteMainFunction];
|
|
300
300
|
|
|
301
301
|
const flowSchemaOwnTopicQueue = createFlowSchemaOwnTopicQueue(_izContext, flowSchema, saveFilePath);
|
|
302
302
|
const flowSchemaOwnTopicSnsOut = createFlowSchemaOwnTopicSnsOut(_izContext, flowSchema, saveFilePath);
|
|
@@ -307,8 +307,8 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
307
307
|
const flowSchemaOwnTopicFlowStep = [...flowSchemaOwnTopicFlowStepYml, ...flowSchemaOwnTopicFlowStepHandler, ...flowSchemaOwnTopicFlowStepMainFunction]
|
|
308
308
|
// Group the resources
|
|
309
309
|
const ownTopicResources = [
|
|
310
|
-
...flowSchemaOwnTopicComponent, ...flowSchemaOwnTopicEndpointComponent, ...flowSchemaOwnTopicQueue, ...flowSchemaOwnTopicSnsOut, ...flowSchemaOwnTopicFlowStep
|
|
311
|
-
|
|
310
|
+
...flowSchemaOwnTopicComponent, ...flowSchemaOwnTopicEndpointComponent, ...flowSchemaOwnTopicQueue, ...flowSchemaOwnTopicSnsOut, ...flowSchemaOwnTopicFlowStep,
|
|
311
|
+
...flowSchemaOwnTopicEndpointCompleteComponent
|
|
312
312
|
];
|
|
313
313
|
|
|
314
314
|
|
|
@@ -76,7 +76,8 @@ function data(_izContext, srcPath) {
|
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
78
|
[
|
|
79
|
-
resourceNames(RESOURCE_CLASSES.dynamoDbTable, "WebSocketTask")
|
|
79
|
+
resourceNames(RESOURCE_CLASSES.dynamoDbTable, "WebSocketTask"),
|
|
80
|
+
resourceNames(RESOURCE_CLASSES.dynamoDbTable, "RegisterRecords ")
|
|
80
81
|
]
|
|
81
82
|
),
|
|
82
83
|
createIamRole(
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -29,7 +29,7 @@ const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
|
|
|
29
29
|
|
|
30
30
|
const externalRequest = require('@izara_project/izara-core-library-external-request');
|
|
31
31
|
const sns = externalRequest.sns
|
|
32
|
-
const
|
|
32
|
+
const generatedCodeLibs = require("../../../libs/source/GenerateCodeLibs");
|
|
33
33
|
|
|
34
34
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
|
|
35
35
|
const { NoRetryError } = require('@izara_project/izara-core-library-core')
|
|
@@ -61,6 +61,8 @@ module.exports.registerCompleteMain = async (
|
|
|
61
61
|
_izContext.logger.debug("WebSocketInvoke requestParams", requestParams)
|
|
62
62
|
_izContext.logger.debug("WebSocketInvoke callingFlowConfig", callingFlowConfig)
|
|
63
63
|
|
|
64
|
+
let connectionId = _izContext.correlationIds.get(consts.CONNECTION_ID);
|
|
65
|
+
|
|
64
66
|
// getflowSchema by using send topic name
|
|
65
67
|
// ! didn't got topicName from requestParams complete endpoint must send flowTag with identifiersTask
|
|
66
68
|
|
|
@@ -92,27 +94,27 @@ module.exports.registerCompleteMain = async (
|
|
|
92
94
|
const result = await externalRequest.lambda.invokeSync(_izContext,
|
|
93
95
|
await lambdaSharedLib.lambdaFunctionName(_izContext, "GetHdrInv"),
|
|
94
96
|
{
|
|
95
|
-
identifiers: await identifiersObject.
|
|
97
|
+
identifiers: await identifiersObject.identifiersFromIdentifiersConcat(_izContext, objType, requestParams.identifiersTask),
|
|
96
98
|
objectType: objType.objectType
|
|
97
99
|
}
|
|
98
100
|
)
|
|
99
101
|
|
|
100
102
|
for (const [fieldName, fieldNameSetting] of Object.entries(objectSchema.fieldNames)) {
|
|
101
103
|
if (fieldNameSetting.hasOwnProperty("statusField") && fieldNameSetting.statusField === true) {
|
|
102
|
-
if (fieldName
|
|
104
|
+
if (result.fields[fieldName] !== "complete" && result.fields[fieldName] !== "error") {
|
|
103
105
|
// if status is not complete or error will save data into table
|
|
104
106
|
await dynamodbSharedLib.putItem(_izContext,
|
|
105
|
-
await dynamodbSharedLib.tableName(_izContext, "
|
|
107
|
+
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
106
108
|
{
|
|
107
109
|
identifiersTask: requestParams.identifiersTask,
|
|
108
|
-
|
|
110
|
+
connectionId: connectionId
|
|
109
111
|
}
|
|
110
112
|
)
|
|
111
113
|
} else {
|
|
112
114
|
if (!result) {
|
|
113
|
-
await generatedCodeLibs.postToConnection({ message: "not have record" },
|
|
115
|
+
await generatedCodeLibs.postToConnection({ message: "not have record" }, connectionId)
|
|
114
116
|
} else {
|
|
115
|
-
await generatedCodeLibs.postToConnection({ message: result },
|
|
117
|
+
await generatedCodeLibs.postToConnection({ message: result }, connectionId)
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
}
|
|
@@ -122,18 +124,20 @@ module.exports.registerCompleteMain = async (
|
|
|
122
124
|
// check statusType
|
|
123
125
|
switch (flowSchema.statusType) {
|
|
124
126
|
case "statusField":
|
|
125
|
-
await getResult(flowSchema.objType
|
|
127
|
+
await getResult(flowSchema.objType);
|
|
126
128
|
break;
|
|
127
129
|
case "storedCache":
|
|
128
|
-
await getResult(flowSchema.objType
|
|
130
|
+
await getResult(flowSchema.objType);
|
|
129
131
|
break;
|
|
130
132
|
|
|
131
133
|
case "none":
|
|
132
134
|
|
|
133
135
|
let identifier = {};
|
|
134
|
-
if (requestParams.hasOwnProperty("identifiersField") && Array.isArray(requestParams.
|
|
135
|
-
for (const fieldNames of requestParams.
|
|
136
|
-
Object.assign(identifier, {
|
|
136
|
+
if (requestParams.hasOwnProperty("identifiersField") && Array.isArray(requestParams.identifiersField)) {
|
|
137
|
+
for (const fieldNames of requestParams.identifiersField) {
|
|
138
|
+
Object.assign(identifier, {
|
|
139
|
+
[fieldNames]: requestParams[fieldNames]
|
|
140
|
+
})
|
|
137
141
|
}
|
|
138
142
|
identifier = identifier;
|
|
139
143
|
} else {
|
|
@@ -142,27 +146,28 @@ module.exports.registerCompleteMain = async (
|
|
|
142
146
|
|
|
143
147
|
// get task before putItem
|
|
144
148
|
let tasks = await dynamodbSharedLib.query(_izContext,
|
|
145
|
-
await dynamodbSharedLib.tableName(_izContext, "
|
|
149
|
+
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
146
150
|
{
|
|
147
151
|
identifiersTask: hash(identifier)
|
|
148
152
|
}
|
|
149
153
|
)
|
|
150
|
-
|
|
154
|
+
|
|
155
|
+
if (tasks.Items && tasks.Items.length > 0) {
|
|
151
156
|
await Promise.all(tasks.Items.map(async (task) => {
|
|
152
|
-
await generatedCodeLibs.postToConnection({ message: task }, task.
|
|
157
|
+
await generatedCodeLibs.postToConnection({ message: task }, task.connectionId)
|
|
153
158
|
}))
|
|
154
159
|
} else {
|
|
155
160
|
await dynamodbSharedLib.putItem(_izContext,
|
|
156
161
|
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
157
162
|
{
|
|
158
163
|
identifiersTask: hash(identifier),
|
|
159
|
-
connecttionId:
|
|
164
|
+
connecttionId: connectionId
|
|
160
165
|
}
|
|
161
166
|
)
|
|
162
167
|
}
|
|
163
168
|
break
|
|
164
169
|
default:
|
|
165
|
-
throw new NoRetryError(`statusType not found ${
|
|
170
|
+
throw new NoRetryError(`statusType not found ${flowSchema.statusType}`)
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
} catch (err) {
|
|
@@ -26,6 +26,7 @@ const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
|
26
26
|
// const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
27
27
|
const { postToConnection } = require("../../../libs/source/GenerateCodeLibs");
|
|
28
28
|
const { <%- functionName%>Main } = require("./<%- firstLetterUpperCase(functionName) %>_Main");
|
|
29
|
+
const izara = require("@izara_project/izara-middleware");
|
|
29
30
|
|
|
30
31
|
module.exports.main = middlewareHandler.wrap(async (event, context, callback) => {
|
|
31
32
|
|
|
@@ -68,6 +69,7 @@ module.exports.main = middlewareHandler.wrap(async (event, context, callback) =>
|
|
|
68
69
|
{ message: result },
|
|
69
70
|
connectionId
|
|
70
71
|
)
|
|
72
|
+
return (izara.response.webSocketSuccess());
|
|
71
73
|
break
|
|
72
74
|
}
|
|
73
75
|
} else {
|
|
@@ -75,11 +77,12 @@ module.exports.main = middlewareHandler.wrap(async (event, context, callback) =>
|
|
|
75
77
|
// await postMessage({ message: event.message }, connId);
|
|
76
78
|
await postToConnection({ message: event.message }, connId);
|
|
77
79
|
}
|
|
80
|
+
return izara.response.webSocketSuccess()
|
|
78
81
|
} catch (err) {
|
|
79
82
|
const connId = event.requestContext.connectionId
|
|
80
83
|
event._izContext.logger.error('Error, WebSocket: ', err);
|
|
81
|
-
// await sendErrorMessage({ message: err.message }, connId);
|
|
82
84
|
await postToConnection({ message: err.message }, connId);
|
|
85
|
+
return (izara.response.failure(err));
|
|
83
86
|
}
|
|
84
87
|
});
|
|
85
88
|
<%_ const join = require('path').join _%>
|
|
@@ -19,7 +19,7 @@ along with this program. If not, see
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
21
|
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
|
-
const { getObjectSchema } = require('@izara_project/izara-core-library-service-schemas');
|
|
22
|
+
const { getObjectSchema, identifiersObject } = require('@izara_project/izara-core-library-service-schemas');
|
|
23
23
|
|
|
24
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
25
25
|
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
@@ -59,7 +59,7 @@ module.exports.registerMain = async (
|
|
|
59
59
|
//(</additionalParams>)
|
|
60
60
|
) => {
|
|
61
61
|
try {
|
|
62
|
-
let
|
|
62
|
+
let connectionId = _izContext.correlationIds.get(consts.CONNECTION_ID)
|
|
63
63
|
// receive flowTag and identifiers
|
|
64
64
|
let flowSchema = await getObjectSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
65
65
|
flowTag: requestParams.flowTag,
|
|
@@ -71,12 +71,12 @@ module.exports.registerMain = async (
|
|
|
71
71
|
throw new NoRetryError(`flowTag not found ${requestParams.flowTag}`)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const getResult = async (
|
|
74
|
+
const getResult = async (objType) => {
|
|
75
75
|
const objectSchema = await getObjectSchema.getObjSchemaS3WithCache(
|
|
76
76
|
_izContext,
|
|
77
77
|
{
|
|
78
|
-
objectType: objectType,
|
|
79
|
-
serviceTag:
|
|
78
|
+
objectType: objType.objectType,
|
|
79
|
+
serviceTag: objType.serviceTag,
|
|
80
80
|
})
|
|
81
81
|
|
|
82
82
|
_izContext.logger.debug("==> objectSchema", objectSchema)
|
|
@@ -84,27 +84,27 @@ module.exports.registerMain = async (
|
|
|
84
84
|
const result = await externalRequest.lambda.invokeSync(_izContext,
|
|
85
85
|
await lambdaSharedLib.lambdaFunctionName(_izContext, "GetHdrInv"),
|
|
86
86
|
{
|
|
87
|
-
identifiers:
|
|
88
|
-
objectType: objectType
|
|
87
|
+
identifiers: await identifiersObject.identifiersFromIdentifiersConcat(_izContext, objType, requestParams.identifiersTask),
|
|
88
|
+
objectType: objType.objectType
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
|
|
92
92
|
for (const [fieldName, fieldNameSetting] of Object.entries(objectSchema.fieldNames)) {
|
|
93
93
|
if (fieldNameSetting.hasOwnProperty("statusField") && fieldNameSetting.statusField === true) {
|
|
94
|
-
if (fieldName
|
|
94
|
+
if (result.fields[fieldName] !== "complete" && result.fields[fieldName] !== "error") {
|
|
95
95
|
// if status is not complete or error will save data into table
|
|
96
96
|
await dynamodbSharedLib.putItem(_izContext,
|
|
97
|
-
await dynamodbSharedLib.tableName(_izContext, "
|
|
97
|
+
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
98
98
|
{
|
|
99
99
|
identifiersTask: requestParams.identifiersTask,
|
|
100
|
-
|
|
100
|
+
connectionId: connectionId
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
} else {
|
|
104
104
|
if (!result) {
|
|
105
|
-
await generatedCodeLibs.postToConnection({ message: "not have record" },
|
|
105
|
+
await generatedCodeLibs.postToConnection({ message: "not have record" }, connectionId)
|
|
106
106
|
} else {
|
|
107
|
-
await generatedCodeLibs.postToConnection({ message: result },
|
|
107
|
+
await generatedCodeLibs.postToConnection({ message: result }, connectionId)
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -114,16 +114,18 @@ module.exports.registerMain = async (
|
|
|
114
114
|
// Initialize storedCacheData variable that will be used in multiple switch cases
|
|
115
115
|
switch (flowSchema.statusType) {
|
|
116
116
|
case "statusField":
|
|
117
|
-
await getResult(flowSchema.objType
|
|
117
|
+
await getResult(flowSchema.objType)
|
|
118
118
|
break;
|
|
119
119
|
case "storedCache":
|
|
120
|
-
await getResult(flowSchema.objType
|
|
120
|
+
await getResult(flowSchema.objType)
|
|
121
121
|
break;
|
|
122
122
|
case "none":
|
|
123
123
|
let identifier = {};
|
|
124
|
-
if (requestParams.hasOwnProperty("identifiersField") && Array.isArray(requestParams.
|
|
125
|
-
for (const fieldNames of requestParams.
|
|
126
|
-
Object.assign(identifier, {
|
|
124
|
+
if (requestParams.hasOwnProperty("identifiersField") && Array.isArray(requestParams.identifiersField)) {
|
|
125
|
+
for (const fieldNames of requestParams.identifiersField) {
|
|
126
|
+
Object.assign(identifier, {
|
|
127
|
+
[fieldNames]: requestParams[fieldNames]
|
|
128
|
+
})
|
|
127
129
|
}
|
|
128
130
|
identifier = identifier;
|
|
129
131
|
} else {
|
|
@@ -132,21 +134,21 @@ module.exports.registerMain = async (
|
|
|
132
134
|
|
|
133
135
|
// get task before putItem
|
|
134
136
|
let tasks = await dynamodbSharedLib.query(_izContext,
|
|
135
|
-
await dynamodbSharedLib.tableName(_izContext, "
|
|
137
|
+
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
136
138
|
{
|
|
137
139
|
identifiersTask: hash(identifier)
|
|
138
140
|
}
|
|
139
141
|
)
|
|
140
|
-
if (tasks && tasks.length > 0) {
|
|
142
|
+
if (tasks.Items && tasks.Items.length > 0) {
|
|
141
143
|
await Promise.all(tasks.Items.map(async (task) => {
|
|
142
|
-
await generatedCodeLibs.postToConnection({ message: task }, task.
|
|
144
|
+
await generatedCodeLibs.postToConnection({ message: task }, task.connectionId)
|
|
143
145
|
}))
|
|
144
146
|
} else {
|
|
145
147
|
await dynamodbSharedLib.putItem(_izContext,
|
|
146
148
|
await dynamodbSharedLib.tableName(_izContext, "RegisterRecords"),
|
|
147
149
|
{
|
|
148
150
|
identifiersTask: hash(identifier),
|
|
149
|
-
|
|
151
|
+
connectionId: connectionId
|
|
150
152
|
}
|
|
151
153
|
)
|
|
152
154
|
}
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
5
|
events:
|
|
6
6
|
- sqs:
|
|
7
|
-
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
7
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %> + <%- handlerType %>
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -127,6 +127,7 @@ module.exports.createObjectComplete = async (
|
|
|
127
127
|
identifiers: returnValue.objInstanceFull.identifiers,
|
|
128
128
|
fields: returnValue.objInstanceFull.fields
|
|
129
129
|
},
|
|
130
|
+
relationships: returnValue.relationships,
|
|
130
131
|
status: status,
|
|
131
132
|
errorsFound: errorsFound
|
|
132
133
|
}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-firstLetterUpperCase(functionName) %>"]}}} # functionName of callingFlow
|
|
11
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
11
|
role: <%- roleName %>Role
|
|
13
12
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
13
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|