{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postnext-io/json-schema/postnext-io-publish-result-row-schema.json",
  "title": "PublishResultRow",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postnext-io-openapi.json#/components/schemas/PublishResultRow",
  "type": "object",
  "properties": {
    "postGroupId": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "channelName": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/PostStatus"
    },
    "publishedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Public URL of the published post."
    },
    "platformPostId": {
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Failure message when status is FAILED."
    },
    "attempts": {
      "type": "integer"
    }
  },
  "$defs": {
    "PostStatus": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHING",
        "PUBLISHED",
        "FAILED",
        "APPROVAL"
      ]
    }
  }
}