Schema: Move TeamDTO properties out of the resource (#68155)

This commit is contained in:
Ryan McKinley
2023-05-22 11:30:36 -07:00
committed by GitHub
parent 1763b82b5d
commit 2c75a51285
7 changed files with 50 additions and 89 deletions

View File

@@ -140,6 +140,3 @@ export { defaultServiceAccount } from './raw/serviceaccount/x/serviceaccount_typ
// Raw generated types from Team kind.
export type { Team } from './raw/team/x/team_types.gen';
// Raw generated enums and default consts from team kind.
export { Permission } from './raw/team/x/team_types.gen';

View File

@@ -8,40 +8,13 @@
//
// Run 'make gen-cue' from repository root to regenerate.
export enum Permission {
Admin = 4,
Editor = 2,
Member = 0,
Viewer = 1,
}
export interface Team {
/**
* AccessControl metadata associated with a given resource.
*/
accessControl?: Record<string, boolean>;
/**
* AvatarUrl is the team's avatar URL.
*/
avatarUrl?: string;
/**
* Email of the team.
*/
email?: string;
/**
* MemberCount is the number of the team members.
*/
memberCount: number;
/**
* Name of the team.
*/
name: string;
/**
* OrgId is the ID of an organisation the team belongs to.
*/
orgId: number;
/**
* TODO - it seems it's a team_member.permission, unlikely it should belong to the team kind
*/
permission: Permission;
}