# Copyright 2025 Laurent Defert
#
#  This file is part of Sosse.
#
# Sosse is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Sosse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License along with Sosse.
# If not, see <https://www.gnu.org/licenses/>.

# Generated by Django 3.2.19 on 2025-05-30 19:14

from django.db import migrations, models

import se.webhook


class Migration(migrations.Migration):
    dependencies = [
        ("se", "0015_sosse_1_13_0"),
    ]

    operations = [
        migrations.AddField(
            model_name="webhook",
            name="update_json_path",
            field=models.CharField(
                blank=True,
                help_text="The dotted path in the JSON response to the value used for updating the document. If left empty, the entire response will be used to update the document.",
                max_length=512,
                validators=[se.webhook.dotted_json_path_validator],
                verbose_name="Path in JSON response",
            ),
        ),
        migrations.AddField(
            model_name="webhook",
            name="update_json_deserialize",
            field=models.BooleanField(
                default=False,
                help_text="If checked, the response will be deserialized as JSON before updating the document.",
                verbose_name="Deserialize the response before updating the document",
            ),
        ),
    ]
