{
  "ok": true,
  "service": "tpp-reviews-engine",
  "version": "2026-06-16-v1-owned-reviews-engine",
  "mode": "dry-run",
  "shop": "16ttt0-js.myshopify.com",
  "writeShopify": false,
  "autoApprove": false,
  "negativeThreshold": 2,
  "evangelistThreshold": 5,
  "tokenTtlDays": 21,
  "endpoints": [
    "GET /health",
    "GET /api/v1/status",
    "GET /api/v1/dashboard/summary",
    "GET /api/v1/integrations",
    "GET /api/v1/readiness",
    "GET /api/v1/config/public",
    "GET /api/v1/audit/recent",
    "GET /api/v1/jobs",
    "GET /api/v1/logs",
    "GET /api/v1/requests",
    "GET /api/v1/eligibility",
    "GET /api/v1/reviews",
    "GET /api/v1/reviews/:id",
    "GET /api/v1/aggregates",
    "GET /api/v1/supplier-sentiment",
    "GET /api/v1/products/:id/reviews",
    "GET /api/v1/products/:id/aggregate",
    "GET /api/v1/customers/:id/review-eligibility",
    "POST /api/v1/request-review",
    "POST /api/v1/moderate-review",
    "POST /api/v1/rebuild-aggregate/:productId",
    "POST /api/v1/rebuild-all-aggregates",
    "POST /api/v1/flow/review-request",
    "POST /api/v1/flow/review-reminder",
    "POST /api/v1/flow/review-negative-alert",
    "POST /api/v1/backtest/review-request",
    "POST /api/v1/backtest/review-submit",
    "POST /api/v1/backtest/aggregate",
    "POST /api/v1/backtest/flow",
    "GET /public/product/:handle/reviews",
    "GET /public/product/:id/aggregate",
    "GET /public",
    "GET /public/review-form/:token",
    "POST /public/review-submit/:token"
  ],
  "counts": {
    "reviewRequests": 0,
    "reviews": 0,
    "pendingModeration": 0,
    "approvedReviews": 0,
    "aggregates": 1,
    "flowEvents": 0
  },
  "architecture": {
    "catalogSyncOwns": "product, tags, languages, markets",
    "pricingControlOwns": "margin, shipping reserve, price",
    "returnsRouterOwns": "orders, returns, exports",
    "reviewsEngineOwns": "reviews, verified purchase, aggregate rating, moderation, Flow HTTP",
    "shopifyFlow": "HTTP orchestrator only",
    "theme": "display only"
  },
  "persistence": {
    "d1": true,
    "kv": true,
    "tables": [
      {
        "name": "review_requests",
        "purpose": "Signed review invitations created from verified order/product eligibility.",
        "columns": [
          "id",
          "shopify_order_id",
          "order_name",
          "customer_id",
          "customer_email_hash",
          "product_id",
          "product_handle",
          "variant_id",
          "line_item_id",
          "status",
          "token_hash",
          "token_expires_at",
          "source",
          "metadata_json",
          "form_url",
          "created_at",
          "updated_at"
        ]
      },
      {
        "name": "reviews",
        "purpose": "Customer submitted reviews and moderation state.",
        "columns": [
          "id",
          "request_id",
          "product_id",
          "product_handle",
          "variant_id",
          "shopify_order_id",
          "customer_id",
          "customer_email_hash",
          "rating",
          "title",
          "body",
          "author_name",
          "status",
          "verified_purchase",
          "moderation_reason",
          "source",
          "metadata_json",
          "created_at",
          "updated_at",
          "approved_at"
        ]
      },
      {
        "name": "review_aggregates",
        "purpose": "Approved rating aggregate by product for Shopify reviews.rating and reviews.rating_count.",
        "columns": [
          "product_id",
          "product_handle",
          "rating_avg",
          "rating_count",
          "verified_count",
          "negative_count",
          "last_review_at",
          "status",
          "shopify_write_status",
          "updated_at"
        ]
      },
      {
        "name": "review_jobs",
        "purpose": "Jobs for request creation, moderation and aggregate rebuilds.",
        "columns": [
          "id",
          "type",
          "status",
          "mode",
          "source",
          "summary_json",
          "error",
          "created_at",
          "updated_at"
        ]
      },
      {
        "name": "review_logs",
        "purpose": "Structured logs for audits and operations.",
        "columns": [
          "id",
          "level",
          "topic",
          "entity_type",
          "entity_id",
          "message",
          "payload_json",
          "created_at"
        ]
      },
      {
        "name": "review_moderation_events",
        "purpose": "Moderation decision history.",
        "columns": [
          "id",
          "review_id",
          "action",
          "actor",
          "reason",
          "payload_json",
          "created_at"
        ]
      },
      {
        "name": "review_eligibility",
        "purpose": "Verified purchase eligibility by order/product/customer.",
        "columns": [
          "id",
          "shopify_order_id",
          "order_name",
          "customer_id",
          "customer_email_hash",
          "product_id",
          "variant_id",
          "line_item_id",
          "status",
          "reason",
          "created_at",
          "updated_at"
        ]
      },
      {
        "name": "flow_events",
        "purpose": "Shopify Flow HTTP events received by Reviews Engine.",
        "columns": [
          "id",
          "event",
          "shopify_order_id",
          "order_name",
          "status",
          "payload_json",
          "created_at"
        ]
      },
      {
        "name": "signed_token_uses",
        "purpose": "One-time-use guard for public review form tokens.",
        "columns": [
          "token_hash",
          "request_id",
          "used_at",
          "ip_hash"
        ]
      }
    ]
  },
  "requestUrl": "https://tpp-reviews-engine.tupeludopremium.workers.dev/"
}