Task 004: add demo auth and role checks

This commit is contained in:
2026-05-21 18:31:40 +03:00
parent 7a11d50aa7
commit 7972e9a95f
26 changed files with 2207 additions and 23 deletions
+64
View File
@@ -110,6 +110,17 @@ export type ClaimSummary = {
export type ClaimSupportStatus = "SUPPORTED" | "UNSUPPORTED" | "NEEDS_REVIEW";
export type CurrentUser = {
display_name: string;
email: string;
id: string;
role: Role;
};
export type CurrentUserResponse = {
user: CurrentUser;
};
export type DraftSummary = {
article_id: string;
body_object_key?: string | null;
@@ -209,6 +220,10 @@ export type ResearchArtifactSummary = {
source_url: string;
};
export type ReviewActionResponse = {
review: ReviewSummary;
};
export type ReviewStatus = "PENDING" | "APPROVED" | "CHANGES_REQUESTED";
export type ReviewSummary = {
@@ -230,6 +245,23 @@ export type RunnerFileRef = {
path: string;
};
export type ScriptConfigVersionCreateRequest = {
activate?: boolean;
diff?: Record<string, unknown>;
publishing_yaml: string;
rollback_target_version_id?: string | null;
transform_script: string;
version?: number | null;
};
export type ScriptConfigVersionListResponse = {
versions: ScriptConfigVersionSummary[];
};
export type ScriptConfigVersionResponse = {
version: ScriptConfigVersionSummary;
};
export type ScriptConfigVersionStatus = "DRAFT" | "ACTIVE" | "DEPRECATED";
export type ScriptConfigVersionSummary = {
@@ -260,6 +292,38 @@ export type TargetSiteConfig = {
visual_rules?: Record<string, unknown>;
};
export type TargetSiteConfigCreateRequest = {
active_script_config_version_id?: string | null;
audience: string;
brand_voice: string;
default_language?: string;
name: string;
publishing_rules: PublishingRules;
publishing_type?: string;
seo_rules?: Record<string, unknown>;
slug: string;
source_rules?: Record<string, unknown>;
visual_rules?: Record<string, unknown>;
};
export type TargetSiteConfigResponse = {
site: TargetSiteConfig;
};
export type TargetSiteConfigUpdateRequest = {
active_script_config_version_id?: string | null;
audience?: string | null;
brand_voice?: string | null;
default_language?: string | null;
name?: string | null;
publishing_rules?: PublishingRules | null;
publishing_type?: string | null;
seo_rules?: Record<string, unknown> | null;
slug?: string | null;
source_rules?: Record<string, unknown> | null;
visual_rules?: Record<string, unknown> | null;
};
export type UserSummary = {
display_name: string;
id: string;