from django_mindoff.components.api_kit import MindoffAPIMixin
from django_mindoff.components.response_kit import mo_response_kit
from django_mindoff.components.validation_kit import mo_validation_kit
from typing import Any, Dict, List, Union, Optional, Literal
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import IsAuthenticated, AllowAny


class MindOffSampleAPI(MindoffAPIMixin):
    # Documentation Reference:
    # https://django.mindoff.work/latest-release/developer_guide/api-development/

    api_url_name: str = "{{API_URL_NAME}}"
    api_name: str = "{{API_HUMAN_NAME}}"
    api_description: str = "{{API_HUMAN_NAME}} API"
    method: Literal["get", "post", "put", "delete"] = "get"

    def run(self, request, *args, **kwargs):
        # ----- 👇 Add API Logic Here -----------

        return mo_response_kit.json_response(
            code="SUCCESS", category="success", data={}
        )
