chore: bootstrap repository with governance docs
Initialize git, add Apache-2.0 LICENSE, .gitattributes (LF line endings), AGENTS.md (entry points, stack, discovery order, baseline checks), RUNBOOK.md (dev boot, prod deploy with overlay, ingestion, failures, rollback, scaling notes), .env.prod.example with rotated credential placeholders, and dev-only warnings on .env.example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
frontend/src/services/ingestion.ts
Normal file
27
frontend/src/services/ingestion.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { apiClient, USE_MOCK } from "@/services/apiClient";
|
||||
import * as mock from "@/services/mock/mockData";
|
||||
import type { IngestFolderRequest, IngestFolderResponse, IngestionRun } from "@/services/types";
|
||||
|
||||
export async function ingestFolder(req: IngestFolderRequest): Promise<IngestFolderResponse> {
|
||||
if (USE_MOCK) {
|
||||
await new Promise((r) => setTimeout(r, 600));
|
||||
return {
|
||||
run_id: crypto.randomUUID(),
|
||||
discovered: 78,
|
||||
queued: 72,
|
||||
skipped_duplicates: 4,
|
||||
invalid_files: 2,
|
||||
};
|
||||
}
|
||||
const { data } = await apiClient.post<IngestFolderResponse>("/ingest/folder", req);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function listRuns(): Promise<IngestionRun[]> {
|
||||
if (USE_MOCK) {
|
||||
await new Promise((r) => setTimeout(r, 220));
|
||||
return mock.ingestionRuns;
|
||||
}
|
||||
const { data } = await apiClient.get<IngestionRun[]>("/ingest/runs");
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user