in operations/packages/artifacts.ts [71:95]
export async function getArtifactFunc(
organizationId: string,
repoId: string,
id: number,
repoType: string
): Promise<Artifact | null> {
const baseUrl = `/oapi/v1/packages/organizations/${organizationId}/repositories/${repoId}/artifacts/${id}`;
const queryParams: Record<string, string | number | undefined> = {
repoType,
};
const url = buildUrl(baseUrl, queryParams);
try {
const response = await yunxiaoRequest(url, {
method: "GET",
});
return ArtifactSchema.parse(response);
} catch (error) {
console.error(`Error fetching artifact: ${error}`);
return null;
}
}