{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-module-restore-version-response-schema.json",
  "title": "ModuleRestoreVersionResponse",
  "description": "Response after restoring a module version",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revyl-modules-api-openapi.yml#/components/schemas/ModuleRestoreVersionResponse",
  "properties": {
    "message": {
      "title": "Message",
      "type": "string"
    },
    "new_version": {
      "title": "New Version",
      "type": "integer"
    },
    "restored_from": {
      "title": "Restored From",
      "type": "integer"
    },
    "result": {
      "$ref": "#/$defs/ModuleResponse"
    }
  },
  "required": [
    "message",
    "result",
    "new_version",
    "restored_from"
  ],
  "type": "object",
  "$defs": {
    "ModuleResponse": {
      "description": "Response model for a single module",
      "properties": {
        "blocks": {
          "items": {},
          "title": "Blocks",
          "type": "array"
        },
        "created_at": {
          "title": "Created At",
          "type": "string"
        },
        "created_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created By"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "id": {
          "title": "Id",
          "type": "string"
        },
        "last_modified_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Modified By"
        },
        "last_modified_by_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Modified By Email"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "org_id": {
          "title": "Org Id",
          "type": "string"
        },
        "updated_at": {
          "title": "Updated At",
          "type": "string"
        },
        "version": {
          "default": 1,
          "title": "Version",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "org_id",
        "name",
        "blocks",
        "created_at",
        "updated_at"
      ],
      "title": "ModuleResponse",
      "type": "object"
    }
  }
}