@izara_project/izara-core-generate-service-code 1.0.90 → 1.0.92

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.
Files changed (82) hide show
  1. package/package.json +7 -10
  2. package/src/compile/flowValidator.js +6 -0
  3. package/src/compile/loadSchemas.js +177 -69
  4. package/src/emit/crud/emitDynamicCrudFlowSchemas.js +2 -2
  5. package/src/emit/crud/generateCrudApplicationArtifacts.js +15 -17
  6. package/src/emit/crud/generateDynamicCrudFlowSchemas.js +16 -21
  7. package/src/emit/crud/loadLocalSchemaArrays.js +4 -8
  8. package/src/emit/crud/templates/CreateAfterHookCallback_Main.ejs +6 -6
  9. package/src/emit/crud/templates/CreateBeforeHookCallback_Main.ejs +3 -3
  10. package/src/emit/crud/templates/CreateComplete_Main.ejs +22 -22
  11. package/src/emit/crud/templates/CreateEndpoint_Main.ejs +18 -18
  12. package/src/emit/crud/templates/CreateLogicalLib.ejs +47 -47
  13. package/src/emit/crud/templates/CreateNodeCallback_Main.ejs +24 -24
  14. package/src/emit/crud/templates/DeleteAfterHookCallback_Main.ejs +5 -5
  15. package/src/emit/crud/templates/DeleteBeforeHookCallback_Main.ejs +3 -3
  16. package/src/emit/crud/templates/DeleteComplete_Main.ejs +23 -23
  17. package/src/emit/crud/templates/DeleteEndpoint_Main.ejs +15 -15
  18. package/src/emit/crud/templates/DeleteLogicalLib.ejs +19 -19
  19. package/src/emit/crud/templates/FlowEndpointRbacCallback_Main.ejs +3 -3
  20. package/src/emit/crud/templates/UpdateAfterHookCallback_Main.ejs +5 -5
  21. package/src/emit/crud/templates/UpdateBeforeHookCallback_Main.ejs +3 -3
  22. package/src/emit/crud/templates/UpdateComplete_Main.ejs +22 -22
  23. package/src/emit/crud/templates/UpdateEndpoint_Main.ejs +15 -15
  24. package/src/emit/crud/templates/UpdateLogicalLib.ejs +33 -33
  25. package/src/emit/custom/customFlowPaths.js +149 -0
  26. package/src/emit/custom/customFlowS3.js +156 -0
  27. package/src/emit/custom/customFlowSteps.js +385 -0
  28. package/src/emit/custom/customFlowTemplates.js +28 -0
  29. package/src/emit/custom/customFlows.js +48 -19
  30. package/src/emit/custom/emitCustomFlowApplicationArtifacts.js +57 -692
  31. package/src/emit/custom/generateCustomFlowApplicationArtifacts.js +27 -25
  32. package/src/emit/custom/templates/FlowEndpointRbacCallback_Main.ejs +7 -7
  33. package/src/emit/custom/templates/s3/ConfirmReserved_HdrSqs.ejs +3 -3
  34. package/src/emit/custom/templates/s3/ConfirmReserved_Main.ejs +3 -3
  35. package/src/emit/custom/templates/s3/CreatePreSignUrl_HdrSqs.ejs +3 -3
  36. package/src/emit/custom/templates/s3/CreatePreSignUrl_Main.ejs +4 -4
  37. package/src/emit/rbac/emitDynamicRbacFlowSchemas.js +26 -6
  38. package/src/emit/rbac/emitRbacApplicationArtifacts.js +40 -13
  39. package/src/emit/rbac/generateCreateTargetRoleHandler.js +11 -13
  40. package/src/emit/rbac/generateDynamicRbacFlowSchemas.js +14 -18
  41. package/src/emit/rbac/templates/UserRbacFlow_Main.ejs +13 -7
  42. package/src/emit/relationship/emitDynamicRelationshipFlowSchemas.js +1 -1
  43. package/src/emit/relationship/generateDynamicRelationshipFlowSchemas.js +16 -19
  44. package/src/emit/relationship/generateRelationshipApplicationArtifacts.js +19 -19
  45. package/src/emit/relationship/templates/ChangeRelationshipComplete_HdrSqs.ejs +2 -2
  46. package/src/emit/relationship/templates/ChangeRelationshipComplete_Main.ejs +6 -6
  47. package/src/emit/relationship/templates/ChangeRelationship_Main.ejs +17 -17
  48. package/src/emit/relationship/templates/CreateRelationshipComplete_HdrSqs.ejs +2 -2
  49. package/src/emit/relationship/templates/CreateRelationshipComplete_Main.ejs +6 -6
  50. package/src/emit/relationship/templates/CreateRelationship_Main.ejs +14 -14
  51. package/src/emit/relationship/templates/DeleteRelationshipComplete_HdrSqs.ejs +2 -2
  52. package/src/emit/relationship/templates/DeleteRelationshipComplete_Main.ejs +6 -6
  53. package/src/emit/relationship/templates/DeleteRelationship_Main.ejs +10 -10
  54. package/src/emit/relationship/templates/GetRelationshipComplete_HdrSqs.ejs +2 -2
  55. package/src/emit/relationship/templates/GetRelationshipComplete_Main.ejs +5 -5
  56. package/src/emit/relationship/templates/GetRelationship_Main.ejs +9 -9
  57. package/src/emit/relationship/templates/MoveRelationshipComplete_HdrSqs.ejs +2 -2
  58. package/src/emit/relationship/templates/MoveRelationshipComplete_Main.ejs +6 -6
  59. package/src/emit/relationship/templates/MoveRelationship_Main.ejs +15 -15
  60. package/src/emit/relationship/templates/UpdateRelationshipComplete_HdrSqs.ejs +2 -2
  61. package/src/emit/relationship/templates/UpdateRelationshipComplete_Main.ejs +6 -6
  62. package/src/emit/relationship/templates/UpdateRelationship_Main.ejs +11 -11
  63. package/src/emit/resource/dynamoResourceArtifacts.js +18 -0
  64. package/src/emit/resource/emitResourceArtifacts.js +13 -1251
  65. package/src/emit/resource/generateResourceArtifacts.js +20 -20
  66. package/src/emit/resource/iamResourceArtifacts.js +612 -0
  67. package/src/emit/resource/resourceState.js +564 -0
  68. package/src/emit/resource/resourceTemplate.js +30 -0
  69. package/src/emit/resource/s3ResourceArtifacts.js +14 -0
  70. package/src/emit/resource/sqsResourceArtifacts.js +113 -0
  71. package/src/emit/shared/runSubsystemGeneration.js +55 -0
  72. package/src/emit/shared/templates/FindData_Main.ejs +19 -19
  73. package/src/emit/shared/templates/PaginateProcessLogical_Main.ejs +3 -3
  74. package/src/emit/shared/templates/ProcessLogical_Main.ejs +15 -15
  75. package/src/emit/system/emitSystemWebSocketArtifacts.js +2 -1
  76. package/test/createTargetRoleHandler.test.js +62 -4
  77. package/test/crudApplicationArtifacts.test.js +75 -3
  78. package/test/customFlowApplicationArtifacts.test.js +98 -0
  79. package/test/dynamicCrudFlowSchemas.test.js +2 -2
  80. package/test/dynamicRbacFlowSchemas.test.js +32 -4
  81. package/test/relationshipApplicationArtifacts.test.js +1 -1
  82. package/test/resourceArtifacts.test.js +99 -0
@@ -44,7 +44,7 @@ export default async function changeRelationshipComplete(
44
44
  returnValue,
45
45
  parentFlowId,
46
46
  status,
47
- errorsFound,
47
+ foundErrors,
48
48
  graphServiceTag
49
49
  } = requestParams;
50
50
 
@@ -52,7 +52,7 @@ export default async function changeRelationshipComplete(
52
52
  returnValue: returnValue,
53
53
  parentFlowId: parentFlowId,
54
54
  status: status,
55
- errorsFound: errorsFound,
55
+ foundErrors: foundErrors,
56
56
  graphServiceTag: graphServiceTag,
57
57
  passBackProperties: passBackProperties
58
58
  });
@@ -76,7 +76,7 @@ export default async function changeRelationshipComplete(
76
76
  _izContext.logger.warn(
77
77
  `No pending step found for awaitingStepId: ${awaitingStepId}`
78
78
  );
79
- return { returnValue, status, errorsFound };
79
+ return { returnValue, status, foundErrors };
80
80
  }
81
81
 
82
82
  const result =
@@ -84,7 +84,7 @@ export default async function changeRelationshipComplete(
84
84
  _izContext,
85
85
  pending.pendingStepId,
86
86
  awaitingStepId,
87
- errorsFound
87
+ foundErrors
88
88
  );
89
89
  _izContext.logger.debug(
90
90
  '[ChangeRelationshipComplete] all awaiting steps result',
@@ -107,7 +107,7 @@ export default async function changeRelationshipComplete(
107
107
  newRelType: returnValue.requestParams.newRelType,
108
108
  parentFlowId: parentFlowId || returnValue?.parentFlowId,
109
109
  status: status,
110
- errorsFound: errorsFound
110
+ foundErrors: foundErrors
111
111
  };
112
112
 
113
113
  const callingFlowConfig =
@@ -165,7 +165,7 @@ export default async function changeRelationshipComplete(
165
165
  return {
166
166
  returnValue,
167
167
  status,
168
- errorsFound
168
+ foundErrors
169
169
  };
170
170
  } catch (err) {
171
171
  _izContext.logger.error('error createRelationshipComplete:', err);
@@ -89,7 +89,7 @@ export default async function <%- functionName %>(
89
89
  //(</requestParamCreateRel>)
90
90
  } = requestParams;
91
91
 
92
- let errorsFound = [];
92
+ let foundErrors = [];
93
93
  const parentFlowId = identifierUuid();
94
94
  //(<beforeValidateChangeRel>)
95
95
  //(</beforeValidateChangeRel>).
@@ -106,7 +106,7 @@ export default async function <%- functionName %>(
106
106
  );
107
107
 
108
108
  if (!objectSchema) {
109
- errorsFound.push(
109
+ foundErrors.push(
110
110
  `validateIdentifiers, not found schema of ${objTypeString}`
111
111
  );
112
112
  }
@@ -117,7 +117,7 @@ export default async function <%- functionName %>(
117
117
  ];
118
118
  for (const identifierName of identifierNames) {
119
119
  if (!identifiersObject.hasOwnProperty(identifierName)) {
120
- errorsFound.push(
120
+ foundErrors.push(
121
121
  `validateIdentifiers, ${objTypeString} property:${identifierName} not exists`
122
122
  );
123
123
  } else {
@@ -125,7 +125,7 @@ export default async function <%- functionName %>(
125
125
  typeof identifiersObject[identifierName] !== 'string' &&
126
126
  typeof identifiersObject[identifierName] !== 'number'
127
127
  ) {
128
- errorsFound.push(
128
+ foundErrors.push(
129
129
  `validateIdentifiers, ${objTypeString} property:${identifierName} should be string or number`
130
130
  );
131
131
  }
@@ -162,12 +162,12 @@ export default async function <%- functionName %>(
162
162
  );
163
163
  _izContext.logger.debug('newRelationshipSchema: ', newRelationshipSchema);
164
164
  if (!oldRelationshipSchema.hasOwnProperty('canChangeToRelTypes')) {
165
- errorsFound.push(
165
+ foundErrors.push(
166
166
  `${oldRelTypeAndDirection.relType} not have property to change to another relType`
167
167
  );
168
168
  } else {
169
169
  if (!newRelationshipSchema) {
170
- errorsFound.push(
170
+ foundErrors.push(
171
171
  `${newRelationshipSchema} not exists can't changeToRelType`
172
172
  );
173
173
  } else {
@@ -184,7 +184,7 @@ export default async function <%- functionName %>(
184
184
  // if changeBy is user will check for importBatch callingFlow
185
185
  if (callingFlowConfig) {
186
186
  if (callingFlowConfig.callingFlow !== "ImportDataTestExternalUpdateRelationshipHdrSqs") {
187
- errorsFound.push(`CanChangeToRelType changeBy is user but it's not user process with importData`);
187
+ foundErrors.push(`CanChangeToRelType changeBy is user but it's not user process with importData`);
188
188
  }
189
189
  }
190
190
  }
@@ -194,11 +194,11 @@ export default async function <%- functionName %>(
194
194
  const isUserProcess = Boolean(_izContext.correlationIds?.get(consts.SUBMITTED_BY_USER_ID));
195
195
  if (isUserProcess) {
196
196
  if (canChangeToRelType.changeBy !== 'user' && canChangeToRelType.changeBy !== 'systemWithUser') {
197
- errorsFound.push(`CanChangeToRelType changeBy is not user or systemWithUser`);
197
+ foundErrors.push(`CanChangeToRelType changeBy is not user or systemWithUser`);
198
198
  }
199
199
  } else {
200
200
  if (canChangeToRelType.changeBy !== 'systemNoUser') {
201
- errorsFound.push(`CanChangeToRelType changeBy is not systemNoUser`);
201
+ foundErrors.push(`CanChangeToRelType changeBy is not systemNoUser`);
202
202
  }
203
203
  }
204
204
  }
@@ -213,7 +213,7 @@ export default async function <%- functionName %>(
213
213
  );
214
214
  _izContext.logger.debug('links', links);
215
215
  if (!links.length) {
216
- errorsFound.push(
216
+ foundErrors.push(
217
217
  `not found link between ${JSON.stringify({ firstObject: firstObject.objType })} ${JSON.stringify({ secondObject: secondObject.objType })}`
218
218
  );
219
219
  }
@@ -253,7 +253,7 @@ export default async function <%- functionName %>(
253
253
  }
254
254
 
255
255
  if (checkCorrectLink == false) {
256
- errorsFound.push(`Wrong Relationship Direction`);
256
+ foundErrors.push(`Wrong Relationship Direction`);
257
257
  }
258
258
 
259
259
  let targetStorageResources = [];
@@ -301,7 +301,7 @@ export default async function <%- functionName %>(
301
301
  usedStorageResource.graphServerTag
302
302
  );
303
303
  if (!graphServiceTag) {
304
- errorsFound.push(
304
+ foundErrors.push(
305
305
  `storageResourceTag: ${storageResourceTag} invalid, not found graph serviceTag from graphServerTag: ${usedStorageResource.graphServerTag}`
306
306
  );
307
307
  }
@@ -327,23 +327,23 @@ export default async function <%- functionName %>(
327
327
  );
328
328
 
329
329
  if (!targetStorageResources.length) {
330
- errorsFound.push(`Not found link from relationship schema`);
330
+ foundErrors.push(`Not found link from relationship schema`);
331
331
  }
332
332
 
333
333
  // validate properties exists with schema
334
334
  for (const propKey in oldRelTypeAndDirection.fieldNames) {
335
335
  if (!newRelationshipSchema.fieldNames.hasOwnProperty(propKey)) {
336
- errorsFound.push(
336
+ foundErrors.push(
337
337
  `property: ${propKey} not exists in relationshipSchema`
338
338
  );
339
339
  }
340
340
  }
341
341
  } else {
342
- errorsFound.push(`relationshipSchema not exists`);
342
+ foundErrors.push(`relationshipSchema not exists`);
343
343
  }
344
344
 
345
345
  // if found errors will stop processing
346
- if (errorsFound.length) {
346
+ if (foundErrors.length) {
347
347
  let changeRelCompleteMsg = {
348
348
  firstObject,
349
349
  secondObject,
@@ -354,7 +354,7 @@ export default async function <%- functionName %>(
354
354
  //(<inChangeRelCompleteMsg>)
355
355
  //(</inChangeRelCompleteMsg>)
356
356
  status: 'error',
357
- errorsFound: errorsFound,
357
+ foundErrors: foundErrors,
358
358
  parentFlowId
359
359
  };
360
360
 
@@ -20,7 +20,7 @@ let perRecordsValidatorSchema = {
20
20
  status: {
21
21
  type: 'string'
22
22
  },
23
- errorsFound: {
23
+ foundErrors: {
24
24
  type: 'array'
25
25
  },
26
26
  graphServiceTag: {
@@ -31,7 +31,7 @@ let perRecordsValidatorSchema = {
31
31
  'returnValue',
32
32
  'parentFlowId',
33
33
  'status',
34
- 'errorsFound',
34
+ 'foundErrors',
35
35
  'graphServiceTag'
36
36
  ]
37
37
  //(<validatorSchema>)
@@ -44,7 +44,7 @@ export default async function createRelationshipComplete(
44
44
  returnValue,
45
45
  parentFlowId,
46
46
  status,
47
- errorsFound,
47
+ foundErrors,
48
48
  graphServiceTag
49
49
  } = requestParams;
50
50
 
@@ -52,7 +52,7 @@ export default async function createRelationshipComplete(
52
52
  returnValue: returnValue,
53
53
  parentFlowId: parentFlowId,
54
54
  status: status,
55
- errorsFound: errorsFound,
55
+ foundErrors: foundErrors,
56
56
  graphServiceTag: graphServiceTag,
57
57
  passBackProperties: passBackProperties
58
58
  });
@@ -76,7 +76,7 @@ export default async function createRelationshipComplete(
76
76
  _izContext.logger.warn(
77
77
  `No pending step found for awaitingStepId: ${awaitingStepId}`
78
78
  );
79
- return { returnValue, status, errorsFound };
79
+ return { returnValue, status, foundErrors };
80
80
  }
81
81
 
82
82
  const result =
@@ -84,7 +84,7 @@ export default async function createRelationshipComplete(
84
84
  _izContext,
85
85
  pending.pendingStepId,
86
86
  awaitingStepId,
87
- errorsFound
87
+ foundErrors
88
88
  );
89
89
  _izContext.logger.debug(
90
90
  '[CreateRelationshipComplete] all awaiting steps result',
@@ -106,7 +106,7 @@ export default async function createRelationshipComplete(
106
106
  returnValue.requestParams.relationshipProperties,
107
107
  parentFlowId: parentFlowId || returnValue?.parentFlowId,
108
108
  status: status,
109
- errorsFound: errorsFound
109
+ foundErrors: foundErrors
110
110
  };
111
111
 
112
112
  const callingFlowConfig =
@@ -164,7 +164,7 @@ export default async function createRelationshipComplete(
164
164
  return {
165
165
  returnValue,
166
166
  status,
167
- errorsFound
167
+ foundErrors
168
168
  };
169
169
  } catch (err) {
170
170
  _izContext.logger.error('error createRelationshipComplete:', err);
@@ -90,7 +90,7 @@ export default async function createRelationship(
90
90
 
91
91
  const createOnConditionalFail = settings.createOnConditionalFail ?? false;
92
92
 
93
- let errorsFound = [];
93
+ let foundErrors = [];
94
94
  const parentFlowId = identifierUuid();
95
95
  //(<beforeValidateCreateRel>)
96
96
  //(</beforeValidateCreateRel>).
@@ -107,7 +107,7 @@ export default async function createRelationship(
107
107
  );
108
108
 
109
109
  if (!objectSchema) {
110
- errorsFound.push(
110
+ foundErrors.push(
111
111
  `validateIdentifiers, not found schema of ${objTypeString}`
112
112
  );
113
113
  }
@@ -118,7 +118,7 @@ export default async function createRelationship(
118
118
  ];
119
119
  for (const identifierName of identifierNames) {
120
120
  if (!identifiersObject.hasOwnProperty(identifierName)) {
121
- errorsFound.push(
121
+ foundErrors.push(
122
122
  `validateIdentifiers, ${objTypeString} property:${identifierName} not exists`
123
123
  );
124
124
  } else {
@@ -126,7 +126,7 @@ export default async function createRelationship(
126
126
  typeof identifiersObject[identifierName] !== 'string' &&
127
127
  typeof identifiersObject[identifierName] !== 'number'
128
128
  ) {
129
- errorsFound.push(
129
+ foundErrors.push(
130
130
  `validateIdentifiers, ${objTypeString} property:${identifierName} should be string or number`
131
131
  );
132
132
  }
@@ -175,7 +175,7 @@ export default async function createRelationship(
175
175
  );
176
176
  _izContext.logger.debug('links', links);
177
177
  if (!links.length) {
178
- errorsFound.push(
178
+ foundErrors.push(
179
179
  `not found link between ${JSON.stringify({ firstObject: firstObject.objType })} ${JSON.stringify({ secondObject: secondObject.objType })}`
180
180
  );
181
181
  }
@@ -214,7 +214,7 @@ export default async function createRelationship(
214
214
  }
215
215
 
216
216
  if (checkCorrectLink == false) {
217
- errorsFound.push(`Wrong Relationship Direction`);
217
+ foundErrors.push(`Wrong Relationship Direction`);
218
218
  }
219
219
 
220
220
  let targetStorageResources = [];
@@ -262,7 +262,7 @@ export default async function createRelationship(
262
262
  usedStorageResource.graphServerTag
263
263
  );
264
264
  if (!graphServiceTag) {
265
- errorsFound.push(
265
+ foundErrors.push(
266
266
  `storageResourceTag: ${storageResourceTag} invalid, not found graph serviceTag from graphServerTag: ${usedStorageResource.graphServerTag}`
267
267
  );
268
268
  }
@@ -288,13 +288,13 @@ export default async function createRelationship(
288
288
  );
289
289
 
290
290
  if (!targetStorageResources.length) {
291
- errorsFound.push(`Not found link from relationship schema`);
291
+ foundErrors.push(`Not found link from relationship schema`);
292
292
  }
293
293
 
294
294
  // validate properties exists with schema
295
295
  for (const propKey in relationshipProperties) {
296
296
  if (!relationshipSchema.fieldNames.hasOwnProperty(propKey)) {
297
- errorsFound.push(
297
+ foundErrors.push(
298
298
  `property: ${propKey} not exists in relationshipSchema`
299
299
  );
300
300
  }
@@ -306,7 +306,7 @@ export default async function createRelationship(
306
306
  )) {
307
307
  if (propSetting.requiredOnCreate === true) {
308
308
  if (!relationshipProperties.hasOwnProperty(propName)) {
309
- errorsFound.push(`Missing requiredOnCreate property: ${propName}`);
309
+ foundErrors.push(`Missing requiredOnCreate property: ${propName}`);
310
310
  }
311
311
  }
312
312
 
@@ -315,15 +315,15 @@ export default async function createRelationship(
315
315
  !propSetting.requiredOnCreate &&
316
316
  relationshipProperties.hasOwnProperty(propName)
317
317
  ) {
318
- errorsFound.push(`property: ${propName} cannot create`);
318
+ foundErrors.push(`property: ${propName} cannot create`);
319
319
  }
320
320
  }
321
321
  } else {
322
- errorsFound.push(`relationshipSchema not exists`);
322
+ foundErrors.push(`relationshipSchema not exists`);
323
323
  }
324
324
 
325
325
  // if found errors will stop processing
326
- if (errorsFound.length) {
326
+ if (foundErrors.length) {
327
327
  let createRelCompleteMsg = {
328
328
  firstObject: firstObject,
329
329
  secondObject: secondObject,
@@ -333,7 +333,7 @@ export default async function createRelationship(
333
333
  //(<inCreateRelCompleteMsgCrateRel>)
334
334
  //(</inCreateRelCompleteMsgCrateRel>)
335
335
  status: 'error',
336
- errorsFound: errorsFound,
336
+ foundErrors: foundErrors,
337
337
  parentFlowId: parentFlowId
338
338
  };
339
339
 
@@ -20,7 +20,7 @@ let perRecordsValidatorSchema = {
20
20
  status: {
21
21
  type: 'string'
22
22
  },
23
- errorsFound: {
23
+ foundErrors: {
24
24
  type: 'array'
25
25
  },
26
26
  graphServiceTag: {
@@ -31,7 +31,7 @@ let perRecordsValidatorSchema = {
31
31
  'returnValue',
32
32
  'parentFlowId',
33
33
  'status',
34
- 'errorsFound',
34
+ 'foundErrors',
35
35
  'graphServiceTag'
36
36
  ]
37
37
  //(<validatorSchema>)
@@ -44,7 +44,7 @@ export default async function deleteRelationshipComplete(
44
44
  returnValue,
45
45
  parentFlowId,
46
46
  status,
47
- errorsFound,
47
+ foundErrors,
48
48
  graphServiceTag
49
49
  } = requestParams;
50
50
 
@@ -52,7 +52,7 @@ export default async function deleteRelationshipComplete(
52
52
  returnValue: returnValue,
53
53
  parentFlowId: parentFlowId,
54
54
  status: status,
55
- errorsFound: errorsFound,
55
+ foundErrors: foundErrors,
56
56
  graphServiceTag: graphServiceTag,
57
57
  passBackProperties: passBackProperties
58
58
  });
@@ -76,7 +76,7 @@ export default async function deleteRelationshipComplete(
76
76
  _izContext.logger.warn(
77
77
  `No pending step found for awaitingStepId: ${awaitingStepId}`
78
78
  );
79
- return { returnValue, status, errorsFound };
79
+ return { returnValue, status, foundErrors };
80
80
  }
81
81
 
82
82
  const result =
@@ -84,7 +84,7 @@ export default async function deleteRelationshipComplete(
84
84
  _izContext,
85
85
  pending.pendingStepId,
86
86
  awaitingStepId,
87
- errorsFound
87
+ foundErrors
88
88
  );
89
89
  _izContext.logger.debug(
90
90
  '[DeleteRelationshipComplete] all awaiting steps result',
@@ -104,7 +104,7 @@ export default async function deleteRelationshipComplete(
104
104
  relType: returnValue.requestParams.relType,
105
105
  parentFlowId: parentFlowId || returnValue?.parentFlowId,
106
106
  status: status,
107
- errorsFound: errorsFound
107
+ foundErrors: foundErrors
108
108
  };
109
109
 
110
110
  const callingFlowConfig =
@@ -156,7 +156,7 @@ export default async function deleteRelationshipComplete(
156
156
  return {
157
157
  returnValue,
158
158
  status,
159
- errorsFound
159
+ foundErrors
160
160
  };
161
161
  } catch (err) {
162
162
  _izContext.logger.error('error deleteRelationshipComplete:', err);
@@ -87,7 +87,7 @@ export default async function deleteRelationship(
87
87
  } = requestParams;
88
88
 
89
89
  const parentFlowId = identifierUuid();
90
- let errorsFound = [];
90
+ let foundErrors = [];
91
91
 
92
92
  //(<beforeValidateDeleteRel>)
93
93
  //(</beforeValidateDeleteRel>)
@@ -104,7 +104,7 @@ export default async function deleteRelationship(
104
104
  );
105
105
 
106
106
  if (!objectSchema) {
107
- errorsFound.push(
107
+ foundErrors.push(
108
108
  `validateIdentifiers, not found schema of ${objTypeString}`
109
109
  );
110
110
  }
@@ -115,7 +115,7 @@ export default async function deleteRelationship(
115
115
  ];
116
116
  for (const identifierName of identifierNames) {
117
117
  if (!identifiersObject.hasOwnProperty(identifierName)) {
118
- errorsFound.push(
118
+ foundErrors.push(
119
119
  `validateIdentifiers, ${objTypeString} property:${identifierName} not exists`
120
120
  );
121
121
  } else {
@@ -123,7 +123,7 @@ export default async function deleteRelationship(
123
123
  typeof identifiersObject[identifierName] !== 'string' &&
124
124
  typeof identifiersObject[identifierName] !== 'number'
125
125
  ) {
126
- errorsFound.push(
126
+ foundErrors.push(
127
127
  `validateIdentifiers, ${objTypeString} property:${identifierName} should be string or number`
128
128
  );
129
129
  }
@@ -178,7 +178,7 @@ export default async function deleteRelationship(
178
178
  usedStorageResource.graphServerTag
179
179
  );
180
180
  if (!graphServiceTag) {
181
- errorsFound.push(
181
+ foundErrors.push(
182
182
  `storageResourceTag:${storageResourceTag} invalid, not found graph serviceTag from graphServerTag:${usedStorageResource.graphServerTag}`
183
183
  );
184
184
  }
@@ -202,14 +202,14 @@ export default async function deleteRelationship(
202
202
  );
203
203
 
204
204
  if (!targetStorageResources.length) {
205
- errorsFound.push(`Not found link from relationship schema`);
205
+ foundErrors.push(`Not found link from relationship schema`);
206
206
  }
207
207
  } else {
208
- errorsFound.push(`relationshipSchema not exists`);
208
+ foundErrors.push(`relationshipSchema not exists`);
209
209
  }
210
210
 
211
211
  // if found errors will stop processing
212
- if (errorsFound.length) {
212
+ if (foundErrors.length) {
213
213
  let deleteRelCompleteMsg = {
214
214
  firstObject: firstObject,
215
215
  secondObject: secondObject,
@@ -219,7 +219,7 @@ export default async function deleteRelationship(
219
219
  //(<inDeleteRelCompleteMsg>)
220
220
  //(</inDeleteRelCompleteMsg>)
221
221
  status: 'error',
222
- errorsFound: errorsFound,
222
+ foundErrors: foundErrors,
223
223
  parentFlowId
224
224
  };
225
225
 
@@ -444,7 +444,7 @@ export default async function deleteRelationship(
444
444
  relType,
445
445
  relationshipProperties,
446
446
  relationshipDirection,
447
- errorsFound
447
+ foundErrors
448
448
  };
449
449
  } catch (err) {
450
450
  _izContext.logger.error('error deleteRelationship: ', err);
@@ -20,7 +20,7 @@ let perRecordsValidatorSchema = {
20
20
  status: {
21
21
  type: 'string'
22
22
  },
23
- errorsFound: {
23
+ foundErrors: {
24
24
  type: 'array'
25
25
  },
26
26
  graphServiceTag: {
@@ -31,7 +31,7 @@ let perRecordsValidatorSchema = {
31
31
  'returnValue',
32
32
  'parentFlowId',
33
33
  'status',
34
- 'errorsFound',
34
+ 'foundErrors',
35
35
  'graphServiceTag'
36
36
  ]
37
37
  //(<validatorSchema>)
@@ -44,7 +44,7 @@ export default async function getRelationshipComplete(
44
44
  returnValue,
45
45
  parentFlowId,
46
46
  status,
47
- errorsFound,
47
+ foundErrors,
48
48
  graphServiceTag
49
49
  } = requestParams;
50
50
 
@@ -52,7 +52,7 @@ export default async function getRelationshipComplete(
52
52
  returnValue: returnValue,
53
53
  parentFlowId: parentFlowId,
54
54
  status: status,
55
- errorsFound: errorsFound,
55
+ foundErrors: foundErrors,
56
56
  graphServiceTag: graphServiceTag,
57
57
  passBackProperties: passBackProperties
58
58
  });
@@ -63,7 +63,7 @@ export default async function getRelationshipComplete(
63
63
  relType: returnValue.requestParams.relType,
64
64
  relationshipProperties: returnValue.requestParams.relationshipProperties,
65
65
  status: status,
66
- errorsFound: errorsFound
66
+ foundErrors: foundErrors
67
67
  };
68
68
 
69
69
  createCompleteMsg =
@@ -110,13 +110,13 @@ export default async function getRelationshipComplete(
110
110
  _izContext,
111
111
  awaitingStepId,
112
112
  pendingStepId,
113
- errorsFound
113
+ foundErrors
114
114
  );
115
115
 
116
116
  return {
117
117
  returnValue,
118
118
  status,
119
- errorsFound
119
+ foundErrors
120
120
  };
121
121
  } catch (err) {
122
122
  _izContext.logger.error('error GetRelationshipComplete:', err);
@@ -84,7 +84,7 @@ export default async function getRelationship(
84
84
  //(</requestParamGetRel>)
85
85
  } = requestParams;
86
86
 
87
- let errorsFound = [];
87
+ let foundErrors = [];
88
88
 
89
89
  //(<beforeValidateGetRel>)
90
90
  //(</beforeValidateGetRel>)
@@ -103,7 +103,7 @@ export default async function getRelationship(
103
103
  );
104
104
 
105
105
  if (!objectSchema) {
106
- errorsFound.push(
106
+ foundErrors.push(
107
107
  `validateIdentifiers, not found schema of ${objTypeString}`
108
108
  );
109
109
  }
@@ -114,7 +114,7 @@ export default async function getRelationship(
114
114
  ];
115
115
  for (const identifierName of identifierNames) {
116
116
  if (!identifiersObject.hasOwnProperty(identifierName)) {
117
- errorsFound.push(
117
+ foundErrors.push(
118
118
  `validateIdentifiers, ${objTypeString} ` +
119
119
  `property:${identifierName} not exists`
120
120
  );
@@ -123,7 +123,7 @@ export default async function getRelationship(
123
123
  typeof identifiersObject[identifierName] !== 'string' &&
124
124
  typeof identifiersObject[identifierName] !== 'number'
125
125
  ) {
126
- errorsFound.push(
126
+ foundErrors.push(
127
127
  `validateIdentifiers, ${objTypeString} ` +
128
128
  `property:${identifierName} should be string or number`
129
129
  );
@@ -227,7 +227,7 @@ export default async function getRelationship(
227
227
  usedStorageResource.graphServerTag
228
228
  );
229
229
  if (!graphServiceTag) {
230
- errorsFound.push(
230
+ foundErrors.push(
231
231
  `storageResourceTag: ${storageResourceTag} ` +
232
232
  `invalid, not found graph serviceTag from ` +
233
233
  `graphServerTag: ${usedStorageResource.graphServerTag}`
@@ -255,15 +255,15 @@ export default async function getRelationship(
255
255
  );
256
256
 
257
257
  if (!targetStorageResources.length) {
258
- errorsFound.push(`Not found link from relationship schema`);
258
+ foundErrors.push(`Not found link from relationship schema`);
259
259
  }
260
260
  }
261
261
  } else {
262
- errorsFound.push(`relationshipSchema not exists`);
262
+ foundErrors.push(`relationshipSchema not exists`);
263
263
  }
264
264
 
265
265
  // if found errors will stop processing
266
- if (errorsFound.length) {
266
+ if (foundErrors.length) {
267
267
  let getRelCompleteMsg = {
268
268
  firstObject: firstObject,
269
269
  secondObject: secondObject,
@@ -272,7 +272,7 @@ export default async function getRelationship(
272
272
  //(<inGetRelCompleteMsgCrateRel>)
273
273
  //(</inGetRelCompleteMsgCrateRel>)
274
274
  status: 'error',
275
- errorsFound: errorsFound
275
+ foundErrors: foundErrors
276
276
  };
277
277
 
278
278
  // if have callingFlow will send to message complete
@@ -20,7 +20,7 @@ let perRecordsValidatorSchema = {
20
20
  status: {
21
21
  type: 'string'
22
22
  },
23
- errorsFound: {
23
+ foundErrors: {
24
24
  type: 'array'
25
25
  },
26
26
  graphServiceTag: {
@@ -31,7 +31,7 @@ let perRecordsValidatorSchema = {
31
31
  'returnValue',
32
32
  'parentFlowId',
33
33
  'status',
34
- 'errorsFound',
34
+ 'foundErrors',
35
35
  'graphServiceTag'
36
36
  ]
37
37
  //(<validatorSchema>)