File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ import { getBaseResourceProperties } from '../helpers'
2
2
import { getReferenceFromResourceIdentifier } from './helpers'
3
3
import {
4
4
ReferenceTypeId ,
5
+ StateReference ,
5
6
State ,
6
7
StateChangeKeyAction ,
7
8
StateDraft ,
8
9
StateSetDescriptionAction ,
9
10
StateSetNameAction ,
10
11
StateSetRolesAction ,
12
+ StateSetTransitionsAction ,
11
13
StateUpdateAction ,
12
14
} from '@commercetools/platform-sdk'
13
15
import { AbstractResourceRepository , RepositoryContext } from './abstract'
@@ -71,5 +73,17 @@ export class StateRepository extends AbstractResourceRepository {
71
73
) => {
72
74
resource . roles = roles
73
75
} ,
76
+ setTransitions : (
77
+ context : RepositoryContext ,
78
+ resource : Writable < State > ,
79
+ { transitions } : StateSetTransitionsAction
80
+ ) => {
81
+ resource . transitions = transitions ?. map ( ( resourceId ) : StateReference => {
82
+ return {
83
+ id : resourceId . id || "" ,
84
+ typeId : "state" ,
85
+ }
86
+ } )
87
+ }
74
88
}
75
89
}
You can’t perform that action at this time.
0 commit comments