{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/samva-dev/json-schema/samva-dev-journey-page-schema.json",
  "title": "JourneyPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/samva-dev-journeys-api-openapi.yml#/components/schemas/JourneyPage",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JourneyListItem"
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "nextCursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "JourneyId": {
      "type": "string",
      "pattern": "^jrny_[0-9a-hjkmnp-tv-z]{16,24}$",
      "x-samva-brand": "JourneyId"
    },
    "JourneyListItem": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/JourneyId"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/JourneyStatus"
        },
        "publishedVersion": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "publishedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "status",
        "publishedVersion",
        "publishedAt",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "JourneyStatus": {
      "type": "string",
      "enum": [
        "draft",
        "active",
        "paused",
        "archived"
      ]
    }
  }
}