diff --git a/http-client/index.ts b/http-client/index.ts index 1806f6207..c67c4d9ed 100644 --- a/http-client/index.ts +++ b/http-client/index.ts @@ -10,8 +10,6 @@ import type { } from "./lib/project.js"; import type { Config, - CodeLocation, - Range, SeedingPolicy, DefaultSeedingPolicy, } from "./lib/shared.js"; @@ -34,7 +32,6 @@ import type { Merge, Patch, PatchState, - PatchUpdateAction, Review, Revision, Verdict, @@ -58,7 +55,6 @@ export type { Blob, ChangesetWithDiff, ChangesetWithoutDiff, - CodeLocation, Comment, Commit, CommitBlob, @@ -78,10 +74,8 @@ export type { Merge, Patch, PatchState, - PatchUpdateAction, Project, ProjectListQuery, - Range, Reaction, Remote, Review, diff --git a/http-client/lib/project.ts b/http-client/lib/project.ts index 8a571573c..bf6701159 100644 --- a/http-client/lib/project.ts +++ b/http-client/lib/project.ts @@ -349,7 +349,7 @@ export class Client { query?: { page?: number; perPage?: number; - state?: string; + status?: string; }, options?: RequestOptions, ): Promise { @@ -384,7 +384,7 @@ export class Client { query?: { page?: number; perPage?: number; - state?: string; + status?: string; }, options?: RequestOptions, ): Promise { diff --git a/http-client/lib/shared.ts b/http-client/lib/shared.ts index 67ff67e20..b9e96dbd2 100644 --- a/http-client/lib/shared.ts +++ b/http-client/lib/shared.ts @@ -2,10 +2,6 @@ import type { z } from "zod"; import { array, boolean, literal, number, object, string, union } from "zod"; -export interface SuccessResponse { - success: true; -} - export const scopeSchema = union([literal("followed"), literal("all")]); export const seedingPolicySchema = union([ @@ -121,8 +117,6 @@ export const codeLocationSchema = object({ new: rangeSchema.nullable(), }); -export type CodeLocation = z.infer; - export const authorSchema = object({ id: string(), alias: string().optional(), diff --git a/http-client/tests/project.test.ts b/http-client/tests/project.test.ts index 666ca66f5..8e8b05b6e 100644 --- a/http-client/tests/project.test.ts +++ b/http-client/tests/project.test.ts @@ -101,7 +101,7 @@ describe("project", () => { await api.project.getAllIssues(cobRid, { page: 0, perPage: 5, - state: "open", + status: "open", }); }); diff --git a/src/views/projects/Issues.svelte b/src/views/projects/Issues.svelte index dfc0eddce..d52dbcaad 100644 --- a/src/views/projects/Issues.svelte +++ b/src/views/projects/Issues.svelte @@ -31,7 +31,7 @@ export let seedingPolicy: SeedingPolicy; export let issues: Issue[]; export let project: Project; - export let state: IssueState["status"]; + export let status: IssueState["status"]; let loading = false; let page = 0; @@ -46,12 +46,12 @@ const api = new HttpdClient(baseUrl); - async function loadIssues(state: IssueState["status"]): Promise { + async function loadIssues(status: IssueState["status"]): Promise { loading = true; page += 1; try { const response = await api.project.getAllIssues(project.id, { - state, + status, page, perPage: ISSUES_PER_PAGE, }); @@ -70,7 +70,7 @@ }; $: showMoreButton = - !loading && !error && allIssues.length < project.issues[state]; + !loading && !error && allIssues.length < project.issues[status];