<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\Request;

use apexl\Io\modules\validation\Interfaces\HasValidationRulesInterface;
use apexl\Io\modules\validation\Interfaces\ValidatesDataInterface;
use apexl\Io\modules\validation\Traits\ValidatesData;
use apexl\Io\Request\IoRequest;

final class RefreshRequest extends IoRequest implements ValidatesDataInterface
{
    use ValidatesData;

    public function refreshToken(): string
    {
        return $this->bodyParam('refresh_token');
    }

    public function validationRules(): array|HasValidationRulesInterface|string
    {
        return [
            'refresh_token' => 'required|string'
        ];
    }
}