mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
Update schemas and usage of project payload
This commit is contained in:
+21
-15
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user