mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-13 15:44:56 +00:00
Define project update input with Effect Schema (#26803)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import z from "zod"
|
||||
import { and } from "drizzle-orm"
|
||||
import { Database } from "@/storage/db"
|
||||
import { eq } from "drizzle-orm"
|
||||
@@ -89,13 +88,13 @@ export function fromRow(row: Row): Info {
|
||||
}
|
||||
}
|
||||
|
||||
export const UpdateInput = z.object({
|
||||
projectID: ProjectID.zod,
|
||||
name: z.string().optional(),
|
||||
icon: zod(ProjectIcon).optional(),
|
||||
commands: zod(ProjectCommands).optional(),
|
||||
export const UpdateInput = Schema.Struct({
|
||||
projectID: ProjectID,
|
||||
name: Schema.optional(Schema.String),
|
||||
icon: Schema.optional(ProjectIcon),
|
||||
commands: Schema.optional(ProjectCommands),
|
||||
})
|
||||
export type UpdateInput = z.infer<typeof UpdateInput>
|
||||
export type UpdateInput = Types.DeepMutable<Schema.Schema.Type<typeof UpdateInput>>
|
||||
|
||||
export const UpdatePayload = Schema.Struct({
|
||||
name: Schema.optional(Schema.String),
|
||||
|
||||
Reference in New Issue
Block a user