@izara_project/izara-core-generate-service-code 1.0.94 → 1.0.96

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.
@@ -53,10 +53,19 @@ export async function emitExtTopicStep({ flow, step, flowTag, stepName }) {
53
53
  };
54
54
  }
55
55
 
56
+ const flowSteps = flow?.flowSteps ?? [];
57
+ const isLastStep =
58
+ flowSteps.length > 1 &&
59
+ flowSteps[flowSteps.length - 1]?.stepName === step?.stepName;
60
+
56
61
  const artifacts = [
57
62
  {
58
63
  path: `${source}/${mainFileName}.js`,
59
- content: await renderStepMain(functionName, _startConfig(flow))
64
+ content: await renderStepMain(functionName, _startConfig(flow), {
65
+ flow,
66
+ flowTag: flow.flowTag,
67
+ isLastStep
68
+ })
60
69
  }
61
70
  ];
62
71
  const functions = [];
@@ -107,10 +116,19 @@ export async function emitDsqStep({ flow, step, flowTag, stepName }) {
107
116
  stepEvents = step.event;
108
117
  }
109
118
  const artifacts = [];
119
+ const flowSteps = flow?.flowSteps ?? [];
120
+ const isLastStep =
121
+ flowSteps.length > 1 &&
122
+ flowSteps[flowSteps.length - 1]?.stepName === step?.stepName;
123
+
110
124
  if (!stepEvents.includes('extTopic')) {
111
125
  artifacts.push({
112
126
  path: `${source}/${mainFileName}.js`,
113
- content: await renderStepMain(functionName, startConfig)
127
+ content: await renderStepMain(functionName, startConfig, {
128
+ flow,
129
+ flowTag: flow.flowTag,
130
+ isLastStep
131
+ })
114
132
  });
115
133
  }
116
134
  const functions = [];
@@ -157,7 +175,6 @@ export async function emitOwnTopicRoot(flow, objects) {
157
175
  upperCaseFlowTag: tag,
158
176
  startConfig: _startConfig(flow)
159
177
  };
160
- const isRbac = flowHasRbac(flow, objects);
161
178
  const ownArtifacts = [
162
179
  {
163
180
  path: `${source}/${mainFileName}.js`,
@@ -209,46 +226,6 @@ export async function emitOwnTopicRoot(flow, objects) {
209
226
  })
210
227
  ];
211
228
 
212
- if (isRbac) {
213
- const rbacStep = (flow.flowSteps || []).find(
214
- (s) =>
215
- typeof s?.stepName === 'string' &&
216
- s.stepName.toLowerCase() === 'rbaccallback'
217
- );
218
- const rbacConfig = rbacStep ? stepConfig(flow, rbacStep) : null;
219
- ownArtifacts.push(
220
- {
221
- path: `${source}/${tag}RbacCallback_Main.js`,
222
- content: await renderCustom('FlowEndpointRbacCallback_Main.ejs', {
223
- flowTag: flow.flowTag,
224
- upperCaseFlowTag: tag,
225
- functionName: `${tag}RbacCallbackMain`
226
- })
227
- },
228
- {
229
- path: `${source}/${tag}RbacCallback_HdrSqs.js`,
230
- content: await renderShared('FlowHandler_HdrSqs.ejs', {
231
- flowTag: flow.flowTag,
232
- flowStepName: 'RbacCallback',
233
- mainFileName: `${tag}RbacCallback_Main`,
234
- functionName: `${tag}RbacCallbackMain`,
235
- queueName: `${tag}RbacCallbackHdrSqs`,
236
- startConfig: rbacConfig
237
- })
238
- }
239
- );
240
- ownFunctions.push(
241
- renderSqsFunctionYaml({
242
- functionName: `${tag}RbacCallbackHdrSqs`,
243
- handlerPath: `${handlerRoot}/${tag}RbacCallback_HdrSqs.main`,
244
- roleName: customFlowRoleName(flow.flowTag),
245
- queueName: `${tag}RbacCallbackHdrSqs`,
246
- flowTag: flow.flowTag,
247
- flowStepName: 'RbacCallback'
248
- })
249
- );
250
- }
251
-
252
229
  return {
253
230
  artifacts: ownArtifacts,
254
231
  functions: ownFunctions
@@ -384,8 +361,19 @@ export function storedCacheTableName(flow, objects) {
384
361
  );
385
362
  }
386
363
 
387
- export async function renderStepMain(functionName, startConfig = null) {
388
- return renderCustom('FlowStep_Main.ejs', { functionName, startConfig });
364
+ export async function renderStepMain(
365
+ functionName,
366
+ startConfig = null,
367
+ options = {}
368
+ ) {
369
+ const { flow, flowTag, isLastStep } = options;
370
+ return renderCustom('FlowStep_Main.ejs', {
371
+ functionName,
372
+ startConfig,
373
+ flow,
374
+ flowTag: flowTag || flow?.flowTag,
375
+ isLastStep: Boolean(isLastStep)
376
+ });
389
377
  }
390
378
 
391
379
  export function renderMain(functionName) {
@@ -5,8 +5,7 @@ import {
5
5
  generatedDsqFlows,
6
6
  generatedOwnTopicFlows,
7
7
  supportedCustomFlows,
8
- upperFirst,
9
- flowHasRbac
8
+ upperFirst
10
9
  } from './customFlows.js';
11
10
  import {
12
11
  customFlowApplicationManagedPaths,
@@ -19,11 +18,9 @@ import {
19
18
  emitDsqStep,
20
19
  emitOwnTopicRoot,
21
20
  renderEndpointMain,
22
- stepConfig,
23
21
  _startConfig
24
22
  } from './customFlowSteps.js';
25
23
  import {
26
- renderCustom,
27
24
  renderShared,
28
25
  renderDsq
29
26
  } from './customFlowTemplates.js';
@@ -101,49 +98,6 @@ async function emitFlow(flow, objects) {
101
98
  }
102
99
  const functions = [];
103
100
 
104
- const isRbac = flowHasRbac(flow, objects);
105
- if (isRbac && !flow.event.includes('ownTopic')) {
106
- const rbacStep = (flow.flowSteps || []).find(
107
- (s) =>
108
- typeof s?.stepName === 'string' &&
109
- s.stepName.toLowerCase() === 'rbaccallback'
110
- );
111
- let rbacConfig = null;
112
- if (rbacStep) {
113
- rbacConfig = stepConfig(flow, rbacStep);
114
- }
115
- artifacts.push(
116
- {
117
- path: `${source}/${tag}RbacCallback_Main.js`,
118
- content: await renderCustom('FlowEndpointRbacCallback_Main.ejs', {
119
- flowTag: flow.flowTag,
120
- upperCaseFlowTag: tag,
121
- functionName: `${tag}RbacCallbackMain`
122
- })
123
- },
124
- {
125
- path: `${source}/${tag}RbacCallback_HdrSqs.js`,
126
- content: await renderShared('FlowHandler_HdrSqs.ejs', {
127
- flowTag: flow.flowTag,
128
- flowStepName: 'RbacCallback',
129
- mainFileName: `${tag}RbacCallback_Main`,
130
- functionName: `${tag}RbacCallbackMain`,
131
- queueName: `${tag}RbacCallbackHdrSqs`,
132
- startConfig: rbacConfig
133
- })
134
- }
135
- );
136
- functions.push(
137
- renderSqsFunctionYaml({
138
- functionName: `${tag}RbacCallbackHdrSqs`,
139
- handlerPath: `${handlerRoot}/${tag}RbacCallback_HdrSqs.main`,
140
- roleName: customFlowRoleName(flow.flowTag),
141
- queueName: `${tag}RbacCallbackHdrSqs`,
142
- flowTag: flow.flowTag,
143
- flowStepName: 'RbacCallback'
144
- })
145
- );
146
- }
147
101
 
148
102
  if (flow.event.includes('extTopic') && !flow.event.includes('ownTopic')) {
149
103
  artifacts.push({
@@ -26,6 +26,9 @@ import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
26
26
  <% if (typeof flow !== 'undefined' && flow.statusType === 'storedCache') { %>
27
27
  import storedCacheSharedLib from '@izara_project/izara-core-library-stored-cache';
28
28
  <% } %>
29
+ <% if (typeof flow !== 'undefined' && flow.statusType === 'statusField') { %>
30
+ import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
31
+ <% } %>
29
32
  <% if (typeof flow !== 'undefined' && flow.statusType === 'triggerCache') { %>
30
33
  import { triggeredCacheSharedLibV2 } from '@izara_project/izara-core-library-trigger-cache';
31
34
  <% } %>
@@ -69,13 +72,48 @@ export default async function <%- typeof functionName !== 'undefined' ? function
69
72
  //(</additionalParams>)
70
73
  ) {
71
74
  try {
72
- _izContext.logger.debug(`[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] _izContext:`, _izContext);
73
- _izContext.logger.debug(`[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] requestParams:`, requestParams);
74
- _izContext.logger.debug(
75
- `[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] callingFlowConfig:`,
75
+ _izContext.logger.debug('[<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] started', {
76
+ requestParams,
76
77
  callingFlowConfig
78
+ });
79
+
80
+ <% if (typeof flow !== 'undefined' && flow.statusType === 'statusField') { -%>
81
+
82
+ //(<beforeCheckedStatusField>)
83
+ //(</beforeCheckedStatusField>)
84
+
85
+ let [status, flowStatusFieldRecord] = await statusFieldSharedLib.checkStatusField(
86
+ _izContext,
87
+ {
88
+ flowTag: '<%= flowTag %>',
89
+ serviceTag: process.env.iz_serviceTag
90
+ },
91
+ {
92
+ //(<identifiers>)
93
+ //(</identifiers>)
94
+ },
95
+ //(<overwriteUniqueRequestId>)
96
+ //(</overwriteUniqueRequestId>)
97
+ );
98
+
99
+ _izContext.logger.debug(
100
+ `[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] checkStatusField result:`,
101
+ { status, flowStatusFieldRecord }
77
102
  );
78
103
 
104
+ //(<afterCheckStatusField>)
105
+ //(</afterCheckStatusField>)
106
+
107
+ if (status !== 'process') {
108
+ if (status === 'error' || status === 'complete') {
109
+ //(<afterValidateStatusField>)
110
+ //(</afterValidateStatusField>)
111
+ }
112
+
113
+ //(<checkStatusFieldHook>)
114
+ //(</checkStatusFieldHook>)
115
+ }
116
+ <% } -%>
79
117
  <% if (typeof flow !== 'undefined' && flow.statusType === 'triggerCache') { -%>
80
118
 
81
119
  //(<beforeCheckTriggeredCache>)
@@ -182,7 +220,7 @@ export default async function <%- typeof functionName !== 'undefined' ? function
182
220
  }
183
221
  }
184
222
  <% } -%>
185
- <% if (typeof flow !== 'undefined' && flow.isRbac && !flow.generatedCodeConfig) { -%>
223
+ <% if (typeof flow !== 'undefined' && flow.isRbac && !flow.generatedCodeConfig && flow.initiateBy !== 'systemNoUser') { -%>
186
224
 
187
225
  const { checkRbacPermission } =
188
226
  await import('@izara_project/izara-authorization');
@@ -200,7 +238,7 @@ export default async function <%- typeof functionName !== 'undefined' ? function
200
238
  serviceTag: '<%- (typeof rbacServiceTag !== "undefined" && rbacServiceTag) ? rbacServiceTag : ((flow.objType?.belongTo ? (Array.isArray(flow.objType.belongTo) ? flow.objType.belongTo[0]?.serviceTag : flow.objType.belongTo?.serviceTag) : null) || flow.serviceTag || (flow.objType ? flow.objType.serviceTag : "")) %>'
201
239
  },
202
240
  requestParams: typeof requestParams !== 'undefined' ? requestParams : {},
203
- nextFlowStepName: '<%- upperCaseFlowTag %>RbacCallback'
241
+ sync: true
204
242
  }
205
243
  );
206
244
 
@@ -217,6 +255,30 @@ export default async function <%- typeof functionName !== 'undefined' ? function
217
255
 
218
256
  //(<endpointHook>)
219
257
  //(</endpointHook>)
258
+ <% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && (!flow.flowSteps || flow.flowSteps.length <= 1)) { -%>
259
+
260
+ //(<beforeCompleteStatusField>)
261
+ //(</beforeCompleteStatusField>)
262
+
263
+ await statusFieldSharedLib.completeStatusField(
264
+ _izContext,
265
+ {
266
+ flowTag: '<%= flowTag %>',
267
+ serviceTag: process.env.iz_serviceTag
268
+ },
269
+ {
270
+ //(<identifiers>)
271
+ //(</identifiers>)
272
+ },
273
+ //(<statusField>)
274
+ //(</statusField>)
275
+ //(<errorFounds>)
276
+ //(</errorFounds>)
277
+ );
278
+
279
+ //(<afterCompleteStatusField>)
280
+ //(</afterCompleteStatusField>)
281
+ <% } -%>
220
282
  <% } -%>
221
283
 
222
284
  } catch (err) {
@@ -16,6 +16,9 @@ along with this program. If not, see
16
16
  <http: //www.gnu.org/licenses />.
17
17
  */
18
18
  import { identifierUuid } from '@izara_project/izara-shared-core';
19
+ <% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && typeof isLastStep !== 'undefined' && isLastStep) { %>
20
+ import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
21
+ <% } %>
19
22
 
20
23
  //(<optionalRequire>)
21
24
  //(</optionalRequire>)
@@ -51,6 +54,30 @@ export default async function <%= functionName %>(
51
54
 
52
55
  //(<hookCode>)
53
56
  //(</hookCode>)
57
+ <% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && typeof isLastStep !== 'undefined' && isLastStep) { -%>
58
+
59
+ //(<beforeCompleteStatusField>)
60
+ //(</beforeCompleteStatusField>)
61
+
62
+ await statusFieldSharedLib.completeStatusField(
63
+ _izContext,
64
+ {
65
+ flowTag: '<%= flowTag %>',
66
+ serviceTag: process.env.iz_serviceTag
67
+ },
68
+ {
69
+ //(<identifiers>)
70
+ //(</identifiers>)
71
+ },
72
+ //(<statusField>)
73
+ //(</statusField>)
74
+ //(<errorFounds>)
75
+ //(</errorFounds>)
76
+ );
77
+
78
+ //(<afterCompleteStatusField>)
79
+ //(</afterCompleteStatusField>)
80
+ <% } -%>
54
81
  } catch (err) {
55
82
  _izContext.logger.error(`[${process.env.iz_serviceTag}:<%= functionName %>] error:`, err);
56
83
  throw err;
@@ -84,15 +84,15 @@ export default async function <%- functionName %>(
84
84
  firstObject,
85
85
  secondObject,
86
86
  oldRelTypeAndDirection,
87
- newRelType
88
- //(<requestParamCreateRel>)
89
- //(</requestParamCreateRel>)
87
+ newRelType,
88
+ //(<requestParamChangeRel>)
89
+ //(</requestParamChangeRel>)
90
90
  } = requestParams;
91
91
 
92
92
  let foundErrors = [];
93
93
  const parentFlowId = identifierUuid();
94
94
  //(<beforeValidateChangeRel>)
95
- //(</beforeValidateChangeRel>).
95
+ //(</beforeValidateChangeRel>)
96
96
  // validate object and identifiers
97
97
  async function validateIdentifiersExists(
98
98
  _izContext,
@@ -443,7 +443,7 @@ export default async function <%- functionName %>(
443
443
  newRelType,
444
444
  originTimestamp,
445
445
  changedByUserId,
446
- parentFlowId
446
+ parentFlowId,
447
447
  //(<messageBodyChangeRel>)
448
448
  //(</messageBodyChangeRel>)
449
449
 
@@ -461,15 +461,15 @@ export default async function <%- functionName %>(
461
461
  callingFlowConfig, // receive parent callingFlowConfig.
462
462
  callingFlowSharedLib.createCallingFlowConfig(
463
463
  // calling flow own service
464
- //(<callingFlowProperties>)
465
464
  await lambdaSharedLib.lambdaFunctionName(
466
465
  _izContext,
467
466
  TOPIC_NAME_GENERATE_CODE.changeRelationshipComplete
468
467
  ),
469
- //(</callingFlowProperties>)
468
+ //(<callingFlowProperties>)
470
469
  {
471
470
  graphServiceTag: storageResource.graphServiceTag
472
471
  }
472
+ //(</callingFlowProperties>)
473
473
  )
474
474
  )
475
475
  );
@@ -83,7 +83,7 @@ export default async function createRelationship(
83
83
  relationshipDirection,
84
84
  relationshipProperties,
85
85
  deepPathConditional,
86
- settings = {}
86
+ settings = {},
87
87
  //(<requestParamCreateRel>)
88
88
  //(</requestParamCreateRel>)
89
89
  } = requestParams;
@@ -93,7 +93,7 @@ export default async function createRelationship(
93
93
  let foundErrors = [];
94
94
  const parentFlowId = identifierUuid();
95
95
  //(<beforeValidateCreateRel>)
96
- //(</beforeValidateCreateRel>).
96
+ //(</beforeValidateCreateRel>)
97
97
  // validate object and identifiers
98
98
  async function validateIdentifiersExists(
99
99
  _izContext,
@@ -465,7 +465,7 @@ export default async function createRelationship(
465
465
  relationshipProperties,
466
466
  deepPathConditional: deepPathConditional || [],
467
467
  parentFlowId,
468
- settings: { createOnConditionalFail: createOnConditionalFail }
468
+ settings: { createOnConditionalFail: createOnConditionalFail },
469
469
  //(<inCreateRelMessageBodyCreateRel>)
470
470
  //(</inCreateRelMessageBodyCreateRel>)
471
471
 
@@ -483,15 +483,15 @@ export default async function createRelationship(
483
483
  callingFlowConfig, // receive parent callingFlowConfig.
484
484
  callingFlowSharedLib.createCallingFlowConfig(
485
485
  // calling flow own service
486
- //(<callingFlowProperties>)
487
486
  await lambdaSharedLib.lambdaFunctionName(
488
487
  _izContext,
489
488
  TOPIC_NAME_GENERATE_CODE.createRelComplete
490
489
  ),
491
- //(</callingFlowProperties>)
490
+ //(<callingFlowProperties>)
492
491
  {
493
492
  graphServiceTag: storageResource.graphServiceTag
494
493
  }
494
+ //(</callingFlowProperties>)
495
495
  )
496
496
  )
497
497
  );
@@ -81,7 +81,7 @@ export default async function deleteRelationship(
81
81
  secondObject,
82
82
  relType,
83
83
  relId,
84
- relationshipDirection
84
+ relationshipDirection,
85
85
  //(<requestParamDeleteRel>)
86
86
  //(</requestParamDeleteRel>)
87
87
  } = requestParams;
@@ -346,7 +346,7 @@ export default async function deleteRelationship(
346
346
  relType: relType,
347
347
  relId: relId,
348
348
  relationshipDirection: relationshipDirection,
349
- parentFlowId: parentFlowId
349
+ parentFlowId: parentFlowId,
350
350
  //(<inDeleteRelMessageBody>)
351
351
  //(</inDeleteRelMessageBody>)
352
352
  };
@@ -362,11 +362,11 @@ export default async function deleteRelationship(
362
362
  callingFlowConfig, // receive parent callingFlowConfig.
363
363
  callingFlowSharedLib.createCallingFlowConfig(
364
364
  // calling flow own service
365
- //(<callingFlowProperties>)
366
365
  await lambdaSharedLib.lambdaFunctionName(
367
366
  _izContext,
368
367
  TOPIC_NAME_GENERATE_CODE.deleteRelComplete
369
368
  ),
369
+ //(<callingFlowProperties>)
370
370
  {}
371
371
  //(</callingFlowProperties>)
372
372
  )
@@ -79,7 +79,7 @@ export default async function getRelationship(
79
79
  secondObject,
80
80
  relType,
81
81
  relId,
82
- relationshipDirection
82
+ relationshipDirection,
83
83
  //(<requestParamGetRel>)
84
84
  //(</requestParamGetRel>)
85
85
  } = requestParams;
@@ -87,7 +87,7 @@ export default async function moveRelationship(
87
87
  relType,
88
88
  relationshipDirection,
89
89
  relationshipProperties,
90
- moveObject
90
+ moveObject,
91
91
  //(<requestParamMoveRel>)
92
92
  //(</requestParamMoveRel>)
93
93
  } = requestParams;
@@ -96,7 +96,7 @@ export default async function moveRelationship(
96
96
  let foundErrors = [];
97
97
 
98
98
  //(<beforeValidateMoveRel>)
99
- //(</beforeValidateMoveRel>).
99
+ //(</beforeValidateMoveRel>)
100
100
  // validate object and identifiers
101
101
  async function validateIdentifiersExists(
102
102
  _izContext,
@@ -428,7 +428,7 @@ export default async function moveRelationship(
428
428
  relationshipDirection,
429
429
  relationshipProperties,
430
430
  moveObject,
431
- parentFlowId: parentFlowId
431
+ parentFlowId: parentFlowId,
432
432
  //(<messageBodyMoveRel>)
433
433
  //(</messageBodyMoveRel>)
434
434
 
@@ -446,15 +446,15 @@ export default async function moveRelationship(
446
446
  callingFlowConfig, // receive parent callingFlowConfig.
447
447
  callingFlowSharedLib.createCallingFlowConfig(
448
448
  // calling flow own service
449
- //(<callingFlowProperties>)
450
449
  await lambdaSharedLib.lambdaFunctionName(
451
450
  _izContext,
452
451
  TOPIC_NAME_GENERATE_CODE.moveRelationshipComplete
453
452
  ),
454
- //(</callingFlowProperties>)
453
+ //(<callingFlowProperties>)
455
454
  {
456
455
  graphServiceTag: storageResource.graphServiceTag
457
456
  }
457
+ //(</callingFlowProperties>)
458
458
  )
459
459
  )
460
460
  );
@@ -83,7 +83,7 @@ export default async function updateRelationship(
83
83
  relType,
84
84
  relId,
85
85
  relationshipProperties,
86
- relationshipDirection
86
+ relationshipDirection,
87
87
  //(<requestParamUpdateRel>)
88
88
  //(</requestParamUpdateRel>)
89
89
  } = requestParams;
@@ -292,7 +292,7 @@ export default async function updateRelationship(
292
292
  relationshipDirection,
293
293
  status: 'error',
294
294
  foundErrors: foundErrors,
295
- parentFlowId: parentFlowId
295
+ parentFlowId: parentFlowId,
296
296
  //(<inUpdateCompleteMsgUpdateRel>)
297
297
  //(</inUpdateCompleteMsgUpdateRel>)
298
298
  };
@@ -422,7 +422,7 @@ export default async function updateRelationship(
422
422
  relType: relType,
423
423
  relationshipProperties,
424
424
  relationshipDirection,
425
- parentFlowId
425
+ parentFlowId,
426
426
  //(<inUpdateRelMessageBodyUpdateRel>)
427
427
  //(</inUpdateRelMessageBodyUpdateRel>)
428
428
  };
@@ -438,15 +438,15 @@ export default async function updateRelationship(
438
438
  callingFlowConfig, // receive parent callingFlowConfig.
439
439
  callingFlowSharedLib.createCallingFlowConfig(
440
440
  // callingFlow own service
441
- //(<callingFlowProperties>)
442
441
  await lambdaSharedLib.lambdaFunctionName(
443
442
  _izContext,
444
443
  TOPIC_NAME_GENERATE_CODE.updateRelComplete
445
444
  ),
446
- //(</callingFlowProperties>)
445
+ //(<callingFlowProperties>)
447
446
  {
448
447
  graphServiceTag: storageResource.graphServiceTag
449
448
  }
449
+ //(</callingFlowProperties>)
450
450
  )
451
451
  )
452
452
  );
@@ -3,8 +3,7 @@ import { CRUD_ACTIONS } from '../crud/crudActionPlan.js';
3
3
  import {
4
4
  customFlowRoleName,
5
5
  flowDsqSteps,
6
- flowExtTopicSteps,
7
- flowHasRbac
6
+ flowExtTopicSteps
8
7
  } from '../custom/customFlows.js';
9
8
  import {
10
9
  RELATIONSHIP_ACTIONS,
@@ -338,9 +337,6 @@ export function roleQueueNames(state, roleName) {
338
337
  if (includesEvent(flow, 'dsq')) {
339
338
  queueList.push(`${tag}HdrDsq`);
340
339
  }
341
- if (flowHasRbac(flow, state.objects)) {
342
- queueList.push(`${tag}RbacCallbackHdrSqs`);
343
- }
344
340
  queueList.push(
345
341
  ...flowExtTopicSteps([flow]).map(
346
342
  ({ flowTag, stepName }) => `${flowTag}${stepName}HdrSqs`
@@ -4,8 +4,7 @@ import {
4
4
  flowExtTopicSteps,
5
5
  generatedDsqFlows,
6
6
  generatedOwnTopicFlows,
7
- supportedCustomFlows,
8
- flowHasRbac
7
+ supportedCustomFlows
9
8
  } from '../custom/customFlows.js';
10
9
  import { hasSystemWebSocket } from '../system/emitSystemWebSocketArtifacts.js';
11
10
  import { rbacFlowTag } from '../rbac/rbacFlowTag.js';
@@ -146,7 +145,7 @@ export function createResourceState({ objects, relationships, flows }) {
146
145
  const customSqsQueues = [
147
146
  ...flows
148
147
  .filter((flow) => includesEvent(flow, 'extTopic'))
149
- .map((flow) => `Process${upperFirst(flow.flowTag)}HdrSqs`),
148
+ .map((flow) => `${upperFirst(flow.flowTag)}HdrSqs`),
150
149
  ...flows
151
150
  .filter(
152
151
  (flow) =>
@@ -159,12 +158,7 @@ export function createResourceState({ objects, relationships, flows }) {
159
158
  for (const { flowTag, stepName } of flowExtTopicSteps(flows)) {
160
159
  customSqsQueues.push(`${flowTag}${stepName}HdrSqs`);
161
160
  }
162
- for (const flow of flows) {
163
- if (flowHasRbac(flow, objects)) {
164
- const tag = upperFirst(flow.flowTag);
165
- customSqsQueues.push(`${tag}RbacCallbackHdrSqs`);
166
- }
167
- }
161
+
168
162
  for (const flow of flows.filter((flow) => includesEvent(flow, 's3'))) {
169
163
  const tag = upperFirst(flow.flowTag);
170
164
  customSqsQueues.push(`${tag}CreatePreSignUrlHdrSqs`);