Task 002: add shared domain contracts
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,273 @@
|
||||
// Generated from backend OpenAPI by scripts/generate_openapi_contracts.py.
|
||||
// Do not edit by hand.
|
||||
|
||||
export type AgentJobErrorCategory = "FAILED_SCHEMA_VALIDATION" | "CLI_EXIT_CODE_FAILURE" | "TIMEOUT" | "MISSING_OUTPUT_FILE" | "UNSUPPORTED_CLAIMS_FOUND" | "SOURCE_RETRIEVAL_FAILED" | "RESEARCH_ARTIFACT_UPLOAD_FAILED" | "PUBLISH_DRY_RUN_FAILED" | "GIT_CHECKOUT_FAILED" | "GIT_COMMIT_FAILED" | "GIT_PUSH_NON_FAST_FORWARD" | "PUBLISH_VERIFICATION_FAILED";
|
||||
|
||||
export type AgentJobOutput = {
|
||||
artifacts?: ResearchArtifactSummary[];
|
||||
error_category?: AgentJobErrorCategory | null;
|
||||
error_message?: string | null;
|
||||
output_files?: RunnerFileRef[];
|
||||
payload?: Record<string, unknown>;
|
||||
status: AgentJobStatus;
|
||||
};
|
||||
|
||||
export type AgentJobStatus = "QUEUED" | "RUNNING" | "SUCCEEDED" | "FAILED" | "CANCELLED";
|
||||
|
||||
export type AgentJobSummary = {
|
||||
agent_profile: string;
|
||||
article_id: string;
|
||||
error_category?: AgentJobErrorCategory | null;
|
||||
error_message?: string | null;
|
||||
finished_at?: string | null;
|
||||
id: string;
|
||||
input_files?: RunnerFileRef[];
|
||||
job_type: AgentJobType;
|
||||
output_files?: RunnerFileRef[];
|
||||
started_at?: string | null;
|
||||
status: AgentJobStatus;
|
||||
workspace_path?: string | null;
|
||||
};
|
||||
|
||||
export type AgentJobType = "BOUNDARY_QUESTIONS" | "PLAN_GENERATION" | "RESEARCH" | "EVIDENCE_MATRIX" | "SECTION_SCAFFOLD" | "DRAFT_ASSEMBLY" | "SEO_REVIEW" | "LANGUAGE_REVIEW" | "PUBLISH_DRY_RUN" | "PUBLISH_COMMIT" | "TEST_CODEX";
|
||||
|
||||
export type ArticleCreateRequest = {
|
||||
assigned_editor_id?: string | null;
|
||||
brief_description: string;
|
||||
content_type?: string;
|
||||
language?: string;
|
||||
primary_keyword?: string | null;
|
||||
target_site_id: string;
|
||||
working_title?: string | null;
|
||||
};
|
||||
|
||||
export type ArticleCreateResponse = {
|
||||
article: ArticleSummary;
|
||||
};
|
||||
|
||||
export type ArticleDetailResponse = {
|
||||
agent_jobs?: AgentJobSummary[];
|
||||
article: ArticleSummary;
|
||||
assets?: AssetSummary[];
|
||||
claims?: ClaimSummary[];
|
||||
draft?: DraftSummary | null;
|
||||
evidence?: EvidenceSummary[];
|
||||
plan?: PlanSummary | null;
|
||||
publish_commit?: PublishCommitSummary | null;
|
||||
research_manifests?: ResearchArtifactManifestSummary[];
|
||||
reviews?: ReviewSummary[];
|
||||
target_site?: TargetSiteConfig | null;
|
||||
};
|
||||
|
||||
export type ArticleListResponse = {
|
||||
articles: ArticleSummary[];
|
||||
};
|
||||
|
||||
export type ArticleSummary = {
|
||||
assigned_editor_id?: string | null;
|
||||
brief_description: string;
|
||||
content_type: string;
|
||||
created_at: string;
|
||||
id: string;
|
||||
language: string;
|
||||
primary_keyword?: string | null;
|
||||
publishing_status: PublishingStatus;
|
||||
status: ArticleWorkflowStatus;
|
||||
target_site_id: string;
|
||||
updated_at: string;
|
||||
working_title?: string | null;
|
||||
};
|
||||
|
||||
export type ArticleWorkflowStatus = "ARTICLE_BRIEF_CREATED" | "BOUNDARY_QUESTIONS_GENERATED" | "BOUNDARY_ANSWERS_SUBMITTED" | "PLAN_GENERATED" | "PLAN_REVIEW_REQUIRED" | "PLAN_REVISION_REQUIRED" | "RESEARCH_RUNNING" | "EVIDENCE_MATRIX_READY" | "PARALLEL_PRODUCTION_RUNNING" | "DRAFT_ASSEMBLED" | "SEO_AND_LANGUAGE_REVIEW_READY" | "FINAL_REVIEW_REQUIRED" | "FINAL_REVISION_REQUIRED" | "PUBLISH_DRY_RUN_REQUIRED" | "PUBLISH_COMMIT_READY" | "PUBLISH_COMMIT_CREATED";
|
||||
|
||||
export type AssetStatus = "PENDING" | "GENERATED" | "APPROVED" | "REJECTED";
|
||||
|
||||
export type AssetSummary = {
|
||||
alt_text?: string | null;
|
||||
article_id: string;
|
||||
asset_type: AssetType;
|
||||
caption?: string | null;
|
||||
file_url?: string | null;
|
||||
id: string;
|
||||
prompt?: string | null;
|
||||
status: AssetStatus;
|
||||
title: string;
|
||||
};
|
||||
|
||||
export type AssetType = "hero_image" | "diagram" | "table" | "inline_image";
|
||||
|
||||
export type ClaimRiskLevel = "low" | "medium" | "high";
|
||||
|
||||
export type ClaimSummary = {
|
||||
article_id: string;
|
||||
claim_text: string;
|
||||
evidence_item_ids?: string[];
|
||||
id: string;
|
||||
risk_level: ClaimRiskLevel;
|
||||
section_id?: string | null;
|
||||
support_status: ClaimSupportStatus;
|
||||
};
|
||||
|
||||
export type ClaimSupportStatus = "SUPPORTED" | "UNSUPPORTED" | "NEEDS_REVIEW";
|
||||
|
||||
export type DraftSummary = {
|
||||
article_id: string;
|
||||
body_object_key?: string | null;
|
||||
id: string;
|
||||
meta_description?: string | null;
|
||||
meta_title?: string | null;
|
||||
slug: string;
|
||||
status: ArticleWorkflowStatus;
|
||||
title: string;
|
||||
updated_at: string;
|
||||
version: number;
|
||||
};
|
||||
|
||||
export type EvidenceSummary = {
|
||||
article_id: string;
|
||||
artifact_manifest_id: string;
|
||||
id: string;
|
||||
retrieved_at: string;
|
||||
source_quality_score: number;
|
||||
source_title: string;
|
||||
source_type: string;
|
||||
source_url: string;
|
||||
summary: string;
|
||||
supports_claims?: string[];
|
||||
};
|
||||
|
||||
export type HTTPValidationError = {
|
||||
detail?: ValidationError[];
|
||||
};
|
||||
|
||||
export type PlanReviewStatus = "PENDING_REVIEW" | "APPROVED" | "REVISION_REQUESTED";
|
||||
|
||||
export type PlanSectionSummary = {
|
||||
article_plan_id: string;
|
||||
claims_to_support?: string[];
|
||||
heading: string;
|
||||
id: string;
|
||||
purpose?: string | null;
|
||||
sort_order: number;
|
||||
target_word_count?: number | null;
|
||||
};
|
||||
|
||||
export type PlanSummary = {
|
||||
article_id: string;
|
||||
claims_to_prove?: string[];
|
||||
created_at: string;
|
||||
id: string;
|
||||
recommended_title?: string | null;
|
||||
risks?: string[];
|
||||
search_intent?: string | null;
|
||||
sections?: PlanSectionSummary[];
|
||||
status: PlanReviewStatus;
|
||||
thesis?: string | null;
|
||||
version: number;
|
||||
};
|
||||
|
||||
export type PublishCommitSummary = {
|
||||
article_id: string;
|
||||
branch: string;
|
||||
commit_sha?: string | null;
|
||||
content_bundle_manifest?: Record<string, unknown>;
|
||||
created_at: string;
|
||||
deployment_status?: string | null;
|
||||
id: string;
|
||||
repository_url: string;
|
||||
status: PublishingStatus;
|
||||
target_site_id: string;
|
||||
};
|
||||
|
||||
export type PublishingRules = {
|
||||
asset_path_template: string;
|
||||
content_format?: string;
|
||||
content_path_template: string;
|
||||
dry_run_renderer?: string | null;
|
||||
frontmatter_mapping?: Record<string, unknown>;
|
||||
production_branch: string;
|
||||
repository_url: string;
|
||||
transform_script_version_id?: string | null;
|
||||
};
|
||||
|
||||
export type PublishingStatus = "PUBLISH_NOT_STARTED" | "PUBLISH_DRY_RUN_REQUIRED" | "PUBLISH_DRY_RUN_RUNNING" | "PUBLISH_DRY_RUN_FAILED" | "PUBLISH_COMMIT_READY" | "PUBLISH_COMMIT_CREATED" | "PUBLISH_VERIFICATION_FAILED";
|
||||
|
||||
export type ResearchArtifactManifestSummary = {
|
||||
agent_job_id: string;
|
||||
article_id: string;
|
||||
artifacts?: ResearchArtifactSummary[];
|
||||
created_at: string;
|
||||
id: string;
|
||||
s3_prefix: string;
|
||||
};
|
||||
|
||||
export type ResearchArtifactSummary = {
|
||||
artifact_type: string;
|
||||
content_hash: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
object_key: string;
|
||||
source_url: string;
|
||||
};
|
||||
|
||||
export type ReviewStatus = "PENDING" | "APPROVED" | "CHANGES_REQUESTED";
|
||||
|
||||
export type ReviewSummary = {
|
||||
article_id: string;
|
||||
created_at: string;
|
||||
id: string;
|
||||
notes?: string | null;
|
||||
review_type: ReviewType;
|
||||
reviewer_id?: string | null;
|
||||
status: ReviewStatus;
|
||||
};
|
||||
|
||||
export type ReviewType = "PLAN" | "EVIDENCE" | "ASSET" | "SEO_LANGUAGE" | "FINAL";
|
||||
|
||||
export type Role = "ADMIN" | "EDITOR";
|
||||
|
||||
export type RunnerFileRef = {
|
||||
content_hash?: string | null;
|
||||
path: string;
|
||||
};
|
||||
|
||||
export type ScriptConfigVersionStatus = "DRAFT" | "ACTIVE" | "DEPRECATED";
|
||||
|
||||
export type ScriptConfigVersionSummary = {
|
||||
created_at: string;
|
||||
created_by: string;
|
||||
id: string;
|
||||
publishing_yaml_hash: string;
|
||||
status: ScriptConfigVersionStatus;
|
||||
target_site_id: string;
|
||||
transform_script_hash: string;
|
||||
version: number;
|
||||
};
|
||||
|
||||
export type TargetSiteConfig = {
|
||||
active_script_config_version_id?: string | null;
|
||||
audience: string;
|
||||
brand_voice: string;
|
||||
created_at: string;
|
||||
default_language?: string;
|
||||
id: string;
|
||||
name: string;
|
||||
publishing_rules: PublishingRules;
|
||||
publishing_type?: string;
|
||||
seo_rules?: Record<string, unknown>;
|
||||
slug: string;
|
||||
source_rules?: Record<string, unknown>;
|
||||
updated_at: string;
|
||||
visual_rules?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type UserSummary = {
|
||||
display_name: string;
|
||||
id: string;
|
||||
role: Role;
|
||||
};
|
||||
|
||||
export type ValidationError = {
|
||||
loc: (string | number)[];
|
||||
msg: string;
|
||||
type: string;
|
||||
};
|
||||
@@ -1,6 +1 @@
|
||||
export type {
|
||||
BackendDependenciesHealthResponse,
|
||||
BackendDependencyName,
|
||||
HealthResponse,
|
||||
ServiceName,
|
||||
} from "./health";
|
||||
export type * from "./api-types";
|
||||
|
||||
Reference in New Issue
Block a user