{
    "openapi": "3.0.3",
    "info": {
        "title": "EE DataCollector API",
        "version": "2.3.0",
        "description": "Асинхронный API расчетов с разделением SubjectContext и TemporalContext, плюс канонический экспорт Synthesis++."
    },
    "paths": {
        "\/api.php?action=create_task": {
            "post": {
                "summary": "Создать задачу расчета",
                "description": "Ставит задачу в очередь и возвращает request_id.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TaskRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Задача принята в очередь",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/TaskCreatedResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ошибка валидации\/JSON",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ValidationErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Ключ API отсутствует",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Метод не разрешен",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Превышен лимит запросов",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=get_result": {
            "get": {
                "summary": "Получить статус\/результат задачи",
                "parameters": [
                    {
                        "name": "request_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Идентификатор задачи из create_task."
                    },
                    {
                        "name": "view",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "summary",
                                "explain",
                                "raw"
                            ],
                            "default": "summary"
                        },
                        "description": "Режим вывода для задач с synthesis. Для задач без synthesis параметр игнорируется."
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for private request_id access (alternative to X-API-Key header)."
                    },
                    {
                        "name": "X-API-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for private request_id access."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Статус выполнения или итоговые данные",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#\/components\/schemas\/TaskStatusResponse"
                                        },
                                        {
                                            "$ref": "#\/components\/schemas\/TaskErrorResult"
                                        },
                                        {
                                            "$ref": "#\/components\/schemas\/LegacyTaskResultSuccess"
                                        },
                                        {
                                            "$ref": "#\/components\/schemas\/SynthesisSummaryResponse"
                                        },
                                        {
                                            "$ref": "#\/components\/schemas\/SynthesisExplainResponse"
                                        },
                                        {
                                            "$ref": "#\/components\/schemas\/SynthesisRawResponse"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "request_id отсутствует или неверный формат",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Задача не найдена",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "API key is required for private request_id",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden for provided API key",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=export_result": {
            "get": {
                "summary": "Экспорт результата synthesis",
                "description": "Экспортирует готовый synthesis-результат в NDJSON или CSV.",
                "parameters": [
                    {
                        "name": "request_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Идентификатор задачи из create_task."
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "ndjson",
                                "csv"
                            ],
                            "default": "ndjson"
                        },
                        "description": "Формат экспорта."
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for private request_id access (alternative to X-API-Key header)."
                    },
                    {
                        "name": "X-API-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for private request_id access."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Поток NDJSON или CSV",
                        "content": {
                            "application\/x-ndjson": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "{\"row_type\":\"summary\",\"request_id\":\"task_abc\",\"date\":\"2026-02-14\"}\n{\"row_type\":\"domain_component\",\"scale\":\"social\",\"domain\":\"ASTRO\",\"component\":12.3}"
                            },
                            "text\/csv": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Некорректные параметры\/отсутствует synthesis",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Задача не найдена",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Задача еще не готова к экспорту",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "API key is required for private request_id",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden for provided API key",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=get_hourly_forecast": {
            "get": {
                "summary": "РџРѕС‡Р°СЃРѕРІРѕР№ geocentric РїСЂРѕРіРЅРѕР· Р›СѓРЅС‹ Рё РїР»Р°РЅРµС‚ РЅР° СЃСѓС‚РєРё",
                "description": "РЎРёРЅС…СЂРѕРЅРЅРѕ РІРѕР·РІСЂР°С‰Р°РµС‚ local-hourly РјР°СЃСЃРёРІ РѕС‚ 00:00 Р·Р°РїСЂРѕС€РµРЅРЅРѕРіРѕ РґРЅСЏ РґРѕ 00:00 СЃР»РµРґСѓСЋС‰РµРіРѕ РґРЅСЏ РІРєР»СЋС‡РёС‚РµР»СЊРЅРѕ. Р’ РєР°Р¶РґРѕР№ С‚РѕС‡РєРµ РµСЃС‚СЊ РіРµРѕС†РµРЅС‚СЂРёС‡РµСЃРєРёРµ РїРѕР»РѕР¶РµРЅРёСЏ Р›СѓРЅС‹\/РїР»Р°РЅРµС‚, Р°СЃРїРµРєС‚С‹ Р›СѓРЅС‹, void of course Рё Р»СѓРЅРЅС‹Р№ РґРµРЅСЊ.",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Local-РґР°С‚Р° РІ С„РѕСЂРјР°С‚Рµ YYYY-MM-DD."
                    },
                    {
                        "name": "city",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Р“РѕСЂРѕРґ РґР»СЏ Р°РІС‚РѕРїРѕРёСЃРєР° lat\/lng\/timezone. РР»Рё РїРµСЂРµРґР°Р№С‚Рµ lat\/lng."
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "РћРїС†РёРѕРЅР°Р»СЊРЅРѕРµ СѓС‚РѕС‡РЅРµРЅРёРµ РґР»СЏ city-lookup."
                    },
                    {
                        "name": "lat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        },
                        "description": "РЁРёСЂРѕС‚Р°. РџРµСЂРµРґР°РІР°Р№С‚Рµ РІРјРµСЃС‚Рѕ city РёР»Рё РІРјРµСЃС‚Рµ СЃ city."
                    },
                    {
                        "name": "lng",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        },
                        "description": "Р”РѕР»РіРѕС‚Р°."
                    },
                    {
                        "name": "timezone",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "IANA timezone. РћР±СЏР·Р°С‚РµР»СЊРЅР° РїСЂРё lat\/lng Р±РµР· city-lookup."
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key (Р°Р»СЊС‚РµСЂРЅР°С‚РёРІР° X-API-Key)."
                    },
                    {
                        "name": "X-API-Key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key РґР»СЏ hourly-forecast endpoint."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "РџРѕС‡Р°СЃРѕРІРѕР№ РјР°СЃСЃРёРІ РїРѕ local-РґРЅСЋ",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/HourlyForecastResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "РќРµРєРѕСЂСЂРµРєС‚РЅС‹Рµ query-РїР°СЂР°РјРµС‚СЂС‹",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "API key missing\/invalid",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "РњРµС‚РѕРґ РЅРµ СЂР°Р·СЂРµС€РµРЅ",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Quota \/ rate limit exceeded",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=get_spec": {
            "get": {
                "summary": "Получить OpenAPI спецификацию",
                "responses": {
                    "200": {
                        "description": "OpenAPI JSON-описание",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=get_reference": {
            "get": {
                "summary": "Получить справочные данные API",
                "responses": {
                    "200": {
                        "description": "Справочный JSON-ответ",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/api.php?action=run_worker": {
            "post": {
                "summary": "Запуск worker (локально\/по токену)",
                "description": "Доступно только с localhost или с валидным X-Worker-Token.",
                "responses": {
                    "200": {
                        "description": "Сигнал worker отправлен",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/WorkerRunResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Доступ запрещен",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Метод не разрешен",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "$ref": "#\/components\/schemas\/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "TaskRequest": {
                "type": "object",
                "required": [
                    "api_key",
                    "user"
                ],
                "properties": {
                    "api_key": {
                        "type": "string",
                        "description": "Ключ API. Ранг ключа (adept\/master\/magus\/demiurge) определяет квоты и стоимость расчета в лимитере.",
                        "example": "655351024"
                    },
                    "calc_profile": {
                        "type": "string",
                        "enum": [
                            "A",
                            "B"
                        ],
                        "default": "A",
                        "description": "Профиль расчета весов (может также задаваться через X-Calc-Profile или query calc_profile)."
                    },
                    "user": {
                        "$ref": "#\/components\/schemas\/UserData"
                    },
                    "systems": {
                        "$ref": "#\/components\/schemas\/SystemsList"
                    },
                    "current_location": {
                        "$ref": "#\/components\/schemas\/CurrentLocation"
                    },
                    "forecast": {
                        "$ref": "#\/components\/schemas\/ForecastParams"
                    },
                    "response": {
                        "$ref": "#\/components\/schemas\/ResponseOptions"
                    }
                }
            },
            "UserData": {
                "type": "object",
                "required": [
                    "first_name",
                    "last_name",
                    "birth_date",
                    "birth_time",
                    "birth_city"
                ],
                "properties": {
                    "first_name": {
                        "type": "string",
                        "example": "Евгений"
                    },
                    "middle_name": {
                        "type": "string",
                        "example": "Владимирович"
                    },
                    "last_name": {
                        "type": "string",
                        "example": "Ефимченко"
                    },
                    "birth_date": {
                        "type": "string",
                        "format": "date",
                        "example": "1981-10-27"
                    },
                    "birth_time": {
                        "type": "string",
                        "description": "Формат HH:MM или HH:MM:SS",
                        "example": "04:13"
                    },
                    "birth_city": {
                        "type": "string",
                        "example": "Норильск"
                    },
                    "birth_country": {
                        "type": "string",
                        "example": "Россия"
                    },
                    "gender": {
                        "type": "string",
                        "enum": [
                            "male",
                            "female"
                        ]
                    }
                }
            },
            "SystemsList": {
                "type": "array",
                "items": {
                    "type": "string",
                    "enum": [
                        "numerology",
                        "astrology",
                        "bodygraph",
                        "transits",
                        "forecast",
                        "synthesis"
                    ]
                },
                "example": [
                    "astrology",
                    "transits",
                    "forecast",
                    "synthesis"
                ]
            },
            "CurrentLocation": {
                "type": "object",
                "properties": {
                    "city": {
                        "type": "string",
                        "example": "Орел"
                    },
                    "country": {
                        "type": "string",
                        "example": "Россия"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "example": 52.968
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "example": 36.0994
                    },
                    "timezone": {
                        "type": "string",
                        "example": "Europe\/Moscow"
                    }
                }
            },
            "ForecastParams": {
                "type": "object",
                "properties": {
                    "period_type": {
                        "type": "string",
                        "enum": [
                            "day",
                            "week",
                            "month"
                        ],
                        "default": "day"
                    },
                    "period_start_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2026-02-14"
                    },
                    "target_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Алиас period_start_date"
                    },
                    "target_time": {
                        "type": "string",
                        "description": "Формат HH:MM или HH:MM:SS",
                        "example": "12:00:00"
                    },
                    "space_weather_mode": {
                        "type": "string",
                        "enum": [
                            "allow_simulated",
                            "observed_or_estimated",
                            "observed_only"
                        ],
                        "default": "allow_simulated",
                        "description": "Режим качества Kp."
                    }
                }
            },
            "ResponseOptions": {
                "type": "object",
                "properties": {
                    "omit_portrait_payload": {
                        "type": "boolean",
                        "default": false,
                        "description": "Если true, в systems не возвращаются тяжелые портретные ветки numerology\/astrology\/bodygraph."
                    }
                }
            },
            "TaskCreatedResponse": {
                "type": "object",
                "required": [
                    "status",
                    "request_id"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "queued"
                    },
                    "message": {
                        "type": "string",
                        "example": "Задача принята"
                    },
                    "request_id": {
                        "type": "string",
                        "example": "task_698cdc670473d"
                    }
                }
            },
            "TaskStatusResponse": {
                "type": "object",
                "required": [
                    "status",
                    "message"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "processing"
                        ]
                    },
                    "message": {
                        "type": "string",
                        "example": "Расчет выполняется..."
                    }
                }
            },
            "TaskErrorResult": {
                "type": "object",
                "required": [
                    "status",
                    "error"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "error"
                    },
                    "error": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "object"
                            }
                        ],
                        "example": "[CRITICAL_EXTERNAL] Данные эфемерид недоступны"
                    }
                }
            },
            "LegacyTaskResultSuccess": {
                "type": "object",
                "required": [
                    "status",
                    "request_id",
                    "systems"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "request_id": {
                        "type": "string",
                        "example": "task_698cdc670473d"
                    },
                    "context": {
                        "type": "object",
                        "properties": {
                            "timezone": {
                                "type": "string",
                                "example": "Asia\/Krasnoyarsk"
                            }
                        }
                    },
                    "systems": {
                        "type": "object",
                        "description": "Классический блок модулей. В systems.numerology.data сохраняется legacy matrix_destiny и добавляется matrix_destiny_v2 (MatrixDestiny22 v2.1.0 без корневых дублей).",
                        "additionalProperties": true
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "MatrixDestinyV2": {
                "type": "object",
                "description": "Формализованная модель матрицы судьбы. Старый matrix_destiny сохраняется отдельно и не меняется.",
                "properties": {
                    "system_name": {
                        "type": "string",
                        "example": "MatrixDestiny22"
                    },
                    "version": {
                        "type": "string",
                        "example": "2.1.0"
                    },
                    "basis": {
                        "type": "object",
                        "description": "birth_date, birth_time, calendar, arcana_range, reduction_rule=ladini_digit_sum_22, zero_maps_to=22.",
                        "additionalProperties": true
                    },
                    "canonical": {
                        "type": "object",
                        "description": "Официальный слой MatrixDestiny22 v2.1.0: core, age_nodes, generic_programs, channels, health_map. Используйте его для стабильных интеграций.",
                        "additionalProperties": true
                    },
                    "derived_experimental": {
                        "type": "object",
                        "description": "Производный explain-слой: nodes, lines, sectors, age_cycle, interpretation, activation. Это не канон; слой может расширяться без изменения canonical-ядра.",
                        "additionalProperties": true
                    },
                    "meta": {
                        "type": "object",
                        "description": "Метаданные расчета: canonical_mode, compatibility_goal, normalization_rule, source_mapping, health_map_formula_version.",
                        "additionalProperties": true
                    }
                }
            },
            "SynthesisSummaryResponse": {
                "type": "object",
                "required": [
                    "status",
                    "view",
                    "schema_version",
                    "calculation_version",
                    "weights_hash",
                    "conflict_rules_version",
                    "normalization_version",
                    "calc_profile_id",
                    "request_id",
                    "date",
                    "summary",
                    "health"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "view": {
                        "type": "string",
                        "example": "summary"
                    },
                    "schema_version": {
                        "type": "string",
                        "example": "export-1.0.0"
                    },
                    "calculation_version": {
                        "type": "string",
                        "example": "ipsm-2.0.0"
                    },
                    "weights_hash": {
                        "type": "string"
                    },
                    "conflict_rules_version": {
                        "type": "string",
                        "example": "conflict-rules-2.0.0"
                    },
                    "normalization_version": {
                        "type": "string",
                        "example": "normalization-2.0.0"
                    },
                    "calc_profile_id": {
                        "type": "string",
                        "enum": [
                            "A",
                            "B"
                        ]
                    },
                    "request_id": {
                        "type": "string"
                    },
                    "date": {
                        "type": "string",
                        "format": "date"
                    },
                    "summary": {
                        "$ref": "#\/components\/schemas\/SynthesisSummaryPayload"
                    },
                    "health": {
                        "$ref": "#\/components\/schemas\/SynthesisHealthPayload"
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "SynthesisExplainResponse": {
                "allOf": [
                    {
                        "$ref": "#\/components\/schemas\/SynthesisSummaryResponse"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "view": {
                                "type": "string",
                                "example": "explain"
                            },
                            "domain_components": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "breakdown_short": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "conflicts": {
                                "type": "array",
                                "items": {
                                    "type": "object"
                                }
                            },
                            "reliability_summary": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "model_health": {
                                "type": "object",
                                "additionalProperties": true
                            }
                        }
                    }
                ]
            },
            "SynthesisRawResponse": {
                "type": "object",
                "required": [
                    "status",
                    "view",
                    "schema_version",
                    "calculation_version",
                    "weights_hash",
                    "conflict_rules_version",
                    "normalization_version",
                    "calc_profile_id",
                    "request_id",
                    "date",
                    "health",
                    "raw_profile"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "view": {
                        "type": "string",
                        "example": "raw"
                    },
                    "schema_version": {
                        "type": "string",
                        "example": "export-1.0.0"
                    },
                    "calculation_version": {
                        "type": "string",
                        "example": "ipsm-2.0.0"
                    },
                    "weights_hash": {
                        "type": "string"
                    },
                    "conflict_rules_version": {
                        "type": "string",
                        "example": "conflict-rules-2.0.0"
                    },
                    "normalization_version": {
                        "type": "string",
                        "example": "normalization-2.0.0"
                    },
                    "calc_profile_id": {
                        "type": "string",
                        "enum": [
                            "A",
                            "B"
                        ]
                    },
                    "request_id": {
                        "type": "string"
                    },
                    "date": {
                        "type": "string",
                        "format": "date"
                    },
                    "health": {
                        "$ref": "#\/components\/schemas\/SynthesisHealthPayload"
                    },
                    "raw_profile": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "warnings": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "SynthesisSummaryPayload": {
                "type": "object",
                "properties": {
                    "scales": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    },
                    "superpower": {
                        "type": "string"
                    },
                    "quality_score": {
                        "type": "number",
                        "format": "float"
                    },
                    "conflicts_count": {
                        "type": "integer"
                    }
                }
            },
            "SynthesisHealthPayload": {
                "type": "object",
                "properties": {
                    "analysis_time_ms": {
                        "type": "integer"
                    },
                    "memory_peak_mb": {
                        "type": "number",
                        "format": "float"
                    },
                    "observations_used": {
                        "type": "integer"
                    },
                    "observations_total": {
                        "type": "integer"
                    },
                    "aggregation_drift_detected": {
                        "type": "boolean"
                    }
                }
            },
            "HourlyForecastResponse": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "cached": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "$ref": "#\/components\/schemas\/HourlyForecastData"
                    }
                }
            },
            "HourlyForecastData": {
                "type": "object",
                "properties": {
                    "schema_version": {
                        "type": "string",
                        "example": "1.0.0"
                    },
                    "meta": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "hours": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/HourlyForecastHour"
                        }
                    }
                }
            },
            "HourlyForecastHour": {
                "type": "object",
                "properties": {
                    "hour_index": {
                        "type": "integer",
                        "example": 0
                    },
                    "local_datetime": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "utc_datetime": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "moon": {
                        "$ref": "#\/components\/schemas\/HourlyForecastBody"
                    },
                    "planets": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#\/components\/schemas\/HourlyForecastBody"
                        }
                    },
                    "moon_aspects": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/HourlyForecastAspect"
                        }
                    },
                    "lunar": {
                        "$ref": "#\/components\/schemas\/HourlyForecastLunar"
                    }
                }
            },
            "HourlyForecastBody": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "ecliptic_longitude_deg": {
                        "type": "number",
                        "format": "float"
                    },
                    "ecliptic_latitude_deg": {
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "sign": {
                        "type": "string"
                    },
                    "sign_label": {
                        "type": "string"
                    },
                    "sign_degree": {
                        "type": "number",
                        "format": "float"
                    },
                    "is_retro": {
                        "type": "boolean"
                    },
                    "speed_deg_h": {
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    }
                }
            },
            "HourlyForecastAspect": {
                "type": "object",
                "properties": {
                    "planet_key": {
                        "type": "string"
                    },
                    "planet_name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "label": {
                        "type": "string"
                    },
                    "exact_angle": {
                        "type": "number",
                        "format": "float"
                    },
                    "separation": {
                        "type": "number",
                        "format": "float"
                    },
                    "delta": {
                        "type": "number",
                        "format": "float"
                    },
                    "harmonic": {
                        "type": "boolean"
                    }
                }
            },
            "HourlyForecastLunar": {
                "type": "object",
                "properties": {
                    "phase_name": {
                        "type": "string"
                    },
                    "phase_angle": {
                        "type": "number",
                        "format": "float"
                    },
                    "age_days": {
                        "type": "number",
                        "format": "float"
                    },
                    "lunar_day": {
                        "type": "integer"
                    },
                    "moon_rise_local": {
                        "type": "string",
                        "nullable": true
                    },
                    "is_satanic": {
                        "type": "boolean"
                    },
                    "satanic_desc": {
                        "type": "string",
                        "nullable": true
                    },
                    "is_void_of_course": {
                        "type": "boolean"
                    },
                    "void_of_course": {
                        "$ref": "#\/components\/schemas\/HourlyForecastVoidCourse"
                    }
                }
            },
            "HourlyForecastVoidCourse": {
                "type": "object",
                "properties": {
                    "is_void_now": {
                        "type": "boolean"
                    },
                    "starts_at_utc": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "starts_at_local": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "ends_at_utc": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "ends_at_local": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "next_sign": {
                        "type": "string",
                        "nullable": true
                    },
                    "last_aspect": {
                        "type": "object",
                        "nullable": true,
                        "additionalProperties": true
                    },
                    "next_aspect_before_sign_change": {
                        "type": "object",
                        "nullable": true,
                        "additionalProperties": true
                    }
                }
            },
            "WorkerRunResponse": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "ok"
                    },
                    "message": {
                        "type": "string",
                        "example": "Сигнал worker отправлен"
                    }
                }
            },
            "ErrorResponse": {
                "type": "object",
                "required": [
                    "status",
                    "message"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "error"
                    },
                    "message": {
                        "type": "string"
                    }
                }
            },
            "ValidationErrorResponse": {
                "type": "object",
                "required": [
                    "status"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "error"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "Поле 'last_name' обязательно"
                        ]
                    }
                }
            }
        }
    },
    "servers": [
        {
            "url": "https:\/\/digihash.ru\/datacollector"
        }
    ]
}