@@ -697,3 +697,44 @@ export enum RuntimeParamsHeadingType {
697697 KEY = 'key' ,
698698 VALUE = 'value' ,
699699}
700+
701+ export enum ACCESS_TYPE_MAP {
702+ DEVTRON_APPS = 'devtron-app' , // devtron app work flow
703+ HELM_APPS = 'helm-app' , // helm app work flow
704+ JOBS = '' , // Empty string is intentional since there is no bifurcation in jobs as of now
705+ }
706+
707+ export enum EntityTypes {
708+ CHART_GROUP = 'chart-group' ,
709+ DIRECT = 'apps' ,
710+ JOB = 'jobs' ,
711+ DOCKER = 'docker' ,
712+ GIT = 'git' ,
713+ CLUSTER = 'cluster' ,
714+ NOTIFICATION = 'notification' ,
715+ }
716+
717+ export interface CustomRoles {
718+ id : number
719+ roleName : string
720+ roleDisplayName : string
721+ roleDescription : string
722+ entity : EntityTypes
723+ accessType : ACCESS_TYPE_MAP . DEVTRON_APPS | ACCESS_TYPE_MAP . HELM_APPS
724+ }
725+
726+ export type MetaPossibleRoles = Record <
727+ CustomRoles [ 'roleName' ] ,
728+ {
729+ value : CustomRoles [ 'roleDisplayName' ]
730+ description : CustomRoles [ 'roleDescription' ]
731+ }
732+ >
733+
734+ export interface CustomRoleAndMeta {
735+ customRoles : CustomRoles [ ]
736+ possibleRolesMeta : MetaPossibleRoles
737+ possibleRolesMetaForHelm : MetaPossibleRoles
738+ possibleRolesMetaForCluster : MetaPossibleRoles
739+ possibleRolesMetaForJob : MetaPossibleRoles
740+ }
0 commit comments