@@ -682,3 +682,44 @@ export enum RuntimeParamsHeadingType {
682682 KEY = 'key' ,
683683 VALUE = 'value' ,
684684}
685+
686+ export enum ACCESS_TYPE_MAP {
687+ DEVTRON_APPS = 'devtron-app' , // devtron app work flow
688+ HELM_APPS = 'helm-app' , // helm app work flow
689+ JOBS = '' , // Empty string is intentional since there is no bifurcation in jobs as of now
690+ }
691+
692+ export enum EntityTypes {
693+ CHART_GROUP = 'chart-group' ,
694+ DIRECT = 'apps' ,
695+ JOB = 'jobs' ,
696+ DOCKER = 'docker' ,
697+ GIT = 'git' ,
698+ CLUSTER = 'cluster' ,
699+ NOTIFICATION = 'notification' ,
700+ }
701+
702+ export interface CustomRoles {
703+ id : number
704+ roleName : string
705+ roleDisplayName : string
706+ roleDescription : string
707+ entity : EntityTypes
708+ accessType : ACCESS_TYPE_MAP . DEVTRON_APPS | ACCESS_TYPE_MAP . HELM_APPS
709+ }
710+
711+ export type MetaPossibleRoles = Record <
712+ CustomRoles [ 'roleName' ] ,
713+ {
714+ value : CustomRoles [ 'roleDisplayName' ]
715+ description : CustomRoles [ 'roleDescription' ]
716+ }
717+ >
718+
719+ export interface CustomRoleAndMeta {
720+ customRoles : CustomRoles [ ]
721+ possibleRolesMeta : MetaPossibleRoles
722+ possibleRolesMetaForHelm : MetaPossibleRoles
723+ possibleRolesMetaForCluster : MetaPossibleRoles
724+ possibleRolesMetaForJob : MetaPossibleRoles
725+ }
0 commit comments