Implement Backend API to List Packages within a Project

This commit is contained in:
Mondo Diaz
2025-12-11 18:47:46 -06:00
parent 1793fd3a8f
commit dea03c4a12
7 changed files with 365 additions and 8 deletions

View File

@@ -45,7 +45,8 @@ export async function getProject(name: string): Promise<Project> {
// Package API
export async function listPackages(projectName: string): Promise<Package[]> {
const response = await fetch(`${API_BASE}/project/${projectName}/packages`);
return handleResponse<Package[]>(response);
const data = await handleResponse<PaginatedResponse<Package>>(response);
return data.items;
}
export async function createPackage(projectName: string, data: { name: string; description?: string }): Promise<Package> {