{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-refresh-analytics-job-response-schema.json",
  "title": "RefreshAnalyticsJobResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-jobs-api-openapi.yml#/components/schemas/RefreshAnalyticsJobResponse",
  "properties": {
    "status": {
      "type": "string",
      "const": "ok",
      "title": "Status"
    },
    "workspaces": {
      "type": "integer",
      "title": "Workspaces"
    },
    "refreshed": {
      "type": "integer",
      "title": "Refreshed"
    },
    "failed_platforms": {
      "type": "integer",
      "title": "Failed Platforms"
    },
    "workspaces_detail": {
      "items": {
        "$ref": "#/$defs/RefreshAnalyticsWorkspaceResult"
      },
      "type": "array",
      "title": "Workspaces Detail",
      "default": []
    }
  },
  "type": "object",
  "required": [
    "status",
    "workspaces",
    "refreshed",
    "failed_platforms"
  ],
  "$defs": {
    "RefreshAnalyticsPlatformResult": {
      "properties": {
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "partial",
            "failed",
            "skipped",
            "unsupported"
          ],
          "title": "Status"
        },
        "posts": {
          "type": "integer",
          "title": "Posts"
        },
        "refreshed": {
          "type": "integer",
          "title": "Refreshed"
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail"
        }
      },
      "type": "object",
      "required": [
        "platform",
        "status",
        "posts",
        "refreshed"
      ],
      "title": "RefreshAnalyticsPlatformResult"
    },
    "RefreshAnalyticsWorkspaceResult": {
      "properties": {
        "workspace_id": {
          "type": "string",
          "title": "Workspace Id"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "partial",
            "failed",
            "empty"
          ],
          "title": "Status"
        },
        "refreshed": {
          "type": "integer",
          "title": "Refreshed"
        },
        "platforms": {
          "items": {
            "$ref": "#/$defs/RefreshAnalyticsPlatformResult"
          },
          "type": "array",
          "title": "Platforms",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "workspace_id",
        "status",
        "refreshed"
      ],
      "title": "RefreshAnalyticsWorkspaceResult"
    }
  }
}