feat(client): expose v2 project APIs (#34456)

This commit is contained in:
Kit Langton 2026-06-29 14:10:11 -04:00 committed by GitHub
commit 935ac2db91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 473 additions and 244 deletions

View file

@ -2,13 +2,29 @@ export * as Project from "./project"
import { Schema } from "effect"
import { define, inventory } from "./event"
import { NonNegativeInt, optional } from "./schema"
import { AbsolutePath, NonNegativeInt, optional } from "./schema"
import { ProjectID } from "./project-id"
export const ID = ProjectID
export type ID = typeof ID.Type
export const Vcs = Schema.Literal("git").annotate({ identifier: "Project.Vcs" })
export const Current = Schema.Struct({
id: ID,
directory: AbsolutePath,
}).annotate({ identifier: "Project.Current" })
export interface Current extends Schema.Schema.Type<typeof Current> {}
export const Directory = Schema.Struct({
directory: AbsolutePath,
strategy: optional(Schema.String),
}).annotate({ identifier: "Project.Directory" })
export interface Directory extends Schema.Schema.Type<typeof Directory> {}
export const DirectoriesInput = Schema.Struct({
projectID: ID,
}).annotate({ identifier: "Project.DirectoriesInput" })
export interface DirectoriesInput extends Schema.Schema.Type<typeof DirectoriesInput> {}
export const Directories = Schema.Array(Directory).annotate({ identifier: "Project.Directories" })
export type Directories = typeof Directories.Type
export const Icon = Schema.Struct({
url: optional(Schema.String),
override: optional(Schema.String),