Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738import type { Did } from "#lib/api/syntax.ts";import type { BobbinContext, XrpcRequestInit } from "#lib/api/client.ts";import { jsonGet } from "#lib/api/_request.ts";import type { TicketRecord, TicketState } from "#lib/api/records.ts";
export type IssueState = "open" | "closed";
// a listIssues row: the embedded issue record plus bobbin-derived state/counts.export interface IssueListItem { cid?: string; commentCount: number; state: TicketState; stateUpdatedAt?: string; uri: string; value: TicketRecord;}
export interface IssueListPage { cursor?: string | null; total?: number; items: IssueListItem[];}
export interface ListIssuesFilter { state?: TicketState; author?: string; limit?: number; cursor?: string; order?: "asc" | "desc";}
export const listIssues = ( ctx: BobbinContext, subject: Did, filter: ListIssuesFilter = {}, init?: XrpcRequestInit) => jsonGet<IssueListPage>(ctx, "org.tangled.repo.listIssues", { subject, ...filter }, init);