{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/schedulin-app/json-schema/schedulin-app-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/schedulin-app-openapi.json#/components/schemas/Post",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "externalId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "caption": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/PostStatus"
    },
    "approvalStatus": {
      "$ref": "#/$defs/PostApprovalStatus"
    },
    "approvalRequestedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "approvalRequestedBy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "approvedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "approvedBy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "rejectionReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "platformConfiguration": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "socialAccountId": {
      "type": "string"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "postedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorMessage": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "x-native-type": "date"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "x-native-type": "date"
    }
  },
  "required": [
    "id",
    "externalId",
    "caption",
    "status",
    "approvalStatus",
    "approvalRequestedAt",
    "approvalRequestedBy",
    "approvedAt",
    "approvedBy",
    "rejectionReason",
    "scheduledAt",
    "platformConfiguration",
    "socialAccountId",
    "url",
    "title",
    "postedAt",
    "errorMessage",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "PostApprovalStatus": {
      "enum": [
        "DRAFT",
        "PENDING_APPROVAL",
        "APPROVED",
        "REJECTED"
      ],
      "type": "string"
    },
    "PostStatus": {
      "enum": [
        "SCHEDULED",
        "PROCESSING",
        "COMPLETED",
        "DRAFT",
        "FAILED",
        "DELETED"
      ],
      "type": "string"
    }
  }
}