from typing import Dict, List, Optional
from app.services.external_api.tcgplayer.base_tcgplayer_service import BaseTCGPlayerService

class TCGPlayerInventoryService(BaseTCGPlayerService):
    def __init__(self):
        super().__init__()

    async def get_tcgplayer_export(self, export_type: str):
        """
        Get a TCGPlayer Staged Inventory Export, Live Inventory Export, or Pricing Export
        """
        if export_type == "staged":
            endpoint = self.staged_inventory_endpoint
        elif export_type == "live":
            endpoint = self.live_inventory_endpoint
        elif export_type == "pricing":
            endpoint = self.pricing_export_endpoint
        else:
            raise ValueError(f"Invalid export type: {export_type}, must be 'staged', 'live', or 'pricing'")
        file_bytes = await self._make_request("GET", endpoint, download_file=True)
        return file_bytes