@izara_project/izara-market-library-service-schemas 1.0.18 → 1.0.20
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 +2 -2
- package/src/GenerateCodeLibs/src/Consts.js +32 -2
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +3 -61
- package/src/SourceManager/src/Utils.js +40 -1
- package/src/TemplateManager/src/FindData/FindDataYaml/data.js +4 -1
- package/src/TemplateManager/src/FindData/FindDataYaml/template.ejs +1 -14
- package/src/TemplateManager/src/GenerateCode.js +152 -46
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/functionYaml/data.js +23 -3
- package/src/TemplateManager/src/OutPerActionComplete/OutCreateComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/functionYaml/data.js +22 -3
- package/src/TemplateManager/src/OutPerActionComplete/OutDeleteComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/functionYaml/data.js +23 -3
- package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/functionYaml/data.js +23 -3
- package/src/TemplateManager/src/OutPerActionComplete/OutUpdateComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/data.js +6 -6
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/template.ejs +1 -14
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrDsq/data.js +2 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrDsq/template.ejs +1 -14
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/template.ejs +1 -14
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrSqs/data.js +3 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrSqs/template.ejs +1 -14
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrWbs/data.js +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Create/template.ejs +65 -26
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Delete/template.ejs +0 -1
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Get/template.ejs +13 -11
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Update/template.ejs +34 -18
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler/mainFunction → PerActionEndpoint/libs}/data.js +12 -23
- package/src/TemplateManager/src/PerActionEndpoint/libs/template.ejs +46 -0
- package/src/TemplateManager/src/ProcessLogical/ProcessLogicalYaml/data.js +18 -2
- package/src/TemplateManager/src/ProcessLogical/ProcessLogicalYaml/template.ejs +1 -14
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrDsq/data.js +20 -3
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrDsq/template.ejs +1 -14
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrSqs/data.js +21 -3
- package/src/TemplateManager/src/ProcessLogicalPagination/FunctionYaml/HdrSqs/template.ejs +1 -14
- package/src/TemplateManager/src/ProcessLogicalPagination/mainFunction/template.ejs +1 -1
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrApi/data.js +16 -2
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrApi/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrDsq/data.js +17 -2
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrDsq/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrInv/data.js +16 -2
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrInv/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrSqs/data.js +18 -3
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrSqs/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/functionYaml/data.js +18 -3
- package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrApi/data.js +15 -2
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrApi/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrDsq/data.js +17 -2
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrDsq/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrInv/data.js +16 -2
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrInv/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrSqs/data.js +18 -3
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrSqs/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/functionYaml/data.js +18 -3
- package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/functionYaml/data.js +19 -4
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/functionYaml/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrApi/data.js +19 -2
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrApi/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrDsq/data.js +19 -2
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrDsq/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrInv/data.js +20 -2
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrInv/template.ejs +1 -14
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrSqs/data.js +20 -2
- package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrSqs/template.ejs +1 -14
- package/src/TemplateManager/src/Role/createSharedResource.js +270 -0
- package/src/TemplateManager/src/Role/sharedResourceTemplate.ejs +58 -0
- package/src/TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml/HdrDsq/data.js +1 -1
- package/src/TemplateManager/src/TranslateIdReq/TranslateIds/functionYaml/HdrSqs/data.js +1 -1
- package/src/TemplateManager/src/externalService/LambdaRole/data.js +119 -9
- package/src/TemplateManager/src/externalService/LambdaRole/template.ejs +3 -4
- package/src/TemplateManager/src/externalService/SnsTopicSubscriotions/data.js +31 -6
- package/src/TemplateManager/src/flowSchema/DefaultWebSocketResource/dynamoDb/ReservedTableData.js +65 -0
- package/src/TemplateManager/src/{flowTag/webSocket → flowSchema/DefaultWebSocketResource}/webSocketConnect/functionYaml/data.js +3 -2
- package/src/TemplateManager/src/{flowTag/webSocket → flowSchema/DefaultWebSocketResource}/webSocketConnect/handler/data.js +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/functionYaml/data.js +77 -0
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler → flowSchema/FlowSchemaEndpoint/InProcessFlowSchema}/functionYaml/template.ejs +9 -3
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/handler/data.js +47 -0
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler → flowSchema/FlowSchemaEndpoint/InProcessFlowSchema}/handler/template.ejs +25 -52
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/mainFunction/data.js +46 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/mainFunction/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/sns-sqs/data.js +36 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/sns-sqs/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/functionYaml/data.js +35 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/functionYaml/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/handler/data.js +35 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/handler/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/mainFunction/data.js +35 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/mainFunction/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/sns-sqs/data.js +35 -0
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/OutComplete/sns-sqs/template.ejs +0 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/functionYaml/data.js +102 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/functionYaml/template.ejs +30 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/handler/data.js +58 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/handler/template.ejs +126 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/mainFunction/data.js +51 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/mainFunction/template.ejs +121 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/queue/data.js +64 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/confirmReservedAfterUpload/queue/template.ejs +45 -0
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler → flowSchema/UploadS3Case/createObject}/functionYaml/data.js +42 -13
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/functionYaml/template.ejs +37 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/handler/data.js +75 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/handler/template.ejs +120 -0
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler/handler → flowSchema/UploadS3Case/createObject/mainFunction}/data.js +11 -15
- package/src/TemplateManager/src/{flowTag/webSocket/websocketHandler → flowSchema/UploadS3Case/createObject}/mainFunction/template.ejs +4 -4
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createObjectComplete}/functionYaml/data.js +6 -4
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/functionYaml/template.ejs +30 -0
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createObjectComplete}/handler/data.js +1 -1
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createObjectComplete}/handler/template.ejs +10 -10
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createObjectComplete}/mainFunction/data.js +3 -4
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/mainFunction/template.ejs +86 -0
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createObjectComplete}/sns-sqs/data.js +4 -2
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObjectComplete/sns-sqs/template.ejs +49 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/functionYaml/data.js +85 -0
- package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete → flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc}/functionYaml/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/handler/data.js +57 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/handler/template.ejs +120 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/mainFunction/data.js +51 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/mainFunction/template.ejs +164 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/sqs/data.js +65 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/sqs/template.ejs +53 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/functionYaml/data.js +112 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/functionYaml/template.ejs +30 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/handler/data.js +57 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/handler/template.ejs +126 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/mainFunction/data.js +54 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/mainFunction/template.ejs +254 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/queue/data.js +64 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/queue/template.ejs +45 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/handler/data.js +94 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/handler/templateAsyncHandler.ejs +110 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/handler/templateSyncHandler.ejs +49 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/hookLogic/data.js +44 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/mainFunction/data.js +66 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/mainFunction/template.ejs +7 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/queue/data.js +73 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/queue/snsTemplate.ejs +59 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode/queue/sqsTemplate.ejs +43 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/functionYaml/data.js +102 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/functionYaml/template.ejs +43 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/handler/data.js +94 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/handler/templateAsyncHandler.ejs +110 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/handler/templateSyncHandler.ejs +49 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/hookLogic/data.js +65 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/mainFunction/data.js +67 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/mainFunction/template.ejs +30 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/queue/data.js +125 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/hookCode(old)/queue/snsTemplate.ejs +59 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrDsq/data.js +87 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrDsq/template.ejs +30 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrS3/data.js +112 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/functionYml/HdrS3/template.ejs +38 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerDsq/data.js +45 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerDsq/template.ejs +151 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerS3/data.js +43 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/handler/handlerS3/template.ejs +68 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/mainFunction/data.js +43 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/mainFunction/template.ejs +392 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/queue/data.js +77 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/queue/dsqTemplatePath.ejs +32 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/queue/s3Template.ejs +59 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/S3/data.js +51 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/S3/template.ejs +13 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/libs/data.js +42 -0
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/libs/template.ejs +137 -0
- package/src/TemplateManager/src/libs/Consts.js +89 -34
- package/src/TemplateManager/src/reStructureExample/GenerateCodeTest.js +31 -0
- package/src/TemplateManager/src/reStructureExample/TemplateConfig.js +11 -0
- package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/data.js +0 -0
- package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/generateCodeShared.js +1 -0
- package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/generatePerAction.js +5 -0
- package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/template.ejs +0 -0
- package/src/TemplateManager/src/flowTag/webSocket/webSocketComplete/mainFunction/template.ejs +0 -180
- /package/src/TemplateManager/src/{flowTag/resources/dynamoDb/data.js → flowSchema/DefaultWebSocketResource/dynamoDb/WebSocketTaskData.js} +0 -0
- /package/src/TemplateManager/src/{flowTag/webSocket → flowSchema/DefaultWebSocketResource}/webSocketConnect/functionYaml/template.ejs +0 -0
- /package/src/TemplateManager/src/{flowTag/webSocket → flowSchema/DefaultWebSocketResource}/webSocketConnect/handler/template.ejs +0 -0
- /package/src/TemplateManager/src/{flowTag/webSocket/webSocketComplete/sns-sqs/template.ejs → flowSchema/UploadS3Case/hookCode(old)/queue/sqsTemplate.ejs} +0 -0
|
@@ -28,7 +28,8 @@ const consts = require('@izara_project/izara-core-library-service-schemas/src/Co
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
const {
|
|
31
|
-
dynamoDbIdentifiersByStorageResource,
|
|
31
|
+
dynamoDbIdentifiersByStorageResource,
|
|
32
|
+
createFieldForUpdateDynamoDb
|
|
32
33
|
} = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs');
|
|
33
34
|
|
|
34
35
|
const izaraShared = require('@izara_project/izara-shared');
|
|
@@ -74,9 +75,11 @@ module.exports.<%- functionName %>Main = async (
|
|
|
74
75
|
_izContext.logger.debug("<%- functionName %> callingFlowConfig", callingFlowConfig)
|
|
75
76
|
|
|
76
77
|
let errorFounds = [];
|
|
77
|
-
const userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID)
|
|
78
|
+
const userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
79
|
+
const targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID);
|
|
80
|
+
|
|
78
81
|
if (!userId) {
|
|
79
|
-
errorFounds.push("Not
|
|
82
|
+
errorFounds.push("Not have userId")
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
const OBJECT_TYPE = "<%- objectType %>"
|
|
@@ -102,6 +105,10 @@ module.exports.<%- functionName %>Main = async (
|
|
|
102
105
|
)
|
|
103
106
|
_izContext.logger.debug("objectSchema", objectSchema);
|
|
104
107
|
|
|
108
|
+
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
109
|
+
errorFounds.push('not have targetId')
|
|
110
|
+
}
|
|
111
|
+
|
|
105
112
|
let updateDataDetails = await createUpdateDataDetail(_izContext, objectSchema);
|
|
106
113
|
|
|
107
114
|
_izContext.logger.debug("updateDataDetails", updateDataDetails);
|
|
@@ -121,9 +128,13 @@ module.exports.<%- functionName %>Main = async (
|
|
|
121
128
|
if (!updateVersionedData.hasOwnProperty(fieldSetting.versionedDataLabel)) {
|
|
122
129
|
updateVersionedData[fieldSetting.versionedDataLabel] = {};
|
|
123
130
|
}
|
|
124
|
-
Object.assign(updateVersionedData[fieldSetting.versionedDataLabel], {
|
|
131
|
+
Object.assign(updateVersionedData[fieldSetting.versionedDataLabel], {
|
|
132
|
+
[fieldProp]: requestParams.objInstanceFull.fields[fieldProp]
|
|
133
|
+
})
|
|
125
134
|
} else {
|
|
126
|
-
Object.assign(updateMainNodeData, {
|
|
135
|
+
Object.assign(updateMainNodeData, {
|
|
136
|
+
[fieldProp]: requestParams.objInstanceFull.fields[fieldProp]
|
|
137
|
+
})
|
|
127
138
|
}
|
|
128
139
|
}
|
|
129
140
|
_izContext.logger.debug("updateMainNodeData::", updateMainNodeData);
|
|
@@ -149,7 +160,7 @@ module.exports.<%- functionName %>Main = async (
|
|
|
149
160
|
}
|
|
150
161
|
// check mainNode Data should not exists
|
|
151
162
|
if (Object.keys(updateMainNodeData).length) {
|
|
152
|
-
|
|
163
|
+
errorFounds.push("cannot update mainNode if have versionedDataIds");
|
|
153
164
|
}
|
|
154
165
|
}
|
|
155
166
|
|
|
@@ -215,10 +226,10 @@ module.exports.<%- functionName %>Main = async (
|
|
|
215
226
|
awaitingStepIds,
|
|
216
227
|
asyncFlowSharedLib.createPendingStepId(
|
|
217
228
|
hash(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
{
|
|
230
|
+
identifiers,
|
|
231
|
+
fields,
|
|
232
|
+
})
|
|
222
233
|
)
|
|
223
234
|
)
|
|
224
235
|
_izContext.logger.debug("awaitingMultipleStep", awaitingMultipleStep)
|
|
@@ -253,7 +264,7 @@ module.exports.<%- functionName %>Main = async (
|
|
|
253
264
|
let updateNodeMessageBody = {
|
|
254
265
|
Message: JSON.stringify(updateNodeParams),
|
|
255
266
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
256
|
-
TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateNode, storageTag,)
|
|
267
|
+
TopicArn: await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GRAPH_HANDLER.inUpdateNode, storageTag, )
|
|
257
268
|
}
|
|
258
269
|
|
|
259
270
|
_izContext.logger.debug('requset param before send to topic InUpdateNode:::', updateNodeMessageBody);
|
|
@@ -275,12 +286,16 @@ module.exports.<%- functionName %>Main = async (
|
|
|
275
286
|
_izContext.logger.debug("identifiersForUpdateData", identifiersForUpdateData)
|
|
276
287
|
_izContext.logger.debug("fieldForUpdateTableDynamo", fieldForUpdateTableDynamo)
|
|
277
288
|
|
|
278
|
-
await dynamodbSharedLib.updateItem(
|
|
289
|
+
let updateItem = await dynamodbSharedLib.updateItem(
|
|
279
290
|
_izContext,
|
|
280
291
|
await dynamodbSharedLib.tableName(_izContext, updateDataDetail.tableName),
|
|
281
292
|
identifiersForUpdateData,
|
|
282
|
-
fieldForUpdateTableDynamo
|
|
293
|
+
fieldForUpdateTableDynamo,
|
|
294
|
+
{
|
|
295
|
+
returnValues: "ALL_NEW"
|
|
296
|
+
}
|
|
283
297
|
)
|
|
298
|
+
_izContext.logger.debug("updateItem:", updateItem);
|
|
284
299
|
|
|
285
300
|
if (awaitingStepIds.length == 0) {
|
|
286
301
|
let messageObject = {
|
|
@@ -288,15 +303,16 @@ module.exports.<%- functionName %>Main = async (
|
|
|
288
303
|
objectType: OBJECT_TYPE,
|
|
289
304
|
serviceTag: SERVICE_TAG
|
|
290
305
|
},
|
|
291
|
-
|
|
292
|
-
identifiers: identifiersForUpdateData,
|
|
293
|
-
fields: fieldForUpdateTableDynamo
|
|
294
|
-
}
|
|
306
|
+
updateItem
|
|
295
307
|
}
|
|
296
308
|
|
|
297
309
|
if (callingFlowConfig[callingFlowSharedLib.consts.CALLINGFLOWPROPERTIES_PROPERTYNAME]) {
|
|
298
310
|
_izContext.logger.debug("HAVE CALLINGFLOW");
|
|
299
|
-
|
|
311
|
+
|
|
312
|
+
messageObject = callingFlowSharedLib.addPassBackPropertiesToSnsResponseMessageObject(callingFlowConfig, messageObject);
|
|
313
|
+
let messageAttributes = callingFlowSharedLib.addCallingFlowToSnsResponseMessageAttributes(callingFlowConfig, {});
|
|
314
|
+
|
|
315
|
+
_izContext.logger.debug("after create callingFlow", messageObject)
|
|
300
316
|
let outUpdateNodeCompleteTopic = await snsSharedLib.snsTopicArn(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete);
|
|
301
317
|
let messageParams = {
|
|
302
318
|
Message: JSON.stringify(messageObject),
|
|
@@ -16,44 +16,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
'use strict';
|
|
19
|
+
|
|
19
20
|
const path = require('path');
|
|
20
21
|
const fs = require('fs');
|
|
21
22
|
|
|
22
23
|
const { ACTIONS, HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
23
24
|
|
|
24
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase
|
|
25
|
-
const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = require("
|
|
26
|
-
|
|
27
|
-
const templatePath = path.join(__dirname, "template.ejs")
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* receive objectSchema
|
|
31
|
-
* create data for WebScoket handler template
|
|
32
|
-
*
|
|
33
|
-
* @param {Object} objectSchema
|
|
34
|
-
* @return {{templatePath, templateData,setting}}
|
|
35
|
-
*/
|
|
25
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../MainLibs/src/Utils")
|
|
26
|
+
const { DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = require("../../libs/Consts");
|
|
36
27
|
|
|
28
|
+
const templatePath = path.join(__dirname, "./template.ejs")
|
|
37
29
|
|
|
38
30
|
function data(_izContext, srcPath) {
|
|
31
|
+
return [createSourceParams(_izContext, srcPath)]
|
|
32
|
+
};
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function createParamsForCreateSource(_izContext, srcPath) {
|
|
46
|
-
let functionName = "FlowSchema"
|
|
34
|
+
function createSourceParams(_izContext, srcPath) {
|
|
47
35
|
|
|
48
36
|
return {
|
|
49
37
|
templatePath: templatePath,
|
|
50
38
|
templateData: {},
|
|
51
39
|
setting: {
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
saveFileName: "GenerateCodeLibs",
|
|
41
|
+
savePath: path.join(srcPath, SOURCE_PATH.generateCodeLib),
|
|
54
42
|
fileExtension: ".js",
|
|
55
43
|
isAppend: false
|
|
56
44
|
}
|
|
57
45
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = data;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const externalRequest = require('@izara_project/izara-core-library-external-request');
|
|
21
|
+
const lambda = externalRequest.lambda;
|
|
22
|
+
|
|
23
|
+
const inMemoryCacheLib = require('@izara_project/izara-shared/src/InMemoryCacheLib');
|
|
24
|
+
const hash = require('object-hash')
|
|
25
|
+
|
|
26
|
+
async function checkPermission(_izContext, functionName, payload) {
|
|
27
|
+
return await lambda.invokeSync(_izContext, functionName, payload)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const checkPermissionWithCache = inMemoryCacheLib.inMemoryCacheLib(
|
|
31
|
+
checkPermission, // fn
|
|
32
|
+
{ // setting
|
|
33
|
+
max: 100,
|
|
34
|
+
maxAge: 86400000,
|
|
35
|
+
promise: true,
|
|
36
|
+
profileName: 'checkPermission',
|
|
37
|
+
normalizer: function (args) {
|
|
38
|
+
return hash([args[1], args[2]])
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
module.exports = {
|
|
44
|
+
checkPermission,
|
|
45
|
+
checkPermissionWithCache
|
|
46
|
+
}
|
|
@@ -26,7 +26,22 @@ const serviceConfig = serviceSchemas.serviceConfig;
|
|
|
26
26
|
|
|
27
27
|
const { HANDLER, STORAGE_TYPES, ACTIONS } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
28
28
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../MainLibs/src/Utils")
|
|
29
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
createIamRole,
|
|
31
|
+
resourceNames,
|
|
32
|
+
RESOURCE_CLASSES,
|
|
33
|
+
DEFAULT_LAMBDA_ROLE_PER_ACTION,
|
|
34
|
+
SQS_RESOURCE,
|
|
35
|
+
SOURCE_PATH,
|
|
36
|
+
SAVE_FILE_NAME,
|
|
37
|
+
LAMBDA_RESOURCE,
|
|
38
|
+
FUNCTION_NAME,
|
|
39
|
+
DYNAMO_RESOURCE,
|
|
40
|
+
SNS_RESOURCE,
|
|
41
|
+
defaultIamRolePerAction,
|
|
42
|
+
shortNameHandler,
|
|
43
|
+
SHORT_FUNCTION_NAME,
|
|
44
|
+
SOURCE_GENERATE_IAM_ROLE } = require("../../libs/Consts");
|
|
30
45
|
|
|
31
46
|
/**
|
|
32
47
|
* receive objectSchema
|
|
@@ -130,7 +145,8 @@ async function data(_izContext, objectSchemas, srcPath) {
|
|
|
130
145
|
resourceLocation: SOURCE_PATH.resourceLocationProcessLogical,
|
|
131
146
|
handlerType: HANDLER.hdrSqs,
|
|
132
147
|
additionalResourcePermission,
|
|
133
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.processLogical) + upperCase(shortNameHandler(HANDLER.hdrSqs))
|
|
148
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.processLogical) + upperCase(shortNameHandler(HANDLER.hdrSqs)),
|
|
149
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.ProcessFindDataRole
|
|
134
150
|
},
|
|
135
151
|
setting: {
|
|
136
152
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -6,20 +6,7 @@
|
|
|
6
6
|
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%- firstLetterUpperCase(handlerType) %>
|
|
8
8
|
batchSize: 10
|
|
9
|
-
|
|
10
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
11
|
-
- Effect: <%- resourcePermission.effect %>
|
|
12
|
-
Action:
|
|
13
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
14
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
15
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
16
|
-
<%_ }) _%>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
Resource:
|
|
19
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
20
|
-
- "<%- resource %>"
|
|
21
|
-
<%_ }) _%>
|
|
22
|
-
<%_}) _%>
|
|
9
|
+
role: <%- roleName %>Role
|
|
23
10
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
24
11
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
25
12
|
<%_ function firstLetterUpperCase(text){ return text.charAt(0).toUpperCase() + text.slice(1) } _%>
|
|
@@ -22,8 +22,24 @@ const path = require('path');
|
|
|
22
22
|
const templatePath = path.join(__dirname, "./template.ejs")
|
|
23
23
|
|
|
24
24
|
const { HANDLER, STORAGE_TYPES, ACTIONS } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
25
|
-
const {
|
|
26
|
-
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
DEFAULT_LAMBDA_ROLE_PER_ACTION,
|
|
30
|
+
SQS_RESOURCE,
|
|
31
|
+
SOURCE_PATH,
|
|
32
|
+
SAVE_FILE_NAME,
|
|
33
|
+
FUNCTION_NAME,
|
|
34
|
+
defaultIamRolePerAction,
|
|
35
|
+
shortNameHandler,
|
|
36
|
+
SHORT_FUNCTION_NAME,
|
|
37
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
38
|
+
} = require("../../../libs/Consts");
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
firstLetterUpperCase: upperCase
|
|
42
|
+
} = require('../../../../../MainLibs/src/Utils');
|
|
27
43
|
|
|
28
44
|
/**
|
|
29
45
|
* receive objectSchema
|
|
@@ -123,7 +139,8 @@ async function data(_izContext, objectSchemas, srcPath) {
|
|
|
123
139
|
resourceLocation: SOURCE_PATH.resourceLocationProcessLogical,
|
|
124
140
|
handlerType: HANDLER.hdrDsq,
|
|
125
141
|
additionalResourcePermission,
|
|
126
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.paginateProcessLogical) + upperCase(shortNameHandler(HANDLER.hdrDsq))
|
|
142
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.paginateProcessLogical) + upperCase(shortNameHandler(HANDLER.hdrDsq)),
|
|
143
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.ProcessFindDataRole
|
|
127
144
|
},
|
|
128
145
|
setting: {
|
|
129
146
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -6,20 +6,7 @@
|
|
|
6
6
|
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%- firstLetterUpperCase(handlerType) %>
|
|
8
8
|
batchSize: 10
|
|
9
|
-
|
|
10
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
11
|
-
- Effect: <%- resourcePermission.effect %>
|
|
12
|
-
Action:
|
|
13
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
14
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
15
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
16
|
-
<%_ }) _%>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
Resource:
|
|
19
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
20
|
-
- "<%- resource %>"
|
|
21
|
-
<%_ }) _%>
|
|
22
|
-
<%_}) _%>
|
|
9
|
+
role: <%- roleName %>Role
|
|
23
10
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
24
11
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
25
12
|
<%_ function firstLetterUpperCase(text){ return text.charAt(0).toUpperCase() + text.slice(1) } _%>
|
|
@@ -22,8 +22,25 @@ const path = require('path');
|
|
|
22
22
|
const templatePath = path.join(__dirname, "./template.ejs")
|
|
23
23
|
|
|
24
24
|
const { HANDLER, STORAGE_TYPES, ACTIONS } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
25
|
-
const {
|
|
26
|
-
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
DEFAULT_LAMBDA_ROLE_PER_ACTION,
|
|
30
|
+
SQS_RESOURCE,
|
|
31
|
+
SOURCE_PATH,
|
|
32
|
+
SAVE_FILE_NAME,
|
|
33
|
+
FUNCTION_NAME,
|
|
34
|
+
DYNAMO_RESOURCE,
|
|
35
|
+
defaultIamRolePerAction,
|
|
36
|
+
SNS_RESOURCE,
|
|
37
|
+
shortNameHandler,
|
|
38
|
+
SHORT_FUNCTION_NAME,
|
|
39
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
40
|
+
} = require("../../../libs/Consts");
|
|
41
|
+
const {
|
|
42
|
+
firstLetterUpperCase: upperCase
|
|
43
|
+
} = require('../../../../../MainLibs/src/Utils');
|
|
27
44
|
|
|
28
45
|
/**
|
|
29
46
|
* receive objectSchema
|
|
@@ -125,7 +142,8 @@ async function data(_izContext, objectSchemas, srcPath) {
|
|
|
125
142
|
resourceLocation: SOURCE_PATH.resourceLocationProcessLogical,
|
|
126
143
|
handlerType: HANDLER.hdrSqs,
|
|
127
144
|
additionalResourcePermission,
|
|
128
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.paginateProcessLogical) + upperCase(shortNameHandler(HANDLER.hdrSqs))
|
|
145
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.paginateProcessLogical) + upperCase(shortNameHandler(HANDLER.hdrSqs)),
|
|
146
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.ProcessFindDataRole
|
|
129
147
|
},
|
|
130
148
|
setting: {
|
|
131
149
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -6,20 +6,7 @@
|
|
|
6
6
|
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%- firstLetterUpperCase(handlerType) %>
|
|
8
8
|
batchSize: 10
|
|
9
|
-
|
|
10
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
11
|
-
- Effect: <%- resourcePermission.effect %>
|
|
12
|
-
Action:
|
|
13
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
14
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
15
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
16
|
-
<%_ }) _%>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
Resource:
|
|
19
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
20
|
-
- "<%- resource %>"
|
|
21
|
-
<%_ }) _%>
|
|
22
|
-
<%_}) _%>
|
|
9
|
+
role: <%- roleName %>Role
|
|
23
10
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
24
11
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
25
12
|
<%_ function firstLetterUpperCase(text){ return text.charAt(0).toUpperCase() + text.slice(1) } _%>
|
|
@@ -186,7 +186,7 @@ module.exports.paginateProcessLogical = async (
|
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
_izContext.logger.debug("continuePaginationMessage: ", continuePaginationMsg);
|
|
189
|
-
await sqs.sendMessage(_izContext, continuePaginationMsg)
|
|
189
|
+
await sqs.sendMessage(_izContext, continuePaginationMsg);
|
|
190
190
|
|
|
191
191
|
return "Continue PaginateProcessLogical"
|
|
192
192
|
|
|
@@ -22,7 +22,20 @@ const fs = require('fs');
|
|
|
22
22
|
const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
23
23
|
|
|
24
24
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/src/Utils")
|
|
25
|
-
const {
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
SOURCE_PATH,
|
|
30
|
+
SAVE_FILE_NAME,
|
|
31
|
+
FUNCTION_NAME,
|
|
32
|
+
SNS_RESOURCE,
|
|
33
|
+
defaultIamRolePerAction,
|
|
34
|
+
awaitingMultipleStepsRole,
|
|
35
|
+
shortNameHandler,
|
|
36
|
+
SHORT_FUNCTION_NAME,
|
|
37
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
38
|
+
} = require("../../../../../libs/Consts");
|
|
26
39
|
|
|
27
40
|
const templatePath = path.join(__dirname, "./template.ejs")
|
|
28
41
|
|
|
@@ -70,7 +83,8 @@ function createParamForCreateSource(srcPath) {
|
|
|
70
83
|
handlerType,
|
|
71
84
|
additionalResourcePermission,
|
|
72
85
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
73
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType))
|
|
86
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType)),
|
|
87
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
74
88
|
},
|
|
75
89
|
setting: {
|
|
76
90
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -9,20 +9,7 @@
|
|
|
9
9
|
cors: true
|
|
10
10
|
#<#Authorizer#>
|
|
11
11
|
#<#/Authorizer#>
|
|
12
|
-
|
|
13
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
14
|
-
- Effect: <%- resourcePermission.effect %>
|
|
15
|
-
Action:
|
|
16
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
17
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
18
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
19
|
-
<%_}) _%>
|
|
20
|
-
<%_ }) _%>
|
|
21
|
-
Resource:
|
|
22
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
23
|
-
- <%- resource %>
|
|
24
|
-
<%_ }) _%>
|
|
25
|
-
<%_}) _%>
|
|
12
|
+
role: <%- roleName %>Role
|
|
26
13
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
27
14
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
28
15
|
<%_ function firstLetterUpperCase(text){
|
|
@@ -22,7 +22,21 @@ const fs = require('fs');
|
|
|
22
22
|
const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
23
23
|
|
|
24
24
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/src/Utils")
|
|
25
|
-
const {
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
SQS_RESOURCE,
|
|
30
|
+
SOURCE_PATH,
|
|
31
|
+
SAVE_FILE_NAME,
|
|
32
|
+
FUNCTION_NAME,
|
|
33
|
+
SNS_RESOURCE,
|
|
34
|
+
defaultIamRolePerAction,
|
|
35
|
+
awaitingMultipleStepsRole,
|
|
36
|
+
shortNameHandler,
|
|
37
|
+
SHORT_FUNCTION_NAME,
|
|
38
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
39
|
+
} = require("../../../../../libs/Consts");
|
|
26
40
|
|
|
27
41
|
const templatePath = path.join(__dirname, './template.ejs')
|
|
28
42
|
|
|
@@ -83,7 +97,8 @@ function createParamForCreateSource(srcPath) {
|
|
|
83
97
|
handlerType,
|
|
84
98
|
additionalResourcePermission,
|
|
85
99
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
86
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType))
|
|
100
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType)),
|
|
101
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
87
102
|
},
|
|
88
103
|
setting: {
|
|
89
104
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -6,20 +6,7 @@
|
|
|
6
6
|
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
8
8
|
batchSize: 10
|
|
9
|
-
|
|
10
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
11
|
-
- Effect: <%- resourcePermission.effect %>
|
|
12
|
-
Action:
|
|
13
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
14
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
15
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
16
|
-
<%_}) _%>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
Resource:
|
|
19
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
20
|
-
- "<%- resource %>"
|
|
21
|
-
<%_ }) _%>
|
|
22
|
-
<%_}) _%>
|
|
9
|
+
role: <%- roleName %>Role
|
|
23
10
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
24
11
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
25
12
|
<%_ function firstLetterUpperCase(text){
|
|
@@ -22,7 +22,20 @@ const fs = require('fs');
|
|
|
22
22
|
const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
23
23
|
|
|
24
24
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/src/Utils")
|
|
25
|
-
const {
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
SOURCE_PATH,
|
|
30
|
+
SAVE_FILE_NAME,
|
|
31
|
+
FUNCTION_NAME,
|
|
32
|
+
SNS_RESOURCE,
|
|
33
|
+
defaultIamRolePerAction,
|
|
34
|
+
awaitingMultipleStepsRole,
|
|
35
|
+
shortNameHandler,
|
|
36
|
+
SHORT_FUNCTION_NAME,
|
|
37
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
38
|
+
} = require("../../../../../libs/Consts");
|
|
26
39
|
|
|
27
40
|
const templatePath = path.join(__dirname, './template.ejs')
|
|
28
41
|
|
|
@@ -68,7 +81,8 @@ function createParamForCreateSource(srcPath) {
|
|
|
68
81
|
handlerType,
|
|
69
82
|
additionalResourcePermission,
|
|
70
83
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
71
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType))
|
|
84
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType)),
|
|
85
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
72
86
|
},
|
|
73
87
|
setting: {
|
|
74
88
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
<%- firstLetterUpperCase(functionNameConfig) %>:
|
|
3
3
|
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
4
|
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
|
-
|
|
6
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
7
|
-
- Effect: <%- resourcePermission.effect %>
|
|
8
|
-
Action:
|
|
9
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
10
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
11
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
12
|
-
<%_}) _%>
|
|
13
|
-
<%_ }) _%>
|
|
14
|
-
Resource:
|
|
15
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
16
|
-
- <%- resource %>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
<%_}) _%>
|
|
5
|
+
role: <%- roleName %>Role
|
|
19
6
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
20
7
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
21
8
|
<%_ function firstLetterUpperCase(text){
|
|
@@ -22,7 +22,21 @@ const fs = require('fs');
|
|
|
22
22
|
const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
|
|
23
23
|
|
|
24
24
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../../MainLibs/src/Utils")
|
|
25
|
-
const {
|
|
25
|
+
const {
|
|
26
|
+
createIamRole,
|
|
27
|
+
resourceNames,
|
|
28
|
+
RESOURCE_CLASSES,
|
|
29
|
+
SQS_RESOURCE,
|
|
30
|
+
SOURCE_PATH,
|
|
31
|
+
SAVE_FILE_NAME,
|
|
32
|
+
FUNCTION_NAME,
|
|
33
|
+
SNS_RESOURCE,
|
|
34
|
+
defaultIamRolePerAction,
|
|
35
|
+
awaitingMultipleStepsRole,
|
|
36
|
+
shortNameHandler,
|
|
37
|
+
SHORT_FUNCTION_NAME,
|
|
38
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
39
|
+
} = require("../../../../../libs/Consts");
|
|
26
40
|
|
|
27
41
|
const templatePath = path.join(__dirname, './template.ejs')
|
|
28
42
|
|
|
@@ -63,7 +77,7 @@ function createParamForCreateSource(srcPath) {
|
|
|
63
77
|
SQS_RESOURCE.getQueueUrl,
|
|
64
78
|
SQS_RESOURCE.deleteMessageBatch
|
|
65
79
|
], [RESOURCE_CLASSES.sns]:
|
|
66
|
-
[SNS_RESOURCE.publish, SNS_RESOURCE.
|
|
80
|
+
[SNS_RESOURCE.publish, SNS_RESOURCE.subscribe]
|
|
67
81
|
},
|
|
68
82
|
[
|
|
69
83
|
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(HANDLER.hdrSqs)),
|
|
@@ -82,7 +96,8 @@ function createParamForCreateSource(srcPath) {
|
|
|
82
96
|
handlerType,
|
|
83
97
|
additionalResourcePermission,
|
|
84
98
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
85
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType))
|
|
99
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.createRel) + upperCase(shortNameHandler(handlerType)),
|
|
100
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
86
101
|
},
|
|
87
102
|
setting: {
|
|
88
103
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -6,20 +6,7 @@
|
|
|
6
6
|
- sqs:
|
|
7
7
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
8
8
|
batchSize: 10
|
|
9
|
-
|
|
10
|
-
<%_ additionalResourcePermission.forEach(resourcePermission => { _%>
|
|
11
|
-
- Effect: <%- resourcePermission.effect %>
|
|
12
|
-
Action:
|
|
13
|
-
<%_ Object.keys(resourcePermission.action).forEach(resourcePerAction => { _%>
|
|
14
|
-
<%_ resourcePermission.action[resourcePerAction].forEach(permission => { _%>
|
|
15
|
-
- <%- resourcePerAction %>:<%- permission %>
|
|
16
|
-
<%_}) _%>
|
|
17
|
-
<%_ }) _%>
|
|
18
|
-
Resource:
|
|
19
|
-
<%_ resourcePermission.resource.forEach(resource => { _%>
|
|
20
|
-
- <%- resource %>
|
|
21
|
-
<%_ }) _%>
|
|
22
|
-
<%_}) _%>
|
|
9
|
+
role: <%- roleName %>Role
|
|
23
10
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
24
11
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
25
12
|
<%_ function firstLetterUpperCase(text){
|