@izara_project/izara-market-library-service-schemas 1.0.39 → 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/MainLibs/src/Consts.js +2 -2
- package/src/TemplateManager/src/libs/Consts.js +2 -1
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +2 -2
- 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/data.js +1 -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/externalTopic/sns-in-sqs/data.js +1 -14
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +82 -0
- 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/FlowSchemaComponent/mainFunction/template.ejs +1 -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/flowSchemaOwnTopic/sns-in/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +2 -1
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +21 -16
- 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 +28 -23
- package/src/reStructure/TemplateData/flowSchema/register/dynamoDB/register.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/register/subscriptionOutAll/data.js +2 -1
- 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/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/functionYaml/data.js +13 -7
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/functionYaml/template.ejs +1 -2
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/handler/data.js +6 -6
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/mainFunction/data.js +5 -5
- package/src/reStructure/TemplateData/generateRole/createSharedResource.js +4 -4
- 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/propertyValueSchema/generateTemplateData.js +1 -0
- package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/data.js +14 -14
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/data.js +27 -17
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +2 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +3 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +2 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +4 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +5 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +5 -2
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +5 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +5 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +5 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +5 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +0 -1
- package/src/reStructure/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +1 -2
- package/src/reStructure/TemplateData/resourceYaml/filterGenerateResource/data.js +4 -3
- package/src/reStructure/libs/ValidateAddOnDataStructure.js +0 -1
- /package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/handler/template.ejs +0 -0
- /package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/webSocketComplete → webSocketComplete}/mainFunction/template.ejs +0 -0
|
@@ -75,6 +75,7 @@ const createExternalSqsFunctionYaml = require('./externalTopic/functionYaml/data
|
|
|
75
75
|
const createExternalSqsHandler = require('./externalTopic/handler/data');
|
|
76
76
|
const createExternalSqsMainFunction = require('./externalTopic/mainFunction/data');
|
|
77
77
|
const createExternalTopicSnsInSqs = require('./externalTopic/sns-in-sqs/data');
|
|
78
|
+
const createExternalTopicSnsOut = require('./externalTopic/sns-out/data')
|
|
78
79
|
|
|
79
80
|
// flowSchema OwnTopic component
|
|
80
81
|
const createFlowSchemaOwnTopicFunctionYaml = require('./flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data');
|
|
@@ -82,9 +83,9 @@ const createFlowSchemaOwnTopicHandler = require('./flowSchemaOwnTopic/FlowSchema
|
|
|
82
83
|
const createFlowSchemaOwnTopicMainFunction = require('./flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data');
|
|
83
84
|
|
|
84
85
|
// flowSchema OwnTopicComplete component
|
|
85
|
-
const createFlowSchemaOwnTopicCompleteFunctionYaml = require("./
|
|
86
|
-
const createFlowSchemaOwnTopicCompleteHandler = require("./
|
|
87
|
-
const createFlowSchemaOwnTopicCompleteMainFunction = require("./
|
|
86
|
+
const createFlowSchemaOwnTopicCompleteFunctionYaml = require("./webSocketComplete/functionYaml/data");
|
|
87
|
+
const createFlowSchemaOwnTopicCompleteHandler = require("./webSocketComplete/handler/data");
|
|
88
|
+
const createFlowSchemaOwnTopicCompleteMainFunction = require("./webSocketComplete/mainFunction/data");
|
|
88
89
|
|
|
89
90
|
// flowSchema OwnTopicEndpoint component
|
|
90
91
|
const createFlowSchemaOwnTopicEndpointFuntionYaml = require('./flowSchemaOwnTopic/EndpointComponent/functionYaml/data');
|
|
@@ -144,10 +145,17 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
144
145
|
const webSocketConnectYaml = createWebSocketConnectYaml(_izContext, saveFilePath);
|
|
145
146
|
const webSocketConnectHandler = createWebSocketConnectHandler(_izContext, saveFilePath);
|
|
146
147
|
|
|
148
|
+
// flowSchema OwnTopic Complete component
|
|
149
|
+
const flowSchemaOwnTopicCompleteFunctionYaml = createFlowSchemaOwnTopicCompleteFunctionYaml(_izContext, allLocalFlowSchemas, saveFilePath);
|
|
150
|
+
const flowSchemaOwnTopicCompleteHandler = createFlowSchemaOwnTopicCompleteHandler(_izContext, saveFilePath);
|
|
151
|
+
const flowSchemaOwnTopicCompleteMainFunction = createFlowSchemaOwnTopicCompleteMainFunction(_izContext, saveFilePath);
|
|
152
|
+
const flowSchemaOwnTopicCompleteComponent = [...flowSchemaOwnTopicCompleteFunctionYaml, ...flowSchemaOwnTopicCompleteHandler, ...flowSchemaOwnTopicCompleteMainFunction]
|
|
153
|
+
|
|
147
154
|
const webSocketResource = [...webSocketTaskTable, ...webSocketConnectYaml, ...webSocketConnectHandler]
|
|
148
155
|
if (allLocalFlowSchemas.records.length) {
|
|
149
156
|
createSourceParams.push(
|
|
150
157
|
...webSocketResource,
|
|
158
|
+
...flowSchemaOwnTopicCompleteComponent
|
|
151
159
|
)
|
|
152
160
|
}
|
|
153
161
|
|
|
@@ -258,13 +266,14 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
258
266
|
const externalSqsHandler = await createExternalSqsHandler(_izContext, flowSchema, saveFilePath);
|
|
259
267
|
const externalSqsMainFunction = await createExternalSqsMainFunction(_izContext, flowSchema, saveFilePath);
|
|
260
268
|
const externalTopicSnsInSqs = createExternalTopicSnsInSqs(_izContext, flowSchema, saveFilePath);
|
|
261
|
-
|
|
269
|
+
const externalTopicSnsOut = createExternalTopicSnsOut(_izContext, flowSchema, saveFilePath);
|
|
262
270
|
// Group related resources for better organization
|
|
263
271
|
const externalTopic = [
|
|
264
272
|
...externalSqsFunctionYaml,
|
|
265
273
|
...externalSqsHandler,
|
|
266
274
|
...externalSqsMainFunction,
|
|
267
|
-
...externalTopicSnsInSqs
|
|
275
|
+
...externalTopicSnsInSqs,
|
|
276
|
+
...externalTopicSnsOut
|
|
268
277
|
];
|
|
269
278
|
|
|
270
279
|
createSourceParams.push(...externalTopic)
|
|
@@ -276,11 +285,7 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
276
285
|
const flowSchemaOwnTopicHandler = createFlowSchemaOwnTopicHandler(_izContext, flowSchema, saveFilePath);
|
|
277
286
|
const flowSchemaOwnTopicMainFunction = await createFlowSchemaOwnTopicMainFunction(_izContext, flowSchema, saveFilePath);
|
|
278
287
|
const flowSchemaOwnTopicComponent = [...flowSchemaOwnTopicFunctionYaml, ...flowSchemaOwnTopicHandler, ...flowSchemaOwnTopicMainFunction]
|
|
279
|
-
|
|
280
|
-
const flowSchemaOwnTopicCompleteFunctionYaml = createFlowSchemaOwnTopicCompleteFunctionYaml(_izContext, saveFilePath);
|
|
281
|
-
const flowSchemaOwnTopicCompleteHandler = createFlowSchemaOwnTopicCompleteHandler(_izContext, flowSchema, saveFilePath);
|
|
282
|
-
const flowSchemaOwnTopicCompleteMainFunction = createFlowSchemaOwnTopicCompleteMainFunction(_izContext, flowSchema, saveFilePath);
|
|
283
|
-
const flowSchemaOwnTopicCompleteComponent = [...flowSchemaOwnTopicCompleteFunctionYaml, ...flowSchemaOwnTopicCompleteHandler, ...flowSchemaOwnTopicCompleteMainFunction]
|
|
288
|
+
|
|
284
289
|
// flowSchemaOwnTopic Endpoint
|
|
285
290
|
const flowSchemaOwnTopicEndpointFuntionYaml = await createFlowSchemaOwnTopicEndpointFuntionYaml(_izContext, flowSchema, saveFilePath);
|
|
286
291
|
const flowSchemaOwnTopicEndpointHandler = createFlowSchemaOwnTopicEndpointHandler(_izContext, flowSchema, saveFilePath);
|
|
@@ -288,10 +293,10 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
288
293
|
const flowSchemaOwnTopicEndpointComponent = [...flowSchemaOwnTopicEndpointFuntionYaml, ...flowSchemaOwnTopicEndpointHandler, ...flowSchemaOwnTopicEndpointMainFunction]
|
|
289
294
|
|
|
290
295
|
// flowSchemaOwnTopic EndpointComplete
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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];
|
|
295
300
|
|
|
296
301
|
const flowSchemaOwnTopicQueue = createFlowSchemaOwnTopicQueue(_izContext, flowSchema, saveFilePath);
|
|
297
302
|
const flowSchemaOwnTopicSnsOut = createFlowSchemaOwnTopicSnsOut(_izContext, flowSchema, saveFilePath);
|
|
@@ -302,8 +307,8 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
302
307
|
const flowSchemaOwnTopicFlowStep = [...flowSchemaOwnTopicFlowStepYml, ...flowSchemaOwnTopicFlowStepHandler, ...flowSchemaOwnTopicFlowStepMainFunction]
|
|
303
308
|
// Group the resources
|
|
304
309
|
const ownTopicResources = [
|
|
305
|
-
...flowSchemaOwnTopicComponent, ...
|
|
306
|
-
|
|
310
|
+
...flowSchemaOwnTopicComponent, ...flowSchemaOwnTopicEndpointComponent, ...flowSchemaOwnTopicQueue, ...flowSchemaOwnTopicSnsOut, ...flowSchemaOwnTopicFlowStep,
|
|
311
|
+
...flowSchemaOwnTopicEndpointCompleteComponent
|
|
307
312
|
];
|
|
308
313
|
|
|
309
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#>
|
|
@@ -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');
|
|
@@ -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')
|
|
@@ -37,7 +37,7 @@ const { v4: uuidv4 } = require('uuid')
|
|
|
37
37
|
const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
38
38
|
// const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
39
39
|
const { generateCodeLibs: { consts: TOPIC_NAME_GENERATE_CODE } } = require('@izara_project/izara-market-library-service-schemas')
|
|
40
|
-
|
|
40
|
+
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
41
41
|
/**
|
|
42
42
|
* description of function.
|
|
43
43
|
* @param {Object} _izContext
|
|
@@ -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
|
|
|
@@ -79,12 +81,12 @@ module.exports.registerCompleteMain = async (
|
|
|
79
81
|
|
|
80
82
|
let correlationId = _izContext.correlationIds.get(consts.X_CORRELATION_ID);
|
|
81
83
|
|
|
82
|
-
const getResult = async (
|
|
84
|
+
const getResult = async (objType) => {
|
|
83
85
|
const objectSchema = await getObjectSchema.getObjSchemaS3WithCache(
|
|
84
86
|
_izContext,
|
|
85
87
|
{
|
|
86
|
-
objectType: objectType,
|
|
87
|
-
serviceTag:
|
|
88
|
+
objectType: objType.objectType,
|
|
89
|
+
serviceTag: objType.serviceTag
|
|
88
90
|
})
|
|
89
91
|
|
|
90
92
|
_izContext.logger.debug("==> objectSchema", objectSchema)
|
|
@@ -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:
|
|
96
|
-
objectType: objectType
|
|
97
|
+
identifiers: await identifiersObject.identifiersFromIdentifiersConcat(_izContext, objType, requestParams.identifiersTask),
|
|
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) {
|
|
@@ -57,7 +57,8 @@ function createDataForSubscriptionOutAll(_izContext, allLocalFlowSchemas, srcPat
|
|
|
57
57
|
let queueName;
|
|
58
58
|
if (flowSchema.outputTopic) {
|
|
59
59
|
let flowStepOut = Object.keys(flowSchema.flowSteps)[1].split("_")
|
|
60
|
-
queueName = flowStepOut[3] + flowStepOut[2]
|
|
60
|
+
// queueName = flowStepOut[3] + flowStepOut[2]
|
|
61
|
+
queueName = flowStepOut[0] + flowSchema.flowTag + "Complete";
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
if (queueName) {
|
|
@@ -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
|
}
|
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
19
19
|
const path = require('path');
|
|
20
20
|
|
|
21
21
|
const { FLOW_SCHEMA_HOOK_STATE, ACTIONS, HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
22
|
-
const { firstLetterUpperCase: upperCase } = require('
|
|
22
|
+
const { firstLetterUpperCase: upperCase } = require('../../../../../MainLibs/src/Utils')
|
|
23
23
|
const {
|
|
24
24
|
SOURCE_PATH,
|
|
25
25
|
defaultIamRolePerAction,
|
|
@@ -34,8 +34,8 @@ const {
|
|
|
34
34
|
externalResourceYaml,
|
|
35
35
|
SOURCE_GENERATE_IAM_ROLE,
|
|
36
36
|
SQS_RESOURCE
|
|
37
|
-
} = require('
|
|
38
|
-
const { TOPIC_NAME_GENERATE_CODE } = require('
|
|
37
|
+
} = require('../../../../../MainLibs/src/Consts');
|
|
38
|
+
const { TOPIC_NAME_GENERATE_CODE } = require('../../../../../GenerateCodeLibs/src/Consts');
|
|
39
39
|
|
|
40
40
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
41
41
|
const hookTemplate = path.join(__dirname, "./hookTemplate.ejs");
|
|
@@ -47,11 +47,11 @@ const hookTemplate = path.join(__dirname, "./hookTemplate.ejs");
|
|
|
47
47
|
* @return {{templatePath, templateData,setting}}
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
-
function data(_izContext, srcPath) {
|
|
51
|
-
return [createSourceParams(_izContext, srcPath)]
|
|
50
|
+
function data(_izContext, allLocalFlowSchemas, srcPath) {
|
|
51
|
+
return [createSourceParams(_izContext, allLocalFlowSchemas, srcPath)]
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function createSourceParams(_izContext, srcPath) {
|
|
54
|
+
function createSourceParams(_izContext, allLocalFlowSchemas, srcPath) {
|
|
55
55
|
let functionName = "WebSocketComplete"
|
|
56
56
|
let handlerType = upperCase(HANDLER.hdrSqs)
|
|
57
57
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -90,6 +90,12 @@ function createSourceParams(_izContext, srcPath) {
|
|
|
90
90
|
resourceNames(RESOURCE_CLASSES.sqs, queueName),
|
|
91
91
|
resourceNames(RESOURCE_CLASSES.sqs, queueName + "DLQ")
|
|
92
92
|
]
|
|
93
|
+
),
|
|
94
|
+
createIamRole(
|
|
95
|
+
{
|
|
96
|
+
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.subscribe]
|
|
97
|
+
},
|
|
98
|
+
allLocalFlowSchemas.records.map(flowSchema => resourceNames(RESOURCE_CLASSES.sns, flowSchema.flowTag + "Complete_Out"))
|
|
93
99
|
)
|
|
94
100
|
)
|
|
95
101
|
|
|
@@ -102,7 +108,7 @@ function createSourceParams(_izContext, srcPath) {
|
|
|
102
108
|
handlerType,
|
|
103
109
|
additionalResourcePermission,
|
|
104
110
|
functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
|
|
105
|
-
roleName:
|
|
111
|
+
roleName: "WebSocketMain",
|
|
106
112
|
queueName: queueName
|
|
107
113
|
},
|
|
108
114
|
setting: {
|
|
@@ -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#>
|
|
@@ -17,9 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17
17
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const path = require('path');
|
|
20
|
-
const {
|
|
21
|
-
const {
|
|
22
|
-
const {
|
|
20
|
+
const { HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
21
|
+
const { firstLetterUpperCase: upperCase } = require('../../../../../MainLibs/src/Utils')
|
|
22
|
+
const { SOURCE_PATH } = require('../../../../../MainLibs/src/Consts');
|
|
23
23
|
const templatePath = path.join(__dirname, "template.ejs")
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -31,11 +31,11 @@ const templatePath = path.join(__dirname, "template.ejs")
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
function data(_izContext,
|
|
35
|
-
return [createParamsForCreateSource(_izContext,
|
|
34
|
+
function data(_izContext, srcPath) {
|
|
35
|
+
return [createParamsForCreateSource(_izContext, srcPath)]
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function createParamsForCreateSource(_izContext,
|
|
38
|
+
function createParamsForCreateSource(_izContext, srcPath) {
|
|
39
39
|
let functionName = "WebSocketComplete"
|
|
40
40
|
let handlerType = upperCase(HANDLER.hdrSqs)
|
|
41
41
|
let queueName = upperCase(functionName) + upperCase(handlerType);
|
|
@@ -18,8 +18,8 @@ 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 {
|
|
22
|
-
const {
|
|
21
|
+
const { HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
22
|
+
const { SOURCE_PATH } = require('../../../../../MainLibs/src/Consts');
|
|
23
23
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
24
24
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema')
|
|
25
25
|
|
|
@@ -32,11 +32,11 @@ const getObjectSchema = require('@izara_project/izara-core-library-service-schem
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
function data(_izContext,
|
|
36
|
-
return [createParamsForCreateSource(_izContext,
|
|
35
|
+
function data(_izContext, srcPath) {
|
|
36
|
+
return [createParamsForCreateSource(_izContext, srcPath)]
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
function createParamsForCreateSource(_izContext,
|
|
39
|
+
function createParamsForCreateSource(_izContext, srcPath) {
|
|
40
40
|
let functionName = "WebSocketComplete"
|
|
41
41
|
return {
|
|
42
42
|
templatePath: templatePath,
|
|
@@ -118,7 +118,7 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
|
|
|
118
118
|
handlerType: [],
|
|
119
119
|
resources: {}
|
|
120
120
|
},
|
|
121
|
-
"
|
|
121
|
+
"WebSocketMain": {
|
|
122
122
|
handlerType: [],
|
|
123
123
|
resources: {}
|
|
124
124
|
},
|
|
@@ -233,11 +233,11 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
|
|
|
233
233
|
templateData.additionalResourcePermission,
|
|
234
234
|
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.ExternalTopicRole].resources
|
|
235
235
|
)
|
|
236
|
-
} else if (templateData?.roleName?.includes("
|
|
237
|
-
groupedByObjectType["
|
|
236
|
+
} else if (templateData?.roleName?.includes("WebSocketMain")) {
|
|
237
|
+
groupedByObjectType["WebSocketMain"].handlerType.push(templateData);
|
|
238
238
|
processResourcePermissions(
|
|
239
239
|
templateData.additionalResourcePermission,
|
|
240
|
-
groupedByObjectType["
|
|
240
|
+
groupedByObjectType["WebSocketMain"].resources
|
|
241
241
|
)
|
|
242
242
|
} else if (templateData?.roleName?.includes(SOURCE_GENERATE_IAM_ROLE.EventBridge)) {
|
|
243
243
|
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.EventBridge].handlerType.push(templateData);
|
|
@@ -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#>
|