{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loppee-com/json-schema/loppee-com-owner-dashboard-response-schema.json",
  "title": "OwnerDashboardResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loppee-com-openapi.json#/components/schemas/OwnerDashboardResponse",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "owner",
    "memberships",
    "businesses",
    "applications",
    "locations",
    "mediaAssets",
    "externalProfiles",
    "verificationChecks",
    "ownerEvidenceSubmissions",
    "publicProfiles",
    "auditEvents",
    "businessClaims",
    "directoryListings",
    "serviceInteractions",
    "deals",
    "jobs",
    "reviews",
    "managementAgents",
    "messageReplies",
    "ownerNotifications",
    "ownerNotificationSettings",
    "ownerNotificationDeliveries",
    "categoryRequests",
    "analytics"
  ],
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "const": "0.1"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "owner": {
      "type": "object",
      "required": [
        "user_id",
        "email"
      ],
      "additionalProperties": false,
      "properties": {
        "user_id": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        }
      }
    },
    "memberships": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "businesses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "applications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "mediaAssets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "externalProfiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "verificationChecks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "ownerEvidenceSubmissions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerEvidenceSubmissionSummary"
      }
    },
    "publicProfiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "auditEvents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "businessClaims": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardBusinessClaim"
      }
    },
    "directoryListings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "serviceInteractions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "deals": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "jobs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "reviews": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "managementAgents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "messageReplies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "ownerNotifications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "ownerNotificationSettings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "ownerNotificationDeliveries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "categoryRequests": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    },
    "analytics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OwnerDashboardRecord"
      }
    }
  },
  "$defs": {
    "OwnerDashboardBusinessClaim": {
      "type": "object",
      "description": "One owner-scoped claim. V3 responses include contactVerification so clients select only the sole exact current secured owner claim and never infer Contact eligibility from raw profile fields.",
      "additionalProperties": true,
      "properties": {
        "contactVerification": {
          "$ref": "#/$defs/OwnerDashboardContactVerification"
        }
      }
    },
    "OwnerDashboardContactVerification": {
      "type": "object",
      "required": [
        "ownerEligible",
        "smsAvailable",
        "smsDestinationHint",
        "emailAvailable",
        "emailDestinationHint"
      ],
      "additionalProperties": false,
      "description": "Server-derived exact-owner Contact capability. Both hints are masked; clients never infer eligibility from raw business phone, session identity, claimant data, or authority fingerprints.",
      "properties": {
        "ownerEligible": {
          "type": "boolean"
        },
        "smsAvailable": {
          "type": "boolean"
        },
        "smsDestinationHint": {
          "type": [
            "string",
            "null"
          ]
        },
        "emailAvailable": {
          "type": "boolean"
        },
        "emailDestinationHint": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "OwnerDashboardRecord": {
      "type": "object",
      "description": "One owner-scoped dashboard record. Record fields follow the corresponding typed owner-dashboard model; this aggregate contract deliberately locks the top-level collection names while allowing additive record fields.",
      "additionalProperties": true
    },
    "OwnerEvidenceSubmissionSummary": {
      "type": "object",
      "description": "Minimized owner-visible manual-review status. ownerReasonCode is additive and may appear only for a rejected item when owner_rejection_reason_version=1 was requested; internal reviewer notes, identifiers, and document locators are never returned.",
      "required": [
        "id",
        "businessId",
        "factorId",
        "status",
        "createdAt"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        },
        "businessId": {
          "type": "string"
        },
        "factorId": {
          "type": "string",
          "enum": [
            "business_identity",
            "category_credential"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "needs_review",
            "approved",
            "rejected",
            "superseded"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "decidedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "ownerReasonCode": {
          "type": "string",
          "enum": [
            "wrong_document_type",
            "identifier_mismatch",
            "holder_mismatch",
            "inactive_or_expired",
            "official_record_not_found",
            "qa_synthetic_fixture",
            "other"
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "required": [
              "ownerReasonCode"
            ]
          },
          "then": {
            "properties": {
              "status": {
                "const": "rejected"
              }
            }
          }
        }
      ]
    }
  }
}