mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-21 01:00:24 +08:00
27 lines
653 B
TypeScript
27 lines
653 B
TypeScript
import type {
|
|
PolicySubject,
|
|
ProjectPolicySnapshot,
|
|
ProjectRoleBindingRecord,
|
|
} from '../domain/projectPolicy';
|
|
|
|
export interface AppendProjectRoleBindingCommand {
|
|
expectedCurrentVersion: number;
|
|
binding: ProjectRoleBindingRecord;
|
|
}
|
|
|
|
export interface AppendProjectRoleBindingResult {
|
|
status: 'inserted' | 'existing';
|
|
binding: Readonly<ProjectRoleBindingRecord>;
|
|
}
|
|
|
|
export interface ProjectPolicyRepository {
|
|
resolve(
|
|
projectId: string,
|
|
subject: Readonly<PolicySubject>,
|
|
): Promise<Readonly<ProjectPolicySnapshot> | null>;
|
|
|
|
append(
|
|
command: AppendProjectRoleBindingCommand,
|
|
): Promise<AppendProjectRoleBindingResult>;
|
|
}
|