import {Uuid} from '@theoryofnekomata/uuid-buffer'; import {Org, User} from '../common'; export enum RepoVisibility { PRIVATE, INTERNAL, PUBLIC, } export enum OwnerType { USER, ORG, } export type Owner = User | Org; export enum GitAction { REPO_CREATED = 'REPO_CREATED', REPO_REMOVED = 'REPO_REMOVED', } export type Repo = { id: Uuid, name: string, ownerId: Uuid, ownerType: OwnerType, visibility: RepoVisibility, } export type CreateRepoData = Omit; export class UnknownOwnerTypeError extends Error {} export class UserNotFoundError extends Error {} export class OrgNotFoundError extends Error {} export class RepoNotFoundError extends Error {}