@izara_project/izara-market-library-service-schemas 1.0.36 → 1.0.37
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 +8 -7
- package/src/GenerateCodeLibs/src/Consts.js +2 -2
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +1 -1
- package/src/MainLibs/src/GenerateCodeUtils.js +1 -1
- package/src/TemplateManager/src/flowSchema/DefaultWebSocketResource/webSocketConnect/handler/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/FlowSchemaEndpoint/InProcessFlowSchema/handler/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/handler/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/mainFunction/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/getsignUrlsAcc/mainFunction/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/createPresignUrl/reservedLimitComplete/mainFunction/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/processFileS3AfterUpload/mainFunction/template.ejs +1 -1
- package/src/TemplateManager/src/flowSchema/UploadS3Case/relate/libs/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +1 -1
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +7 -7
- package/src/reStructure/TemplateData/externalService/lambdaRole/template.ejs +1 -1
- package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +4 -2
- package/src/reStructure/TemplateData/findData/GetByStorage/getByGraph.ejs +4 -3
- package/src/reStructure/TemplateData/findData/handler/template.ejs +2 -1
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +4 -10
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js +3 -2
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +3 -12
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +18 -2
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +9 -6
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/functionYaml/data.js +0 -27
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/data.js +3 -3
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/template.ejs +71 -18
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/dynamoDB/register.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/storedCacheTemplate.ejs +5 -5
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/subscriptionOutAll/data.js +29 -19
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/functionYaml/data.js +28 -50
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/mainFunction/template.ejs +10 -22
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +5 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/template.ejs +72 -43
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/template.ejs +85 -40
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +8 -3
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +5 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/data.js +7 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +4 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/data.js +3 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/handler/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/mainFunction/template.ejs +3 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +4 -3
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +13 -4
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +11 -9
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +2 -5
- package/src/reStructure/TemplateData/generateRole/sharedResourceTemplate.ejs +0 -29
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +1 -1
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +3 -2
- package/src/reStructure/TemplateData/perActionEndpoint/libs/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +1 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/testTemplate/data.js +0 -27
- package/src/reStructure/TemplateData/testTemplate/template.ejs +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@izara_project/izara-market-library-service-schemas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "Schemas for Izara Market project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,18 +21,19 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@izara_project/izara-core-library-calling-flow": "^1.0.3",
|
|
24
|
-
"@izara_project/izara-core-library-core": "^1.0.
|
|
25
|
-
"@izara_project/izara-core-library-external-request": "^1.0.
|
|
24
|
+
"@izara_project/izara-core-library-core": "^1.0.19",
|
|
25
|
+
"@izara_project/izara-core-library-external-request": "^1.0.20",
|
|
26
26
|
"@izara_project/izara-core-library-logger": "^1.0.7",
|
|
27
|
-
"@izara_project/izara-core-library-service-schemas": "^1.0.
|
|
28
|
-
"@izara_project/izara-core-library-sns": "^1.0.
|
|
27
|
+
"@izara_project/izara-core-library-service-schemas": "^1.0.62",
|
|
28
|
+
"@izara_project/izara-core-library-sns": "^1.0.6",
|
|
29
29
|
"@izara_project/izara-core-library-sqs": "^1.0.4",
|
|
30
30
|
"@izara_project/izara-shared": "^1.0.126",
|
|
31
|
-
"@izara_project/izara-shared-service-schemas": "^1.0.
|
|
31
|
+
"@izara_project/izara-shared-service-schemas": "^1.0.13",
|
|
32
|
+
"@izara_project/izara-shared-core": "^1.0.2",
|
|
32
33
|
"ejs": "^3.1.10",
|
|
33
34
|
"js-beautify": "^1.15.4",
|
|
34
35
|
"lodash": "^4.17.21",
|
|
35
36
|
"object-hash": "^3.0.0",
|
|
36
|
-
"yaml": "^2.
|
|
37
|
+
"yaml": "^2.8.0"
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -102,8 +102,8 @@ const RBAC_TYPE = {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const TOPIC_NAME_EXTERNAL_SERVICE = {
|
|
105
|
-
staticLimitProcessComplete: "
|
|
106
|
-
reservedDynamicUsageComplete: "
|
|
105
|
+
staticLimitProcessComplete: "StaticLimitProcessComplete_Out",
|
|
106
|
+
reservedDynamicUsageComplete: "ReservedDynamicUsageComplete_Out"
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
const EXTERNAL_SERVICE_NAME = {
|
|
@@ -18,7 +18,7 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
|
|
20
20
|
const lodash = require('lodash');
|
|
21
|
-
const hash = require(
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
22
|
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
23
23
|
const sqsSharedLib = require('@izara_project/izara-core-library-sqs');
|
|
24
24
|
const inMemoryCacheLib = require('@izara_project/izara-core-library-core').inMemoryCacheLib;
|
|
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17
17
|
|
|
18
18
|
'use strict';
|
|
19
19
|
|
|
20
|
-
const hash = require('
|
|
20
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
function checkValidTableYaml(_izContext, currentTableSetting, existsTableSetting) {
|
|
@@ -21,7 +21,7 @@ const izaraShared = require('@izara_project/izara-shared');
|
|
|
21
21
|
const dynamodbSharedLib = izaraShared.dynamodbSharedLib;
|
|
22
22
|
const izara = require("@izara_project/izara-middleware");
|
|
23
23
|
const middleware = izara.middlewareHandler;
|
|
24
|
-
const hash = require('
|
|
24
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
25
25
|
module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
26
26
|
|
|
27
27
|
event._izContext.logger.debug('Event:', event);
|
|
@@ -24,7 +24,7 @@ const middleware = izara.middlewareHandler;
|
|
|
24
24
|
const izaraShared = require('@izara_project/izara-shared')
|
|
25
25
|
const dynamodbSharedLib = izaraShared.dynamodbSharedLib
|
|
26
26
|
const callingFlowSharedLib = izaraShared.callingFlowSharedLib;
|
|
27
|
-
const hash = require('
|
|
27
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
28
28
|
// const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
29
29
|
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
30
30
|
const { postToConnection } = require("../../libs/source/ImportDataLib");
|
|
@@ -24,7 +24,7 @@ const middleware = izara.middlewareHandler;
|
|
|
24
24
|
const izaraShared = require('@izara_project/izara-shared')
|
|
25
25
|
const dynamodbSharedLib = izaraShared.dynamodbSharedLib
|
|
26
26
|
const callingFlowSharedLib = izaraShared.callingFlowSharedLib;
|
|
27
|
-
const hash = require('
|
|
27
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
28
28
|
// const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
29
29
|
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
30
30
|
const { postToConnection } = require("../../libs/source/ImportDataLib");
|
package/src/TemplateManager/src/flowSchema/UploadS3Case/createObject/mainFunction/template.ejs
CHANGED
|
@@ -18,7 +18,7 @@ along with this program. If not, see
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
-
const hash = require(
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
22
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
23
23
|
|
|
24
24
|
const izaraShared = require('@izara_project/izara-shared');
|
|
@@ -27,7 +27,7 @@ const sns = externalRequest.sns;
|
|
|
27
27
|
const lambda = externalRequest.lambda
|
|
28
28
|
const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
29
29
|
const coreConsts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
30
|
-
const hash = require('
|
|
30
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
31
31
|
const importDataLibs = require('../../libs/source/ImportDataLib')
|
|
32
32
|
/**
|
|
33
33
|
* description of function.
|
|
@@ -34,7 +34,7 @@ const { createPresignedPost } = require('@aws-sdk/s3-presigned-post');
|
|
|
34
34
|
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
35
35
|
|
|
36
36
|
const { postToConnection } = require("../../libs/source/ImportDataLib");
|
|
37
|
-
const hash = require('
|
|
37
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
38
38
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils');
|
|
39
39
|
const coreConsts = require('@izara_project/izara-core-library-core/src/Consts');
|
|
40
40
|
const { getNestObject } = require("../../libs/source/ImportDataLib");
|
|
@@ -32,7 +32,7 @@ const utils = require('@izara_project/izara-market-library-service-schemas/src/M
|
|
|
32
32
|
const { S3Client, GetObjectCommand, DeleteObjectCommand, PutObjectCommand, CopyObjectCommand } = require('@aws-sdk/client-s3');
|
|
33
33
|
const s3 = new S3Client({ region: 'us-east-2' });
|
|
34
34
|
|
|
35
|
-
const hash = require('
|
|
35
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
36
36
|
const Readable = require('stream');
|
|
37
37
|
const { isValidCsv, getNestObject } = require('../../libs/source/ImportDataLib')
|
|
38
38
|
const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
@@ -22,7 +22,7 @@ const lambda = externalRequest.lambda;
|
|
|
22
22
|
|
|
23
23
|
const { ApiGatewayManagementApiClient, PostToConnectionCommand } = require("@aws-sdk/client-apigatewaymanagementapi");
|
|
24
24
|
const { inMemoryCacheLib } = require('@izara_project/izara-shared');
|
|
25
|
-
const hash = require(
|
|
25
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
26
26
|
const csv = require('csv-parser');
|
|
27
27
|
const streamifier = require('streamifier');
|
|
28
28
|
const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError;
|
package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs
CHANGED
|
@@ -31,7 +31,7 @@ const serviceConfigLib = require('@izara_project/izara-core-library-service-sche
|
|
|
31
31
|
|
|
32
32
|
const uploadUseCase = require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
|
|
33
33
|
|
|
34
|
-
const hash = require(
|
|
34
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
35
35
|
const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
|
|
36
36
|
const path = require('path')
|
|
37
37
|
const schemasPath = path.join(__dirname, '../schemas');
|
|
@@ -31,7 +31,7 @@ const serviceConfigLib = require('@izara_project/izara-core-library-service-sche
|
|
|
31
31
|
|
|
32
32
|
const uploadUseCase = require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
|
|
33
33
|
|
|
34
|
-
const hash = require(
|
|
34
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
35
35
|
const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
|
|
36
36
|
const path = require('path')
|
|
37
37
|
const schemasPath = path.join(__dirname, '../schemas');
|
|
@@ -28,7 +28,7 @@ const serviceConfigLib = require('@izara_project/izara-core-library-service-sche
|
|
|
28
28
|
|
|
29
29
|
const uploadUseCase = require('@izara_project/izara-core-library-service-schemas/src/libs/UploadUseCase')
|
|
30
30
|
|
|
31
|
-
const hash = require(
|
|
31
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
32
32
|
const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
|
|
33
33
|
const path = require('path')
|
|
34
34
|
const schemasPath = path.join(__dirname, '../schemas');
|
|
@@ -18,7 +18,7 @@ along with this program. If not, see
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
-
const hash = require(
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
22
|
const {
|
|
23
23
|
getObjSchemaS3WithHierarchy,
|
|
24
24
|
} = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
@@ -222,7 +222,7 @@ function externalLambdaIamRoleUploadS3(_izContext) {
|
|
|
222
222
|
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
|
|
223
223
|
},
|
|
224
224
|
[
|
|
225
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
225
|
+
externalResourceName(RESOURCE_CLASSES.sns, "ReservedDynamicUsage_In", EXTERNAL_SERVICE_NAME.accountLimits)
|
|
226
226
|
]
|
|
227
227
|
),
|
|
228
228
|
createIamRole(
|
|
@@ -241,7 +241,7 @@ function externalLambdaIamRoleUploadS3(_izContext) {
|
|
|
241
241
|
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
|
|
242
242
|
},
|
|
243
243
|
[
|
|
244
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
244
|
+
externalResourceName(RESOURCE_CLASSES.sns, "CancelUsage_In", EXTERNAL_SERVICE_NAME.accountLimits)
|
|
245
245
|
]
|
|
246
246
|
)
|
|
247
247
|
)
|
|
@@ -252,8 +252,8 @@ function externalLambdaIamRoleUploadS3(_izContext) {
|
|
|
252
252
|
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
|
|
253
253
|
},
|
|
254
254
|
[
|
|
255
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
256
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
255
|
+
externalResourceName(RESOURCE_CLASSES.sns, "ReservedDynamicUsageComplet_Out", EXTERNAL_SERVICE_NAME.accountLimits),
|
|
256
|
+
externalResourceName(RESOURCE_CLASSES.sns, "ConfirmUsage_In", EXTERNAL_SERVICE_NAME.accountLimits)
|
|
257
257
|
]
|
|
258
258
|
),
|
|
259
259
|
)
|
|
@@ -264,9 +264,9 @@ function externalLambdaIamRoleUploadS3(_izContext) {
|
|
|
264
264
|
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish]
|
|
265
265
|
},
|
|
266
266
|
[
|
|
267
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
268
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
269
|
-
externalResourceName(RESOURCE_CLASSES.sns, "
|
|
267
|
+
externalResourceName(RESOURCE_CLASSES.sns, "CancelUsage_In", EXTERNAL_SERVICE_NAME.accountLimits),
|
|
268
|
+
externalResourceName(RESOURCE_CLASSES.sns, "ConfirmUsage_In", EXTERNAL_SERVICE_NAME.accountLimits),
|
|
269
|
+
externalResourceName(RESOURCE_CLASSES.sns, "ReservedDynamicUsage_In", EXTERNAL_SERVICE_NAME.accountLimits),
|
|
270
270
|
]
|
|
271
271
|
)
|
|
272
272
|
)
|
|
@@ -47,7 +47,7 @@ module.exports.generatedLambdaRole = async () => {
|
|
|
47
47
|
]
|
|
48
48
|
<%_ }) _%>
|
|
49
49
|
<%_ }) _%>
|
|
50
|
-
}
|
|
50
|
+
},
|
|
51
51
|
<%_ }) _%>
|
|
52
52
|
//(<create<%- data.objectType%>Role>)
|
|
53
53
|
//(</create<%- data.objectType%>Role>)
|
|
@@ -79,8 +79,10 @@ const createExternalSnsSubscriptions = async (_izContext, allObjSchemas, allRelS
|
|
|
79
79
|
const snsServiceConfigForExtTopic = await snsSubscriptionFlowSchemaExternalTopic(_izContext, localFlowSchema);
|
|
80
80
|
snsServiceConfigForExtTopic && snsServiceConfigArray.push(snsServiceConfigForExtTopic);
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
if (!localFlowSchema.statusType === "none") {
|
|
83
|
+
const snsServiceConfigForCreateRecordByStatusType = await createFlowSchemaRegisterSnsTopicSubscriptions(_izContext, localFlowSchema);
|
|
84
|
+
snsServiceConfigForCreateRecordByStatusType && snsServiceConfigArray.push(snsServiceConfigForCreateRecordByStatusType);
|
|
85
|
+
}
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -11,13 +11,14 @@ let getDataByGraph = await graphSharedLib.getNodeV2(
|
|
|
11
11
|
graphHandlerServiceTag,
|
|
12
12
|
objType,
|
|
13
13
|
{
|
|
14
|
-
|
|
15
|
-
...fieldName
|
|
14
|
+
identifiers:identifiers
|
|
16
15
|
},
|
|
17
|
-
|
|
16
|
+
<%- JSON.stringify(versionedDataLabel) %>
|
|
18
17
|
);
|
|
18
|
+
|
|
19
19
|
_izContext.logger.debug("getDataByGraph: ", getDataByGraph)
|
|
20
20
|
|
|
21
|
+
|
|
21
22
|
if (!getDataByGraph) {
|
|
22
23
|
errorsFound.push(`can't get data of ${objType.objectType} in graph`)
|
|
23
24
|
standardErrorParams.push(errorsFound)
|
|
@@ -40,16 +40,10 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
40
40
|
let functionName = upperCase(FUNCTION_NAME.createRecordComplete)
|
|
41
41
|
let flowSteps = Object.keys(flowSchema.flowSteps)
|
|
42
42
|
let splitFlowSteps = flowSteps[0].split("_")
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
topicArn = flowSteps[0]
|
|
48
|
-
} else if (event.includes(FLOW_SCHEMA_EVENT_TYPE.extTopic)) {
|
|
49
|
-
topicArn = splitFlowSteps[3] + "_" + splitFlowSteps[4]
|
|
50
|
-
serviceTag = splitFlowSteps[0]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
43
|
+
|
|
44
|
+
let topicArn = splitFlowSteps[2] + "_" + splitFlowSteps[3]
|
|
45
|
+
let serviceTag = splitFlowSteps[0]
|
|
46
|
+
// serviceTag_stage_TopicName_In/Out
|
|
53
47
|
return {
|
|
54
48
|
templatePath: templatePath,
|
|
55
49
|
templateData: {
|
package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs
CHANGED
|
@@ -18,7 +18,7 @@ along with this program. If not, see
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
-
const hash = require(
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
22
|
const { getObjectSchema } = require('@izara_project/izara-core-library-service-schemas');
|
|
23
23
|
|
|
24
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
@@ -21,7 +21,7 @@ const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb')
|
|
|
21
21
|
const snsSharedLib = require('@izara_project/izara-core-library-sns')
|
|
22
22
|
const sns = require('@izara_project/izara-core-library-external-request').sns
|
|
23
23
|
const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
24
|
-
const { getNestObject } = require('
|
|
24
|
+
const { getNestObject } = require('../../../../libs/source/GenerateCodeLibs');
|
|
25
25
|
/**
|
|
26
26
|
* description of function.
|
|
27
27
|
* @param {Object} _izContext
|
package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/data.js
CHANGED
|
@@ -38,12 +38,13 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
38
38
|
function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
39
39
|
let functionName = upperCase(FUNCTION_NAME.createObjectS3)
|
|
40
40
|
let handlerType = "HdrWbs"
|
|
41
|
-
|
|
41
|
+
let route = flowSchema.flowTag
|
|
42
42
|
return {
|
|
43
43
|
templatePath: templatePath,
|
|
44
44
|
templateData: {
|
|
45
45
|
functionName,
|
|
46
|
-
handlerType
|
|
46
|
+
handlerType,
|
|
47
|
+
route
|
|
47
48
|
},
|
|
48
49
|
setting: {
|
|
49
50
|
savePath: path.join(srcPath, SOURCE_PATH.webSocket, flowSchema.flowTag, "source/"),
|
package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs
CHANGED
|
@@ -23,10 +23,10 @@ const middleware = izara.middlewareHandler;
|
|
|
23
23
|
// const api = new AWS.ApiGatewayManagementApi({ endpoint: process.env.iz_webSocketEndpoint });
|
|
24
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb')
|
|
25
25
|
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow')
|
|
26
|
-
const hash = require('
|
|
26
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
27
27
|
// const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
28
28
|
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
29
|
-
const { postToConnection } = require('
|
|
29
|
+
const { postToConnection } = require('../../../../libs/source/GenerateCodeLibs');
|
|
30
30
|
const createObject = require('./CreateObjectS3_Main');
|
|
31
31
|
module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
32
32
|
|
|
@@ -40,16 +40,7 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
|
40
40
|
let correlationId = event._izContext.correlationIds.get(consts.X_CORRELATION_ID)
|
|
41
41
|
|
|
42
42
|
switch (route) {
|
|
43
|
-
case
|
|
44
|
-
console.log("webSocket Connect");
|
|
45
|
-
break
|
|
46
|
-
case "$disconnect":
|
|
47
|
-
console.log("webSocket Disconnect");
|
|
48
|
-
break
|
|
49
|
-
case '$default':
|
|
50
|
-
console.log('Received unknown route:', route);
|
|
51
|
-
break
|
|
52
|
-
case 'uploadS3':
|
|
43
|
+
case '<%- route %>':
|
|
53
44
|
console.log("event in route webSocket", event);
|
|
54
45
|
let eventParams = JSON.parse(event.body)
|
|
55
46
|
|
|
@@ -18,7 +18,7 @@ along with this program. If not, see
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
-
const hash = require(
|
|
21
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
22
22
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
23
23
|
|
|
24
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
@@ -120,7 +120,7 @@ module.exports.createObject = async (
|
|
|
120
120
|
// send message to ImportBatchCreateHdrSqs
|
|
121
121
|
let sendMessageToCreateEndpoint = {
|
|
122
122
|
Message: JSON.stringify(messageObject),
|
|
123
|
-
TopicArn: await snsSharedLib.
|
|
123
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, Create_In)
|
|
124
124
|
}
|
|
125
125
|
_izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
|
|
126
126
|
await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
|
|
@@ -21,10 +21,26 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
|
21
21
|
const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
|
|
22
22
|
let coreConsts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
23
23
|
|
|
24
|
-
const { postToConnection } = require('
|
|
24
|
+
const { postToConnection } = require('../../../../libs/source/GenerateCodeLibs')
|
|
25
25
|
module.exports.webSocketTaskComplete = async (
|
|
26
26
|
_izContext,
|
|
27
|
-
objType,
|
|
27
|
+
objType,{
|
|
28
|
+
flowTag: "TranslateIds2",
|
|
29
|
+
handleObj: "one", // "one" | "multi",
|
|
30
|
+
statusType: "statusField", // "statusField" | "storedCache" | "none",
|
|
31
|
+
event: ["s3"], // "ownTopic" | "extTopic" | "s3" | "eventBridge"
|
|
32
|
+
outputTopic: true,
|
|
33
|
+
objType: {
|
|
34
|
+
objectType: "TranslateIds",
|
|
35
|
+
serviceTag: "TranslateIds"
|
|
36
|
+
},
|
|
37
|
+
// storedCacheTable: {
|
|
38
|
+
// tableName: "",
|
|
39
|
+
// partitionKey: "",
|
|
40
|
+
// sortKey: ""
|
|
41
|
+
// },
|
|
42
|
+
// flowSteps: {}
|
|
43
|
+
},
|
|
28
44
|
updateItem
|
|
29
45
|
) => {
|
|
30
46
|
try {
|
|
@@ -33,7 +33,7 @@ const { createPresignedPost } = require('@aws-sdk/s3-presigned-post');
|
|
|
33
33
|
const consts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
34
34
|
|
|
35
35
|
const { postToConnection,getNestObject } = require('../../../../libs/source/GenerateCodeLibs')
|
|
36
|
-
const hash = require('
|
|
36
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
37
37
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils');
|
|
38
38
|
const coreConsts = require('@izara_project/izara-core-library-core/src/Consts');
|
|
39
39
|
const { EXTERNAL_SERVICE_NAME } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts');
|
|
@@ -77,11 +77,12 @@ module.exports.createPresignUrl = async (
|
|
|
77
77
|
|
|
78
78
|
// getImportBatchMain from table
|
|
79
79
|
let importBatchMain = await lambda.invokeSync(_izContext,
|
|
80
|
-
await lambdaSharedLib.lambdaFunctionName(_izContext, "
|
|
80
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, "GetHdrInv"),
|
|
81
81
|
{
|
|
82
82
|
identifiers: {
|
|
83
83
|
importBatchId: servicePendingId
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
|
+
objectType: objType.objectType
|
|
85
86
|
}
|
|
86
87
|
)
|
|
87
88
|
_izContext.logger.debug("importBatchMain", importBatchMain);
|
|
@@ -134,12 +135,13 @@ module.exports.createPresignUrl = async (
|
|
|
134
135
|
importBatchStatus: "error",
|
|
135
136
|
errorsFound: errorsFound
|
|
136
137
|
}
|
|
137
|
-
}
|
|
138
|
+
},
|
|
139
|
+
objType: objType.objectType
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
let sendMessageToUpdateImportBatch = {
|
|
141
143
|
Message: JSON.stringify(updateImportBatchMainMsg),
|
|
142
|
-
TopicArn: await snsSharedLib.snsTopicArn(_izContext, `
|
|
144
|
+
TopicArn: await snsSharedLib.snsTopicArn(_izContext, `Update_In`)
|
|
143
145
|
}
|
|
144
146
|
_izContext.logger.debug("sendMessageToUpdateImportBatch", sendMessageToUpdateImportBatch);
|
|
145
147
|
|
|
@@ -212,7 +214,8 @@ module.exports.createPresignUrl = async (
|
|
|
212
214
|
importBatchStatus: "waitingToUpload",
|
|
213
215
|
expiryTimestamp: (startTime + (createPresignUrlParam.expires * 1000))
|
|
214
216
|
}
|
|
215
|
-
}
|
|
217
|
+
},
|
|
218
|
+
objectType: objType,objectType
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
updateImportBatchMainMsg = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
@@ -26,8 +26,8 @@ const sns = externalRequest.sns;
|
|
|
26
26
|
const lambda = externalRequest.lambda
|
|
27
27
|
const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
28
28
|
const coreConsts = require('@izara_project/izara-middleware/src/MiddlewareCore/Consts')
|
|
29
|
-
const hash = require('
|
|
30
|
-
const importDataLibs = require('
|
|
29
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
30
|
+
const importDataLibs = require('../../../../libs/source/GenerateCodeLibs');
|
|
31
31
|
/**
|
|
32
32
|
* description of function.
|
|
33
33
|
* @param {Object} _izContext
|
|
@@ -49,7 +49,7 @@ function data(_izContext, srcPath) {
|
|
|
49
49
|
WebSocketSqsQueueNames.push(
|
|
50
50
|
{
|
|
51
51
|
queueName: upperCase(FUNCTION_NAME.reservedLimit),
|
|
52
|
-
|
|
52
|
+
queueNameSubscription: "Out" + upperCase(FUNCTION_NAME.createObjectComplete)
|
|
53
53
|
}
|
|
54
54
|
)
|
|
55
55
|
|
|
@@ -31,9 +31,9 @@ const utils = require('@izara_project/izara-market-library-service-schemas/src/M
|
|
|
31
31
|
const { S3Client, GetObjectCommand, DeleteObjectCommand, PutObjectCommand, CopyObjectCommand } = require('@aws-sdk/client-s3');
|
|
32
32
|
const s3 = new S3Client({ region: 'us-east-2' });
|
|
33
33
|
|
|
34
|
-
const hash = require('
|
|
34
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
35
35
|
const Readable = require('stream');
|
|
36
|
-
const { isValidCsv, getNestObject } = require('
|
|
36
|
+
const { isValidCsv, getNestObject } = require('../../../../libs/source/GenerateCodeLibs');
|
|
37
37
|
const consts = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
38
38
|
const coreConsts = require('@izara_project/izara-core-library-core/src/Consts');
|
|
39
39
|
|
|
@@ -21,7 +21,7 @@ const externalRequest = require('@izara_project/izara-core-library-external-requ
|
|
|
21
21
|
const lambda = externalRequest.lambda;
|
|
22
22
|
|
|
23
23
|
const { ApiGatewayManagementApiClient, PostToConnectionCommand } = require("@aws-sdk/client-apigatewaymanagementapi");
|
|
24
|
-
const hash = require(
|
|
24
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
25
25
|
<% if (uploadS3) { %>
|
|
26
26
|
const csv = require('csv-parser');
|
|
27
27
|
const streamifier = require('streamifier');
|
package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs
CHANGED
|
@@ -21,7 +21,7 @@ const izaraShared = require('@izara_project/izara-shared');
|
|
|
21
21
|
const dynamodbSharedLib = izaraShared.dynamodbSharedLib;
|
|
22
22
|
const izara = require("@izara_project/izara-middleware");
|
|
23
23
|
const middleware = izara.middlewareHandler;
|
|
24
|
-
const hash = require('
|
|
24
|
+
const hash = require('@izara_project/izara-shared-core').objectHash;
|
|
25
25
|
module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
26
26
|
|
|
27
27
|
event._izContext.logger.debug('Event:', event);
|
|
@@ -91,33 +91,6 @@ function data(_izContext, srcPath) {
|
|
|
91
91
|
)
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
-
// if (flowSchema?.hook) {
|
|
95
|
-
// for (const [hookName, hookProperties] of Object.entries(flowSchema.hook)) {
|
|
96
|
-
// if (hookName === FLOW_SCHEMA_HOOK_STATE.beforeCreate) {
|
|
97
|
-
// for (const hookFunction of hookProperties.functionList) {
|
|
98
|
-
// if ((hookFunction.event.hasOwnProperty("initialEvent") && (hookFunction.event.initialEvent === true))) {
|
|
99
|
-
// if (hookFunction?.permission) {
|
|
100
|
-
// for (const permission of hookFunction.permission) {
|
|
101
|
-
// additionalResourcePermission.push(
|
|
102
|
-
// createIamRole(
|
|
103
|
-
// permission.action,
|
|
104
|
-
// permission.resource.map(resource =>
|
|
105
|
-
// externalResourceYaml(
|
|
106
|
-
// resource.resource,
|
|
107
|
-
// resource.resourceName,
|
|
108
|
-
// resource.serviceTag),
|
|
109
|
-
// permission.effect
|
|
110
|
-
// )
|
|
111
|
-
// )
|
|
112
|
-
// )
|
|
113
|
-
// }
|
|
114
|
-
// }
|
|
115
|
-
// }
|
|
116
|
-
// }
|
|
117
|
-
// }
|
|
118
|
-
// }
|
|
119
|
-
// }
|
|
120
|
-
|
|
121
94
|
// console.log("additionalResourcePermission in createObjectS3", JSON.stringify(additionalResourcePermission))
|
|
122
95
|
return [{
|
|
123
96
|
templatePath: templatePath,
|
|
@@ -33,11 +33,11 @@ const getObjectSchema = require('@izara_project/izara-core-library-service-schem
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
function data(_izContext,
|
|
37
|
-
return [createParamsForCreateSource(_izContext,
|
|
36
|
+
async function data(_izContext, allFlowSchemas, srcPath) {
|
|
37
|
+
return [await createParamsForCreateSource(_izContext, allFlowSchemas, srcPath)]
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function createParamsForCreateSource(_izContext, srcPath) {
|
|
40
|
+
async function createParamsForCreateSource(_izContext, allFlowSchemas, srcPath) {
|
|
41
41
|
const functionName = FUNCTION_NAME.flowSchemaRegister + 'Complete'
|
|
42
42
|
return {
|
|
43
43
|
templatePath: templatePath,
|