<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */

declare(strict_types=1);

namespace WriteTextAI\WriteTextAI\Api;

use Magento\Framework\Api\SearchCriteriaInterface;

interface UserWebTokenRepositoryInterface
{
    /**
     * Save UserWebToken
     *
     * @param \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface $userWebToken
     * @return \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function save(
        \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface $userWebToken
    );

    /**
     * Retrieve UserWebToken
     *
     * @param string $userwebtokenId
     * @return \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function get($userwebtokenId);

    /**
     * Retrieve UserWebToken matching the specified criteria.
     *
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenSearchResultsInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function getList(
        \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
    );

    /**
     * Delete UserWebToken
     *
     * @param \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface $userWebToken
     * @return bool true on success
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function delete(
        \WriteTextAI\WriteTextAI\Api\Data\UserWebTokenInterface $userWebToken
    );

    /**
     * Delete UserWebToken by ID
     *
     * @param string $userwebtokenId
     * @return bool true on success
     * @throws \Magento\Framework\Exception\NoSuchEntityException
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function deleteById($userwebtokenId);
}
