/** * Generated by orval v8.5.3 🍺 * Do not edit manually. * Api * Guardian Agent API — dark pattern detection and checkout protection * OpenAPI spec version: 0.1.0 */ export interface HealthStatus { status: string; } export interface ErrorResponse { error: string; } export interface FormFieldInfo { id: string; label: string; type: string; /** @nullable */ checked?: boolean | null; /** @nullable */ optional?: boolean | null; } export interface DetectDarkPatternsBody { /** The website domain being analyzed */ domain: string; /** Extracted text content from the page */ pageText: string; /** Text from countdown timer elements found on the page */ timerElements?: string[]; /** Text from stock/scarcity alert elements */ stockAlerts?: string[]; /** Text from all buttons on the page */ buttonLabels?: string[]; /** Form field info including pre-checked state */ formFields?: FormFieldInfo[]; /** All price strings found on the page */ priceStrings?: string[]; } export interface FalseUrgencyResult { detected: boolean; evidence: string; /** @nullable */ isTimerFake?: boolean | null; } export interface FalseScarcityResult { detected: boolean; evidence: string; } export interface ConfirmShamingResult { detected: boolean; shamingText: string; rewrittenText: string; } export interface FeeItem { label: string; amount: number; } export interface HiddenFeesResult { detected: boolean; feeItems: FeeItem[]; /** @nullable */ totalExtra?: number | null; } export interface PreCheckedAddOnsResult { detected: boolean; fieldIds: string[]; addOnLabels: string[]; } export interface MisdirectionResult { detected: boolean; hiddenDeclineText: string; } export interface DarkPatternReport { domain: string; falseUrgency: FalseUrgencyResult; falseScarcity: FalseScarcityResult; confirmShaming: ConfirmShamingResult; hiddenFees: HiddenFeesResult; preCheckedAddOns: PreCheckedAddOnsResult; misdirection: MisdirectionResult; /** Trust score 0-100 */ trustScore: number; /** Human-readable summary of findings */ summary: string; } export interface ClassifyUpsellBody { domain: string; /** Text content of the upsell page */ pageText: string; } export type UpsellClassificationType = (typeof UpsellClassificationType)[keyof typeof UpsellClassificationType]; export const UpsellClassificationType = { insurance: "insurance", breakfast: "breakfast", room_upgrade: "room_upgrade", seat_selection: "seat_selection", newsletter: "newsletter", sms_alerts: "sms_alerts", warranty: "warranty", refundable_rate: "refundable_rate", other: "other", } as const; export interface UpsellClassification { type: UpsellClassificationType; confidence: number; /** Suggested action: decline, accept, or ask_user */ recommendedAction: string; /** Text or selector hint for the decline button */ declineButtonHint: string; } export type TrustRatingTier = (typeof TrustRatingTier)[keyof typeof TrustRatingTier]; export const TrustRatingTier = { gold: "gold", clean: "clean", neutral: "neutral", suspicious: "suspicious", high_manipulation: "high_manipulation", } as const; export interface TrustRating { id: number; domain: string; /** Trust score 0-100 */ score: number; tier: TrustRatingTier; totalScans: number; patternsDetectedCount: number; hiddenFeesCount: number; /** @nullable */ lastScannedAt?: string | null; createdAt: string; updatedAt: string; } export interface UpsertTrustRatingBody { /** Amount to adjust the score (positive or negative) */ scoreDelta: number; patternsFound: number; hiddenFeesFound: number; } export interface DetectionReport { id: number; domain: string; url: string; trustScore: number; falseUrgencyDetected: boolean; falseScarcityDetected: boolean; confirmShamingDetected: boolean; hiddenFeesDetected: boolean; preCheckedAddOnsDetected: boolean; misdirectionDetected: boolean; totalPatternsDetected: number; /** @nullable */ hiddenFeesTotal?: number | null; summary: string; createdAt: string; } export interface CreateReportBody { domain: string; url: string; trustScore: number; falseUrgencyDetected: boolean; falseScarcityDetected: boolean; confirmShamingDetected: boolean; hiddenFeesDetected: boolean; preCheckedAddOnsDetected: boolean; misdirectionDetected: boolean; totalPatternsDetected: number; /** @nullable */ hiddenFeesTotal?: number | null; summary: string; } export interface StatsSummary { totalScans: number; totalPatternsDetected: number; /** Estimated total money saved in dollars */ totalHiddenFeesBlocked: number; totalDomainsTracked: number; totalReportsLast30Days: number; avgTrustScore: number; goldTierDomains: number; highManipulationDomains: number; } export interface PatternBreakdown { falseUrgency: number; falseScarcity: number; confirmShaming: number; hiddenFees: number; preCheckedAddOns: number; misdirection: number; } export interface DomainOffenderSummary { domain: string; totalPatternsDetected: number; trustScore: number; tier: string; totalScans: number; } export interface DemoScanBody { domain: string; url: string; pageText: string; timerElements?: string[]; stockAlerts?: string[]; buttonLabels?: string[]; priceStrings?: string[]; /** * Name of the preset scenario being run * @nullable */ scenarioName?: string | null; } export interface DemoScanResult { report: DetectionReport; darkPatternReport: DarkPatternReport; trustRating: TrustRating; } export interface FeeEstimateBody { domain: string; /** Type of merchant: hotel, airline, ecommerce, vacation_rental, car_rental */ merchantType: string; listedPrice: number; currency?: string; /** @nullable */ itemDescription?: string | null; } export type FeeEstimateResultConfidence = (typeof FeeEstimateResultConfidence)[keyof typeof FeeEstimateResultConfidence]; export const FeeEstimateResultConfidence = { high: "high", medium: "medium", low: "low", } as const; export type FeeEstimateResultWarningLevel = (typeof FeeEstimateResultWarningLevel)[keyof typeof FeeEstimateResultWarningLevel]; export const FeeEstimateResultWarningLevel = { green: "green", orange: "orange", red: "red", } as const; export interface FeeEstimateResult { listedPrice: number; estimatedTotal: number; savingsOpportunity: number; feeBreakdown: FeeItem[]; confidence: FeeEstimateResultConfidence; warningLevel: FeeEstimateResultWarningLevel; explanation: string; } export type ListReportsParams = { /** * @nullable */ domain?: string | null; /** * @nullable */ limit?: number | null; }; export type GetTopOffendersParams = { /** * @nullable */ limit?: number | null; };