Skip to content

Commit a220e7f

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into refactor/compare-manifest
2 parents a14121b + 37d39e0 commit a220e7f

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.5.0-beta-10",
3+
"version": "0.5.1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/types.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)