Skip to content

Commit d85eb0d

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into feat/plugin-policy
2 parents 50117b7 + 37d39e0 commit d85eb0d

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

0 commit comments

Comments
 (0)