@masterteam/workflow 0.0.30 → 0.0.32

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 CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "name": "@masterteam/workflow",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/workflow",
6
6
  "linkDirectory": false,
7
7
  "access": "public"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": "^21.0.3",
11
- "@angular/core": "^21.0.3",
12
- "@angular/forms": "^21.0.3",
13
- "@primeuix/themes": "^2.0.2",
14
- "@tailwindcss/postcss": "^4.1.17",
15
- "@jsverse/transloco": "^8.0.2",
16
- "postcss": "^8.5.6",
17
- "primeng": "21.0.1",
10
+ "@angular/common": "^21.2.8",
11
+ "@angular/core": "^21.2.8",
12
+ "@angular/forms": "^21.2.8",
13
+ "@primeuix/themes": "^2.0.3",
14
+ "@tailwindcss/postcss": "^4.2.2",
15
+ "@jsverse/transloco": "^8.3.0",
16
+ "postcss": "^8.5.9",
17
+ "primeng": "21.1.5",
18
18
  "rxjs": "^7.8.2",
19
- "tailwindcss": "^4.1.17",
19
+ "tailwindcss": "^4.2.2",
20
20
  "tailwindcss-primeui": "^0.6.1",
21
21
  "@ngxs/store": "^20.1.0",
22
- "@masterteam/structure-builder": "^0.0.41",
23
- "@masterteam/components": "^0.0.125",
24
- "@masterteam/form-builder": "^0.0.18",
25
- "@masterteam/forms": "^0.0.60",
26
- "@masterteam/notification": "^0.0.17",
27
- "@masterteam/icons": "^0.0.14"
22
+ "@masterteam/structure-builder": "^0.0.47",
23
+ "@masterteam/components": "^0.0.148",
24
+ "@masterteam/forms": "^0.0.68",
25
+ "@masterteam/notification": "^0.0.20",
26
+ "@masterteam/icons": "^0.0.14",
27
+ "@masterteam/form-builder": "^0.0.25"
28
28
  },
29
29
  "sideEffects": false,
30
30
  "exports": {
@@ -44,6 +44,7 @@
44
44
  },
45
45
  "module": "fesm2022/masterteam-workflow.mjs",
46
46
  "typings": "types/masterteam-workflow.d.ts",
47
+ "type": "module",
47
48
  "dependencies": {
48
49
  "tslib": "^2.8.1"
49
50
  }
@@ -2,11 +2,10 @@ import * as _masterteam_formula_builder from '@masterteam/formula-builder';
2
2
  import { FormulaBuilderValue } from '@masterteam/formula-builder';
3
3
  import * as _masterteam_workflow from '@masterteam/workflow';
4
4
  import * as _angular_core from '@angular/core';
5
+ import { FormGroup, FormControl } from '@angular/forms';
5
6
  import { DynamicFormConfig } from '@masterteam/components';
6
- import { NodeDialogFooterConfig, SBAction } from '@masterteam/structure-builder';
7
- import { ColumnDef, CellChangeEvent } from '@masterteam/components/table';
8
- import { FormControl } from '@angular/forms';
9
7
  import { ModalService } from '@masterteam/components/modal';
8
+ import { NodeDialogFooterConfig, SBAction } from '@masterteam/structure-builder';
10
9
  import { HttpContextToken } from '@angular/common/http';
11
10
  import * as rxjs from 'rxjs';
12
11
  import { Observable } from 'rxjs';
@@ -17,13 +16,53 @@ interface LoadingStateShape<L extends string = string> {
17
16
  errors: Partial<Record<L, string>>;
18
17
  }
19
18
 
19
+ type WorkflowStepType = 'UserInput' | 'AppAction';
20
+ type WorkflowAppActionFailureBehavior = 'Stop' | 'Continue' | string;
21
+ type WorkflowAppActionConfigPropertyType = 'string' | 'number' | 'boolean' | 'array' | 'object';
22
+ interface WorkflowAppAction {
23
+ appCode: string;
24
+ actionKey: string;
25
+ configJson: string;
26
+ failureBehavior: WorkflowAppActionFailureBehavior;
27
+ timeoutSeconds: number;
28
+ displayName?: string | null;
29
+ description?: string | null;
30
+ configSchemaJson?: string | null;
31
+ requiredContextKeys?: string[];
32
+ supportedScopes?: string[];
33
+ }
34
+ interface WorkflowAppActionDescriptor {
35
+ appCode: string;
36
+ actionKey: string;
37
+ displayName: string;
38
+ description?: string | null;
39
+ configSchemaJson?: string | null;
40
+ requiredContextKeys?: string[];
41
+ supportedScopes?: string[];
42
+ }
43
+ interface WorkflowAppActionConfigPropertySchema {
44
+ key: string;
45
+ title: string;
46
+ description?: string | null;
47
+ type: WorkflowAppActionConfigPropertyType;
48
+ required: boolean;
49
+ enumValues?: Array<string | number | boolean>;
50
+ rawSchema: Record<string, unknown>;
51
+ }
52
+ interface WorkflowAppActionConfigSchema {
53
+ type: 'object';
54
+ properties: WorkflowAppActionConfigPropertySchema[];
55
+ required: string[];
56
+ }
20
57
  interface WorkflowStepSchema {
21
58
  id: number;
22
59
  name: string | Record<string, string>;
23
60
  sla: number;
24
61
  isInitial: boolean;
62
+ type: WorkflowStepType;
25
63
  targetType?: string;
26
64
  targetValue?: string;
65
+ appAction?: WorkflowAppAction | null;
27
66
  loading?: boolean;
28
67
  }
29
68
  interface WorkflowConnection {
@@ -119,11 +158,13 @@ interface StepSchema {
119
158
  name: Record<string, string>;
120
159
  sla: number;
121
160
  isInitial: boolean;
161
+ type: WorkflowStepType;
122
162
  targetType?: string;
123
163
  targetValue?: string;
124
164
  properties: StepPropertyItem[];
125
165
  hasNotification: boolean;
126
166
  hasForm?: boolean;
167
+ appAction?: WorkflowAppAction | null;
127
168
  }
128
169
  interface StepPropertyPayload {
129
170
  PropertyId: number;
@@ -131,21 +172,30 @@ interface StepPropertyPayload {
131
172
  isWrite?: boolean;
132
173
  }
133
174
  interface StepPayload {
175
+ type: WorkflowStepType;
134
176
  name: Record<string, string>;
135
177
  targetType?: string;
136
178
  targetValue?: number | string;
137
179
  sla: string | number;
138
180
  properties: StepPropertyPayload[];
139
181
  hasForm?: boolean;
182
+ hasNotification?: boolean;
183
+ appCode?: string;
184
+ actionKey?: string;
185
+ configJson?: string;
186
+ failureBehavior?: WorkflowAppActionFailureBehavior;
187
+ timeoutSeconds?: number;
140
188
  }
141
189
  interface StepResponse {
142
190
  id: number;
143
191
  name: string;
144
192
  sla: number;
145
193
  isInitial: boolean;
194
+ type: WorkflowStepType;
146
195
  targetType?: string;
147
196
  targetValue?: string;
148
197
  properties: any[];
198
+ appAction?: WorkflowAppAction | null;
149
199
  }
150
200
  interface ConnectionPayload {
151
201
  sourceStepId: number | string;
@@ -171,7 +221,7 @@ interface PublishResponse {
171
221
  isValid: boolean;
172
222
  isPublished: boolean;
173
223
  }
174
- type WorkflowLoadingName = 'getWorkflows' | 'getWorkflow' | 'getFormulaProperties' | 'getGroups' | 'getRolesForModule' | 'getStep' | 'validateFlow' | 'createStep' | 'updateStep' | 'createConnection' | 'updateConnection' | 'publishWorkflow' | 'deleteStep' | 'deleteConnection';
224
+ type WorkflowLoadingName = 'getWorkflows' | 'getWorkflow' | 'getFormulaProperties' | 'getGroups' | 'getRolesForModule' | 'getAppActions' | 'getAppActionDetail' | 'getStep' | 'validateFlow' | 'createStep' | 'updateStep' | 'createConnection' | 'updateConnection' | 'publishWorkflow' | 'deleteStep' | 'deleteConnection';
175
225
  interface WorkflowStateModel extends LoadingStateShape<WorkflowLoadingName> {
176
226
  workflowId: string | number | null;
177
227
  parentModuleType?: string | null;
@@ -184,6 +234,8 @@ interface WorkflowStateModel extends LoadingStateShape<WorkflowLoadingName> {
184
234
  formulaProperties: FormulaProperty[];
185
235
  groups: GroupDefinition[];
186
236
  roles: Array<RoleDefinition | RoleGroupDefinition>;
237
+ appActionDescriptors: WorkflowAppActionDescriptor[];
238
+ selectedAppActionDescriptor: WorkflowAppActionDescriptor | null;
187
239
  selectedStep: StepSchema | null;
188
240
  isFlowValid: boolean | null;
189
241
  }
@@ -214,6 +266,14 @@ declare class GetGroups {
214
266
  declare class GetRolesForModule {
215
267
  static readonly type = "[Workflow] Get Roles For Module";
216
268
  }
269
+ declare class GetAppActions {
270
+ static readonly type = "[Workflow] Get App Actions";
271
+ }
272
+ declare class GetAppActionDetail {
273
+ readonly actionKey: string;
274
+ static readonly type = "[Workflow] Get App Action Detail";
275
+ constructor(actionKey: string);
276
+ }
217
277
  declare class GetStep {
218
278
  readonly stepId: string | number;
219
279
  static readonly type = "[Workflow] Get Step";
@@ -271,6 +331,8 @@ declare class WorkflowFacade {
271
331
  readonly formulaProperties: _angular_core.Signal<FormulaProperty[]>;
272
332
  readonly groups: _angular_core.Signal<GroupDefinition[]>;
273
333
  readonly roles: _angular_core.Signal<(RoleDefinition | RoleGroupDefinition)[]>;
334
+ readonly appActionDescriptors: _angular_core.Signal<WorkflowAppActionDescriptor[]>;
335
+ readonly selectedAppActionDescriptor: _angular_core.Signal<WorkflowAppActionDescriptor | null>;
274
336
  readonly selectedStep: _angular_core.Signal<StepSchema | null>;
275
337
  readonly isFlowValid: _angular_core.Signal<boolean | null>;
276
338
  readonly steps: _angular_core.Signal<WorkflowStepSchema[]>;
@@ -284,6 +346,8 @@ declare class WorkflowFacade {
284
346
  loadFormulaProperties(): Observable<unknown>;
285
347
  loadGroups(): Observable<unknown>;
286
348
  loadRolesForModule(): Observable<unknown>;
349
+ loadAppActions(): Observable<unknown>;
350
+ loadAppActionDetail(actionKey: string): Observable<unknown>;
287
351
  loadStep(stepId: string | number): Observable<unknown>;
288
352
  validateFlow(): Observable<unknown>;
289
353
  createStep(payload: StepPayload): Observable<unknown>;
@@ -313,6 +377,7 @@ declare class WorkflowState {
313
377
  private readonly baseUrl;
314
378
  private readonly groupsUrl;
315
379
  private readonly rolesUrl;
380
+ private readonly workflowAppActionsUrl;
316
381
  static workflowId(state: WorkflowStateModel): string | number | null;
317
382
  static moduleType(state: WorkflowStateModel): string | null;
318
383
  static moduleId(state: WorkflowStateModel): string | number | null;
@@ -321,6 +386,8 @@ declare class WorkflowState {
321
386
  static formulaProperties(state: WorkflowStateModel): FormulaProperty[];
322
387
  static groups(state: WorkflowStateModel): GroupDefinition[];
323
388
  static roles(state: WorkflowStateModel): Array<RoleDefinition | RoleGroupDefinition>;
389
+ static appActionDescriptors(state: WorkflowStateModel): WorkflowAppActionDescriptor[];
390
+ static selectedAppActionDescriptor(state: WorkflowStateModel): WorkflowAppActionDescriptor | null;
324
391
  static selectedStep(state: WorkflowStateModel): StepSchema | null;
325
392
  static isFlowValid(state: WorkflowStateModel): boolean | null;
326
393
  static stepsSchema(state: WorkflowStateModel): WorkflowStepSchema[];
@@ -330,9 +397,11 @@ declare class WorkflowState {
330
397
  setModuleInfo(ctx: StateContext<WorkflowStateModel>, action: SetModuleInfo): void;
331
398
  getWorkflows(ctx: StateContext<WorkflowStateModel>, _action: GetWorkflows): rxjs.Observable<Response<WorkflowListItem[]> | null>;
332
399
  getWorkflow(ctx: StateContext<WorkflowStateModel>, action: GetWorkflow): rxjs.Observable<Response<WorkflowSchema> | null>;
333
- getFormulaProperties(ctx: StateContext<WorkflowStateModel>, _action: GetFormulaProperties): rxjs.Observable<null> | rxjs.Observable<never[] | Response<FormulaProperty[]>>;
400
+ getFormulaProperties(ctx: StateContext<WorkflowStateModel>, _action: GetFormulaProperties): rxjs.Observable<null> | rxjs.Observable<Response<FormulaProperty[]> | never[]>;
334
401
  getGroups(ctx: StateContext<WorkflowStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<never[] | Response<GroupDefinition[]>>;
335
402
  getRolesForModule(ctx: StateContext<WorkflowStateModel>, _action: GetRolesForModule): rxjs.Observable<never[] | Response<unknown[]>>;
403
+ getAppActions(ctx: StateContext<WorkflowStateModel>, _action: GetAppActions): rxjs.Observable<WorkflowAppActionDescriptor[]> | rxjs.Observable<never[] | Response<unknown>>;
404
+ getAppActionDetail(ctx: StateContext<WorkflowStateModel>, action: GetAppActionDetail): rxjs.Observable<WorkflowAppActionDescriptor> | rxjs.Observable<Response<unknown> | null>;
336
405
  getStep(ctx: StateContext<WorkflowStateModel>, action: GetStep): rxjs.Observable<Response<StepSchema> | null>;
337
406
  validateFlow(ctx: StateContext<WorkflowStateModel>, _action: ValidateFlow): rxjs.Observable<Response<boolean> | null>;
338
407
  createStep(ctx: StateContext<WorkflowStateModel>, action: CreateStep): rxjs.Observable<Response<StepResponse> | null>;
@@ -346,48 +415,118 @@ declare class WorkflowState {
346
415
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<WorkflowState>;
347
416
  }
348
417
 
418
+ type WorkflowAppActionConfigFieldKind = 'text' | 'number' | 'toggle' | 'select' | 'json';
419
+ interface WorkflowAppActionConfigField {
420
+ key: string;
421
+ title: string;
422
+ description?: string | null;
423
+ type: WorkflowAppActionConfigPropertyType;
424
+ kind: WorkflowAppActionConfigFieldKind;
425
+ required: boolean;
426
+ enumValues?: Array<string | number | boolean>;
427
+ jsonValueType?: 'array' | 'object';
428
+ }
429
+ interface WorkflowAppActionConfigEditorDefinition {
430
+ mode: 'schema' | 'raw';
431
+ schema: WorkflowAppActionConfigSchema | null;
432
+ fields: WorkflowAppActionConfigField[];
433
+ errors: string[];
434
+ }
435
+
349
436
  declare class WorkflowBuilder {
350
- private workflowFacade;
351
- private notificationFacade;
352
- private formBuilderFacade;
353
- private transloco;
437
+ private readonly workflowFacade;
438
+ private readonly notificationFacade;
439
+ private readonly formBuilderFacade;
440
+ private readonly transloco;
441
+ private readonly confirmationService;
354
442
  readonly modal: ModalService;
355
- mainTab: _angular_core.WritableSignal<string>;
356
- mainTabsList: {
443
+ private isPatchingStepForm;
444
+ private lastAppActionDescriptorSignature;
445
+ readonly mainTab: _angular_core.WritableSignal<"workflow" | "notification">;
446
+ readonly selectedTab: _angular_core.WritableSignal<"tab1" | "tab2" | "tab3">;
447
+ readonly isPublished: _angular_core.WritableSignal<boolean>;
448
+ readonly isEditingInitialNode: _angular_core.WritableSignal<boolean>;
449
+ readonly isCreatingStep: _angular_core.WritableSignal<boolean>;
450
+ readonly currentStepType: _angular_core.WritableSignal<WorkflowStepType>;
451
+ readonly draftAppActionDescriptor: _angular_core.WritableSignal<WorkflowAppActionDescriptor | null>;
452
+ readonly nodeFields: _angular_core.WritableSignal<{
453
+ name: string;
454
+ }>;
455
+ readonly workflow: _angular_core.Signal<_masterteam_workflow.WorkflowSchema | null>;
456
+ readonly workflows: _angular_core.Signal<_masterteam_workflow.WorkflowListItem[]>;
457
+ readonly selectedStep: _angular_core.Signal<StepSchema | null>;
458
+ readonly groups: _angular_core.Signal<_masterteam_workflow.GroupDefinition[]>;
459
+ readonly roles: _angular_core.Signal<(_masterteam_workflow.RoleDefinition | _masterteam_workflow.RoleGroupDefinition)[]>;
460
+ readonly appActionDescriptors: _angular_core.Signal<WorkflowAppActionDescriptor[]>;
461
+ readonly selectedAppActionDescriptor: _angular_core.Signal<WorkflowAppActionDescriptor | null>;
462
+ readonly isFlowValid: _angular_core.Signal<boolean | null>;
463
+ readonly loading: _angular_core.Signal<boolean>;
464
+ readonly loadingStep: _angular_core.Signal<boolean>;
465
+ readonly loadingAppActions: _angular_core.Signal<boolean>;
466
+ readonly loadingAppActionDetail: _angular_core.Signal<boolean>;
467
+ readonly appActionListError: _angular_core.Signal<string | null>;
468
+ readonly appActionDetailError: _angular_core.Signal<string | null>;
469
+ readonly selectedWorkflowId: _angular_core.Signal<number | undefined>;
470
+ readonly connectionFormulaSchemaId: _angular_core.Signal<number | undefined>;
471
+ readonly hasMultipleWorkflows: _angular_core.Signal<boolean>;
472
+ readonly isPublishDisabled: _angular_core.Signal<boolean>;
473
+ readonly hasGroupedRoles: _angular_core.Signal<boolean>;
474
+ readonly stepForm: FormGroup<{
475
+ nameEn: FormControl<string>;
476
+ nameAr: FormControl<string>;
477
+ type: FormControl<WorkflowStepType>;
478
+ targetType: FormControl<string>;
479
+ group: FormControl<number | null>;
480
+ role: FormControl<string | number | null>;
481
+ sla: FormControl<number>;
482
+ }>;
483
+ readonly appActionSettingsForm: FormGroup<{
484
+ actionKey: FormControl<string | null>;
485
+ failureBehavior: FormControl<string>;
486
+ timeoutSeconds: FormControl<number>;
487
+ }>;
488
+ readonly appActionRawConfigControl: FormControl<string>;
489
+ readonly appActionConfigForm: FormGroup<{}>;
490
+ readonly showHideControl: FormControl<boolean>;
491
+ readonly appActionConfigDefinition: _angular_core.WritableSignal<WorkflowAppActionConfigEditorDefinition>;
492
+ private readonly propertiesTableDataState;
493
+ readonly propertiesTableData: _angular_core.Signal<any[]>;
494
+ readonly mainTabsList: _angular_core.Signal<{
357
495
  label: string;
358
496
  value: string;
359
- }[];
360
- groups: _angular_core.Signal<_masterteam_workflow.GroupDefinition[]>;
361
- roles: _angular_core.Signal<(_masterteam_workflow.RoleDefinition | _masterteam_workflow.RoleGroupDefinition)[]>;
362
- hasGroupedRoles: _angular_core.Signal<boolean>;
363
- workflows: _angular_core.Signal<_masterteam_workflow.WorkflowListItem[]>;
364
- workflow: _angular_core.Signal<_masterteam_workflow.WorkflowSchema | null>;
365
- loading: _angular_core.Signal<boolean>;
366
- loadingStep: _angular_core.Signal<boolean>;
367
- isFlowValid: _angular_core.Signal<boolean | null>;
368
- selectedStep: _angular_core.Signal<_masterteam_workflow.StepSchema | null>;
369
- selectedWorkflowId: _angular_core.Signal<number | undefined>;
370
- connectionFormulaSchemaId: _angular_core.Signal<number | undefined>;
371
- hasMultipleWorkflows: _angular_core.Signal<boolean>;
372
- private readonly confirmationService;
373
- selectedTab: _angular_core.WritableSignal<any>;
374
- nodeFields: _angular_core.WritableSignal<any>;
375
- nodeFormControl: FormControl<any>;
376
- isPublished: _angular_core.WritableSignal<boolean>;
377
- isPublishDisabled: _angular_core.Signal<boolean>;
378
- isEditingInitialNode: _angular_core.WritableSignal<boolean>;
379
- isCreatingStep: _angular_core.WritableSignal<boolean>;
380
- private _propertiesTableData;
381
- propertiesTableData: _angular_core.Signal<any[]>;
382
- propertiesColumns: _angular_core.WritableSignal<ColumnDef[]>;
383
- tabsList: _angular_core.Signal<{
497
+ }[]>;
498
+ readonly failureBehaviorOptions: _angular_core.Signal<{
384
499
  label: string;
385
500
  value: string;
386
501
  }[]>;
387
- readonly nodeDialogFooterConfig: NodeDialogFooterConfig;
388
- availableNodes: {
502
+ readonly tabsList: _angular_core.Signal<{
503
+ label: string;
504
+ value: string;
505
+ }[]>;
506
+ readonly availableNodes: _angular_core.Signal<({
389
507
  id: string;
508
+ type: WorkflowStepType;
509
+ tab: string[];
390
510
  label: string;
511
+ name: {
512
+ en: string;
513
+ ar: string;
514
+ display: string;
515
+ };
516
+ appCode: string;
517
+ actionKey: string;
518
+ displayName: string;
519
+ description: string | null;
520
+ configSchemaJson: string | null;
521
+ requiredContextKeys: string[];
522
+ supportedScopes: string[];
523
+ icon: string;
524
+ color: string;
525
+ } | {
526
+ id: string;
527
+ type: WorkflowStepType;
528
+ label: string;
529
+ tab: string[];
391
530
  name: {
392
531
  en: string;
393
532
  ar: string;
@@ -395,35 +534,44 @@ declare class WorkflowBuilder {
395
534
  targetType: string;
396
535
  icon: string;
397
536
  color: string;
398
- }[];
399
- private readonly baseNameFields;
400
- private readonly approverSection;
401
- private readonly slaSection;
402
- nodeForm: _angular_core.WritableSignal<DynamicFormConfig>;
403
- formStateInfo: _angular_core.Signal<{
404
- isInitialNode: boolean;
405
- sectionsCount: number;
406
- hasApproverSection: boolean;
407
- hasSlaSection: boolean;
408
- formMode: string;
409
- }>;
410
- connectionForm: _angular_core.WritableSignal<DynamicFormConfig>;
411
- connectionFormulaConfig: _angular_core.WritableSignal<{
537
+ })[]>;
538
+ readonly nodeActions: _angular_core.WritableSignal<({
539
+ key: string;
540
+ icon: string;
541
+ variant: string;
542
+ size: string;
543
+ tooltip: string;
544
+ severity?: undefined;
545
+ condition?: undefined;
546
+ } | {
547
+ key: string;
548
+ icon: string;
549
+ variant: string;
550
+ size: string;
551
+ severity: string;
552
+ tooltip: string;
553
+ condition: (node: WorkflowStepSchema) => boolean;
554
+ })[]>;
555
+ readonly nodeDialogFooterConfig: NodeDialogFooterConfig;
556
+ readonly connectionForm: _angular_core.WritableSignal<DynamicFormConfig>;
557
+ readonly connectionFormulaConfig: _angular_core.WritableSignal<{
412
558
  codeOnly: boolean;
413
559
  toolbarTabs: readonly ["functions", "operators"];
414
560
  isProcessBuilder: boolean;
415
561
  }>;
416
- steps: _angular_core.Signal<{
562
+ readonly steps: _angular_core.Signal<{
417
563
  color: string;
418
564
  id: number;
419
565
  name: string | Record<string, string>;
420
566
  sla: number;
421
567
  isInitial: boolean;
568
+ type: WorkflowStepType;
422
569
  targetType?: string;
423
570
  targetValue?: string;
571
+ appAction?: _masterteam_workflow.WorkflowAppAction | null;
424
572
  loading?: boolean;
425
573
  }[]>;
426
- connections: _angular_core.Signal<{
574
+ readonly connections: _angular_core.Signal<{
427
575
  from: number;
428
576
  to: number;
429
577
  id: number;
@@ -433,34 +581,49 @@ declare class WorkflowBuilder {
433
581
  priority: number;
434
582
  loading?: boolean;
435
583
  }[]>;
436
- nodeActions: _angular_core.WritableSignal<({
437
- key: string;
438
- icon: string;
439
- variant: string;
440
- size: string;
441
- tooltip: string;
442
- severity?: undefined;
443
- condition?: undefined;
444
- } | {
445
- key: string;
446
- icon: string;
447
- variant: string;
448
- size: string;
449
- severity: string;
450
- tooltip: string;
451
- condition: (node: WorkflowStepSchema) => boolean;
452
- })[]>;
453
- readonly showHideControl: FormControl<boolean | null>;
584
+ readonly currentAppActionDescriptor: _angular_core.Signal<WorkflowAppActionDescriptor | null>;
454
585
  constructor();
455
586
  onMainTabChange(tab: string): void;
456
587
  onNodeDialogTabChange(tab: string): void;
457
588
  onPublishToggle(isPublished: boolean): void;
458
589
  onWorkflowChange(workflowId: number): void;
459
- clearForm(): void;
460
- onPropertyCellChange(event: CellChangeEvent): void;
461
590
  onStructureAction(event: SBAction): void;
462
591
  openNotificationsModal(): void;
463
592
  openFormModal(): void;
593
+ getStepBadgeClass(type: WorkflowStepType): string;
594
+ getStepCardTitle(step: WorkflowStepSchema): string;
595
+ getStepCardSubtitle(step: WorkflowStepSchema): string | null;
596
+ getStepTypeLabel(type: WorkflowStepType): string;
597
+ getAppActionConfigControl(key: string): FormControl;
598
+ getAppActionEnumOptions(field: WorkflowAppActionConfigField): {
599
+ label: string;
600
+ value: string | number | boolean;
601
+ }[];
602
+ getAppActionDescription(): string | null;
603
+ getAppActionDisplayName(): string;
604
+ getAppActionKey(): string;
605
+ getAppActionConfigMessages(): string[];
606
+ getAppActionDiscoveryMessage(): string | null;
607
+ private clearForm;
608
+ private applyLoadedStep;
609
+ private onAppActionActionChanged;
610
+ private applyCreateNodeDefaults;
611
+ private resetPropertiesTable;
612
+ private populatePropertiesTable;
613
+ private configureStepTypeControl;
614
+ private syncUserInputValidators;
615
+ private resetAppActionState;
616
+ private rebuildAppActionConfigEditor;
617
+ private ensureAppActionDiscoveryLoaded;
618
+ private ensureAppActionDetailLoaded;
619
+ private resolveDescriptorForActionKey;
620
+ private buildStepPayload;
621
+ private buildPropertiesPayload;
622
+ private getCurrentAppActionConfigJson;
623
+ private createAppActionDescriptorSignature;
624
+ private isNodeDialogSaveDisabled;
625
+ private normalizeRoleValue;
626
+ private resolveDisplayName;
464
627
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkflowBuilder, never>;
465
628
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkflowBuilder, "mt-workflow-builder", never, {}, {}, never, never, true, never>;
466
629
  }
@@ -469,5 +632,5 @@ declare const REQUEST_CONTEXT: HttpContextToken<{
469
632
  useBaseUrl: boolean;
470
633
  }>;
471
634
 
472
- export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetModuleInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowBuilder, WorkflowFacade, WorkflowState };
473
- export type { ConnectionPayload, ConnectionResponse, FormulaProperty, GroupDefinition, PublishPayload, PublishResponse, Response, RoleDefinition, RoleGroupDefinition, StepPayload, StepPropertyItem, StepPropertyPayload, StepResponse, StepSchema, WorkflowConnection, WorkflowListItem, WorkflowLoadingName, WorkflowProperty, WorkflowPropertyConfig, WorkflowSchema, WorkflowStateModel, WorkflowStepSchema };
635
+ export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetAppActionDetail, GetAppActions, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetModuleInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowBuilder, WorkflowFacade, WorkflowState };
636
+ export type { ConnectionPayload, ConnectionResponse, FormulaProperty, GroupDefinition, PublishPayload, PublishResponse, Response, RoleDefinition, RoleGroupDefinition, StepPayload, StepPropertyItem, StepPropertyPayload, StepResponse, StepSchema, WorkflowAppAction, WorkflowAppActionConfigPropertySchema, WorkflowAppActionConfigPropertyType, WorkflowAppActionConfigSchema, WorkflowAppActionDescriptor, WorkflowAppActionFailureBehavior, WorkflowConnection, WorkflowListItem, WorkflowLoadingName, WorkflowProperty, WorkflowPropertyConfig, WorkflowSchema, WorkflowStateModel, WorkflowStepSchema, WorkflowStepType };