Enhance API structure and documentation: Added new tags for Account, Integration, Automation, Linker, Optimizer, and Publisher; updated billing endpoints for admin and customer; improved API reference documentation; fixed endpoint paths in frontend services.

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-07 01:13:38 +00:00
parent dc9dba2c9e
commit 7a2b424237
15 changed files with 314 additions and 24 deletions

View File

@@ -11,6 +11,7 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
from drf_spectacular.utils import extend_schema, extend_schema_view
from igny8_core.api.base import SiteSectorModelViewSet
from igny8_core.api.permissions import IsAuthenticatedAndActive, IsEditorOrAbove
@@ -20,6 +21,14 @@ from igny8_core.business.publishing.models import PublishingRecord, DeploymentRe
from igny8_core.business.publishing.services.publisher_service import PublisherService
@extend_schema_view(
list=extend_schema(tags=['Publisher']),
create=extend_schema(tags=['Publisher']),
retrieve=extend_schema(tags=['Publisher']),
update=extend_schema(tags=['Publisher']),
partial_update=extend_schema(tags=['Publisher']),
destroy=extend_schema(tags=['Publisher']),
)
class PublishingRecordViewSet(SiteSectorModelViewSet):
"""
ViewSet for PublishingRecord model.
@@ -41,6 +50,14 @@ class PublishingRecordViewSet(SiteSectorModelViewSet):
return PublishingRecordSerializer
@extend_schema_view(
list=extend_schema(tags=['Publisher']),
create=extend_schema(tags=['Publisher']),
retrieve=extend_schema(tags=['Publisher']),
update=extend_schema(tags=['Publisher']),
partial_update=extend_schema(tags=['Publisher']),
destroy=extend_schema(tags=['Publisher']),
)
class DeploymentRecordViewSet(SiteSectorModelViewSet):
"""
ViewSet for DeploymentRecord model.
@@ -63,6 +80,7 @@ class DeploymentRecordViewSet(SiteSectorModelViewSet):
return DeploymentRecordSerializer
@extend_schema_view()
class PublisherViewSet(viewsets.ViewSet):
"""
Publisher actions for publishing content.
@@ -76,6 +94,7 @@ class PublisherViewSet(viewsets.ViewSet):
super().__init__(**kwargs)
self.publisher_service = PublisherService()
@extend_schema(tags=['Publisher'])
@action(detail=False, methods=['post'], url_path='publish')
def publish(self, request):
"""