diff --git a/http-client/lib/project/issue.ts b/http-client/lib/project/issue.ts index d45a7dfd6..47f16760d 100644 --- a/http-client/lib/project/issue.ts +++ b/http-client/lib/project/issue.ts @@ -1,6 +1,5 @@ -import type { Embed } from "./comment.js"; import type { ZodSchema, z } from "zod"; -import { array, boolean, literal, object, string, union } from "zod"; +import { array, literal, object, string, union } from "zod"; import { commentSchema } from "./comment.js"; import { authorSchema } from "../shared.js"; @@ -29,42 +28,4 @@ export const issueSchema = object({ export type Issue = z.infer; -export interface IssueCreated { - success: boolean; - id: string; -} - -export const issueCreatedSchema = object({ - success: boolean(), - id: string(), -}) satisfies ZodSchema; - export const issuesSchema = array(issueSchema) satisfies ZodSchema; - -export type IssueUpdateAction = - | { type: "edit"; title: string } - | { type: "label"; labels: string[] } - | { - type: "assign"; - assignees: string[]; - } - | { type: "lifecycle"; state: IssueState } - | { - type: "comment"; - body: string; - embeds?: Embed[]; - replyTo?: string; - } - | { - type: "comment.edit"; - id: string; - body: string; - embeds: Embed[]; - } - | { type: "comment.redact"; id: string } - | { - type: "comment.react"; - id: string; - reaction: string; - active: boolean; - }; diff --git a/http-client/lib/project/patch.ts b/http-client/lib/project/patch.ts index faec6206c..428b54aac 100644 --- a/http-client/lib/project/patch.ts +++ b/http-client/lib/project/patch.ts @@ -1,12 +1,9 @@ -import type { Embed } from "./comment.js"; import type { ZodSchema, z } from "zod"; -import type { CodeLocation } from "../shared.js"; import { commentSchema } from "./comment.js"; import { array, - boolean, literal, number, optional, @@ -107,104 +104,3 @@ export type LifecycleState = | { status: "draft" } | { status: "open" } | { status: "archived" }; - -export type PatchUpdateAction = - | { type: "edit"; title: string; target: "delegates" } - | { type: "label"; labels: string[] } - | { type: "assign"; assignees: string[] } - | { type: "merge"; revision: string; commit: string } - | { type: "lifecycle"; state: LifecycleState } - | { - type: "review"; - revision: string; - summary?: string; - verdict?: Verdict | null; - } - | { type: "review.edit"; review: string; summary?: string } - | { type: "review.redact"; review: string } - | { - type: "review.comment"; - review: string; - body: string; - location: CodeLocation; - replyTo?: string; - embeds?: Embed[]; - } - | { - type: "review.comment.edit"; - review: string; - comment: string; - body: string; - embeds: Embed[]; - } - | { - type: "review.comment.redact"; - review: string; - comment: string; - } - | { - type: "review.comment.react"; - review: string; - comment: string; - reaction: string; - active: boolean; - } - | { type: "revision"; description: string; base: string; oid: string } - | { - type: "revision.edit"; - revision: string; - description: string; - embeds?: Embed[]; - } - | { - type: "revision.react"; - revision: string; - reaction: string; - location?: CodeLocation; - active: boolean; - } - | { type: "revision.redact"; revision: string } - | { - type: "revision.comment"; - revision: string; - body: string; - embeds?: Embed[]; - location?: CodeLocation; - replyTo?: string; - } - | { - type: "revision.comment.edit"; - revision: string; - comment: string; - body: string; - embeds: Embed[]; - } - | { - type: "revision.comment.redact"; - revision: string; - comment: string; - } - | { - type: "revision.comment.react"; - revision: string; - comment: string; - reaction: string; - active: boolean; - }; - -export const patchCreateSchema = object({ - title: string(), - description: string(), - target: string(), - oid: string(), - labels: array(string()), -}); - -export type PatchCreate = z.infer; - -export const patchCreatedSchema = object({ - success: boolean(), - id: string(), -}); - -export type PatchCreated = z.infer;