Update schemas and usage of project payload

This commit is contained in:
Sebastian Martinez
2024-08-22 09:45:50 +02:00
parent c798e5d4e9
commit 6c2d1d755e
13 changed files with 110 additions and 67 deletions
+21 -15
View File
@@ -30,28 +30,34 @@ import { authorSchema } from "./shared.js";
const repoSchema = object({
rid: string(),
"xyz.radicle.project": object({
name: string(),
description: string(),
defaultBranch: string(),
payloads: object({
"xyz.radicle.project": object({
data: object({
name: string(),
description: string(),
defaultBranch: string(),
}),
meta: object({
head: string(),
patches: object({
open: number(),
draft: number(),
archived: number(),
merged: number(),
}),
issues: object({
open: number(),
closed: number(),
}),
}),
}),
}),
delegates: array(authorSchema),
head: string(),
threshold: number(),
visibility: union([
object({ type: literal("public") }),
object({ type: literal("private"), allow: optional(array(string())) }),
]),
patches: object({
open: number(),
draft: number(),
archived: number(),
merged: number(),
}),
issues: object({
open: number(),
closed: number(),
}),
seeding: number(),
});
const reposSchema = array(repoSchema);