feat: add bounded Ticket and Objective read APIs

This commit is contained in:
2026-08-17 05:18:27 +09:00
parent eb0dd67d16
commit 14aa1aabea
5 changed files with 1447 additions and 59 deletions
@@ -23,8 +23,19 @@ export type TicketListResponse = {
record_authority: string;
};
export type QueryPage = {
limit: number;
returned: number;
has_more: boolean;
next_cursor: string | null;
sort: string;
source_limit: number | null;
source_truncated: boolean;
};
export type TicketEventDetail = {
sequence: number;
event_ref: string;
kind: string;
author: string | null;
at: string | null;
@@ -35,6 +46,89 @@ export type TicketEventDetail = {
state_field: string | null;
heading: string | null;
body: string | null;
attributes: { [key in string]: string };
references: Array<string>;
};
export type ObjectiveLinkSummary = { id: string; title: string; state: string };
export type TicketEvidenceEvent = {
event_ref: string;
sequence: number;
kind: string;
at: string | null;
author: string | null;
excerpt: string;
};
export type TicketMergeRequestSummary = {
merge_request_id: string;
state: string;
review_status: string;
revision_id: string;
base_commit: string;
head_commit: string;
changed_paths: Array<string>;
updated_at: string;
review_submitted_at: string | null;
review_excerpt: string | null;
};
export type TicketEvidenceSummary = {
has_implementation_report: boolean;
implementation_report_after_rescope: boolean;
has_merge_request: boolean;
has_commit: boolean;
review_status: string | null;
approved: boolean;
unresolved_request_changes: boolean;
complete_for_integration: boolean;
missing: Array<string>;
};
export type TicketQueryRequest = {
text: string | null;
states: Array<string>;
event_kinds: Array<string>;
evidence: Array<string>;
review_status: string | null;
attention: Array<string>;
related_ticket_id: string | null;
relation_kind: string | null;
linked_objective_id: string | null;
updated_after: string | null;
updated_before: string | null;
sort: string | null;
limit: number | null;
cursor: string | null;
};
export type TicketQueryItem = {
id: string;
title: string;
state: string;
priority: string;
updated_at: string | null;
workspace_action_priority: string;
matched_fields: Array<string>;
snippet: string | null;
matching_event: TicketEvidenceEvent | null;
linked_objective_ids: Array<string>;
relation_count: number;
blocker_count: number;
evidence: TicketEvidenceSummary;
merge_request: TicketMergeRequestSummary | null;
};
export type TicketQueryResponse = {
items: Array<TicketQueryItem>;
page: QueryPage;
record_authority: string;
};
export type TicketShowRequest = {
event_limit: number | null;
event_cursor: string | null;
};
export type TicketRelation = {
@@ -83,6 +177,7 @@ export type TicketDetail = {
priority: string;
created_at: string | null;
updated_at: string | null;
item_revision: string;
queued_by: string | null;
queued_at: string | null;
assignee: string | null;
@@ -93,9 +188,14 @@ export type TicketDetail = {
body_truncated: boolean;
event_count: number;
events: Array<TicketEventDetail>;
event_page: QueryPage;
artifact_count: number;
artifacts: Array<string>;
relations: TicketRelationView;
linked_objectives: Array<ObjectiveLinkSummary>;
implementation_reports: Array<TicketEvidenceEvent>;
merge_request: TicketMergeRequestSummary | null;
evidence: TicketEvidenceSummary;
resolution: string | null;
record_source: string;
};