|
1234567891011121314151617181920212223242526272829303132333435363738 |
- 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<Repo, 'id'>;
-
- export class UnknownOwnerTypeError extends Error {}
-
- export class UserNotFoundError extends Error {}
-
- export class OrgNotFoundError extends Error {}
-
- export class RepoNotFoundError extends Error {}
|