@izara_project/izara-market-library-service-schemas 1.0.68 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +2 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +5 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +1 -4
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +29 -2
- package/src/reStructure/TemplateData/flowSchema/templateByStatusType/triggerCacheTemplate.ejs +24 -11
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +101 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/template.ejs +0 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +62 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +92 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +60 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/template.ejs +97 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +101 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +62 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +91 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +59 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +70 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +101 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +62 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +91 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +60 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/template.ejs +85 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +70 -0
- package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/template.ejs +43 -0
- 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/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/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/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
|
@@ -32,82 +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", "relationshipDirection"],
|
|
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
45
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
51
|
-
objectType: izara.validatorSchema.stringNotEmpty()
|
|
46
|
+
objectType: izara.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
|
-
type:
|
|
62
|
-
required: [
|
|
56
|
+
type: "object",
|
|
57
|
+
required: ["objType", "identifiers"],
|
|
63
58
|
properties: {
|
|
64
59
|
objType: {
|
|
65
|
-
type:
|
|
66
|
-
required: [
|
|
60
|
+
type: "object",
|
|
61
|
+
required: ["serviceTag", "objectType"],
|
|
67
62
|
properties: {
|
|
68
63
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
69
|
-
objectType: izara.validatorSchema.stringNotEmpty()
|
|
64
|
+
objectType: izara.validatorSchema.stringNotEmpty()
|
|
70
65
|
}
|
|
71
66
|
},
|
|
72
67
|
identifiers: {
|
|
73
68
|
type: "object",
|
|
74
69
|
minProperties: 1
|
|
75
|
-
}
|
|
70
|
+
}
|
|
76
71
|
}
|
|
77
72
|
},
|
|
78
|
-
|
|
79
|
-
type:
|
|
80
|
-
required: [
|
|
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: izara.validatorSchema.stringNotEmpty(),
|
|
78
|
+
serviceTag: {
|
|
94
79
|
type: 'string',
|
|
95
|
-
|
|
96
|
-
|
|
80
|
+
pattern: "^[a-zA-Z0-9_-]+$",
|
|
81
|
+
enum: [process.env.iz_serviceTag]
|
|
97
82
|
},
|
|
98
83
|
}
|
|
99
84
|
},
|
|
100
|
-
|
|
85
|
+
relationshipDirection: {
|
|
86
|
+
type: "string",
|
|
87
|
+
enum: ['from', "to"]
|
|
88
|
+
},
|
|
89
|
+
relationshipProperties: {
|
|
101
90
|
type: 'object',
|
|
102
|
-
|
|
103
|
-
properties: {
|
|
104
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
105
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
106
|
-
}
|
|
91
|
+
default: {}
|
|
107
92
|
},
|
|
108
|
-
settings: {
|
|
109
|
-
type: 'object'
|
|
110
|
-
}
|
|
111
93
|
}
|
|
112
94
|
};
|
|
113
95
|
|
|
@@ -27,20 +27,15 @@ const <%- functionName %> = require('./<%- firstLetterUpperCase(functionName) %>
|
|
|
27
27
|
// validate event params in middleware before into function
|
|
28
28
|
let validatorSchema = {
|
|
29
29
|
type: "object",
|
|
30
|
-
required: [
|
|
31
|
-
'firstObject',
|
|
32
|
-
'secondObject',
|
|
33
|
-
'oldReltypeAndDirection',
|
|
34
|
-
'newRelType',
|
|
35
|
-
],
|
|
30
|
+
required: ["firstObject","secondObject", "relType", "relationshipProperties","relationshipDirection"],
|
|
36
31
|
properties: {
|
|
37
32
|
firstObject: {
|
|
38
|
-
type:
|
|
39
|
-
required: [
|
|
33
|
+
type: "object",
|
|
34
|
+
required: ["objType","identifiers"],
|
|
40
35
|
properties: {
|
|
41
36
|
objType: {
|
|
42
|
-
type:
|
|
43
|
-
required: [
|
|
37
|
+
type: "object",
|
|
38
|
+
required: ["serviceTag","objectType"],
|
|
44
39
|
properties: {
|
|
45
40
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
46
41
|
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
@@ -49,63 +44,49 @@ let validatorSchema = {
|
|
|
49
44
|
identifiers: {
|
|
50
45
|
type: "object",
|
|
51
46
|
minProperties: 1
|
|
52
|
-
}
|
|
47
|
+
}
|
|
53
48
|
}
|
|
54
49
|
},
|
|
55
50
|
secondObject: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
51
|
+
type: "object",
|
|
52
|
+
required: ["objType","identifiers"],
|
|
53
|
+
properties: {
|
|
54
|
+
objType: {
|
|
55
|
+
type: "object",
|
|
56
|
+
required: ["serviceTag","objectType"],
|
|
57
|
+
properties: {
|
|
58
|
+
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
59
|
+
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
identifiers: {
|
|
63
|
+
type: "object",
|
|
64
|
+
minProperties: 1
|
|
71
65
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
relType: {
|
|
69
|
+
type: "object",
|
|
70
|
+
required: ["relationshipTag", "serviceTag"],
|
|
76
71
|
properties: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
required: ['serviceTag', 'relationshipTag'],
|
|
80
|
-
properties: {
|
|
81
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
82
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
relationshipProperties: {
|
|
86
|
-
type: 'object',
|
|
87
|
-
},
|
|
88
|
-
relationshipDirection: {
|
|
72
|
+
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
73
|
+
serviceTag: {
|
|
89
74
|
type: 'string',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
75
|
+
pattern: "^[a-zA-Z0-9_-]+$",
|
|
76
|
+
enum: [process.env.iz_serviceTag]
|
|
77
|
+
}
|
|
93
78
|
}
|
|
94
79
|
},
|
|
95
|
-
|
|
96
|
-
type:
|
|
97
|
-
|
|
98
|
-
properties: {
|
|
99
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
100
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
101
|
-
}
|
|
80
|
+
relationshipProperties: {
|
|
81
|
+
type: "object",
|
|
82
|
+
minProperties: 1
|
|
102
83
|
},
|
|
103
|
-
|
|
104
|
-
type:
|
|
84
|
+
relationshipDirection: {
|
|
85
|
+
type: "string",
|
|
86
|
+
enum: ['from','to']
|
|
105
87
|
}
|
|
106
88
|
}
|
|
107
89
|
};
|
|
108
|
-
|
|
109
90
|
//(<globalVariable>
|
|
110
91
|
//</globalVariable>)
|
|
111
92
|
|
|
@@ -48,20 +48,15 @@ middleware.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema(
|
|
|
48
48
|
// validate event params in middlewware before into function.
|
|
49
49
|
let validatorSchema = {
|
|
50
50
|
type: "object",
|
|
51
|
-
required: [
|
|
52
|
-
'firstObject',
|
|
53
|
-
'secondObject',
|
|
54
|
-
'oldReltypeAndDirection',
|
|
55
|
-
'newRelType',
|
|
56
|
-
],
|
|
51
|
+
required: ["firstObject","secondObject", "relType", "relationshipProperties","relationshipDirection"],
|
|
57
52
|
properties: {
|
|
58
53
|
firstObject: {
|
|
59
|
-
type:
|
|
60
|
-
required: [
|
|
54
|
+
type: "object",
|
|
55
|
+
required: ["objType","identifiers"],
|
|
61
56
|
properties: {
|
|
62
57
|
objType: {
|
|
63
|
-
type:
|
|
64
|
-
required: [
|
|
58
|
+
type: "object",
|
|
59
|
+
required: ["serviceTag","objectType"],
|
|
65
60
|
properties: {
|
|
66
61
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
67
62
|
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
@@ -70,59 +65,46 @@ let validatorSchema = {
|
|
|
70
65
|
identifiers: {
|
|
71
66
|
type: "object",
|
|
72
67
|
minProperties: 1
|
|
73
|
-
}
|
|
68
|
+
}
|
|
74
69
|
}
|
|
75
70
|
},
|
|
76
71
|
secondObject: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
72
|
+
type: "object",
|
|
73
|
+
required: ["objType","identifiers"],
|
|
74
|
+
properties: {
|
|
75
|
+
objType: {
|
|
76
|
+
type: "object",
|
|
77
|
+
required: ["serviceTag","objectType"],
|
|
78
|
+
properties: {
|
|
79
|
+
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
80
|
+
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
identifiers: {
|
|
84
|
+
type: "object",
|
|
85
|
+
minProperties: 1
|
|
92
86
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
relType: {
|
|
90
|
+
type: "object",
|
|
91
|
+
required: ["relationshipTag", "serviceTag"],
|
|
97
92
|
properties: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
required: ['serviceTag', 'relationshipTag'],
|
|
101
|
-
properties: {
|
|
102
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
103
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
relationshipProperties: {
|
|
107
|
-
type: 'object',
|
|
108
|
-
},
|
|
109
|
-
relationshipDirection: {
|
|
93
|
+
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
94
|
+
serviceTag: {
|
|
110
95
|
type: 'string',
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
96
|
+
pattern: "^[a-zA-Z0-9_-]+$",
|
|
97
|
+
enum: [process.env.iz_serviceTag]
|
|
98
|
+
}
|
|
114
99
|
}
|
|
115
100
|
},
|
|
116
|
-
|
|
117
|
-
type:
|
|
118
|
-
|
|
119
|
-
properties: {
|
|
120
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
121
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
122
|
-
}
|
|
101
|
+
relationshipProperties: {
|
|
102
|
+
type: "object",
|
|
103
|
+
minProperties: 1
|
|
123
104
|
},
|
|
124
|
-
|
|
125
|
-
type:
|
|
105
|
+
relationshipDirection: {
|
|
106
|
+
type: "string",
|
|
107
|
+
enum: ['from','to']
|
|
126
108
|
}
|
|
127
109
|
}
|
|
128
110
|
};
|
|
@@ -31,20 +31,15 @@ const <%- functionName %> = require('./<%- firstLetterUpperCase(functionName) %>
|
|
|
31
31
|
// validate event params in middlewware before into function.
|
|
32
32
|
let validatorSchema = {
|
|
33
33
|
type: "object",
|
|
34
|
-
required: [
|
|
35
|
-
'firstObject',
|
|
36
|
-
'secondObject',
|
|
37
|
-
'oldReltypeAndDirection',
|
|
38
|
-
'newRelType',
|
|
39
|
-
],
|
|
34
|
+
required: ["firstObject","secondObject", "relType", "relationshipProperties","relationshipDirection"],
|
|
40
35
|
properties: {
|
|
41
36
|
firstObject: {
|
|
42
|
-
type:
|
|
43
|
-
required: [
|
|
37
|
+
type: "object",
|
|
38
|
+
required: ["objType","identifiers"],
|
|
44
39
|
properties: {
|
|
45
40
|
objType: {
|
|
46
|
-
type:
|
|
47
|
-
required: [
|
|
41
|
+
type: "object",
|
|
42
|
+
required: ["serviceTag","objectType"],
|
|
48
43
|
properties: {
|
|
49
44
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
50
45
|
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
@@ -53,59 +48,46 @@ let validatorSchema = {
|
|
|
53
48
|
identifiers: {
|
|
54
49
|
type: "object",
|
|
55
50
|
minProperties: 1
|
|
56
|
-
}
|
|
51
|
+
}
|
|
57
52
|
}
|
|
58
53
|
},
|
|
59
54
|
secondObject: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
55
|
+
type: "object",
|
|
56
|
+
required: ["objType","identifiers"],
|
|
57
|
+
properties: {
|
|
58
|
+
objType: {
|
|
59
|
+
type: "object",
|
|
60
|
+
required: ["serviceTag","objectType"],
|
|
61
|
+
properties: {
|
|
62
|
+
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
63
|
+
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
identifiers: {
|
|
67
|
+
type: "object",
|
|
68
|
+
minProperties: 1
|
|
75
69
|
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
relType: {
|
|
73
|
+
type: "object",
|
|
74
|
+
required: ["relationshipTag", "serviceTag"],
|
|
80
75
|
properties: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
required: ['serviceTag', 'relationshipTag'],
|
|
84
|
-
properties: {
|
|
85
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
86
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
relationshipProperties: {
|
|
90
|
-
type: 'object',
|
|
91
|
-
},
|
|
92
|
-
relationshipDirection: {
|
|
76
|
+
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
77
|
+
serviceTag: {
|
|
93
78
|
type: 'string',
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
79
|
+
pattern: "^[a-zA-Z0-9_-]+$",
|
|
80
|
+
enum: [process.env.iz_serviceTag]
|
|
81
|
+
}
|
|
97
82
|
}
|
|
98
83
|
},
|
|
99
|
-
|
|
100
|
-
type:
|
|
101
|
-
|
|
102
|
-
properties: {
|
|
103
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
104
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
105
|
-
}
|
|
84
|
+
relationshipProperties: {
|
|
85
|
+
type: "object",
|
|
86
|
+
minProperties: 1
|
|
106
87
|
},
|
|
107
|
-
|
|
108
|
-
type:
|
|
88
|
+
relationshipDirection: {
|
|
89
|
+
type: "string",
|
|
90
|
+
enum: ['from','to']
|
|
109
91
|
}
|
|
110
92
|
}
|
|
111
93
|
};
|
|
@@ -32,20 +32,15 @@ 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"],
|
|
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
45
|
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
51
46
|
objectType: izara.validatorSchema.stringNotEmpty(),
|
|
@@ -54,59 +49,46 @@ let validatorSchema = {
|
|
|
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: izara.validatorSchema.stringNotEmpty(),
|
|
64
|
+
objectType: izara.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: izara.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
|
-
type:
|
|
102
|
-
|
|
103
|
-
properties: {
|
|
104
|
-
serviceTag: izara.validatorSchema.stringNotEmpty(),
|
|
105
|
-
relationshipTag: izara.validatorSchema.stringNotEmpty(),
|
|
106
|
-
}
|
|
85
|
+
relationshipProperties: {
|
|
86
|
+
type: "object",
|
|
87
|
+
minProperties: 1
|
|
107
88
|
},
|
|
108
|
-
|
|
109
|
-
type:
|
|
89
|
+
relationshipDirection: {
|
|
90
|
+
type: "string",
|
|
91
|
+
enum: ['from','to']
|
|
110
92
|
}
|
|
111
93
|
}
|
|
112
94
|
};
|