Phase 1 ops core: base blocks, feedback, canary fixes
- Add app/ekonomi/anvandare/prenumerationer/butik/feedback blocks to computeOpsSummary. - New feedback table, POST /api/feedback, GDPR erasure wiring. - Canary: only count unverified/rejected published recipes; treat verified/editorial as safe. - Add 'rejected' recipe verification status enum value. - Fix food-safety lint baseline: remove egg/cured fish from raw-protein list, relax genomstekt regex, add safe-cooking phrases to seed recipes. - Seed recipes now get verificationStatus=editorial. - Tests: ops summary blocks, feedback route, me.residual cleanup.
This commit is contained in:
@@ -298,6 +298,7 @@ export const RECIPE_VERIFICATION_STATUSES = [
|
||||
"community",
|
||||
"verified",
|
||||
"editorial",
|
||||
"rejected",
|
||||
] as const;
|
||||
export type RecipeVerificationStatus = (typeof RECIPE_VERIFICATION_STATUSES)[number];
|
||||
|
||||
|
||||
@@ -1,3 +1,50 @@
|
||||
export interface OpsAppBlock {
|
||||
app: string;
|
||||
generated_at: string;
|
||||
}
|
||||
|
||||
export interface OpsEconomyBlock {
|
||||
mrr: number | null;
|
||||
intakt_24h: number | null;
|
||||
intakt_7d: number | null;
|
||||
valuta: "SEK";
|
||||
}
|
||||
|
||||
export interface OpsUsersBlock {
|
||||
aktiva_nu: number;
|
||||
dau: number;
|
||||
mau: number;
|
||||
nya_24h: number;
|
||||
nya_7d: number;
|
||||
}
|
||||
|
||||
export interface OpsSubscriptionsBlock {
|
||||
trial_aktiva: number;
|
||||
trial_konverterade_24h: number;
|
||||
trial_konverterade_7d: number;
|
||||
konverteringsgrad_30d: number | null;
|
||||
betalande: number;
|
||||
avslutade_24h: number;
|
||||
}
|
||||
|
||||
export interface OpsStoreBlock {
|
||||
butik: null;
|
||||
all_fields_phase_2: null;
|
||||
}
|
||||
|
||||
export interface OpsFeedbackItem {
|
||||
rubrik: string;
|
||||
typ: "bug" | "onskemal";
|
||||
status: "oppen" | "pagar" | "stangd";
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface OpsFeedbackBlock {
|
||||
oppna: number;
|
||||
nya_24h: number;
|
||||
senaste: OpsFeedbackItem[] | null;
|
||||
}
|
||||
|
||||
export interface OpsAiScanBlock {
|
||||
scans_24h: number;
|
||||
scans_7d: number;
|
||||
@@ -54,6 +101,12 @@ export interface OpsSafetyBlock {
|
||||
}
|
||||
|
||||
export interface OpsSummary {
|
||||
app: OpsAppBlock;
|
||||
ekonomi: OpsEconomyBlock;
|
||||
anvandare: OpsUsersBlock;
|
||||
prenumerationer: OpsSubscriptionsBlock;
|
||||
butik: OpsStoreBlock;
|
||||
feedback: OpsFeedbackBlock;
|
||||
ai_scan: OpsAiScanBlock;
|
||||
aktivering: OpsActivationBlock;
|
||||
engagemang: OpsEngagementBlock;
|
||||
|
||||
Reference in New Issue
Block a user