{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monite/json-schema/monite-process-resource-schema.json",
  "title": "ProcessResource",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monite-approval-policies-api-openapi.yml#/components/schemas/ProcessResource",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "type": "string",
      "format": "uuid"
    },
    "error": {
      "type": "object",
      "description": "The error for the process."
    },
    "input": {
      "type": "object",
      "description": "The input for the script."
    },
    "metadata": {
      "type": "object",
      "description": "The metadata for the process."
    },
    "script_snapshot": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "items": {},
          "type": "array"
        },
        {
          "type": "object"
        }
      ],
      "description": "The script snapshot taken when script started."
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/ProcessStatusEnum"
        }
      ],
      "description": "Tthe current status of the approval policy process."
    },
    "updated_by": {
      "type": "string",
      "format": "uuid"
    }
  },
  "type": "object",
  "required": [
    "id",
    "created_at",
    "input",
    "metadata",
    "status"
  ],
  "$defs": {
    "ProcessStatusEnum": {
      "type": "string",
      "enum": [
        "succeeded",
        "waiting",
        "failed",
        "running",
        "canceled",
        "timed_out"
      ]
    }
  }
}