File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed
src/components/engagement/workflow/dto Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { ObjectType } from '@nestjs/graphql' ;
2
+ import { keys as keysOf } from 'ts-transformer-keys' ;
3
+ import { SecuredProps } from '~/common' ;
4
+ //import { e } from '~/core/edgedb';
5
+ //import { RegisterResource } from '~/core/resources';
6
+ import { WorkflowEvent } from '../../../workflow/dto' ;
7
+ import { EngagementStatus , IEngagement } from '../../dto' ;
8
+ import { EngagementWorkflowTransition } from './engagement-workflow-transition.dto' ;
9
+
10
+ //@RegisterResource ({ db: e.Project.WorkflowEvent })
11
+ @ObjectType ( )
12
+ export abstract class EngagementWorkflowEvent extends WorkflowEvent (
13
+ EngagementStatus ,
14
+ EngagementWorkflowTransition ,
15
+ ) {
16
+ static readonly Props = keysOf < EngagementWorkflowEvent > ( ) ;
17
+ static readonly SecuredProps =
18
+ keysOf < SecuredProps < EngagementWorkflowEvent > > ( ) ;
19
+ static readonly BaseNodeProps = WorkflowEvent . BaseNodeProps ;
20
+ static readonly ConfirmThisClassPassesSensitivityToPolicies = true ;
21
+
22
+ readonly engagement : Pick < IEngagement , 'id' > ;
23
+ }
24
+
25
+ declare module '~/core/resources/map' {
26
+ interface ResourceMap {
27
+ EngagementWorkflowEvent : typeof EngagementWorkflowEvent ;
28
+ }
29
+ // interface ResourceDBMap {
30
+ // ProjectWorkflowEvent: typeof e.Project.WorkflowEvent;
31
+ // }
32
+ }
Original file line number Diff line number Diff line change
1
+ import { ObjectType } from '@nestjs/graphql' ;
2
+ import { WorkflowTransition } from '../../../workflow/dto' ;
3
+ import { EngagementStatus } from '../../dto' ;
4
+
5
+ @ObjectType ( 'EngagementStatusTransition' , {
6
+ description : WorkflowTransition . descriptionFor ( 'engagement' ) ,
7
+ } )
8
+ export abstract class EngagementWorkflowTransition extends WorkflowTransition (
9
+ EngagementStatus ,
10
+ ) { }
Original file line number Diff line number Diff line change
1
+ import { InputType } from '@nestjs/graphql' ;
2
+ import { ID , IdField } from '~/common' ;
3
+ import { ExecuteTransitionInput } from '../../../workflow/dto' ;
4
+ import { EngagementStatus } from '../../dto' ;
5
+
6
+ @InputType ( )
7
+ export abstract class ExecuteEngagementTransitionInput extends ExecuteTransitionInput (
8
+ EngagementStatus ,
9
+ ) {
10
+ @IdField ( {
11
+ description : 'The engagement ID to transition' ,
12
+ } )
13
+ readonly engagement : ID ;
14
+ }
Original file line number Diff line number Diff line change
1
+ export * from './execute-engagement-transition.input' ;
2
+ export * from './engagement-workflow-event.dto' ;
3
+ export * from './engagement-workflow-transition.dto' ;
You can’t perform that action at this time.
0 commit comments