@hapic/harbor
Version:
A harbor http api client.
42 lines (41 loc) • 1.04 kB
TypeScript
import type { ResourceCollectionQuery } from '../type';
export type Project = {
name: string;
project_id: number;
owner_id: number;
owner_name: string;
registry_id?: number;
repo_count: number;
update_time: string;
creation_time: string;
metadata: ProjectMetadata;
};
export type ProjectMetadata = {
public: boolean;
auto_scan?: string;
severity?: 'none' | 'low' | 'medium' | 'high' | 'critical';
};
export type ProjectCreatePayload = {
project_name: string;
public?: boolean;
registry_id?: string | number | null;
storage_limit?: number;
};
export type ProjectUpdatePayload = {
project_name: string;
public?: boolean;
registry_id?: string | number | null;
storage_limit?: number;
};
export type ProjectCreateResponse = {
id?: number;
};
export type ProjectQuery = ResourceCollectionQuery<Project> & {
name?: string;
public?: boolean;
owner?: string;
with_detail?: boolean;
};
export type ProjectGetManyOptions = {
query?: ProjectQuery;
};