49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
// ============================================================================
|
|
// Organization Data Types
|
|
// ============================================================================
|
|
|
|
export type TOrganizationPlan = 'free' | 'team' | 'enterprise';
|
|
export type TOrganizationRole = 'owner' | 'admin' | 'member';
|
|
|
|
export interface IOrganization {
|
|
id: string;
|
|
name: string;
|
|
displayName: string;
|
|
description?: string;
|
|
avatarUrl?: string;
|
|
website?: string;
|
|
isPublic: boolean;
|
|
memberCount: number;
|
|
plan: TOrganizationPlan;
|
|
usedStorageBytes: number;
|
|
storageQuotaBytes: number;
|
|
createdAt: string;
|
|
}
|
|
|
|
export interface IOrganizationDetail extends IOrganization {
|
|
settings?: IOrganizationSettings;
|
|
}
|
|
|
|
export interface IOrganizationSettings {
|
|
requireMfa: boolean;
|
|
allowPublicRepositories: boolean;
|
|
defaultRepositoryVisibility: TRepositoryVisibility;
|
|
allowedProtocols: TRegistryProtocol[];
|
|
}
|
|
|
|
export interface IOrganizationMember {
|
|
userId: string;
|
|
role: TOrganizationRole;
|
|
addedAt: string;
|
|
user: {
|
|
username: string;
|
|
displayName: string;
|
|
avatarUrl?: string;
|
|
} | null;
|
|
}
|
|
|
|
// Re-export types used by settings
|
|
import type { TRepositoryVisibility } from './repository.ts';
|
|
import type { TRegistryProtocol } from './package.ts';
|
|
export type { TRegistryProtocol, TRepositoryVisibility };
|