ltcai 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,6 +161,35 @@ function del<T>(path: string, shape: T) {
161
161
  return apiJson<T>("DELETE", path, { shape });
162
162
  }
163
163
 
164
+ export type ReviewItem = {
165
+ id: string;
166
+ status: string;
167
+ effective_status: string;
168
+ title: string;
169
+ summary?: string;
170
+ source?: string;
171
+ kind?: string;
172
+ payload?: Record<string, unknown>;
173
+ provenance?: Record<string, unknown>;
174
+ snoozed_until?: string | null;
175
+ created_at?: string | null;
176
+ updated_at?: string | null;
177
+ };
178
+
179
+ function reviewItemShape(): ReviewItem {
180
+ return {
181
+ id: "",
182
+ status: "pending",
183
+ effective_status: "pending",
184
+ title: "",
185
+ summary: "",
186
+ source: "workflow_run",
187
+ kind: "suggestion",
188
+ payload: {},
189
+ provenance: {},
190
+ };
191
+ }
192
+
164
193
  async function uploadDocument(file: File): Promise<ApiResult<Record<string, unknown> | null>> {
165
194
  const base = await apiBase();
166
195
  const form = new FormData();
@@ -380,6 +409,13 @@ export const latticeApi = {
380
409
  hooks: () => get("/api/hooks", { hooks: [] }),
381
410
  hookRuns: () => get("/api/hooks/runs", { runs: [] }, { limit: 50 }),
382
411
  hookRun: (body: unknown) => post("/api/hooks/run", body, {}),
412
+ automationReviews: (query?: { status?: string; source?: string }) =>
413
+ get("/automation/reviews", { items: [] }, query),
414
+ approveReviewItem: (id: string) => post(`/automation/reviews/${encodeURIComponent(id)}/approve`, {}, reviewItemShape()),
415
+ dismissReviewItem: (id: string) => post(`/automation/reviews/${encodeURIComponent(id)}/dismiss`, {}, reviewItemShape()),
416
+ snoozeReviewItem: (id: string, until: string) =>
417
+ post(`/automation/reviews/${encodeURIComponent(id)}/snooze`, { until }, reviewItemShape()),
418
+ runNowReviewItem: (id: string) => post(`/automation/reviews/${encodeURIComponent(id)}/run_now`, {}, reviewItemShape()),
383
419
  permissionsPending: () => get("/permissions/pending", { pending: {}, count: 0 }),
384
420
  approvePermission: (token: string) => post(`/permissions/approve/${encodeURIComponent(token)}`, {}, {}),
385
421
  denyPermission: (token: string) => post(`/permissions/deny/${encodeURIComponent(token)}`, {}, {}),