from rest_framework.routers import DefaultRouter from .viewsets import ( CostViewSet, IntegrationConnectionViewSet, IntegrationSyncRunViewSet, ProductBindingViewSet, ProductViewSet, SaleLineViewSet, SaleViewSet, SourceSystemViewSet, StockSnapshotViewSet, ) app_name = "commerce" router = DefaultRouter() router.register(r"connections", IntegrationConnectionViewSet, basename="connection") router.register(r"sync-runs", IntegrationSyncRunViewSet, basename="syncrun") router.register(r"products", ProductViewSet, basename="product") router.register(r"sources", SourceSystemViewSet, basename="source") router.register(r"product-bindings", ProductBindingViewSet, basename="productbinding") router.register(r"sales", SaleViewSet, basename="sale") router.register(r"sale-lines", SaleLineViewSet, basename="saleline") router.register(r"costs", CostViewSet, basename="cost") router.register(r"stock-snapshots", StockSnapshotViewSet, basename="stocksnapshot") urlpatterns = router.urls