from django.urls import path, include from core.utils.router import TypedRouter from . import views router = TypedRouter() router.register( r"contract-attached-files", views.ContractAttachedFileViewSet, "contract-attached-files-view-set" ) router.register( r"contract-file-contents", views.ContractFileContentViewSet, "contract-file-contents-view-set" ) router.register( r"contract-owners", views.ContractOwnerViewSet, "contract-owners-view-set" ) router.register( r"contracts", views.ContractViewSet, "contracts" ) urlpatterns: list[object] = [ path("", include(router.urls)), # type: ignore path( r"contract-owners//contract", views.ContractDetailApiView.as_view(), name="contract-detail-api-view" ), path( "contract-owners//files/", views.ContractOwnerAttachedFileApiView.as_view(), name="contract-file-api-view" ), path( r"contract-owners//files//upload", views.UploadFileContentApiView.as_view(), name="upload-file-content-api-view" ), path( r"folders//contracts", views.ListFolderContractsApiView.as_view(), name="list-folder-contracts-api-view" ), path( r"contracts//owners", views.ContractOwnerApiView.as_view(), name="contract-owners-api-view" ), path( r"/contracts//files", views.ContractAttachedFileApiView.as_view(), name="contract-attached-files-api-view" ) ]