@izara_project/izara-market-library-service-schemas 1.0.67 → 1.0.69
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/GenerateCodeLibs/src/GenerateCodeLibs.js +2 -0
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +23 -11
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +8 -0
- package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +12 -1
- package/src/reStructure/TemplateData/findData/findDataYaml/data.js +2 -2
- package/src/reStructure/TemplateData/processLogical/yaml/data.js +2 -2
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/data.js +2 -2
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +4 -4
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +4 -4
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +26 -44
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +26 -44
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +26 -44
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +26 -44
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +1 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +2 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +36 -55
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +36 -54
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +36 -54
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +36 -54
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +1 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +2 -1
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +28 -47
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +28 -47
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +28 -47
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +28 -47
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +1 -4
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +2 -23
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +15 -30
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +15 -30
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +15 -30
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +15 -30
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +1 -4
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +2 -9
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +39 -56
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +39 -56
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +39 -56
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +39 -56
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +1 -4
- package/src/reStructure/TemplateData/resourceYaml/filterGenerateResource/data.js +1 -1
- package/src/reStructure/TemplateData/resourceYaml/generateTemplateData.js +1 -1
|
@@ -32,81 +32,64 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema());
|
|
|
32
32
|
// validate event params in middleware before into function
|
|
33
33
|
let validatorSchema = {
|
|
34
34
|
type: "object",
|
|
35
|
-
required: [
|
|
36
|
-
'firstObject',
|
|
37
|
-
'secondObject',
|
|
38
|
-
'oldReltypeAndDirection',
|
|
39
|
-
'newRelType',
|
|
40
|
-
],
|
|
35
|
+
required: ["firstObject","secondObject", "relType", "relationshipProperties","relationshipDirection","relId"],
|
|
41
36
|
properties: {
|
|
42
37
|
firstObject: {
|
|
43
|
-
type:
|
|
44
|
-
required: [
|
|
38
|
+
type: "object",
|
|
39
|
+
required: ["objType","identifiers"],
|
|
45
40
|
properties: {
|
|
46
41
|
objType: {
|
|
47
|
-
type:
|
|
48
|
-
required: [
|
|
42
|
+
type: "object",
|
|
43
|
+
required: ["serviceTag","objectType"],
|
|
49
44
|
properties: {
|
|
50
|
-
serviceTag:
|
|
51
|
-
objectType:
|
|
45
|
+
serviceTag: validatorSchema.stringNotEmpty(),
|
|
46
|
+
objectType: validatorSchema.stringNotEmpty(),
|
|
52
47
|
}
|
|
53
48
|
},
|
|
54
49
|
identifiers: {
|
|
55
50
|
type: "object",
|
|
56
51
|
minProperties: 1
|
|
57
|
-
}
|
|
52
|
+
}
|
|
58
53
|
}
|
|
59
54
|
},
|
|
60
55
|
secondObject: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
56
|
+
type: "object",
|
|
57
|
+
required: ["objType","identifiers"],
|
|
58
|
+
properties: {
|
|
59
|
+
objType: {
|
|
60
|
+
type: "object",
|
|
61
|
+
required: ["serviceTag","objectType"],
|
|
62
|
+
properties: {
|
|
63
|
+
serviceTag: validatorSchema.stringNotEmpty(),
|
|
64
|
+
objectType: validatorSchema.stringNotEmpty(),
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
identifiers: {
|
|
68
|
+
type: "object",
|
|
69
|
+
minProperties: 1
|
|
76
70
|
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
relType: {
|
|
74
|
+
type: "object",
|
|
75
|
+
required: ["relationshipTag", "serviceTag"],
|
|
81
76
|
properties: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
required: ['serviceTag', 'relationshipTag'],
|
|
85
|
-
properties: {
|
|
86
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
87
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
relationshipProperties: {
|
|
91
|
-
type: 'object',
|
|
92
|
-
},
|
|
93
|
-
relationshipDirection: {
|
|
77
|
+
relationshipTag: validatorSchema.stringNotEmpty(),
|
|
78
|
+
serviceTag: {
|
|
94
79
|
type: 'string',
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
80
|
+
pattern: "^[a-zA-Z0-9_-]+$",
|
|
81
|
+
enum: [process.env.iz_serviceTag]
|
|
82
|
+
}
|
|
98
83
|
}
|
|
99
84
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
105
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
106
|
-
}
|
|
85
|
+
relId: validatorSchema.stringNotEmpty(),
|
|
86
|
+
relationshipProperties: {
|
|
87
|
+
type: "object",
|
|
88
|
+
minProperties: 1
|
|
107
89
|
},
|
|
108
|
-
|
|
109
|
-
type:
|
|
90
|
+
relationshipDirection: {
|
|
91
|
+
type: "string",
|
|
92
|
+
enum: ['from','to']
|
|
110
93
|
}
|
|
111
94
|
}
|
|
112
95
|
};
|
package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js
CHANGED
|
@@ -80,10 +80,7 @@ function createParamForCreateSource(srcPath) {
|
|
|
80
80
|
),
|
|
81
81
|
createIamRole(
|
|
82
82
|
{
|
|
83
|
-
[RESOURCE_CLASSES.sns]:
|
|
84
|
-
[
|
|
85
|
-
SNS_RESOURCE.publish, SNS_RESOURCE.subscribe
|
|
86
|
-
]
|
|
83
|
+
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish, SNS_RESOURCE.subscribe],
|
|
87
84
|
},
|
|
88
85
|
[
|
|
89
86
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
@@ -62,7 +62,7 @@ async function filterCreateResourceYaml(_izContext, createSourceParams, objSchem
|
|
|
62
62
|
}))
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
console.log("tableNamesToFilter", tableNamesToFilter)
|
|
65
|
+
// console.log("tableNamesToFilter", tableNamesToFilter)
|
|
66
66
|
let filteredCreateSourceParams = createSourceParams.filter(
|
|
67
67
|
(result) => !tableNamesToFilter.has(result.templateData.tableName)
|
|
68
68
|
)
|
|
@@ -99,7 +99,7 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
99
99
|
// console.log("createSourceParams before filter", createSourceParams)
|
|
100
100
|
const filteredCreateSourceParams = await filterCreateResourceYaml(_izContext, createSourceParams, objSchemaPath);
|
|
101
101
|
|
|
102
|
-
console.log("filteredCreateSourceParams", filteredCreateSourceParams);
|
|
102
|
+
// console.log("filteredCreateSourceParams", filteredCreateSourceParams);
|
|
103
103
|
|
|
104
104
|
return filteredCreateSourceParams;
|
|
105
105
|
} catch (error) {
|