feat(projects): enable editing project info from project cards
This commit is contained in:
1 parent
0f570955ef
commit
70fd3db19f
5 files changed
+232
-21
No files matched your search
@@ -251,6 +251,8 @@ export interface ProjectCreateBody {
|
||||
environments?: ProjectEnvironmentCreateBody[];
|
||||
}
|
||||
|
||||
export type ProjectUpdateBody = Pick<ProjectCreateBody, "name" | "description">;
|
||||
|
||||
export interface ApiResponse<T = unknown> {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
@@ -383,6 +385,40 @@ export interface UpdateSettingsBody {
|
||||
};
|
||||
}
|
||||
|
||||
export type PanelAccessProxy = "NGINX" | "CADDY" | "TRAEFIK";
|
||||
|
||||
export interface PanelProxyCapability {
|
||||
type: PanelAccessProxy;
|
||||
label: string;
|
||||
installed: boolean;
|
||||
active: boolean;
|
||||
available: boolean;
|
||||
supportsProvisioning: boolean;
|
||||
reason: string | null;
|
||||
}
|
||||
|
||||
export interface PanelAccessCapabilities {
|
||||
proxies: PanelProxyCapability[];
|
||||
autoSsl: {
|
||||
installed: boolean;
|
||||
available: boolean;
|
||||
reason: string | null;
|
||||
};
|
||||
defaultProxy: PanelAccessProxy | null;
|
||||
upstream: string;
|
||||
}
|
||||
|
||||
export interface PanelAccessProvisionResult {
|
||||
domain: string;
|
||||
panelUrl: string;
|
||||
proxy: PanelAccessProxy;
|
||||
configPath: string;
|
||||
enabledPath: string;
|
||||
reloadTarget: string;
|
||||
sslEnabled: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export type S3StorageProvider =
|
||||
| "awsS3"
|
||||
| "alibabaOss"
|
||||
@@ -959,6 +995,9 @@ export const projectsApi = {
|
||||
create: (body: ProjectCreateBody) =>
|
||||
post<{ success: boolean; data: ProjectRecord }>("/projects", body),
|
||||
|
||||
update: (id: string, body: ProjectUpdateBody) =>
|
||||
patch<{ success: boolean; data: ProjectRecord }>(`/projects/${id}`, body),
|
||||
|
||||
addEnvironment: (projectId: string, body: ProjectEnvironmentCreateBody) =>
|
||||
post<{ success: boolean; data: ProjectEnvironmentRecord }>(
|
||||
`/projects/${projectId}/environments`,
|
||||
|
||||
Reference in new issue
Block a user